tftsr-devops_investigation/node_modules/css-shorthand-properties/index.js
Shaun Arman 8839075805 feat: initial implementation of TFTSR IT Triage & RCA application
Implements Phases 1-8 of the TFTSR implementation plan.

Rust backend (Tauri 2.x, src-tauri/):
- Multi-provider AI: OpenAI-compatible, Anthropic, Gemini, Mistral, Ollama
- PII detection engine: 11 regex patterns with overlap resolution
- SQLCipher AES-256 encrypted database with 10 versioned migrations
- 28 Tauri IPC commands for triage, analysis, document, and system ops
- Ollama: hardware probe, model recommendations, pull/delete with events
- RCA and blameless post-mortem Markdown document generators
- PDF export via printpdf
- Audit log: SHA-256 hash of every external data send
- Integration stubs for Confluence, ServiceNow, Azure DevOps (v0.2)

Frontend (React 18 + TypeScript + Vite, src/):
- 9 pages: full triage workflow NewIssue→LogUpload→Triage→Resolution→RCA→Postmortem→History+Settings
- 7 components: ChatWindow, TriageProgress, PiiDiffViewer, DocEditor, HardwareReport, ModelSelector, UI primitives
- 3 Zustand stores: session, settings (persisted), history
- Type-safe tauriCommands.ts matching Rust backend types exactly
- 8 IT domain system prompts (Linux, Windows, Network, K8s, DB, Virt, HW, Obs)

DevOps:
- .woodpecker/test.yml: rustfmt, clippy, cargo test, tsc, vitest on every push
- .woodpecker/release.yml: linux/amd64 + linux/arm64 builds, Gogs release upload

Verified:
- cargo check: zero errors
- tsc --noEmit: zero errors
- vitest run: 13/13 unit tests passing

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-03-14 22:36:25 -05:00

113 lines
5.9 KiB
JavaScript

/*!
* https://github.com/gilmoreorless/css-shorthand-properties
* MIT Licensed: https://gilmoreorless.mit-license.org/
*/
(function (exports) {
/**
* Data collated from multiple W3C specs: https://www.w3.org/Style/CSS/current-work
* Only specs that are Candidate Recommendations or better are counted, with the
* exception of some Working Drafts that have a lot of traction in browser implementations.
* So far the WD specs included here are Animation and Transitions.
*
* @type {Object}
*/
var props = exports.shorthandProperties = {
// CSS 2.1: https://www.w3.org/TR/CSS2/propidx.html
'list-style': ['-type', '-position', '-image'],
'margin': ['-top', '-right', '-bottom', '-left'],
'outline': ['-width', '-style', '-color'],
'padding': ['-top', '-right', '-bottom', '-left'],
// CSS Backgrounds and Borders Module Level 3: https://www.w3.org/TR/css3-background/
'background': ['-image', '-position', '-size', '-repeat', '-origin', '-clip', '-attachment', '-color'],
'background-position': ['-x', '-y'], // Not found in the spec, but already implemented by every stable browser
'border': ['-width', '-style', '-color'],
'border-color': ['border-top-color', 'border-right-color', 'border-bottom-color', 'border-left-color'],
'border-style': ['border-top-style', 'border-right-style', 'border-bottom-style', 'border-left-style'],
'border-width': ['border-top-width', 'border-right-width', 'border-bottom-width', 'border-left-width'],
'border-top': ['-width', '-style', '-color'],
'border-right': ['-width', '-style', '-color'],
'border-bottom': ['-width', '-style', '-color'],
'border-left': ['-width', '-style', '-color'],
'border-radius': ['border-top-left-radius', 'border-top-right-radius', 'border-bottom-right-radius', 'border-bottom-left-radius'],
'border-image': ['-source', '-slice', '-width', '-outset', '-repeat'],
// CSS Fonts Module Level 3: https://www.w3.org/TR/css3-fonts/
'font': ['-style', '-variant', '-weight', '-stretch', '-size', 'line-height', '-family'],
'font-variant': ['-ligatures', '-alternates', '-caps', '-numeric', '-east-asian'],
// CSS Flexible Box Layout Module Level 1: https://www.w3.org/TR/css3-flexbox-1/
'flex': ['-grow', '-shrink', '-basis'],
'flex-flow': ['flex-direction', 'flex-wrap'],
// CSS Grid Layout Module Level 1: https://www.w3.org/TR/css-grid-1/
'grid': ['-template-rows', '-template-columns', '-template-areas', '-auto-rows', '-auto-columns', '-auto-flow'],
'grid-template': ['-rows', '-columns', '-areas'],
'grid-row': ['-start', '-end'],
'grid-column': ['-start', '-end'],
'grid-area': ['grid-row-start', 'grid-column-start', 'grid-row-end', 'grid-column-end'],
'grid-gap': ['grid-row-gap', 'grid-column-gap'],
// CSS Masking Module Level 1: https://www.w3.org/TR/css-masking/
'mask': ['-image', '-mode', '-position', '-size', '-repeat', '-origin', '-clip'],
'mask-border': ['-source', '-slice', '-width', '-outset', '-repeat', '-mode'],
// CSS Multi-column Layout Module: https://www.w3.org/TR/css3-multicol/
'columns': ['column-width', 'column-count'],
'column-rule': ['-width', '-style', '-color'],
// CSS Scroll Snap Module Level 1: https://www.w3.org/TR/css-scroll-snap-1/
'scroll-padding': ['-top', '-right', '-bottom', '-left'],
'scroll-padding-block': ['-start', '-end'],
'scroll-padding-inline': ['-start', '-end'],
'scroll-snap-margin': ['-top', '-right', '-bottom', '-left'],
'scroll-snap-margin-block': ['-start', '-end'],
'scroll-snap-margin-inline': ['-start', '-end'],
// CSS Speech Module: https://www.w3.org/TR/css3-speech/
'cue': ['-before', '-after'],
'pause': ['-before', '-after'],
'rest': ['-before', '-after'],
// CSS Text Decoration Module Level 3: https://www.w3.org/TR/css-text-decor-3/
'text-decoration': ['-line', '-style', '-color'],
'text-emphasis': ['-style', '-color'],
// CSS Animations (WD): https://www.w3.org/TR/css3-animations
'animation': ['-name', '-duration', '-timing-function', '-delay', '-iteration-count', '-direction', '-fill-mode', '-play-state'],
// CSS Transitions (WD): https://www.w3.org/TR/css3-transitions/
'transition': ['-property', '-duration', '-timing-function', '-delay'],
};
/**
* Check if a CSS property is a shorthand value
* @param {string} property CSS property name
* @return {boolean} True if the property is a shorthand value
*/
exports.isShorthand = function (property) {
return props.hasOwnProperty(property);
};
/**
* Expand a shorthand property into an array of longhand properties
* @param {string} property CSS property name
* @param {boolean} recurse Expand sub-properties, when applicable - default false
* @return {array} List of longhand properties, or the original property if it's not a shorthand
*/
exports.expand = function (property, recurse) {
if (!props.hasOwnProperty(property)) {
return [property];
}
return props[property].map(function (p) {
var longhand = p.substr(0, 1) === '-' ? property + p : p;
return recurse ? exports.expand(longhand, recurse) : longhand;
});
};
})((function (root) {
// CommonJS
if (typeof module !== 'undefined' && module.exports !== undefined) return module.exports;
// Global `cssShorthandProps`
return (root.cssShorthandProps = {});
})(this));