@dashfoo/core 0.5.2 → 1.0.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.
package/dist/index.d.ts CHANGED
@@ -1,6 +1,15 @@
1
1
  import { z } from "zod";
2
- //#region src/state/actions.d.ts
3
- declare const mutableNodeAttrsSchema: z.ZodUnion<readonly [z.ZodObject<{
2
+ //#region src/state/node-attrs.d.ts
3
+ /**
4
+ * One all-optional object carrying every mutable key of every node kind, not a
5
+ * union of the three: a union whose members are all fully optional matches on
6
+ * its first member and strips the keys the others own, which erased every
7
+ * tabset and row attribute at the parse boundary. The four keys that two kinds
8
+ * share (`enableClose`, `max`, `min`, `weight`) declare the same type on both
9
+ * sides, so merging widens nothing. Which keys are legal for a given node is
10
+ * enforced by the reducer against that node's own schema.
11
+ */
12
+ declare const mutableNodeAttrsSchema: z.ZodObject<{
4
13
  name: z.ZodOptional<z.ZodString>;
5
14
  config: z.ZodOptional<z.ZodOptional<z.ZodType<string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | {
6
15
  [key: string]: string | number | boolean | /*elided*/ any | /*elided*/ any | null;
@@ -51,37 +60,11 @@ declare const mutableNodeAttrsSchema: z.ZodUnion<readonly [z.ZodObject<{
51
60
  } | null)[] | {
52
61
  [key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
53
62
  } | null, unknown>>>>;
54
- enableClose: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
55
63
  enableDrag: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
56
64
  enableRename: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
57
- }, z.core.$strip>, z.ZodObject<{
58
65
  enableClose: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
59
66
  enableMaximize: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
60
- max: z.ZodOptional<z.ZodOptional<z.ZodObject<{
61
- unit: z.ZodEnum<{
62
- px: "px";
63
- "%": "%";
64
- em: "em";
65
- rem: "rem";
66
- vh: "vh";
67
- vw: "vw";
68
- }>;
69
- value: z.ZodNumber;
70
- }, z.core.$strip>>>;
71
- min: z.ZodOptional<z.ZodOptional<z.ZodObject<{
72
- unit: z.ZodEnum<{
73
- px: "px";
74
- "%": "%";
75
- em: "em";
76
- rem: "rem";
77
- vh: "vh";
78
- vw: "vw";
79
- }>;
80
- value: z.ZodNumber;
81
- }, z.core.$strip>>>;
82
67
  selected: z.ZodOptional<z.ZodNumber>;
83
- weight: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
84
- }, z.core.$strip>, z.ZodObject<{
85
68
  max: z.ZodOptional<z.ZodOptional<z.ZodObject<{
86
69
  unit: z.ZodEnum<{
87
70
  px: "px";
@@ -114,7 +97,9 @@ declare const mutableNodeAttrsSchema: z.ZodUnion<readonly [z.ZodObject<{
114
97
  threshold: z.ZodOptional<z.ZodNumber>;
115
98
  }, z.core.$strip>>>;
116
99
  weight: z.ZodOptional<z.ZodNumber>;
117
- }, z.core.$strip>]>;
100
+ }, z.core.$strip>;
101
+ //#endregion
102
+ //#region src/state/actions.d.ts
118
103
  declare const dockLocationSchema: z.ZodEnum<{
119
104
  center: "center";
120
105
  "split-bottom": "split-bottom";
@@ -240,7 +225,7 @@ declare const actionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
240
225
  type: z.ZodLiteral<"adjustSplit">;
241
226
  weights: z.ZodArray<z.ZodNumber>;
242
227
  }, z.core.$strip>, z.ZodObject<{
243
- attrs: z.ZodUnion<readonly [z.ZodObject<{
228
+ attrs: z.ZodObject<{
244
229
  name: z.ZodOptional<z.ZodString>;
245
230
  config: z.ZodOptional<z.ZodOptional<z.ZodType<string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | {
246
231
  [key: string]: string | number | boolean | /*elided*/ any | /*elided*/ any | null;
@@ -291,37 +276,11 @@ declare const actionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
291
276
  } | null)[] | {
292
277
  [key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
293
278
  } | null, unknown>>>>;
294
- enableClose: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
295
279
  enableDrag: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
296
280
  enableRename: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
297
- }, z.core.$strip>, z.ZodObject<{
298
281
  enableClose: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
299
282
  enableMaximize: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
300
- max: z.ZodOptional<z.ZodOptional<z.ZodObject<{
301
- unit: z.ZodEnum<{
302
- px: "px";
303
- "%": "%";
304
- em: "em";
305
- rem: "rem";
306
- vh: "vh";
307
- vw: "vw";
308
- }>;
309
- value: z.ZodNumber;
310
- }, z.core.$strip>>>;
311
- min: z.ZodOptional<z.ZodOptional<z.ZodObject<{
312
- unit: z.ZodEnum<{
313
- px: "px";
314
- "%": "%";
315
- em: "em";
316
- rem: "rem";
317
- vh: "vh";
318
- vw: "vw";
319
- }>;
320
- value: z.ZodNumber;
321
- }, z.core.$strip>>>;
322
283
  selected: z.ZodOptional<z.ZodNumber>;
323
- weight: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
324
- }, z.core.$strip>, z.ZodObject<{
325
284
  max: z.ZodOptional<z.ZodOptional<z.ZodObject<{
326
285
  unit: z.ZodEnum<{
327
286
  px: "px";
@@ -354,7 +313,7 @@ declare const actionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
354
313
  threshold: z.ZodOptional<z.ZodNumber>;
355
314
  }, z.core.$strip>>>;
356
315
  weight: z.ZodOptional<z.ZodNumber>;
357
- }, z.core.$strip>]>;
316
+ }, z.core.$strip>;
358
317
  nodeId: z.ZodString;
359
318
  type: z.ZodLiteral<"updateNodeAttributes">;
360
319
  }, z.core.$strip>, z.ZodObject<{
@@ -438,6 +397,15 @@ type DropIntent = {
438
397
  };
439
398
  //#endregion
440
399
  //#region src/model/schema.d.ts
400
+ /**
401
+ * Weights are relative shares, and every reader that rendered one already
402
+ * treated a missing weight as a single share (`row-view` summed `weight ?? 1`),
403
+ * so filling it in at the boundary changes nothing on screen. The one place that
404
+ * read a missing weight as a percentage was `placeBesideTarget`, which is why
405
+ * docking beside an unweighted target halved it to `50` and left its unweighted
406
+ * siblings rendering as a sliver of the row.
407
+ */
408
+ declare const DEFAULT_WEIGHT = 1;
441
409
  type JsonValue = string | number | boolean | null | Array<JsonValue> | {
442
410
  [key: string]: JsonValue;
443
411
  };
@@ -486,7 +454,14 @@ declare const tabNodeSchema: z.ZodObject<{
486
454
  name: z.ZodString;
487
455
  type: z.ZodLiteral<"tab">;
488
456
  }, z.core.$strip>;
489
- declare const tabsetNodeSchema: z.ZodObject<{
457
+ /**
458
+ * The pre-transform object, kept separate so `node-attrs` can `.pick()` mutable
459
+ * keys off it. Picking from the transformed schema is impossible (a pipe has no
460
+ * `.pick`), and picking `weight` with its default attached would inject that
461
+ * default: `.partial()` over a defaulted field still fills it in, which would
462
+ * rewrite a tabset's weight on every unrelated attribute update.
463
+ */
464
+ declare const tabsetNodeObjectSchema: z.ZodObject<{
490
465
  children: z.ZodArray<z.ZodObject<{
491
466
  component: z.ZodString;
492
467
  config: z.ZodOptional<z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
@@ -525,8 +500,101 @@ declare const tabsetNodeSchema: z.ZodObject<{
525
500
  name: z.ZodOptional<z.ZodString>;
526
501
  selected: z.ZodNumber;
527
502
  type: z.ZodLiteral<"tabset">;
528
- weight: z.ZodOptional<z.ZodNumber>;
503
+ weight: z.ZodDefault<z.ZodNumber>;
529
504
  }, z.core.$strip>;
505
+ declare const tabsetNodeSchema: z.ZodPipe<z.ZodObject<{
506
+ children: z.ZodArray<z.ZodObject<{
507
+ component: z.ZodString;
508
+ config: z.ZodOptional<z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
509
+ enableClose: z.ZodOptional<z.ZodBoolean>;
510
+ enableDrag: z.ZodOptional<z.ZodBoolean>;
511
+ enableRename: z.ZodOptional<z.ZodBoolean>;
512
+ id: z.ZodString;
513
+ name: z.ZodString;
514
+ type: z.ZodLiteral<"tab">;
515
+ }, z.core.$strip>>;
516
+ enableClose: z.ZodOptional<z.ZodBoolean>;
517
+ enableMaximize: z.ZodOptional<z.ZodBoolean>;
518
+ id: z.ZodString;
519
+ max: z.ZodOptional<z.ZodObject<{
520
+ unit: z.ZodEnum<{
521
+ px: "px";
522
+ "%": "%";
523
+ em: "em";
524
+ rem: "rem";
525
+ vh: "vh";
526
+ vw: "vw";
527
+ }>;
528
+ value: z.ZodNumber;
529
+ }, z.core.$strip>>;
530
+ min: z.ZodOptional<z.ZodObject<{
531
+ unit: z.ZodEnum<{
532
+ px: "px";
533
+ "%": "%";
534
+ em: "em";
535
+ rem: "rem";
536
+ vh: "vh";
537
+ vw: "vw";
538
+ }>;
539
+ value: z.ZodNumber;
540
+ }, z.core.$strip>>;
541
+ name: z.ZodOptional<z.ZodString>;
542
+ selected: z.ZodNumber;
543
+ type: z.ZodLiteral<"tabset">;
544
+ weight: z.ZodDefault<z.ZodNumber>;
545
+ }, z.core.$strip>, z.ZodTransform<{
546
+ selected: number;
547
+ children: {
548
+ component: string;
549
+ id: string;
550
+ name: string;
551
+ type: "tab";
552
+ config?: JsonValue | undefined;
553
+ enableClose?: boolean | undefined;
554
+ enableDrag?: boolean | undefined;
555
+ enableRename?: boolean | undefined;
556
+ }[];
557
+ id: string;
558
+ type: "tabset";
559
+ weight: number;
560
+ enableClose?: boolean | undefined;
561
+ enableMaximize?: boolean | undefined;
562
+ max?: {
563
+ unit: "px" | "%" | "em" | "rem" | "vh" | "vw";
564
+ value: number;
565
+ } | undefined;
566
+ min?: {
567
+ unit: "px" | "%" | "em" | "rem" | "vh" | "vw";
568
+ value: number;
569
+ } | undefined;
570
+ name?: string | undefined;
571
+ }, {
572
+ children: {
573
+ component: string;
574
+ id: string;
575
+ name: string;
576
+ type: "tab";
577
+ config?: JsonValue | undefined;
578
+ enableClose?: boolean | undefined;
579
+ enableDrag?: boolean | undefined;
580
+ enableRename?: boolean | undefined;
581
+ }[];
582
+ id: string;
583
+ selected: number;
584
+ type: "tabset";
585
+ weight: number;
586
+ enableClose?: boolean | undefined;
587
+ enableMaximize?: boolean | undefined;
588
+ max?: {
589
+ unit: "px" | "%" | "em" | "rem" | "vh" | "vw";
590
+ value: number;
591
+ } | undefined;
592
+ min?: {
593
+ unit: "px" | "%" | "em" | "rem" | "vh" | "vw";
594
+ value: number;
595
+ } | undefined;
596
+ name?: string | undefined;
597
+ }>>;
530
598
  type RowNode = {
531
599
  children: Array<RowNode | z.infer<typeof tabsetNodeSchema>>;
532
600
  id: string;
@@ -535,9 +603,19 @@ type RowNode = {
535
603
  orientation: z.infer<typeof orientationSchema>;
536
604
  snap?: z.infer<typeof snapSchema>;
537
605
  type: "row";
606
+ weight: number;
607
+ };
608
+ type RowNodeInput = {
609
+ children: Array<RowNodeInput | z.input<typeof tabsetNodeSchema>>;
610
+ id: string;
611
+ max?: z.infer<typeof dimensionSchema>;
612
+ min?: z.infer<typeof dimensionSchema>;
613
+ orientation: z.infer<typeof orientationSchema>;
614
+ snap?: z.infer<typeof snapSchema>;
615
+ type: "row";
538
616
  weight?: number;
539
617
  };
540
- declare const rowNodeSchema: z.ZodType<RowNode>;
618
+ declare const rowNodeSchema: z.ZodType<RowNode, RowNodeInput>;
541
619
  declare const geometrySchema: z.ZodObject<{
542
620
  height: z.ZodNumber;
543
621
  left: z.ZodNumber;
@@ -552,7 +630,7 @@ declare const floatNodeSchema: z.ZodObject<{
552
630
  width: z.ZodNumber;
553
631
  }, z.core.$strip>;
554
632
  id: z.ZodString;
555
- layout: z.ZodType<RowNode, unknown, z.core.$ZodTypeInternals<RowNode, unknown>>;
633
+ layout: z.ZodType<RowNode, RowNodeInput, z.core.$ZodTypeInternals<RowNode, RowNodeInput>>;
556
634
  minimized: z.ZodOptional<z.ZodBoolean>;
557
635
  name: z.ZodOptional<z.ZodString>;
558
636
  type: z.ZodLiteral<"float">;
@@ -579,7 +657,7 @@ declare const globalAttributesSchema: z.ZodObject<{
579
657
  }, z.core.$strip>;
580
658
  declare const dashfooSchema: z.ZodObject<{
581
659
  activeTabsetId: z.ZodOptional<z.ZodString>;
582
- floats: z.ZodOptional<z.ZodArray<z.ZodObject<{
660
+ floats: z.ZodDefault<z.ZodArray<z.ZodObject<{
583
661
  geometry: z.ZodObject<{
584
662
  height: z.ZodNumber;
585
663
  left: z.ZodNumber;
@@ -587,7 +665,7 @@ declare const dashfooSchema: z.ZodObject<{
587
665
  width: z.ZodNumber;
588
666
  }, z.core.$strip>;
589
667
  id: z.ZodString;
590
- layout: z.ZodType<RowNode, unknown, z.core.$ZodTypeInternals<RowNode, unknown>>;
668
+ layout: z.ZodType<RowNode, RowNodeInput, z.core.$ZodTypeInternals<RowNode, RowNodeInput>>;
591
669
  minimized: z.ZodOptional<z.ZodBoolean>;
592
670
  name: z.ZodOptional<z.ZodString>;
593
671
  type: z.ZodLiteral<"float">;
@@ -612,7 +690,7 @@ declare const dashfooSchema: z.ZodObject<{
612
690
  tabSetEnableTabStrip: z.ZodOptional<z.ZodBoolean>;
613
691
  tabSetMinSize: z.ZodOptional<z.ZodNumber>;
614
692
  }, z.core.$strip>;
615
- layout: z.ZodType<RowNode, unknown, z.core.$ZodTypeInternals<RowNode, unknown>>;
693
+ layout: z.ZodType<RowNode, RowNodeInput, z.core.$ZodTypeInternals<RowNode, RowNodeInput>>;
616
694
  maximizedTabsetId: z.ZodOptional<z.ZodString>;
617
695
  version: z.ZodLiteral<1>;
618
696
  }, z.core.$strip>;
@@ -628,6 +706,8 @@ type Geometry = z.infer<typeof geometrySchema>;
628
706
  type FloatNode = z.infer<typeof floatNodeSchema>;
629
707
  type GlobalAttributes = z.infer<typeof globalAttributesSchema>;
630
708
  type Dashfoo = z.infer<typeof dashfooSchema>;
709
+ /** The loose shape `dashfooSchema` accepts: `weight` and `floats` may be omitted. */
710
+ type DashfooInput = z.input<typeof dashfooSchema>;
631
711
  type Node = RowNode | TabsetNode | TabNode;
632
712
  //#endregion
633
713
  //#region src/model/builders.d.ts
@@ -696,6 +776,8 @@ type DockZone = {
696
776
  location: DockLocation;
697
777
  points: Array<Point>;
698
778
  };
779
+ declare const dockLocationFor: (target: DockTarget) => DockLocation;
780
+ declare const splitEdge: (location: DockLocation) => Edge | undefined;
699
781
  declare const resolveDockTarget: (pointer: Point, rect: Rect, opts?: BandOptions) => DockTarget;
700
782
  declare const dockZonePolygons: (rect: Rect, opts?: BandOptions) => Array<DockZone>;
701
783
  declare const zoneRect: (rect: Rect, location: DockLocation) => Rect;
@@ -709,6 +791,16 @@ type SnapResult = {
709
791
  snapped: boolean;
710
792
  };
711
793
  declare const snapSizes: (sizes: Array<number>, boundaryIndex: number, config: SnapConfig) => SnapResult;
794
+ type SnapDecision = {
795
+ kind: "inactive";
796
+ } | {
797
+ kind: "clear";
798
+ } | {
799
+ kind: "engage";
800
+ sizes: Array<number>;
801
+ };
802
+ declare const decideSnap: (sizes: Array<number>, boundaryIndex: number | null, config: SnapConfig | null) => SnapDecision;
803
+ declare const settleSnap: (sizes: Array<number>, boundaryIndex: number | null, config: SnapConfig | null) => Array<number>;
712
804
  //#endregion
713
805
  //#region src/state/history.d.ts
714
806
  type History = {
@@ -746,7 +838,7 @@ type DashfooEvent = {
746
838
  } | {
747
839
  type: "UNDO";
748
840
  };
749
- type DashfooInput = {
841
+ type DashfooMachineInput = {
750
842
  model: Dashfoo;
751
843
  };
752
844
  declare const dashfooMachine: import("xstate").StateMachine<DashfooContext, {
@@ -759,7 +851,7 @@ declare const dashfooMachine: import("xstate").StateMachine<DashfooContext, {
759
851
  type: "REDO";
760
852
  } | {
761
853
  type: "UNDO";
762
- }, {}, never, never, never, never, "ready", string, DashfooInput, import("xstate").NonReducibleUnknown, import("xstate").EventObject, import("xstate").MetaObject, {
854
+ }, {}, never, never, never, never, "ready", string, DashfooMachineInput, import("xstate").NonReducibleUnknown, import("xstate").EventObject, import("xstate").MetaObject, {
763
855
  id: "dashfoo";
764
856
  states: {
765
857
  readonly ready: {};
@@ -850,5 +942,5 @@ declare const findTabsetParent: (row: RowNode, tabsetId: string) => {
850
942
  } | undefined;
851
943
  declare const findDuplicateIds: (model: Dashfoo) => Array<string>;
852
944
  //#endregion
853
- export { type Action, type AttributedNode, type BandOptions, DEFAULT_SNAP_THRESHOLD, type Dashfoo, type DashfooContext, type DashfooEvent, type DashfooInput, type Dimension, type DockLocation, type DockTarget, type DockZone, type DragContext, type DragEmitted, type DragEvent, type DragSubject, type DropIntent, type Edge, type FloatNode, type FloatOptions, type Geometry, type GlobalAttributes, HISTORY_LIMIT, type History, type Json, type ModelOptions, type MutableNodeAttrs, type Node, type Orientation, type Point, type Rect, type RowNode, type RowOptions, type SnapConfig, type SnapResult, type TabContainer, type TabLocation, type TabNode, type TabOptions, type TabsetNode, type TabsetOptions, type Unit, actionSchema, canRedo, canUndo, collectRoots, collectTabsets, collectTabsetsInRow, createHistory, createNodeId, createTabId, dashfooMachine, dashfooSchema, dimensionSchema, dispatch, dockLocationSchema, dockZonePolygons, dragDockMachine, edgeSchema, findAttributedNode, findDuplicateIds, findFloat, findRootContaining, findRow, findTab, findTabset, findTabsetParent, floatNode, floatNodeSchema, fromJSON, geometrySchema, getFirstTabset, globalAttributesSchema, jsonValueSchema, model, mutableNodeAttrsSchema, normalize, orientationSchema, parseModel, redo, reducer, resolveDockTarget, resolveSnapTargets, row, rowNodeSchema, snapEnabled, snapSchema, snapSizes, stackModel, tab, tabNodeSchema, tabset, tabsetNodeSchema, toJSON, undo, unitSchema, zoneRect };
945
+ export { type Action, type AttributedNode, type BandOptions, DEFAULT_SNAP_THRESHOLD, DEFAULT_WEIGHT, type Dashfoo, type DashfooContext, type DashfooEvent, type DashfooInput, type DashfooMachineInput, type Dimension, type DockLocation, type DockTarget, type DockZone, type DragContext, type DragEmitted, type DragEvent, type DragSubject, type DropIntent, type Edge, type FloatNode, type FloatOptions, type Geometry, type GlobalAttributes, HISTORY_LIMIT, type History, type Json, type ModelOptions, type MutableNodeAttrs, type Node, type Orientation, type Point, type Rect, type RowNode, type RowNodeInput, type RowOptions, type SnapConfig, type SnapDecision, type SnapResult, type TabContainer, type TabLocation, type TabNode, type TabOptions, type TabsetNode, type TabsetOptions, type Unit, actionSchema, canRedo, canUndo, collectRoots, collectTabsets, collectTabsetsInRow, createHistory, createNodeId, createTabId, dashfooMachine, dashfooSchema, decideSnap, dimensionSchema, dispatch, dockLocationFor, dockLocationSchema, dockZonePolygons, dragDockMachine, edgeSchema, findAttributedNode, findDuplicateIds, findFloat, findRootContaining, findRow, findTab, findTabset, findTabsetParent, floatNode, floatNodeSchema, fromJSON, geometrySchema, getFirstTabset, globalAttributesSchema, jsonValueSchema, model, mutableNodeAttrsSchema, normalize, orientationSchema, parseModel, redo, reducer, resolveDockTarget, resolveSnapTargets, row, rowNodeSchema, settleSnap, snapEnabled, snapSchema, snapSizes, splitEdge, stackModel, tab, tabNodeSchema, tabset, tabsetNodeObjectSchema, tabsetNodeSchema, toJSON, undo, unitSchema, zoneRect };
854
946
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../src/state/actions.ts","../src/model/schema.ts","../src/model/builders.ts","../src/geometry/geometry.ts","../src/geometry/snap.ts","../src/state/history.ts","../src/model/ids.ts","../src/model/invariants.ts","../src/machines/dashfoo-machine.ts","../src/machines/drag-dock-machine.ts","../src/state/reducer.ts","../src/model/serialize.ts","../src/model/stack.ts","../src/model/tree.ts"],"mappings":";;cA2CM,wBAAsB,EAAA,mBAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAMtB,oBAAkB,EAAA;;;;;;;cAUlB,cAAY,EAAA,uBAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAgFb,eAAe,EAAE,aAAa;KAC9B,mBAAmB,EAAE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AAQ;;cAS/B,kCAAe,aAAA;UAdP;;;WACC;;;;;;;;;;;;;;;;;;cC2LT,UAAW,OAAO,SAAS,QAAQ,WAAS;;;cCnM5C,aAAc,mBAAiB;cAU/B,SAAU,OAAO;cAEjB,WAAY,iBAAe;;;cCb3B,aAAc,OAAO,SAAS,cAAa,gBAAyB;;;KCFrE,eAAe;KACf;EAAgB,WAAW;EAAc;EAAe,KAAK;;cAE5D,eAAgB,OAAO,YAAU,MAAM;cAKvC,YAAa,OAAO,SAAS,oBAAkB;KAGhD,iBAAiB,UAAU,UAAU;cAyDpC,sBAAuB,KAAK,SAAS,KAAK,MAAM;cAShD,iBAAkB,OAAO,YAAU,MAAM;cAQzC,iBAAkB,OAAO,YAAU;cAEnC,aAAc,OAAO,SAAS,qBAAmB;cAiBjD,UAAW,OAAO,SAAS,kBAAgB;cAW3C,UAAW,KAAK,SAAS,eAAa;cAQtC,qBAAsB,OAAO,SAAS,eAAa;cAUnD,qBAAsB,OAAO,SAAS,mBAAiB;cASvD,mBACJ,KAAK,SACL;EACG;EAAe,QAAQ;;cActB,mBAAoB,OAAO,YAAU"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../src/state/node-attrs.ts","../src/state/actions.ts","../src/model/schema.ts","../src/model/builders.ts","../src/geometry/geometry.ts","../src/geometry/snap.ts","../src/state/history.ts","../src/model/ids.ts","../src/model/invariants.ts","../src/machines/dashfoo-machine.ts","../src/machines/drag-dock-machine.ts","../src/state/reducer.ts","../src/model/serialize.ts","../src/model/stack.ts","../src/model/tree.ts"],"mappings":";;;;;;;;;;;cAuDM,wBAAsB,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cCjDtB,oBAAkB,EAAA;;;;;;;cAUlB,cAAY,EAAA,uBAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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