@elaraai/east-ui-components 1.0.11 → 1.0.13

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/index.js CHANGED
@@ -2994,6 +2994,9 @@ const schematicSlotRecipe = defineSlotRecipe({
2994
2994
  "underlay",
2995
2995
  "zone",
2996
2996
  "zoneLabel",
2997
+ "zoneShapes",
2998
+ "zoneShapeLabel",
2999
+ "footprints",
2997
3000
  "item",
2998
3001
  "itemHead",
2999
3002
  "itemIcon",
@@ -3123,6 +3126,91 @@ const schematicSlotRecipe = defineSlotRecipe({
3123
3126
  paddingX: "{spacing.1}",
3124
3127
  whiteSpace: "nowrap"
3125
3128
  },
3129
+ /* Shaped zones (polyline / polygon) stroke in SVG so curves and
3130
+ * diagonals aren't confined to a div bounding box. Tone → token
3131
+ * mapping mirrors `underlay`; data only ever names a tone. These
3132
+ * are annotations like the rect zones — no pointer events. */
3133
+ zoneShapes: {
3134
+ position: "absolute",
3135
+ inset: "0",
3136
+ pointerEvents: "none",
3137
+ overflow: "visible",
3138
+ "& g[data-tone=brand]": { "--schematic-tone": "{colors.brand.600}" },
3139
+ "& g[data-tone=ink]": { "--schematic-tone": "{colors.fg}" },
3140
+ "& g[data-tone=muted]": { "--schematic-tone": "{colors.border.strong}" },
3141
+ "& g[data-tone=success]": { "--schematic-tone": "{colors.status.ok}" },
3142
+ "& g[data-tone=warning]": { "--schematic-tone": "{colors.status.warn}" },
3143
+ "& g[data-tone=danger]": { "--schematic-tone": "{colors.status.bad}" },
3144
+ "& path": {
3145
+ stroke: "var(--schematic-tone)",
3146
+ fill: "none",
3147
+ strokeLinejoin: "round"
3148
+ },
3149
+ /* Polygon outline echoes the dashed outline-rect zone. */
3150
+ "& path[data-shape=polygon]": {
3151
+ strokeWidth: "1px",
3152
+ strokeDasharray: "4 3"
3153
+ },
3154
+ /* Polyline is a run / road: a thin centre-line, or a soft band
3155
+ * when a world-space width is set inline. */
3156
+ "& path[data-shape=polyline]": {
3157
+ strokeWidth: "1.5px",
3158
+ strokeLinecap: "round",
3159
+ opacity: "0.55"
3160
+ }
3161
+ },
3162
+ /* Standalone eyebrow for a shaped zone — same look as `zoneLabel`
3163
+ * but positioned at the bbox top-left via inline coords. */
3164
+ zoneShapeLabel: {
3165
+ position: "absolute",
3166
+ transform: "translateY(-50%)",
3167
+ marginLeft: "{spacing.2}",
3168
+ fontFamily: "mono",
3169
+ fontSize: "9px",
3170
+ fontWeight: "600",
3171
+ letterSpacing: "0.14em",
3172
+ lineHeight: "normal",
3173
+ textTransform: "uppercase",
3174
+ color: "fg.muted",
3175
+ background: "bg.panel",
3176
+ paddingX: "{spacing.1}",
3177
+ whiteSpace: "nowrap",
3178
+ pointerEvents: "none"
3179
+ },
3180
+ /* Item footprints — the true shape body at close zoom (semantic
3181
+ * zoom). The path is clickable (selects the item); the card still
3182
+ * renders at the anchor, so no item info is lost. */
3183
+ footprints: {
3184
+ position: "absolute",
3185
+ inset: "0",
3186
+ pointerEvents: "none",
3187
+ overflow: "visible",
3188
+ "& g[data-tone=success]": { "--schematic-tone": "{colors.status.ok}" },
3189
+ "& g[data-tone=warning]": { "--schematic-tone": "{colors.status.warn}" },
3190
+ "& g[data-tone=danger]": { "--schematic-tone": "{colors.status.bad}" },
3191
+ "& g[data-tone=info]": { "--schematic-tone": "{colors.brand.500}" },
3192
+ "& g[data-tone=neutral]": { "--schematic-tone": "{colors.fg.muted}" },
3193
+ "& path": {
3194
+ stroke: "var(--schematic-tone)",
3195
+ strokeWidth: "1.5px",
3196
+ strokeLinejoin: "round",
3197
+ fill: "color-mix(in oklch, var(--schematic-tone) 12%, transparent)",
3198
+ cursor: "pointer",
3199
+ pointerEvents: "visiblePainted",
3200
+ transition: "fill {durations.fast}"
3201
+ },
3202
+ "& path[data-shape=polyline]": {
3203
+ fill: "none",
3204
+ strokeLinecap: "round"
3205
+ },
3206
+ "& g:hover path": {
3207
+ fill: "color-mix(in oklch, var(--schematic-tone) 20%, transparent)"
3208
+ },
3209
+ "& g[data-selected] path": {
3210
+ strokeWidth: "2.5px",
3211
+ fill: "color-mix(in oklch, var(--schematic-tone) 24%, transparent)"
3212
+ }
3213
+ },
3126
3214
  /* LOD tiers — constant screen-size markers over scaled geometry.
3127
3215
  * Items are the content layer: the darkest marks on the canvas at
3128
3216
  * every tier. */
@@ -9422,7 +9510,7 @@ function transformForCss(_ref2) {
9422
9510
  return val;
9423
9511
  }
9424
9512
  var baseStyles = ":root, :host {\n --fa-font-solid: normal 900 1em/1 'Font Awesome 7 Free';\n --fa-font-regular: normal 400 1em/1 'Font Awesome 7 Free';\n --fa-font-light: normal 300 1em/1 'Font Awesome 7 Pro';\n --fa-font-thin: normal 100 1em/1 'Font Awesome 7 Pro';\n --fa-font-duotone: normal 900 1em/1 'Font Awesome 7 Duotone';\n --fa-font-duotone-regular: normal 400 1em/1 'Font Awesome 7 Duotone';\n --fa-font-duotone-light: normal 300 1em/1 'Font Awesome 7 Duotone';\n --fa-font-duotone-thin: normal 100 1em/1 'Font Awesome 7 Duotone';\n --fa-font-brands: normal 400 1em/1 'Font Awesome 7 Brands';\n --fa-font-sharp-solid: normal 900 1em/1 'Font Awesome 7 Sharp';\n --fa-font-sharp-regular: normal 400 1em/1 'Font Awesome 7 Sharp';\n --fa-font-sharp-light: normal 300 1em/1 'Font Awesome 7 Sharp';\n --fa-font-sharp-thin: normal 100 1em/1 'Font Awesome 7 Sharp';\n --fa-font-sharp-duotone-solid: normal 900 1em/1 'Font Awesome 7 Sharp Duotone';\n --fa-font-sharp-duotone-regular: normal 400 1em/1 'Font Awesome 7 Sharp Duotone';\n --fa-font-sharp-duotone-light: normal 300 1em/1 'Font Awesome 7 Sharp Duotone';\n --fa-font-sharp-duotone-thin: normal 100 1em/1 'Font Awesome 7 Sharp Duotone';\n --fa-font-slab-regular: normal 400 1em/1 'Font Awesome 7 Slab';\n --fa-font-slab-press-regular: normal 400 1em/1 'Font Awesome 7 Slab Press';\n --fa-font-whiteboard-semibold: normal 600 1em/1 'Font Awesome 7 Whiteboard';\n --fa-font-thumbprint-light: normal 300 1em/1 'Font Awesome 7 Thumbprint';\n --fa-font-notdog-solid: normal 900 1em/1 'Font Awesome 7 Notdog';\n --fa-font-notdog-duo-solid: normal 900 1em/1 'Font Awesome 7 Notdog Duo';\n --fa-font-etch-solid: normal 900 1em/1 'Font Awesome 7 Etch';\n --fa-font-graphite-thin: normal 100 1em/1 'Font Awesome 7 Graphite';\n --fa-font-jelly-regular: normal 400 1em/1 'Font Awesome 7 Jelly';\n --fa-font-jelly-fill-regular: normal 400 1em/1 'Font Awesome 7 Jelly Fill';\n --fa-font-jelly-duo-regular: normal 400 1em/1 'Font Awesome 7 Jelly Duo';\n --fa-font-chisel-regular: normal 400 1em/1 'Font Awesome 7 Chisel';\n --fa-font-utility-semibold: normal 600 1em/1 'Font Awesome 7 Utility';\n --fa-font-utility-duo-semibold: normal 600 1em/1 'Font Awesome 7 Utility Duo';\n --fa-font-utility-fill-semibold: normal 600 1em/1 'Font Awesome 7 Utility Fill';\n}\n\n.svg-inline--fa {\n box-sizing: content-box;\n display: var(--fa-display, inline-block);\n height: 1em;\n overflow: visible;\n vertical-align: -0.125em;\n width: var(--fa-width, 1.25em);\n}\n.svg-inline--fa.fa-2xs {\n vertical-align: 0.1em;\n}\n.svg-inline--fa.fa-xs {\n vertical-align: 0em;\n}\n.svg-inline--fa.fa-sm {\n vertical-align: -0.0714285714em;\n}\n.svg-inline--fa.fa-lg {\n vertical-align: -0.2em;\n}\n.svg-inline--fa.fa-xl {\n vertical-align: -0.25em;\n}\n.svg-inline--fa.fa-2xl {\n vertical-align: -0.3125em;\n}\n.svg-inline--fa.fa-pull-left,\n.svg-inline--fa .fa-pull-start {\n float: inline-start;\n margin-inline-end: var(--fa-pull-margin, 0.3em);\n}\n.svg-inline--fa.fa-pull-right,\n.svg-inline--fa .fa-pull-end {\n float: inline-end;\n margin-inline-start: var(--fa-pull-margin, 0.3em);\n}\n.svg-inline--fa.fa-li {\n width: var(--fa-li-width, 2em);\n inset-inline-start: calc(-1 * var(--fa-li-width, 2em));\n inset-block-start: 0.25em; /* syncing vertical alignment with Web Font rendering */\n}\n\n.fa-layers-counter, .fa-layers-text {\n display: inline-block;\n position: absolute;\n text-align: center;\n}\n\n.fa-layers {\n display: inline-block;\n height: 1em;\n position: relative;\n text-align: center;\n vertical-align: -0.125em;\n width: var(--fa-width, 1.25em);\n}\n.fa-layers .svg-inline--fa {\n inset: 0;\n margin: auto;\n position: absolute;\n transform-origin: center center;\n}\n\n.fa-layers-text {\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n transform-origin: center center;\n}\n\n.fa-layers-counter {\n background-color: var(--fa-counter-background-color, #ff253a);\n border-radius: var(--fa-counter-border-radius, 1em);\n box-sizing: border-box;\n color: var(--fa-inverse, #fff);\n line-height: var(--fa-counter-line-height, 1);\n max-width: var(--fa-counter-max-width, 5em);\n min-width: var(--fa-counter-min-width, 1.5em);\n overflow: hidden;\n padding: var(--fa-counter-padding, 0.25em 0.5em);\n right: var(--fa-right, 0);\n text-overflow: ellipsis;\n top: var(--fa-top, 0);\n transform: scale(var(--fa-counter-scale, 0.25));\n transform-origin: top right;\n}\n\n.fa-layers-bottom-right {\n bottom: var(--fa-bottom, 0);\n right: var(--fa-right, 0);\n top: auto;\n transform: scale(var(--fa-layers-scale, 0.25));\n transform-origin: bottom right;\n}\n\n.fa-layers-bottom-left {\n bottom: var(--fa-bottom, 0);\n left: var(--fa-left, 0);\n right: auto;\n top: auto;\n transform: scale(var(--fa-layers-scale, 0.25));\n transform-origin: bottom left;\n}\n\n.fa-layers-top-right {\n top: var(--fa-top, 0);\n right: var(--fa-right, 0);\n transform: scale(var(--fa-layers-scale, 0.25));\n transform-origin: top right;\n}\n\n.fa-layers-top-left {\n left: var(--fa-left, 0);\n right: auto;\n top: var(--fa-top, 0);\n transform: scale(var(--fa-layers-scale, 0.25));\n transform-origin: top left;\n}\n\n.fa-1x {\n font-size: 1em;\n}\n\n.fa-2x {\n font-size: 2em;\n}\n\n.fa-3x {\n font-size: 3em;\n}\n\n.fa-4x {\n font-size: 4em;\n}\n\n.fa-5x {\n font-size: 5em;\n}\n\n.fa-6x {\n font-size: 6em;\n}\n\n.fa-7x {\n font-size: 7em;\n}\n\n.fa-8x {\n font-size: 8em;\n}\n\n.fa-9x {\n font-size: 9em;\n}\n\n.fa-10x {\n font-size: 10em;\n}\n\n.fa-2xs {\n font-size: calc(10 / 16 * 1em); /* converts a 10px size into an em-based value that's relative to the scale's 16px base */\n line-height: calc(1 / 10 * 1em); /* sets the line-height of the icon back to that of it's parent */\n vertical-align: calc((6 / 10 - 0.375) * 1em); /* vertically centers the icon taking into account the surrounding text's descender */\n}\n\n.fa-xs {\n font-size: calc(12 / 16 * 1em); /* converts a 12px size into an em-based value that's relative to the scale's 16px base */\n line-height: calc(1 / 12 * 1em); /* sets the line-height of the icon back to that of it's parent */\n vertical-align: calc((6 / 12 - 0.375) * 1em); /* vertically centers the icon taking into account the surrounding text's descender */\n}\n\n.fa-sm {\n font-size: calc(14 / 16 * 1em); /* converts a 14px size into an em-based value that's relative to the scale's 16px base */\n line-height: calc(1 / 14 * 1em); /* sets the line-height of the icon back to that of it's parent */\n vertical-align: calc((6 / 14 - 0.375) * 1em); /* vertically centers the icon taking into account the surrounding text's descender */\n}\n\n.fa-lg {\n font-size: calc(20 / 16 * 1em); /* converts a 20px size into an em-based value that's relative to the scale's 16px base */\n line-height: calc(1 / 20 * 1em); /* sets the line-height of the icon back to that of it's parent */\n vertical-align: calc((6 / 20 - 0.375) * 1em); /* vertically centers the icon taking into account the surrounding text's descender */\n}\n\n.fa-xl {\n font-size: calc(24 / 16 * 1em); /* converts a 24px size into an em-based value that's relative to the scale's 16px base */\n line-height: calc(1 / 24 * 1em); /* sets the line-height of the icon back to that of it's parent */\n vertical-align: calc((6 / 24 - 0.375) * 1em); /* vertically centers the icon taking into account the surrounding text's descender */\n}\n\n.fa-2xl {\n font-size: calc(32 / 16 * 1em); /* converts a 32px size into an em-based value that's relative to the scale's 16px base */\n line-height: calc(1 / 32 * 1em); /* sets the line-height of the icon back to that of it's parent */\n vertical-align: calc((6 / 32 - 0.375) * 1em); /* vertically centers the icon taking into account the surrounding text's descender */\n}\n\n.fa-width-auto {\n --fa-width: auto;\n}\n\n.fa-fw,\n.fa-width-fixed {\n --fa-width: 1.25em;\n}\n\n.fa-ul {\n list-style-type: none;\n margin-inline-start: var(--fa-li-margin, 2.5em);\n padding-inline-start: 0;\n}\n.fa-ul > li {\n position: relative;\n}\n\n.fa-li {\n inset-inline-start: calc(-1 * var(--fa-li-width, 2em));\n position: absolute;\n text-align: center;\n width: var(--fa-li-width, 2em);\n line-height: inherit;\n}\n\n/* Heads Up: Bordered Icons will not be supported in the future!\n - This feature will be deprecated in the next major release of Font Awesome (v8)!\n - You may continue to use it in this version *v7), but it will not be supported in Font Awesome v8.\n*/\n/* Notes:\n* --@{v.$css-prefix}-border-width = 1/16 by default (to render as ~1px based on a 16px default font-size)\n* --@{v.$css-prefix}-border-padding =\n ** 3/16 for vertical padding (to give ~2px of vertical whitespace around an icon considering it's vertical alignment)\n ** 4/16 for horizontal padding (to give ~4px of horizontal whitespace around an icon)\n*/\n.fa-border {\n border-color: var(--fa-border-color, #eee);\n border-radius: var(--fa-border-radius, 0.1em);\n border-style: var(--fa-border-style, solid);\n border-width: var(--fa-border-width, 0.0625em);\n box-sizing: var(--fa-border-box-sizing, content-box);\n padding: var(--fa-border-padding, 0.1875em 0.25em);\n}\n\n.fa-pull-left,\n.fa-pull-start {\n float: inline-start;\n margin-inline-end: var(--fa-pull-margin, 0.3em);\n}\n\n.fa-pull-right,\n.fa-pull-end {\n float: inline-end;\n margin-inline-start: var(--fa-pull-margin, 0.3em);\n}\n\n.fa-beat {\n animation-name: fa-beat;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, ease-in-out);\n}\n\n.fa-bounce {\n animation-name: fa-bounce;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1));\n}\n\n.fa-fade {\n animation-name: fa-fade;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\n}\n\n.fa-beat-fade {\n animation-name: fa-beat-fade;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\n}\n\n.fa-flip {\n animation-name: fa-flip;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, ease-in-out);\n}\n\n.fa-shake {\n animation-name: fa-shake;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, linear);\n}\n\n.fa-spin {\n animation-name: fa-spin;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 2s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, linear);\n}\n\n.fa-spin-reverse {\n --fa-animation-direction: reverse;\n}\n\n.fa-pulse,\n.fa-spin-pulse {\n animation-name: fa-spin;\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, steps(8));\n}\n\n@media (prefers-reduced-motion: reduce) {\n .fa-beat,\n .fa-bounce,\n .fa-fade,\n .fa-beat-fade,\n .fa-flip,\n .fa-pulse,\n .fa-shake,\n .fa-spin,\n .fa-spin-pulse {\n animation: none !important;\n transition: none !important;\n }\n}\n@keyframes fa-beat {\n 0%, 90% {\n transform: scale(1);\n }\n 45% {\n transform: scale(var(--fa-beat-scale, 1.25));\n }\n}\n@keyframes fa-bounce {\n 0% {\n transform: scale(1, 1) translateY(0);\n }\n 10% {\n transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);\n }\n 30% {\n transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));\n }\n 50% {\n transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);\n }\n 57% {\n transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));\n }\n 64% {\n transform: scale(1, 1) translateY(0);\n }\n 100% {\n transform: scale(1, 1) translateY(0);\n }\n}\n@keyframes fa-fade {\n 50% {\n opacity: var(--fa-fade-opacity, 0.4);\n }\n}\n@keyframes fa-beat-fade {\n 0%, 100% {\n opacity: var(--fa-beat-fade-opacity, 0.4);\n transform: scale(1);\n }\n 50% {\n opacity: 1;\n transform: scale(var(--fa-beat-fade-scale, 1.125));\n }\n}\n@keyframes fa-flip {\n 50% {\n transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));\n }\n}\n@keyframes fa-shake {\n 0% {\n transform: rotate(-15deg);\n }\n 4% {\n transform: rotate(15deg);\n }\n 8%, 24% {\n transform: rotate(-18deg);\n }\n 12%, 28% {\n transform: rotate(18deg);\n }\n 16% {\n transform: rotate(-22deg);\n }\n 20% {\n transform: rotate(22deg);\n }\n 32% {\n transform: rotate(-12deg);\n }\n 36% {\n transform: rotate(12deg);\n }\n 40%, 100% {\n transform: rotate(0deg);\n }\n}\n@keyframes fa-spin {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n.fa-rotate-90 {\n transform: rotate(90deg);\n}\n\n.fa-rotate-180 {\n transform: rotate(180deg);\n}\n\n.fa-rotate-270 {\n transform: rotate(270deg);\n}\n\n.fa-flip-horizontal {\n transform: scale(-1, 1);\n}\n\n.fa-flip-vertical {\n transform: scale(1, -1);\n}\n\n.fa-flip-both,\n.fa-flip-horizontal.fa-flip-vertical {\n transform: scale(-1, -1);\n}\n\n.fa-rotate-by {\n transform: rotate(var(--fa-rotate-angle, 0));\n}\n\n.svg-inline--fa .fa-primary {\n fill: var(--fa-primary-color, currentColor);\n opacity: var(--fa-primary-opacity, 1);\n}\n\n.svg-inline--fa .fa-secondary {\n fill: var(--fa-secondary-color, currentColor);\n opacity: var(--fa-secondary-opacity, 0.4);\n}\n\n.svg-inline--fa.fa-swap-opacity .fa-primary {\n opacity: var(--fa-secondary-opacity, 0.4);\n}\n\n.svg-inline--fa.fa-swap-opacity .fa-secondary {\n opacity: var(--fa-primary-opacity, 1);\n}\n\n.svg-inline--fa mask .fa-primary,\n.svg-inline--fa mask .fa-secondary {\n fill: black;\n}\n\n.svg-inline--fa.fa-inverse {\n fill: var(--fa-inverse, #fff);\n}\n\n.fa-stack {\n display: inline-block;\n height: 2em;\n line-height: 2em;\n position: relative;\n vertical-align: middle;\n width: 2.5em;\n}\n\n.fa-inverse {\n color: var(--fa-inverse, #fff);\n}\n\n.svg-inline--fa.fa-stack-1x {\n --fa-width: 1.25em;\n height: 1em;\n width: var(--fa-width);\n}\n.svg-inline--fa.fa-stack-2x {\n --fa-width: 2.5em;\n height: 2em;\n width: var(--fa-width);\n}\n\n.fa-stack-1x,\n.fa-stack-2x {\n inset: 0;\n margin: auto;\n position: absolute;\n z-index: var(--fa-stack-z-index, auto);\n}";
9425
- function css() {
9513
+ function css$1() {
9426
9514
  var dcp = DEFAULT_CSS_PREFIX;
9427
9515
  var drc = DEFAULT_REPLACEMENT_CLASS;
9428
9516
  var fp = config.cssPrefix;
@@ -9439,7 +9527,7 @@ function css() {
9439
9527
  var _cssInserted = false;
9440
9528
  function ensureCss() {
9441
9529
  if (config.autoAddCss && !_cssInserted) {
9442
- insertCss(css());
9530
+ insertCss(css$1());
9443
9531
  _cssInserted = true;
9444
9532
  }
9445
9533
  }
@@ -9447,7 +9535,7 @@ var InjectCSS = {
9447
9535
  mixout: function mixout() {
9448
9536
  return {
9449
9537
  dom: {
9450
- css,
9538
+ css: css$1,
9451
9539
  insertCss: ensureCss
9452
9540
  }
9453
9541
  };
@@ -61515,23 +61603,46 @@ function multiSelect(arr, left, right, n2, compare) {
61515
61603
  stack.push(left, mid, mid, right);
61516
61604
  }
61517
61605
  }
61518
- library$1.add(icons$2);
61519
- const schematicEqual = equalFor(Schematic.Types.Schematic);
61520
- const IDENTITY = { zoom: 1, tx: 0, ty: 0 };
61521
- const MAX_ZOOM = 40;
61522
- const LOD_CARD_PPU = 30;
61523
- const LOD_LABEL_PPU = 16;
61524
- const MINIMAP_AUTO = 25;
61525
- function statusTone(status) {
61606
+ const css = (c2, a2 = 1) => a2 >= 1 ? `rgb(${c2[0]},${c2[1]},${c2[2]})` : `rgba(${c2[0]},${c2[1]},${c2[2]},${a2})`;
61607
+ function toneRGB(p2, tone, kind) {
61608
+ switch (tone) {
61609
+ case "brand":
61610
+ return p2.brand600;
61611
+ case "ink":
61612
+ return p2.fg;
61613
+ case "muted":
61614
+ return kind === "zone" ? p2.borderStrong : p2.fgMuted;
61615
+ case "success":
61616
+ return p2.statusOk;
61617
+ case "warning":
61618
+ return p2.statusWarn;
61619
+ case "danger":
61620
+ return p2.statusBad;
61621
+ default:
61622
+ return p2.fgMuted;
61623
+ }
61624
+ }
61625
+ function statusRGB(p2, status) {
61626
+ switch (status) {
61627
+ case "success":
61628
+ return p2.statusOk;
61629
+ case "warning":
61630
+ return p2.statusWarn;
61631
+ case "danger":
61632
+ return p2.statusBad;
61633
+ case "info":
61634
+ return p2.brand500;
61635
+ default:
61636
+ return p2.fgMuted;
61637
+ }
61638
+ }
61639
+ function statusTone$1(status) {
61526
61640
  return status.type === "some" ? status.value.type : void 0;
61527
61641
  }
61528
- function niceScaleLength(ppu, targetPx) {
61529
- const target = targetPx / ppu;
61530
- const pow2 = Math.pow(10, Math.floor(Math.log10(target)));
61531
- for (const m2 of [5, 2, 1]) {
61532
- if (m2 * pow2 <= target) return m2 * pow2;
61533
- }
61534
- return pow2;
61642
+ function resolveTint(p2, color2, tone, fallback) {
61643
+ if (color2 !== void 0) return color2;
61644
+ if (tone !== void 0) return css(toneRGB(p2, tone, "link"));
61645
+ return css(fallback);
61535
61646
  }
61536
61647
  function orthogonalize(points) {
61537
61648
  const out = [];
@@ -61544,26 +61655,354 @@ function orthogonalize(points) {
61544
61655
  }
61545
61656
  return out;
61546
61657
  }
61547
- function roundedPath(pts, radius) {
61548
- if (pts.length === 0) return "";
61549
- let d2 = `M ${pts[0].x} ${pts[0].y}`;
61658
+ function traceRounded(ctx, pts, radius) {
61659
+ if (pts.length === 0) return;
61660
+ ctx.moveTo(pts[0].x, pts[0].y);
61550
61661
  for (let i2 = 1; i2 < pts.length - 1; i2++) {
61551
61662
  const p2 = pts[i2], a2 = pts[i2 - 1], b2 = pts[i2 + 1];
61552
61663
  const inLen = Math.hypot(p2.x - a2.x, p2.y - a2.y);
61553
61664
  const outLen = Math.hypot(b2.x - p2.x, b2.y - p2.y);
61554
61665
  const r2 = Math.min(radius, inLen / 2, outLen / 2);
61555
61666
  if (r2 < 0.5) {
61556
- d2 += ` L ${p2.x} ${p2.y}`;
61667
+ ctx.lineTo(p2.x, p2.y);
61557
61668
  continue;
61558
61669
  }
61559
61670
  const inU = { x: (p2.x - a2.x) / inLen, y: (p2.y - a2.y) / inLen };
61560
- const outU = { x: (b2.x - p2.x) / outLen, y: (b2.y - p2.y) / outLen };
61561
- d2 += ` L ${p2.x - inU.x * r2} ${p2.y - inU.y * r2}`;
61562
- d2 += ` Q ${p2.x} ${p2.y} ${p2.x + outU.x * r2} ${p2.y + outU.y * r2}`;
61671
+ ctx.lineTo(p2.x - inU.x * r2, p2.y - inU.y * r2);
61672
+ ctx.quadraticCurveTo(p2.x, p2.y, p2.x + (b2.x - p2.x) / outLen * r2, p2.y + (b2.y - p2.y) / outLen * r2);
61563
61673
  }
61564
61674
  const last = pts[pts.length - 1];
61565
- if (pts.length > 1) d2 += ` L ${last.x} ${last.y}`;
61566
- return d2;
61675
+ if (pts.length > 1) ctx.lineTo(last.x, last.y);
61676
+ }
61677
+ function arcFromBulge(p1, p2, bulge) {
61678
+ const dx = p2.x - p1.x, dy = p2.y - p1.y;
61679
+ const chord = Math.hypot(dx, dy);
61680
+ if (Math.abs(bulge) < 1e-4 || chord < 1e-9) return null;
61681
+ const theta = 4 * Math.atan(bulge);
61682
+ const radius = Math.abs(chord / (2 * Math.sin(theta / 2)));
61683
+ const mx = (p1.x + p2.x) / 2, my = (p1.y + p2.y) / 2;
61684
+ const d2 = chord / 2 / Math.tan(theta / 2);
61685
+ const cx2 = mx - dy / chord * d2, cy = my + dx / chord * d2;
61686
+ return {
61687
+ cx: cx2,
61688
+ cy,
61689
+ radius,
61690
+ startAngle: Math.atan2(p1.y - cy, p1.x - cx2),
61691
+ endAngle: Math.atan2(p2.y - cy, p2.x - cx2),
61692
+ anticlockwise: theta < 0
61693
+ };
61694
+ }
61695
+ function traceBulge(ctx, p1, p2, bulge) {
61696
+ const arc = arcFromBulge(p1, p2, bulge);
61697
+ if (arc === null) {
61698
+ ctx.lineTo(p2.x, p2.y);
61699
+ return;
61700
+ }
61701
+ ctx.arc(arc.cx, arc.cy, arc.radius, arc.startAngle, arc.endAngle, arc.anticlockwise);
61702
+ }
61703
+ function traceVertices(ctx, pts, closed) {
61704
+ if (pts.length === 0) return;
61705
+ ctx.moveTo(pts[0].x, pts[0].y);
61706
+ for (let i2 = 1; i2 < pts.length; i2++) traceBulge(ctx, pts[i2 - 1], pts[i2], pts[i2 - 1].bulge);
61707
+ if (closed) {
61708
+ const last = pts[pts.length - 1];
61709
+ traceBulge(ctx, last, pts[0], last.bulge);
61710
+ ctx.closePath();
61711
+ }
61712
+ }
61713
+ function paintSchematic(input) {
61714
+ var _a2, _b, _c, _d;
61715
+ const { ctx, value, cam, width, height, visibleItems, tiers, selected, centers, palette: p2 } = input;
61716
+ const wx = (x2) => x2 * cam.ppu + cam.tx;
61717
+ const wy = (y2) => y2 * cam.ppu + cam.ty;
61718
+ const ppu = cam.ppu;
61719
+ ctx.clearRect(0, 0, width, height);
61720
+ ctx.lineJoin = "round";
61721
+ for (const zone of value.zones) {
61722
+ const pattern = zone.pattern;
61723
+ const patternTone = (pattern.value.tone.type === "some" ? pattern.value.tone.value.type : void 0) ?? "muted";
61724
+ const tint = resolveTint(p2, getSomeorUndefined(zone.color), (_a2 = getSomeorUndefined(zone.tone)) == null ? void 0 : _a2.type, toneRGB(p2, patternTone, "zone"));
61725
+ const zbg = getSomeorUndefined(zone.bg);
61726
+ const zFillAlpha = getSomeorUndefined(zone.fillOpacity) ?? 0.15;
61727
+ const zWeight = getSomeorUndefined(zone.weight);
61728
+ const geom = getSomeorUndefined(zone.geometry);
61729
+ const x2 = wx(zone.x), y2 = wy(zone.y), w2 = zone.width * ppu, h2 = zone.height * ppu;
61730
+ const fillShape = () => {
61731
+ if (zbg === void 0) return;
61732
+ ctx.save();
61733
+ ctx.globalAlpha = zFillAlpha;
61734
+ ctx.fillStyle = zbg;
61735
+ ctx.fill();
61736
+ ctx.restore();
61737
+ };
61738
+ if (geom !== void 0 && geom.type !== "rect") {
61739
+ if (geom.type === "circle") {
61740
+ ctx.beginPath();
61741
+ ctx.arc(x2 + w2 / 2, y2 + h2 / 2, geom.value.radius * ppu, 0, Math.PI * 2);
61742
+ fillShape();
61743
+ ctx.setLineDash([4, 3]);
61744
+ ctx.lineWidth = zWeight ?? 1;
61745
+ ctx.strokeStyle = tint;
61746
+ ctx.stroke();
61747
+ ctx.setLineDash([]);
61748
+ } else {
61749
+ const pts = geom.value.vertices.map((q) => ({ x: wx(q.x), y: wy(q.y), bulge: q.bulge }));
61750
+ if (pts.length > 0) {
61751
+ ctx.beginPath();
61752
+ if (geom.type === "polygon") {
61753
+ traceVertices(ctx, pts, true);
61754
+ fillShape();
61755
+ ctx.setLineDash([4, 3]);
61756
+ ctx.lineWidth = zWeight ?? 1;
61757
+ ctx.strokeStyle = tint;
61758
+ ctx.stroke();
61759
+ ctx.setLineDash([]);
61760
+ } else {
61761
+ traceVertices(ctx, pts, false);
61762
+ const band2 = geom.value.width.type === "some" ? geom.value.width.value * ppu : void 0;
61763
+ ctx.setLineDash([]);
61764
+ ctx.lineCap = "round";
61765
+ ctx.lineWidth = zWeight ?? band2 ?? 1.5;
61766
+ ctx.save();
61767
+ ctx.globalAlpha = 0.55;
61768
+ ctx.strokeStyle = tint;
61769
+ ctx.stroke();
61770
+ ctx.restore();
61771
+ ctx.lineCap = "butt";
61772
+ }
61773
+ }
61774
+ }
61775
+ } else if (pattern.type === "hatch") {
61776
+ const spacing = pattern.value.spacing.type === "some" ? pattern.value.spacing.value : 8;
61777
+ const angle = (pattern.value.angle.type === "some" ? pattern.value.angle.value : 45) * Math.PI / 180;
61778
+ ctx.save();
61779
+ ctx.beginPath();
61780
+ ctx.rect(x2, y2, w2, h2);
61781
+ ctx.clip();
61782
+ if (zbg !== void 0) {
61783
+ ctx.save();
61784
+ ctx.globalAlpha = zFillAlpha;
61785
+ ctx.fillStyle = zbg;
61786
+ ctx.fillRect(x2, y2, w2, h2);
61787
+ ctx.restore();
61788
+ }
61789
+ ctx.globalAlpha = 0.3;
61790
+ ctx.strokeStyle = tint;
61791
+ ctx.lineWidth = zWeight ?? 1;
61792
+ const dx = Math.cos(angle), dy = Math.sin(angle);
61793
+ const diag = Math.hypot(w2, h2);
61794
+ ctx.beginPath();
61795
+ for (let o2 = -diag; o2 < diag; o2 += spacing) {
61796
+ ctx.moveTo(x2 + o2, y2 - diag * dy);
61797
+ ctx.lineTo(x2 + o2 + dx * 2 * diag, y2 - diag * dy + dy * 2 * diag);
61798
+ }
61799
+ ctx.stroke();
61800
+ ctx.restore();
61801
+ } else {
61802
+ if (zbg !== void 0) {
61803
+ ctx.save();
61804
+ ctx.globalAlpha = zFillAlpha;
61805
+ ctx.fillStyle = zbg;
61806
+ ctx.fillRect(x2, y2, w2, h2);
61807
+ ctx.restore();
61808
+ }
61809
+ ctx.setLineDash([5, 4]);
61810
+ ctx.lineWidth = zWeight ?? 1;
61811
+ ctx.strokeStyle = tint;
61812
+ ctx.strokeRect(x2, y2, w2, h2);
61813
+ ctx.setLineDash([]);
61814
+ }
61815
+ if (w2 >= zone.label.length * 6.2 + 24) {
61816
+ ctx.font = '600 9px ui-monospace, "SF Mono", Menlo, monospace';
61817
+ const label = zone.label.toUpperCase();
61818
+ const tw = ctx.measureText(label).width;
61819
+ ctx.fillStyle = css(p2.bgPanel);
61820
+ ctx.fillRect(x2 + 6, y2 - 7, tw + 6, 12);
61821
+ ctx.fillStyle = css(p2.fgMuted);
61822
+ ctx.textBaseline = "middle";
61823
+ ctx.fillText(label, x2 + 9, y2);
61824
+ }
61825
+ }
61826
+ for (const link2 of value.links) {
61827
+ const from = centers.get(link2.from), to = centers.get(link2.to);
61828
+ if (!from || !to) continue;
61829
+ const anchors = [from, ...link2.via, to].map((q) => ({ x: wx(q.x), y: wy(q.y) }));
61830
+ const corner = link2.route.type === "orthogonal" ? link2.route.value.corner.type === "some" ? link2.route.value.corner.value : 8 : 0;
61831
+ const pts = link2.route.type === "orthogonal" ? orthogonalize(anchors) : anchors;
61832
+ const style = link2.style;
61833
+ const tone = (style.value.tone.type === "some" ? style.value.tone.value.type : void 0) ?? (style.type === "solid" ? "brand" : "muted");
61834
+ const weight = style.value.weight.type === "some" ? style.value.weight.value : style.type === "solid" ? 2.5 : 1.5;
61835
+ const color2 = toneRGB(p2, tone, "link");
61836
+ ctx.lineCap = "round";
61837
+ ctx.strokeStyle = css(color2);
61838
+ ctx.lineWidth = weight;
61839
+ ctx.setLineDash(style.type === "dashed" ? [6, 5] : []);
61840
+ ctx.beginPath();
61841
+ traceRounded(ctx, pts, corner);
61842
+ ctx.stroke();
61843
+ ctx.setLineDash([]);
61844
+ ctx.fillStyle = css(color2);
61845
+ for (const end3 of [anchors[0], anchors[anchors.length - 1]]) {
61846
+ ctx.beginPath();
61847
+ ctx.arc(end3.x, end3.y, weight + 1.5, 0, Math.PI * 2);
61848
+ ctx.fill();
61849
+ }
61850
+ ctx.lineCap = "butt";
61851
+ }
61852
+ for (const item of visibleItems) {
61853
+ const footprint = getSomeorUndefined(item.footprint);
61854
+ if (footprint === void 0 || footprint.type === "rect") continue;
61855
+ if ((tiers.get(item.key) ?? "dot") !== "card") continue;
61856
+ const isSel = selected === item.key;
61857
+ const tint = resolveTint(p2, getSomeorUndefined(item.color), (_b = getSomeorUndefined(item.tone)) == null ? void 0 : _b.type, statusRGB(p2, statusTone$1(item.status)));
61858
+ const ibg = getSomeorUndefined(item.bg);
61859
+ const fillAlpha = getSomeorUndefined(item.fillOpacity) ?? (isSel ? 0.24 : 0.12);
61860
+ const stroke = getSomeorUndefined(item.weight) ?? (isSel ? 2.5 : 1.5);
61861
+ const fillShape = () => {
61862
+ ctx.save();
61863
+ ctx.globalAlpha = fillAlpha;
61864
+ ctx.fillStyle = ibg ?? tint;
61865
+ ctx.fill();
61866
+ ctx.restore();
61867
+ };
61868
+ if (footprint.type === "circle") {
61869
+ ctx.beginPath();
61870
+ ctx.arc(wx(item.x), wy(item.y), footprint.value.radius * ppu, 0, Math.PI * 2);
61871
+ fillShape();
61872
+ ctx.lineWidth = stroke;
61873
+ ctx.strokeStyle = tint;
61874
+ ctx.stroke();
61875
+ continue;
61876
+ }
61877
+ const pts = footprint.value.vertices.map((q) => ({ x: wx(q.x), y: wy(q.y), bulge: q.bulge }));
61878
+ if (pts.length === 0) continue;
61879
+ ctx.beginPath();
61880
+ if (footprint.type === "polygon") {
61881
+ traceVertices(ctx, pts, true);
61882
+ fillShape();
61883
+ ctx.lineWidth = stroke;
61884
+ } else {
61885
+ traceVertices(ctx, pts, false);
61886
+ const band2 = footprint.value.width.type === "some" ? footprint.value.width.value * ppu : void 0;
61887
+ ctx.lineCap = "round";
61888
+ ctx.lineWidth = getSomeorUndefined(item.weight) ?? band2 ?? (isSel ? 2.5 : 1.5);
61889
+ }
61890
+ ctx.strokeStyle = tint;
61891
+ ctx.stroke();
61892
+ ctx.lineCap = "butt";
61893
+ }
61894
+ for (const item of visibleItems) {
61895
+ const tier = tiers.get(item.key) ?? "dot";
61896
+ if (tier === "card") continue;
61897
+ const tint = resolveTint(p2, getSomeorUndefined(item.color), (_c = getSomeorUndefined(item.tone)) == null ? void 0 : _c.type, statusRGB(p2, statusTone$1(item.status)));
61898
+ const isSel = selected === item.key;
61899
+ const x2 = wx(item.x), y2 = wy(item.y);
61900
+ if (tier === "dot") {
61901
+ ctx.beginPath();
61902
+ ctx.arc(x2, y2, 5, 0, Math.PI * 2);
61903
+ ctx.fillStyle = tint;
61904
+ ctx.fill();
61905
+ ctx.lineWidth = 1.5;
61906
+ ctx.strokeStyle = css(p2.white);
61907
+ ctx.stroke();
61908
+ if (isSel) {
61909
+ ctx.beginPath();
61910
+ ctx.arc(x2, y2, 7.5, 0, Math.PI * 2);
61911
+ ctx.lineWidth = 2;
61912
+ ctx.strokeStyle = css(p2.fg);
61913
+ ctx.stroke();
61914
+ }
61915
+ continue;
61916
+ }
61917
+ ctx.font = '600 10px ui-monospace, "SF Mono", Menlo, monospace';
61918
+ const tw = ctx.measureText(item.label).width;
61919
+ const padX = 6, dotW = 7, gap = 4, h2 = 16;
61920
+ const w2 = padX + dotW + gap + tw + padX;
61921
+ const left = x2 - w2 / 2, top = y2 - h2 / 2;
61922
+ ctx.beginPath();
61923
+ (_d = ctx.roundRect) == null ? void 0 : _d.call(ctx, left, top, w2, h2, h2 / 2);
61924
+ if (!ctx.roundRect) ctx.rect(left, top, w2, h2);
61925
+ ctx.fillStyle = css(p2.bgSurface);
61926
+ ctx.fill();
61927
+ ctx.lineWidth = 1;
61928
+ ctx.strokeStyle = isSel ? css(p2.fg) : css(p2.borderStrong);
61929
+ ctx.stroke();
61930
+ ctx.beginPath();
61931
+ ctx.arc(left + padX + dotW / 2, y2, dotW / 2, 0, Math.PI * 2);
61932
+ ctx.fillStyle = tint;
61933
+ ctx.fill();
61934
+ ctx.fillStyle = css(p2.fg);
61935
+ ctx.textBaseline = "middle";
61936
+ ctx.fillText(item.label, left + padX + dotW + gap, y2);
61937
+ }
61938
+ }
61939
+ const TOKENS = {
61940
+ brand600: "brand.600",
61941
+ brand500: "brand.500",
61942
+ fg: "fg",
61943
+ fgMuted: "fg.muted",
61944
+ fgSubtle: "fg.subtle",
61945
+ borderStrong: "border.strong",
61946
+ borderSubtle: "border.subtle",
61947
+ bgSurface: "bg.surface",
61948
+ bgPanel: "bg.panel",
61949
+ statusOk: "status.ok",
61950
+ statusWarn: "status.warn",
61951
+ statusBad: "status.bad",
61952
+ white: "white"
61953
+ };
61954
+ const KEYS = Object.keys(TOKENS);
61955
+ function parseRGB(s2) {
61956
+ const m2 = s2.match(/[\d.]+/g);
61957
+ if (m2 === null || m2.length < 3) return [0, 0, 0];
61958
+ return [Math.round(+m2[0]), Math.round(+m2[1]), Math.round(+m2[2])];
61959
+ }
61960
+ const SchematicPaletteProbe = memo$2(function SchematicPaletteProbe2({ onResolve }) {
61961
+ const ref = useRef(null);
61962
+ useLayoutEffect(() => {
61963
+ const read = () => {
61964
+ const el = ref.current;
61965
+ if (el === null) return;
61966
+ const kids = el.children;
61967
+ const palette = {};
61968
+ KEYS.forEach((k2, i2) => {
61969
+ const child = kids[i2];
61970
+ if (child !== void 0) palette[k2] = parseRGB(getComputedStyle(child).color);
61971
+ });
61972
+ onResolve(palette);
61973
+ };
61974
+ read();
61975
+ const obs = new MutationObserver(read);
61976
+ obs.observe(document.documentElement, { attributes: true, attributeFilter: ["class", "data-theme", "style"] });
61977
+ return () => obs.disconnect();
61978
+ }, [onResolve]);
61979
+ return /* @__PURE__ */ jsx(Box, { ref, "aria-hidden": "true", css: { position: "absolute", width: "0", height: "0", overflow: "hidden", pointerEvents: "none" }, children: KEYS.map((k2) => /* @__PURE__ */ jsx(Box, { color: TOKENS[k2] }, k2)) });
61980
+ });
61981
+ library$1.add(icons$2);
61982
+ const schematicEqual = equalFor(Schematic.Types.Schematic);
61983
+ const IDENTITY = { zoom: 1, tx: 0, ty: 0 };
61984
+ const MAX_ZOOM = 40;
61985
+ const LOD_CARD_PPU = 30;
61986
+ const LOD_LABEL_PPU = 16;
61987
+ const MINIMAP_AUTO = 25;
61988
+ function statusTone(status) {
61989
+ return status.type === "some" ? status.value.type : void 0;
61990
+ }
61991
+ function niceScaleLength(ppu, targetPx) {
61992
+ const target = targetPx / ppu;
61993
+ const pow2 = Math.pow(10, Math.floor(Math.log10(target)));
61994
+ for (const m2 of [5, 2, 1]) {
61995
+ if (m2 * pow2 <= target) return m2 * pow2;
61996
+ }
61997
+ return pow2;
61998
+ }
61999
+ function pointInPolygon(x2, y2, pts) {
62000
+ let inside = false;
62001
+ for (let i2 = 0, j2 = pts.length - 1; i2 < pts.length; j2 = i2++) {
62002
+ const xi = pts[i2].x, yi = pts[i2].y, xj = pts[j2].x, yj = pts[j2].y;
62003
+ if (yi > y2 !== yj > y2 && x2 < (xj - xi) * (y2 - yi) / (yj - yi) + xi) inside = !inside;
62004
+ }
62005
+ return inside;
61567
62006
  }
61568
62007
  function buildNavTree(zones, items) {
61569
62008
  const nodes = /* @__PURE__ */ new Map();
@@ -61654,13 +62093,16 @@ const EastChakraSchematic = memo$2(function EastChakraSchematic2({ value }) {
61654
62093
  const showGrid = getSomeorUndefined(value.grid) ?? true;
61655
62094
  const showNavigator = getSomeorUndefined(value.navigator) ?? value.zones.length > 0;
61656
62095
  const showMinimap = getSomeorUndefined(value.minimap) ?? value.items.length >= MINIMAP_AUTO;
62096
+ const fixedHeight = getSomeorUndefined(value.height);
61657
62097
  const [selected, setSelected] = useState(null);
61658
62098
  const [view, setView] = useState(IDENTITY);
61659
62099
  const [query, setQuery] = useState("");
61660
62100
  const [openZone, setOpenZone] = useState(null);
61661
62101
  const [navCollapsed, setNavCollapsed] = useState(false);
62102
+ const [palette, setPalette] = useState(null);
61662
62103
  const navTreeRef = useRef(null);
61663
62104
  const canvasRef = useRef(null);
62105
+ const drawRef = useRef(null);
61664
62106
  const [size, setSize] = useState(null);
61665
62107
  useLayoutEffect(() => {
61666
62108
  const el = canvasRef.current;
@@ -61684,7 +62126,23 @@ const EastChakraSchematic = memo$2(function EastChakraSchematic2({ value }) {
61684
62126
  const tree = new RBush();
61685
62127
  tree.load(value.items.map((item) => {
61686
62128
  const hw = (getSomeorUndefined(item.width) ?? 0) / 2 + 2.4;
61687
- return { minX: item.x - hw, minY: item.y - 2, maxX: item.x + hw, maxY: item.y + 2, item };
62129
+ let minX = item.x - hw, minY = item.y - 2, maxX = item.x + hw, maxY = item.y + 2;
62130
+ const fp = getSomeorUndefined(item.footprint);
62131
+ if (fp !== void 0 && fp.type === "circle") {
62132
+ const r2 = fp.value.radius;
62133
+ minX = Math.min(minX, item.x - r2);
62134
+ minY = Math.min(minY, item.y - r2);
62135
+ maxX = Math.max(maxX, item.x + r2);
62136
+ maxY = Math.max(maxY, item.y + r2);
62137
+ } else if (fp !== void 0 && fp.type !== "rect") {
62138
+ for (const v2 of fp.value.vertices) {
62139
+ minX = Math.min(minX, v2.x);
62140
+ minY = Math.min(minY, v2.y);
62141
+ maxX = Math.max(maxX, v2.x);
62142
+ maxY = Math.max(maxY, v2.y);
62143
+ }
62144
+ }
62145
+ return { minX, minY, maxX, maxY, item };
61688
62146
  }));
61689
62147
  return tree;
61690
62148
  }, [value.items]);
@@ -61786,15 +62244,18 @@ const EastChakraSchematic = memo$2(function EastChakraSchematic2({ value }) {
61786
62244
  return () => el.removeEventListener("wheel", onWheel);
61787
62245
  }, []);
61788
62246
  const panRef = useRef(null);
62247
+ const movedRef = useRef(false);
61789
62248
  const onCanvasPointerDown = useCallback((e3) => {
61790
62249
  if (e3.button !== 0) return;
61791
62250
  if (e3.target.closest("button") !== null) return;
61792
62251
  panRef.current = { x: e3.clientX, y: e3.clientY, tx: viewRef.current.tx, ty: viewRef.current.ty };
62252
+ movedRef.current = false;
61793
62253
  e3.currentTarget.setPointerCapture(e3.pointerId);
61794
62254
  }, []);
61795
62255
  const onCanvasPointerMove = useCallback((e3) => {
61796
62256
  const pan = panRef.current;
61797
62257
  if (!pan) return;
62258
+ if (Math.abs(e3.clientX - pan.x) > 4 || Math.abs(e3.clientY - pan.y) > 4) movedRef.current = true;
61798
62259
  setView((prev) => ({ ...prev, tx: pan.tx + e3.clientX - pan.x, ty: pan.ty + e3.clientY - pan.y }));
61799
62260
  }, []);
61800
62261
  const onCanvasPointerUp = useCallback(() => {
@@ -61849,6 +62310,61 @@ const EastChakraSchematic = memo$2(function EastChakraSchematic2({ value }) {
61849
62310
  const lowerQuery = query.trim().toLowerCase();
61850
62311
  const searchHits = useMemo(() => lowerQuery === "" ? [] : value.items.filter((i2) => i2.key.toLowerCase().includes(lowerQuery) || i2.label.toLowerCase().includes(lowerQuery)).slice(0, 12), [lowerQuery, value.items]);
61851
62312
  const scaleLen = ppu > 0 ? niceScaleLength(ppu, 100) : 0;
62313
+ useEffect(() => {
62314
+ const canvas = drawRef.current;
62315
+ if (canvas === null || size === null || palette === null) return;
62316
+ const dpr = window.devicePixelRatio || 1;
62317
+ const bw = Math.round(size.w * dpr), bh = Math.round(size.h * dpr);
62318
+ if (canvas.width !== bw || canvas.height !== bh) {
62319
+ canvas.width = bw;
62320
+ canvas.height = bh;
62321
+ }
62322
+ const ctx = canvas.getContext("2d");
62323
+ if (ctx === null) return;
62324
+ ctx.setTransform(dpr, 0, 0, dpr, 0, 0);
62325
+ paintSchematic({
62326
+ ctx,
62327
+ value,
62328
+ cam: { ppu, tx: view.tx, ty: view.ty },
62329
+ width: size.w,
62330
+ height: size.h,
62331
+ visibleItems,
62332
+ tiers,
62333
+ selected,
62334
+ centers,
62335
+ palette
62336
+ });
62337
+ }, [value, view, ppu, size, visibleItems, tiers, selected, centers, palette]);
62338
+ const onCanvasClick = useCallback((e3) => {
62339
+ if (size === null || movedRef.current) return;
62340
+ const rect = e3.currentTarget.getBoundingClientRect();
62341
+ const sx = e3.clientX - rect.left, sy = e3.clientY - rect.top;
62342
+ const wxp = (sx - view.tx) / ppu, wyp = (sy - view.ty) / ppu;
62343
+ for (const box of index2.search({ minX: wxp, minY: wyp, maxX: wxp, maxY: wyp })) {
62344
+ const it = box.item;
62345
+ if ((tiers.get(it.key) ?? lod) !== "card") continue;
62346
+ const fp = getSomeorUndefined(it.footprint);
62347
+ if (fp === void 0 || fp.type === "rect") continue;
62348
+ const hit = fp.type === "circle" ? Math.hypot(wxp - it.x, wyp - it.y) <= fp.value.radius : pointInPolygon(wxp, wyp, fp.value.vertices);
62349
+ if (hit) {
62350
+ setSelected(it.key);
62351
+ if (onSelectFn) queueMicrotask(() => onSelectFn(it.key));
62352
+ return;
62353
+ }
62354
+ }
62355
+ let best = null, bestD = Infinity;
62356
+ for (const it of visibleItems) {
62357
+ const tier = tiers.get(it.key) ?? lod;
62358
+ if (tier === "card") continue;
62359
+ const d2 = Math.hypot(it.x * ppu + view.tx - sx, it.y * ppu + view.ty - sy);
62360
+ const reach = tier === "dot" ? 9 : 18;
62361
+ if (d2 < reach && d2 < bestD) {
62362
+ best = it;
62363
+ bestD = d2;
62364
+ }
62365
+ }
62366
+ if (best !== null) flyToItem(best);
62367
+ }, [size, view, ppu, index2, tiers, lod, visibleItems, onSelectFn, flyToItem]);
61852
62368
  const toggleZone = useCallback((key) => {
61853
62369
  setOpenZone((prev) => prev === key ? nav.parentOf.get(key) ?? null : key);
61854
62370
  }, [nav.parentOf]);
@@ -61917,7 +62433,8 @@ const EastChakraSchematic = memo$2(function EastChakraSchematic2({ value }) {
61917
62433
  ))
61918
62434
  ] }, node2.zone.key);
61919
62435
  };
61920
- return /* @__PURE__ */ jsxs(Box, { css: styles2.root, children: [
62436
+ return /* @__PURE__ */ jsxs(Box, { css: styles2.root, ...fixedHeight !== void 0 ? { style: { height: fixedHeight, maxHeight: fixedHeight } } : {}, children: [
62437
+ /* @__PURE__ */ jsx(SchematicPaletteProbe, { onResolve: setPalette }),
61921
62438
  showNavigator && navCollapsed && /* @__PURE__ */ jsx(Box, { css: styles2.navCollapsed, children: /* @__PURE__ */ jsx(Box, { as: "button", css: styles2.navToggle, "aria-label": "Expand index", title: "Show index", onClick: () => setNavCollapsed(false), children: /* @__PURE__ */ jsx(FontAwesomeIcon, { icon: faAnglesRight }) }) }),
61922
62439
  showNavigator && !navCollapsed && /* @__PURE__ */ jsxs(Box, { css: styles2.nav, children: [
61923
62440
  /* @__PURE__ */ jsxs(Box, { css: styles2.navHeader, children: [
@@ -61962,7 +62479,7 @@ const EastChakraSchematic = memo$2(function EastChakraSchematic2({ value }) {
61962
62479
  ref: canvasRef,
61963
62480
  css: styles2.canvas,
61964
62481
  "data-schematic-canvas": "",
61965
- style: { aspectRatio: `${W2} / ${H}` },
62482
+ style: fixedHeight !== void 0 ? { minHeight: 0 } : { aspectRatio: `${W2} / ${H}` },
61966
62483
  onPointerDown: onCanvasPointerDown,
61967
62484
  onPointerMove: onCanvasPointerMove,
61968
62485
  onPointerUp: onCanvasPointerUp,
@@ -61983,91 +62500,18 @@ const EastChakraSchematic = memo$2(function EastChakraSchematic2({ value }) {
61983
62500
  );
61984
62501
  })(),
61985
62502
  size !== null && /* @__PURE__ */ jsxs(Fragment, { children: [
61986
- value.zones.map((zone) => {
61987
- const pattern = zone.pattern;
61988
- const tone = (pattern.value.tone.type === "some" ? pattern.value.tone.value.type : void 0) ?? "muted";
61989
- const hatchVars = pattern.type === "hatch" ? {
61990
- "--hatch-spacing": `${pattern.value.spacing.type === "some" ? pattern.value.spacing.value : 8}px`,
61991
- "--hatch-angle": `${pattern.value.angle.type === "some" ? pattern.value.angle.value : 45}deg`
61992
- } : {};
61993
- return /* @__PURE__ */ jsx(
61994
- Box,
61995
- {
61996
- css: styles2.zone,
61997
- "data-pattern": pattern.type,
61998
- "data-tone": tone,
61999
- style: {
62000
- left: wx(zone.x),
62001
- top: wy(zone.y),
62002
- width: zone.width * ppu,
62003
- height: zone.height * ppu,
62004
- ...hatchVars
62005
- },
62006
- children: zone.width * ppu >= zone.label.length * 6.2 + 24 && /* @__PURE__ */ jsx(Box, { as: "span", css: styles2.zoneLabel, "data-pattern": pattern.type, children: zone.label })
62007
- },
62008
- zone.key
62009
- );
62010
- }),
62011
- /* @__PURE__ */ jsx(Box, { as: "svg", css: styles2.underlay, ...{ viewBox: `0 0 ${size.w} ${size.h}`, width: size.w, height: size.h }, children: value.links.map((link2) => {
62012
- const from = centers.get(link2.from);
62013
- const to = centers.get(link2.to);
62014
- if (!from || !to) return null;
62015
- const anchors = [from, ...link2.via, to].map((p2) => ({ x: wx(p2.x), y: wy(p2.y) }));
62016
- const corner = link2.route.type === "orthogonal" ? link2.route.value.corner.type === "some" ? link2.route.value.corner.value : 8 : 0;
62017
- const pts = link2.route.type === "orthogonal" ? orthogonalize(anchors) : anchors;
62018
- const style = link2.style;
62019
- const tone = (style.value.tone.type === "some" ? style.value.tone.value.type : void 0) ?? (style.type === "solid" ? "brand" : "muted");
62020
- const weight = style.value.weight.type === "some" ? style.value.weight.value : style.type === "solid" ? 2.5 : 1.5;
62021
- return /* @__PURE__ */ jsxs("g", { "data-tone": tone, children: [
62022
- /* @__PURE__ */ jsx(
62023
- "path",
62024
- {
62025
- d: roundedPath(pts, corner),
62026
- fill: "none",
62027
- "data-style": style.type,
62028
- strokeWidth: weight,
62029
- ...style.type === "dashed" ? { strokeDasharray: "6 5" } : {}
62030
- }
62031
- ),
62032
- /* @__PURE__ */ jsx("circle", { cx: anchors[0].x, cy: anchors[0].y, r: weight + 1.5 }),
62033
- /* @__PURE__ */ jsx("circle", { cx: anchors[anchors.length - 1].x, cy: anchors[anchors.length - 1].y, r: weight + 1.5 })
62034
- ] }, link2.key);
62035
- }) }),
62503
+ /* @__PURE__ */ jsx(
62504
+ "canvas",
62505
+ {
62506
+ ref: drawRef,
62507
+ onClick: onCanvasClick,
62508
+ style: { position: "absolute", inset: 0, width: "100%", height: "100%" }
62509
+ }
62510
+ ),
62036
62511
  visibleItems.map((item) => {
62512
+ if ((tiers.get(item.key) ?? lod) !== "card") return null;
62037
62513
  const tone = statusTone(item.status);
62038
62514
  const isSelected = selected === item.key;
62039
- const tier = tiers.get(item.key) ?? lod;
62040
- if (tier === "dot") {
62041
- return /* @__PURE__ */ jsx(
62042
- Box,
62043
- {
62044
- css: styles2.itemDot,
62045
- "data-tone": tone ?? "neutral",
62046
- ...isSelected ? { "data-selected": "" } : {},
62047
- style: { left: wx(item.x), top: wy(item.y) },
62048
- onClick: () => flyToItem(item),
62049
- onPointerDown: (e3) => e3.stopPropagation()
62050
- },
62051
- item.key
62052
- );
62053
- }
62054
- if (tier === "label") {
62055
- return /* @__PURE__ */ jsxs(
62056
- Box,
62057
- {
62058
- css: styles2.itemPin,
62059
- ...isSelected ? { "data-selected": "" } : {},
62060
- style: { left: wx(item.x), top: wy(item.y) },
62061
- onClick: () => flyToItem(item),
62062
- onPointerDown: (e3) => e3.stopPropagation(),
62063
- children: [
62064
- /* @__PURE__ */ jsx(Box, { as: "span", css: styles2.statusDot, "data-tone": tone ?? "neutral" }),
62065
- item.label
62066
- ]
62067
- },
62068
- item.key
62069
- );
62070
- }
62071
62515
  const sublabel = getSomeorUndefined(item.sublabel);
62072
62516
  const icon3 = getSomeorUndefined(item.icon);
62073
62517
  const meter = getSomeorUndefined(item.meter);
@@ -77867,7 +78311,9 @@ export {
77867
78311
  Pill,
77868
78312
  ShareImpl,
77869
78313
  SliceApplyImpl2 as SliceApplyImpl,
78314
+ SliceEditPopover,
77870
78315
  SliceImpl,
78316
+ SlicePredicateBuilder,
77871
78317
  SliceRailCluster,
77872
78318
  StateImpl,
77873
78319
  StateRuntime,
@@ -77878,6 +78324,7 @@ export {
77878
78324
  clearExtensionRegistry,
77879
78325
  createPersistentUIStore,
77880
78326
  createUIStore,
78327
+ formatPredicate,
77881
78328
  formatTick,
77882
78329
  getExtensionEntry,
77883
78330
  getReactiveTrackers,
@@ -77889,6 +78336,7 @@ export {
77889
78336
  implementUIComponent,
77890
78337
  inputRecipe,
77891
78338
  layerStyles,
78339
+ predicateParts,
77892
78340
  registerPlatformImplementation,
77893
78341
  registerReactiveTracker,
77894
78342
  semanticTokens,