@vllnt/ui 0.2.0 → 0.2.1-canary.06f0e84

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 (202) hide show
  1. package/CHANGELOG.md +46 -1
  2. package/README.md +27 -12
  3. package/dist/components/activity-log/activity-log.js +1 -0
  4. package/dist/components/agent-activity/agent-activity.js +311 -0
  5. package/dist/components/agent-activity/index.js +18 -0
  6. package/dist/components/ai-artifact/ai-artifact.js +422 -0
  7. package/dist/components/ai-artifact/index.js +24 -0
  8. package/dist/components/ai-sidebar/ai-sidebar.js +254 -0
  9. package/dist/components/ai-sidebar/index.js +22 -0
  10. package/dist/components/alert-pulse/alert-pulse.js +93 -0
  11. package/dist/components/alert-pulse/index.js +6 -0
  12. package/dist/components/anchor-port/anchor-port.js +51 -0
  13. package/dist/components/anchor-port/index.js +4 -0
  14. package/dist/components/animated-text/animated-text.js +1 -0
  15. package/dist/components/auto-reload/auto-reload.js +367 -0
  16. package/dist/components/auto-reload/index.js +6 -0
  17. package/dist/components/banner/banner.js +155 -0
  18. package/dist/components/banner/index.js +10 -0
  19. package/dist/components/bottom-activity-strip/bottom-activity-strip.js +91 -0
  20. package/dist/components/bottom-activity-strip/index.js +6 -0
  21. package/dist/components/bottom-bar/bottom-bar.js +25 -0
  22. package/dist/components/bottom-bar/index.js +4 -0
  23. package/dist/components/canvas-shell/canvas-foundation-demo.js +183 -0
  24. package/dist/components/canvas-shell/canvas-shell-route-config.js +0 -0
  25. package/dist/components/canvas-shell/canvas-shell.js +261 -0
  26. package/dist/components/canvas-shell/index.js +4 -0
  27. package/dist/components/canvas-view/canvas-view.js +461 -0
  28. package/dist/components/canvas-view/index.js +6 -0
  29. package/dist/components/chart/area-chart.js +1 -0
  30. package/dist/components/chart/line-chart.js +1 -0
  31. package/dist/components/chat-dock-section/chat-dock-section.js +56 -0
  32. package/dist/components/chat-dock-section/index.js +6 -0
  33. package/dist/components/checklist/checklist.js +7 -0
  34. package/dist/components/checklist/index.js +3 -1
  35. package/dist/components/choropleth-map/choropleth-map.js +373 -0
  36. package/dist/components/choropleth-map/index.js +10 -0
  37. package/dist/components/chronological-timeline/chronological-timeline.js +337 -0
  38. package/dist/components/chronological-timeline/index.js +8 -0
  39. package/dist/components/civilization-card/civilization-card.js +258 -0
  40. package/dist/components/civilization-card/index.js +8 -0
  41. package/dist/components/combobox/combobox.js +44 -20
  42. package/dist/components/comment-pin/comment-pin.js +104 -0
  43. package/dist/components/comment-pin/index.js +6 -0
  44. package/dist/components/connector-edge/connector-edge.js +66 -0
  45. package/dist/components/connector-edge/index.js +6 -0
  46. package/dist/components/context-lens/context-lens.js +98 -0
  47. package/dist/components/context-lens/index.js +6 -0
  48. package/dist/components/conversation-thread/conversation-thread.js +348 -0
  49. package/dist/components/conversation-thread/index.js +20 -0
  50. package/dist/components/copy-button/copy-button.js +189 -0
  51. package/dist/components/copy-button/index.js +8 -0
  52. package/dist/components/curriculum/curriculum.js +349 -0
  53. package/dist/components/curriculum/index.js +10 -0
  54. package/dist/components/data-list/data-list.js +1 -0
  55. package/dist/components/document-sibling-nav/document-sibling-nav.js +111 -0
  56. package/dist/components/document-sibling-nav/index.js +8 -0
  57. package/dist/components/edge-label/edge-label.js +26 -0
  58. package/dist/components/edge-label/index.js +4 -0
  59. package/dist/components/empty-state/empty-state.js +93 -0
  60. package/dist/components/empty-state/index.js +8 -0
  61. package/dist/components/era-comparison/era-comparison.js +198 -0
  62. package/dist/components/era-comparison/index.js +16 -0
  63. package/dist/components/floating-toolbar/floating-toolbar.js +66 -0
  64. package/dist/components/floating-toolbar/index.js +6 -0
  65. package/dist/components/follow-mode/follow-mode.js +89 -0
  66. package/dist/components/follow-mode/index.js +6 -0
  67. package/dist/components/form/form.js +432 -0
  68. package/dist/components/form/index.js +20 -0
  69. package/dist/components/gantt-chart/gantt-chart.js +331 -0
  70. package/dist/components/gantt-chart/index.js +6 -0
  71. package/dist/components/geography-quiz-map/geography-quiz-map.js +343 -0
  72. package/dist/components/geography-quiz-map/index.js +12 -0
  73. package/dist/components/glass-panel/glass-panel.js +21 -0
  74. package/dist/components/glass-panel/index.js +4 -0
  75. package/dist/components/globe-3d/globe-3d.js +417 -0
  76. package/dist/components/globe-3d/index.js +10 -0
  77. package/dist/components/group-hull/group-hull.js +29 -0
  78. package/dist/components/group-hull/index.js +4 -0
  79. package/dist/components/handoff-beacon/handoff-beacon.js +78 -0
  80. package/dist/components/handoff-beacon/index.js +6 -0
  81. package/dist/components/heat-map-overlay/heat-map-overlay.js +215 -0
  82. package/dist/components/heat-map-overlay/index.js +6 -0
  83. package/dist/components/heat-overlay/heat-overlay.js +92 -0
  84. package/dist/components/heat-overlay/index.js +6 -0
  85. package/dist/components/historic-timeline/historic-timeline.js +342 -0
  86. package/dist/components/historic-timeline/index.js +6 -0
  87. package/dist/components/historical-figure-card/historical-figure-card.js +273 -0
  88. package/dist/components/historical-figure-card/index.js +6 -0
  89. package/dist/components/index.js +568 -1
  90. package/dist/components/infinite-plane/index.js +6 -0
  91. package/dist/components/infinite-plane/infinite-plane.js +75 -0
  92. package/dist/components/interactive-timeline/index.js +16 -0
  93. package/dist/components/interactive-timeline/interactive-timeline.js +708 -0
  94. package/dist/components/jarvis-dock/index.js +6 -0
  95. package/dist/components/jarvis-dock/jarvis-dock.js +98 -0
  96. package/dist/components/kbd/index.js +5 -0
  97. package/dist/components/kbd/kbd.js +117 -0
  98. package/dist/components/knowledge-check/index.js +6 -0
  99. package/dist/components/knowledge-check/knowledge-check.js +448 -0
  100. package/dist/components/left-rail/index.js +4 -0
  101. package/dist/components/left-rail/left-rail.js +25 -0
  102. package/dist/components/live-cursor/index.js +6 -0
  103. package/dist/components/live-cursor/live-cursor.js +62 -0
  104. package/dist/components/map-2d/index.js +20 -0
  105. package/dist/components/map-2d/map-2d.js +455 -0
  106. package/dist/components/map-timeline/index.js +16 -0
  107. package/dist/components/map-timeline/map-timeline.js +506 -0
  108. package/dist/components/metric-cluster/index.js +6 -0
  109. package/dist/components/metric-cluster/metric-cluster.js +96 -0
  110. package/dist/components/mini-map-panel/index.js +6 -0
  111. package/dist/components/mini-map-panel/mini-map-panel.js +74 -0
  112. package/dist/components/model-comparison/index.js +12 -0
  113. package/dist/components/model-comparison/model-comparison.js +211 -0
  114. package/dist/components/multi-select/index.js +6 -0
  115. package/dist/components/multi-select/multi-select.js +258 -0
  116. package/dist/components/multi-select-lasso/index.js +6 -0
  117. package/dist/components/multi-select-lasso/multi-select-lasso.js +76 -0
  118. package/dist/components/newsletter-signup/index.js +8 -0
  119. package/dist/components/newsletter-signup/newsletter-signup.js +269 -0
  120. package/dist/components/object-card/index.js +6 -0
  121. package/dist/components/object-card/object-card.js +126 -0
  122. package/dist/components/object-handle/index.js +4 -0
  123. package/dist/components/object-handle/object-handle.js +38 -0
  124. package/dist/components/object-inspector/index.js +6 -0
  125. package/dist/components/object-inspector/object-inspector.js +136 -0
  126. package/dist/components/overview-board/index.js +8 -0
  127. package/dist/components/overview-board/overview-board.js +127 -0
  128. package/dist/components/parallel-timeline/index.js +6 -0
  129. package/dist/components/parallel-timeline/parallel-timeline.js +251 -0
  130. package/dist/components/playback-ghost/index.js +6 -0
  131. package/dist/components/playback-ghost/playback-ghost.js +83 -0
  132. package/dist/components/policy-delivery-panel/index.js +6 -0
  133. package/dist/components/policy-delivery-panel/policy-delivery-panel.js +99 -0
  134. package/dist/components/presence-stack/index.js +6 -0
  135. package/dist/components/presence-stack/presence-stack.js +108 -0
  136. package/dist/components/presence-sync-indicator/index.js +6 -0
  137. package/dist/components/presence-sync-indicator/presence-sync-indicator.js +73 -0
  138. package/dist/components/pricing-table/index.js +8 -0
  139. package/dist/components/pricing-table/pricing-table.js +247 -0
  140. package/dist/components/primary-source-viewer/index.js +26 -0
  141. package/dist/components/primary-source-viewer/primary-source-viewer.js +439 -0
  142. package/dist/components/progress-tracker/index.js +20 -0
  143. package/dist/components/progress-tracker/progress-tracker.js +527 -0
  144. package/dist/components/prompt-templates/index.js +6 -0
  145. package/dist/components/prompt-templates/prompt-templates.js +403 -0
  146. package/dist/components/property-section/index.js +6 -0
  147. package/dist/components/property-section/property-section.js +101 -0
  148. package/dist/components/relationship-inspector/index.js +6 -0
  149. package/dist/components/relationship-inspector/relationship-inspector.js +102 -0
  150. package/dist/components/right-dock/index.js +4 -0
  151. package/dist/components/right-dock/right-dock.js +28 -0
  152. package/dist/components/route-map/index.js +6 -0
  153. package/dist/components/route-map/route-map.js +339 -0
  154. package/dist/components/routing-assignment-panel/index.js +6 -0
  155. package/dist/components/routing-assignment-panel/routing-assignment-panel.js +122 -0
  156. package/dist/components/run-timeline/index.js +6 -0
  157. package/dist/components/run-timeline/run-timeline.js +221 -0
  158. package/dist/components/runtime-overview-panel/index.js +6 -0
  159. package/dist/components/runtime-overview-panel/runtime-overview-panel.js +89 -0
  160. package/dist/components/segmented-control/index.js +12 -0
  161. package/dist/components/segmented-control/segmented-control.js +61 -0
  162. package/dist/components/selection-halo/index.js +6 -0
  163. package/dist/components/selection-halo/selection-halo.js +72 -0
  164. package/dist/components/selection-presence/index.js +6 -0
  165. package/dist/components/selection-presence/selection-presence.js +50 -0
  166. package/dist/components/snap-guides/index.js +6 -0
  167. package/dist/components/snap-guides/snap-guides.js +45 -0
  168. package/dist/components/spinner/unicode-spinner.js +1 -0
  169. package/dist/components/state-badge-overlay/index.js +6 -0
  170. package/dist/components/state-badge-overlay/state-badge-overlay.js +90 -0
  171. package/dist/components/sticky-metric/index.js +6 -0
  172. package/dist/components/sticky-metric/sticky-metric.js +83 -0
  173. package/dist/components/story-map/index.js +8 -0
  174. package/dist/components/story-map/story-map.js +414 -0
  175. package/dist/components/tags-input/index.js +4 -0
  176. package/dist/components/tags-input/tags-input.js +178 -0
  177. package/dist/components/thread-bubble/index.js +6 -0
  178. package/dist/components/thread-bubble/thread-bubble.js +85 -0
  179. package/dist/components/threshold-ring/index.js +6 -0
  180. package/dist/components/threshold-ring/threshold-ring.js +160 -0
  181. package/dist/components/timeline/index.js +12 -0
  182. package/dist/components/timeline/timeline.js +239 -0
  183. package/dist/components/timeline-scrubber/index.js +6 -0
  184. package/dist/components/timeline-scrubber/timeline-scrubber.js +179 -0
  185. package/dist/components/top-bar/index.js +4 -0
  186. package/dist/components/top-bar/top-bar.js +31 -0
  187. package/dist/components/transaction-list/index.js +14 -0
  188. package/dist/components/transaction-list/transaction-list.js +226 -0
  189. package/dist/components/tree-view/index.js +6 -0
  190. package/dist/components/tree-view/tree-view.js +298 -0
  191. package/dist/components/usage-breakdown/usage-breakdown.js +1 -0
  192. package/dist/components/viewport-bookmarks/index.js +6 -0
  193. package/dist/components/viewport-bookmarks/viewport-bookmarks.js +116 -0
  194. package/dist/components/workspace-switcher/index.js +6 -0
  195. package/dist/components/workspace-switcher/workspace-switcher.js +61 -0
  196. package/dist/components/world-breadcrumbs/index.js +6 -0
  197. package/dist/components/world-breadcrumbs/world-breadcrumbs.js +114 -0
  198. package/dist/components/zoom-hud/index.js +4 -0
  199. package/dist/components/zoom-hud/zoom-hud.js +61 -0
  200. package/dist/index.d.ts +7906 -225
  201. package/dist/index.js +3 -1
  202. package/package.json +9 -5
@@ -0,0 +1,89 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import {
4
+ forwardRef
5
+ } from "react";
6
+ import { cn } from "../../lib/utils";
7
+ const DEFAULT_LABELS = {
8
+ empty: "No runtime metrics",
9
+ region: "Runtime overview"
10
+ };
11
+ const TONE_DOT = {
12
+ danger: "bg-red-500",
13
+ neutral: "bg-muted-foreground",
14
+ success: "bg-emerald-500",
15
+ warn: "bg-amber-500"
16
+ };
17
+ const TREND_GLYPH = {
18
+ down: "\u2193",
19
+ flat: "\xB7",
20
+ up: "\u2191"
21
+ };
22
+ const Tile = (props) => {
23
+ const { metric } = props;
24
+ const tone = metric.tone ?? "neutral";
25
+ return /* @__PURE__ */ jsxs(
26
+ "li",
27
+ {
28
+ className: "flex flex-col gap-1 rounded-md border border-border/60 bg-muted/20 px-2.5 py-2",
29
+ "data-runtime-metric": metric.id,
30
+ "data-runtime-tone": tone,
31
+ children: [
32
+ /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-1.5 text-[10px] uppercase tracking-wide text-muted-foreground", children: [
33
+ /* @__PURE__ */ jsx(
34
+ "span",
35
+ {
36
+ "aria-hidden": "true",
37
+ className: cn("h-1.5 w-1.5 rounded-full", TONE_DOT[tone])
38
+ }
39
+ ),
40
+ metric.label
41
+ ] }),
42
+ /* @__PURE__ */ jsxs("span", { className: "flex items-baseline gap-1.5 text-sm font-semibold text-foreground", children: [
43
+ /* @__PURE__ */ jsx("span", { children: metric.value }),
44
+ metric.trend ? /* @__PURE__ */ jsx(
45
+ "span",
46
+ {
47
+ "aria-hidden": "true",
48
+ className: "text-[10px] text-muted-foreground",
49
+ children: TREND_GLYPH[metric.trend]
50
+ }
51
+ ) : null
52
+ ] }),
53
+ metric.detail ? /* @__PURE__ */ jsx("span", { className: "text-[10px] text-muted-foreground", children: metric.detail }) : null
54
+ ]
55
+ }
56
+ );
57
+ };
58
+ const RuntimeOverviewPanel = forwardRef((props, ref) => {
59
+ const { className, labels, metrics, title = "Runtime", ...rest } = props;
60
+ const resolvedLabels = { ...DEFAULT_LABELS, ...labels };
61
+ return /* @__PURE__ */ jsxs(
62
+ "section",
63
+ {
64
+ "aria-label": resolvedLabels.region,
65
+ className: cn(
66
+ "flex w-full flex-col gap-2 rounded-2xl border bg-background p-3 text-foreground",
67
+ className
68
+ ),
69
+ "data-runtime-overview-panel": true,
70
+ ref,
71
+ ...rest,
72
+ children: [
73
+ /* @__PURE__ */ jsx("header", { children: /* @__PURE__ */ jsx("h3", { className: "text-xs font-semibold uppercase tracking-wide text-muted-foreground", children: title }) }),
74
+ metrics.length === 0 ? /* @__PURE__ */ jsx(
75
+ "p",
76
+ {
77
+ className: "px-2 py-3 text-center text-xs text-muted-foreground",
78
+ "data-runtime-state": "empty",
79
+ children: resolvedLabels.empty
80
+ }
81
+ ) : /* @__PURE__ */ jsx("ul", { className: "grid grid-cols-2 gap-1.5", "data-runtime-grid": true, children: metrics.map((metric) => /* @__PURE__ */ jsx(Tile, { metric }, metric.id)) })
82
+ ]
83
+ }
84
+ );
85
+ });
86
+ RuntimeOverviewPanel.displayName = "RuntimeOverviewPanel";
87
+ export {
88
+ RuntimeOverviewPanel
89
+ };
@@ -0,0 +1,12 @@
1
+ import {
2
+ SegmentedControl,
3
+ SegmentedControlItem,
4
+ segmentedControlItemVariants,
5
+ segmentedControlVariants
6
+ } from "./segmented-control";
7
+ export {
8
+ SegmentedControl,
9
+ SegmentedControlItem,
10
+ segmentedControlItemVariants,
11
+ segmentedControlVariants
12
+ };
@@ -0,0 +1,61 @@
1
+ "use client";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import * as React from "react";
4
+ import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
5
+ import { cva } from "class-variance-authority";
6
+ import { cn } from "../../lib/utils";
7
+ const segmentedControlVariants = cva(
8
+ "inline-flex w-full items-center rounded-lg bg-muted p-1 text-muted-foreground",
9
+ {
10
+ defaultVariants: {
11
+ size: "default"
12
+ },
13
+ variants: {
14
+ size: {
15
+ default: "min-h-10",
16
+ lg: "min-h-11",
17
+ sm: "min-h-9"
18
+ }
19
+ }
20
+ }
21
+ );
22
+ const segmentedControlItemVariants = cva(
23
+ "inline-flex flex-1 items-center justify-center rounded-md px-3 text-sm font-medium whitespace-nowrap transition-all outline-none ring-offset-background focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-background data-[state=on]:text-foreground data-[state=on]:shadow-sm",
24
+ {
25
+ defaultVariants: {
26
+ size: "default"
27
+ },
28
+ variants: {
29
+ size: {
30
+ default: "min-h-8",
31
+ lg: "min-h-9 px-4",
32
+ sm: "min-h-7 px-2.5 text-xs"
33
+ }
34
+ }
35
+ }
36
+ );
37
+ const SegmentedControl = React.forwardRef(({ className, size, ...props }, ref) => /* @__PURE__ */ jsx(
38
+ ToggleGroupPrimitive.Root,
39
+ {
40
+ className: cn(segmentedControlVariants({ size }), className),
41
+ ref,
42
+ type: "single",
43
+ ...props
44
+ }
45
+ ));
46
+ SegmentedControl.displayName = "SegmentedControl";
47
+ const SegmentedControlItem = React.forwardRef(({ className, size, ...props }, ref) => /* @__PURE__ */ jsx(
48
+ ToggleGroupPrimitive.Item,
49
+ {
50
+ className: cn(segmentedControlItemVariants({ size }), className),
51
+ ref,
52
+ ...props
53
+ }
54
+ ));
55
+ SegmentedControlItem.displayName = "SegmentedControlItem";
56
+ export {
57
+ SegmentedControl,
58
+ SegmentedControlItem,
59
+ segmentedControlItemVariants,
60
+ segmentedControlVariants
61
+ };
@@ -0,0 +1,6 @@
1
+ import {
2
+ SelectionHalo
3
+ } from "./selection-halo";
4
+ export {
5
+ SelectionHalo
6
+ };
@@ -0,0 +1,72 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import {
4
+ forwardRef
5
+ } from "react";
6
+ import { cn } from "../../lib/utils";
7
+ const DEFAULT_LABELS = {
8
+ region: "Selection"
9
+ };
10
+ const SelectionHalo = forwardRef(
11
+ (props, ref) => {
12
+ const {
13
+ bounds,
14
+ className,
15
+ label,
16
+ labels,
17
+ pulsing = false,
18
+ ...rest
19
+ } = props;
20
+ const resolvedLabels = { ...DEFAULT_LABELS, ...labels };
21
+ return /* @__PURE__ */ jsxs(
22
+ "div",
23
+ {
24
+ "aria-label": resolvedLabels.region,
25
+ className: cn(
26
+ "pointer-events-none absolute z-20 rounded-md ring-2 ring-primary",
27
+ pulsing ? "animate-pulse" : "",
28
+ className
29
+ ),
30
+ "data-pulsing": pulsing ? "true" : void 0,
31
+ "data-selection-halo": true,
32
+ ref,
33
+ style: {
34
+ height: `${bounds.height.toString()}px`,
35
+ left: `${bounds.x.toString()}px`,
36
+ top: `${bounds.y.toString()}px`,
37
+ width: `${bounds.width.toString()}px`
38
+ },
39
+ ...rest,
40
+ children: [
41
+ ["nw", "ne", "se", "sw"].map((corner) => /* @__PURE__ */ jsx(
42
+ "span",
43
+ {
44
+ "aria-hidden": "true",
45
+ className: cn(
46
+ "absolute h-2 w-2 rounded-sm border-2 border-primary bg-background",
47
+ corner === "nw" && "-left-1 -top-1",
48
+ corner === "ne" && "-right-1 -top-1",
49
+ corner === "se" && "-bottom-1 -right-1",
50
+ corner === "sw" && "-bottom-1 -left-1"
51
+ ),
52
+ "data-handle-corner": corner
53
+ },
54
+ corner
55
+ )),
56
+ label ? /* @__PURE__ */ jsx(
57
+ "span",
58
+ {
59
+ className: "absolute -top-6 left-0 inline-flex items-center rounded-md bg-primary px-1.5 py-0.5 text-[10px] font-semibold text-primary-foreground shadow-sm",
60
+ "data-selection-label": true,
61
+ children: label
62
+ }
63
+ ) : null
64
+ ]
65
+ }
66
+ );
67
+ }
68
+ );
69
+ SelectionHalo.displayName = "SelectionHalo";
70
+ export {
71
+ SelectionHalo
72
+ };
@@ -0,0 +1,6 @@
1
+ import {
2
+ SelectionPresence
3
+ } from "./selection-presence";
4
+ export {
5
+ SelectionPresence
6
+ };
@@ -0,0 +1,50 @@
1
+ "use client";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import {
4
+ forwardRef
5
+ } from "react";
6
+ import { cn } from "../../lib/utils";
7
+ const DEFAULT_LABELS = {
8
+ region: "Selection presence"
9
+ };
10
+ const SelectionPresence = forwardRef((props, ref) => {
11
+ const { className, color, height, labels, name, width, x, y, ...rest } = props;
12
+ const resolvedLabels = { ...DEFAULT_LABELS, ...labels };
13
+ const accent = color ?? "var(--foreground)";
14
+ const ariaLabel = typeof name === "string" ? `${resolvedLabels.region}: ${name}` : resolvedLabels.region;
15
+ return /* @__PURE__ */ jsx(
16
+ "div",
17
+ {
18
+ "aria-label": ariaLabel,
19
+ className: cn(
20
+ "pointer-events-none absolute z-20 rounded-md border-2 border-dashed",
21
+ className
22
+ ),
23
+ "data-selection-presence": true,
24
+ ref,
25
+ role: "img",
26
+ style: {
27
+ backgroundColor: `color-mix(in srgb, ${accent} 10%, transparent)`,
28
+ borderColor: accent,
29
+ height,
30
+ left: x,
31
+ top: y,
32
+ width
33
+ },
34
+ ...rest,
35
+ children: name === null || name === void 0 ? null : /* @__PURE__ */ jsx(
36
+ "span",
37
+ {
38
+ className: "absolute -top-5 left-0 inline-flex items-center rounded-md px-1.5 py-0.5 text-[10px] font-medium text-white shadow-sm",
39
+ "data-selection-presence-chip": true,
40
+ style: { backgroundColor: accent },
41
+ children: name
42
+ }
43
+ )
44
+ }
45
+ );
46
+ });
47
+ SelectionPresence.displayName = "SelectionPresence";
48
+ export {
49
+ SelectionPresence
50
+ };
@@ -0,0 +1,6 @@
1
+ import {
2
+ SnapGuides
3
+ } from "./snap-guides";
4
+ export {
5
+ SnapGuides
6
+ };
@@ -0,0 +1,45 @@
1
+ "use client";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { forwardRef } from "react";
4
+ import { cn } from "../../lib/utils";
5
+ const DEFAULT_LABELS = {
6
+ region: "Snap guides"
7
+ };
8
+ const SnapGuides = forwardRef(
9
+ (props, ref) => {
10
+ const { className, guides, labels, ...rest } = props;
11
+ const resolvedLabels = { ...DEFAULT_LABELS, ...labels };
12
+ return /* @__PURE__ */ jsx(
13
+ "div",
14
+ {
15
+ "aria-label": resolvedLabels.region,
16
+ className: cn("pointer-events-none absolute inset-0 z-30", className),
17
+ "data-snap-guide-count": guides.length,
18
+ ref,
19
+ ...rest,
20
+ children: guides.map((guide) => {
21
+ const isVertical = guide.orientation === "vertical";
22
+ const offset = isVertical ? guide.x : guide.y;
23
+ return /* @__PURE__ */ jsx(
24
+ "span",
25
+ {
26
+ "aria-hidden": "true",
27
+ className: cn(
28
+ "absolute border-primary/70",
29
+ isVertical ? "inset-y-0 w-px border-l border-dashed" : "inset-x-0 h-px border-t border-dashed"
30
+ ),
31
+ "data-snap-guide-id": guide.id,
32
+ "data-snap-orientation": guide.orientation,
33
+ style: isVertical ? { left: `${offset.toString()}px` } : { top: `${offset.toString()}px` }
34
+ },
35
+ guide.id
36
+ );
37
+ })
38
+ }
39
+ );
40
+ }
41
+ );
42
+ SnapGuides.displayName = "SnapGuides";
43
+ export {
44
+ SnapGuides
45
+ };
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { jsx, jsxs } from "react/jsx-runtime";
2
3
  import * as React from "react";
3
4
  import { cn } from "../../lib/utils";
@@ -0,0 +1,6 @@
1
+ import {
2
+ StateBadgeOverlay
3
+ } from "./state-badge-overlay";
4
+ export {
5
+ StateBadgeOverlay
6
+ };
@@ -0,0 +1,90 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import {
4
+ forwardRef
5
+ } from "react";
6
+ import { cn } from "../../lib/utils";
7
+ const STATE_LABEL = {
8
+ complete: "Complete",
9
+ failed: "Failed",
10
+ idle: "Idle",
11
+ queued: "Queued",
12
+ running: "Running",
13
+ stopped: "Stopped"
14
+ };
15
+ const STATE_TONE = {
16
+ complete: "border-emerald-500/40 bg-emerald-500/15 text-emerald-700 dark:text-emerald-300",
17
+ failed: "border-red-500/40 bg-red-500/15 text-red-700 dark:text-red-300",
18
+ idle: "border-border bg-muted/40 text-muted-foreground",
19
+ queued: "border-amber-500/40 bg-amber-500/15 text-amber-700 dark:text-amber-300",
20
+ running: "border-blue-500/40 bg-blue-500/15 text-blue-700 dark:text-blue-300",
21
+ stopped: "border-border bg-background text-foreground"
22
+ };
23
+ const STATE_DOT = {
24
+ complete: "bg-emerald-500",
25
+ failed: "bg-red-500",
26
+ idle: "bg-muted-foreground",
27
+ queued: "bg-amber-500",
28
+ running: "bg-blue-500 animate-pulse",
29
+ stopped: "bg-muted-foreground"
30
+ };
31
+ const ANCHOR_TRANSFORM = {
32
+ "bottom-left": "translate(-100%, 100%)",
33
+ "bottom-right": "translate(0%, 100%)",
34
+ "top-left": "translate(-100%, -100%)",
35
+ "top-right": "translate(0%, -100%)"
36
+ };
37
+ const DEFAULT_LABELS = {
38
+ region: "State"
39
+ };
40
+ const StateBadgeOverlay = forwardRef((props, ref) => {
41
+ const {
42
+ anchor = "top-right",
43
+ className,
44
+ label,
45
+ labels,
46
+ state,
47
+ x,
48
+ y,
49
+ ...rest
50
+ } = props;
51
+ const resolvedLabels = { ...DEFAULT_LABELS, ...labels };
52
+ const text = label ?? STATE_LABEL[state];
53
+ return /* @__PURE__ */ jsxs(
54
+ "div",
55
+ {
56
+ "aria-label": `${resolvedLabels.region}: ${STATE_LABEL[state]}`,
57
+ className: cn(
58
+ "pointer-events-none absolute z-20 inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-[10px] font-medium uppercase tracking-wide shadow-sm backdrop-blur",
59
+ STATE_TONE[state],
60
+ className
61
+ ),
62
+ "data-state-anchor": anchor,
63
+ "data-state-badge-overlay": true,
64
+ "data-state-name": state,
65
+ ref,
66
+ role: "status",
67
+ style: {
68
+ left: x,
69
+ top: y,
70
+ transform: ANCHOR_TRANSFORM[anchor]
71
+ },
72
+ ...rest,
73
+ children: [
74
+ /* @__PURE__ */ jsx(
75
+ "span",
76
+ {
77
+ "aria-hidden": "true",
78
+ className: cn("h-1.5 w-1.5 rounded-full", STATE_DOT[state]),
79
+ "data-state-badge-dot": true
80
+ }
81
+ ),
82
+ text
83
+ ]
84
+ }
85
+ );
86
+ });
87
+ StateBadgeOverlay.displayName = "StateBadgeOverlay";
88
+ export {
89
+ StateBadgeOverlay
90
+ };
@@ -0,0 +1,6 @@
1
+ import {
2
+ StickyMetric
3
+ } from "./sticky-metric";
4
+ export {
5
+ StickyMetric
6
+ };
@@ -0,0 +1,83 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import {
4
+ forwardRef
5
+ } from "react";
6
+ import { cn } from "../../lib/utils";
7
+ const TONE_DOT = {
8
+ danger: "bg-red-500",
9
+ neutral: "bg-muted-foreground",
10
+ success: "bg-emerald-500",
11
+ warn: "bg-amber-500"
12
+ };
13
+ const ANCHOR_OFFSET = {
14
+ "bottom-left": { transform: "translate(-100%, 100%)" },
15
+ "bottom-right": { transform: "translate(0%, 100%)" },
16
+ "top-left": { transform: "translate(-100%, -100%)" },
17
+ "top-right": { transform: "translate(0%, -100%)" }
18
+ };
19
+ const DEFAULT_LABELS = {
20
+ region: "Sticky metric"
21
+ };
22
+ const StickyMetric = forwardRef(
23
+ (props, ref) => {
24
+ const {
25
+ anchor = "top-right",
26
+ className,
27
+ detail,
28
+ label,
29
+ labels,
30
+ tone = "neutral",
31
+ value,
32
+ x,
33
+ y,
34
+ ...rest
35
+ } = props;
36
+ const resolvedLabels = { ...DEFAULT_LABELS, ...labels };
37
+ return /* @__PURE__ */ jsxs(
38
+ "div",
39
+ {
40
+ "aria-label": resolvedLabels.region,
41
+ className: cn(
42
+ "pointer-events-none absolute z-20 inline-flex items-center gap-1.5 rounded-full border border-border bg-background/90 px-2 py-1 text-[11px] shadow-sm backdrop-blur",
43
+ className
44
+ ),
45
+ "data-sticky-anchor": anchor,
46
+ "data-sticky-metric": true,
47
+ "data-sticky-tone": tone,
48
+ ref,
49
+ role: "status",
50
+ style: {
51
+ left: x,
52
+ top: y,
53
+ transform: ANCHOR_OFFSET[anchor].transform
54
+ },
55
+ ...rest,
56
+ children: [
57
+ /* @__PURE__ */ jsx(
58
+ "span",
59
+ {
60
+ "aria-hidden": "true",
61
+ className: cn("h-1.5 w-1.5 rounded-full", TONE_DOT[tone]),
62
+ "data-sticky-metric-dot": true
63
+ }
64
+ ),
65
+ /* @__PURE__ */ jsx("span", { className: "font-medium text-muted-foreground", children: label }),
66
+ /* @__PURE__ */ jsx("span", { className: "font-semibold text-foreground", children: value }),
67
+ detail ? /* @__PURE__ */ jsx(
68
+ "span",
69
+ {
70
+ className: "text-[10px] text-muted-foreground",
71
+ "data-sticky-metric-detail": true,
72
+ children: detail
73
+ }
74
+ ) : null
75
+ ]
76
+ }
77
+ );
78
+ }
79
+ );
80
+ StickyMetric.displayName = "StickyMetric";
81
+ export {
82
+ StickyMetric
83
+ };
@@ -0,0 +1,8 @@
1
+ import {
2
+ StoryMap,
3
+ StoryMapChapter
4
+ } from "./story-map";
5
+ export {
6
+ StoryMap,
7
+ StoryMapChapter
8
+ };