@daasboard/doc 0.0.0-stage → 0.1.0

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.
@@ -0,0 +1,728 @@
1
+ import type { ArrowStyle as AsBuiltArrowStyle, ConnectorData, ConnectorSide as AsBuiltConnectorSide, PathCmd, StrokeAlign, StrokeCap as AsBuiltStrokeCap, StrokeJoin as AsBuiltStrokeJoin } from "@daasboard/render-core";
2
+ export declare const CURATED_SCHEMA_VERSION = 2;
3
+ type Equal<A, B> = [A] extends [B] ? ([B] extends [A] ? true : false) : false;
4
+ type Expect<T extends true> = T;
5
+ export type ObjectId = string;
6
+ export type DocId = string;
7
+ export type AnchorId = string;
8
+ export type TokenId = string;
9
+ export type StyleId = string;
10
+ export type GuideId = string;
11
+ export type AssetHash = string;
12
+ export type PathKey = string;
13
+ export interface TokenRef<T> {
14
+ token: TokenId;
15
+ value: T;
16
+ }
17
+ export type ColorValue = string | TokenRef<string>;
18
+ export type ObjectKind = "rect" | "ellipse" | "path" | "text" | "image" | "connector" | "frame" | "section" | "group" | "sticky" | "instance" | "embed";
19
+ export type NodeKind = ObjectKind | "trash";
20
+ export type ContainerKind = "frame" | "section" | "group";
21
+ export type StrokeCap = "butt" | "round" | "square";
22
+ export type StrokeJoin = "miter" | "round" | "bevel";
23
+ export type ArrowStyle = "none" | "arrow" | "triangle" | "triangle-open" | "triangle-skinny" | "circle" | "circle-open" | "diamond" | "diamond-open" | "square" | "square-open" | "bar" | "crow";
24
+ export type StrokeValuePins = [Expect<Equal<StrokeCap, AsBuiltStrokeCap>>, Expect<Equal<StrokeJoin, AsBuiltStrokeJoin>>, Expect<Equal<ArrowStyle, AsBuiltArrowStyle>>];
25
+ export type TextAlign = "left" | "center" | "right" | "justify";
26
+ export type VerticalAlign = "top" | "middle" | "bottom";
27
+ export type TextCase = "none" | "upper" | "lower";
28
+ export interface GradientStop {
29
+ at: number;
30
+ color: ColorValue;
31
+ }
32
+ export interface LinearGradient {
33
+ type: "linear";
34
+ start: [number, number];
35
+ end: [number, number];
36
+ stops: GradientStop[];
37
+ }
38
+ export interface RadialGradient {
39
+ type: "radial";
40
+ cx?: number;
41
+ cy?: number;
42
+ r?: number;
43
+ stops: GradientStop[];
44
+ }
45
+ export type FillPaint = ColorValue | LinearGradient | RadialGradient;
46
+ export type FillValue = FillPaint | FillPaint[];
47
+ export interface StyleProps {
48
+ fill?: FillValue;
49
+ stroke?: ColorValue;
50
+ strokeWidth?: number;
51
+ strokeAlign?: StrokeAlign;
52
+ dash?: number[];
53
+ strokeCapStart?: StrokeCap;
54
+ strokeCapEnd?: StrokeCap;
55
+ strokeJoin?: StrokeJoin;
56
+ strokeTop?: boolean;
57
+ strokeRight?: boolean;
58
+ strokeBottom?: boolean;
59
+ strokeLeft?: boolean;
60
+ opacity?: number;
61
+ radiusTopLeft?: number;
62
+ radiusTopRight?: number;
63
+ radiusBottomRight?: number;
64
+ radiusBottomLeft?: number;
65
+ shadowOn?: boolean;
66
+ shadowColor?: ColorValue;
67
+ shadowX?: number;
68
+ shadowY?: number;
69
+ shadowBlur?: number;
70
+ shadowSpread?: number;
71
+ lineStart?: ArrowStyle;
72
+ lineEnd?: ArrowStyle;
73
+ bendRadius?: number;
74
+ fontFamily?: string | TokenRef<string>;
75
+ fontSize?: number | TokenRef<number>;
76
+ fontWeight?: number;
77
+ italic?: boolean;
78
+ underline?: boolean;
79
+ strike?: boolean;
80
+ color?: ColorValue;
81
+ letterSpacing?: number;
82
+ textCase?: TextCase;
83
+ align?: TextAlign;
84
+ lineHeight?: number;
85
+ valign?: VerticalAlign;
86
+ paddingTop?: number;
87
+ paddingRight?: number;
88
+ paddingBottom?: number;
89
+ paddingLeft?: number;
90
+ }
91
+ export interface AtomicStyleValues {
92
+ dash: number[];
93
+ fill: FillValue;
94
+ }
95
+ type ScalarStyleValue = string | number | boolean | TokenRef<string> | TokenRef<number>;
96
+ export type OneValuePerProperty<T> = {
97
+ [K in keyof T]-?: K extends keyof AtomicStyleValues ? (NonNullable<T[K]> extends AtomicStyleValues[K] ? true : never) : NonNullable<T[K]> extends ScalarStyleValue ? true : never;
98
+ };
99
+ export type R1CheckBites = [
100
+ Expect<Equal<OneValuePerProperty<{
101
+ shadow?: {
102
+ dx: number;
103
+ color: string;
104
+ };
105
+ }>["shadow"], never>>,
106
+ Expect<Equal<OneValuePerProperty<{
107
+ strokeSides?: boolean[];
108
+ }>["strokeSides"], never>>,
109
+ Expect<Equal<OneValuePerProperty<{
110
+ dash?: number[];
111
+ }>["dash"], true>>,
112
+ Expect<Equal<OneValuePerProperty<{
113
+ fill?: ColorValue;
114
+ }>["fill"], true>>,
115
+ Expect<Equal<OneValuePerProperty<{
116
+ fill?: FillValue;
117
+ }>["fill"], true>>
118
+ ];
119
+ export interface TextMarks {
120
+ weight?: number;
121
+ italic?: boolean;
122
+ underline?: boolean;
123
+ strike?: boolean;
124
+ color?: string;
125
+ size?: number;
126
+ family?: string;
127
+ letterSpacing?: number;
128
+ textCase?: TextCase;
129
+ link?: string;
130
+ }
131
+ export interface ParagraphAttrs {
132
+ align?: TextAlign;
133
+ lineHeight?: number;
134
+ list?: "bullet" | "number" | "task" | null;
135
+ indent?: number;
136
+ start?: number;
137
+ checked?: boolean;
138
+ }
139
+ export type RichTextDelta = readonly {
140
+ insert: string;
141
+ attributes?: TextMarks & ParagraphAttrs;
142
+ }[];
143
+ export type ConnectorRoute = "straight" | "ortho" | "curve";
144
+ export type ConnectorSide = "t" | "r" | "b" | "l" | "c";
145
+ export type RouteAndSidePins = [Expect<Equal<ConnectorRoute, ConnectorData["route"]>>, Expect<Equal<ConnectorSide, AsBuiltConnectorSide>>];
146
+ export interface Endpoint {
147
+ ref?: ObjectId;
148
+ side?: ConnectorSide;
149
+ anchor?: AnchorId;
150
+ }
151
+ export interface ConnData {
152
+ route: ConnectorRoute;
153
+ start: Endpoint;
154
+ end: Endpoint;
155
+ startAt: [number, number];
156
+ endAt: [number, number];
157
+ points?: [number, number][];
158
+ }
159
+ export interface ImageRef {
160
+ hash: AssetHash;
161
+ w: number;
162
+ h: number;
163
+ mime: string;
164
+ crop?: [number, number, number, number];
165
+ thumb?: string;
166
+ }
167
+ export interface EmbedRef {
168
+ url: string;
169
+ embedUrl?: string;
170
+ title?: string;
171
+ icon?: ImageRef;
172
+ preview?: ImageRef;
173
+ }
174
+ export type InstanceOverride = StyleProps & {
175
+ hidden?: boolean;
176
+ };
177
+ export interface InstData {
178
+ def: {
179
+ lib: DocId;
180
+ node: ObjectId;
181
+ };
182
+ defName: string;
183
+ overrides: Record<PathKey, InstanceOverride>;
184
+ }
185
+ export interface ObjectNode {
186
+ kind: ObjectKind;
187
+ xywh: [number, number, number, number];
188
+ rot?: number;
189
+ name?: string;
190
+ extId?: string;
191
+ locked?: boolean;
192
+ hidden?: boolean;
193
+ styleRef?: StyleId;
194
+ style: StyleProps;
195
+ text?: RichTextDelta;
196
+ textH?: number;
197
+ autoWidth?: boolean;
198
+ autoHeight?: boolean;
199
+ anchors?: Record<AnchorId, [number, number]>;
200
+ path?: PathCmd[];
201
+ image?: ImageRef;
202
+ clip?: boolean;
203
+ embed?: EmbedRef;
204
+ conn?: ConnData;
205
+ inst?: InstData;
206
+ }
207
+ export interface TreeNode<T> {
208
+ readonly id: ObjectId;
209
+ readonly data: T;
210
+ readonly children: readonly TreeNode<T>[];
211
+ }
212
+ export interface TrashNode {
213
+ kind: "trash";
214
+ }
215
+ export interface PageMeta {
216
+ schema: number;
217
+ kind: "page" | "library";
218
+ trash: ObjectId;
219
+ pageId?: DocId;
220
+ }
221
+ export interface Guide {
222
+ axis: "x" | "y";
223
+ at: number;
224
+ locked?: boolean;
225
+ }
226
+ export interface PageSettings {
227
+ bg?: ColorValue;
228
+ size?: [number, number] | null;
229
+ gridSize?: number;
230
+ gridStyle?: "dots" | "lines" | "none";
231
+ guides?: Record<GuideId, Guide>;
232
+ }
233
+ export interface PageDoc {
234
+ meta: PageMeta;
235
+ settings: PageSettings;
236
+ tree: readonly TreeNode<ObjectNode | TrashNode>[];
237
+ }
238
+ export type LibraryDoc = PageDoc & {
239
+ meta: PageMeta & {
240
+ kind: "library";
241
+ };
242
+ };
243
+ export interface PageEntry {
244
+ name: string;
245
+ doc: DocId;
246
+ }
247
+ export interface Token {
248
+ kind: "color" | "size" | "family";
249
+ name: string;
250
+ value: string | number;
251
+ }
252
+ export interface AssetEntry {
253
+ mime: string;
254
+ w: number;
255
+ h: number;
256
+ bytes: number;
257
+ tiers?: Record<string, true>;
258
+ }
259
+ export interface FontEntry {
260
+ source: string;
261
+ }
262
+ export interface LibEntry {
263
+ name: string;
264
+ }
265
+ export interface BoardDoc {
266
+ meta: {
267
+ schema: number;
268
+ kind: "board";
269
+ trash: ObjectId;
270
+ };
271
+ settings: Record<string, unknown>;
272
+ pages: readonly TreeNode<PageEntry | TrashNode>[];
273
+ tokens: Record<TokenId, Token>;
274
+ styles: Record<StyleId, StyleProps>;
275
+ assets: Record<AssetHash, AssetEntry>;
276
+ fonts: Record<string, FontEntry>;
277
+ libs: Record<DocId, LibEntry>;
278
+ }
279
+ export declare const ASSET_STORE: {
280
+ readonly orig: "t/<T>/img/<hash>/i<n>/orig.<ext>";
281
+ readonly tiers: "t/<T>/img/<hash>/i<n>/g<gen>/<256|512|1024|2048|4096|full>.<sha256>.webp";
282
+ };
283
+ export declare const CURATED_KINDS: {
284
+ readonly rect: true;
285
+ readonly ellipse: true;
286
+ readonly path: true;
287
+ readonly text: true;
288
+ readonly image: true;
289
+ readonly connector: true;
290
+ readonly frame: true;
291
+ readonly section: true;
292
+ readonly group: true;
293
+ readonly sticky: true;
294
+ readonly instance: true;
295
+ readonly embed: true;
296
+ };
297
+ export declare const CURATED_NODE_KEYS: {
298
+ readonly kind: true;
299
+ readonly xywh: true;
300
+ readonly rot: true;
301
+ readonly name: true;
302
+ readonly extId: true;
303
+ readonly locked: true;
304
+ readonly hidden: true;
305
+ readonly styleRef: true;
306
+ readonly style: true;
307
+ readonly text: true;
308
+ readonly textH: true;
309
+ readonly autoWidth: true;
310
+ readonly autoHeight: true;
311
+ readonly anchors: true;
312
+ readonly path: true;
313
+ readonly image: true;
314
+ readonly clip: true;
315
+ readonly embed: true;
316
+ readonly conn: true;
317
+ readonly inst: true;
318
+ };
319
+ export declare const CURATED_STYLE_KEYS: {
320
+ readonly fill: true;
321
+ readonly stroke: true;
322
+ readonly strokeWidth: true;
323
+ readonly strokeAlign: true;
324
+ readonly dash: true;
325
+ readonly strokeCapStart: true;
326
+ readonly strokeCapEnd: true;
327
+ readonly strokeJoin: true;
328
+ readonly strokeTop: true;
329
+ readonly strokeRight: true;
330
+ readonly strokeBottom: true;
331
+ readonly strokeLeft: true;
332
+ readonly opacity: true;
333
+ readonly radiusTopLeft: true;
334
+ readonly radiusTopRight: true;
335
+ readonly radiusBottomRight: true;
336
+ readonly radiusBottomLeft: true;
337
+ readonly shadowOn: true;
338
+ readonly shadowColor: true;
339
+ readonly shadowX: true;
340
+ readonly shadowY: true;
341
+ readonly shadowBlur: true;
342
+ readonly shadowSpread: true;
343
+ readonly lineStart: true;
344
+ readonly lineEnd: true;
345
+ readonly bendRadius: true;
346
+ readonly fontFamily: true;
347
+ readonly fontSize: true;
348
+ readonly fontWeight: true;
349
+ readonly italic: true;
350
+ readonly underline: true;
351
+ readonly strike: true;
352
+ readonly color: true;
353
+ readonly letterSpacing: true;
354
+ readonly textCase: true;
355
+ readonly align: true;
356
+ readonly lineHeight: true;
357
+ readonly valign: true;
358
+ readonly paddingTop: true;
359
+ readonly paddingRight: true;
360
+ readonly paddingBottom: true;
361
+ readonly paddingLeft: true;
362
+ };
363
+ export declare const CURATED_MARKS: {
364
+ readonly weight: true;
365
+ readonly italic: true;
366
+ readonly underline: true;
367
+ readonly strike: true;
368
+ readonly color: true;
369
+ readonly size: true;
370
+ readonly family: true;
371
+ readonly letterSpacing: true;
372
+ readonly textCase: true;
373
+ readonly link: true;
374
+ };
375
+ export declare const CURATED_PARA_ATTRS: {
376
+ readonly align: true;
377
+ readonly lineHeight: true;
378
+ readonly list: true;
379
+ readonly indent: true;
380
+ readonly start: true;
381
+ readonly checked: true;
382
+ };
383
+ export declare const CURATED_CONN_KEYS: {
384
+ readonly route: true;
385
+ readonly start: true;
386
+ readonly end: true;
387
+ readonly startAt: true;
388
+ readonly endAt: true;
389
+ readonly points: true;
390
+ };
391
+ export declare const CURATED_ENDPOINT_KEYS: {
392
+ readonly ref: true;
393
+ readonly side: true;
394
+ readonly anchor: true;
395
+ };
396
+ export declare const CURATED_IMAGE_KEYS: {
397
+ readonly hash: true;
398
+ readonly w: true;
399
+ readonly h: true;
400
+ readonly mime: true;
401
+ readonly crop: true;
402
+ readonly thumb: true;
403
+ };
404
+ export declare const CURATED_EMBED_KEYS: {
405
+ readonly url: true;
406
+ readonly embedUrl: true;
407
+ readonly title: true;
408
+ readonly icon: true;
409
+ readonly preview: true;
410
+ };
411
+ export declare const CURATED_INST_KEYS: {
412
+ readonly def: true;
413
+ readonly defName: true;
414
+ readonly overrides: true;
415
+ };
416
+ export declare const CURATED_PAGE_META_KEYS: {
417
+ readonly schema: true;
418
+ readonly kind: true;
419
+ readonly trash: true;
420
+ readonly pageId: true;
421
+ };
422
+ export declare const CURATED_PAGE_SETTINGS_KEYS: {
423
+ readonly bg: true;
424
+ readonly size: true;
425
+ readonly gridSize: true;
426
+ readonly gridStyle: true;
427
+ readonly guides: true;
428
+ };
429
+ export declare const CURATED_BOARD_KEYS: {
430
+ readonly meta: true;
431
+ readonly settings: true;
432
+ readonly pages: true;
433
+ readonly tokens: true;
434
+ readonly styles: true;
435
+ readonly assets: true;
436
+ readonly fonts: true;
437
+ readonly libs: true;
438
+ };
439
+ export declare const CURATED_LIBRARY_KEYS: {
440
+ readonly definitions: true;
441
+ };
442
+ export declare const CURATED_ASSET_KEYS: {
443
+ readonly orig: true;
444
+ readonly tiers: true;
445
+ };
446
+ export declare const TREE_KEYS: {
447
+ readonly root: true;
448
+ readonly parent: true;
449
+ readonly order: true;
450
+ readonly trash: true;
451
+ };
452
+ export declare const CURATED_TEXT_KINDS: readonly ["rect", "ellipse", "path", "text", "connector", "frame", "section", "sticky"];
453
+ export declare const PLANNED_WITHOUT_SOURCE: {
454
+ readonly node: readonly ["styleRef", "textH"];
455
+ readonly "page.meta": readonly ["pageId"];
456
+ readonly "page.settings": readonly ["bg", "size", "gridSize", "gridStyle", "guides"];
457
+ readonly board: readonly ["meta", "settings", "styles", "fonts"];
458
+ };
459
+ export declare const AS_BUILT_OBJECT_KINDS: {
460
+ readonly rect: true;
461
+ readonly ellipse: true;
462
+ readonly path: true;
463
+ readonly text: true;
464
+ readonly image: true;
465
+ readonly connector: true;
466
+ readonly frame: true;
467
+ readonly section: true;
468
+ readonly group: true;
469
+ readonly sticky: true;
470
+ readonly embed: true;
471
+ readonly instance: true;
472
+ };
473
+ export declare const AS_BUILT_SCENE_OBJECT_KEYS: {
474
+ readonly id: true;
475
+ readonly kind: true;
476
+ readonly parent: true;
477
+ readonly x: true;
478
+ readonly y: true;
479
+ readonly w: true;
480
+ readonly h: true;
481
+ readonly rot: true;
482
+ readonly style: true;
483
+ readonly text: true;
484
+ readonly textVersion: true;
485
+ readonly path: true;
486
+ readonly image: true;
487
+ readonly conn: true;
488
+ readonly anchors: true;
489
+ readonly embed: true;
490
+ readonly inst: true;
491
+ readonly name: true;
492
+ readonly extId: true;
493
+ readonly locked: true;
494
+ readonly autoWidth: true;
495
+ readonly autoHeight: true;
496
+ readonly clip: true;
497
+ readonly hidden: true;
498
+ readonly version: true;
499
+ };
500
+ export declare const AS_BUILT_STYLE_KEYS: {
501
+ readonly fill: true;
502
+ readonly stroke: true;
503
+ readonly strokeWidth: true;
504
+ readonly strokeAlign: true;
505
+ readonly dash: true;
506
+ readonly strokeCapStart: true;
507
+ readonly strokeCapEnd: true;
508
+ readonly strokeJoin: true;
509
+ readonly strokeTop: true;
510
+ readonly strokeRight: true;
511
+ readonly strokeBottom: true;
512
+ readonly strokeLeft: true;
513
+ readonly opacity: true;
514
+ readonly radiusTopLeft: true;
515
+ readonly radiusTopRight: true;
516
+ readonly radiusBottomRight: true;
517
+ readonly radiusBottomLeft: true;
518
+ readonly shadowOn: true;
519
+ readonly shadowColor: true;
520
+ readonly shadowX: true;
521
+ readonly shadowY: true;
522
+ readonly shadowBlur: true;
523
+ readonly shadowSpread: true;
524
+ readonly lineStart: true;
525
+ readonly lineEnd: true;
526
+ readonly bendRadius: true;
527
+ readonly fontFamily: true;
528
+ readonly fontSize: true;
529
+ readonly fontWeight: true;
530
+ readonly italic: true;
531
+ readonly underline: true;
532
+ readonly strike: true;
533
+ readonly color: true;
534
+ readonly letterSpacing: true;
535
+ readonly textCase: true;
536
+ readonly align: true;
537
+ readonly lineHeight: true;
538
+ readonly valign: true;
539
+ readonly paddingTop: true;
540
+ readonly paddingRight: true;
541
+ readonly paddingBottom: true;
542
+ readonly paddingLeft: true;
543
+ };
544
+ export declare const AS_BUILT_CONN_KEYS: {
545
+ readonly route: true;
546
+ readonly start: true;
547
+ readonly end: true;
548
+ readonly startAt: true;
549
+ readonly endAt: true;
550
+ readonly points: true;
551
+ };
552
+ export declare const AS_BUILT_ENDPOINT_KEYS: {
553
+ readonly ref: true;
554
+ readonly side: true;
555
+ readonly anchor: true;
556
+ };
557
+ export declare const AS_BUILT_IMAGE_KEYS: {
558
+ readonly hash: true;
559
+ readonly w: true;
560
+ readonly h: true;
561
+ readonly mime: true;
562
+ readonly crop: true;
563
+ readonly thumb: true;
564
+ };
565
+ export declare const AS_BUILT_EMBED_KEYS: {
566
+ readonly url: true;
567
+ readonly embedUrl: true;
568
+ readonly title: true;
569
+ readonly icon: true;
570
+ readonly preview: true;
571
+ };
572
+ export declare const AS_BUILT_INST_KEYS: {
573
+ readonly def: true;
574
+ readonly defName: true;
575
+ };
576
+ export declare const AS_BUILT_RUN_KEYS: {
577
+ readonly weight: true;
578
+ readonly italic: true;
579
+ readonly underline: true;
580
+ readonly strike: true;
581
+ readonly color: true;
582
+ readonly size: true;
583
+ readonly family: true;
584
+ readonly letterSpacing: true;
585
+ readonly textCase: true;
586
+ readonly link: true;
587
+ };
588
+ export declare const AS_BUILT_PARA_KEYS: {
589
+ readonly align: true;
590
+ readonly lineHeight: true;
591
+ readonly list: true;
592
+ readonly indent: true;
593
+ readonly start: true;
594
+ readonly checked: true;
595
+ };
596
+ export declare const AS_BUILT_NODE_KEYS: readonly ["kind", "xywh", "style", "rot", "hidden", "text", "path", "image", "clip", "name", "extId", "locked", "autoWidth", "autoHeight", "anchors", "embed", "conn", "inst"];
597
+ export declare const AS_BUILT_META_KEYS: readonly ["schema", "kind", "trash"];
598
+ export declare const AS_BUILT_INLINE_MARKS: readonly ["weight", "italic", "underline", "strike", "color", "size", "family", "letterSpacing", "textCase", "link"];
599
+ export declare const AS_BUILT_PARA_ATTRS: readonly ["align", "lineHeight", "list", "indent", "start", "checked"];
600
+ export declare const AS_BUILT_TEXT_KINDS: readonly ["rect", "ellipse", "text", "frame", "sticky", "section", "path"];
601
+ export declare const AS_BUILT_PROPERTIES: readonly {
602
+ readonly key: string;
603
+ readonly path?: string;
604
+ }[];
605
+ export type CurationAction = "keep" | "rename" | "merge" | "drop" | "defer";
606
+ export type TargetArea = "node" | "style" | "text.mark" | "text.para" | "conn" | "endpoint" | "image" | "embed" | "inst" | "kind" | "tree" | "page.meta" | "page.settings" | "board" | "library" | "asset" | "property";
607
+ export interface Target {
608
+ area: TargetArea;
609
+ key: string;
610
+ }
611
+ export declare const LESSONS: {
612
+ readonly "flat-list": "A flat object list with parent back-references that drifted: Disko persisted child lists, rebuilt back-refs at load, and repaired membership in version conversions (objects listed twice, sections by geometry). The tree is the hierarchy (D3): no back-refs, no child lists.";
613
+ readonly "z-order": "O(n) z-order: stacking was the position in a list (IndexOf), reordered by remove-and-reinsert. Sibling order is LoroTree's fractional index (5.3); the renderer keeps sparse ranks.";
614
+ readonly routing: "Brittle connector routing: persisted segments, reflow flags and pivot directions, validated and repaired at load (sometimes moving other objects' points). D13: loose references, `at` as the last committed point, user waypoints only, no routing state.";
615
+ readonly undo: "Per-user undo that replayed captured snapshots as new edits and overwrote peers' later changes. D11: app-level undo per transaction that skips superseded keys; nothing in the schema exists for undo.";
616
+ readonly "yjs-room": "A throwaway Yjs room per text-editing session, committed back as one whole attributed string. One LoroText per object, edited in place (D4, 5.5).";
617
+ readonly "spatial-index": "No spatial index: hit tests and region queries flattened and scanned the tree. The scene store keeps an R-tree; nothing is persisted for it.";
618
+ readonly "split-props": "Disko split grouped props itself (CORNER_RADIUS_* per corner, STROKE_CAP_START/END: its 'splitting props' block, Core/Constants/StyleProps.cs:130), the reason invariant 10 exists. The curated style keeps one key per property.";
619
+ readonly "grouped-value": "A value grouping independently edited parts (Shadow, ArrowPair, FillList, the border-visibility flags) was rebuilt whole from one client's state on every edit of one part, so a peer's concurrent edit of another part was clobbered. Split into keys, one per property (R1).";
620
+ readonly "split-value": "One property stored as several props (LOCATION and SIZE; a SmartLink's Url and EmbedUrl), so concurrent edits of its parts combine into a value nobody made: a move and a resize into a rectangle, one link's card over another's frame. One atomic value (xywh, embed), as invariant 10 asks of xywh.";
621
+ readonly "derived-cache": "Derived data persisted and kept in step (preset outlines, materialized defaults, capability flags, the determined bit). Derived at read time instead.";
622
+ readonly denormalized: "Denormalized copies that go stale (names copied into text blocks, parent ids in search metadata). One source of truth per fact.";
623
+ };
624
+ export type Lesson = keyof typeof LESSONS;
625
+ export interface CurationEntry {
626
+ source: string;
627
+ cite: string;
628
+ action: CurationAction;
629
+ target: Target | null;
630
+ reason: string;
631
+ lossy?: string;
632
+ options?: string;
633
+ lesson?: Lesson;
634
+ }
635
+ export declare const OPEN_QUESTIONS: readonly [{
636
+ readonly id: "Q1";
637
+ readonly question: "Do existing Axure Cloud boards get imported at all? If yes, with which reader: a TypeScript reimplementation of Disko's format (the byte layer is self-describing, the class layer must be re-specified from Disko's code) or a one-off exporter built on Disko's own C# loader and run as a migration tool (C7 forbids C# in daas-board, not in a tool)?";
638
+ readonly answer: "No Axure Cloud import; the product is standalone. CONVERSION.md and this table's import mappings remain reference only.";
639
+ }, {
640
+ readonly id: "Q2";
641
+ readonly question: "Embeds (Disko SmartLink, kind `embed`): does daas-board draw a link card from the URL alone or snapshot title, favicon and preview into the doc (deterministic server rendering, C1), and may a host overlay live iframes on the canvas (C3: a guest in someone else's page)? A snapshot goes inside the `embed` value (one value with its URL), and its preview and favicon are uploaded as assets and referenced as ImageRefs (C8, D10): their URLs and bytes stay out of the doc.";
642
+ readonly answer: "Decided 2026-10-20: an embed stores its page's title, icon and preview inside the `embed` value, the icon and preview as assets referenced by ImageRefs (C8, D10), written by the host's lookup when the link is set, so the server draws the card the client shows (C1). Live iframes are a later opt-in host overlay (C3).";
643
+ }, {
644
+ readonly id: "Q3";
645
+ readonly question: "Prototype links (LinkToObjectInfo and the frame player, behind a flag in Disko): in scope? If yes, node.linkTo holds the target ObjectId (Disko's transitions are constants).";
646
+ readonly answer: "Decided 2026-10-20: no prototype links or player in v1. The LinkToObjectInfo entries are drops; a later version would add `linkTo`.";
647
+ }, {
648
+ readonly id: "Q4";
649
+ readonly question: "Component instances (legacy: no current Disko UI creates one; the quick-insert 'Pattern ' hook did from 2024-09-11 to 2024-10-29, if that build was deployed, and paste, library and template inserts carry them along; the definition is any group, frame or section of the same page): import them as `inst` with a generated library doc holding copies of their definitions (the table's default: faithful, and R7's schema has the target), or detach them into plain groups (simpler, no link)? The curated schema keeps `inst` either way (R7); when instances ship is Q16.";
650
+ readonly answer: "Lapsed with Q1: no instances are imported. The curated schema keeps `inst` as ARCHITECTURE 5.2 planned; when instances ship is Q16 (answered: not in v1).";
651
+ }, {
652
+ readonly id: "Q5";
653
+ readonly question: "Libraries and templates, Disko's insert-a-copy catalogues: a library board published as paste-data items (LibraryBehavior, manifest, items) and a board saved as a template (paste data, side document, media) to create boards from. Do daas-board's library docs (R7: definitions for instances) also serve such catalogues, or are both host features (a doc to copy from)? This standalone product decision stays open; Q1 rules out importing existing published libraries and templates.";
654
+ readonly answer: "Decided 2026-10-20: libraries and templates are host features; daas-board copies content between boards for the host. The library doc (R7) serves instance definitions only, and no instances ship in v1 (Q16).";
655
+ }, {
656
+ readonly id: "Q6";
657
+ readonly question: "Fills: gradients and multiple fill layers (DESIGN pane, SVG-converted icons). Out of v1 (import flattens to one colour), or in? If in, the trade-off is R1's: one atomic paint value per fill (the stops and axis are edited as one, so a concurrent stop edit and axis edit lose one of them), or split keys (fillGradientStops, fillGradientAngle, ...) where each edit survives but a layer list cannot be split that way.";
658
+ readonly answer: "Decided 2026-10-20: gradient fills and multiple fill layers are in, each fill one atomic value. As curated: `fill` holds one paint (a colour, a token reference, or a gradient) or a stack of paints, bottom first; the stack is one value too (AtomicStyleValues), so two peers editing two layers of one object lose one edit; the owner chose this stack over a layer map (D1, confirmed 2026-10-21) because multi-layer fills come from imported icons and DESIGN-grade content while the toolbar writes one layer.";
659
+ }, {
660
+ readonly id: "Q7";
661
+ readonly question: "Comments: threads live in Axure Cloud's issue service, anchored to object Guids through Diagram.TrackingObjects. Does daas-board's host own comments and their anchoring to objects? This standalone product decision stays open; Q1 rules out importing Axure Cloud threads and pins.";
662
+ readonly answer: "Decided 2026-10-20: comment threads and their pins belong to the host, anchored on daas-board's stable object ids (invariant 13); the page doc stores nothing for them.";
663
+ }, {
664
+ readonly id: "Q8";
665
+ readonly question: "Disko Guids: kept as extId on import (the table's default) so permalinks, comment pins and side-document links still resolve, or dropped (no external identity carried over)? Kept, an extId is written once by create and never copied (duplicate, paste, template insert and the importer's copies make nodes without it), so it names at most one live node of a board.";
666
+ readonly answer: "Lapsed with Q1: no Disko Guids are imported. The curated schema keeps `extId` for host identity as ARCHITECTURE 5.2 planned, written once and never copied.";
667
+ }, {
668
+ readonly id: "Q9";
669
+ readonly question: "The board's side document (spec pane: a Yjs/TipTap document with its media, split layout, and links and live screenshots into the canvas): does the standalone product support one, and if so as a daas-board room type or the host's? This product decision stays open; Q1 rules out importing existing side documents.";
670
+ readonly answer: "Decided 2026-10-20: no side document in v1.";
671
+ }, {
672
+ readonly id: "Q10";
673
+ readonly question: "Marker strokes: kind `path` drawn with a uniform round stroke (the table's default), or a dedicated ink kind whose renderer simulates pressure like Disko's?";
674
+ readonly answer: "Default accepted: marker strokes are paths with a uniform round stroke.";
675
+ }, {
676
+ readonly id: "Q11";
677
+ readonly question: "Preset shapes (star, diamond, arrows, speech bubble, database, ...): baked into paths (the table's default), or parametric kinds (ShapeDefinitions, 5.8) that keep corner-radius regeneration, smart handles and shape swapping?";
678
+ readonly answer: "Default accepted: preset shapes are baked into paths.";
679
+ }, {
680
+ readonly id: "Q12";
681
+ readonly question: "Per-side borders (BORDER_VISIBILITY): four boolean style keys, strokeTop, strokeRight, strokeBottom and strokeLeft, one per side (Disko's flag set is rewritten whole, so two concurrent side toggles clobber each other), with a renderer that strokes a partial outline and zeroes the corner radii next to a hidden side (a render rule, nothing stored), or unsupported (imports stroke every side)?";
682
+ readonly answer: "Decided 2026-10-20: per-side borders are in, as four style keys (strokeTop, strokeRight, strokeBottom, strokeLeft; absent = stroked); the renderer strokes a partial outline and draws the corners next to a hidden side square.";
683
+ }, {
684
+ readonly id: "Q13";
685
+ readonly question: "Text case (LETTER_CASE per object, LetterCasing per run): a render-time transform (textCase style key and mark, with editor offsets mapped through case changes that alter length, e.g. ß -> SS), or baked into the characters at import?";
686
+ readonly answer: "Decided 2026-10-20: text case is in as a render-time transform, the `textCase` style key and mark (upper, lower; the mark's none is the explicit off), applied when the text is laid out, with the default Unicode case mapping (locale-independent, C1), and never while the text is edited, so no editor offset maps through a length change. Disko persists upper and lower case only, so there is no title case.";
687
+ }, {
688
+ readonly id: "Q14";
689
+ readonly question: "Mentions (@user in card text): a mention mark (user id) with notifications by the host, or plain '@name' text?";
690
+ readonly answer: "Decided 2026-10-20: mentions are plain '@name' text; no mention mark.";
691
+ }, {
692
+ readonly id: "Q15";
693
+ readonly question: "Endpoint values and invariant 10 (D13, R4): an endpoint { ref, side, anchor, at } is one value in `conn`, and the document's anchor pass rewrites it whenever the target's box changes, so a peer's concurrent re-point of the same end can lose to that refresh (last writer wins on the whole endpoint; the re-point is undone). Keep D13's shape and accept it, or store `at` as its own conn key (startAt, endAt) so a re-point and an anchor refresh both survive (a stale `at` only matters once the ref dangles, and the next box change heals it)?";
694
+ readonly answer: "Decided 2026-10-20: `at` moves out of the endpoint value into its own conn key, startAt and endAt, so a peer's re-point of an end and the document's anchor refresh both survive (D13).";
695
+ }, {
696
+ readonly id: "Q16";
697
+ readonly question: "Components in daas-board (R7, 5.2): do instances ship in v1, and what may an instance override: style and visibility only (Disko's model, InstanceOverride as curated), or also text content (one LoroText per instance and path) and the image? Disko persists no content override, so an import loses nothing either way.";
698
+ readonly answer: "Decided 2026-10-20: no component instances in v1. The schema keeps `inst` and the `instance` kind (R7) for later; what an instance may override beyond style and visibility stays open until then.";
699
+ }, {
700
+ readonly id: "Q17";
701
+ readonly question: "Inline atoms in text (the product facts' 'possibly inline images'; Disko's inline link cards and canvas-link pills, whose text is built at render time from link metadata): one representation for an inline object inside a LoroText, e.g. U+FFFC carrying an atom mark { kind: card | objLink | image, ... } (one value per atom), or none in v1 (cards and canvas links import as linked text)?";
702
+ readonly answer: "Decided 2026-10-20: no inline atoms in text in v1; cards and canvas links are linked text.";
703
+ }];
704
+ export type QuestionId = (typeof OPEN_QUESTIONS)[number]["id"];
705
+ export declare const CURATION: readonly CurationEntry[];
706
+ export declare function resolveCuration(table: readonly CurationEntry[], id: string): CurationEntry | undefined;
707
+ export declare function curationFor(id: string): CurationEntry | undefined;
708
+ export type ChangeArea = "SceneObject" | "materializeNode" | "builtinProperties" | "text" | "editor" | "server" | "page.settings" | "board" | "library" | "asset";
709
+ export type Migration = "none" | "read-adapt" | "convergent-write";
710
+ export type ChangeProbe = {
711
+ file: string;
712
+ has: string;
713
+ } | {
714
+ file: string;
715
+ lacks: string;
716
+ };
717
+ export interface ImpliedChange {
718
+ id: string;
719
+ area: ChangeArea;
720
+ op: "add" | "remove" | "change";
721
+ target: Target;
722
+ change: string;
723
+ migration: Migration;
724
+ sources: readonly string[];
725
+ was?: ChangeProbe;
726
+ }
727
+ export declare const IMPLIED_CHANGES: readonly ImpliedChange[];
728
+ export {};