@plures/design-dojo 0.5.0 → 0.5.1

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 (100) hide show
  1. package/dist/design-dojo.css +1 -0
  2. package/dist/enforce/index.d.ts +75 -0
  3. package/dist/enforce/known-components.d.ts +7 -0
  4. package/dist/enforce/rules/no-local-components.d.ts +29 -0
  5. package/dist/enforce/rules/prefer-design-dojo-imports.d.ts +27 -0
  6. package/dist/enforce.js +132 -0
  7. package/dist/index.js +5671 -1725
  8. package/dist/lib/app/CanvasBreadcrumb.types.d.ts +7 -0
  9. package/dist/lib/app/ProcedureCanvas.types.d.ts +58 -0
  10. package/dist/lib/app/Realm.types.d.ts +21 -0
  11. package/dist/lib/app/SemanticConversation.types.d.ts +43 -0
  12. package/dist/lib/app/SemanticSearchInput.types.d.ts +15 -0
  13. package/dist/lib/app/SubCanvas.types.d.ts +16 -0
  14. package/dist/lib/app/Sync.types.d.ts +33 -0
  15. package/dist/lib/disclosure/Accordion.svelte.d.ts +1 -0
  16. package/dist/lib/feedback/Badge.svelte.d.ts +1 -0
  17. package/dist/lib/feedback/Callout.svelte.d.ts +1 -0
  18. package/dist/lib/feedback/EmptyState.svelte.d.ts +1 -0
  19. package/dist/lib/feedback/ProgressBar.svelte.d.ts +1 -0
  20. package/dist/lib/forms/FileUpload.svelte.d.ts +1 -0
  21. package/dist/lib/forms/RadioGroup.svelte.d.ts +1 -0
  22. package/dist/lib/icons/NerdFont.svelte.d.ts +1 -0
  23. package/dist/lib/index.d.ts +76 -0
  24. package/dist/lib/layout/Box.svelte.d.ts +1 -0
  25. package/dist/lib/layout/Sidebar.svelte.d.ts +1 -0
  26. package/dist/lib/layout/SplitPane.svelte.d.ts +1 -0
  27. package/dist/lib/layout/StatusBar.svelte.d.ts +1 -0
  28. package/dist/lib/layout/StatusBarItem.svelte.d.ts +1 -0
  29. package/dist/lib/layout/StatusBarSpacer.svelte.d.ts +1 -0
  30. package/dist/lib/layout/Tabs.svelte.d.ts +1 -0
  31. package/dist/lib/layout/Tabs.types.d.ts +10 -0
  32. package/dist/lib/layout/TitleBar.svelte.d.ts +1 -0
  33. package/dist/{layout → lib/layout}/index.d.ts +4 -0
  34. package/dist/lib/overlays/ContextMenu.svelte.d.ts +1 -0
  35. package/dist/lib/overlays/Dialog.svelte.d.ts +1 -0
  36. package/dist/lib/overlays/Menu.svelte.d.ts +1 -0
  37. package/dist/lib/overlays/Menu.types.d.ts +14 -0
  38. package/dist/lib/overlays/Popover.svelte.d.ts +1 -0
  39. package/dist/lib/overlays/Toast.svelte.d.ts +1 -0
  40. package/dist/lib/overlays/Tooltip.svelte.d.ts +1 -0
  41. package/dist/lib/overlays/index.d.ts +7 -0
  42. package/dist/lib/primitives/Button.svelte.d.ts +1 -0
  43. package/dist/lib/primitives/ContextMenu.svelte.d.ts +1 -0
  44. package/dist/lib/primitives/ContextMenu.types.d.ts +22 -0
  45. package/dist/lib/primitives/Input.svelte.d.ts +1 -0
  46. package/dist/lib/primitives/MarkdownEditor.svelte.d.ts +1 -0
  47. package/dist/lib/primitives/MarkdownEditor.types.d.ts +1 -0
  48. package/dist/lib/primitives/SearchInput.svelte.d.ts +1 -0
  49. package/dist/lib/primitives/Select.svelte.d.ts +1 -0
  50. package/dist/lib/primitives/Text.svelte.d.ts +1 -0
  51. package/dist/lib/primitives/Toggle.svelte.d.ts +1 -0
  52. package/dist/{primitives → lib/primitives}/index.d.ts +2 -0
  53. package/dist/lib/surfaces/ChatPane.svelte.d.ts +1 -0
  54. package/dist/lib/surfaces/GlassPanel.svelte.d.ts +1 -0
  55. package/dist/lib/surfaces/Pane.svelte.d.ts +1 -0
  56. package/dist/telemetry/correlation.d.ts +11 -0
  57. package/dist/telemetry/index.d.ts +21 -0
  58. package/dist/telemetry/index.js +101 -0
  59. package/dist/telemetry/sampling.d.ts +24 -0
  60. package/dist/telemetry/tracer.d.ts +82 -0
  61. package/package.json +20 -1
  62. package/dist/index.css +0 -1
  63. package/dist/index.d.ts +0 -33
  64. /package/dist/{app/ChatInput.svelte.d.ts → lib/app/CanvasBreadcrumb.svelte.d.ts} +0 -0
  65. /package/dist/{app/ChatView.svelte.d.ts → lib/app/ChatInput.svelte.d.ts} +0 -0
  66. /package/dist/{app/FirstRunWizard.svelte.d.ts → lib/app/ChatView.svelte.d.ts} +0 -0
  67. /package/dist/{app → lib/app}/ChatView.types.d.ts +0 -0
  68. /package/dist/{app/MemorySidebar.svelte.d.ts → lib/app/ConversationGraph.svelte.d.ts} +0 -0
  69. /package/dist/{app/ProcedureEditor.svelte.d.ts → lib/app/FirstRunWizard.svelte.d.ts} +0 -0
  70. /package/dist/{app → lib/app}/FirstRunWizard.types.d.ts +0 -0
  71. /package/dist/{app/SettingsPanel.svelte.d.ts → lib/app/MemorySidebar.svelte.d.ts} +0 -0
  72. /package/dist/{app → lib/app}/MemorySidebar.types.d.ts +0 -0
  73. /package/dist/{data/List.svelte.d.ts → lib/app/PeerStatusPanel.svelte.d.ts} +0 -0
  74. /package/dist/{data/ListItem.svelte.d.ts → lib/app/ProcedureCanvas.svelte.d.ts} +0 -0
  75. /package/dist/{data/Table.svelte.d.ts → lib/app/ProcedureEditor.svelte.d.ts} +0 -0
  76. /package/dist/{app → lib/app}/ProcedureEditor.types.d.ts +0 -0
  77. /package/dist/{icons/NerdFont.svelte.d.ts → lib/app/ProcedureInspector.svelte.d.ts} +0 -0
  78. /package/dist/{layout/Box.svelte.d.ts → lib/app/ProcedureNode.svelte.d.ts} +0 -0
  79. /package/dist/{layout/SplitPane.svelte.d.ts → lib/app/RealmIndicator.svelte.d.ts} +0 -0
  80. /package/dist/{layout/StatusBar.svelte.d.ts → lib/app/RealmSwitcher.svelte.d.ts} +0 -0
  81. /package/dist/{layout/StatusBarItem.svelte.d.ts → lib/app/SemanticSearchInput.svelte.d.ts} +0 -0
  82. /package/dist/{layout/StatusBarSpacer.svelte.d.ts → lib/app/SemanticTimeline.svelte.d.ts} +0 -0
  83. /package/dist/{primitives/Button.svelte.d.ts → lib/app/SettingsPanel.svelte.d.ts} +0 -0
  84. /package/dist/{app → lib/app}/SettingsPanel.types.d.ts +0 -0
  85. /package/dist/{primitives/Input.svelte.d.ts → lib/app/SubCanvas.svelte.d.ts} +0 -0
  86. /package/dist/{primitives/SearchInput.svelte.d.ts → lib/app/SyncIndicator.svelte.d.ts} +0 -0
  87. /package/dist/{primitives/Select.svelte.d.ts → lib/app/SyncTimeline.svelte.d.ts} +0 -0
  88. /package/dist/{primitives/Text.svelte.d.ts → lib/app/TagCloud.svelte.d.ts} +0 -0
  89. /package/dist/{primitives/Toggle.svelte.d.ts → lib/app/WorkModeToggle.svelte.d.ts} +0 -0
  90. /package/dist/{surfaces/ChatPane.svelte.d.ts → lib/data/List.svelte.d.ts} +0 -0
  91. /package/dist/{surfaces/GlassPanel.svelte.d.ts → lib/data/ListItem.svelte.d.ts} +0 -0
  92. /package/dist/{surfaces/Pane.svelte.d.ts → lib/data/Table.svelte.d.ts} +0 -0
  93. /package/dist/{data → lib/data}/index.d.ts +0 -0
  94. /package/dist/{icons → lib/icons}/index.d.ts +0 -0
  95. /package/dist/{motion → lib/motion}/index.d.ts +0 -0
  96. /package/dist/{motion → lib/motion}/spring.d.ts +0 -0
  97. /package/dist/{primitives → lib/primitives}/search-input-types.d.ts +0 -0
  98. /package/dist/{surfaces → lib/surfaces}/ChatPane.types.d.ts +0 -0
  99. /package/dist/{surfaces → lib/surfaces}/index.d.ts +0 -0
  100. /package/dist/{useTui.d.ts → lib/useTui.d.ts} +0 -0
@@ -0,0 +1,7 @@
1
+ /** A single segment in a canvas navigation path. */
2
+ export interface CanvasPathSegment {
3
+ /** Unique identifier (typically the node id that was entered). */
4
+ id: string;
5
+ /** Human-readable label shown in the breadcrumb. */
6
+ label: string;
7
+ }
@@ -0,0 +1,58 @@
1
+ /** A single port on a canvas node (input or output). */
2
+ export interface Port {
3
+ id: string;
4
+ label: string;
5
+ }
6
+ export type NodeType = "event" | "procedure" | "action" | "condition" | "gate";
7
+ export type NodeStatus = "active" | "inactive" | "error";
8
+ /** A node on the procedure canvas. */
9
+ export interface CanvasNode {
10
+ id: string;
11
+ type: NodeType;
12
+ label: string;
13
+ position: {
14
+ x: number;
15
+ y: number;
16
+ };
17
+ config: Record<string, unknown>;
18
+ ports: {
19
+ inputs: Port[];
20
+ outputs: Port[];
21
+ };
22
+ status?: NodeStatus;
23
+ /**
24
+ * Optional nested canvas. When present the node can be double-clicked
25
+ * (or activated via the context menu) to drill into its sub-canvas.
26
+ */
27
+ subCanvas?: ProcedureCanvasState;
28
+ }
29
+ /** A directed edge connecting an output port to an input port. */
30
+ export interface CanvasEdge {
31
+ id: string;
32
+ from: {
33
+ nodeId: string;
34
+ port: string;
35
+ };
36
+ to: {
37
+ nodeId: string;
38
+ port: string;
39
+ };
40
+ label?: string;
41
+ }
42
+ /** Full canvas state, suitable for persistence. */
43
+ export interface ProcedureCanvasState {
44
+ nodes: CanvasNode[];
45
+ edges: CanvasEdge[];
46
+ viewport: {
47
+ x: number;
48
+ y: number;
49
+ zoom: number;
50
+ };
51
+ }
52
+ /** Ephemeral draft edge while the user is dragging from a port. */
53
+ export interface DraftEdge {
54
+ fromNodeId: string;
55
+ fromPort: string;
56
+ toX: number;
57
+ toY: number;
58
+ }
@@ -0,0 +1,21 @@
1
+ /** Realm type — personal sovereign data, a work org, or a sub-realm. */
2
+ export type RealmType = "personal" | "org" | "sub-realm";
3
+ /**
4
+ * A realm represents an isolated PluresDB topic partition.
5
+ * Switching realms changes which database partition the agent reads from —
6
+ * this is physical isolation, not a policy filter.
7
+ */
8
+ export interface Realm {
9
+ id: string;
10
+ name: string;
11
+ type: RealmType;
12
+ /** Accent color for the app chrome when this realm is active. */
13
+ color: string;
14
+ icon?: string;
15
+ /** PluresDB Hyperswarm topic key. */
16
+ topicKey: string;
17
+ unreadCount: number;
18
+ lastActive: Date;
19
+ /** Active channel IDs in this realm. */
20
+ channels: string[];
21
+ }
@@ -0,0 +1,43 @@
1
+ /** A semantic tag auto-generated from embedding cluster analysis. */
2
+ export interface SemanticTag {
3
+ /** Auto-generated label derived from cluster centroid. */
4
+ label: string;
5
+ /** Number of messages in this cluster. */
6
+ count: number;
7
+ /** Timestamp (ms since epoch) of the most recent message in this cluster. */
8
+ recency: number;
9
+ /** Nested sub-clusters for drill-down navigation. */
10
+ subtags?: SemanticTag[];
11
+ /** PluresDB message IDs belonging to this cluster. */
12
+ messageIds: string[];
13
+ }
14
+ /** A single message that has been assigned to a semantic cluster. */
15
+ export interface ClusteredMessage {
16
+ id: string;
17
+ content: string;
18
+ author: string;
19
+ timestamp: Date;
20
+ type: "user" | "agent" | "system";
21
+ /** Pre-computed 2-D projection coordinates for graph layout (0–1 range). */
22
+ x?: number;
23
+ y?: number;
24
+ }
25
+ /** A group of messages that share semantic similarity above a threshold. */
26
+ export interface ConversationCluster {
27
+ id: string;
28
+ tags: SemanticTag[];
29
+ messages: ClusteredMessage[];
30
+ /** Average intra-cluster cosine similarity (0–1). */
31
+ similarity: number;
32
+ timespan: {
33
+ start: Date;
34
+ end: Date;
35
+ };
36
+ }
37
+ /** A directed edge between two messages in a ConversationGraph. */
38
+ export interface SimilarityEdge {
39
+ sourceId: string;
40
+ targetId: string;
41
+ /** Cosine similarity score (0–1). */
42
+ score: number;
43
+ }
@@ -0,0 +1,15 @@
1
+ /** Search mode selected by the current input prefix. */
2
+ export type SearchMode = "semantic" | "tag" | "entity" | "command";
3
+ /** A single result returned by the onquery callback. */
4
+ export interface SemanticSearchResult {
5
+ id: string;
6
+ text: string;
7
+ category: string;
8
+ timestamp: Date;
9
+ /** Cosine / vector similarity in [0, 1]. */
10
+ similarity: number;
11
+ /** Optional short excerpt shown on hover/keyboard focus. */
12
+ snippet?: string;
13
+ /** Optional emoji or single-char icon displayed before the text. */
14
+ icon?: string;
15
+ }
@@ -0,0 +1,16 @@
1
+ /** Position and size of a SubCanvas on a canvas surface. */
2
+ export interface SubCanvasBounds {
3
+ x: number;
4
+ y: number;
5
+ width: number;
6
+ height: number;
7
+ }
8
+ /** Full serialisable state of a SubCanvas node. */
9
+ export interface SubCanvasState extends SubCanvasBounds {
10
+ id: string;
11
+ label: string;
12
+ /** Nesting depth — 0 = top-level department, 1 = team, 2 = primitive group, … */
13
+ depth?: number;
14
+ /** If set, identifies another canvas linked to this node; consumers can use this ID to handle navigation externally. */
15
+ linkedCanvasId?: string;
16
+ }
@@ -0,0 +1,33 @@
1
+ /** Operating system identifier for a peer device. */
2
+ export type PeerOS = "windows" | "macos" | "linux" | "android" | "ios";
3
+ /** Overall sync status shown in the SyncIndicator. */
4
+ export type SyncStatus = "synced" | "syncing" | "offline" | "conflict";
5
+ /** Connection and sync state of an individual peer device. */
6
+ export type PeerStatus = "connected" | "syncing" | "offline" | "conflict";
7
+ /** Direction of data flow for a sync operation. */
8
+ export type SyncDirection = "push" | "pull" | "bidirectional";
9
+ /** PluresDB record type being synchronised. */
10
+ export type SyncRecordType = "memory" | "procedure" | "state" | "ledger";
11
+ /** A remote peer device visible over Hyperswarm. */
12
+ export interface Peer {
13
+ id: string;
14
+ name: string;
15
+ os: PeerOS;
16
+ lastSyncAt: Date;
17
+ /** Round-trip latency in milliseconds. */
18
+ latencyMs: number;
19
+ status: PeerStatus;
20
+ syncDirection: SyncDirection;
21
+ }
22
+ /** A single discrete sync event (one batch of records exchanged). */
23
+ export interface SyncEvent {
24
+ id: string;
25
+ timestamp: Date;
26
+ peerId: string;
27
+ /** PluresDB record type that was synced. */
28
+ type: SyncRecordType;
29
+ /** Number of records exchanged. */
30
+ count: number;
31
+ /** Whether records flowed in to this device or out to the peer. */
32
+ direction: "in" | "out";
33
+ }
@@ -0,0 +1 @@
1
+ export { SvelteComponent as default } from 'svelte';
@@ -0,0 +1 @@
1
+ export { SvelteComponent as default } from 'svelte';
@@ -0,0 +1 @@
1
+ export { SvelteComponent as default } from 'svelte';
@@ -0,0 +1 @@
1
+ export { SvelteComponent as default } from 'svelte';
@@ -0,0 +1 @@
1
+ export { SvelteComponent as default } from 'svelte';
@@ -0,0 +1 @@
1
+ export { SvelteComponent as default } from 'svelte';
@@ -0,0 +1 @@
1
+ export { SvelteComponent as default } from 'svelte';
@@ -0,0 +1 @@
1
+ export { SvelteComponent as default } from 'svelte';
@@ -0,0 +1,76 @@
1
+ export { default as Button } from './primitives/Button.svelte';
2
+ export { default as Input } from './primitives/Input.svelte';
3
+ export { default as MarkdownEditor } from './primitives/MarkdownEditor.svelte';
4
+ export type { MarkdownEditorMode } from './primitives/MarkdownEditor.types.js';
5
+ export { default as Select } from './primitives/Select.svelte';
6
+ export { default as Toggle } from './primitives/Toggle.svelte';
7
+ export { default as Text } from './primitives/Text.svelte';
8
+ export { default as SearchInput } from './primitives/SearchInput.svelte';
9
+ export type { SearchResult } from './primitives/search-input-types';
10
+ export type { ContextMenuItem, ContextMenuActionItem, ContextMenuSeparatorItem } from './primitives/ContextMenu.types.js';
11
+ export { default as Box } from './layout/Box.svelte';
12
+ export { default as SplitPane } from './layout/SplitPane.svelte';
13
+ export { default as StatusBar } from './layout/StatusBar.svelte';
14
+ export { default as StatusBarItem } from './layout/StatusBarItem.svelte';
15
+ export { default as StatusBarSpacer } from './layout/StatusBarSpacer.svelte';
16
+ export { default as Tabs } from './layout/Tabs.svelte';
17
+ export { default as Sidebar } from './layout/Sidebar.svelte';
18
+ export { default as TitleBar } from './layout/TitleBar.svelte';
19
+ export type { Tab } from './layout/Tabs.types.js';
20
+ export { default as Tooltip } from './overlays/Tooltip.svelte';
21
+ export { default as Popover } from './overlays/Popover.svelte';
22
+ export { default as Dialog } from './overlays/Dialog.svelte';
23
+ export { default as Toast } from './overlays/Toast.svelte';
24
+ export { default as Menu } from './overlays/Menu.svelte';
25
+ export { default as ContextMenu } from './overlays/ContextMenu.svelte';
26
+ export type { MenuItem } from './overlays/Menu.types.js';
27
+ export { default as Table } from './data/Table.svelte';
28
+ export { default as List } from './data/List.svelte';
29
+ export { default as ListItem } from './data/ListItem.svelte';
30
+ export { default as GlassPanel } from './surfaces/GlassPanel.svelte';
31
+ export { default as Pane } from './surfaces/Pane.svelte';
32
+ export { default as ChatPane } from './surfaces/ChatPane.svelte';
33
+ export type { ChatMessage } from './surfaces/ChatPane.types.js';
34
+ export { default as ProgressBar } from './feedback/ProgressBar.svelte';
35
+ export { default as Badge } from './feedback/Badge.svelte';
36
+ export { default as Callout } from './feedback/Callout.svelte';
37
+ export { default as EmptyState } from './feedback/EmptyState.svelte';
38
+ export { default as RadioGroup } from './forms/RadioGroup.svelte';
39
+ export { default as FileUpload } from './forms/FileUpload.svelte';
40
+ export { default as Accordion } from './disclosure/Accordion.svelte';
41
+ export { createSpring, SPRING_PRESETS } from './motion/spring.js';
42
+ export { default as NerdFont } from './icons/NerdFont.svelte';
43
+ export { useTui, provideTui } from './useTui';
44
+ export { default as ChatView } from './app/ChatView.svelte';
45
+ export type { ChatViewMessage, ChatViewMode } from './app/ChatView.types.js';
46
+ export { default as ChatInput } from './app/ChatInput.svelte';
47
+ export { default as MemorySidebar } from './app/MemorySidebar.svelte';
48
+ export type { Memory, MemoryCategory } from './app/MemorySidebar.types.js';
49
+ export { default as SettingsPanel } from './app/SettingsPanel.svelte';
50
+ export type { AgentSettings, ModelConfig, ChannelConfig, ChannelType } from './app/SettingsPanel.types.js';
51
+ export { default as ProcedureEditor } from './app/ProcedureEditor.svelte';
52
+ export type { Procedure } from './app/ProcedureEditor.types.js';
53
+ export { default as ProcedureCanvas } from './app/ProcedureCanvas.svelte';
54
+ export { default as ProcedureNode } from './app/ProcedureNode.svelte';
55
+ export { default as ProcedureInspector } from './app/ProcedureInspector.svelte';
56
+ export type { CanvasNode, CanvasEdge, Port, NodeType, NodeStatus, ProcedureCanvasState, DraftEdge } from './app/ProcedureCanvas.types.js';
57
+ export { default as CanvasBreadcrumb } from './app/CanvasBreadcrumb.svelte';
58
+ export type { CanvasPathSegment } from './app/CanvasBreadcrumb.types.js';
59
+ export { default as FirstRunWizard } from './app/FirstRunWizard.svelte';
60
+ export type { WizardData, WizardStep } from './app/FirstRunWizard.types.js';
61
+ export { default as TagCloud } from './app/TagCloud.svelte';
62
+ export { default as ConversationGraph } from './app/ConversationGraph.svelte';
63
+ export { default as SemanticTimeline } from './app/SemanticTimeline.svelte';
64
+ export type { SemanticTag, ClusteredMessage, ConversationCluster, SimilarityEdge } from './app/SemanticConversation.types.js';
65
+ export { default as SemanticSearchInput } from './app/SemanticSearchInput.svelte';
66
+ export type { SearchMode, SemanticSearchResult } from './app/SemanticSearchInput.types.js';
67
+ export { default as RealmSwitcher } from './app/RealmSwitcher.svelte';
68
+ export { default as WorkModeToggle } from './app/WorkModeToggle.svelte';
69
+ export { default as RealmIndicator } from './app/RealmIndicator.svelte';
70
+ export type { RealmType, Realm } from './app/Realm.types.js';
71
+ export { default as SyncIndicator } from './app/SyncIndicator.svelte';
72
+ export { default as PeerStatusPanel } from './app/PeerStatusPanel.svelte';
73
+ export { default as SyncTimeline } from './app/SyncTimeline.svelte';
74
+ export type { Peer, SyncEvent, SyncStatus, PeerStatus, SyncDirection, SyncRecordType, PeerOS } from './app/Sync.types.js';
75
+ export { default as SubCanvas } from './app/SubCanvas.svelte';
76
+ export type { SubCanvasBounds, SubCanvasState } from './app/SubCanvas.types.js';
@@ -0,0 +1 @@
1
+ export { SvelteComponent as default } from 'svelte';
@@ -0,0 +1 @@
1
+ export { SvelteComponent as default } from 'svelte';
@@ -0,0 +1 @@
1
+ export { SvelteComponent as default } from 'svelte';
@@ -0,0 +1 @@
1
+ export { SvelteComponent as default } from 'svelte';
@@ -0,0 +1 @@
1
+ export { SvelteComponent as default } from 'svelte';
@@ -0,0 +1 @@
1
+ export { SvelteComponent as default } from 'svelte';
@@ -0,0 +1 @@
1
+ export { SvelteComponent as default } from 'svelte';
@@ -0,0 +1,10 @@
1
+ export interface Tab {
2
+ /** Unique key. */
3
+ key: string;
4
+ /** Display label. */
5
+ label: string;
6
+ /** Optional icon or leading character. */
7
+ icon?: string;
8
+ /** Whether this tab is disabled. */
9
+ disabled?: boolean;
10
+ }
@@ -0,0 +1 @@
1
+ export { SvelteComponent as default } from 'svelte';
@@ -3,3 +3,7 @@ export { default as SplitPane } from './SplitPane.svelte';
3
3
  export { default as StatusBar } from './StatusBar.svelte';
4
4
  export { default as StatusBarItem } from './StatusBarItem.svelte';
5
5
  export { default as StatusBarSpacer } from './StatusBarSpacer.svelte';
6
+ export { default as Tabs } from './Tabs.svelte';
7
+ export { default as Sidebar } from './Sidebar.svelte';
8
+ export { default as TitleBar } from './TitleBar.svelte';
9
+ export type { Tab } from './Tabs.types.js';
@@ -0,0 +1 @@
1
+ export { SvelteComponent as default } from 'svelte';
@@ -0,0 +1 @@
1
+ export { SvelteComponent as default } from 'svelte';
@@ -0,0 +1 @@
1
+ export { SvelteComponent as default } from 'svelte';
@@ -0,0 +1,14 @@
1
+ export interface MenuItem {
2
+ /** Unique key. */
3
+ key: string;
4
+ /** Display label. */
5
+ label: string;
6
+ /** Optional keyboard shortcut hint. */
7
+ shortcut?: string;
8
+ /** Optional icon or leading character. */
9
+ icon?: string;
10
+ /** Separator line before this item. */
11
+ separator?: boolean;
12
+ /** Whether this item is non-interactive. */
13
+ disabled?: boolean;
14
+ }
@@ -0,0 +1 @@
1
+ export { SvelteComponent as default } from 'svelte';
@@ -0,0 +1 @@
1
+ export { SvelteComponent as default } from 'svelte';
@@ -0,0 +1 @@
1
+ export { SvelteComponent as default } from 'svelte';
@@ -0,0 +1,7 @@
1
+ export { default as Tooltip } from './Tooltip.svelte';
2
+ export { default as Popover } from './Popover.svelte';
3
+ export { default as Dialog } from './Dialog.svelte';
4
+ export { default as Toast } from './Toast.svelte';
5
+ export { default as Menu } from './Menu.svelte';
6
+ export { default as ContextMenu } from './ContextMenu.svelte';
7
+ export type { MenuItem } from './Menu.types.js';
@@ -0,0 +1 @@
1
+ export { SvelteComponent as default } from 'svelte';
@@ -0,0 +1 @@
1
+ export { SvelteComponent as default } from 'svelte';
@@ -0,0 +1,22 @@
1
+ /** A separator item in a ContextMenu (visual rule / divider only). */
2
+ export type ContextMenuSeparatorItem = {
3
+ /** When true the item renders as a visual rule / divider. */
4
+ separator: true;
5
+ };
6
+ /** An actionable item in a ContextMenu. */
7
+ export type ContextMenuActionItem = {
8
+ /** When true the item renders as a visual rule / divider. */
9
+ separator?: false;
10
+ /** Unique identifier for the item. Not required on separator rows. */
11
+ id: string;
12
+ /** Display label. */
13
+ label: string;
14
+ /** Optional leading icon (Unicode character, emoji, or Nerd Font glyph). */
15
+ icon?: string;
16
+ /** Keyboard shortcut hint shown on the right. */
17
+ shortcut?: string;
18
+ /** When true the item is shown but cannot be activated. */
19
+ disabled?: boolean;
20
+ };
21
+ /** A single item in a ContextMenu. */
22
+ export type ContextMenuItem = ContextMenuSeparatorItem | ContextMenuActionItem;
@@ -0,0 +1 @@
1
+ export { SvelteComponent as default } from 'svelte';
@@ -0,0 +1 @@
1
+ export { SvelteComponent as default } from 'svelte';
@@ -0,0 +1 @@
1
+ export type MarkdownEditorMode = "edit" | "preview" | "split";
@@ -0,0 +1 @@
1
+ export { SvelteComponent as default } from 'svelte';
@@ -0,0 +1 @@
1
+ export { SvelteComponent as default } from 'svelte';
@@ -0,0 +1 @@
1
+ export { SvelteComponent as default } from 'svelte';
@@ -0,0 +1 @@
1
+ export { SvelteComponent as default } from 'svelte';
@@ -1,5 +1,7 @@
1
1
  export { default as Button } from './Button.svelte';
2
2
  export { default as Input } from './Input.svelte';
3
+ export { default as MarkdownEditor } from './MarkdownEditor.svelte';
4
+ export type { MarkdownEditorMode } from './MarkdownEditor.types.js';
3
5
  export { default as Select } from './Select.svelte';
4
6
  export { default as Toggle } from './Toggle.svelte';
5
7
  export { default as Text } from './Text.svelte';
@@ -0,0 +1 @@
1
+ export { SvelteComponent as default } from 'svelte';
@@ -0,0 +1 @@
1
+ export { SvelteComponent as default } from 'svelte';
@@ -0,0 +1 @@
1
+ export { SvelteComponent as default } from 'svelte';
@@ -0,0 +1,11 @@
1
+ /**
2
+ * correlation — Lightweight correlation ID utilities for design-dojo telemetry.
3
+ *
4
+ * Correlation IDs link related spans across component boundaries and async
5
+ * operations without including any personally-identifiable information.
6
+ */
7
+ /**
8
+ * Generate a UUID v4 correlation ID suitable for use in URLs and logs.
9
+ * Uses crypto.randomUUID when available, falls back to crypto.getRandomValues.
10
+ */
11
+ export declare function generateCorrelationId(): string;
@@ -0,0 +1,21 @@
1
+ /**
2
+ * @plures/design-dojo — telemetry module
3
+ *
4
+ * Provides OpenTelemetry instrumentation utilities for design-dojo components.
5
+ *
6
+ * The module uses `@opentelemetry/api` which is a no-op by default — spans are
7
+ * only recorded once a consumer app registers an OTel SDK provider. See
8
+ * docs/telemetry.md for setup instructions.
9
+ *
10
+ * @example
11
+ * ```ts
12
+ * import { createComponentTracer } from "@plures/design-dojo/telemetry";
13
+ *
14
+ * const tracer = createComponentTracer("MyButton", { variant: "solid" });
15
+ * tracer.recordInteraction("click", "success");
16
+ * ```
17
+ */
18
+ export { createComponentTracer, SpanAttributes } from './tracer.js';
19
+ export type { ComponentTracer, ComponentAttributes, EventOutcome } from './tracer.js';
20
+ export { shouldSample, TELEMETRY_ENABLED, SAMPLE_RATE } from './sampling.js';
21
+ export { generateCorrelationId } from './correlation.js';
@@ -0,0 +1,101 @@
1
+ import { trace as f, INVALID_SPAN_CONTEXT as O, SpanStatusCode as N } from "@opentelemetry/api";
2
+ const _ = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1 }, d = (() => {
3
+ try {
4
+ const t = _;
5
+ if ((t == null ? void 0 : t.VITE_OTEL_ENABLED) === "false") return !1;
6
+ } catch {
7
+ }
8
+ return !0;
9
+ })(), u = (() => {
10
+ try {
11
+ const t = _, e = t == null ? void 0 : t.VITE_OTEL_SAMPLE_RATE;
12
+ if (e !== void 0) {
13
+ const a = parseFloat(e);
14
+ if (!isNaN(a) && a >= 0 && a <= 1) return a;
15
+ }
16
+ } catch {
17
+ }
18
+ return 1;
19
+ })();
20
+ function p() {
21
+ return d ? u >= 1 ? !0 : u <= 0 ? !1 : Math.random() < u : !1;
22
+ }
23
+ function S() {
24
+ if (typeof crypto < "u" && typeof crypto.randomUUID == "function")
25
+ return crypto.randomUUID();
26
+ if (typeof crypto < "u" && typeof crypto.getRandomValues == "function") {
27
+ const t = new Uint8Array(16);
28
+ crypto.getRandomValues(t), t[6] = t[6] & 15 | 64, t[8] = t[8] & 63 | 128;
29
+ const e = Array.from(t).map((a) => a.toString(16).padStart(2, "0")).join("");
30
+ return `${e.slice(0, 8)}-${e.slice(8, 12)}-${e.slice(12, 16)}-${e.slice(16, 20)}-${e.slice(20)}`;
31
+ }
32
+ return `${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 10)}`;
33
+ }
34
+ const A = "@plures/design-dojo", s = {
35
+ COMPONENT_NAME: "ui.component.name",
36
+ COMPONENT_VARIANT: "ui.component.variant",
37
+ COMPONENT_STATE: "ui.component.state",
38
+ EVENT_NAME: "ui.event.name",
39
+ EVENT_OUTCOME: "ui.event.outcome",
40
+ CORRELATION_ID: "ui.correlation_id"
41
+ };
42
+ function R(t, e = {}) {
43
+ const a = f.getTracer(A), T = S();
44
+ function E(r = {}) {
45
+ const n = {};
46
+ e.extra && Object.assign(n, e.extra), r.extra && Object.assign(n, r.extra), n[s.COMPONENT_NAME] = t, n[s.CORRELATION_ID] = T;
47
+ const o = r.variant ?? e.variant, i = r.state ?? e.state;
48
+ return o !== void 0 && (n[s.COMPONENT_VARIANT] = o), i !== void 0 && (n[s.COMPONENT_STATE] = i), n;
49
+ }
50
+ return {
51
+ otel: a,
52
+ correlationId: T,
53
+ recordInteraction(r, n, o = {}) {
54
+ if (!p()) return;
55
+ const i = a.startSpan(`${t}.${r}`, {
56
+ attributes: {
57
+ ...E(o),
58
+ [s.EVENT_NAME]: r,
59
+ [s.EVENT_OUTCOME]: n
60
+ }
61
+ });
62
+ n === "error" && i.setStatus({ code: N.ERROR }), i.end();
63
+ },
64
+ startInteractionSpan(r, n = {}) {
65
+ if (!p())
66
+ return { span: f.wrapSpanContext(O), finish: () => {
67
+ } };
68
+ const o = a.startSpan(`${t}.${r}`, {
69
+ attributes: {
70
+ ...E(n),
71
+ [s.EVENT_NAME]: r
72
+ }
73
+ });
74
+ return {
75
+ span: o,
76
+ finish(i, c) {
77
+ o.setAttribute(s.EVENT_OUTCOME, i), i === "error" && (o.setStatus({
78
+ code: N.ERROR,
79
+ message: c == null ? void 0 : c.message
80
+ }), c && o.recordException(c)), o.end();
81
+ }
82
+ };
83
+ },
84
+ startRenderSpan(r = {}) {
85
+ if (!p()) return () => {
86
+ };
87
+ const n = a.startSpan(`${t}.render`, {
88
+ attributes: E(r)
89
+ });
90
+ return () => n.end();
91
+ }
92
+ };
93
+ }
94
+ export {
95
+ u as SAMPLE_RATE,
96
+ s as SpanAttributes,
97
+ d as TELEMETRY_ENABLED,
98
+ R as createComponentTracer,
99
+ S as generateCorrelationId,
100
+ p as shouldSample
101
+ };
@@ -0,0 +1,24 @@
1
+ /**
2
+ * sampling — Sampling controls for design-dojo telemetry.
3
+ *
4
+ * Consumers configure sampling via Vite environment variables, which are
5
+ * resolved at build time and inlined via `import.meta.env`:
6
+ *
7
+ * VITE_OTEL_SAMPLE_RATE=0.1 (10% of spans recorded, default 1.0)
8
+ * VITE_OTEL_ENABLED=false (disable telemetry entirely)
9
+ *
10
+ * These values are read once at module initialisation so they impose no
11
+ * per-span overhead in production.
12
+ */
13
+ /** Whether telemetry is enabled at all. Defaults to `true`. */
14
+ export declare const TELEMETRY_ENABLED: boolean;
15
+ /**
16
+ * Fractional sample rate in `[0, 1]`. `1.0` records every span; `0` records
17
+ * none. Controlled by `VITE_OTEL_SAMPLE_RATE` (build-time env var).
18
+ */
19
+ export declare const SAMPLE_RATE: number;
20
+ /**
21
+ * Returns `true` when this particular call-site should be recorded.
22
+ * Used by all span helpers to honour the configured sample rate.
23
+ */
24
+ export declare function shouldSample(): boolean;