@oicl/openbridge-webcomponents 0.0.20260410101111 → 0.0.20260410105605
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/building-blocks/bar-horizontal/bar-horizontal.d.ts +2 -2
- package/dist/building-blocks/bar-horizontal/bar-horizontal.d.ts.map +1 -1
- package/dist/building-blocks/bar-horizontal/bar-horizontal.js.map +1 -1
- package/dist/building-blocks/bar-vertical/bar-vertical.d.ts +2 -2
- package/dist/building-blocks/bar-vertical/bar-vertical.d.ts.map +1 -1
- package/dist/building-blocks/bar-vertical/bar-vertical.js.map +1 -1
- package/dist/components/system-button/system-button.d.ts +6 -1
- package/dist/components/system-button/system-button.d.ts.map +1 -1
- package/dist/components/system-button/system-button.js +7 -0
- package/dist/components/system-button/system-button.js.map +1 -1
- package/package.json +2 -2
|
@@ -29,9 +29,9 @@ export declare class ObcBarHorizontal extends ObcBarHorizontal_base {
|
|
|
29
29
|
/** Total width in pixels (including padding bands) */
|
|
30
30
|
width: number;
|
|
31
31
|
/** Padding left of the drawing area */
|
|
32
|
-
paddingLeft:
|
|
32
|
+
paddingLeft: number;
|
|
33
33
|
/** Padding right of the drawing area */
|
|
34
|
-
paddingRight:
|
|
34
|
+
paddingRight: number;
|
|
35
35
|
/** Which side this scale lives on */
|
|
36
36
|
side: ExternalScaleSide;
|
|
37
37
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bar-horizontal.d.ts","sourceRoot":"","sources":["../../../src/building-blocks/bar-horizontal/bar-horizontal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAO,MAAM,KAAK,CAAC;AAErC,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,KAAK,CAAC;AAIxC,OAAO,EACL,eAAe,EACf,UAAU,EACV,oBAAoB,EACpB,QAAQ,EACT,MAAM,uCAAuC,CAAC;AAC/C,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,8CAA8C,CAAC;AAK7E,OAAO,EAUL,SAAS,EACT,QAAQ,EACR,cAAc,EACd,iBAAiB,EAEjB,iBAAiB,EAClB,MAAM,qCAAqC,CAAC;AAI7C,OAAO,EACL,SAAS,EACT,QAAQ,EACR,cAAc,EACd,UAAU,EACV,oBAAoB,EACpB,eAAe,EACf,QAAQ,EACR,iBAAiB,EACjB,iBAAiB,GAClB,CAAC;;AAEF;;;;;;;;;;;;;;;;GAgBG;AACH,qBACa,gBAAiB,SAAQ,qBAEpC;IACA,wCAAwC;IACd,QAAQ,SAAK;IACvC,wCAAwC;IACd,QAAQ,SAAO;IAEzC,sDAAsD;IAC5B,KAAK,SAAO;IAEtC,uCAAuC;IACb,WAAW,
|
|
1
|
+
{"version":3,"file":"bar-horizontal.d.ts","sourceRoot":"","sources":["../../../src/building-blocks/bar-horizontal/bar-horizontal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAO,MAAM,KAAK,CAAC;AAErC,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,KAAK,CAAC;AAIxC,OAAO,EACL,eAAe,EACf,UAAU,EACV,oBAAoB,EACpB,QAAQ,EACT,MAAM,uCAAuC,CAAC;AAC/C,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,8CAA8C,CAAC;AAK7E,OAAO,EAUL,SAAS,EACT,QAAQ,EACR,cAAc,EACd,iBAAiB,EAEjB,iBAAiB,EAClB,MAAM,qCAAqC,CAAC;AAI7C,OAAO,EACL,SAAS,EACT,QAAQ,EACR,cAAc,EACd,UAAU,EACV,oBAAoB,EACpB,eAAe,EACf,QAAQ,EACR,iBAAiB,EACjB,iBAAiB,GAClB,CAAC;;AAEF;;;;;;;;;;;;;;;;GAgBG;AACH,qBACa,gBAAiB,SAAQ,qBAEpC;IACA,wCAAwC;IACd,QAAQ,SAAK;IACvC,wCAAwC;IACd,QAAQ,SAAO;IAEzC,sDAAsD;IAC5B,KAAK,SAAO;IAEtC,uCAAuC;IACb,WAAW,EAAE,MAA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;IACvD,2DAA2D;IACjC,OAAO,CAAC,EAAE,MAAM,CAAa;IACvD,qCAAqC;IACX,KAAK,CAAC,EAAE,MAAM,CAAa;IAErD,iEAAiE;IACvC,KAAK,EAAE,eAAe,CAA0B;IAG1E,kGAAkG;IACxE,cAAc,EAAE,cAAc,CACjC;IACvB;;;OAGG;IAC2B,OAAO,CAAC,EAAE,KAAK,CAAC;QAC5C,GAAG,EAAE,MAAM,CAAC;QACZ,GAAG,EAAE,MAAM,CAAC;QACZ,IAAI,EAAE,UAAU,CAAC;QACjB,MAAM,EAAE,OAAO,CAAC;KACjB,CAAC,CAAM;IAER;;;;;OAKG;IACwB,qBAAqB,UAAS;IAEhD,MAAM;IAqGN,OAAO,CAAC,OAAO,EAAE,cAAc;IA8CxC;;;;;OAKG;IACH,OAAO,CAAC,gBAAgB;cA8DL,gBAAgB;IAI1B,iBAAiB,IAAI,IAAI;IAezB,oBAAoB,IAAI,IAAI;IAMrC,OAAO,CAAC,0BAA0B;IASlC;;;;OAIG;IACH,OAAO,CAAC,4BAA4B;IAMpC;;OAEG;IACH,OAAO,CAAC,6BAA6B;IAMrC;;;OAGG;IACH,OAAO,CAAC,2BAA2B;IAiBnC,OAAO,CAAC,8BAA8B;IA0BtC;;;;OAIG;IACH,OAAO,CAAC,yBAAyB;CAelC;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,oBAAoB,EAAE,gBAAgB,CAAC;KACxC;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bar-horizontal.js","sources":["../../../src/building-blocks/bar-horizontal/bar-horizontal.ts"],"sourcesContent":["import {LitElement, html} from 'lit';\nimport {property, state} from 'lit/decorators.js';\nimport type {PropertyValues} from 'lit';\nimport {customElement} from '../../decorator.js';\nimport {ResizeController} from '@lit-labs/observers/resize-controller.js';\nimport {CHART_DIMENSIONS} from '../../charthelpers/constants.js';\nimport {\n InstrumentState,\n FrameStyle,\n BorderRadiusPosition,\n Priority,\n} from '../../navigation-instruments/types.js';\nimport type {AdviceType} from '../../navigation-instruments/watch/advice.js';\nimport type {\n ExternalScaleAdvice,\n ExternalScaleConfig,\n} from '../external-scale/external-scale.js';\nimport {\n computeExternalScaleViewBox,\n computeFixedAspectRatioScale,\n computeExternalScaleLayout,\n renderExternalScale,\n toExternalScaleLayoutConfig,\n computeScaleDimensionsForReport,\n computeExternalScaleEffectiveBarThickness,\n readExternalScaleBorderRadiusPx,\n startExternalScaleBorderRadiusObserver,\n ScaleType,\n FillMode,\n AdvicePosition,\n BarContainerStyle,\n ExternalScaleOrientation,\n ExternalScaleSide,\n} from '../external-scale/external-scale.js';\nimport {SetpointMixin} from '../../svghelpers/setpoint-mixin.js';\n\n// Re-export shared enums for convenience\nexport {\n ScaleType,\n FillMode,\n AdvicePosition,\n FrameStyle,\n BorderRadiusPosition,\n InstrumentState,\n Priority,\n BarContainerStyle,\n ExternalScaleSide,\n};\n\n/**\n * Horizontal SVG bar + external scale.\n *\n * This is a thin web-component wrapper around the pure SVG building-block renderer in `external-scale.ts`.\n *\n * It sets up the outer `<svg>`/`viewBox` for a horizontal scale and delegates rendering/layout to:\n * - `computeExternalScaleLayout(...)`\n * - `renderExternalScale(config)`\n *\n * For renderer documentation see: **Building Blocks/External Scale**.\n *\n * For more test cases (Auto at-setpoint detection, Manual at-setpoint control, Deadband tuning and Zero snap behavior) see: **Bars and Graphs/Bar Vertical**.\n *\n * Set `priority` to `Priority.enhanced` to use the blue/enhanced color palette\n * for bar fill and setpoint instead of the default gray/regular palette\n * (default: `Priority.regular`).\n */\n@customElement('obc-bar-horizontal')\nexport class ObcBarHorizontal extends SetpointMixin(LitElement, {\n defaultDeadband: 1,\n}) {\n /** Minimum scale value (manual mode) */\n @property({type: Number}) minValue = 0;\n /** Maximum scale value (manual mode) */\n @property({type: Number}) maxValue = 100;\n\n /** Total width in pixels (including padding bands) */\n @property({type: Number}) width = 320;\n\n /** Padding left of the drawing area */\n @property({type: Number}) paddingLeft = CHART_DIMENSIONS.CANVAS_PADDING;\n\n /** Padding right of the drawing area */\n @property({type: Number}) paddingRight = CHART_DIMENSIONS.CANVAS_PADDING;\n\n /** Which side this scale lives on */\n @property({type: String}) side: ExternalScaleSide = ExternalScaleSide.bottom;\n\n /**\n * When true, freezes all internal calculations and scales the entire component\n * proportionally (like CSS transform:scale), except label font-size remains constant.\n * When false (default), dimensions react to component properties.\n */\n @property({type: Boolean})\n fixedAspectRatio = false;\n\n /**\n * Reference size for proportional scaling when fixedAspectRatio is true.\n * At this width, the scale renders at native 1:1 (matches Figma design).\n * Above this width, the scale grows proportionally; below, it shrinks.\n * @default 384\n */\n @property({type: Number})\n scaleReferenceSize = 384;\n\n @state()\n private _scale = 1;\n\n // ResizeController automatically subscribes/unsubscribes based on component lifecycle\n // @ts-expect-error - Controller is used for side effects, not accessed directly\n private _resizeController = new ResizeController(this, {\n callback: (entries) => {\n if (!this.fixedAspectRatio) return;\n\n const entry = entries[0];\n if (!entry) return;\n\n // Use the centralized function that computes scale based on reference size\n // For horizontal scales, compare container width to reference size\n const containerMainAxisSize = entry.contentRect.width;\n\n this._scale = computeFixedAspectRatioScale({\n orientation: ExternalScaleOrientation.horizontal,\n containerMainAxisSize,\n scaleReferenceSize: this.scaleReferenceSize,\n });\n\n // console.debug(`[bar-horizontal] ResizeController:`, {\n // fixedAspectRatio: this.fixedAspectRatio,\n // containerWidth: containerMainAxisSize,\n // scaleReferenceSize: this.scaleReferenceSize,\n // computedScale: this._scale,\n // width: this.width,\n // });\n\n // Report scaled dimensions to parent chart\n this.reportDimensions();\n },\n });\n\n // Bands (thickness)\n /** Show scale tickmarks */\n @property({type: Boolean, attribute: false}) hasScale = true;\n @property({type: Boolean, attribute: false}) showLabels = true;\n /** Show bar */\n @property({type: Boolean}) hasBar = false;\n /** Show background behind the scale tickmarks. */\n @property({type: Boolean})\n scaleBackground = false;\n /**\n * Bar container background style.\n * When undefined, defaults based on scaleBackground.\n * Set explicitly to override: 'primary' (lighter) or 'secondary' (gray).\n */\n @property({type: String})\n barContainerStyle?: BarContainerStyle = undefined;\n /** Bar/fill thickness in pixels */\n @property({type: Number}) barThickness = 24;\n /** Tickmark band thickness in pixels. */\n @property({type: Number}) tickThickness = 24;\n /** Label band thickness in pixels. */\n @property({type: Number}) labelThickness = 60;\n\n // Tick configuration\n /**\n * Array of values for main tickmarks. When undefined, no main tickmarks shown.\n * When empty array [], defaults to [minValue, 0, maxValue].\n */\n @property({attribute: false}) mainTickmarks?: number[] = [];\n /**\n * Interval for primary (longest) tickmarks with labels (minimum 1).\n * When undefined, no primary tickmarks are shown.\n */\n @property({type: Number}) primaryTickmarkInterval?: number = undefined;\n /**\n * Interval for secondary (medium) tickmarks (minimum 1).\n * When undefined, no secondary tickmarks are shown.\n */\n @property({type: Number}) secondaryTickmarkInterval?: number = undefined;\n /**\n * Interval for tertiary (shortest) tickmarks (minimum 1).\n * When undefined, no tertiary tickmarks are shown.\n */\n @property({type: Number}) tertiaryTickmarkInterval?: number = undefined;\n /** Scale display mode: regular or condensed (shorter ticks) */\n @property({type: String}) scaleType: ScaleType = ScaleType.regular;\n /** Frame style: regular (4px gap for all), flat (main tickmarks touch edge), framed, or instrument */\n @property({type: String}) frameStyle: FrameStyle = FrameStyle.regular;\n /** Border radius position based on component layout */\n @property({type: String})\n borderRadiusPosition?: BorderRadiusPosition = undefined;\n\n /**\n * When true, the component is used inside an instrument (e.g., gauge-trend).\n * In this mode, only label font size responds to .obc-component-size-* CSS classes.\n * Border radius and bar thickness use explicit values or defaults, not CSS variables.\n * @default false\n */\n @property({type: Boolean})\n instrumentMode = false;\n\n /**\n * Explicit border radius value in pixels.\n * When instrumentMode=true, this value is used directly (defaults to 8px for regular, 4px for condensed).\n * When instrumentMode=false, this is ignored and border radius is read from CSS variable.\n */\n @property({type: Number})\n borderRadius?: number = undefined;\n\n @state()\n private _computedBorderRadius?: number;\n\n private _borderRadiusObserver?: MutationObserver;\n\n // @ts-expect-error - Controller is used for side effects, not accessed directly\n private _borderRadiusResizeController = new ResizeController(this, {\n callback: () => {\n // Skip CSS variable reading in instrument mode\n if (!this.instrumentMode) {\n this._refreshBorderRadiusFromCssVar();\n }\n },\n });\n\n // Values\n /** Color priority: enhanced uses blue instrument colors for bar fill and setpoint */\n @property({type: String}) priority: Priority = Priority.regular;\n /** Fill visualization mode: fill or tint */\n @property({type: String}) fillMode: FillMode = FillMode.fill;\n /** Minimum fill value for tint mode (defaults to 0) */\n @property({type: Number}) fillMin?: number = undefined;\n /** Maximum fill value for tint mode (defaults to value) */\n @property({type: Number}) fillMax?: number = undefined;\n /** Current value (bar fill level) */\n @property({type: Number}) value?: number = undefined;\n\n /** Instrument state (affects colors and some marker behavior) */\n @property({type: String}) state: InstrumentState = InstrumentState.active;\n\n // Advice\n /** Advice overlay positioning: center (in bar), inner (covers minor ticks), outer (no overlap) */\n @property({type: String}) advicePosition: AdvicePosition =\n AdvicePosition.inner;\n /**\n * Advice/alert overlays with state and positioning.\n * When undefined or empty, no advice shown.\n */\n @property({attribute: false}) advices?: Array<{\n min: number;\n max: number;\n type: AdviceType;\n hinted: boolean;\n }> = [];\n\n /**\n * When true, displays a dot indicator at the current value position.\n * The dot is rendered in the scale band, touching its inner edge (towards the chart).\n * This provides an alternative to bar fill for highlighting the current value.\n * @default false\n */\n @property({type: Boolean}) highlightCurrentValue = false;\n\n override render() {\n // When fixedAspectRatio is true, use scaleReferenceSize for the viewBox length.\n // This makes the SVG render at the \"design reference size\" and then scale\n // proportionally to fit the actual container via preserveAspectRatio=\"xMidYMid meet\".\n // The _scale CSS variable counter-scales text labels to maintain constant visual size.\n const effectiveLength = this.fixedAspectRatio\n ? this.scaleReferenceSize\n : this.width;\n\n // The parent chart component (chart-line-base) calculates and passes the correct\n // viewBox padding values when fixedAspectRatioScaling is enabled. The padding is\n // pre-scaled to: basePadding * scaleReferenceSize / referenceWidth\n // This ensures the visual padding matches the chart's Canvas padding at any aspect ratio.\n\n // console.debug(`[bar-horizontal] render:`, {\n // fixedAspectRatio: this.fixedAspectRatio,\n // width: this.width,\n // scaleReferenceSize: this.scaleReferenceSize,\n // effectiveLength,\n // scale: this._scale,\n // paddingLeft: this.paddingLeft,\n // paddingRight: this.paddingRight,\n // });\n\n const config: ExternalScaleConfig = {\n orientation: ExternalScaleOrientation.horizontal,\n side: this.side,\n length: effectiveLength,\n paddingStart: this.paddingLeft,\n paddingEnd: this.paddingRight,\n minValue: this.minValue,\n maxValue: this.maxValue,\n hasScale: this.hasScale,\n labels: this.showLabels,\n hasBar: this.hasBar,\n scaleBackground: this.scaleBackground,\n barContainerStyle: this.barContainerStyle,\n barThickness: this.barThickness,\n tickThickness: this.tickThickness,\n labelThickness: this.labelThickness,\n borderRadius: this._getEffectiveBorderRadius(),\n mainTickmarks: this.mainTickmarks,\n primaryTickmarkInterval: this.primaryTickmarkInterval,\n secondaryTickmarkInterval: this.secondaryTickmarkInterval,\n tertiaryTickmarkInterval: this.tertiaryTickmarkInterval,\n scaleType: this.scaleType,\n frameStyle: this.frameStyle,\n borderRadiusPosition: this.borderRadiusPosition,\n priority: this.priority,\n setpointOverride: this.setpointOverride,\n fillMode: this.fillMode,\n fillMin: this.fillMin,\n fillMax: this.fillMax,\n value: this.value,\n setpoint: this.setpoint,\n newSetpoint: this.newSetpoint,\n atSetpoint: this.atSetpoint,\n autoAtSetpoint: this.autoAtSetpoint,\n autoAtSetpointDeadband: this.autoAtSetpointDeadband,\n setpointAtZeroDeadband: this.setpointAtZeroDeadband,\n animateSetpoint: this.animateSetpoint,\n departingNewSetpoint: this.departingNewSetpoint,\n state: this.state,\n touching: this.touching,\n advicePosition: this.advicePosition,\n advices: this.advices as ExternalScaleAdvice[],\n fixedAspectRatio: this.fixedAspectRatio,\n instrumentMode: this.instrumentMode,\n highlightCurrentValue: this.highlightCurrentValue,\n };\n\n const layout = computeExternalScaleLayout(\n toExternalScaleLayoutConfig(config)\n );\n\n const parts = renderExternalScale(config);\n\n const viewBox = computeExternalScaleViewBox(\n {orientation: config.orientation, length: effectiveLength},\n layout\n );\n const preserveAspectRatio = this.fixedAspectRatio\n ? 'xMidYMid meet'\n : 'none';\n\n return html`\n <svg\n width=${this.fixedAspectRatio ? '100%' : `${this.width}px`}\n height=${this.fixedAspectRatio ? '100%' : `${viewBox.height}px`}\n viewBox=\"${viewBox.x} ${viewBox.y} ${viewBox.width} ${viewBox.height}\"\n preserveAspectRatio=\"${preserveAspectRatio}\"\n style=\"--scale: ${this.fixedAspectRatio ? this._scale : 1};\"\n part=\"svg\"\n >\n ${parts.barContainer} ${parts.barFill} ${parts.scaleBackground}\n ${parts.tickmarks} ${parts.labels} ${parts.adviceOverlays}\n ${parts.currentValueDot} ${parts.setpoint}\n </svg>\n `;\n }\n\n override updated(changed: PropertyValues) {\n super.updated(changed);\n\n if (changed.has('scaleType')) {\n this._refreshBorderRadiusFromCssVar();\n }\n\n // Update host styles when fixedAspectRatio changes\n if (changed.has('fixedAspectRatio')) {\n if (this.fixedAspectRatio) {\n this._applyFixedAspectRatioStyles();\n // Force initial scale calculation based on current size\n this._updateScaleFromCurrentSize();\n } else {\n this._removeFixedAspectRatioStyles();\n this._scale = 1;\n }\n }\n\n // Also recalculate scale when scaleReferenceSize changes\n if (changed.has('scaleReferenceSize') && this.fixedAspectRatio) {\n this._updateScaleFromCurrentSize();\n }\n\n // Report dimensions to parent chart when layout-affecting properties change.\n // In fixedAspectRatio mode, resize events also trigger reportDimensions() via ResizeController.\n // In regular mode, we report on every update to keep parent chart in sync.\n // Layout-affecting properties change the computed thickness and must notify the parent\n // even in fixedAspectRatio mode to keep chart padding accurate.\n const layoutChanged =\n changed.has('side') ||\n changed.has('showLabels') ||\n changed.has('hasScale') ||\n changed.has('hasBar') ||\n changed.has('barThickness') ||\n changed.has('tickThickness') ||\n changed.has('labelThickness') ||\n changed.has('scaleType') ||\n changed.has('borderRadiusPosition') ||\n changed.has('borderRadius');\n\n if (!this.fixedAspectRatio || layoutChanged) {\n this.reportDimensions();\n }\n }\n\n /**\n * Report scale dimensions to parent chart component.\n * When fixedAspectRatio=true, reports the actual visual (scaled) thickness\n * so the chart can correctly reserve space for the scale.\n * When fixedAspectRatio=false, reports the base/unscaled thickness.\n */\n private reportDimensions() {\n const effectiveBarThickness = computeExternalScaleEffectiveBarThickness({\n hasBar: this.hasBar,\n barThickness: this.barThickness,\n borderRadius: this._getEffectiveBorderRadius(),\n scaleType: this.scaleType,\n });\n\n // Use scaleReferenceSize for layout calculation when in fixedAspectRatio mode\n // This ensures consistent layout dimensions based on the design reference size\n const effectiveLength = this.fixedAspectRatio\n ? this.scaleReferenceSize\n : this.width;\n\n const baseDimensions = computeScaleDimensionsForReport({\n orientation: ExternalScaleOrientation.horizontal,\n side: this.side,\n hasBar: this.hasBar,\n hasScale: this.hasScale,\n labels: this.showLabels,\n barThickness: effectiveBarThickness,\n tickThickness: this.tickThickness,\n labelThickness: this.labelThickness,\n length: effectiveLength,\n scaleType: this.scaleType,\n });\n\n // When fixedAspectRatio=true, the SVG scales proportionally via preserveAspectRatio=\"meet\".\n // The visual thickness = baseThickness × scale, where scale = containerSize / scaleReferenceSize.\n // Report the actual visual thickness so the chart can reserve the correct space.\n const dimensions = this.fixedAspectRatio\n ? {\n ...baseDimensions,\n thickness: Math.round(baseDimensions.thickness * this._scale),\n }\n : baseDimensions;\n\n // console.debug(`[bar-horizontal] reportDimensions:`, {\n // fixedAspectRatio: this.fixedAspectRatio,\n // side: dimensions.side,\n // thickness: dimensions.thickness,\n // scale: this._scale,\n // width: this.width,\n // scaleReferenceSize: this.scaleReferenceSize,\n // effectiveLength,\n // hasBar: this.hasBar,\n // hasScale: this.hasScale,\n // showLabels: this.showLabels,\n // barThickness: this.barThickness,\n // tickThickness: this.tickThickness,\n // labelThickness: this.labelThickness,\n // });\n\n this.dispatchEvent(\n new CustomEvent('scale-dimensions-changed', {\n detail: dimensions,\n bubbles: true,\n composed: true,\n })\n );\n }\n\n protected override createRenderRoot() {\n return this;\n }\n\n override connectedCallback(): void {\n super.connectedCallback();\n // Only read from CSS variable and observe changes when not in instrument mode\n if (!this.instrumentMode) {\n this._refreshBorderRadiusFromCssVar();\n this._startBorderRadiusObserver();\n }\n\n // Ensure the element fills its container when in fixedAspectRatio mode\n // Custom elements are display:inline by default, which doesn't work for percentage-based sizing\n if (this.fixedAspectRatio) {\n this._applyFixedAspectRatioStyles();\n }\n }\n\n override disconnectedCallback(): void {\n this._borderRadiusObserver?.disconnect();\n this._borderRadiusObserver = undefined;\n super.disconnectedCallback();\n }\n\n private _startBorderRadiusObserver(): void {\n this._borderRadiusObserver?.disconnect();\n\n this._borderRadiusObserver = startExternalScaleBorderRadiusObserver(\n this,\n () => this._refreshBorderRadiusFromCssVar()\n );\n }\n\n /**\n * Apply CSS styles needed for fixedAspectRatio mode.\n * Custom elements are display:inline by default, which doesn't work with percentage-based sizing.\n * We need display:block and width:100% to fill the slot container.\n */\n private _applyFixedAspectRatioStyles(): void {\n this.style.display = 'block';\n this.style.width = '100%';\n this.style.height = 'auto';\n }\n\n /**\n * Remove fixed aspect ratio styles when switching back to pixel mode.\n */\n private _removeFixedAspectRatioStyles(): void {\n this.style.display = '';\n this.style.width = '';\n this.style.height = '';\n }\n\n /**\n * Calculate scale based on current element size.\n * Called when fixedAspectRatio is enabled or scaleReferenceSize changes.\n */\n private _updateScaleFromCurrentSize(): void {\n // Use requestAnimationFrame to ensure layout is complete\n requestAnimationFrame(() => {\n const containerWidth = this.clientWidth;\n if (containerWidth > 0) {\n this._scale = computeFixedAspectRatioScale({\n orientation: ExternalScaleOrientation.horizontal,\n containerMainAxisSize: containerWidth,\n scaleReferenceSize: this.scaleReferenceSize,\n });\n this.requestUpdate();\n // Report updated dimensions to parent (matches pattern in ResizeController and _refreshBorderRadiusFromCssVar)\n this.reportDimensions();\n }\n });\n }\n\n private _refreshBorderRadiusFromCssVar(): void {\n // Skip CSS variable reading in instrument mode\n if (this.instrumentMode) return;\n\n const next = readExternalScaleBorderRadiusPx(this, this.scaleType);\n\n if (this._computedBorderRadius !== next) {\n this._computedBorderRadius = next;\n }\n\n // In fixed-aspect-ratio mode, recompute scale when border radius changes\n // (border radius affects effective bar thickness and therefore viewBox)\n if (this.fixedAspectRatio) {\n const rect = this.getBoundingClientRect();\n if (rect.width > 0) {\n this._scale = computeFixedAspectRatioScale({\n orientation: ExternalScaleOrientation.horizontal,\n containerMainAxisSize: rect.width,\n scaleReferenceSize: this.scaleReferenceSize,\n });\n // Report updated dimensions\n this.reportDimensions();\n }\n }\n }\n\n /**\n * Get the effective border radius to use.\n * In instrument mode: use explicit borderRadius prop or default based on scaleType.\n * In normal mode: use CSS variable computed value.\n */\n private _getEffectiveBorderRadius(): number {\n if (this.instrumentMode) {\n // In instrument mode, use explicit value or default\n if (this.borderRadius !== undefined) {\n return this.borderRadius;\n }\n // Default: 8px for regular, 4px for condensed\n return this.scaleType === ScaleType.condensed ? 4 : 8;\n }\n // Normal mode: use CSS variable computed value\n return (\n this._computedBorderRadius ??\n (this.scaleType === ScaleType.condensed ? 4 : 8)\n );\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-bar-horizontal': ObcBarHorizontal;\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAmEO,IAAM,mBAAN,cAA+B,cAAc,YAAY;AAAA,EAC9D,iBAAiB;AACnB,CAAC,EAAE;AAAA,EAFI,cAAA;AAAA,UAAA,GAAA,SAAA;AAIqB,SAAA,WAAW;AAEX,SAAA,WAAW;AAGX,SAAA,QAAQ;AAGR,SAAA,cAAc,iBAAiB;AAG/B,SAAA,eAAe,iBAAiB;AAGhC,SAAA,OAA0B,kBAAkB;AAQtE,SAAA,mBAAmB;AASnB,SAAA,qBAAqB;AAGrB,SAAQ,SAAS;AAIjB,SAAQ,oBAAoB,IAAI,iBAAiB,MAAM;AAAA,MACrD,UAAU,CAAC,YAAY;AACrB,YAAI,CAAC,KAAK,iBAAkB;AAE5B,cAAM,QAAQ,QAAQ,CAAC;AACvB,YAAI,CAAC,MAAO;AAIZ,cA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gBAAA,CAAA;AAGQ,gBAAA;AAAA,EADP,MAAA;AAAM,GA7II,iBA8IH,WAAA,yBAAA,CAAA;AAgBkB,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,OAAA,CAAO;AAAA,GA9Jb,iBA8Je,WAAA,YAAA,CAAA;AAEA,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,OAAA,CAAO;AAAA,GAhKb,iBAgKe,WAAA,YAAA,CAAA;AAEA,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,OAAA,CAAO;AAAA,GAlKb,iBAkKe,WAAA,WAAA,CAAA;AAEA,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,OAAA,CAAO;AAAA,GApKb,iBAoKe,WAAA,WAAA,CAAA;AAEA,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,OAAA,CAAO;AAAA,GAtKb,iBAsKe,WAAA,SAAA,CAAA;AAGA,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,OAAA,CAAO;AAAA,GAzKb,iBAyKe,WAAA,SAAA,CAAA;AAIA,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,OAAA,CAAO;AAAA,GA7Kb,iBA6Ke,WAAA,kBAAA,CAAA;AAMI,gBAAA;AAAA,EAA7B,SAAS,EAAC,WAAW,MAAA,CAAM;AAAA,GAnLjB,iBAmLmB,WAAA,WAAA,CAAA;AAaH,gBAAA;AAAA,EAA1B,SAAS,EAAC,MAAM,QAAA,CAAQ;AAAA,GAhMd,iBAgMgB,WAAA,yBAAA,CAAA;AAhMhB,mBAAN,gBAAA;AAAA,EADN,cAAc,oBAAoB;AAAA,GACtB,gBAAA;"}
|
|
1
|
+
{"version":3,"file":"bar-horizontal.js","sources":["../../../src/building-blocks/bar-horizontal/bar-horizontal.ts"],"sourcesContent":["import {LitElement, html} from 'lit';\nimport {property, state} from 'lit/decorators.js';\nimport type {PropertyValues} from 'lit';\nimport {customElement} from '../../decorator.js';\nimport {ResizeController} from '@lit-labs/observers/resize-controller.js';\nimport {CHART_DIMENSIONS} from '../../charthelpers/constants.js';\nimport {\n InstrumentState,\n FrameStyle,\n BorderRadiusPosition,\n Priority,\n} from '../../navigation-instruments/types.js';\nimport type {AdviceType} from '../../navigation-instruments/watch/advice.js';\nimport type {\n ExternalScaleAdvice,\n ExternalScaleConfig,\n} from '../external-scale/external-scale.js';\nimport {\n computeExternalScaleViewBox,\n computeFixedAspectRatioScale,\n computeExternalScaleLayout,\n renderExternalScale,\n toExternalScaleLayoutConfig,\n computeScaleDimensionsForReport,\n computeExternalScaleEffectiveBarThickness,\n readExternalScaleBorderRadiusPx,\n startExternalScaleBorderRadiusObserver,\n ScaleType,\n FillMode,\n AdvicePosition,\n BarContainerStyle,\n ExternalScaleOrientation,\n ExternalScaleSide,\n} from '../external-scale/external-scale.js';\nimport {SetpointMixin} from '../../svghelpers/setpoint-mixin.js';\n\n// Re-export shared enums for convenience\nexport {\n ScaleType,\n FillMode,\n AdvicePosition,\n FrameStyle,\n BorderRadiusPosition,\n InstrumentState,\n Priority,\n BarContainerStyle,\n ExternalScaleSide,\n};\n\n/**\n * Horizontal SVG bar + external scale.\n *\n * This is a thin web-component wrapper around the pure SVG building-block renderer in `external-scale.ts`.\n *\n * It sets up the outer `<svg>`/`viewBox` for a horizontal scale and delegates rendering/layout to:\n * - `computeExternalScaleLayout(...)`\n * - `renderExternalScale(config)`\n *\n * For renderer documentation see: **Building Blocks/External Scale**.\n *\n * For more test cases (Auto at-setpoint detection, Manual at-setpoint control, Deadband tuning and Zero snap behavior) see: **Bars and Graphs/Bar Vertical**.\n *\n * Set `priority` to `Priority.enhanced` to use the blue/enhanced color palette\n * for bar fill and setpoint instead of the default gray/regular palette\n * (default: `Priority.regular`).\n */\n@customElement('obc-bar-horizontal')\nexport class ObcBarHorizontal extends SetpointMixin(LitElement, {\n defaultDeadband: 1,\n}) {\n /** Minimum scale value (manual mode) */\n @property({type: Number}) minValue = 0;\n /** Maximum scale value (manual mode) */\n @property({type: Number}) maxValue = 100;\n\n /** Total width in pixels (including padding bands) */\n @property({type: Number}) width = 320;\n\n /** Padding left of the drawing area */\n @property({type: Number}) paddingLeft: number =\n CHART_DIMENSIONS.CANVAS_PADDING;\n\n /** Padding right of the drawing area */\n @property({type: Number}) paddingRight: number =\n CHART_DIMENSIONS.CANVAS_PADDING;\n\n /** Which side this scale lives on */\n @property({type: String}) side: ExternalScaleSide = ExternalScaleSide.bottom;\n\n /**\n * When true, freezes all internal calculations and scales the entire component\n * proportionally (like CSS transform:scale), except label font-size remains constant.\n * When false (default), dimensions react to component properties.\n */\n @property({type: Boolean})\n fixedAspectRatio = false;\n\n /**\n * Reference size for proportional scaling when fixedAspectRatio is true.\n * At this width, the scale renders at native 1:1 (matches Figma design).\n * Above this width, the scale grows proportionally; below, it shrinks.\n * @default 384\n */\n @property({type: Number})\n scaleReferenceSize = 384;\n\n @state()\n private _scale = 1;\n\n // ResizeController automatically subscribes/unsubscribes based on component lifecycle\n // @ts-expect-error - Controller is used for side effects, not accessed directly\n private _resizeController = new ResizeController(this, {\n callback: (entries) => {\n if (!this.fixedAspectRatio) return;\n\n const entry = entries[0];\n if (!entry) return;\n\n // Use the centralized function that computes scale based on reference size\n // For horizontal scales, compare container width to reference size\n const containerMainAxisSize = entry.contentRect.width;\n\n this._scale = computeFixedAspectRatioScale({\n orientation: ExternalScaleOrientation.horizontal,\n containerMainAxisSize,\n scaleReferenceSize: this.scaleReferenceSize,\n });\n\n // console.debug(`[bar-horizontal] ResizeController:`, {\n // fixedAspectRatio: this.fixedAspectRatio,\n // containerWidth: containerMainAxisSize,\n // scaleReferenceSize: this.scaleReferenceSize,\n // computedScale: this._scale,\n // width: this.width,\n // });\n\n // Report scaled dimensions to parent chart\n this.reportDimensions();\n },\n });\n\n // Bands (thickness)\n /** Show scale tickmarks */\n @property({type: Boolean, attribute: false}) hasScale = true;\n @property({type: Boolean, attribute: false}) showLabels = true;\n /** Show bar */\n @property({type: Boolean}) hasBar = false;\n /** Show background behind the scale tickmarks. */\n @property({type: Boolean})\n scaleBackground = false;\n /**\n * Bar container background style.\n * When undefined, defaults based on scaleBackground.\n * Set explicitly to override: 'primary' (lighter) or 'secondary' (gray).\n */\n @property({type: String})\n barContainerStyle?: BarContainerStyle = undefined;\n /** Bar/fill thickness in pixels */\n @property({type: Number}) barThickness = 24;\n /** Tickmark band thickness in pixels. */\n @property({type: Number}) tickThickness = 24;\n /** Label band thickness in pixels. */\n @property({type: Number}) labelThickness = 60;\n\n // Tick configuration\n /**\n * Array of values for main tickmarks. When undefined, no main tickmarks shown.\n * When empty array [], defaults to [minValue, 0, maxValue].\n */\n @property({attribute: false}) mainTickmarks?: number[] = [];\n /**\n * Interval for primary (longest) tickmarks with labels (minimum 1).\n * When undefined, no primary tickmarks are shown.\n */\n @property({type: Number}) primaryTickmarkInterval?: number = undefined;\n /**\n * Interval for secondary (medium) tickmarks (minimum 1).\n * When undefined, no secondary tickmarks are shown.\n */\n @property({type: Number}) secondaryTickmarkInterval?: number = undefined;\n /**\n * Interval for tertiary (shortest) tickmarks (minimum 1).\n * When undefined, no tertiary tickmarks are shown.\n */\n @property({type: Number}) tertiaryTickmarkInterval?: number = undefined;\n /** Scale display mode: regular or condensed (shorter ticks) */\n @property({type: String}) scaleType: ScaleType = ScaleType.regular;\n /** Frame style: regular (4px gap for all), flat (main tickmarks touch edge), framed, or instrument */\n @property({type: String}) frameStyle: FrameStyle = FrameStyle.regular;\n /** Border radius position based on component layout */\n @property({type: String})\n borderRadiusPosition?: BorderRadiusPosition = undefined;\n\n /**\n * When true, the component is used inside an instrument (e.g., gauge-trend).\n * In this mode, only label font size responds to .obc-component-size-* CSS classes.\n * Border radius and bar thickness use explicit values or defaults, not CSS variables.\n * @default false\n */\n @property({type: Boolean})\n instrumentMode = false;\n\n /**\n * Explicit border radius value in pixels.\n * When instrumentMode=true, this value is used directly (defaults to 8px for regular, 4px for condensed).\n * When instrumentMode=false, this is ignored and border radius is read from CSS variable.\n */\n @property({type: Number})\n borderRadius?: number = undefined;\n\n @state()\n private _computedBorderRadius?: number;\n\n private _borderRadiusObserver?: MutationObserver;\n\n // @ts-expect-error - Controller is used for side effects, not accessed directly\n private _borderRadiusResizeController = new ResizeController(this, {\n callback: () => {\n // Skip CSS variable reading in instrument mode\n if (!this.instrumentMode) {\n this._refreshBorderRadiusFromCssVar();\n }\n },\n });\n\n // Values\n /** Color priority: enhanced uses blue instrument colors for bar fill and setpoint */\n @property({type: String}) priority: Priority = Priority.regular;\n /** Fill visualization mode: fill or tint */\n @property({type: String}) fillMode: FillMode = FillMode.fill;\n /** Minimum fill value for tint mode (defaults to 0) */\n @property({type: Number}) fillMin?: number = undefined;\n /** Maximum fill value for tint mode (defaults to value) */\n @property({type: Number}) fillMax?: number = undefined;\n /** Current value (bar fill level) */\n @property({type: Number}) value?: number = undefined;\n\n /** Instrument state (affects colors and some marker behavior) */\n @property({type: String}) state: InstrumentState = InstrumentState.active;\n\n // Advice\n /** Advice overlay positioning: center (in bar), inner (covers minor ticks), outer (no overlap) */\n @property({type: String}) advicePosition: AdvicePosition =\n AdvicePosition.inner;\n /**\n * Advice/alert overlays with state and positioning.\n * When undefined or empty, no advice shown.\n */\n @property({attribute: false}) advices?: Array<{\n min: number;\n max: number;\n type: AdviceType;\n hinted: boolean;\n }> = [];\n\n /**\n * When true, displays a dot indicator at the current value position.\n * The dot is rendered in the scale band, touching its inner edge (towards the chart).\n * This provides an alternative to bar fill for highlighting the current value.\n * @default false\n */\n @property({type: Boolean}) highlightCurrentValue = false;\n\n override render() {\n // When fixedAspectRatio is true, use scaleReferenceSize for the viewBox length.\n // This makes the SVG render at the \"design reference size\" and then scale\n // proportionally to fit the actual container via preserveAspectRatio=\"xMidYMid meet\".\n // The _scale CSS variable counter-scales text labels to maintain constant visual size.\n const effectiveLength = this.fixedAspectRatio\n ? this.scaleReferenceSize\n : this.width;\n\n // The parent chart component (chart-line-base) calculates and passes the correct\n // viewBox padding values when fixedAspectRatioScaling is enabled. The padding is\n // pre-scaled to: basePadding * scaleReferenceSize / referenceWidth\n // This ensures the visual padding matches the chart's Canvas padding at any aspect ratio.\n\n // console.debug(`[bar-horizontal] render:`, {\n // fixedAspectRatio: this.fixedAspectRatio,\n // width: this.width,\n // scaleReferenceSize: this.scaleReferenceSize,\n // effectiveLength,\n // scale: this._scale,\n // paddingLeft: this.paddingLeft,\n // paddingRight: this.paddingRight,\n // });\n\n const config: ExternalScaleConfig = {\n orientation: ExternalScaleOrientation.horizontal,\n side: this.side,\n length: effectiveLength,\n paddingStart: this.paddingLeft,\n paddingEnd: this.paddingRight,\n minValue: this.minValue,\n maxValue: this.maxValue,\n hasScale: this.hasScale,\n labels: this.showLabels,\n hasBar: this.hasBar,\n scaleBackground: this.scaleBackground,\n barContainerStyle: this.barContainerStyle,\n barThickness: this.barThickness,\n tickThickness: this.tickThickness,\n labelThickness: this.labelThickness,\n borderRadius: this._getEffectiveBorderRadius(),\n mainTickmarks: this.mainTickmarks,\n primaryTickmarkInterval: this.primaryTickmarkInterval,\n secondaryTickmarkInterval: this.secondaryTickmarkInterval,\n tertiaryTickmarkInterval: this.tertiaryTickmarkInterval,\n scaleType: this.scaleType,\n frameStyle: this.frameStyle,\n borderRadiusPosition: this.borderRadiusPosition,\n priority: this.priority,\n setpointOverride: this.setpointOverride,\n fillMode: this.fillMode,\n fillMin: this.fillMin,\n fillMax: this.fillMax,\n value: this.value,\n setpoint: this.setpoint,\n newSetpoint: this.newSetpoint,\n atSetpoint: this.atSetpoint,\n autoAtSetpoint: this.autoAtSetpoint,\n autoAtSetpointDeadband: this.autoAtSetpointDeadband,\n setpointAtZeroDeadband: this.setpointAtZeroDeadband,\n animateSetpoint: this.animateSetpoint,\n departingNewSetpoint: this.departingNewSetpoint,\n state: this.state,\n touching: this.touching,\n advicePosition: this.advicePosition,\n advices: this.advices as ExternalScaleAdvice[],\n fixedAspectRatio: this.fixedAspectRatio,\n instrumentMode: this.instrumentMode,\n highlightCurrentValue: this.highlightCurrentValue,\n };\n\n const layout = computeExternalScaleLayout(\n toExternalScaleLayoutConfig(config)\n );\n\n const parts = renderExternalScale(config);\n\n const viewBox = computeExternalScaleViewBox(\n {orientation: config.orientation, length: effectiveLength},\n layout\n );\n const preserveAspectRatio = this.fixedAspectRatio\n ? 'xMidYMid meet'\n : 'none';\n\n return html`\n <svg\n width=${this.fixedAspectRatio ? '100%' : `${this.width}px`}\n height=${this.fixedAspectRatio ? '100%' : `${viewBox.height}px`}\n viewBox=\"${viewBox.x} ${viewBox.y} ${viewBox.width} ${viewBox.height}\"\n preserveAspectRatio=\"${preserveAspectRatio}\"\n style=\"--scale: ${this.fixedAspectRatio ? this._scale : 1};\"\n part=\"svg\"\n >\n ${parts.barContainer} ${parts.barFill} ${parts.scaleBackground}\n ${parts.tickmarks} ${parts.labels} ${parts.adviceOverlays}\n ${parts.currentValueDot} ${parts.setpoint}\n </svg>\n `;\n }\n\n override updated(changed: PropertyValues) {\n super.updated(changed);\n\n if (changed.has('scaleType')) {\n this._refreshBorderRadiusFromCssVar();\n }\n\n // Update host styles when fixedAspectRatio changes\n if (changed.has('fixedAspectRatio')) {\n if (this.fixedAspectRatio) {\n this._applyFixedAspectRatioStyles();\n // Force initial scale calculation based on current size\n this._updateScaleFromCurrentSize();\n } else {\n this._removeFixedAspectRatioStyles();\n this._scale = 1;\n }\n }\n\n // Also recalculate scale when scaleReferenceSize changes\n if (changed.has('scaleReferenceSize') && this.fixedAspectRatio) {\n this._updateScaleFromCurrentSize();\n }\n\n // Report dimensions to parent chart when layout-affecting properties change.\n // In fixedAspectRatio mode, resize events also trigger reportDimensions() via ResizeController.\n // In regular mode, we report on every update to keep parent chart in sync.\n // Layout-affecting properties change the computed thickness and must notify the parent\n // even in fixedAspectRatio mode to keep chart padding accurate.\n const layoutChanged =\n changed.has('side') ||\n changed.has('showLabels') ||\n changed.has('hasScale') ||\n changed.has('hasBar') ||\n changed.has('barThickness') ||\n changed.has('tickThickness') ||\n changed.has('labelThickness') ||\n changed.has('scaleType') ||\n changed.has('borderRadiusPosition') ||\n changed.has('borderRadius');\n\n if (!this.fixedAspectRatio || layoutChanged) {\n this.reportDimensions();\n }\n }\n\n /**\n * Report scale dimensions to parent chart component.\n * When fixedAspectRatio=true, reports the actual visual (scaled) thickness\n * so the chart can correctly reserve space for the scale.\n * When fixedAspectRatio=false, reports the base/unscaled thickness.\n */\n private reportDimensions() {\n const effectiveBarThickness = computeExternalScaleEffectiveBarThickness({\n hasBar: this.hasBar,\n barThickness: this.barThickness,\n borderRadius: this._getEffectiveBorderRadius(),\n scaleType: this.scaleType,\n });\n\n // Use scaleReferenceSize for layout calculation when in fixedAspectRatio mode\n // This ensures consistent layout dimensions based on the design reference size\n const effectiveLength = this.fixedAspectRatio\n ? this.scaleReferenceSize\n : this.width;\n\n const baseDimensions = computeScaleDimensionsForReport({\n orientation: ExternalScaleOrientation.horizontal,\n side: this.side,\n hasBar: this.hasBar,\n hasScale: this.hasScale,\n labels: this.showLabels,\n barThickness: effectiveBarThickness,\n tickThickness: this.tickThickness,\n labelThickness: this.labelThickness,\n length: effectiveLength,\n scaleType: this.scaleType,\n });\n\n // When fixedAspectRatio=true, the SVG scales proportionally via preserveAspectRatio=\"meet\".\n // The visual thickness = baseThickness × scale, where scale = containerSize / scaleReferenceSize.\n // Report the actual visual thickness so the chart can reserve the correct space.\n const dimensions = this.fixedAspectRatio\n ? {\n ...baseDimensions,\n thickness: Math.round(baseDimensions.thickness * this._scale),\n }\n : baseDimensions;\n\n // console.debug(`[bar-horizontal] reportDimensions:`, {\n // fixedAspectRatio: this.fixedAspectRatio,\n // side: dimensions.side,\n // thickness: dimensions.thickness,\n // scale: this._scale,\n // width: this.width,\n // scaleReferenceSize: this.scaleReferenceSize,\n // effectiveLength,\n // hasBar: this.hasBar,\n // hasScale: this.hasScale,\n // showLabels: this.showLabels,\n // barThickness: this.barThickness,\n // tickThickness: this.tickThickness,\n // labelThickness: this.labelThickness,\n // });\n\n this.dispatchEvent(\n new CustomEvent('scale-dimensions-changed', {\n detail: dimensions,\n bubbles: true,\n composed: true,\n })\n );\n }\n\n protected override createRenderRoot() {\n return this;\n }\n\n override connectedCallback(): void {\n super.connectedCallback();\n // Only read from CSS variable and observe changes when not in instrument mode\n if (!this.instrumentMode) {\n this._refreshBorderRadiusFromCssVar();\n this._startBorderRadiusObserver();\n }\n\n // Ensure the element fills its container when in fixedAspectRatio mode\n // Custom elements are display:inline by default, which doesn't work for percentage-based sizing\n if (this.fixedAspectRatio) {\n this._applyFixedAspectRatioStyles();\n }\n }\n\n override disconnectedCallback(): void {\n this._borderRadiusObserver?.disconnect();\n this._borderRadiusObserver = undefined;\n super.disconnectedCallback();\n }\n\n private _startBorderRadiusObserver(): void {\n this._borderRadiusObserver?.disconnect();\n\n this._borderRadiusObserver = startExternalScaleBorderRadiusObserver(\n this,\n () => this._refreshBorderRadiusFromCssVar()\n );\n }\n\n /**\n * Apply CSS styles needed for fixedAspectRatio mode.\n * Custom elements are display:inline by default, which doesn't work with percentage-based sizing.\n * We need display:block and width:100% to fill the slot container.\n */\n private _applyFixedAspectRatioStyles(): void {\n this.style.display = 'block';\n this.style.width = '100%';\n this.style.height = 'auto';\n }\n\n /**\n * Remove fixed aspect ratio styles when switching back to pixel mode.\n */\n private _removeFixedAspectRatioStyles(): void {\n this.style.display = '';\n this.style.width = '';\n this.style.height = '';\n }\n\n /**\n * Calculate scale based on current element size.\n * Called when fixedAspectRatio is enabled or scaleReferenceSize changes.\n */\n private _updateScaleFromCurrentSize(): void {\n // Use requestAnimationFrame to ensure layout is complete\n requestAnimationFrame(() => {\n const containerWidth = this.clientWidth;\n if (containerWidth > 0) {\n this._scale = computeFixedAspectRatioScale({\n orientation: ExternalScaleOrientation.horizontal,\n containerMainAxisSize: containerWidth,\n scaleReferenceSize: this.scaleReferenceSize,\n });\n this.requestUpdate();\n // Report updated dimensions to parent (matches pattern in ResizeController and _refreshBorderRadiusFromCssVar)\n this.reportDimensions();\n }\n });\n }\n\n private _refreshBorderRadiusFromCssVar(): void {\n // Skip CSS variable reading in instrument mode\n if (this.instrumentMode) return;\n\n const next = readExternalScaleBorderRadiusPx(this, this.scaleType);\n\n if (this._computedBorderRadius !== next) {\n this._computedBorderRadius = next;\n }\n\n // In fixed-aspect-ratio mode, recompute scale when border radius changes\n // (border radius affects effective bar thickness and therefore viewBox)\n if (this.fixedAspectRatio) {\n const rect = this.getBoundingClientRect();\n if (rect.width > 0) {\n this._scale = computeFixedAspectRatioScale({\n orientation: ExternalScaleOrientation.horizontal,\n containerMainAxisSize: rect.width,\n scaleReferenceSize: this.scaleReferenceSize,\n });\n // Report updated dimensions\n this.reportDimensions();\n }\n }\n }\n\n /**\n * Get the effective border radius to use.\n * In instrument mode: use explicit borderRadius prop or default based on scaleType.\n * In normal mode: use CSS variable computed value.\n */\n private _getEffectiveBorderRadius(): number {\n if (this.instrumentMode) {\n // In instrument mode, use explicit value or default\n if (this.borderRadius !== undefined) {\n return this.borderRadius;\n }\n // Default: 8px for regular, 4px for condensed\n return this.scaleType === ScaleType.condensed ? 4 : 8;\n }\n // Normal mode: use CSS variable computed value\n return (\n this._computedBorderRadius ??\n (this.scaleType === ScaleType.condensed ? 4 : 8)\n );\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-bar-horizontal': ObcBarHorizontal;\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAmEO,IAAM,mBAAN,cAA+B,cAAc,YAAY;AAAA,EAC9D,iBAAiB;AACnB,CAAC,EAAE;AAAA,EAFI,cAAA;AAAA,UAAA,GAAA,SAAA;AAIqB,SAAA,WAAW;AAEX,SAAA,WAAW;AAGX,SAAA,QAAQ;AAGR,SAAA,cACxB,iBAAiB;AAGO,SAAA,eACxB,iBAAiB;AAGO,SAAA,OAA0B,kBAAkB;AAQtE,SAAA,mBAAmB;AASnB,SAAA,qBAAqB;AAGrB,SAAQ,SAAS;AAIjB,SAAQ,oBAAoB,IAAI,iBAAiB,MAAM;AAAA,MACrD,UAAU,CA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padding bands) */
|
|
28
28
|
height: number;
|
|
29
29
|
/** Padding above the drawing area */
|
|
30
|
-
paddingTop:
|
|
30
|
+
paddingTop: number;
|
|
31
31
|
/** Padding below the drawing area */
|
|
32
|
-
paddingBottom:
|
|
32
|
+
paddingBottom: number;
|
|
33
33
|
/** Which side this scale lives on */
|
|
34
34
|
side: ExternalScaleSide;
|
|
35
35
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bar-vertical.d.ts","sourceRoot":"","sources":["../../../src/building-blocks/bar-vertical/bar-vertical.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAO,MAAM,KAAK,CAAC;AAErC,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,KAAK,CAAC;AAIxC,OAAO,EACL,eAAe,EACf,UAAU,EACV,oBAAoB,EACpB,QAAQ,EACT,MAAM,uCAAuC,CAAC;AAC/C,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,8CAA8C,CAAC;AAK7E,OAAO,EAUL,SAAS,EACT,QAAQ,EACR,cAAc,EACd,iBAAiB,EAEjB,iBAAiB,EAClB,MAAM,qCAAqC,CAAC;AAI7C,OAAO,EACL,SAAS,EACT,QAAQ,EACR,cAAc,EACd,UAAU,EACV,oBAAoB,EACpB,eAAe,EACf,QAAQ,EACR,iBAAiB,EACjB,iBAAiB,GAClB,CAAC;;AAEF;;;;;;;;;;;;;;GAcG;AACH,qBACa,cAAe,SAAQ,mBAElC;IACA,wCAAwC;IACd,QAAQ,SAAK;IACvC,wCAAwC;IACd,QAAQ,SAAO;IAEzC,uDAAuD;IAC7B,MAAM,SAAO;IAEvC,qCAAqC;IACX,UAAU,
|
|
1
|
+
{"version":3,"file":"bar-vertical.d.ts","sourceRoot":"","sources":["../../../src/building-blocks/bar-vertical/bar-vertical.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAO,MAAM,KAAK,CAAC;AAErC,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,KA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BAA4B;IAMpC;;OAEG;IACH,OAAO,CAAC,6BAA6B;IAMrC;;;OAGG;IACH,OAAO,CAAC,2BAA2B;IAiBnC,OAAO,CAAC,8BAA8B;IA0BtC;;;;OAIG;IACH,OAAO,CAAC,yBAAyB;CAelC;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,kBAAkB,EAAE,cAAc,CAAC;KACpC;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bar-vertical.js","sources":["../../../src/building-blocks/bar-vertical/bar-vertical.ts"],"sourcesContent":["import {LitElement, html} from 'lit';\nimport {property, state} from 'lit/decorators.js';\nimport type {PropertyValues} from 'lit';\nimport {customElement} from '../../decorator.js';\nimport {ResizeController} from '@lit-labs/observers/resize-controller.js';\nimport {CHART_DIMENSIONS} from '../../charthelpers/constants.js';\nimport {\n InstrumentState,\n FrameStyle,\n BorderRadiusPosition,\n Priority,\n} from '../../navigation-instruments/types.js';\nimport type {AdviceType} from '../../navigation-instruments/watch/advice.js';\nimport type {\n ExternalScaleAdvice,\n ExternalScaleConfig,\n} from '../external-scale/external-scale.js';\nimport {\n computeExternalScaleViewBox,\n computeFixedAspectRatioScale,\n computeExternalScaleLayout,\n renderExternalScale,\n toExternalScaleLayoutConfig,\n computeScaleDimensionsForReport,\n computeExternalScaleEffectiveBarThickness,\n readExternalScaleBorderRadiusPx,\n startExternalScaleBorderRadiusObserver,\n ScaleType,\n FillMode,\n AdvicePosition,\n BarContainerStyle,\n ExternalScaleOrientation,\n ExternalScaleSide,\n} from '../external-scale/external-scale.js';\nimport {SetpointMixin} from '../../svghelpers/setpoint-mixin.js';\n\n// Re-export shared enums for convenience\nexport {\n ScaleType,\n FillMode,\n AdvicePosition,\n FrameStyle,\n BorderRadiusPosition,\n InstrumentState,\n Priority,\n BarContainerStyle,\n ExternalScaleSide,\n};\n\n/**\n * Vertical SVG bar + external scale.\n *\n * This is a thin web-component wrapper around the pure SVG building-block renderer in `external-scale.ts`.\n *\n * It sets up the outer `<svg>`/`viewBox` for a vertical scale and delegates rendering/layout to:\n * - `computeExternalScaleLayout(...)`\n * - `renderExternalScale(config)`\n *\n * For renderer documentation see: **Building Blocks/External Scale**.\n *\n * Set `priority` to `Priority.enhanced` to use the blue/enhanced color palette\n * for bar fill and setpoint instead of the default gray/regular palette\n * (default: `Priority.regular`).\n */\n@customElement('obc-bar-vertical')\nexport class ObcBarVertical extends SetpointMixin(LitElement, {\n defaultDeadband: 1,\n}) {\n /** Minimum scale value (manual mode) */\n @property({type: Number}) minValue = 0;\n /** Maximum scale value (manual mode) */\n @property({type: Number}) maxValue = 100;\n\n /** Total height in pixels (including padding bands) */\n @property({type: Number}) height = 320;\n\n /** Padding above the drawing area */\n @property({type: Number}) paddingTop = CHART_DIMENSIONS.CANVAS_PADDING;\n\n /** Padding below the drawing area */\n @property({type: Number}) paddingBottom = CHART_DIMENSIONS.CANVAS_PADDING;\n\n /** Which side this scale lives on */\n @property({type: String}) side: ExternalScaleSide = ExternalScaleSide.right;\n\n /**\n * When true, freezes all internal calculations and scales the entire component\n * proportionally (like CSS transform:scale), except label font-size remains constant.\n * When false (default), dimensions react to component properties.\n */\n @property({type: Boolean})\n fixedAspectRatio = false;\n\n /**\n * Reference size for proportional scaling when fixedAspectRatio is true.\n * At this height, the scale renders at native 1:1 (matches Figma design).\n * Above this height, the scale grows proportionally; below, it shrinks.\n * @default 384\n */\n @property({type: Number})\n scaleReferenceSize = 384;\n\n @state()\n private _scale = 1;\n\n // ResizeController automatically subscribes/unsubscribes based on component lifecycle\n // @ts-expect-error - Controller is used for side effects, not accessed directly\n private _resizeController = new ResizeController(this, {\n callback: (entries) => {\n if (!this.fixedAspectRatio) return;\n\n const entry = entries[0];\n if (!entry) return;\n\n // Use the centralized function that computes scale based on reference size\n // For vertical scales, compare container height to reference size\n const containerMainAxisSize = entry.contentRect.height;\n\n this._scale = computeFixedAspectRatioScale({\n orientation: ExternalScaleOrientation.vertical,\n containerMainAxisSize,\n scaleReferenceSize: this.scaleReferenceSize,\n });\n\n // console.debug(`[bar-vertical] ResizeController:`, {\n // fixedAspectRatio: this.fixedAspectRatio,\n // containerHeight: containerMainAxisSize,\n // scaleReferenceSize: this.scaleReferenceSize,\n // computedScale: this._scale,\n // height: this.height,\n // });\n\n // Report scaled dimensions to parent chart\n this.reportDimensions();\n },\n });\n\n // Bands (thickness)\n /** Show scale tickmarks */\n @property({type: Boolean, attribute: false}) hasScale = true;\n @property({type: Boolean, attribute: false}) showLabels = true;\n /** Show bar */\n @property({type: Boolean}) hasBar = false;\n /** Show background behind the scale tickmarks. */\n @property({type: Boolean})\n scaleBackground = false;\n /**\n * Bar container background style.\n * When undefined, defaults based on scaleBackground.\n * Set explicitly to override: 'primary' (lighter) or 'secondary' (gray).\n */\n @property({type: String})\n barContainerStyle?: BarContainerStyle = undefined;\n /** Bar/fill thickness in pixels */\n @property({type: Number}) barThickness = 24;\n /** Tickmark band thickness in pixels. */\n @property({type: Number}) tickThickness = 24;\n /** Label band thickness in pixels. */\n @property({type: Number}) labelThickness = 60;\n\n // Tick configuration\n /**\n * Array of values for main tickmarks. When undefined, no main tickmarks shown.\n * When empty array [], defaults to [minValue, 0, maxValue].\n */\n @property({attribute: false}) mainTickmarks?: number[] = [];\n /**\n * Interval for primary (longest) tickmarks with labels (minimum 1).\n * When undefined, no primary tickmarks are shown.\n */\n @property({type: Number}) primaryTickmarkInterval?: number = undefined;\n /**\n * Interval for secondary (medium) tickmarks (minimum 1).\n * When undefined, no secondary tickmarks are shown.\n */\n @property({type: Number}) secondaryTickmarkInterval?: number = undefined;\n /**\n * Interval for tertiary (shortest) tickmarks (minimum 1).\n * When undefined, no tertiary tickmarks are shown.\n */\n @property({type: Number}) tertiaryTickmarkInterval?: number = undefined;\n /** Scale display mode: regular or condensed (shorter ticks) */\n @property({type: String}) scaleType: ScaleType = ScaleType.regular;\n /** Frame style: regular (4px gap for all), flat (main tickmarks touch edge), framed, or instrument */\n @property({type: String}) frameStyle: FrameStyle = FrameStyle.regular;\n /** Border radius position based on component layout */\n @property({type: String})\n borderRadiusPosition?: BorderRadiusPosition = undefined;\n\n /**\n * When true, the component is used inside an instrument (e.g., gauge-trend).\n * In this mode, only label font size responds to .obc-component-size-* CSS classes.\n * Border radius and bar thickness use explicit values or defaults, not CSS variables.\n * @default false\n */\n @property({type: Boolean})\n instrumentMode = false;\n\n /**\n * Explicit border radius value in pixels.\n * When instrumentMode=true, this value is used directly (defaults to 8px for regular, 4px for condensed).\n * When instrumentMode=false, this is ignored and border radius is read from CSS variable.\n */\n @property({type: Number})\n borderRadius?: number = undefined;\n\n @state()\n private _computedBorderRadius?: number;\n\n private _borderRadiusObserver?: MutationObserver;\n\n // @ts-expect-error - Controller is used for side effects, not accessed directly\n private _borderRadiusResizeController = new ResizeController(this, {\n callback: () => {\n // Skip CSS variable reading in instrument mode\n if (!this.instrumentMode) {\n this._refreshBorderRadiusFromCssVar();\n }\n },\n });\n\n // Values\n /** Color priority: enhanced uses blue instrument colors for bar fill and setpoint */\n @property({type: String}) priority: Priority = Priority.regular;\n /** Fill visualization mode: fill or tint */\n @property({type: String}) fillMode: FillMode = FillMode.fill;\n /** Minimum fill value for tint mode (defaults to 0) */\n @property({type: Number}) fillMin?: number = undefined;\n /** Maximum fill value for tint mode (defaults to value) */\n @property({type: Number}) fillMax?: number = undefined;\n /** Current value (bar fill level) */\n @property({type: Number}) value?: number = undefined;\n\n /** Instrument state (affects colors and some marker behavior) */\n @property({type: String}) state: InstrumentState = InstrumentState.active;\n\n // Advice\n /** Advice overlay positioning: center (in bar), inner (covers minor ticks), outer (no overlap) */\n @property({type: String}) advicePosition: AdvicePosition =\n AdvicePosition.inner;\n /**\n * Advice/alert overlays with state and positioning.\n * When undefined or empty, no advice shown.\n */\n @property({attribute: false}) advices?: Array<{\n min: number;\n max: number;\n type: AdviceType;\n hinted: boolean;\n }> = [];\n\n /**\n * When true, displays a dot indicator at the current value position.\n * The dot is rendered in the scale band, touching its inner edge (towards the chart).\n * This provides an alternative to bar fill for highlighting the current value.\n * @default false\n */\n @property({type: Boolean}) highlightCurrentValue = false;\n\n override render() {\n // When fixedAspectRatio is true, use scaleReferenceSize for the viewBox length.\n // This makes the SVG render at the \"design reference size\" and then scale\n // proportionally to fit the actual container via preserveAspectRatio=\"xMidYMid meet\".\n // The _scale CSS variable counter-scales text labels to maintain constant visual size.\n const effectiveLength = this.fixedAspectRatio\n ? this.scaleReferenceSize\n : this.height;\n\n // The parent chart component (chart-line-base) calculates and passes the correct\n // viewBox padding values when fixedAspectRatioScaling is enabled. The padding is\n // pre-scaled to: basePadding * scaleReferenceSize / referenceHeight\n // This ensures the visual padding matches the chart's Canvas padding at any aspect ratio.\n\n // console.debug(`[bar-vertical] render:`, {\n // fixedAspectRatio: this.fixedAspectRatio,\n // height: this.height,\n // scaleReferenceSize: this.scaleReferenceSize,\n // effectiveLength,\n // scale: this._scale,\n // paddingTop: this.paddingTop,\n // paddingBottom: this.paddingBottom,\n // });\n\n const config: ExternalScaleConfig = {\n orientation: ExternalScaleOrientation.vertical,\n side: this.side,\n length: effectiveLength,\n paddingStart: this.paddingTop,\n paddingEnd: this.paddingBottom,\n minValue: this.minValue,\n maxValue: this.maxValue,\n hasScale: this.hasScale,\n labels: this.showLabels,\n hasBar: this.hasBar,\n scaleBackground: this.scaleBackground,\n barContainerStyle: this.barContainerStyle,\n barThickness: this.barThickness,\n tickThickness: this.tickThickness,\n labelThickness: this.labelThickness,\n borderRadius: this._getEffectiveBorderRadius(),\n mainTickmarks: this.mainTickmarks,\n primaryTickmarkInterval: this.primaryTickmarkInterval,\n secondaryTickmarkInterval: this.secondaryTickmarkInterval,\n tertiaryTickmarkInterval: this.tertiaryTickmarkInterval,\n scaleType: this.scaleType,\n frameStyle: this.frameStyle,\n borderRadiusPosition: this.borderRadiusPosition,\n priority: this.priority,\n setpointOverride: this.setpointOverride,\n fillMode: this.fillMode,\n fillMin: this.fillMin,\n fillMax: this.fillMax,\n value: this.value,\n setpoint: this.setpoint,\n newSetpoint: this.newSetpoint,\n atSetpoint: this.atSetpoint,\n autoAtSetpoint: this.autoAtSetpoint,\n autoAtSetpointDeadband: this.autoAtSetpointDeadband,\n setpointAtZeroDeadband: this.setpointAtZeroDeadband,\n animateSetpoint: this.animateSetpoint,\n departingNewSetpoint: this.departingNewSetpoint,\n state: this.state,\n touching: this.touching,\n advicePosition: this.advicePosition,\n advices: this.advices as ExternalScaleAdvice[],\n fixedAspectRatio: this.fixedAspectRatio,\n instrumentMode: this.instrumentMode,\n highlightCurrentValue: this.highlightCurrentValue,\n };\n\n const layout = computeExternalScaleLayout(\n toExternalScaleLayoutConfig(config)\n );\n\n const parts = renderExternalScale(config);\n\n const viewBox = computeExternalScaleViewBox(\n {orientation: config.orientation, length: effectiveLength},\n layout\n );\n const preserveAspectRatio = this.fixedAspectRatio\n ? 'xMidYMid meet'\n : 'none';\n\n return html`\n <svg\n width=${this.fixedAspectRatio ? '100%' : `${viewBox.width}px`}\n height=${this.fixedAspectRatio ? '100%' : `${this.height}px`}\n viewBox=\"${viewBox.x} ${viewBox.y} ${viewBox.width} ${viewBox.height}\"\n preserveAspectRatio=\"${preserveAspectRatio}\"\n style=\"--scale: ${this.fixedAspectRatio ? this._scale : 1};\"\n part=\"svg\"\n >\n ${parts.barContainer} ${parts.barFill} ${parts.scaleBackground}\n ${parts.tickmarks} ${parts.labels} ${parts.adviceOverlays}\n ${parts.currentValueDot} ${parts.setpoint}\n </svg>\n `;\n }\n\n override updated(changed: PropertyValues) {\n super.updated(changed);\n\n if (changed.has('scaleType')) {\n this._refreshBorderRadiusFromCssVar();\n }\n\n // Update host styles when fixedAspectRatio changes\n if (changed.has('fixedAspectRatio')) {\n if (this.fixedAspectRatio) {\n this._applyFixedAspectRatioStyles();\n // Force initial scale calculation based on current size\n this._updateScaleFromCurrentSize();\n } else {\n this._removeFixedAspectRatioStyles();\n this._scale = 1;\n }\n }\n\n // Also recalculate scale when scaleReferenceSize changes\n if (changed.has('scaleReferenceSize') && this.fixedAspectRatio) {\n this._updateScaleFromCurrentSize();\n }\n\n // Report dimensions to parent chart when layout-affecting properties change.\n // In fixedAspectRatio mode, resize events also trigger reportDimensions() via ResizeController.\n // In regular mode, we report on every update to keep parent chart in sync.\n // Layout-affecting properties change the computed thickness and must notify the parent\n // even in fixedAspectRatio mode to keep chart padding accurate.\n const layoutChanged =\n changed.has('side') ||\n changed.has('showLabels') ||\n changed.has('hasScale') ||\n changed.has('hasBar') ||\n changed.has('barThickness') ||\n changed.has('tickThickness') ||\n changed.has('labelThickness') ||\n changed.has('scaleType') ||\n changed.has('borderRadiusPosition') ||\n changed.has('borderRadius');\n\n if (!this.fixedAspectRatio || layoutChanged) {\n this.reportDimensions();\n }\n }\n\n /**\n * Report scale dimensions to parent chart component.\n * When fixedAspectRatio=true, reports the actual visual (scaled) thickness\n * so the chart can correctly reserve space for the scale.\n * When fixedAspectRatio=false, reports the base/unscaled thickness.\n */\n private reportDimensions() {\n const effectiveBarThickness = computeExternalScaleEffectiveBarThickness({\n hasBar: this.hasBar,\n barThickness: this.barThickness,\n borderRadius: this._getEffectiveBorderRadius(),\n scaleType: this.scaleType,\n });\n\n // Use scaleReferenceSize for layout calculation when in fixedAspectRatio mode\n // This ensures consistent layout dimensions based on the design reference size\n const effectiveLength = this.fixedAspectRatio\n ? this.scaleReferenceSize\n : this.height;\n\n const baseDimensions = computeScaleDimensionsForReport({\n orientation: ExternalScaleOrientation.vertical,\n side: this.side,\n hasBar: this.hasBar,\n hasScale: this.hasScale,\n labels: this.showLabels,\n barThickness: effectiveBarThickness,\n tickThickness: this.tickThickness,\n labelThickness: this.labelThickness,\n length: effectiveLength,\n scaleType: this.scaleType,\n });\n\n // When fixedAspectRatio=true, the SVG scales proportionally via preserveAspectRatio=\"meet\".\n // The visual thickness = baseThickness × scale, where scale = containerSize / scaleReferenceSize.\n // Report the actual visual thickness so the chart can reserve the correct space.\n const dimensions = this.fixedAspectRatio\n ? {\n ...baseDimensions,\n thickness: Math.round(baseDimensions.thickness * this._scale),\n }\n : baseDimensions;\n\n // console.debug(`[bar-vertical] reportDimensions:`, {\n // fixedAspectRatio: this.fixedAspectRatio,\n // side: dimensions.side,\n // thickness: dimensions.thickness,\n // scale: this._scale,\n // height: this.height,\n // scaleReferenceSize: this.scaleReferenceSize,\n // effectiveLength,\n // hasBar: this.hasBar,\n // hasScale: this.hasScale,\n // showLabels: this.showLabels,\n // barThickness: this.barThickness,\n // tickThickness: this.tickThickness,\n // labelThickness: this.labelThickness,\n // });\n\n this.dispatchEvent(\n new CustomEvent('scale-dimensions-changed', {\n detail: dimensions,\n bubbles: true,\n composed: true,\n })\n );\n }\n\n protected override createRenderRoot() {\n return this;\n }\n\n override connectedCallback(): void {\n super.connectedCallback();\n // Only read from CSS variable and observe changes when not in instrument mode\n if (!this.instrumentMode) {\n this._refreshBorderRadiusFromCssVar();\n this._startBorderRadiusObserver();\n }\n\n // Ensure the element fills its container when in fixedAspectRatio mode\n // Custom elements are display:inline by default, which doesn't work for percentage-based sizing\n if (this.fixedAspectRatio) {\n this._applyFixedAspectRatioStyles();\n }\n }\n\n override disconnectedCallback(): void {\n this._borderRadiusObserver?.disconnect();\n this._borderRadiusObserver = undefined;\n super.disconnectedCallback();\n }\n\n private _startBorderRadiusObserver(): void {\n this._borderRadiusObserver?.disconnect();\n\n this._borderRadiusObserver = startExternalScaleBorderRadiusObserver(\n this,\n () => this._refreshBorderRadiusFromCssVar()\n );\n }\n\n /**\n * Apply CSS styles needed for fixedAspectRatio mode.\n * Custom elements are display:inline by default, which doesn't work with percentage-based sizing.\n * We need display:block and height:100% to fill the slot container.\n */\n private _applyFixedAspectRatioStyles(): void {\n this.style.display = 'block';\n this.style.height = '100%';\n this.style.width = 'auto';\n }\n\n /**\n * Remove fixed aspect ratio styles when switching back to pixel mode.\n */\n private _removeFixedAspectRatioStyles(): void {\n this.style.display = '';\n this.style.height = '';\n this.style.width = '';\n }\n\n /**\n * Calculate scale based on current element size.\n * Called when fixedAspectRatio is enabled or scaleReferenceSize changes.\n */\n private _updateScaleFromCurrentSize(): void {\n // Use requestAnimationFrame to ensure layout is complete\n requestAnimationFrame(() => {\n const containerHeight = this.clientHeight;\n if (containerHeight > 0) {\n this._scale = computeFixedAspectRatioScale({\n orientation: ExternalScaleOrientation.vertical,\n containerMainAxisSize: containerHeight,\n scaleReferenceSize: this.scaleReferenceSize,\n });\n this.requestUpdate();\n // Report updated dimensions to parent (matches pattern in ResizeController and _refreshBorderRadiusFromCssVar)\n this.reportDimensions();\n }\n });\n }\n\n private _refreshBorderRadiusFromCssVar(): void {\n // Skip CSS variable reading in instrument mode\n if (this.instrumentMode) return;\n\n const next = readExternalScaleBorderRadiusPx(this, this.scaleType);\n\n if (this._computedBorderRadius !== next) {\n this._computedBorderRadius = next;\n }\n\n // In fixed-aspect-ratio mode, recompute scale when border radius changes\n // (border radius affects effective bar thickness and therefore viewBox)\n if (this.fixedAspectRatio) {\n const rect = this.getBoundingClientRect();\n if (rect.height > 0) {\n this._scale = computeFixedAspectRatioScale({\n orientation: ExternalScaleOrientation.vertical,\n containerMainAxisSize: rect.height,\n scaleReferenceSize: this.scaleReferenceSize,\n });\n // Report updated dimensions\n this.reportDimensions();\n }\n }\n }\n\n /**\n * Get the effective border radius to use.\n * In instrument mode: use explicit borderRadius prop or default based on scaleType.\n * In normal mode: use CSS variable computed value.\n */\n private _getEffectiveBorderRadius(): number {\n if (this.instrumentMode) {\n // In instrument mode, use explicit value or default\n if (this.borderRadius !== undefined) {\n return this.borderRadius;\n }\n // Default: 8px for regular, 4px for condensed\n return this.scaleType === ScaleType.condensed ? 4 : 8;\n }\n // Normal mode: use CSS variable computed value\n return (\n this._computedBorderRadius ??\n (this.scaleType === ScaleType.condensed ? 4 : 8)\n );\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-bar-vertical': ObcBarVertical;\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAiEO,IAAM,iBAAN,cAA6B,cA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W,MAAA,CAAM;AAAA,GAnLjB,eAmLmB,WAAA,WAAA,CAAA;AAaH,gBAAA;AAAA,EAA1B,SAAS,EAAC,MAAM,QAAA,CAAQ;AAAA,GAhMd,eAgMgB,WAAA,yBAAA,CAAA;AAhMhB,iBAAN,gBAAA;AAAA,EADN,cAAc,kBAAkB;AAAA,GACpB,cAAA;"}
|
|
1
|
+
{"version":3,"file":"bar-vertical.js","sources":["../../../src/building-blocks/bar-vertical/bar-vertical.ts"],"sourcesContent":["import {LitElement, html} from 'lit';\nimport {property, state} from 'lit/decorators.js';\nimport type {PropertyValues} from 'lit';\nimport {customElement} from '../../decorator.js';\nimport {ResizeController} from '@lit-labs/observers/resize-controller.js';\nimport {CHART_DIMENSIONS} from '../../charthelpers/constants.js';\nimport {\n InstrumentState,\n FrameStyle,\n BorderRadiusPosition,\n Priority,\n} from '../../navigation-instruments/types.js';\nimport type {AdviceType} from '../../navigation-instruments/watch/advice.js';\nimport type {\n ExternalScaleAdvice,\n ExternalScaleConfig,\n} from '../external-scale/external-scale.js';\nimport {\n computeExternalScaleViewBox,\n computeFixedAspectRatioScale,\n computeExternalScaleLayout,\n renderExternalScale,\n toExternalScaleLayoutConfig,\n computeScaleDimensionsForReport,\n computeExternalScaleEffectiveBarThickness,\n readExternalScaleBorderRadiusPx,\n startExternalScaleBorderRadiusObserver,\n ScaleType,\n FillMode,\n AdvicePosition,\n BarContainerStyle,\n ExternalScaleOrientation,\n ExternalScaleSide,\n} from '../external-scale/external-scale.js';\nimport {SetpointMixin} from '../../svghelpers/setpoint-mixin.js';\n\n// Re-export shared enums for convenience\nexport {\n ScaleType,\n FillMode,\n AdvicePosition,\n FrameStyle,\n BorderRadiusPosition,\n InstrumentState,\n Priority,\n BarContainerStyle,\n ExternalScaleSide,\n};\n\n/**\n * Vertical SVG bar + external scale.\n *\n * This is a thin web-component wrapper around the pure SVG building-block renderer in `external-scale.ts`.\n *\n * It sets up the outer `<svg>`/`viewBox` for a vertical scale and delegates rendering/layout to:\n * - `computeExternalScaleLayout(...)`\n * - `renderExternalScale(config)`\n *\n * For renderer documentation see: **Building Blocks/External Scale**.\n *\n * Set `priority` to `Priority.enhanced` to use the blue/enhanced color palette\n * for bar fill and setpoint instead of the default gray/regular palette\n * (default: `Priority.regular`).\n */\n@customElement('obc-bar-vertical')\nexport class ObcBarVertical extends SetpointMixin(LitElement, {\n defaultDeadband: 1,\n}) {\n /** Minimum scale value (manual mode) */\n @property({type: Number}) minValue = 0;\n /** Maximum scale value (manual mode) */\n @property({type: Number}) maxValue = 100;\n\n /** Total height in pixels (including padding bands) */\n @property({type: Number}) height = 320;\n\n /** Padding above the drawing area */\n @property({type: Number}) paddingTop: number =\n CHART_DIMENSIONS.CANVAS_PADDING;\n\n /** Padding below the drawing area */\n @property({type: Number}) paddingBottom: number =\n CHART_DIMENSIONS.CANVAS_PADDING;\n\n /** Which side this scale lives on */\n @property({type: String}) side: ExternalScaleSide = ExternalScaleSide.right;\n\n /**\n * When true, freezes all internal calculations and scales the entire component\n * proportionally (like CSS transform:scale), except label font-size remains constant.\n * When false (default), dimensions react to component properties.\n */\n @property({type: Boolean})\n fixedAspectRatio = false;\n\n /**\n * Reference size for proportional scaling when fixedAspectRatio is true.\n * At this height, the scale renders at native 1:1 (matches Figma design).\n * Above this height, the scale grows proportionally; below, it shrinks.\n * @default 384\n */\n @property({type: Number})\n scaleReferenceSize = 384;\n\n @state()\n private _scale = 1;\n\n // ResizeController automatically subscribes/unsubscribes based on component lifecycle\n // @ts-expect-error - Controller is used for side effects, not accessed directly\n private _resizeController = new ResizeController(this, {\n callback: (entries) => {\n if (!this.fixedAspectRatio) return;\n\n const entry = entries[0];\n if (!entry) return;\n\n // Use the centralized function that computes scale based on reference size\n // For vertical scales, compare container height to reference size\n const containerMainAxisSize = entry.contentRect.height;\n\n this._scale = computeFixedAspectRatioScale({\n orientation: ExternalScaleOrientation.vertical,\n containerMainAxisSize,\n scaleReferenceSize: this.scaleReferenceSize,\n });\n\n // console.debug(`[bar-vertical] ResizeController:`, {\n // fixedAspectRatio: this.fixedAspectRatio,\n // containerHeight: containerMainAxisSize,\n // scaleReferenceSize: this.scaleReferenceSize,\n // computedScale: this._scale,\n // height: this.height,\n // });\n\n // Report scaled dimensions to parent chart\n this.reportDimensions();\n },\n });\n\n // Bands (thickness)\n /** Show scale tickmarks */\n @property({type: Boolean, attribute: false}) hasScale = true;\n @property({type: Boolean, attribute: false}) showLabels = true;\n /** Show bar */\n @property({type: Boolean}) hasBar = false;\n /** Show background behind the scale tickmarks. */\n @property({type: Boolean})\n scaleBackground = false;\n /**\n * Bar container background style.\n * When undefined, defaults based on scaleBackground.\n * Set explicitly to override: 'primary' (lighter) or 'secondary' (gray).\n */\n @property({type: String})\n barContainerStyle?: BarContainerStyle = undefined;\n /** Bar/fill thickness in pixels */\n @property({type: Number}) barThickness = 24;\n /** Tickmark band thickness in pixels. */\n @property({type: Number}) tickThickness = 24;\n /** Label band thickness in pixels. */\n @property({type: Number}) labelThickness = 60;\n\n // Tick configuration\n /**\n * Array of values for main tickmarks. When undefined, no main tickmarks shown.\n * When empty array [], defaults to [minValue, 0, maxValue].\n */\n @property({attribute: false}) mainTickmarks?: number[] = [];\n /**\n * Interval for primary (longest) tickmarks with labels (minimum 1).\n * When undefined, no primary tickmarks are shown.\n */\n @property({type: Number}) primaryTickmarkInterval?: number = undefined;\n /**\n * Interval for secondary (medium) tickmarks (minimum 1).\n * When undefined, no secondary tickmarks are shown.\n */\n @property({type: Number}) secondaryTickmarkInterval?: number = undefined;\n /**\n * Interval for tertiary (shortest) tickmarks (minimum 1).\n * When undefined, no tertiary tickmarks are shown.\n */\n @property({type: Number}) tertiaryTickmarkInterval?: number = undefined;\n /** Scale display mode: regular or condensed (shorter ticks) */\n @property({type: String}) scaleType: ScaleType = ScaleType.regular;\n /** Frame style: regular (4px gap for all), flat (main tickmarks touch edge), framed, or instrument */\n @property({type: String}) frameStyle: FrameStyle = FrameStyle.regular;\n /** Border radius position based on component layout */\n @property({type: String})\n borderRadiusPosition?: BorderRadiusPosition = undefined;\n\n /**\n * When true, the component is used inside an instrument (e.g., gauge-trend).\n * In this mode, only label font size responds to .obc-component-size-* CSS classes.\n * Border radius and bar thickness use explicit values or defaults, not CSS variables.\n * @default false\n */\n @property({type: Boolean})\n instrumentMode = false;\n\n /**\n * Explicit border radius value in pixels.\n * When instrumentMode=true, this value is used directly (defaults to 8px for regular, 4px for condensed).\n * When instrumentMode=false, this is ignored and border radius is read from CSS variable.\n */\n @property({type: Number})\n borderRadius?: number = undefined;\n\n @state()\n private _computedBorderRadius?: number;\n\n private _borderRadiusObserver?: MutationObserver;\n\n // @ts-expect-error - Controller is used for side effects, not accessed directly\n private _borderRadiusResizeController = new ResizeController(this, {\n callback: () => {\n // Skip CSS variable reading in instrument mode\n if (!this.instrumentMode) {\n this._refreshBorderRadiusFromCssVar();\n }\n },\n });\n\n // Values\n /** Color priority: enhanced uses blue instrument colors for bar fill and setpoint */\n @property({type: String}) priority: Priority = Priority.regular;\n /** Fill visualization mode: fill or tint */\n @property({type: String}) fillMode: FillMode = FillMode.fill;\n /** Minimum fill value for tint mode (defaults to 0) */\n @property({type: Number}) fillMin?: number = undefined;\n /** Maximum fill value for tint mode (defaults to value) */\n @property({type: Number}) fillMax?: number = undefined;\n /** Current value (bar fill level) */\n @property({type: Number}) value?: number = undefined;\n\n /** Instrument state (affects colors and some marker behavior) */\n @property({type: String}) state: InstrumentState = InstrumentState.active;\n\n // Advice\n /** Advice overlay positioning: center (in bar), inner (covers minor ticks), outer (no overlap) */\n @property({type: String}) advicePosition: AdvicePosition =\n AdvicePosition.inner;\n /**\n * Advice/alert overlays with state and positioning.\n * When undefined or empty, no advice shown.\n */\n @property({attribute: false}) advices?: Array<{\n min: number;\n max: number;\n type: AdviceType;\n hinted: boolean;\n }> = [];\n\n /**\n * When true, displays a dot indicator at the current value position.\n * The dot is rendered in the scale band, touching its inner edge (towards the chart).\n * This provides an alternative to bar fill for highlighting the current value.\n * @default false\n */\n @property({type: Boolean}) highlightCurrentValue = false;\n\n override render() {\n // When fixedAspectRatio is true, use scaleReferenceSize for the viewBox length.\n // This makes the SVG render at the \"design reference size\" and then scale\n // proportionally to fit the actual container via preserveAspectRatio=\"xMidYMid meet\".\n // The _scale CSS variable counter-scales text labels to maintain constant visual size.\n const effectiveLength = this.fixedAspectRatio\n ? this.scaleReferenceSize\n : this.height;\n\n // The parent chart component (chart-line-base) calculates and passes the correct\n // viewBox padding values when fixedAspectRatioScaling is enabled. The padding is\n // pre-scaled to: basePadding * scaleReferenceSize / referenceHeight\n // This ensures the visual padding matches the chart's Canvas padding at any aspect ratio.\n\n // console.debug(`[bar-vertical] render:`, {\n // fixedAspectRatio: this.fixedAspectRatio,\n // height: this.height,\n // scaleReferenceSize: this.scaleReferenceSize,\n // effectiveLength,\n // scale: this._scale,\n // paddingTop: this.paddingTop,\n // paddingBottom: this.paddingBottom,\n // });\n\n const config: ExternalScaleConfig = {\n orientation: ExternalScaleOrientation.vertical,\n side: this.side,\n length: effectiveLength,\n paddingStart: this.paddingTop,\n paddingEnd: this.paddingBottom,\n minValue: this.minValue,\n maxValue: this.maxValue,\n hasScale: this.hasScale,\n labels: this.showLabels,\n hasBar: this.hasBar,\n scaleBackground: this.scaleBackground,\n barContainerStyle: this.barContainerStyle,\n barThickness: this.barThickness,\n tickThickness: this.tickThickness,\n labelThickness: this.labelThickness,\n borderRadius: this._getEffectiveBorderRadius(),\n mainTickmarks: this.mainTickmarks,\n primaryTickmarkInterval: this.primaryTickmarkInterval,\n secondaryTickmarkInterval: this.secondaryTickmarkInterval,\n tertiaryTickmarkInterval: this.tertiaryTickmarkInterval,\n scaleType: this.scaleType,\n frameStyle: this.frameStyle,\n borderRadiusPosition: this.borderRadiusPosition,\n priority: this.priority,\n setpointOverride: this.setpointOverride,\n fillMode: this.fillMode,\n fillMin: this.fillMin,\n fillMax: this.fillMax,\n value: this.value,\n setpoint: this.setpoint,\n newSetpoint: this.newSetpoint,\n atSetpoint: this.atSetpoint,\n autoAtSetpoint: this.autoAtSetpoint,\n autoAtSetpointDeadband: this.autoAtSetpointDeadband,\n setpointAtZeroDeadband: this.setpointAtZeroDeadband,\n animateSetpoint: this.animateSetpoint,\n departingNewSetpoint: this.departingNewSetpoint,\n state: this.state,\n touching: this.touching,\n advicePosition: this.advicePosition,\n advices: this.advices as ExternalScaleAdvice[],\n fixedAspectRatio: this.fixedAspectRatio,\n instrumentMode: this.instrumentMode,\n highlightCurrentValue: this.highlightCurrentValue,\n };\n\n const layout = computeExternalScaleLayout(\n toExternalScaleLayoutConfig(config)\n );\n\n const parts = renderExternalScale(config);\n\n const viewBox = computeExternalScaleViewBox(\n {orientation: config.orientation, length: effectiveLength},\n layout\n );\n const preserveAspectRatio = this.fixedAspectRatio\n ? 'xMidYMid meet'\n : 'none';\n\n return html`\n <svg\n width=${this.fixedAspectRatio ? '100%' : `${viewBox.width}px`}\n height=${this.fixedAspectRatio ? '100%' : `${this.height}px`}\n viewBox=\"${viewBox.x} ${viewBox.y} ${viewBox.width} ${viewBox.height}\"\n preserveAspectRatio=\"${preserveAspectRatio}\"\n style=\"--scale: ${this.fixedAspectRatio ? this._scale : 1};\"\n part=\"svg\"\n >\n ${parts.barContainer} ${parts.barFill} ${parts.scaleBackground}\n ${parts.tickmarks} ${parts.labels} ${parts.adviceOverlays}\n ${parts.currentValueDot} ${parts.setpoint}\n </svg>\n `;\n }\n\n override updated(changed: PropertyValues) {\n super.updated(changed);\n\n if (changed.has('scaleType')) {\n this._refreshBorderRadiusFromCssVar();\n }\n\n // Update host styles when fixedAspectRatio changes\n if (changed.has('fixedAspectRatio')) {\n if (this.fixedAspectRatio) {\n this._applyFixedAspectRatioStyles();\n // Force initial scale calculation based on current size\n this._updateScaleFromCurrentSize();\n } else {\n this._removeFixedAspectRatioStyles();\n this._scale = 1;\n }\n }\n\n // Also recalculate scale when scaleReferenceSize changes\n if (changed.has('scaleReferenceSize') && this.fixedAspectRatio) {\n this._updateScaleFromCurrentSize();\n }\n\n // Report dimensions to parent chart when layout-affecting properties change.\n // In fixedAspectRatio mode, resize events also trigger reportDimensions() via ResizeController.\n // In regular mode, we report on every update to keep parent chart in sync.\n // Layout-affecting properties change the computed thickness and must notify the parent\n // even in fixedAspectRatio mode to keep chart padding accurate.\n const layoutChanged =\n changed.has('side') ||\n changed.has('showLabels') ||\n changed.has('hasScale') ||\n changed.has('hasBar') ||\n changed.has('barThickness') ||\n changed.has('tickThickness') ||\n changed.has('labelThickness') ||\n changed.has('scaleType') ||\n changed.has('borderRadiusPosition') ||\n changed.has('borderRadius');\n\n if (!this.fixedAspectRatio || layoutChanged) {\n this.reportDimensions();\n }\n }\n\n /**\n * Report scale dimensions to parent chart component.\n * When fixedAspectRatio=true, reports the actual visual (scaled) thickness\n * so the chart can correctly reserve space for the scale.\n * When fixedAspectRatio=false, reports the base/unscaled thickness.\n */\n private reportDimensions() {\n const effectiveBarThickness = computeExternalScaleEffectiveBarThickness({\n hasBar: this.hasBar,\n barThickness: this.barThickness,\n borderRadius: this._getEffectiveBorderRadius(),\n scaleType: this.scaleType,\n });\n\n // Use scaleReferenceSize for layout calculation when in fixedAspectRatio mode\n // This ensures consistent layout dimensions based on the design reference size\n const effectiveLength = this.fixedAspectRatio\n ? this.scaleReferenceSize\n : this.height;\n\n const baseDimensions = computeScaleDimensionsForReport({\n orientation: ExternalScaleOrientation.vertical,\n side: this.side,\n hasBar: this.hasBar,\n hasScale: this.hasScale,\n labels: this.showLabels,\n barThickness: effectiveBarThickness,\n tickThickness: this.tickThickness,\n labelThickness: this.labelThickness,\n length: effectiveLength,\n scaleType: this.scaleType,\n });\n\n // When fixedAspectRatio=true, the SVG scales proportionally via preserveAspectRatio=\"meet\".\n // The visual thickness = baseThickness × scale, where scale = containerSize / scaleReferenceSize.\n // Report the actual visual thickness so the chart can reserve the correct space.\n const dimensions = this.fixedAspectRatio\n ? {\n ...baseDimensions,\n thickness: Math.round(baseDimensions.thickness * this._scale),\n }\n : baseDimensions;\n\n // console.debug(`[bar-vertical] reportDimensions:`, {\n // fixedAspectRatio: this.fixedAspectRatio,\n // side: dimensions.side,\n // thickness: dimensions.thickness,\n // scale: this._scale,\n // height: this.height,\n // scaleReferenceSize: this.scaleReferenceSize,\n // effectiveLength,\n // hasBar: this.hasBar,\n // hasScale: this.hasScale,\n // showLabels: this.showLabels,\n // barThickness: this.barThickness,\n // tickThickness: this.tickThickness,\n // labelThickness: this.labelThickness,\n // });\n\n this.dispatchEvent(\n new CustomEvent('scale-dimensions-changed', {\n detail: dimensions,\n bubbles: true,\n composed: true,\n })\n );\n }\n\n protected override createRenderRoot() {\n return this;\n }\n\n override connectedCallback(): void {\n super.connectedCallback();\n // Only read from CSS variable and observe changes when not in instrument mode\n if (!this.instrumentMode) {\n this._refreshBorderRadiusFromCssVar();\n this._startBorderRadiusObserver();\n }\n\n // Ensure the element fills its container when in fixedAspectRatio mode\n // Custom elements are display:inline by default, which doesn't work for percentage-based sizing\n if (this.fixedAspectRatio) {\n this._applyFixedAspectRatioStyles();\n }\n }\n\n override disconnectedCallback(): void {\n this._borderRadiusObserver?.disconnect();\n this._borderRadiusObserver = undefined;\n super.disconnectedCallback();\n }\n\n private _startBorderRadiusObserver(): void {\n this._borderRadiusObserver?.disconnect();\n\n this._borderRadiusObserver = startExternalScaleBorderRadiusObserver(\n this,\n () => this._refreshBorderRadiusFromCssVar()\n );\n }\n\n /**\n * Apply CSS styles needed for fixedAspectRatio mode.\n * Custom elements are display:inline by default, which doesn't work with percentage-based sizing.\n * We need display:block and height:100% to fill the slot container.\n */\n private _applyFixedAspectRatioStyles(): void {\n this.style.display = 'block';\n this.style.height = '100%';\n this.style.width = 'auto';\n }\n\n /**\n * Remove fixed aspect ratio styles when switching back to pixel mode.\n */\n private _removeFixedAspectRatioStyles(): void {\n this.style.display = '';\n this.style.height = '';\n this.style.width = '';\n }\n\n /**\n * Calculate scale based on current element size.\n * Called when fixedAspectRatio is enabled or scaleReferenceSize changes.\n */\n private _updateScaleFromCurrentSize(): void {\n // Use requestAnimationFrame to ensure layout is complete\n requestAnimationFrame(() => {\n const containerHeight = this.clientHeight;\n if (containerHeight > 0) {\n this._scale = computeFixedAspectRatioScale({\n orientation: ExternalScaleOrientation.vertical,\n containerMainAxisSize: containerHeight,\n scaleReferenceSize: this.scaleReferenceSize,\n });\n this.requestUpdate();\n // Report updated dimensions to parent (matches pattern in ResizeController and _refreshBorderRadiusFromCssVar)\n this.reportDimensions();\n }\n });\n }\n\n private _refreshBorderRadiusFromCssVar(): void {\n // Skip CSS variable reading in instrument mode\n if (this.instrumentMode) return;\n\n const next = readExternalScaleBorderRadiusPx(this, this.scaleType);\n\n if (this._computedBorderRadius !== next) {\n this._computedBorderRadius = next;\n }\n\n // In fixed-aspect-ratio mode, recompute scale when border radius changes\n // (border radius affects effective bar thickness and therefore viewBox)\n if (this.fixedAspectRatio) {\n const rect = this.getBoundingClientRect();\n if (rect.height > 0) {\n this._scale = computeFixedAspectRatioScale({\n orientation: ExternalScaleOrientation.vertical,\n containerMainAxisSize: rect.height,\n scaleReferenceSize: this.scaleReferenceSize,\n });\n // Report updated dimensions\n this.reportDimensions();\n }\n }\n }\n\n /**\n * Get the effective border radius to use.\n * In instrument mode: use explicit borderRadius prop or default based on scaleType.\n * In normal mode: use CSS variable computed value.\n */\n private _getEffectiveBorderRadius(): number {\n if (this.instrumentMode) {\n // In instrument mode, use explicit value or default\n if (this.borderRadius !== undefined) {\n return this.borderRadius;\n }\n // Default: 8px for regular, 4px for condensed\n return this.scaleType === ScaleType.condensed ? 4 : 8;\n }\n // Normal mode: use CSS variable computed value\n return (\n this._computedBorderRadius ??\n (this.scaleType === ScaleType.condensed ? 4 : 8)\n );\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-bar-vertical': ObcBarVertical;\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAiEO,IAAM,iBAAN,cAA6B,cAAc,YAAY;AAAA,EAC5D,iBAAiB;AACnB,CAAC,EAAE;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A,CAAA;AAaH,gBAAA;AAAA,EAA1B,SAAS,EAAC,MAAM,QAAA,CAAQ;AAAA,GAlMd,eAkMgB,WAAA,yBAAA,CAAA;AAlMhB,iBAAN,gBAAA;AAAA,EADN,cAAc,kBAAkB;AAAA,GACpB,cAAA;"}
|
|
@@ -20,6 +20,11 @@ export declare enum SystemButtonVariant {
|
|
|
20
20
|
expanded = "expanded",
|
|
21
21
|
actions = "actions"
|
|
22
22
|
}
|
|
23
|
+
export declare enum ActivePanel {
|
|
24
|
+
microphone = "microphone",
|
|
25
|
+
volume = "volume",
|
|
26
|
+
systemIcons = "system-icons"
|
|
27
|
+
}
|
|
23
28
|
/**
|
|
24
29
|
* Describes the enabled state and current value for each system indicator displayed by `<obc-system-button>`.
|
|
25
30
|
*
|
|
@@ -164,7 +169,7 @@ export declare class ObcSystemButton extends LitElement {
|
|
|
164
169
|
* Indicates which panel (if any) is currently active.
|
|
165
170
|
* One of: `'microphone'`, `'volume'`, `'system-icons'`, or `null`.
|
|
166
171
|
*/
|
|
167
|
-
activePanel:
|
|
172
|
+
activePanel: ActivePanel | null;
|
|
168
173
|
private _handleExpandedTypeClick;
|
|
169
174
|
/**
|
|
170
175
|
* Updates the system state and dispatches a change event.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"system-button.d.ts","sourceRoot":"","sources":["../../../src/components/system-button/system-button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAA2B,MAAM,KAAK,CAAC;AAIzD,OAAO,+BAA+B,CAAC;AAEvC,OAAO,+BAA+B,CAAC;AACvC,OAAO,oCAAoC,CAAC;AAC5C,OAAO,0CAA0C,CAAC;AAClD,OAAO,kCAAkC,CAAC;AAC1C,OAAO,sCAAsC,CAAC;AAC9C,OAAO,oCAAoC,CAAC;AAC5C,OAAO,oCAAoC,CAAC;AAC5C,OAAO,uCAAuC,CAAC;AAC/C,OAAO,qCAAqC,CAAC;AAC7C,OAAO,iCAAiC,CAAC;AACzC,OAAO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;IAE5C;;;OAGG;IACuB,WAAW,
|
|
1
|
+
{"version":3,"file":"system-button.d.ts","sourceRoot":"","sources":["../../../src/components/system-button/system-button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAA2B,MAAM,KAAK,CAAC;AAIzD,OAAO,+BAA+B,CAAC;AAEvC,OAAO,+BAA+B,CAAC;AACvC,OAAO,oCAAoC,CAAC;AAC5C,OAAO,0CAA0C,CAAC;AAClD,OAAO,kCAAkC,CAAC;AAC1C,OAAO,sCAAsC,CAAC;AAC9C,OAAO,oCAAoC,CAAC;AAC5C,OAAO,oCAAoC,CAAC;AAC5C,OAAO,uCAAuC,CAAC;AAC/C,OAAO,qCAAqC,CAAC;AAC7C,OAAO,iCAAiC,CAAC;AACzC,OAAO,8BAA8B,CAAC;AACtC,OAAO,+BAA+B,CAAC;AACvC,OAAO,2BAA2B,CAAC;AACnC,OAAO,qBAAqB,CAAC;AAC7B,OAAO,iCAAiC,CAAC;AAEzC,oBAAY,mBAAmB;IAC7B,SAAS,cAAc;IACvB,QAAQ,aAAa;IACrB,OAAO,YAAY;CACpB;AAED,oBAAY,WAAW;IACrB,UAAU,eAAe;IACzB,MAAM,WAAW;IACjB,WAAW,iBAAiB;CAC7B;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,WAAW;IAC1B,IAAI,CAAC,EAAE;QACL,SAAS,EAAE,OAAO,CAAC;QACnB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,QAAQ,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;KAC7B,CAAC;IACF,KAAK,CAAC,EAAE;QACN,KAAK,EAAE,OAAO,CAAC;QACf,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,UAAU,CAAC,EAAE;QACX,KAAK,EAAE,OAAO,CAAC;QACf,WAAW,EAAE,MAAM,CAAC;KACrB,CAAC;IACF,OAAO,CAAC,EAAE;QACR,KAAK,EAAE,MAAM,CAAC;Q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
|
|
34
34
|
SystemButtonVariant2["actions"] = "actions";
|
|
35
35
|
return SystemButtonVariant2;
|
|
36
36
|
})(SystemButtonVariant || {});
|
|
37
|
+
var ActivePanel = /* @__PURE__ */ ((ActivePanel2) => {
|
|
38
|
+
ActivePanel2["microphone"] = "microphone";
|
|
39
|
+
ActivePanel2["volume"] = "volume";
|
|
40
|
+
ActivePanel2["systemIcons"] = "system-icons";
|
|
41
|
+
return ActivePanel2;
|
|
42
|
+
})(ActivePanel || {});
|
|
37
43
|
let ObcSystemButton = class extends LitElement {
|
|
38
44
|
constructor() {
|
|
39
45
|
super(...arguments);
|
|
@@ -287,6 +293,7 @@ ObcSystemButton = __decorateClass([
|
|
|
287
293
|
customElement("obc-system-button")
|
|
288
294
|
], ObcSystemButton);
|
|
289
295
|
export {
|
|
296
|
+
ActivePanel,
|
|
290
297
|
ObcSystemButton,
|
|
291
298
|
SystemButtonVariant
|
|
292
299
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"system-button.js","sources":["../../../src/components/system-button/system-button.ts"],"sourcesContent":["import {LitElement, html, nothing, unsafeCSS} from 'lit';\nimport {customElement} from '../../decorator.js';\nimport compentStyle from './system-button.css?inline';\nimport {property} from 'lit/decorators.js';\nimport '../icon-button/icon-button.js';\nimport {IconButtonVariant} from '../icon-button/icon-button.js';\nimport '../../icons/icon-configure.js';\nimport '../../icons/icon-com-microphone.js';\nimport '../../icons/icon-com-mic-muted-google.js';\nimport '../../icons/icon-wifi2-google.js';\nimport '../../icons/icon-wifi2-off-google.js';\nimport '../../icons/icon-sensor-gps-bad.js';\nimport '../../icons/icon-sensor-gps-low.js';\nimport '../../icons/icon-sensor-gps-medium.js';\nimport '../../icons/icon-sensor-gps-full.js';\nimport '../../icons/icon-sound-muted.js';\nimport '../../icons/icon-sound-no.js';\nimport '../../icons/icon-sound-low.js';\nimport '../../icons/icon-sound.js';\nimport '../button/button.js';\nimport '../battery-icon/battery-icon.js';\n\nexport enum SystemButtonVariant {\n condensed = 'condensed',\n expanded = 'expanded',\n actions = 'actions',\n}\n\n/**\n * Describes the enabled state and current value for each system indicator displayed by `<obc-system-button>`.\n *\n * - `wifi`: WiFi status (enabled, connected, strength, network name)\n * - `audio`: Audio status (enabled, muted, volume)\n * - `microphone`: Microphone status (enabled, muted, sensitivity)\n * - `battery`: Battery status (enabled, level, charging)\n * - `gps`: GPS status (enabled, connected, quality)\n */\nexport interface SystemState {\n wifi?: {\n connected: boolean;\n networkName?: string;\n strength: 0 | 1 | 2 | 3 | 4; // Maps directly to icon variants\n };\n audio?: {\n muted: boolean;\n volume: number; // 0-100\n };\n microphone?: {\n muted: boolean;\n sensitivity: number; // 0-100\n };\n battery?: {\n level: number; // 0-100\n charging: boolean;\n poweredNotCharging?: boolean;\n notification?: boolean;\n };\n gps?: {\n connected: boolean;\n quality: 'bad' | 'low' | 'medium' | 'full'; // Maps to GPS icon variants\n };\n}\n\n/**\n * `<obc-system-button>` – A multi-state system status and quick-action button for displaying and controlling core system indicators.\n *\n * This component provides a compact, interactive summary of system-level statuses such as WiFi, audio, microphone, battery, and GPS. It can be used as a single icon button, an expanded status display, or a segmented set of quick-action buttons, depending on the chosen variant. Designed for use in application toolbars, system menus, or quick-access panels where users need to view and interact with system controls at a glance.\n *\n * Appears as an icon or set of icons representing real-time system states. Supports toggling panels for detailed control or configuration, and adapts its layout to suit condensed, expanded, or action-oriented contexts.\n *\n * ## Features\n *\n * - **Variants**:\n * - **Condensed**: Single icon button (typically a settings or system icon) for minimal space usage.\n * - **Expanded**: Horizontal button displaying a row of system status icons (WiFi, audio, microphone, battery, GPS) for quick visual overview.\n * - **Actions**: Segmented button group, each segment representing a system function (microphone, volume, system icons), with interactive actions for each.\n * - **Dynamic Iconography**: Icons update in real time to reflect system state (e.g., WiFi strength, battery level, mute status, GPS quality).\n * - **Quick Actions**: In actions variant, clicking a segment opens the corresponding control panel (e.g., microphone settings, volume slider).\n * - **State Awareness**: Each system indicator (WiFi, audio, microphone, battery, GPS) can be enabled/disabled independently, and their visual state reflects connection, mute, charge, or quality status.\n * - **Accessibility**: Button segments are keyboard accessible and support disabled state.\n * - **Customizable**: System state can be controlled via the `systemState` property, allowing for integration with live system data.\n *\n * ## Usage Guidelines\n *\n * Use `<obc-system-button>` to provide users with a compact, always-visible summary of key system statuses and quick access to related controls. Ideal for application toolbars, overlays, or system menus where users need to monitor and adjust system settings without leaving their current context.\n *\n * - Use the **condensed** variant for minimal UI or when only a single system menu entry is needed.\n * - Use the **expanded** variant to show multiple system statuses at a glance, especially when space allows and quick status recognition is important.\n * - Use the **actions** variant to provide direct access to system controls (e.g., mute/unmute, adjust volume, open system settings).\n *\n * Only enable system indicators that are relevant to your application context. For example, if GPS is not available, set `systemState.gps.enabled` to `false` to hide the GPS icon.\n *\n * **TODO(designer):** Provide guidance on when to use each variant and any best practices for grouping or prioritizing system indicators.\n *\n *\n * ## Properties and Attributes\n *\n * - `variant` (`condensed` | `expanded` | `actions`): Controls the visual and interactive mode of the button. Default is `condensed`.\n * - `disabled` (boolean): Disables all interactions and renders the button(s) in a disabled state.\n * - `systemState` (object): Object describing the enabled state and current value for each system indicator (WiFi, audio, microphone, battery, GPS). Each sub-property (e.g., `wifi.enabled`, `audio.volume`) controls the presence and state of its corresponding icon.\n * - `menuOpen` (boolean): Indicates whether a system panel is currently open (used internally for expanded/actions variants).\n * - `activePanel` (string or null): Indicates which panel (if any) is currently active (`microphone`, `volume`, `system-icons`, or `null`).\n *\n * ## Events\n *\n * - `menu-toggle` – Fired when the expanded variant is toggled open or closed.\n * - `system-state-change` – Fired when the system state is updated via `updateSystemState()`.\n * - `microphone-panel-open` – Fired when the microphone action segment is activated.\n * - `volume-panel-open` – Fired when the volume action segment is activated.\n * - `system-icons-panel-open` – Fired when the system icons action segment is activated.\n *\n * ## Best Practices and Constraints\n *\n * - Only enable system indicators that are relevant to your application context.\n * - In the actions variant, avoid overloading the UI with too many segments; keep the number of quick actions manageable.\n * - Each segment in the actions variant should have a clear, distinct purpose.\n * - The component is intended for summary/status and quick access, not for detailed configuration (which should be handled in dedicated panels).\n * - For accessibility, ensure that all interactive segments are reachable via keyboard and provide appropriate labels.\n *\n * ## Example\n *\n * ```html\n * <obc-system-button\n * variant=\"actions\"\n * .systemState=\"${{\n * wifi: {enabled: true, connected: true, strength: 3},\n * audio: {enabled: true, muted: false, volume: 65},\n * microphone: {enabled: true, muted: false, sensitivity: 80},\n * battery: {enabled: true, level: 78, charging: false},\n * gps: {enabled: true, connected: true, quality: 'medium'},\n * }}\"\n * >\n * <span slot=\"icon\"><obi-placeholder></obi-placeholder></span>\n * </obc-system-button>\n * ```\n *\n * @fires menu-toggle {CustomEvent<{open: boolean}>} When the expanded variant is toggled open or closed\n * @fires system-state-change {CustomEvent<{state: SystemState}>} When the system state is updated\n * @fires microphone-panel-open {CustomEvent<void>} When the microphone action segment is activated\n * @fires volume-panel-open {CustomEvent<void>} When the volume action segment is activated\n * @fires system-icons-panel-open {CustomEvent<void>} When the system icons action segment is activated\n */\n@customElement('obc-system-button')\nexport class ObcSystemButton extends LitElement {\n /**\n * Controls the visual and interactive mode of the system button.\n *\n * - `condensed`: Single icon button for minimal UI.\n * - `expanded`: Horizontal button showing a row of system status icons.\n * - `actions`: Segmented button group for quick access to system controls.\n *\n * Default: `condensed`\n */\n @property({type: String}) variant: SystemButtonVariant =\n SystemButtonVariant.condensed;\n\n /**\n * Disables all interactions and renders the button(s) in a disabled state.\n */\n @property({type: Boolean}) disabled = false;\n\n /**\n * Object describing the enabled state and current value for each system indicator (WiFi, audio, microphone, battery, GPS).\n *\n * Each sub-property (e.g., `wifi.enabled`, `audio.volume`) controls the presence and state of its corresponding icon.\n *\n * Default: all indicators disabled except WiFi (connected), audio (volume 65), microphone (sensitivity 80), battery (level 78), GPS (quality medium).\n */\n @property({type: Object}) systemState: SystemState = {\n wifi: {connected: true, strength: 3},\n audio: {muted: false, volume: 65},\n microphone: {muted: false, sensitivity: 80},\n battery: {level: 78, charging: false},\n gps: {connected: false, quality: 'medium'},\n };\n\n /**\n * Indicates whether a system panel is currently open (used internally for expanded/actions variants).\n */\n @property({type: Boolean}) menuOpen = false;\n\n /**\n * Indicates which panel (if any) is currently active.\n * One of: `'microphone'`, `'volume'`, `'system-icons'`, or `null`.\n */\n @property({type: String}) activePanel:\n | 'microphone'\n | 'volume'\n | 'system-icons'\n | null = null;\n\n private _handleExpandedTypeClick() {\n this.menuOpen = !this.menuOpen;\n /**\n * Fired when the expanded variant is toggled open or closed.\n *\n * @event menu-toggle\n * @type {CustomEvent<{open: boolean}>}\n */\n this.dispatchEvent(\n new CustomEvent('menu-toggle', {\n detail: {open: this.menuOpen},\n })\n );\n }\n\n /**\n * Updates the system state and dispatches a change event.\n * Called by the System Menu component.\n *\n * @param newState Partial system state to merge with the current state.\n * @fires system-state-change {CustomEvent<{state: SystemState}>} When the system state is updated\n */\n public updateSystemState(newState: Partial<SystemState>) {\n this.systemState = {...this.systemState, ...newState};\n this.dispatchEvent(\n new CustomEvent('system-state-change', {\n detail: {state: this.systemState},\n })\n );\n }\n\n /**\n * Closes the system menu panel.\n * Called by the System Menu component.\n */\n public closeMenu() {\n this.menuOpen = false;\n this.activePanel = null;\n }\n\n private _handleMicrophoneActionClick = () => {\n this.activePanel = 'microphone';\n this.menuOpen = true;\n /**\n * Fired when the microphone action segment is activated.\n *\n * @event microphone-panel-open\n * @type {CustomEvent<void>}\n */\n this.dispatchEvent(new CustomEvent('microphone-panel-open'));\n };\n\n private _handleVolumeActionClick = () => {\n this.activePanel = 'volume';\n this.menuOpen = true;\n /**\n * Fired when the volume action segment is activated.\n *\n * @event volume-panel-open\n * @type {CustomEvent<void>}\n */\n this.dispatchEvent(new CustomEvent('volume-panel-open'));\n };\n\n private _handleSystemIconsActionClick = () => {\n this.activePanel = 'system-icons';\n this.menuOpen = true;\n /**\n * Fired when the system icons action segment is activated.\n *\n * @event system-icons-panel-open\n * @type {CustomEvent<void>}\n */\n this.dispatchEvent(new CustomEvent('system-icons-panel-open'));\n };\n\n private _renderActionsButtons() {\n const buttons = [];\n let buttonCount = 0;\n\n // Count enabled buttons first to determine segment positions\n if (this.systemState.microphone !== undefined) buttonCount++;\n if (this.systemState.audio !== undefined) buttonCount++;\n // Always show system icons button\n buttonCount++;\n\n let currentIndex = 0;\n\n // Microphone button\n if (this.systemState.microphone !== undefined) {\n const segmentPosition =\n buttonCount === 1\n ? 'single'\n : currentIndex === 0\n ? 'start'\n : currentIndex === buttonCount - 1\n ? 'end'\n : 'middle';\n\n buttons.push(html`\n <obc-button\n .variant=${IconButtonVariant.normal}\n .segmentPosition=${segmentPosition}\n .showLeadingIcon=${true}\n @click=${this._handleMicrophoneActionClick}\n .disabled=${this.disabled}\n >\n <span slot=\"leading-icon\">${this._renderMicrophoneIcon()}</span>\n ${this.systemState.microphone.muted ? 'Off' : 'On'}\n </obc-button>\n `);\n currentIndex++;\n }\n\n // Volume button\n if (this.systemState.audio !== undefined) {\n const segmentPosition =\n buttonCount === 1\n ? 'single'\n : currentIndex === 0\n ? 'start'\n : currentIndex === buttonCount - 1\n ? 'end'\n : 'middle';\n\n buttons.push(html`\n <obc-button\n .variant=${IconButtonVariant.normal}\n .segmentPosition=${segmentPosition}\n .showLeadingIcon=${true}\n @click=${this._handleVolumeActionClick}\n .disabled=${this.disabled}\n >\n <span slot=\"leading-icon\">${this._renderVolumeIcon()}</span>\n ${this.systemState.audio.volume}\n </obc-button>\n `);\n currentIndex++;\n }\n\n // System icons button (always shown)\n const segmentPosition =\n buttonCount === 1 ? 'single' : currentIndex === 0 ? 'start' : 'end';\n\n buttons.push(html`\n <obc-button\n .variant=${IconButtonVariant.normal}\n .segmentPosition=${segmentPosition}\n .showLeadingIcon=${true}\n @click=${this._handleSystemIconsActionClick}\n .disabled=${this.disabled}\n >\n <span slot=\"leading-icon\" class=\"multiple-icons\">\n ${this._renderWifiIcon()} ${this._renderGpsIcon()}\n ${this._renderBatteryIcon()}\n </span>\n </obc-button>\n `);\n\n return buttons;\n }\n\n private _renderMicrophoneIcon() {\n if (this.systemState.microphone === undefined) return nothing;\n\n if (this.systemState.microphone.muted) {\n return html`<obi-com-mic-muted-google></obi-com-mic-muted-google>`;\n } else {\n return html`<obi-com-microphone></obi-com-microphone>`;\n }\n }\n\n private _renderVolumeIcon() {\n if (this.systemState.audio === undefined) return nothing;\n\n const volume = this.systemState.audio.volume;\n const muted = this.systemState.audio.muted;\n\n if (muted) {\n return html`<obi-sound-muted></obi-sound-muted>`;\n }\n\n // Show different sound levels based on volume\n if (volume === 0) {\n return html`<obi-sound-no></obi-sound-no>`;\n } else if (volume <= 50) {\n return html`<obi-sound-low></obi-sound-low>`;\n } else {\n return html`<obi-sound></obi-sound>`;\n }\n }\n\n private _renderWifiIcon() {\n if (this.systemState.wifi === undefined) return nothing;\n\n if (!this.systemState.wifi.connected) {\n return html`<obi-wifi2-off-google></obi-wifi2-off-google>`;\n }\n\n // Show strength-based icon when connected - update rendering icons when we get new icons\n switch (this.systemState.wifi.strength) {\n case 0:\n return html`<obi-wifi2-google></obi-wifi2-google>`;\n case 1:\n return html`<obi-wifi2-google></obi-wifi2-google>`;\n case 2:\n return html`<obi-wifi2-google></obi-wifi2-google>`;\n case 3:\n return html`<obi-wifi2-google></obi-wifi2-google>`;\n case 4:\n return html`<obi-wifi2-google></obi-wifi2-google>`;\n default:\n return html`<obi-wifi2-google></obi-wifi2-google>`;\n }\n }\n\n private _renderGpsIcon() {\n if (this.systemState.gps === undefined) return nothing;\n\n if (!this.systemState.gps.connected) {\n return html`<obi-sensor-gps-bad></obi-sensor-gps-bad>`;\n }\n\n // Show GPS quality based on signal\n switch (this.systemState.gps.quality) {\n case 'bad':\n return html`<obi-sensor-gps-bad></obi-sensor-gps-bad>`;\n case 'low':\n return html`<obi-sensor-gps-low></obi-sensor-gps-low>`;\n case 'medium':\n return html`<obi-sensor-gps-medium></obi-sensor-gps-medium>`;\n case 'full':\n return html`<obi-sensor-gps-full></obi-sensor-gps-full>`;\n default:\n return html`<obi-sensor-gps-medium></obi-sensor-gps-medium>`;\n }\n }\n\n private _renderBatteryIcon() {\n if (this.systemState.battery === undefined) return nothing;\n\n const level = this.systemState.battery.level;\n const charging = this.systemState.battery.charging;\n const poweredNotCharging =\n this.systemState.battery.poweredNotCharging ?? false;\n const notification = this.systemState.battery.notification ?? false;\n return html`<obc-battery-icon\n class=\"icon\"\n .level=${level}\n .charging=${charging}\n .poweredNotCharging=${poweredNotCharging}\n .notification=${notification}\n horizontal\n ></obc-battery-icon>`;\n }\n\n override render() {\n switch (this.variant) {\n case 'condensed':\n return html`\n <obc-icon-button\n variant=${IconButtonVariant.flat}\n .disabled=${this.disabled}\n >\n <obi-configure></obi-configure>\n </obc-icon-button>\n `;\n\n case 'expanded':\n return html` <button\n class=\"expanded-visually-hidden\"\n @click=${this._handleExpandedTypeClick}\n .disabled=${this.disabled}\n >\n <div class=\"expanded-inner-wrapper\">\n <div class=\"expanded-icon-container\">\n ${this._renderMicrophoneIcon()} ${this._renderVolumeIcon()}\n ${this._renderWifiIcon()} ${this._renderGpsIcon()}\n ${this._renderBatteryIcon()}\n </div>\n </div>\n </button>`;\n\n case 'actions':\n return html`\n <div class=\"system-button--actions\">\n ${this._renderActionsButtons()}\n </div>\n `;\n default:\n return html`\n <obc-icon-button variant=${IconButtonVariant.normal}>\n <obi-configure></obi-configure>\n </obc-icon-button>\n `;\n }\n }\n\n static override styles = unsafeCSS(compentStyle);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-system-button': ObcSystemButton;\n }\n}\n"],"names":["SystemButtonVariant","segmentPosition"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsBO,IAAK,wCAAAA,yBAAL;AACLA,uBAAA,WAAA,IAAY;AACZA,uBAAA,UAAA,IAAW;AACXA,uBAAA,SAAA,IAAU;AAHA,SAAAA;AAAA,GAAA,uBAAA,CAAA,CAAA;AAyHL,IAAM,kBAAN,cAA8B,WAAW;AAAA,EAAzC,cAAA;AAAA,UAAA,GAAA,SAAA;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Bb,gBAyBe,WAAA,eAAA,CAAA;AAWC,gBAAA;AAAA,EAA1B,SAAS,EAAC,MAAM,QAAA,CAAQ;AAAA,GApCd,gBAoCgB,WAAA,YAAA,CAAA;AAMD,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,OAAA,CAAO;AAAA,GA1Cb,gBA0Ce,WAAA,eAAA,CAAA;AA1Cf,kBAAN,gBAAA;AAAA,EADN,cAAc,mBAAmB;AAAA,GACrB,eAAA;"}
|
|
1
|
+
{"version":3,"file":"system-button.js","sources":["../../../src/components/system-button/system-button.ts"],"sourcesContent":["import {LitElement, html, nothing, unsafeCSS} from 'lit';\nimport {customElement} from '../../decorator.js';\nimport compentStyle from './system-button.css?inline';\nimport {property} from 'lit/decorators.js';\nimport '../icon-button/icon-button.js';\nimport {IconButtonVariant} from '../icon-button/icon-button.js';\nimport '../../icons/icon-configure.js';\nimport '../../icons/icon-com-microphone.js';\nimport '../../icons/icon-com-mic-muted-google.js';\nimport '../../icons/icon-wifi2-google.js';\nimport '../../icons/icon-wifi2-off-google.js';\nimport '../../icons/icon-sensor-gps-bad.js';\nimport '../../icons/icon-sensor-gps-low.js';\nimport '../../icons/icon-sensor-gps-medium.js';\nimport '../../icons/icon-sensor-gps-full.js';\nimport '../../icons/icon-sound-muted.js';\nimport '../../icons/icon-sound-no.js';\nimport '../../icons/icon-sound-low.js';\nimport '../../icons/icon-sound.js';\nimport '../button/button.js';\nimport '../battery-icon/battery-icon.js';\n\nexport enum SystemButtonVariant {\n condensed = 'condensed',\n expanded = 'expanded',\n actions = 'actions',\n}\n\nexport enum ActivePanel {\n microphone = 'microphone',\n volume = 'volume',\n systemIcons = 'system-icons',\n}\n\n/**\n * Describes the enabled state and current value for each system indicator displayed by `<obc-system-button>`.\n *\n * - `wifi`: WiFi status (enabled, connected, strength, network name)\n * - `audio`: Audio status (enabled, muted, volume)\n * - `microphone`: Microphone status (enabled, muted, sensitivity)\n * - `battery`: Battery status (enabled, level, charging)\n * - `gps`: GPS status (enabled, connected, quality)\n */\nexport interface SystemState {\n wifi?: {\n connected: boolean;\n networkName?: string;\n strength: 0 | 1 | 2 | 3 | 4; // Maps directly to icon variants\n };\n audio?: {\n muted: boolean;\n volume: number; // 0-100\n };\n microphone?: {\n muted: boolean;\n sensitivity: number; // 0-100\n };\n battery?: {\n level: number; // 0-100\n charging: boolean;\n poweredNotCharging?: boolean;\n notification?: boolean;\n };\n gps?: {\n connected: boolean;\n quality: 'bad' | 'low' | 'medium' | 'full'; // Maps to GPS icon variants\n };\n}\n\n/**\n * `<obc-system-button>` – A multi-state system status and quick-action button for displaying and controlling core system indicators.\n *\n * This component provides a compact, interactive summary of system-level statuses such as WiFi, audio, microphone, battery, and GPS. It can be used as a single icon button, an expanded status display, or a segmented set of quick-action buttons, depending on the chosen variant. Designed for use in application toolbars, system menus, or quick-access panels where users need to view and interact with system controls at a glance.\n *\n * Appears as an icon or set of icons representing real-time system states. Supports toggling panels for detailed control or configuration, and adapts its layout to suit condensed, expanded, or action-oriented contexts.\n *\n * ## Features\n *\n * - **Variants**:\n * - **Condensed**: Single icon button (typically a settings or system icon) for minimal space usage.\n * - **Expanded**: Horizontal button displaying a row of system status icons (WiFi, audio, microphone, battery, GPS) for quick visual overview.\n * - **Actions**: Segmented button group, each segment representing a system function (microphone, volume, system icons), with interactive actions for each.\n * - **Dynamic Iconography**: Icons update in real time to reflect system state (e.g., WiFi strength, battery level, mute status, GPS quality).\n * - **Quick Actions**: In actions variant, clicking a segment opens the corresponding control panel (e.g., microphone settings, volume slider).\n * - **State Awareness**: Each system indicator (WiFi, audio, microphone, battery, GPS) can be enabled/disabled independently, and their visual state reflects connection, mute, charge, or quality status.\n * - **Accessibility**: Button segments are keyboard accessible and support disabled state.\n * - **Customizable**: System state can be controlled via the `systemState` property, allowing for integration with live system data.\n *\n * ## Usage Guidelines\n *\n * Use `<obc-system-button>` to provide users with a compact, always-visible summary of key system statuses and quick access to related controls. Ideal for application toolbars, overlays, or system menus where users need to monitor and adjust system settings without leaving their current context.\n *\n * - Use the **condensed** variant for minimal UI or when only a single system menu entry is needed.\n * - Use the **expanded** variant to show multiple system statuses at a glance, especially when space allows and quick status recognition is important.\n * - Use the **actions** variant to provide direct access to system controls (e.g., mute/unmute, adjust volume, open system settings).\n *\n * Only enable system indicators that are relevant to your application context. For example, if GPS is not available, set `systemState.gps.enabled` to `false` to hide the GPS icon.\n *\n * **TODO(designer):** Provide guidance on when to use each variant and any best practices for grouping or prioritizing system indicators.\n *\n *\n * ## Properties and Attributes\n *\n * - `variant` (`condensed` | `expanded` | `actions`): Controls the visual and interactive mode of the button. Default is `condensed`.\n * - `disabled` (boolean): Disables all interactions and renders the button(s) in a disabled state.\n * - `systemState` (object): Object describing the enabled state and current value for each system indicator (WiFi, audio, microphone, battery, GPS). Each sub-property (e.g., `wifi.enabled`, `audio.volume`) controls the presence and state of its corresponding icon.\n * - `menuOpen` (boolean): Indicates whether a system panel is currently open (used internally for expanded/actions variants).\n * - `activePanel` (string or null): Indicates which panel (if any) is currently active (`microphone`, `volume`, `system-icons`, or `null`).\n *\n * ## Events\n *\n * - `menu-toggle` – Fired when the expanded variant is toggled open or closed.\n * - `system-state-change` – Fired when the system state is updated via `updateSystemState()`.\n * - `microphone-panel-open` – Fired when the microphone action segment is activated.\n * - `volume-panel-open` – Fired when the volume action segment is activated.\n * - `system-icons-panel-open` – Fired when the system icons action segment is activated.\n *\n * ## Best Practices and Constraints\n *\n * - Only enable system indicators that are relevant to your application context.\n * - In the actions variant, avoid overloading the UI with too many segments; keep the number of quick actions manageable.\n * - Each segment in the actions variant should have a clear, distinct purpose.\n * - The component is intended for summary/status and quick access, not for detailed configuration (which should be handled in dedicated panels).\n * - For accessibility, ensure that all interactive segments are reachable via keyboard and provide appropriate labels.\n *\n * ## Example\n *\n * ```html\n * <obc-system-button\n * variant=\"actions\"\n * .systemState=\"${{\n * wifi: {enabled: true, connected: true, strength: 3},\n * audio: {enabled: true, muted: false, volume: 65},\n * microphone: {enabled: true, muted: false, sensitivity: 80},\n * battery: {enabled: true, level: 78, charging: false},\n * gps: {enabled: true, connected: true, quality: 'medium'},\n * }}\"\n * >\n * <span slot=\"icon\"><obi-placeholder></obi-placeholder></span>\n * </obc-system-button>\n * ```\n *\n * @fires menu-toggle {CustomEvent<{open: boolean}>} When the expanded variant is toggled open or closed\n * @fires system-state-change {CustomEvent<{state: SystemState}>} When the system state is updated\n * @fires microphone-panel-open {CustomEvent<void>} When the microphone action segment is activated\n * @fires volume-panel-open {CustomEvent<void>} When the volume action segment is activated\n * @fires system-icons-panel-open {CustomEvent<void>} When the system icons action segment is activated\n */\n@customElement('obc-system-button')\nexport class ObcSystemButton extends LitElement {\n /**\n * Controls the visual and interactive mode of the system button.\n *\n * - `condensed`: Single icon button for minimal UI.\n * - `expanded`: Horizontal button showing a row of system status icons.\n * - `actions`: Segmented button group for quick access to system controls.\n *\n * Default: `condensed`\n */\n @property({type: String}) variant: SystemButtonVariant =\n SystemButtonVariant.condensed;\n\n /**\n * Disables all interactions and renders the button(s) in a disabled state.\n */\n @property({type: Boolean}) disabled = false;\n\n /**\n * Object describing the enabled state and current value for each system indicator (WiFi, audio, microphone, battery, GPS).\n *\n * Each sub-property (e.g., `wifi.enabled`, `audio.volume`) controls the presence and state of its corresponding icon.\n *\n * Default: all indicators disabled except WiFi (connected), audio (volume 65), microphone (sensitivity 80), battery (level 78), GPS (quality medium).\n */\n @property({type: Object}) systemState: SystemState = {\n wifi: {connected: true, strength: 3},\n audio: {muted: false, volume: 65},\n microphone: {muted: false, sensitivity: 80},\n battery: {level: 78, charging: false},\n gps: {connected: false, quality: 'medium'},\n };\n\n /**\n * Indicates whether a system panel is currently open (used internally for expanded/actions variants).\n */\n @property({type: Boolean}) menuOpen = false;\n\n /**\n * Indicates which panel (if any) is currently active.\n * One of: `'microphone'`, `'volume'`, `'system-icons'`, or `null`.\n */\n @property({type: String}) activePanel: ActivePanel | null = null;\n\n private _handleExpandedTypeClick() {\n this.menuOpen = !this.menuOpen;\n /**\n * Fired when the expanded variant is toggled open or closed.\n *\n * @event menu-toggle\n * @type {CustomEvent<{open: boolean}>}\n */\n this.dispatchEvent(\n new CustomEvent('menu-toggle', {\n detail: {open: this.menuOpen},\n })\n );\n }\n\n /**\n * Updates the system state and dispatches a change event.\n * Called by the System Menu component.\n *\n * @param newState Partial system state to merge with the current state.\n * @fires system-state-change {CustomEvent<{state: SystemState}>} When the system state is updated\n */\n public updateSystemState(newState: Partial<SystemState>) {\n this.systemState = {...this.systemState, ...newState};\n this.dispatchEvent(\n new CustomEvent('system-state-change', {\n detail: {state: this.systemState},\n })\n );\n }\n\n /**\n * Closes the system menu panel.\n * Called by the System Menu component.\n */\n public closeMenu() {\n this.menuOpen = false;\n this.activePanel = null;\n }\n\n private _handleMicrophoneActionClick = () => {\n this.activePanel = ActivePanel.microphone;\n this.menuOpen = true;\n /**\n * Fired when the microphone action segment is activated.\n *\n * @event microphone-panel-open\n * @type {CustomEvent<void>}\n */\n this.dispatchEvent(new CustomEvent('microphone-panel-open'));\n };\n\n private _handleVolumeActionClick = () => {\n this.activePanel = ActivePanel.volume;\n this.menuOpen = true;\n /**\n * Fired when the volume action segment is activated.\n *\n * @event volume-panel-open\n * @type {CustomEvent<void>}\n */\n this.dispatchEvent(new CustomEvent('volume-panel-open'));\n };\n\n private _handleSystemIconsActionClick = () => {\n this.activePanel = ActivePanel.systemIcons;\n this.menuOpen = true;\n /**\n * Fired when the system icons action segment is activated.\n *\n * @event system-icons-panel-open\n * @type {CustomEvent<void>}\n */\n this.dispatchEvent(new CustomEvent('system-icons-panel-open'));\n };\n\n private _renderActionsButtons() {\n const buttons = [];\n let buttonCount = 0;\n\n // Count enabled buttons first to determine segment positions\n if (this.systemState.microphone !== undefined) buttonCount++;\n if (this.systemState.audio !== undefined) buttonCount++;\n // Always show system icons button\n buttonCount++;\n\n let currentIndex = 0;\n\n // Microphone button\n if (this.systemState.microphone !== undefined) {\n const segmentPosition =\n buttonCount === 1\n ? 'single'\n : currentIndex === 0\n ? 'start'\n : currentIndex === buttonCount - 1\n ? 'end'\n : 'middle';\n\n buttons.push(html`\n <obc-button\n .variant=${IconButtonVariant.normal}\n .segmentPosition=${segmentPosition}\n .showLeadingIcon=${true}\n @click=${this._handleMicrophoneActionClick}\n .disabled=${this.disabled}\n >\n <span slot=\"leading-icon\">${this._renderMicrophoneIcon()}</span>\n ${this.systemState.microphone.muted ? 'Off' : 'On'}\n </obc-button>\n `);\n currentIndex++;\n }\n\n // Volume button\n if (this.systemState.audio !== undefined) {\n const segmentPosition =\n buttonCount === 1\n ? 'single'\n : currentIndex === 0\n ? 'start'\n : currentIndex === buttonCount - 1\n ? 'end'\n : 'middle';\n\n buttons.push(html`\n <obc-button\n .variant=${IconButtonVariant.normal}\n .segmentPosition=${segmentPosition}\n .showLeadingIcon=${true}\n @click=${this._handleVolumeActionClick}\n .disabled=${this.disabled}\n >\n <span slot=\"leading-icon\">${this._renderVolumeIcon()}</span>\n ${this.systemState.audio.volume}\n </obc-button>\n `);\n currentIndex++;\n }\n\n // System icons button (always shown)\n const segmentPosition =\n buttonCount === 1 ? 'single' : currentIndex === 0 ? 'start' : 'end';\n\n buttons.push(html`\n <obc-button\n .variant=${IconButtonVariant.normal}\n .segmentPosition=${segmentPosition}\n .showLeadingIcon=${true}\n @click=${this._handleSystemIconsActionClick}\n .disabled=${this.disabled}\n >\n <span slot=\"leading-icon\" class=\"multiple-icons\">\n ${this._renderWifiIcon()} ${this._renderGpsIcon()}\n ${this._renderBatteryIcon()}\n </span>\n </obc-button>\n `);\n\n return buttons;\n }\n\n private _renderMicrophoneIcon() {\n if (this.systemState.microphone === undefined) return nothing;\n\n if (this.systemState.microphone.muted) {\n return html`<obi-com-mic-muted-google></obi-com-mic-muted-google>`;\n } else {\n return html`<obi-com-microphone></obi-com-microphone>`;\n }\n }\n\n private _renderVolumeIcon() {\n if (this.systemState.audio === undefined) return nothing;\n\n const volume = this.systemState.audio.volume;\n const muted = this.systemState.audio.muted;\n\n if (muted) {\n return html`<obi-sound-muted></obi-sound-muted>`;\n }\n\n // Show different sound levels based on volume\n if (volume === 0) {\n return html`<obi-sound-no></obi-sound-no>`;\n } else if (volume <= 50) {\n return html`<obi-sound-low></obi-sound-low>`;\n } else {\n return html`<obi-sound></obi-sound>`;\n }\n }\n\n private _renderWifiIcon() {\n if (this.systemState.wifi === undefined) return nothing;\n\n if (!this.systemState.wifi.connected) {\n return html`<obi-wifi2-off-google></obi-wifi2-off-google>`;\n }\n\n // Show strength-based icon when connected - update rendering icons when we get new icons\n switch (this.systemState.wifi.strength) {\n case 0:\n return html`<obi-wifi2-google></obi-wifi2-google>`;\n case 1:\n return html`<obi-wifi2-google></obi-wifi2-google>`;\n case 2:\n return html`<obi-wifi2-google></obi-wifi2-google>`;\n case 3:\n return html`<obi-wifi2-google></obi-wifi2-google>`;\n case 4:\n return html`<obi-wifi2-google></obi-wifi2-google>`;\n default:\n return html`<obi-wifi2-google></obi-wifi2-google>`;\n }\n }\n\n private _renderGpsIcon() {\n if (this.systemState.gps === undefined) return nothing;\n\n if (!this.systemState.gps.connected) {\n return html`<obi-sensor-gps-bad></obi-sensor-gps-bad>`;\n }\n\n // Show GPS quality based on signal\n switch (this.systemState.gps.quality) {\n case 'bad':\n return html`<obi-sensor-gps-bad></obi-sensor-gps-bad>`;\n case 'low':\n return html`<obi-sensor-gps-low></obi-sensor-gps-low>`;\n case 'medium':\n return html`<obi-sensor-gps-medium></obi-sensor-gps-medium>`;\n case 'full':\n return html`<obi-sensor-gps-full></obi-sensor-gps-full>`;\n default:\n return html`<obi-sensor-gps-medium></obi-sensor-gps-medium>`;\n }\n }\n\n private _renderBatteryIcon() {\n if (this.systemState.battery === undefined) return nothing;\n\n const level = this.systemState.battery.level;\n const charging = this.systemState.battery.charging;\n const poweredNotCharging =\n this.systemState.battery.poweredNotCharging ?? false;\n const notification = this.systemState.battery.notification ?? false;\n return html`<obc-battery-icon\n class=\"icon\"\n .level=${level}\n .charging=${charging}\n .poweredNotCharging=${poweredNotCharging}\n .notification=${notification}\n horizontal\n ></obc-battery-icon>`;\n }\n\n override render() {\n switch (this.variant) {\n case 'condensed':\n return html`\n <obc-icon-button\n variant=${IconButtonVariant.flat}\n .disabled=${this.disabled}\n >\n <obi-configure></obi-configure>\n </obc-icon-button>\n `;\n\n case 'expanded':\n return html` <button\n class=\"expanded-visually-hidden\"\n @click=${this._handleExpandedTypeClick}\n .disabled=${this.disabled}\n >\n <div class=\"expanded-inner-wrapper\">\n <div class=\"expanded-icon-container\">\n ${this._renderMicrophoneIcon()} ${this._renderVolumeIcon()}\n ${this._renderWifiIcon()} ${this._renderGpsIcon()}\n ${this._renderBatteryIcon()}\n </div>\n </div>\n </button>`;\n\n case 'actions':\n return html`\n <div class=\"system-button--actions\">\n ${this._renderActionsButtons()}\n </div>\n `;\n default:\n return html`\n <obc-icon-button variant=${IconButtonVariant.normal}>\n <obi-configure></obi-configure>\n </obc-icon-button>\n `;\n }\n }\n\n static override styles = unsafeCSS(compentStyle);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-system-button': ObcSystemButton;\n }\n}\n"],"names":["SystemButtonVariant","ActivePanel","segmentPosition"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsBO,IAAK,wCAAAA,yBAAL;AACLA,uBAAA,WAAA,IAAY;AACZA,uBAAA,UAAA,IAAW;AACXA,uBAAA,SAAA,IAAU;AAHA,SAAAA;AAAA,GAAA,uBAAA,CAAA,CAAA;AAML,IAAK,gCAAAC,iBAAL;AACLA,eAAA,YAAA,IAAa;AACbA,eAAA,QAAA,IAAS;AACTA,eAAA,aAAA,IAAc;AAHJ,SAAAA;AAAA,GAAA,eAAA,CAAA,CAAA;AAyHL,IAAM,kBAAN,cAA8B,WAAW;AAAA,EAAzC,cAAA;AAAA,UAAA,GAAA,SAAA;AAUqB,SAAA,UACxB;AAKyB,SAAA,WAAW;AASZ,SAAA,cAA2B;AAAA,MACnD,MAAM,EAAC,WAAW,MAAM,UAA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ApCd,gBAoCgB,WAAA,YAAA,CAAA;AAMD,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,OAAA,CAAO;AAAA,GA1Cb,gBA0Ce,WAAA,eAAA,CAAA;AA1Cf,kBAAN,gBAAA;AAAA,EADN,cAAc,mBAAmB;AAAA,GACrB,eAAA;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oicl/openbridge-webcomponents",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.20260410105605",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"@jackolope/ts-lit-plugin": "^3.1.6",
|
|
68
68
|
"@lit-labs/cli": "file:lit-labs-cli-0.6.5.tgz",
|
|
69
69
|
"@lit-labs/cli-localize": "^0.2.2",
|
|
70
|
-
"@lit-labs/gen-wrapper-angular": "file:lit-labs-gen-wrapper-angular-
|
|
70
|
+
"@lit-labs/gen-wrapper-angular": "file:lit-labs-gen-wrapper-angular-2bfcb97e.tgz",
|
|
71
71
|
"@lit-labs/gen-wrapper-react": "^0.3.5",
|
|
72
72
|
"@lit-labs/gen-wrapper-svelte": "file:lit-labs-gen-wrapper-svelte-cf2df9d.tgz",
|
|
73
73
|
"@lit-labs/gen-wrapper-vue": "file:lit-labs-gen-wrapper-vue-0.4.1.tgz",
|