@01.software/sdk 0.4.3 → 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 (40) hide show
  1. package/README.md +13 -13
  2. package/dist/auth.d.cts +1 -1
  3. package/dist/auth.d.ts +1 -1
  4. package/dist/{const-ikSyKVND.d.ts → const-CDpRB7XK.d.cts} +2 -2
  5. package/dist/{const-C3GC2SxR.d.cts → const-DQIDvvB-.d.ts} +2 -2
  6. package/dist/index.cjs +22 -20
  7. package/dist/index.cjs.map +1 -1
  8. package/dist/index.d.cts +55 -34
  9. package/dist/index.d.ts +55 -34
  10. package/dist/index.js +22 -20
  11. package/dist/index.js.map +1 -1
  12. package/dist/{payload-types-DPka7hJu.d.cts → payload-types-C-keX5go.d.cts} +112 -41
  13. package/dist/{payload-types-DPka7hJu.d.ts → payload-types-C-keX5go.d.ts} +112 -41
  14. package/dist/realtime.cjs.map +1 -1
  15. package/dist/realtime.d.cts +2 -2
  16. package/dist/realtime.d.ts +2 -2
  17. package/dist/realtime.js.map +1 -1
  18. package/dist/server-B80o7igg.d.cts +242 -0
  19. package/dist/server-B80o7igg.d.ts +242 -0
  20. package/dist/ui/flow/server.cjs +233 -0
  21. package/dist/ui/flow/server.cjs.map +1 -0
  22. package/dist/ui/flow/server.d.cts +3 -0
  23. package/dist/ui/flow/server.d.ts +3 -0
  24. package/dist/ui/flow/server.js +213 -0
  25. package/dist/ui/flow/server.js.map +1 -0
  26. package/dist/ui/flow.cjs +540 -127
  27. package/dist/ui/flow.cjs.map +1 -1
  28. package/dist/ui/flow.d.cts +39 -189
  29. package/dist/ui/flow.d.ts +39 -189
  30. package/dist/ui/flow.js +544 -135
  31. package/dist/ui/flow.js.map +1 -1
  32. package/dist/ui/form.d.cts +1 -1
  33. package/dist/ui/form.d.ts +1 -1
  34. package/dist/ui/video.d.cts +1 -1
  35. package/dist/ui/video.d.ts +1 -1
  36. package/dist/{webhook-CvNTdBWV.d.ts → webhook-Dqe2_xMx.d.cts} +3 -3
  37. package/dist/{webhook-B8BfJ_Ka.d.cts → webhook-DseJdRFT.d.ts} +3 -3
  38. package/dist/webhook.d.cts +3 -3
  39. package/dist/webhook.d.ts +3 -3
  40. package/package.json +17 -12
@@ -0,0 +1,213 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
+ var __spreadValues = (a, b) => {
9
+ for (var prop in b || (b = {}))
10
+ if (__hasOwnProp.call(b, prop))
11
+ __defNormalProp(a, prop, b[prop]);
12
+ if (__getOwnPropSymbols)
13
+ for (var prop of __getOwnPropSymbols(b)) {
14
+ if (__propIsEnum.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ }
17
+ return a;
18
+ };
19
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
+ var __async = (__this, __arguments, generator) => {
21
+ return new Promise((resolve, reject) => {
22
+ var fulfilled = (value) => {
23
+ try {
24
+ step(generator.next(value));
25
+ } catch (e) {
26
+ reject(e);
27
+ }
28
+ };
29
+ var rejected = (value) => {
30
+ try {
31
+ step(generator.throw(value));
32
+ } catch (e) {
33
+ reject(e);
34
+ }
35
+ };
36
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
37
+ step((generator = generator.apply(__this, __arguments)).next());
38
+ });
39
+ };
40
+
41
+ // src/core/query/query-keys.ts
42
+ function collectionKeys(collection) {
43
+ return {
44
+ all: [collection],
45
+ lists: () => [collection, "list"],
46
+ list: (options) => [collection, "list", options],
47
+ details: () => [collection, "detail"],
48
+ detail: (id, options) => [collection, "detail", id, options],
49
+ infinites: () => [collection, "infinite"],
50
+ infinite: (options) => [collection, "infinite", options]
51
+ };
52
+ }
53
+
54
+ // src/ui/Flow/prefetchFlow.ts
55
+ function prefetchFlow(options) {
56
+ return __async(this, null, function* () {
57
+ var _a;
58
+ const { client, slug, id } = options;
59
+ const identifier = (_a = id != null ? id : slug) != null ? _a : "";
60
+ yield Promise.all([
61
+ client.queryClient.prefetchQuery({
62
+ queryKey: collectionKeys("flows").detail(identifier),
63
+ queryFn: () => __async(null, null, function* () {
64
+ if (id) return client.from("flows").findById(id);
65
+ const result = yield client.from("flows").find({
66
+ where: { slug: { equals: slug } },
67
+ limit: 1
68
+ });
69
+ const doc = result.docs[0];
70
+ if (!doc) throw new Error(`Flow not found: ${slug}`);
71
+ return doc;
72
+ })
73
+ }),
74
+ client.queryClient.prefetchQuery({
75
+ queryKey: collectionKeys("flow-node-types").lists(),
76
+ queryFn: () => __async(null, null, function* () {
77
+ const result = yield client.from("flow-node-types").find({ limit: 100 });
78
+ return result.docs;
79
+ })
80
+ }),
81
+ client.queryClient.prefetchQuery({
82
+ queryKey: collectionKeys("flow-edge-types").lists(),
83
+ queryFn: () => __async(null, null, function* () {
84
+ const result = yield client.from("flow-edge-types").find({ limit: 100 });
85
+ return result.docs;
86
+ })
87
+ })
88
+ ]);
89
+ });
90
+ }
91
+
92
+ // src/ui/Flow/utils.ts
93
+ function getNodeSize(node) {
94
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
95
+ return {
96
+ width: (_e = (_d = (_c = (_a = node.style) == null ? void 0 : _a.width) != null ? _c : (_b = node.measured) == null ? void 0 : _b.width) != null ? _d : node.width) != null ? _e : 200,
97
+ height: (_j = (_i = (_h = (_f = node.style) == null ? void 0 : _f.height) != null ? _h : (_g = node.measured) == null ? void 0 : _g.height) != null ? _i : node.height) != null ? _j : 200
98
+ };
99
+ }
100
+ function getAbsolutePosition(node, nodeMap) {
101
+ let x = node.position.x;
102
+ let y = node.position.y;
103
+ let current = node;
104
+ const visited = /* @__PURE__ */ new Set([node.id]);
105
+ while (current.parentId) {
106
+ const parentId = current.parentId;
107
+ if (visited.has(parentId)) break;
108
+ const parent = nodeMap.get(parentId);
109
+ if (!parent) break;
110
+ visited.add(parent.id);
111
+ x += parent.position.x;
112
+ y += parent.position.y;
113
+ current = parent;
114
+ }
115
+ return { x, y };
116
+ }
117
+ function collectDescendants(nodes, rootId) {
118
+ const result = /* @__PURE__ */ new Set([rootId]);
119
+ const queue = [rootId];
120
+ let i = 0;
121
+ while (i < queue.length) {
122
+ const current = queue[i++];
123
+ for (const n of nodes) {
124
+ if (n.parentId === current && !result.has(n.id)) {
125
+ result.add(n.id);
126
+ queue.push(n.id);
127
+ }
128
+ }
129
+ }
130
+ return result;
131
+ }
132
+ function getNodeBounds(nodes, nodeIds) {
133
+ const idSet = new Set(nodeIds);
134
+ const targetNodes = nodes.filter((n) => idSet.has(n.id));
135
+ if (targetNodes.length === 0) return void 0;
136
+ const nodeMap = new Map(nodes.map((n) => [n.id, n]));
137
+ let minX = Infinity;
138
+ let minY = Infinity;
139
+ let maxX = -Infinity;
140
+ let maxY = -Infinity;
141
+ for (const node of targetNodes) {
142
+ const abs = getAbsolutePosition(node, nodeMap);
143
+ const { width: w, height: h } = getNodeSize(node);
144
+ minX = Math.min(minX, abs.x);
145
+ minY = Math.min(minY, abs.y);
146
+ maxX = Math.max(maxX, abs.x + w);
147
+ maxY = Math.max(maxY, abs.y + h);
148
+ }
149
+ return { x: minX, y: minY, width: maxX - minX, height: maxY - minY };
150
+ }
151
+ function getFrames(nodes) {
152
+ const frames = nodes.filter((n) => n.type === "frame");
153
+ if (frames.length === 0) return [];
154
+ const nodeMap = new Map(nodes.map((n) => [n.id, n]));
155
+ return frames.map((f) => {
156
+ var _a;
157
+ const data = f.data;
158
+ const abs = getAbsolutePosition(f, nodeMap);
159
+ const { width: w, height: h } = getNodeSize(f);
160
+ return {
161
+ id: f.id,
162
+ label: (_a = data.label) != null ? _a : "",
163
+ bounds: { x: abs.x, y: abs.y, width: w, height: h }
164
+ };
165
+ }).sort((a, b) => a.bounds.y - b.bounds.y || a.bounds.x - b.bounds.x);
166
+ }
167
+ function getFrameData(data, frameId) {
168
+ const frame = data.nodes.find((n) => n.id === frameId);
169
+ if (!frame || frame.type !== "frame") return void 0;
170
+ const descendantIds = collectDescendants(data.nodes, frameId);
171
+ const childNodes = data.nodes.filter((n) => descendantIds.has(n.id)).map((n) => __spreadProps(__spreadValues({}, n), { draggable: false }));
172
+ const childEdges = data.edges.filter(
173
+ (e) => descendantIds.has(e.source) && descendantIds.has(e.target)
174
+ );
175
+ const frameBounds = getNodeBounds(data.nodes, [frameId]);
176
+ const { width: w, height: h } = getNodeSize(frame);
177
+ const clampBounds = frameBounds != null ? frameBounds : {
178
+ x: frame.position.x,
179
+ y: frame.position.y,
180
+ width: w,
181
+ height: h
182
+ };
183
+ const contentNodeIds = childNodes.filter((n) => n.id !== frameId).map((n) => n.id);
184
+ const contentBounds = contentNodeIds.length > 0 ? getNodeBounds(data.nodes, contentNodeIds) : void 0;
185
+ const fitBounds = contentBounds != null ? contentBounds : clampBounds;
186
+ return {
187
+ data: {
188
+ nodes: childNodes,
189
+ edges: childEdges,
190
+ viewport: data.viewport
191
+ },
192
+ fitBounds,
193
+ clampBounds,
194
+ bounds: clampBounds
195
+ };
196
+ }
197
+
198
+ // src/ui/Flow/types.ts
199
+ function isDynamicNode(node) {
200
+ return node.type === "dynamic";
201
+ }
202
+ function isFrameNode(node) {
203
+ return node.type === "frame";
204
+ }
205
+ export {
206
+ getFrameData,
207
+ getFrames,
208
+ getNodeBounds,
209
+ isDynamicNode,
210
+ isFrameNode,
211
+ prefetchFlow
212
+ };
213
+ //# sourceMappingURL=server.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/core/query/query-keys.ts","../../../src/ui/Flow/prefetchFlow.ts","../../../src/ui/Flow/utils.ts","../../../src/ui/Flow/types.ts"],"sourcesContent":["import type { PublicCollection, ApiQueryOptions } from '../client/types'\n\nexport function collectionKeys<T extends PublicCollection>(collection: T) {\n return {\n all: [collection] as const,\n lists: () => [collection, 'list'] as const,\n list: (options?: ApiQueryOptions) => [collection, 'list', options] as const,\n details: () => [collection, 'detail'] as const,\n detail: (id: string, options?: ApiQueryOptions) =>\n [collection, 'detail', id, options] as const,\n infinites: () => [collection, 'infinite'] as const,\n infinite: (options?: Omit<ApiQueryOptions, 'page'>) =>\n [collection, 'infinite', options] as const,\n }\n}\n\nexport const customerKeys = {\n all: ['customer'] as const,\n me: () => ['customer', 'me'] as const,\n}\n","import type { SDKClient } from './useFlow'\nimport { collectionKeys } from '../../core/query/query-keys'\n\nexport interface PrefetchFlowOptions {\n /** SDK client instance (Client or ServerClient) */\n client: SDKClient\n /** Flow slug (URL-friendly identifier) */\n slug?: string\n /** Flow document ID (UUID) */\n id?: string\n}\n\n/**\n * Prefetch flow data into the query cache.\n * Call in route loaders or server components to eliminate loading states on mount.\n *\n * ```ts\n * // React Router loader / Server Component\n * await prefetchFlow({ client, slug: 'Home' })\n * ```\n */\nexport async function prefetchFlow(\n options: PrefetchFlowOptions,\n): Promise<void> {\n const { client, slug, id } = options\n const identifier = id ?? slug ?? ''\n\n await Promise.all([\n client.queryClient.prefetchQuery({\n queryKey: collectionKeys('flows').detail(identifier),\n queryFn: async () => {\n if (id) return client.from('flows').findById(id)\n const result = await client.from('flows').find({\n where: { slug: { equals: slug } },\n limit: 1,\n })\n const doc = result.docs[0]\n if (!doc) throw new Error(`Flow not found: ${slug}`)\n return doc\n },\n }),\n client.queryClient.prefetchQuery({\n queryKey: collectionKeys('flow-node-types').lists(),\n queryFn: async () => {\n const result = await client\n .from('flow-node-types')\n .find({ limit: 100 })\n return result.docs\n },\n }),\n client.queryClient.prefetchQuery({\n queryKey: collectionKeys('flow-edge-types').lists(),\n queryFn: async () => {\n const result = await client\n .from('flow-edge-types')\n .find({ limit: 100 })\n return result.docs\n },\n }),\n ])\n}\n","import type { FlowNode, FlowEdge, FlowBounds, CanvasData } from './types'\n\n// ── Shared helpers ──\n\nfunction getNodeSize(node: FlowNode): { width: number; height: number } {\n return {\n width:\n (node.style?.width as number) ??\n node.measured?.width ??\n node.width ??\n 200,\n height:\n (node.style?.height as number) ??\n node.measured?.height ??\n node.height ??\n 200,\n }\n}\n\nfunction getAbsolutePosition(\n node: FlowNode,\n nodeMap: Map<string, FlowNode>,\n): { x: number; y: number } {\n let x = node.position.x\n let y = node.position.y\n let current = node\n const visited = new Set<string>([node.id])\n while (current.parentId) {\n const parentId = current.parentId\n if (visited.has(parentId)) break\n const parent = nodeMap.get(parentId)\n if (!parent) break\n visited.add(parent.id)\n x += parent.position.x\n y += parent.position.y\n current = parent\n }\n return { x, y }\n}\n\n/** Collect a node and all its descendants (BFS with index pointer to avoid O(Q²) shift). */\nfunction collectDescendants(\n nodes: FlowNode[],\n rootId: string,\n): Set<string> {\n const result = new Set<string>([rootId])\n const queue = [rootId]\n let i = 0\n while (i < queue.length) {\n const current = queue[i++]\n for (const n of nodes) {\n if (n.parentId === current && !result.has(n.id)) {\n result.add(n.id)\n queue.push(n.id)\n }\n }\n }\n return result\n}\n\n// ── Public utilities ──\n\n/**\n * Calculate bounding box for given node IDs.\n * Pure function — usable in SSR, server components, or outside React.\n */\nexport function getNodeBounds(\n nodes: FlowNode[],\n nodeIds: string[],\n): FlowBounds | undefined {\n const idSet = new Set(nodeIds)\n const targetNodes = nodes.filter((n) => idSet.has(n.id))\n if (targetNodes.length === 0) return undefined\n\n const nodeMap = new Map(nodes.map((n) => [n.id, n]))\n\n let minX = Infinity\n let minY = Infinity\n let maxX = -Infinity\n let maxY = -Infinity\n\n for (const node of targetNodes) {\n const abs = getAbsolutePosition(node, nodeMap)\n const { width: w, height: h } = getNodeSize(node)\n minX = Math.min(minX, abs.x)\n minY = Math.min(minY, abs.y)\n maxX = Math.max(maxX, abs.x + w)\n maxY = Math.max(maxY, abs.y + h)\n }\n\n return { x: minX, y: minY, width: maxX - minX, height: maxY - minY }\n}\n\n/**\n * Get all frame nodes with their bounds.\n * Sorted by position (top-left to bottom-right).\n */\nexport function getFrames(\n nodes: FlowNode[],\n): Array<{ id: string; label: string; bounds: FlowBounds }> {\n const frames = nodes.filter((n) => n.type === 'frame')\n if (frames.length === 0) return []\n\n const nodeMap = new Map(nodes.map((n) => [n.id, n]))\n\n return frames\n .map((f) => {\n const data = f.data as { label?: string }\n const abs = getAbsolutePosition(f, nodeMap)\n const { width: w, height: h } = getNodeSize(f)\n return {\n id: f.id,\n label: data.label ?? '',\n bounds: { x: abs.x, y: abs.y, width: w, height: h },\n }\n })\n .sort((a, b) => a.bounds.y - b.bounds.y || a.bounds.x - b.bounds.x)\n}\n\n/** Result of getFrameData — contains filtered canvas + dual bounds. */\nexport interface FrameData {\n /** Canvas data containing only the frame's descendants (nodes have draggable: false). */\n data: CanvasData\n /** Bounding box of child content nodes — use for initial viewport fit (centering). */\n fitBounds: FlowBounds\n /** Bounding box of the frame itself — use for panning/zoom restriction (clamp). */\n clampBounds: FlowBounds\n /** @deprecated Use fitBounds instead. Alias for clampBounds for backward compatibility. */\n bounds: FlowBounds\n}\n\n/**\n * Extract a frame's descendants and related edges from canvas data.\n * Recursively collects all nested children (supports nested frames).\n * Returns undefined if frameId is not found or is not a frame node.\n *\n * Child nodes are marked `draggable: false` to prevent interfering with canvas panning.\n * The frame node itself is included (use `frameRenderer={() => null}` to hide it).\n *\n * Returns dual bounds:\n * - `fitBounds`: child content bounding box (for centering the viewport)\n * - `clampBounds`: frame area bounding box (for panning restriction)\n */\nexport function getFrameData(\n data: CanvasData,\n frameId: string,\n): FrameData | undefined {\n const frame = data.nodes.find((n) => n.id === frameId)\n if (!frame || frame.type !== 'frame') return undefined\n\n // Recursively collect frame + all descendants\n const descendantIds = collectDescendants(data.nodes, frameId)\n const childNodes = data.nodes\n .filter((n) => descendantIds.has(n.id))\n .map((n) => ({ ...n, draggable: false }))\n\n // Keep only edges where both source and target are within the frame\n const childEdges = data.edges.filter(\n (e: FlowEdge) => descendantIds.has(e.source) && descendantIds.has(e.target),\n )\n\n // clampBounds: frame's own bounding box (for panning restriction)\n const frameBounds = getNodeBounds(data.nodes, [frameId])\n const { width: w, height: h } = getNodeSize(frame)\n const clampBounds: FlowBounds = frameBounds ?? {\n x: frame.position.x,\n y: frame.position.y,\n width: w,\n height: h,\n }\n\n // fitBounds: child content bounding box (for centering)\n const contentNodeIds = childNodes\n .filter((n) => n.id !== frameId)\n .map((n) => n.id)\n const contentBounds = contentNodeIds.length > 0\n ? getNodeBounds(data.nodes, contentNodeIds)\n : undefined\n const fitBounds = contentBounds ?? clampBounds\n\n return {\n data: {\n nodes: childNodes,\n edges: childEdges,\n viewport: data.viewport,\n },\n fitBounds,\n clampBounds,\n bounds: clampBounds,\n }\n}\n","import type React from 'react'\n\n// ── Dynamic node data ──\n\nexport interface DynamicNodeData {\n nodeTypeSlug: string\n label: string\n fields: Record<string, unknown>\n}\n\nexport type FlowNodeData = (DynamicNodeData | FrameNodeData) &\n Record<string, unknown>\n\n// ── Canvas types (mirrors @xyflow/react but standalone) ──\n\nexport interface FlowNodePosition {\n x: number\n y: number\n}\n\nexport interface FlowNode {\n id: string\n type?: string\n position: FlowNodePosition\n data: FlowNodeData\n parentId?: string\n style?: React.CSSProperties\n width?: number\n height?: number\n measured?: { width?: number; height?: number }\n draggable?: boolean\n selectable?: boolean\n [key: string]: unknown\n}\n\nexport interface FlowEdge {\n id: string\n source: string\n target: string\n sourceHandle?: string | null\n targetHandle?: string | null\n type?: string\n style?: React.CSSProperties\n animated?: boolean\n markerStart?: unknown\n markerEnd?: unknown\n edgeTypeSlug?: string\n fields?: Record<string, unknown>\n [key: string]: unknown\n}\n\nexport interface FlowViewport {\n x: number\n y: number\n zoom: number\n}\n\nexport interface CanvasData {\n nodes: FlowNode[]\n edges: FlowEdge[]\n viewport: FlowViewport\n}\n\n// ── Node type definitions (mirrors console's NodeTypeDef) ──\n\nexport interface NodeTypeFieldDef {\n name: string\n label: string\n fieldType:\n | 'text'\n | 'textarea'\n | 'number'\n | 'url'\n | 'color'\n | 'image'\n | 'select'\n | 'toggle'\n options?: { label: string; value: string }[]\n defaultValue?: string\n required?: boolean\n}\n\nexport interface NodeTypeDef {\n slug: string\n name: string\n color: string\n defaultSize: { width: number; height: number }\n fields: NodeTypeFieldDef[]\n transparentBackground?: boolean\n template?: string | null\n customCSS?: string | null\n}\n\n// ── Edge type definitions (mirrors console's EdgeTypeDef) ──\n\nexport interface EdgeTypeDef {\n slug: string\n name: string\n color: string\n strokeWidth: number\n animated: boolean\n lineStyle: string\n markerStart: string\n markerEnd: string\n fields: NodeTypeFieldDef[]\n}\n\n// ── Type guards ──\n\nexport function isDynamicNode(\n node: FlowNode,\n): node is FlowNode & { data: DynamicNodeData } {\n return node.type === 'dynamic'\n}\n\nexport function isFrameNode(\n node: FlowNode,\n): node is FlowNode & { data: FrameNodeData } {\n return node.type === 'frame'\n}\n\n// ── Component slot props ──\n\nexport interface DynamicNodeSlotProps {\n id: string\n nodeTypeSlug: string\n label: string\n fields: Record<string, unknown>\n nodeTypeDef?: NodeTypeDef\n /** Whether this node is currently selected */\n selected?: boolean\n /** Measured node width (undefined before first measurement) */\n width?: number\n /** Measured node height (undefined before first measurement) */\n height?: number\n /** The default rendering (template or field-based). Allows custom renderers to wrap/extend instead of replacing entirely. */\n defaultRender?: React.ReactElement\n}\n\n// ── Frame node data ──\n\nexport interface FrameNodeData {\n label: string\n color?: string\n padding?: number\n borderStyle?: 'dashed' | 'solid' | 'none'\n opacity?: number\n}\n\n// S1: Frame renderer slot\nexport interface FrameNodeSlotProps {\n id: string\n label: string\n color?: string\n padding?: number\n borderStyle?: 'dashed' | 'solid' | 'none'\n opacity?: number\n width?: number\n height?: number\n children?: React.ReactNode\n}\n\n// S2: Edge renderer slot\nexport interface EdgeSlotProps {\n id: string\n edgeTypeSlug?: string\n source: string\n target: string\n label?: string\n fields?: Record<string, unknown>\n edgeTypeDef?: EdgeTypeDef\n style?: React.CSSProperties\n}\n\n// S3: Node wrapper slot\nexport interface NodeWrapperSlotProps {\n id: string\n nodeTypeSlug: string\n label: string\n selected?: boolean\n nodeTypeDef?: NodeTypeDef\n children: React.ReactNode\n}\n\n// S8: Viewport focus\nexport interface FlowBounds {\n x: number\n y: number\n width: number\n height: number\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEO,SAAS,eAA2C,YAAe;AACxE,SAAO;AAAA,IACL,KAAK,CAAC,UAAU;AAAA,IAChB,OAAO,MAAM,CAAC,YAAY,MAAM;AAAA,IAChC,MAAM,CAAC,YAA8B,CAAC,YAAY,QAAQ,OAAO;AAAA,IACjE,SAAS,MAAM,CAAC,YAAY,QAAQ;AAAA,IACpC,QAAQ,CAAC,IAAY,YACnB,CAAC,YAAY,UAAU,IAAI,OAAO;AAAA,IACpC,WAAW,MAAM,CAAC,YAAY,UAAU;AAAA,IACxC,UAAU,CAAC,YACT,CAAC,YAAY,YAAY,OAAO;AAAA,EACpC;AACF;;;ACOA,SAAsB,aACpB,SACe;AAAA;AAvBjB;AAwBE,UAAM,EAAE,QAAQ,MAAM,GAAG,IAAI;AAC7B,UAAM,cAAa,uBAAM,SAAN,YAAc;AAEjC,UAAM,QAAQ,IAAI;AAAA,MAChB,OAAO,YAAY,cAAc;AAAA,QAC/B,UAAU,eAAe,OAAO,EAAE,OAAO,UAAU;AAAA,QACnD,SAAS,MAAY;AACnB,cAAI,GAAI,QAAO,OAAO,KAAK,OAAO,EAAE,SAAS,EAAE;AAC/C,gBAAM,SAAS,MAAM,OAAO,KAAK,OAAO,EAAE,KAAK;AAAA,YAC7C,OAAO,EAAE,MAAM,EAAE,QAAQ,KAAK,EAAE;AAAA,YAChC,OAAO;AAAA,UACT,CAAC;AACD,gBAAM,MAAM,OAAO,KAAK,CAAC;AACzB,cAAI,CAAC,IAAK,OAAM,IAAI,MAAM,mBAAmB,IAAI,EAAE;AACnD,iBAAO;AAAA,QACT;AAAA,MACF,C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