@oicl/openbridge-webcomponents 2.0.0-next.111 → 2.0.0-next.113

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.
Files changed (60) hide show
  1. package/bundle/openbridge-webcomponents.bundle.js +185 -29
  2. package/bundle/openbridge-webcomponents.bundle.js.map +1 -1
  3. package/custom-elements.json +180 -21
  4. package/dist/building-blocks/readout-block/readout-block.d.ts +29 -5
  5. package/dist/building-blocks/readout-block/readout-block.d.ts.map +1 -1
  6. package/dist/building-blocks/readout-block/readout-block.js +21 -7
  7. package/dist/building-blocks/readout-block/readout-block.js.map +1 -1
  8. package/dist/navigation-instruments/compass/compass.d.ts +1 -1
  9. package/dist/navigation-instruments/compass/compass.d.ts.map +1 -1
  10. package/dist/navigation-instruments/compass/compass.js +1 -1
  11. package/dist/navigation-instruments/compass/compass.js.map +1 -1
  12. package/dist/navigation-instruments/current/current.d.ts +25 -0
  13. package/dist/navigation-instruments/current/current.d.ts.map +1 -1
  14. package/dist/navigation-instruments/current/current.js +25 -4
  15. package/dist/navigation-instruments/current/current.js.map +1 -1
  16. package/dist/navigation-instruments/heading/heading.js +1 -1
  17. package/dist/navigation-instruments/heading/heading.js.map +1 -1
  18. package/dist/navigation-instruments/pitch-roll-heave/pitch-roll-heave.d.ts +6 -0
  19. package/dist/navigation-instruments/pitch-roll-heave/pitch-roll-heave.d.ts.map +1 -1
  20. package/dist/navigation-instruments/pitch-roll-heave/pitch-roll-heave.js +8 -1
  21. package/dist/navigation-instruments/pitch-roll-heave/pitch-roll-heave.js.map +1 -1
  22. package/dist/navigation-instruments/rate-of-turn/rate-of-turn.d.ts +5 -2
  23. package/dist/navigation-instruments/rate-of-turn/rate-of-turn.d.ts.map +1 -1
  24. package/dist/navigation-instruments/rate-of-turn/rate-of-turn.js.map +1 -1
  25. package/dist/navigation-instruments/readout/readout-formatters.d.ts +31 -0
  26. package/dist/navigation-instruments/readout/readout-formatters.d.ts.map +1 -1
  27. package/dist/navigation-instruments/readout/readout-formatters.js +55 -1
  28. package/dist/navigation-instruments/readout/readout-formatters.js.map +1 -1
  29. package/dist/navigation-instruments/readout/readout.d.ts +26 -1
  30. package/dist/navigation-instruments/readout/readout.d.ts.map +1 -1
  31. package/dist/navigation-instruments/readout/readout.js +16 -3
  32. package/dist/navigation-instruments/readout/readout.js.map +1 -1
  33. package/dist/navigation-instruments/readout-list/readout-list.d.ts +6 -1
  34. package/dist/navigation-instruments/readout-list/readout-list.d.ts.map +1 -1
  35. package/dist/navigation-instruments/readout-list/readout-list.js +21 -4
  36. package/dist/navigation-instruments/readout-list/readout-list.js.map +1 -1
  37. package/dist/navigation-instruments/readout-list-item/readout-list-item.d.ts +26 -1
  38. package/dist/navigation-instruments/readout-list-item/readout-list-item.d.ts.map +1 -1
  39. package/dist/navigation-instruments/readout-list-item/readout-list-item.js +15 -3
  40. package/dist/navigation-instruments/readout-list-item/readout-list-item.js.map +1 -1
  41. package/dist/navigation-instruments/top-view-propulsion/top-view-propulsion.d.ts +6 -0
  42. package/dist/navigation-instruments/top-view-propulsion/top-view-propulsion.d.ts.map +1 -1
  43. package/dist/navigation-instruments/top-view-propulsion/top-view-propulsion.js +19 -4
  44. package/dist/navigation-instruments/top-view-propulsion/top-view-propulsion.js.map +1 -1
  45. package/dist/navigation-instruments/watch/environment.d.ts +8 -0
  46. package/dist/navigation-instruments/watch/environment.d.ts.map +1 -1
  47. package/dist/navigation-instruments/watch/environment.js +3 -0
  48. package/dist/navigation-instruments/watch/environment.js.map +1 -1
  49. package/dist/navigation-instruments/watch/force-pattern.d.ts +20 -2
  50. package/dist/navigation-instruments/watch/force-pattern.d.ts.map +1 -1
  51. package/dist/navigation-instruments/watch/force-pattern.js +12 -5
  52. package/dist/navigation-instruments/watch/force-pattern.js.map +1 -1
  53. package/dist/navigation-instruments/watch/watch.d.ts.map +1 -1
  54. package/dist/navigation-instruments/watch/watch.js +6 -4
  55. package/dist/navigation-instruments/watch/watch.js.map +1 -1
  56. package/dist/navigation-instruments/wind/wind.d.ts +5 -2
  57. package/dist/navigation-instruments/wind/wind.d.ts.map +1 -1
  58. package/dist/navigation-instruments/wind/wind.js +5 -1
  59. package/dist/navigation-instruments/wind/wind.js.map +1 -1
  60. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"environment.js","sources":["../../../src/navigation-instruments/watch/environment.ts"],"sourcesContent":["import {svg, SVGTemplateResult} from 'lit';\nimport {styleMap} from 'lit/directives/style-map.js';\nimport '../../icons/icon-wind-true-0.js';\nimport '../../icons/icon-wind-true-1.js';\nimport '../../icons/icon-wind-true-5.js';\nimport '../../icons/icon-wind-true-10.js';\nimport '../../icons/icon-wind-true-15.js';\nimport '../../icons/icon-wind-true-20.js';\nimport '../../icons/icon-wind-true-25.js';\nimport '../../icons/icon-wind-true-30.js';\nimport '../../icons/icon-wind-true-35.js';\nimport '../../icons/icon-wind-true-45.js';\nimport '../../icons/icon-wind-true-50.js';\nimport '../../icons/icon-wind-true-55.js';\nimport '../../icons/icon-wind-true-60.js';\nimport '../../icons/icon-wind-true-65.js';\nimport '../../icons/icon-wind-true-70.js';\nimport '../../icons/icon-wind-true-100.js';\nimport '../../icons/icon-wind-shaft-0.js';\nimport '../../icons/icon-wind-shaft-1.js';\nimport '../../icons/icon-wind-shaft-5.js';\nimport '../../icons/icon-wind-shaft-10.js';\nimport '../../icons/icon-wind-shaft-15.js';\nimport '../../icons/icon-wind-shaft-20.js';\nimport '../../icons/icon-wind-shaft-25.js';\nimport '../../icons/icon-wind-shaft-30.js';\nimport '../../icons/icon-wind-shaft-35.js';\nimport '../../icons/icon-wind-shaft-40.js';\nimport '../../icons/icon-wind-shaft-45.js';\nimport '../../icons/icon-wind-shaft-50.js';\nimport '../../icons/icon-wind-shaft-55.js';\nimport '../../icons/icon-wind-shaft-60.js';\nimport '../../icons/icon-wind-shaft-65.js';\nimport '../../icons/icon-wind-shaft-70.js';\nimport '../../icons/icon-wind-shaft-75.js';\nimport '../../icons/icon-wind-shaft-80.js';\nimport '../../icons/icon-wind-shaft-85.js';\nimport '../../icons/icon-wind-shaft-90.js';\nimport '../../icons/icon-wind-shaft-95.js';\nimport '../../icons/icon-wind-shaft-100.js';\n\n/**\n * Knots buckets available as `<obi-wind-true-N>` icons. The Figma source\n * uses speed-valued names; 40 / 75 / 80 / 85 / 90 / 95 are not authored\n * for the true variant and snap to the nearest available bucket.\n */\nexport const WIND_TRUE_BUCKETS = [\n 0, 1, 5, 10, 15, 20, 25, 30, 35, 45, 50, 55, 60, 65, 70, 100,\n] as const;\n\n/**\n * Knots buckets available as `<obi-wind-shaft-N>` icons. The shaft\n * family is authored at full 5-knot granularity from 0 to 100 kn (plus\n * a sub-1 calm icon).\n */\nexport const WIND_SHAFT_BUCKETS = [\n 0, 1, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90,\n 95, 100,\n] as const;\n\n/** Render scale applied to the 24×24 icon so it matches the historic 48×48 visual footprint on the watch dial. */\nconst WIND_ICON_SCALE = 2;\n\n/**\n * Tip coordinates of the `obi-wind-true-*` icons in their native 24×24 child\n * space. The arrowhead tip is at approximately (12, 22.4453) — this is the\n * anchor point that lands on the watch's periphery radius so the barb tail\n * extends outward only (matching the legacy inline-glyph behavior).\n */\nconst WIND_ICON_TIP_X = 12;\nconst WIND_ICON_TIP_Y = 22.4453;\n\nconst windIconCache = new Map<string, SVGTemplateResult>();\n\nfunction getWindIconSvg(bucket: number): SVGTemplateResult | null {\n const tagName = `obi-wind-true-${bucket}`;\n const cached = windIconCache.get(tagName);\n if (cached) {\n return cached;\n }\n const ctor = customElements.get(tagName) as\n | (new () => {icon?: SVGTemplateResult; iconCss?: SVGTemplateResult})\n | undefined;\n if (!ctor) {\n return null;\n }\n const instance = new ctor();\n const tpl: SVGTemplateResult | undefined = instance.icon ?? instance.iconCss;\n if (!tpl) {\n return null;\n }\n windIconCache.set(tagName, tpl);\n return tpl;\n}\n\n/**\n * Snap a wind speed in **knots** to the nearest available icon bucket.\n *\n * Non-finite / null / undefined / sub-zero inputs snap to bucket `0`\n * (calm). Otherwise the input is matched to the closest authored bucket\n * by absolute distance, with ties broken toward the lower bucket.\n */\nexport function windKnotsToBucket(\n knots: number | null | undefined,\n buckets: readonly number[]\n): number {\n if (knots == null || !Number.isFinite(knots) || knots <= 0) {\n return buckets[0];\n }\n let best = buckets[0];\n let bestDist = Math.abs(knots - best);\n for (let i = 1; i < buckets.length; i++) {\n const d = Math.abs(knots - buckets[i]);\n if (d < bestDist) {\n best = buckets[i];\n bestDist = d;\n }\n }\n return best;\n}\n\n/**\n * Snap a wind speed in knots to the nearest `<obi-wind-true-N>` bucket.\n * Shorthand for `windKnotsToBucket(knots, WIND_TRUE_BUCKETS)`.\n */\nexport function windKnotsToWindTrueBucket(\n knots: number | null | undefined\n): number {\n return windKnotsToBucket(knots, WIND_TRUE_BUCKETS);\n}\n\n/**\n * Snap a wind speed in knots to the nearest `<obi-wind-shaft-N>` bucket.\n * Shorthand for `windKnotsToBucket(knots, WIND_SHAFT_BUCKETS)`.\n */\nexport function windKnotsToWindShaftBucket(\n knots: number | null | undefined\n): number {\n return windKnotsToBucket(knots, WIND_SHAFT_BUCKETS);\n}\n\n/**\n * Legacy positional level `1..14` for the hardcoded\n * `SHAFT_TRUE_WIND_BARB_D_BY_LEVEL` inline barb glyphs used by the\n * shaft+true `obc-wind-indicator` variant. Implements the\n * designer-confirmed \"Option C\" mapping (one half-barb per 5 kn with\n * sub-pennant calm and shaft-only buckets).\n *\n * | Knots range | Level | Glyph |\n * | ------------ | ----- | ---------------------- |\n * | `[0, 0.5)` | 1 | calm |\n * | `[0.5, 2.5)` | 2 | shaft only |\n * | `[2.5, 7.5)` | 3 | shaft + ½ barb |\n * | `[7.5, 47.5)`| 4..11 | 5-kn nearest neighbour |\n * | `[47.5, 55)` | 12 | pennant (50 kn) |\n * | `[55, 65)` | 13 | pennant + 1 full barb |\n * | `[65, ∞)` | 14 | pennant + 2 full barbs |\n */\nexport function windKnotsToShaftTrueLevel(\n knots: number | null | undefined\n): number {\n if (knots == null || !Number.isFinite(knots) || knots < 0.5) {\n return 1;\n }\n if (knots < 2.5) {\n return 2;\n }\n if (knots < 47.5) {\n return Math.round(knots / 5) + 2;\n }\n if (knots < 55) {\n return 12;\n }\n if (knots < 65) {\n return 13;\n }\n return 14;\n}\n\nexport function renderWind(options: {\n windKnots: number;\n fromDirectionDeg: number;\n radius: number;\n color?: string;\n}): SVGTemplateResult {\n const {windKnots, fromDirectionDeg, radius, color} = options;\n const bucket = windKnotsToWindTrueBucket(windKnots);\n const icon = getWindIconSvg(bucket);\n if (!icon) {\n return svg``;\n }\n const dirRad = (fromDirectionDeg * Math.PI) / 180;\n const x = Math.sin(dirRad) * radius;\n const y = -Math.cos(dirRad) * radius;\n const tipX = WIND_ICON_TIP_X * WIND_ICON_SCALE;\n const tipY = WIND_ICON_TIP_Y * WIND_ICON_SCALE;\n const styles = {\n color: color ?? 'var(--instrument-regular-secondary-color)',\n };\n return svg`<g style=${styleMap(styles)} transform=\"translate(${x} ${y}) rotate(${fromDirectionDeg}) translate(${-tipX} ${-tipY}) scale(${WIND_ICON_SCALE})\">\n ${icon}\n </g>`;\n}\n\nexport function renderCurrent(options: {\n current: number;\n fromDirectionDeg: number;\n radius: number;\n color?: string;\n}): SVGTemplateResult {\n return renderEnvironment({\n filename: `current-${options.current}.svg`,\n fromDirectionDeg: options.fromDirectionDeg,\n radius: options.radius,\n color: options.color,\n });\n}\n\n/**\n * Render a current icon centered on the watch face (the direction-type\n * layout): the 24-unit `current-N` glyph is scaled about the face center and\n * rotated so the chevrons point with the flow (same orientation convention\n * as the peripheral `renderCurrent`).\n */\nexport function renderCurrentCentered(options: {\n current: number;\n fromDirectionDeg: number;\n scale: number;\n color?: string;\n}): SVGTemplateResult {\n const {current, fromDirectionDeg, scale, color} = options;\n const symbol = environmentSvgs[`current-${current}.svg`];\n if (!symbol) {\n return svg``;\n }\n const styles = color ? {'--instrument-regular-secondary-color': color} : {};\n return svg`<g style=${styleMap(styles)} transform=\"rotate(${180 + fromDirectionDeg}) scale(${scale}) translate(-12 -12)\">\n ${symbol}\n </g>`;\n}\n\nfunction renderEnvironment(options: {\n filename: string;\n fromDirectionDeg: number;\n radius: number;\n color?: string;\n}): SVGTemplateResult {\n const {filename, fromDirectionDeg, radius, color} = options;\n const directionRad = ((fromDirectionDeg - 180) * Math.PI) / 180;\n const symbol = environmentSvgs[filename];\n const styles = color ? {'--instrument-regular-secondary-color': color} : {};\n return svg`<g style=${styleMap(styles)} transform=\"translate(${-Math.sin(directionRad) * radius} ${Math.cos(directionRad) * radius}) rotate(${180 + fromDirectionDeg}) translate(-24, 0) scale(2)\">\n ${symbol}\n </g>`;\n}\n\nexport const environmentSvgs: Record<string, SVGTemplateResult> = {\n 'current-0.svg': svg`<path d=\"M11 2V22H13V2Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path d=\"M11 2V22H13V2Z\" fill=\"var(--instrument-regular-secondary-color)\"/>`,\n 'current-1.svg': svg`<path d=\"M11 7.00002L11 24L13 24L13 7.00005L11 7.00002Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M6.79309 5.20723L12.0002 0.00012207L17.2073 5.20723L15.7931 6.62144L12.0002 2.82855L8.2073 6.62144L6.79309 5.20723Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path d=\"M11 7.00002L11 24L13 24L13 7.00005L11 7.00002Z\" fill=\"var(--instrument-regular-secondary-color)\"/>\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M6.79309 5.20723L12.0002 0.00012207L17.2073 5.20723L15.7931 6.62144L12.0002 2.82855L8.2073 6.62144L6.79309 5.20723Z\" fill=\"var(--instrument-regular-secondary-color)\"/>`,\n 'current-2.svg': svg`<path d=\"M10.9742 12.0003L10.9742 24.0049L12.9999 24.005L12.9999 12.0004L10.9742 12.0003Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M6.79285 5.20747L12 0.000366211L17.2071 5.20747L15.7928 6.62169L12 2.82879L8.20706 6.62169L6.79285 5.20747Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M6.99988 10.5861L12.207 5.37903L17.4141 10.5861L15.9999 12.0003L12.207 8.20745L8.41409 12.0003L6.99988 10.5861Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path d=\"M10.9742 12.0003L10.9742 24.0049L12.9999 24.005L12.9999 12.0004L10.9742 12.0003Z\" fill=\"var(--instrument-regular-secondary-color)\"/>\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M6.79285 5.20747L12 0.000366211L17.2071 5.20747L15.7928 6.62169L12 2.82879L8.20706 6.62169L6.79285 5.20747Z\" fill=\"var(--instrument-regular-secondary-color)\"/>\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M6.99988 10.5861L12.207 5.37903L17.4141 10.5861L15.9999 12.0003L12.207 8.20745L8.41409 12.0003L6.99988 10.5861Z\" fill=\"var(--instrument-regular-secondary-color)\"/>`,\n 'current-3.svg': svg`<path d=\"M11 18L11 24L13 24L13 18L11 18Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M6.79297 5.20711L12.0001 0L17.2072 5.20711L15.793 6.62132L12.0001 2.82843L8.20718 6.62132L6.79297 5.20711Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M7 10.5858L12.2071 5.37866L17.4142 10.5858L16 12L12.2071 8.20709L8.41421 12L7 10.5858Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M7 16.5858L12.2071 11.3787L17.4142 16.5858L16 18L12.2071 14.2071L8.41421 18L7 16.5858Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path d=\"M11 18L11 24L13 24L13 18L11 18Z\" fill=\"var(--instrument-regular-secondary-color)\"/>\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M6.79297 5.20711L12.0001 0L17.2072 5.20711L15.793 6.62132L12.0001 2.82843L8.20718 6.62132L6.79297 5.20711Z\" fill=\"var(--instrument-regular-secondary-color)\"/>\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M7 10.5858L12.2071 5.37866L17.4142 10.5858L16 12L12.2071 8.20709L8.41421 12L7 10.5858Z\" fill=\"var(--instrument-regular-secondary-color)\"/>\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M7 16.5858L12.2071 11.3787L17.4142 16.5858L16 18L12.2071 14.2071L8.41421 18L7 16.5858Z\" fill=\"var(--instrument-regular-secondary-color)\"/>`,\n 'current-4.svg': svg`<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M6.79297 5.20711L12.0001 0L17.2072 5.20711L15.793 6.62132L12.0001 2.82843L8.20718 6.62132L6.79297 5.20711Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M7 10.5858L12.2071 5.37866L17.4142 10.5858L16 12L12.2071 8.20709L8.41421 12L7 10.5858Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M7 16.5858L12.2071 11.3787L17.4142 16.5858L16 18L12.2071 14.2071L8.41421 18L7 16.5858Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M7 22.5858L12.2071 17.3787L17.4142 22.5858L16 24L12.2071 20.2071L8.41421 24L7 22.5858Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M6.79297 5.20711L12.0001 0L17.2072 5.20711L15.793 6.62132L12.0001 2.82843L8.20718 6.62132L6.79297 5.20711Z\" fill=\"var(--instrument-regular-secondary-color)\"/>\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M7 10.5858L12.2071 5.37866L17.4142 10.5858L16 12L12.2071 8.20709L8.41421 12L7 10.5858Z\" fill=\"var(--instrument-regular-secondary-color)\"/>\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M7 16.5858L12.2071 11.3787L17.4142 16.5858L16 18L12.2071 14.2071L8.41421 18L7 16.5858Z\" fill=\"var(--instrument-regular-secondary-color)\"/>\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M7 22.5858L12.2071 17.3787L17.4142 22.5858L16 24L12.2071 20.2071L8.41421 24L7 22.5858Z\" fill=\"var(--instrument-regular-secondary-color)\"/>`,\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8CO,MAAM,oBAAoB;AAAA,EAC/B;AAAA,EAAG;AAAA,EAAG;AAAA,EAAG;AAAA,EAAI;AAAA,EAAI;AAAA,EAAI;AAAA,EAAI;AAAA,EAAI;AAAA,EAAI;AAAA,EAAI;AAAA,EAAI;AAAA,EAAI;AAAA,EAAI;AAAA,EAAI;AAAA,EAAI;AAC3D;AAOO,MAAM,qBAAqB;AAAA,EAChC;AAAA,EAAG;AAAA,EAAG;AAAA,EAAG;AAAA,EAAI;AAAA,EAAI;AAAA,EAAI;AAAA,EAAI;AAAA,EAAI;AAAA,EAAI;AAAA,EAAI;AAAA,EAAI;AAAA,EAAI;AAAA,EAAI;AAAA,EAAI;AAAA,EAAI;AAAA,EAAI;AAAA,EAAI;AAAA,EAAI;AAAA,EAAI;AAAA,EACzE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AAM;AAC5D,QAAM,SAAS,gBAAgB,QAAQ;AACvC,QAAM,SAAS,QAAQ,EAAC,wCAAwC,MAAA,IAAS,CAAA;AACzE,SAAO,eAAe,SAAS,MAAM,CAAC,yBAAyB,CAAC,KAAK,IAAI,YAAY,IAAI,MAAM,IAAI,KAAK,IAAI,YAAY,IAAI,MAAM,YAAY,MAAM,gBAAgB;AAAA,MAChK,MAAM;AAAA;AAEZ;AAEO,MAAM,kBAAqD;AAAA,EAChE,iBAAiB;AAAA;AAAA,EAEjB,iBAAiB;AAAA;AAAA;AAAA;AAAA,EAIjB,iBAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMjB,iBAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQjB,iBAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQnB;"}
1
+ {"version":3,"file":"environment.js","sources":["../../../src/navigation-instruments/watch/environment.ts"],"sourcesContent":["import {svg, SVGTemplateResult} from 'lit';\nimport {styleMap} from 'lit/directives/style-map.js';\nimport '../../icons/icon-wind-true-0.js';\nimport '../../icons/icon-wind-true-1.js';\nimport '../../icons/icon-wind-true-5.js';\nimport '../../icons/icon-wind-true-10.js';\nimport '../../icons/icon-wind-true-15.js';\nimport '../../icons/icon-wind-true-20.js';\nimport '../../icons/icon-wind-true-25.js';\nimport '../../icons/icon-wind-true-30.js';\nimport '../../icons/icon-wind-true-35.js';\nimport '../../icons/icon-wind-true-45.js';\nimport '../../icons/icon-wind-true-50.js';\nimport '../../icons/icon-wind-true-55.js';\nimport '../../icons/icon-wind-true-60.js';\nimport '../../icons/icon-wind-true-65.js';\nimport '../../icons/icon-wind-true-70.js';\nimport '../../icons/icon-wind-true-100.js';\nimport '../../icons/icon-wind-shaft-0.js';\nimport '../../icons/icon-wind-shaft-1.js';\nimport '../../icons/icon-wind-shaft-5.js';\nimport '../../icons/icon-wind-shaft-10.js';\nimport '../../icons/icon-wind-shaft-15.js';\nimport '../../icons/icon-wind-shaft-20.js';\nimport '../../icons/icon-wind-shaft-25.js';\nimport '../../icons/icon-wind-shaft-30.js';\nimport '../../icons/icon-wind-shaft-35.js';\nimport '../../icons/icon-wind-shaft-40.js';\nimport '../../icons/icon-wind-shaft-45.js';\nimport '../../icons/icon-wind-shaft-50.js';\nimport '../../icons/icon-wind-shaft-55.js';\nimport '../../icons/icon-wind-shaft-60.js';\nimport '../../icons/icon-wind-shaft-65.js';\nimport '../../icons/icon-wind-shaft-70.js';\nimport '../../icons/icon-wind-shaft-75.js';\nimport '../../icons/icon-wind-shaft-80.js';\nimport '../../icons/icon-wind-shaft-85.js';\nimport '../../icons/icon-wind-shaft-90.js';\nimport '../../icons/icon-wind-shaft-95.js';\nimport '../../icons/icon-wind-shaft-100.js';\n\n/**\n * Knots buckets available as `<obi-wind-true-N>` icons. The Figma source\n * uses speed-valued names; 40 / 75 / 80 / 85 / 90 / 95 are not authored\n * for the true variant and snap to the nearest available bucket.\n */\nexport const WIND_TRUE_BUCKETS = [\n 0, 1, 5, 10, 15, 20, 25, 30, 35, 45, 50, 55, 60, 65, 70, 100,\n] as const;\n\n/**\n * Knots buckets available as `<obi-wind-shaft-N>` icons. The shaft\n * family is authored at full 5-knot granularity from 0 to 100 kn (plus\n * a sub-1 calm icon).\n */\nexport const WIND_SHAFT_BUCKETS = [\n 0, 1, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90,\n 95, 100,\n] as const;\n\n/** Render scale applied to the 24×24 icon so it matches the historic 48×48 visual footprint on the watch dial. */\nconst WIND_ICON_SCALE = 2;\n\n/**\n * Tip coordinates of the `obi-wind-true-*` icons in their native 24×24 child\n * space. The arrowhead tip is at approximately (12, 22.4453) — this is the\n * anchor point that lands on the watch's periphery radius so the barb tail\n * extends outward only (matching the legacy inline-glyph behavior).\n */\nconst WIND_ICON_TIP_X = 12;\nconst WIND_ICON_TIP_Y = 22.4453;\n\n/**\n * Radial overhang of the rendered (2×, 48-unit) wind icon box past the tip\n * anchor toward the watch center: the glyph tip sits at y=22.4453 of the\n * 24-unit box, so the scaled box extends `(24 − 22.4453) × 2 ≈ 3.11` units\n * inside the anchor radius. Add it to a desired box inner-edge radius to get\n * the `windSymbolRadius` that makes the box start exactly there.\n */\nexport const WIND_ICON_TIP_TO_BOX_INNER =\n (24 - WIND_ICON_TIP_Y) * WIND_ICON_SCALE;\n\nconst windIconCache = new Map<string, SVGTemplateResult>();\n\nfunction getWindIconSvg(bucket: number): SVGTemplateResult | null {\n const tagName = `obi-wind-true-${bucket}`;\n const cached = windIconCache.get(tagName);\n if (cached) {\n return cached;\n }\n const ctor = customElements.get(tagName) as\n | (new () => {icon?: SVGTemplateResult; iconCss?: SVGTemplateResult})\n | undefined;\n if (!ctor) {\n return null;\n }\n const instance = new ctor();\n const tpl: SVGTemplateResult | undefined = instance.icon ?? instance.iconCss;\n if (!tpl) {\n return null;\n }\n windIconCache.set(tagName, tpl);\n return tpl;\n}\n\n/**\n * Snap a wind speed in **knots** to the nearest available icon bucket.\n *\n * Non-finite / null / undefined / sub-zero inputs snap to bucket `0`\n * (calm). Otherwise the input is matched to the closest authored bucket\n * by absolute distance, with ties broken toward the lower bucket.\n */\nexport function windKnotsToBucket(\n knots: number | null | undefined,\n buckets: readonly number[]\n): number {\n if (knots == null || !Number.isFinite(knots) || knots <= 0) {\n return buckets[0];\n }\n let best = buckets[0];\n let bestDist = Math.abs(knots - best);\n for (let i = 1; i < buckets.length; i++) {\n const d = Math.abs(knots - buckets[i]);\n if (d < bestDist) {\n best = buckets[i];\n bestDist = d;\n }\n }\n return best;\n}\n\n/**\n * Snap a wind speed in knots to the nearest `<obi-wind-true-N>` bucket.\n * Shorthand for `windKnotsToBucket(knots, WIND_TRUE_BUCKETS)`.\n */\nexport function windKnotsToWindTrueBucket(\n knots: number | null | undefined\n): number {\n return windKnotsToBucket(knots, WIND_TRUE_BUCKETS);\n}\n\n/**\n * Snap a wind speed in knots to the nearest `<obi-wind-shaft-N>` bucket.\n * Shorthand for `windKnotsToBucket(knots, WIND_SHAFT_BUCKETS)`.\n */\nexport function windKnotsToWindShaftBucket(\n knots: number | null | undefined\n): number {\n return windKnotsToBucket(knots, WIND_SHAFT_BUCKETS);\n}\n\n/**\n * Legacy positional level `1..14` for the hardcoded\n * `SHAFT_TRUE_WIND_BARB_D_BY_LEVEL` inline barb glyphs used by the\n * shaft+true `obc-wind-indicator` variant. Implements the\n * designer-confirmed \"Option C\" mapping (one half-barb per 5 kn with\n * sub-pennant calm and shaft-only buckets).\n *\n * | Knots range | Level | Glyph |\n * | ------------ | ----- | ---------------------- |\n * | `[0, 0.5)` | 1 | calm |\n * | `[0.5, 2.5)` | 2 | shaft only |\n * | `[2.5, 7.5)` | 3 | shaft + ½ barb |\n * | `[7.5, 47.5)`| 4..11 | 5-kn nearest neighbour |\n * | `[47.5, 55)` | 12 | pennant (50 kn) |\n * | `[55, 65)` | 13 | pennant + 1 full barb |\n * | `[65, ∞)` | 14 | pennant + 2 full barbs |\n */\nexport function windKnotsToShaftTrueLevel(\n knots: number | null | undefined\n): number {\n if (knots == null || !Number.isFinite(knots) || knots < 0.5) {\n return 1;\n }\n if (knots < 2.5) {\n return 2;\n }\n if (knots < 47.5) {\n return Math.round(knots / 5) + 2;\n }\n if (knots < 55) {\n return 12;\n }\n if (knots < 65) {\n return 13;\n }\n return 14;\n}\n\nexport function renderWind(options: {\n windKnots: number;\n fromDirectionDeg: number;\n radius: number;\n color?: string;\n}): SVGTemplateResult {\n const {windKnots, fromDirectionDeg, radius, color} = options;\n const bucket = windKnotsToWindTrueBucket(windKnots);\n const icon = getWindIconSvg(bucket);\n if (!icon) {\n return svg``;\n }\n const dirRad = (fromDirectionDeg * Math.PI) / 180;\n const x = Math.sin(dirRad) * radius;\n const y = -Math.cos(dirRad) * radius;\n const tipX = WIND_ICON_TIP_X * WIND_ICON_SCALE;\n const tipY = WIND_ICON_TIP_Y * WIND_ICON_SCALE;\n const styles = {\n color: color ?? 'var(--instrument-regular-secondary-color)',\n };\n return svg`<g style=${styleMap(styles)} transform=\"translate(${x} ${y}) rotate(${fromDirectionDeg}) translate(${-tipX} ${-tipY}) scale(${WIND_ICON_SCALE})\">\n ${icon}\n </g>`;\n}\n\nexport function renderCurrent(options: {\n current: number;\n fromDirectionDeg: number;\n radius: number;\n color?: string;\n}): SVGTemplateResult {\n return renderEnvironment({\n filename: `current-${options.current}.svg`,\n fromDirectionDeg: options.fromDirectionDeg,\n radius: options.radius,\n color: options.color,\n });\n}\n\n/**\n * Render a current icon centered on the watch face (the direction-type\n * layout): the 24-unit `current-N` glyph is scaled about the face center and\n * rotated so the chevrons point with the flow (same orientation convention\n * as the peripheral `renderCurrent`).\n */\nexport function renderCurrentCentered(options: {\n current: number;\n fromDirectionDeg: number;\n scale: number;\n color?: string;\n}): SVGTemplateResult {\n const {current, fromDirectionDeg, scale, color} = options;\n const symbol = environmentSvgs[`current-${current}.svg`];\n if (!symbol) {\n return svg``;\n }\n const styles = color ? {'--instrument-regular-secondary-color': color} : {};\n return svg`<g style=${styleMap(styles)} transform=\"rotate(${180 + fromDirectionDeg}) scale(${scale}) translate(-12 -12)\">\n ${symbol}\n </g>`;\n}\n\nfunction renderEnvironment(options: {\n filename: string;\n fromDirectionDeg: number;\n radius: number;\n color?: string;\n}): SVGTemplateResult {\n const {filename, fromDirectionDeg, radius, color} = options;\n const directionRad = ((fromDirectionDeg - 180) * Math.PI) / 180;\n const symbol = environmentSvgs[filename];\n const styles = color ? {'--instrument-regular-secondary-color': color} : {};\n return svg`<g style=${styleMap(styles)} transform=\"translate(${-Math.sin(directionRad) * radius} ${Math.cos(directionRad) * radius}) rotate(${180 + fromDirectionDeg}) translate(-24, 0) scale(2)\">\n ${symbol}\n </g>`;\n}\n\nexport const environmentSvgs: Record<string, SVGTemplateResult> = {\n 'current-0.svg': svg`<path d=\"M11 2V22H13V2Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path d=\"M11 2V22H13V2Z\" fill=\"var(--instrument-regular-secondary-color)\"/>`,\n 'current-1.svg': svg`<path d=\"M11 7.00002L11 24L13 24L13 7.00005L11 7.00002Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M6.79309 5.20723L12.0002 0.00012207L17.2073 5.20723L15.7931 6.62144L12.0002 2.82855L8.2073 6.62144L6.79309 5.20723Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path d=\"M11 7.00002L11 24L13 24L13 7.00005L11 7.00002Z\" fill=\"var(--instrument-regular-secondary-color)\"/>\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M6.79309 5.20723L12.0002 0.00012207L17.2073 5.20723L15.7931 6.62144L12.0002 2.82855L8.2073 6.62144L6.79309 5.20723Z\" fill=\"var(--instrument-regular-secondary-color)\"/>`,\n 'current-2.svg': svg`<path d=\"M10.9742 12.0003L10.9742 24.0049L12.9999 24.005L12.9999 12.0004L10.9742 12.0003Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M6.79285 5.20747L12 0.000366211L17.2071 5.20747L15.7928 6.62169L12 2.82879L8.20706 6.62169L6.79285 5.20747Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M6.99988 10.5861L12.207 5.37903L17.4141 10.5861L15.9999 12.0003L12.207 8.20745L8.41409 12.0003L6.99988 10.5861Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path d=\"M10.9742 12.0003L10.9742 24.0049L12.9999 24.005L12.9999 12.0004L10.9742 12.0003Z\" fill=\"var(--instrument-regular-secondary-color)\"/>\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M6.79285 5.20747L12 0.000366211L17.2071 5.20747L15.7928 6.62169L12 2.82879L8.20706 6.62169L6.79285 5.20747Z\" fill=\"var(--instrument-regular-secondary-color)\"/>\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M6.99988 10.5861L12.207 5.37903L17.4141 10.5861L15.9999 12.0003L12.207 8.20745L8.41409 12.0003L6.99988 10.5861Z\" fill=\"var(--instrument-regular-secondary-color)\"/>`,\n 'current-3.svg': svg`<path d=\"M11 18L11 24L13 24L13 18L11 18Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M6.79297 5.20711L12.0001 0L17.2072 5.20711L15.793 6.62132L12.0001 2.82843L8.20718 6.62132L6.79297 5.20711Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M7 10.5858L12.2071 5.37866L17.4142 10.5858L16 12L12.2071 8.20709L8.41421 12L7 10.5858Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M7 16.5858L12.2071 11.3787L17.4142 16.5858L16 18L12.2071 14.2071L8.41421 18L7 16.5858Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path d=\"M11 18L11 24L13 24L13 18L11 18Z\" fill=\"var(--instrument-regular-secondary-color)\"/>\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M6.79297 5.20711L12.0001 0L17.2072 5.20711L15.793 6.62132L12.0001 2.82843L8.20718 6.62132L6.79297 5.20711Z\" fill=\"var(--instrument-regular-secondary-color)\"/>\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M7 10.5858L12.2071 5.37866L17.4142 10.5858L16 12L12.2071 8.20709L8.41421 12L7 10.5858Z\" fill=\"var(--instrument-regular-secondary-color)\"/>\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M7 16.5858L12.2071 11.3787L17.4142 16.5858L16 18L12.2071 14.2071L8.41421 18L7 16.5858Z\" fill=\"var(--instrument-regular-secondary-color)\"/>`,\n 'current-4.svg': svg`<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M6.79297 5.20711L12.0001 0L17.2072 5.20711L15.793 6.62132L12.0001 2.82843L8.20718 6.62132L6.79297 5.20711Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M7 10.5858L12.2071 5.37866L17.4142 10.5858L16 12L12.2071 8.20709L8.41421 12L7 10.5858Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M7 16.5858L12.2071 11.3787L17.4142 16.5858L16 18L12.2071 14.2071L8.41421 18L7 16.5858Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M7 22.5858L12.2071 17.3787L17.4142 22.5858L16 24L12.2071 20.2071L8.41421 24L7 22.5858Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M6.79297 5.20711L12.0001 0L17.2072 5.20711L15.793 6.62132L12.0001 2.82843L8.20718 6.62132L6.79297 5.20711Z\" fill=\"var(--instrument-regular-secondary-color)\"/>\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M7 10.5858L12.2071 5.37866L17.4142 10.5858L16 12L12.2071 8.20709L8.41421 12L7 10.5858Z\" fill=\"var(--instrument-regular-secondary-color)\"/>\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M7 16.5858L12.2071 11.3787L17.4142 16.5858L16 18L12.2071 14.2071L8.41421 18L7 16.5858Z\" fill=\"var(--instrument-regular-secondary-color)\"/>\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M7 22.5858L12.2071 17.3787L17.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B;"}
@@ -17,6 +17,21 @@ export interface ForcePatternOptions {
17
17
  /** Pattern fill color; defaults to the regular tertiary instrument color. */
18
18
  color?: string;
19
19
  }
20
+ /** Wave tuning for the current band pattern, on top of the shared options. */
21
+ export interface CurrentForcePatternOptions extends ForcePatternOptions {
22
+ /**
23
+ * Wavelength as a multiplier on the design band spacing (1 = design,
24
+ * 0.5 = twice as dense). Non-finite or non-positive values fall back to 1.
25
+ */
26
+ waveLength?: number;
27
+ /** Wave intensity: peak opacity the band gradient fades up to (0–1). */
28
+ waveHeight?: number;
29
+ /**
30
+ * Drift speed in wavelengths per second, moving with the flow (negative
31
+ * drifts against it). 0 / undefined keeps the pattern static.
32
+ */
33
+ waveSpeed?: number;
34
+ }
20
35
  /**
21
36
  * Wind force-graphics: a repeating field of fading diagonal streaks
22
37
  * (4×24-unit dashes, transparent tail → opaque head), clipped to a circle
@@ -26,7 +41,10 @@ export declare function renderWindForcePattern(options: ForcePatternOptions): SV
26
41
  /**
27
42
  * Current force-graphics: soft-edged gradient bands (48-unit sawtooth,
28
43
  * transparent → opaque), perpendicular to the flow, clipped to a circle and
29
- * rotated by the from-direction.
44
+ * rotated by the from-direction. `waveLength` stretches the band spacing,
45
+ * `waveHeight` scales the gradient's peak opacity, and a non-zero `waveSpeed`
46
+ * drifts the field with the flow (one wavelength per `1/waveSpeed` seconds)
47
+ * via a declarative SMIL loop.
30
48
  */
31
- export declare function renderCurrentForcePattern(options: ForcePatternOptions): SVGTemplateResult;
49
+ export declare function renderCurrentForcePattern(options: CurrentForcePatternOptions): SVGTemplateResult;
32
50
  //# sourceMappingURL=force-pattern.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"force-pattern.d.ts","sourceRoot":"","sources":["../../../src/navigation-instruments/watch/force-pattern.ts"],"names":[],"mappings":"AAAA,OAAO,EAAM,iBAAiB,EAAC,MAAM,KAAK,CAAC;AAE3C;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC,sEAAsE;IACtE,gBAAgB,EAAE,MAAM,CAAC;IACzB,8DAA8D;IAC9D,MAAM,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB,6EAA6E;IAC7E,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAcD;;;;GAIG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,mBAAmB,GAC3B,iBAAiB,CAqBnB;AAED;;;;GAIG;AACH,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,mBAAmB,GAC3B,iBAAiB,CAqBnB"}
1
+ {"version":3,"file":"force-pattern.d.ts","sourceRoot":"","sources":["../../../src/navigation-instruments/watch/force-pattern.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,iBAAiB,EAAC,MAAM,KAAK,CAAC;AAEpD;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC,sEAAsE;IACtE,gBAAgB,EAAE,MAAM,CAAC;IACzB,8DAA8D;IAC9D,MAAM,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB,6EAA6E;IAC7E,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,8EAA8E;AAC9E,MAAM,WAAW,0BAA2B,SAAQ,mBAAmB;IACrE;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,wEAAwE;IACxE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAcD;;;;GAIG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,mBAAmB,GAC3B,iBAAiB,CAqBnB;AAED;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,0BAA0B,GAClC,iBAAiB,CAuCnB"}
@@ -1,4 +1,4 @@
1
- import { svg } from "lit";
1
+ import { svg, nothing } from "lit";
2
2
  const DESIGN_PATTERN_SQUARE = 256;
3
3
  const WIND_TILE = 24;
4
4
  const WIND_TILE_NATIVE_FROM_DIRECTION_DEG = 315;
@@ -30,14 +30,18 @@ function renderWindForcePattern(options) {
30
30
  function renderCurrentForcePattern(options) {
31
31
  const { fromDirectionDeg, radius, patternScale } = options;
32
32
  const color = options.color ?? DEFAULT_COLOR;
33
- const tile = CURRENT_TILE * patternScale;
33
+ const lengthScale = Number.isFinite(options.waveLength) && options.waveLength > 0 ? options.waveLength : 1;
34
+ const intensity = Number.isFinite(options.waveHeight) ? Math.max(0, Math.min(1, options.waveHeight)) : 1;
35
+ const speed = Number.isFinite(options.waveSpeed) ? options.waveSpeed : 0;
36
+ const tile = CURRENT_TILE * patternScale * lengthScale;
34
37
  const side = DESIGN_PATTERN_SQUARE * patternScale;
35
- const phase = CURRENT_TILE_PHASE_OFFSET * patternScale;
38
+ const phase = CURRENT_TILE_PHASE_OFFSET * patternScale * lengthScale;
39
+ const drift = speed !== 0 ? svg`<animateTransform attributeName="transform" attributeType="XML" type="translate" from="0 0" to="0 ${tile * Math.sign(speed)}" dur="${1 / Math.abs(speed)}s" repeatCount="indefinite"/>` : nothing;
36
40
  return svg`
37
41
  <defs>
38
42
  <linearGradient id="current-force-band-gradient" x1="24" y1="0" x2="24" y2="48" gradientUnits="userSpaceOnUse">
39
43
  <stop stop-color=${color} stop-opacity="0"/>
40
- <stop offset="1" stop-color=${color}/>
44
+ <stop offset="1" stop-color=${color} stop-opacity=${intensity}/>
41
45
  </linearGradient>
42
46
  <pattern id="current-force-pattern" patternUnits="userSpaceOnUse" x=${-side / 2 + phase} y=${-side / 2 + phase} width=${tile} height=${tile} viewBox="0 0 48 48" preserveAspectRatio="none">
43
47
  <rect width="48" height="48" fill="url(#current-force-band-gradient)"/>
@@ -45,7 +49,10 @@ function renderCurrentForcePattern(options) {
45
49
  <clipPath id="current-force-clip"><circle cx="0" cy="0" r=${radius}/></clipPath>
46
50
  </defs>
47
51
  <g clip-path="url(#current-force-clip)" transform="rotate(${fromDirectionDeg})">
48
- <rect x=${-side / 2} y=${-side / 2} width=${side} height=${side} fill="url(#current-force-pattern)"/>
52
+ <g>
53
+ ${drift}
54
+ <rect x=${-side / 2} y=${-side / 2 - tile} width=${side} height=${side + 2 * tile} fill="url(#current-force-pattern)"/>
55
+ </g>
49
56
  </g>
50
57
  `;
51
58
  }
@@ -1 +1 @@
1
- {"version":3,"file":"force-pattern.js","sources":["../../../src/navigation-instruments/watch/force-pattern.ts"],"sourcesContent":["import {svg, SVGTemplateResult} from 'lit';\n\n/**\n * Options for the force-graphics pattern underlays (wind streaks / current\n * bands). All units are watch SVG units (outer ring = 184).\n */\nexport interface ForcePatternOptions {\n /** Direction the wind/current comes from, in degrees (0° = north). */\n fromDirectionDeg: number;\n /** Radius of the clipping circle (the visualization disc). */\n radius: number;\n /**\n * Multiplier on the design-native tile. At scale 1 the pattern square is\n * 256 units (the Figma component size); the wind tile is 24 units and the\n * current tile 48 units.\n */\n patternScale: number;\n /** Pattern fill color; defaults to the regular tertiary instrument color. */\n color?: string;\n}\n\nconst DESIGN_PATTERN_SQUARE = 256;\nconst WIND_TILE = 24;\n/**\n * The Figma wind tile bakes in a −45° dash, i.e. wind from 315°; rotating by\n * `fromDirectionDeg − 315` reproduces the design exactly at 315°.\n */\nconst WIND_TILE_NATIVE_FROM_DIRECTION_DEG = 315;\nconst CURRENT_TILE = 48;\n/** Band phase offset of the Figma current tile, in 256-square units. */\nconst CURRENT_TILE_PHASE_OFFSET = 104;\nconst DEFAULT_COLOR = 'var(--instrument-regular-tertiary-color)';\n\n/**\n * Wind force-graphics: a repeating field of fading diagonal streaks\n * (4×24-unit dashes, transparent tail → opaque head), clipped to a circle\n * and rotated so the streaks flow with the wind.\n */\nexport function renderWindForcePattern(\n options: ForcePatternOptions\n): SVGTemplateResult {\n const {fromDirectionDeg, radius, patternScale} = options;\n const color = options.color ?? DEFAULT_COLOR;\n const tile = WIND_TILE * patternScale;\n const side = DESIGN_PATTERN_SQUARE * patternScale;\n const rotation = fromDirectionDeg - WIND_TILE_NATIVE_FROM_DIRECTION_DEG;\n return svg`\n <defs>\n <linearGradient id=\"wind-force-dash-gradient\" x1=\"4.09961\" y1=\"4.92896\" x2=\"4.09961\" y2=\"28.929\" gradientUnits=\"userSpaceOnUse\">\n <stop stop-color=${color} stop-opacity=\"0\"/>\n <stop offset=\"1\" stop-color=${color}/>\n </linearGradient>\n <pattern id=\"wind-force-pattern\" patternUnits=\"userSpaceOnUse\" x=${-side / 2} y=${-side / 2} width=${tile} height=${tile} viewBox=\"0 0 24 24\" preserveAspectRatio=\"none\">\n <rect x=\"2.09961\" y=\"4.92896\" width=\"4\" height=\"24\" transform=\"rotate(-45 2.09961 4.92896)\" fill=\"url(#wind-force-dash-gradient)\"/>\n </pattern>\n <clipPath id=\"wind-force-clip\"><circle cx=\"0\" cy=\"0\" r=${radius}/></clipPath>\n </defs>\n <g clip-path=\"url(#wind-force-clip)\" transform=\"rotate(${rotation})\">\n <rect x=${-side / 2} y=${-side / 2} width=${side} height=${side} fill=\"url(#wind-force-pattern)\"/>\n </g>\n `;\n}\n\n/**\n * Current force-graphics: soft-edged gradient bands (48-unit sawtooth,\n * transparent → opaque), perpendicular to the flow, clipped to a circle and\n * rotated by the from-direction.\n */\nexport function renderCurrentForcePattern(\n options: ForcePatternOptions\n): SVGTemplateResult {\n const {fromDirectionDeg, radius, patternScale} = options;\n const color = options.color ?? DEFAULT_COLOR;\n const tile = CURRENT_TILE * patternScale;\n const side = DESIGN_PATTERN_SQUARE * patternScale;\n const phase = CURRENT_TILE_PHASE_OFFSET * patternScale;\n return svg`\n <defs>\n <linearGradient id=\"current-force-band-gradient\" x1=\"24\" y1=\"0\" x2=\"24\" y2=\"48\" gradientUnits=\"userSpaceOnUse\">\n <stop stop-color=${color} stop-opacity=\"0\"/>\n <stop offset=\"1\" stop-color=${color}/>\n </linearGradient>\n <pattern id=\"current-force-pattern\" patternUnits=\"userSpaceOnUse\" x=${-side / 2 + phase} y=${-side / 2 + phase} width=${tile} height=${tile} viewBox=\"0 0 48 48\" preserveAspectRatio=\"none\">\n <rect width=\"48\" height=\"48\" fill=\"url(#current-force-band-gradient)\"/>\n </pattern>\n <clipPath id=\"current-force-clip\"><circle cx=\"0\" cy=\"0\" r=${radius}/></clipPath>\n </defs>\n <g clip-path=\"url(#current-force-clip)\" transform=\"rotate(${fromDirectionDeg})\">\n <rect x=${-side / 2} y=${-side / 2} width=${side} height=${side} fill=\"url(#current-force-pattern)\"/>\n </g>\n `;\n}\n"],"names":[],"mappings":";AAqBA,MAAM,wBAAwB;AAC9B,MAAM,YAAY;AAKlB,MAAM,sCAAsC;AAC5C,MAAM,eAAe;AAErB,MAAM,4BAA4B;AAClC,MAAM,gBAAgB;AAOf,SAAS,uBACd,SACmB;AACnB,QAAM,EAAC,kBAAkB,QAAQ,aAAA,IAAgB;AACjD,QAAM,QAAQ,QAAQ,SAAS;AAC/B,QAAM,OAAO,YAAY;AACzB,QAAM,OAAO,wBAAwB;AACrC,QAAM,WAAW,mBAAmB;AACpC,SAAO;AAAA;AAAA;AAAA,2BAGkB,KAAK;AAAA,sCACM,KAAK;AAAA;AAAA,yEAE8B,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,UAAU,IAAI,WAAW,IAAI;AAAA;AAAA;AAAA,+DAG/D,MAAM;AAAA;AAAA,6DAER,QAAQ;AAAA,gBACrD,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,UAAU,IAAI,WAAW,IAAI;AAAA;AAAA;AAGrE;AAOO,SAAS,0BACd,SACmB;AACnB,QAAM,EAAC,kBAAkB,QAAQ,aAAA,IAAgB;AACjD,QAAM,QAAQ,QAAQ,SAAS;AAC/B,QAAM,OAAO,eAAe;AAC5B,QAAM,OAAO,wBAAwB;AACrC,QAAM,QAAQ,4BAA4B;AAC1C,SAAO;AAAA;AAAA;AAAA,2BAGkB,KAAK;AAAA,sCACM,KAAK;AAAA;AAAA,4EAEiC,CAAC,OAAO,IAAI,KAAK,MAAM,CAAC,OAAO,IAAI,KAAK,UAAU,IAAI,WAAW,IAAI;AAAA;AAAA;AAAA,kEAG/E,MAAM;AAAA;AAAA,gEAER,gBAAgB;AAAA,gBAChE,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,UAAU,IAAI,WAAW,IAAI;AAAA;AAAA;AAGrE;"}
1
+ {"version":3,"file":"force-pattern.js","sources":["../../../src/navigation-instruments/watch/force-pattern.ts"],"sourcesContent":["import {nothing, svg, SVGTemplateResult} from 'lit';\n\n/**\n * Options for the force-graphics pattern underlays (wind streaks / current\n * bands). All units are watch SVG units (outer ring = 184).\n */\nexport interface ForcePatternOptions {\n /** Direction the wind/current comes from, in degrees (0° = north). */\n fromDirectionDeg: number;\n /** Radius of the clipping circle (the visualization disc). */\n radius: number;\n /**\n * Multiplier on the design-native tile. At scale 1 the pattern square is\n * 256 units (the Figma component size); the wind tile is 24 units and the\n * current tile 48 units.\n */\n patternScale: number;\n /** Pattern fill color; defaults to the regular tertiary instrument color. */\n color?: string;\n}\n\n/** Wave tuning for the current band pattern, on top of the shared options. */\nexport interface CurrentForcePatternOptions extends ForcePatternOptions {\n /**\n * Wavelength as a multiplier on the design band spacing (1 = design,\n * 0.5 = twice as dense). Non-finite or non-positive values fall back to 1.\n */\n waveLength?: number;\n /** Wave intensity: peak opacity the band gradient fades up to (0–1). */\n waveHeight?: number;\n /**\n * Drift speed in wavelengths per second, moving with the flow (negative\n * drifts against it). 0 / undefined keeps the pattern static.\n */\n waveSpeed?: number;\n}\n\nconst DESIGN_PATTERN_SQUARE = 256;\nconst WIND_TILE = 24;\n/**\n * The Figma wind tile bakes in a −45° dash, i.e. wind from 315°; rotating by\n * `fromDirectionDeg − 315` reproduces the design exactly at 315°.\n */\nconst WIND_TILE_NATIVE_FROM_DIRECTION_DEG = 315;\nconst CURRENT_TILE = 48;\n/** Band phase offset of the Figma current tile, in 256-square units. */\nconst CURRENT_TILE_PHASE_OFFSET = 104;\nconst DEFAULT_COLOR = 'var(--instrument-regular-tertiary-color)';\n\n/**\n * Wind force-graphics: a repeating field of fading diagonal streaks\n * (4×24-unit dashes, transparent tail → opaque head), clipped to a circle\n * and rotated so the streaks flow with the wind.\n */\nexport function renderWindForcePattern(\n options: ForcePatternOptions\n): SVGTemplateResult {\n const {fromDirectionDeg, radius, patternScale} = options;\n const color = options.color ?? DEFAULT_COLOR;\n const tile = WIND_TILE * patternScale;\n const side = DESIGN_PATTERN_SQUARE * patternScale;\n const rotation = fromDirectionDeg - WIND_TILE_NATIVE_FROM_DIRECTION_DEG;\n return svg`\n <defs>\n <linearGradient id=\"wind-force-dash-gradient\" x1=\"4.09961\" y1=\"4.92896\" x2=\"4.09961\" y2=\"28.929\" gradientUnits=\"userSpaceOnUse\">\n <stop stop-color=${color} stop-opacity=\"0\"/>\n <stop offset=\"1\" stop-color=${color}/>\n </linearGradient>\n <pattern id=\"wind-force-pattern\" patternUnits=\"userSpaceOnUse\" x=${-side / 2} y=${-side / 2} width=${tile} height=${tile} viewBox=\"0 0 24 24\" preserveAspectRatio=\"none\">\n <rect x=\"2.09961\" y=\"4.92896\" width=\"4\" height=\"24\" transform=\"rotate(-45 2.09961 4.92896)\" fill=\"url(#wind-force-dash-gradient)\"/>\n </pattern>\n <clipPath id=\"wind-force-clip\"><circle cx=\"0\" cy=\"0\" r=${radius}/></clipPath>\n </defs>\n <g clip-path=\"url(#wind-force-clip)\" transform=\"rotate(${rotation})\">\n <rect x=${-side / 2} y=${-side / 2} width=${side} height=${side} fill=\"url(#wind-force-pattern)\"/>\n </g>\n `;\n}\n\n/**\n * Current force-graphics: soft-edged gradient bands (48-unit sawtooth,\n * transparent → opaque), perpendicular to the flow, clipped to a circle and\n * rotated by the from-direction. `waveLength` stretches the band spacing,\n * `waveHeight` scales the gradient's peak opacity, and a non-zero `waveSpeed`\n * drifts the field with the flow (one wavelength per `1/waveSpeed` seconds)\n * via a declarative SMIL loop.\n */\nexport function renderCurrentForcePattern(\n options: CurrentForcePatternOptions\n): SVGTemplateResult {\n const {fromDirectionDeg, radius, patternScale} = options;\n const color = options.color ?? DEFAULT_COLOR;\n const lengthScale =\n Number.isFinite(options.waveLength) && options.waveLength! > 0\n ? options.waveLength!\n : 1;\n const intensity = Number.isFinite(options.waveHeight)\n ? Math.max(0, Math.min(1, options.waveHeight!))\n : 1;\n const speed = Number.isFinite(options.waveSpeed) ? options.waveSpeed! : 0;\n const tile = CURRENT_TILE * patternScale * lengthScale;\n const side = DESIGN_PATTERN_SQUARE * patternScale;\n const phase = CURRENT_TILE_PHASE_OFFSET * patternScale * lengthScale;\n // The pattern is anchored in the rect's user space, so translating the\n // wrapper group drifts the whole band field; the rect is one tile taller on\n // each end to stay covering the clip disc across the loop.\n const drift =\n speed !== 0\n ? svg`<animateTransform attributeName=\"transform\" attributeType=\"XML\" type=\"translate\" from=\"0 0\" to=\"0 ${tile * Math.sign(speed)}\" dur=\"${1 / Math.abs(speed)}s\" repeatCount=\"indefinite\"/>`\n : nothing;\n return svg`\n <defs>\n <linearGradient id=\"current-force-band-gradient\" x1=\"24\" y1=\"0\" x2=\"24\" y2=\"48\" gradientUnits=\"userSpaceOnUse\">\n <stop stop-color=${color} stop-opacity=\"0\"/>\n <stop offset=\"1\" stop-color=${color} stop-opacity=${intensity}/>\n </linearGradient>\n <pattern id=\"current-force-pattern\" patternUnits=\"userSpaceOnUse\" x=${-side / 2 + phase} y=${-side / 2 + phase} width=${tile} height=${tile} viewBox=\"0 0 48 48\" preserveAspectRatio=\"none\">\n <rect width=\"48\" height=\"48\" fill=\"url(#current-force-band-gradient)\"/>\n </pattern>\n <clipPath id=\"current-force-clip\"><circle cx=\"0\" cy=\"0\" r=${radius}/></clipPath>\n </defs>\n <g clip-path=\"url(#current-force-clip)\" transform=\"rotate(${fromDirectionDeg})\">\n <g>\n ${drift}\n <rect x=${-side / 2} y=${-side / 2 - tile} width=${side} height=${side + 2 * tile} fill=\"url(#current-force-pattern)\"/>\n </g>\n </g>\n `;\n}\n"],"names":[],"mappings":";AAqCA,MAAM,wBAAwB;AAC9B,MA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Ae;IA+FvB,OAAO,CAAC,UAAU;IAmElB,OAAO,CAAC,aAAa;IAmBrB,OAAO,CAAC,QAAQ;IAchB;;;;OAIG;IACH,OAAO,CAAC,eAAe;IAUd,MAAM;IA4Kf,OAAO,CAAC,YAAY;IA2CpB,OAAO,CAAC,SAAS;IA6DjB,OAAO,CAAC,cAAc;IA0GtB,OAAO,CAAC,iBAAiB;IAuBzB,OAAO,CAAC,4BAA4B;IAoBpC,OAAgB,MAAM,0BAA2B;CAClD;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,WAAW,EAAE,QAAQ,CAAC;KACvB;CACF"}
@@ -13,7 +13,7 @@ import { disposeRotController, RateOfTurnController } from "../rate-of-turn/rate
13
13
  import { getLabelPositions, renderLabels, renderNorthMarker, renderNorthArrow } from "./label.js";
14
14
  import { VesselImageSize, vesselImages } from "./vessel.js";
15
15
  import { VesselImage } from "./vessel.js";
16
- import { renderWind, renderCurrentCentered, renderCurrent } from "./environment.js";
16
+ import { renderWind, renderCurrentCentered, renderCurrent, WIND_ICON_TIP_TO_BOX_INNER } from "./environment.js";
17
17
  import { customElement } from "../../decorator.js";
18
18
  import { observeInnerBox, applyPinnedHostSize, measureContainerPx, NSWE_LABEL_WIDTH_PX, estimateLabelWidthPx, computeRadialFrame } from "../../svghelpers/radial-frame.js";
19
19
  var __defProp = Object.defineProperty;
@@ -53,6 +53,8 @@ function innerRingRadiusFor(type) {
53
53
  }
54
54
  }
55
55
  const RADIAL_SETPOINT_INWARD_ADJUST = 4;
56
+ const CURRENT_ICON_OUTSIDE_RADIUS = OUTER_RING_RADIUS + 4;
57
+ const WIND_ICON_OUTSIDE_RADIUS = CURRENT_ICON_OUTSIDE_RADIUS + WIND_ICON_TIP_TO_BOX_INNER;
56
58
  let ObcWatch = class extends LitElement {
57
59
  constructor() {
58
60
  super(...arguments);
@@ -605,7 +607,7 @@ let ObcWatch = class extends LitElement {
605
607
  );
606
608
  const advices = this.advices ? this.advices.map((a) => renderAdvice(a, rOff)) : nothing;
607
609
  const showNsweLabels = this.showLabels && !this._labelsHidden;
608
- const showNorthArrow = this.northArrow && !this._labelsHidden;
610
+ const showNorthArrow = this.northArrow;
609
611
  const insideLabels = this.tickmarksInside && showNsweLabels;
610
612
  const includeNorth = !this.northArrow;
611
613
  const labelPositions = showNsweLabels ? getLabelPositions({
@@ -631,7 +633,7 @@ let ObcWatch = class extends LitElement {
631
633
  const wind = this.windKnots != null && this.windFromDirectionDeg != null ? svg`<g transform="scale(${this.scaleWindIcon})">${renderWind({
632
634
  windKnots: this.windKnots,
633
635
  fromDirectionDeg: this.windFromDirectionDeg,
634
- radius: this.windSymbolRadius ?? 192,
636
+ radius: this.windSymbolRadius ?? WIND_ICON_OUTSIDE_RADIUS,
635
637
  color: this.windColor
636
638
  })}</g>` : nothing;
637
639
  const current = this.current != null && this.currentFromDirectionDeg != null ? this.currentIconCentered ? renderCurrentCentered({
@@ -642,7 +644,7 @@ let ObcWatch = class extends LitElement {
642
644
  }) : renderCurrent({
643
645
  current: this.current,
644
646
  fromDirectionDeg: this.currentFromDirectionDeg,
645
- radius: this.currentSymbolRadius ?? 192,
647
+ radius: this.currentSymbolRadius ?? CURRENT_ICON_OUTSIDE_RADIUS,
646
648
  color: this.currentColor
647
649
  }) : nothing;
648
650
  return html`