@dashfoo/core 0.4.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.
- package/README.md +58 -17
- package/dist/index.d.ts +95 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1149 -1
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -29,19 +29,24 @@ type Dashfoo = {
|
|
|
29
29
|
layout: RowNode; // the root is always a row
|
|
30
30
|
activeTabsetId?: string;
|
|
31
31
|
maximizedTabsetId?: string;
|
|
32
|
+
floats?: FloatNode[]; // floating panels, each its own layout subtree
|
|
32
33
|
};
|
|
33
34
|
```
|
|
34
35
|
|
|
35
|
-
The tree has three node kinds, each discriminated by `type
|
|
36
|
+
The tree has three node kinds, each discriminated by `type`, plus an optional
|
|
37
|
+
floating-panel node:
|
|
36
38
|
|
|
37
|
-
| Node | `type` | Holds
|
|
38
|
-
| ------------ | ---------- |
|
|
39
|
-
| `RowNode` | `"row"` | `children` (rows or tabsets), `orientation` (`row`/`column`), `weight?`
|
|
40
|
-
| `TabsetNode` | `"tabset"` | `children` (tabs), `selected` index, optional `min`/`max`/`weight`
|
|
41
|
-
| `TabNode` | `"tab"` | `component`, `name`, `id`, optional `config` + `enable*` flags
|
|
39
|
+
| Node | `type` | Holds |
|
|
40
|
+
| ------------ | ---------- | ---------------------------------------------------------------------------------------- |
|
|
41
|
+
| `RowNode` | `"row"` | `children` (rows or tabsets), `orientation` (`row`/`column`), `weight?` |
|
|
42
|
+
| `TabsetNode` | `"tabset"` | `children` (tabs), `selected` index, optional `min`/`max`/`weight` |
|
|
43
|
+
| `TabNode` | `"tab"` | `component`, `name`, `id`, optional `config` + `enable*` flags |
|
|
44
|
+
| `FloatNode` | `"float"` | a floating panel: its own `layout` (`RowNode`), `geometry`, optional `name`, `minimized` |
|
|
42
45
|
|
|
43
46
|
Rows nest (a row's child can be another row), which is how arbitrary tiled splits
|
|
44
|
-
are represented. `
|
|
47
|
+
are represented. `floats` carry floating panels (see "Floating panels" below): each
|
|
48
|
+
owns a full `RowNode` layout, so traversals and actions treat a float as a second
|
|
49
|
+
root alongside `layout`. `min`/`max` are `Dimension` values (`{ unit, value }`) where
|
|
45
50
|
`unit` is one of `px`, `%`, `em`, `rem`, `vh`, `vw`. `global.tabSetMinSize` is
|
|
46
51
|
the default tabset minimum size in pixels for renderers that honor it; the React
|
|
47
52
|
adapter falls back to `320px` when it is omitted.
|
|
@@ -101,6 +106,12 @@ untrusted payloads against `actionSchema` before dispatch.
|
|
|
101
106
|
| `deleteTab` | Remove a tab |
|
|
102
107
|
| `deleteTabset` | Remove a whole tabset |
|
|
103
108
|
| `adjustSplit` | Set the `weights` of a row's children (splitter drag) |
|
|
109
|
+
| `floatTab` | Float a tab out into a new floating panel |
|
|
110
|
+
| `floatTabset` | Float a whole tabset (with its tabs) into a new floating panel |
|
|
111
|
+
| `dockFloat` | Dock a float back as its own panel (or `center`-merge its tabs) |
|
|
112
|
+
| `moveFloat` | Update a floating panel's stored rect (drag/resize) |
|
|
113
|
+
| `setFloatMinimized` | Collapse a float to a chip, or restore it |
|
|
114
|
+
| `renameFloat` | Rename a floating panel's window title |
|
|
104
115
|
| `updateNodeAttributes` | Patch mutable attrs on a tab / tabset / row |
|
|
105
116
|
| `updateGlobalAttributes` | Patch the `global` block |
|
|
106
117
|
|
|
@@ -156,6 +167,7 @@ tree canonical so downstream code never has to defend against degenerate shapes:
|
|
|
156
167
|
- clamps every `selected` index into range
|
|
157
168
|
- forces `activeTabsetId` / `maximizedTabsetId` to point at a tabset that exists
|
|
158
169
|
(falling back to the first tabset, or clearing)
|
|
170
|
+
- heals each floating panel's own layout and drops a float once it empties
|
|
159
171
|
|
|
160
172
|
`normalize` is exported on its own if you build a model by hand and want it
|
|
161
173
|
canonicalized without dispatching an action.
|
|
@@ -165,18 +177,46 @@ canonicalized without dispatching an action.
|
|
|
165
177
|
Read-only lookups over a model, all exported:
|
|
166
178
|
|
|
167
179
|
```ts
|
|
168
|
-
|
|
180
|
+
collectRoots(model): Array<RowNode>; // main layout + each float's layout
|
|
181
|
+
collectTabsets(model): Array<TabsetNode>; // depth-first, across all roots
|
|
169
182
|
getFirstTabset(model): TabsetNode | undefined;
|
|
170
183
|
findTabset(model, tabsetId): TabsetNode | undefined;
|
|
171
184
|
findTab(model, tabId): TabLocation | undefined; // searches tabsets
|
|
172
|
-
|
|
185
|
+
findFloat(model, floatId): FloatNode | undefined;
|
|
186
|
+
findRow(row, rowId): RowNode | undefined; // pass a root (model.layout or a float's layout)
|
|
187
|
+
findRootContaining(model, nodeId): RowNode | undefined; // which root holds a node
|
|
173
188
|
findAttributedNode(model, id): AttributedNode | undefined; // row, tabset, or tab
|
|
174
189
|
findTabsetParent(row, tabsetId): { index: number; parent: RowNode } | undefined;
|
|
175
190
|
findDuplicateIds(model): Array<string>; // ids used more than once
|
|
176
191
|
```
|
|
177
192
|
|
|
178
193
|
`findTab` returns `{ container, index, tab }` so a caller knows where the tab
|
|
179
|
-
lives (a tabset in
|
|
194
|
+
lives (a tabset in some root). Lookups span every root, so a floated tab is as
|
|
195
|
+
reachable as a docked one; `findRootContaining` tells you which root (main layout
|
|
196
|
+
or a float) a node lives in.
|
|
197
|
+
|
|
198
|
+
## Floating panels
|
|
199
|
+
|
|
200
|
+
A panel can float out into a movable, resizable overlay (the React layer renders
|
|
201
|
+
it in-app — see `@dashfoo/react`). Floats are first-class model nodes
|
|
202
|
+
(`Dashfoo.floats`), each owning a full `RowNode` layout, so they serialize and
|
|
203
|
+
self-heal like the main tree:
|
|
204
|
+
|
|
205
|
+
```ts
|
|
206
|
+
import { reducer } from "@dashfoo/core";
|
|
207
|
+
|
|
208
|
+
// Float the whole tabset "left" (the React layer supplies the in-app geometry;
|
|
209
|
+
// omit it for a default rect).
|
|
210
|
+
const floated = reducer(model, { type: "floatTabset", tabsetId: "left" });
|
|
211
|
+
floated.floats; // [{ type: "float", id, layout: RowNode, geometry }]
|
|
212
|
+
|
|
213
|
+
// Dock it back into the active main tabset (center) and drop the float.
|
|
214
|
+
const docked = reducer(floated, { type: "dockFloat", floatId: floated.floats![0].id });
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
`normalize` runs over each float's layout too and drops a float once its last
|
|
218
|
+
panel leaves. The `floatNode(layout, geometry, opts?)` builder constructs one,
|
|
219
|
+
and `model(layout, { floats })` seeds them.
|
|
180
220
|
|
|
181
221
|
## Geometry
|
|
182
222
|
|
|
@@ -308,14 +348,14 @@ layout, carrying the `TabNode` to insert), which the React layer forwards to
|
|
|
308
348
|
## Public exports
|
|
309
349
|
|
|
310
350
|
`schema` — `dashfooSchema`, `rowNodeSchema`, `tabsetNodeSchema`, `tabNodeSchema`,
|
|
311
|
-
`dimensionSchema`, `snapSchema`, `edgeSchema`,
|
|
312
|
-
`orientationSchema`, `globalAttributesSchema`,
|
|
351
|
+
`floatNodeSchema`, `geometrySchema`, `dimensionSchema`, `snapSchema`, `edgeSchema`,
|
|
352
|
+
`unitSchema`, `orientationSchema`, `globalAttributesSchema`,
|
|
313
353
|
`jsonValueSchema`; types `Dashfoo`, `RowNode`, `TabsetNode`, `TabNode`,
|
|
314
|
-
`Dimension`, `SnapConfig`, `Edge`, `Unit`, `Orientation`,
|
|
354
|
+
`FloatNode`, `Geometry`, `Dimension`, `SnapConfig`, `Edge`, `Unit`, `Orientation`,
|
|
315
355
|
`GlobalAttributes`, `Node`, `Json`.
|
|
316
356
|
|
|
317
|
-
`builders` — `model`, `row`, `tabset`, `tab`; option types
|
|
318
|
-
`RowOptions`, `TabsetOptions`, `TabOptions`.
|
|
357
|
+
`builders` — `model`, `row`, `tabset`, `tab`, `floatNode`; option types
|
|
358
|
+
`ModelOptions`, `RowOptions`, `TabsetOptions`, `TabOptions`, `FloatOptions`.
|
|
319
359
|
|
|
320
360
|
`ids` — `createNodeId`, `createTabId`.
|
|
321
361
|
|
|
@@ -324,8 +364,9 @@ layout, carrying the `TabNode` to insert), which the React layer forwards to
|
|
|
324
364
|
|
|
325
365
|
`reducer` — `reducer`. `invariants` — `normalize`.
|
|
326
366
|
|
|
327
|
-
`tree` — `
|
|
328
|
-
`
|
|
367
|
+
`tree` — `collectRoots`, `collectTabsets`, `collectTabsetsInRow`, `getFirstTabset`,
|
|
368
|
+
`findTabset`, `findTab`, `findFloat`, `findRow`, `findRootContaining`, `findAttributedNode`,
|
|
369
|
+
`findTabsetParent`, `findDuplicateIds`;
|
|
329
370
|
types `AttributedNode`, `TabContainer`, `TabLocation`.
|
|
330
371
|
|
|
331
372
|
`geometry` — `resolveDockTarget`, `dockZonePolygons`, `zoneRect`; types
|
package/dist/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { z } from "zod";
|
|
|
2
2
|
|
|
3
3
|
//#region src/state/actions.d.ts
|
|
4
4
|
declare const mutableNodeAttrsSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
5
|
+
name: z.ZodOptional<z.ZodString>;
|
|
5
6
|
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
7
|
[key: string]: string | number | boolean | /*elided*/any | /*elided*/any | null;
|
|
7
8
|
} | null)[] | {
|
|
@@ -54,7 +55,6 @@ declare const mutableNodeAttrsSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
54
55
|
enableClose: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
55
56
|
enableDrag: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
56
57
|
enableRename: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
57
|
-
name: z.ZodOptional<z.ZodString>;
|
|
58
58
|
}, z.core.$strip>, z.ZodObject<{
|
|
59
59
|
enableClose: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
60
60
|
enableMaximize: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
@@ -242,6 +242,7 @@ declare const actionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
242
242
|
weights: z.ZodArray<z.ZodNumber>;
|
|
243
243
|
}, z.core.$strip>, z.ZodObject<{
|
|
244
244
|
attrs: z.ZodUnion<readonly [z.ZodObject<{
|
|
245
|
+
name: z.ZodOptional<z.ZodString>;
|
|
245
246
|
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
247
|
[key: string]: string | number | boolean | /*elided*/any | /*elided*/any | null;
|
|
247
248
|
} | null)[] | {
|
|
@@ -294,7 +295,6 @@ declare const actionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
294
295
|
enableClose: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
295
296
|
enableDrag: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
296
297
|
enableRename: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
297
|
-
name: z.ZodOptional<z.ZodString>;
|
|
298
298
|
}, z.core.$strip>, z.ZodObject<{
|
|
299
299
|
enableClose: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
300
300
|
enableMaximize: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
@@ -380,6 +380,54 @@ declare const actionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
380
380
|
tabSetMinSize: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
381
381
|
}, z.core.$strip>;
|
|
382
382
|
type: z.ZodLiteral<"updateGlobalAttributes">;
|
|
383
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
384
|
+
floatId: z.ZodOptional<z.ZodString>;
|
|
385
|
+
geometry: z.ZodOptional<z.ZodObject<{
|
|
386
|
+
height: z.ZodNumber;
|
|
387
|
+
left: z.ZodNumber;
|
|
388
|
+
top: z.ZodNumber;
|
|
389
|
+
width: z.ZodNumber;
|
|
390
|
+
}, z.core.$strip>>;
|
|
391
|
+
tabId: z.ZodString;
|
|
392
|
+
type: z.ZodLiteral<"floatTab">;
|
|
393
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
394
|
+
floatId: z.ZodOptional<z.ZodString>;
|
|
395
|
+
geometry: z.ZodOptional<z.ZodObject<{
|
|
396
|
+
height: z.ZodNumber;
|
|
397
|
+
left: z.ZodNumber;
|
|
398
|
+
top: z.ZodNumber;
|
|
399
|
+
width: z.ZodNumber;
|
|
400
|
+
}, z.core.$strip>>;
|
|
401
|
+
tabsetId: z.ZodString;
|
|
402
|
+
type: z.ZodLiteral<"floatTabset">;
|
|
403
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
404
|
+
floatId: z.ZodString;
|
|
405
|
+
location: z.ZodOptional<z.ZodEnum<{
|
|
406
|
+
center: "center";
|
|
407
|
+
"split-bottom": "split-bottom";
|
|
408
|
+
"split-left": "split-left";
|
|
409
|
+
"split-right": "split-right";
|
|
410
|
+
"split-top": "split-top";
|
|
411
|
+
}>>;
|
|
412
|
+
targetId: z.ZodOptional<z.ZodString>;
|
|
413
|
+
type: z.ZodLiteral<"dockFloat">;
|
|
414
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
415
|
+
floatId: z.ZodString;
|
|
416
|
+
geometry: z.ZodObject<{
|
|
417
|
+
height: z.ZodNumber;
|
|
418
|
+
left: z.ZodNumber;
|
|
419
|
+
top: z.ZodNumber;
|
|
420
|
+
width: z.ZodNumber;
|
|
421
|
+
}, z.core.$strip>;
|
|
422
|
+
type: z.ZodLiteral<"moveFloat">;
|
|
423
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
424
|
+
floatId: z.ZodString;
|
|
425
|
+
minimized: z.ZodBoolean;
|
|
426
|
+
type: z.ZodLiteral<"setFloatMinimized">;
|
|
427
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
428
|
+
floatId: z.ZodString;
|
|
429
|
+
name: z.ZodString;
|
|
430
|
+
type: z.ZodLiteral<"renameFloat">;
|
|
383
431
|
}, z.core.$strip>], "type">;
|
|
384
432
|
type DockLocation = z.infer<typeof dockLocationSchema>;
|
|
385
433
|
type MutableNodeAttrs = z.infer<typeof mutableNodeAttrsSchema>;
|
|
@@ -491,6 +539,25 @@ type RowNode = {
|
|
|
491
539
|
weight?: number;
|
|
492
540
|
};
|
|
493
541
|
declare const rowNodeSchema: z.ZodType<RowNode>;
|
|
542
|
+
declare const geometrySchema: z.ZodObject<{
|
|
543
|
+
height: z.ZodNumber;
|
|
544
|
+
left: z.ZodNumber;
|
|
545
|
+
top: z.ZodNumber;
|
|
546
|
+
width: z.ZodNumber;
|
|
547
|
+
}, z.core.$strip>;
|
|
548
|
+
declare const floatNodeSchema: z.ZodObject<{
|
|
549
|
+
geometry: z.ZodObject<{
|
|
550
|
+
height: z.ZodNumber;
|
|
551
|
+
left: z.ZodNumber;
|
|
552
|
+
top: z.ZodNumber;
|
|
553
|
+
width: z.ZodNumber;
|
|
554
|
+
}, z.core.$strip>;
|
|
555
|
+
id: z.ZodString;
|
|
556
|
+
layout: z.ZodType<RowNode, unknown, z.core.$ZodTypeInternals<RowNode, unknown>>;
|
|
557
|
+
minimized: z.ZodOptional<z.ZodBoolean>;
|
|
558
|
+
name: z.ZodOptional<z.ZodString>;
|
|
559
|
+
type: z.ZodLiteral<"float">;
|
|
560
|
+
}, z.core.$strip>;
|
|
494
561
|
declare const globalAttributesSchema: z.ZodObject<{
|
|
495
562
|
enableSplitDock: z.ZodOptional<z.ZodBoolean>;
|
|
496
563
|
enableSplitResize: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -536,6 +603,19 @@ declare const dashfooSchema: z.ZodObject<{
|
|
|
536
603
|
layout: z.ZodType<RowNode, unknown, z.core.$ZodTypeInternals<RowNode, unknown>>;
|
|
537
604
|
maximizedTabsetId: z.ZodOptional<z.ZodString>;
|
|
538
605
|
version: z.ZodLiteral<1>;
|
|
606
|
+
floats: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
607
|
+
geometry: z.ZodObject<{
|
|
608
|
+
height: z.ZodNumber;
|
|
609
|
+
left: z.ZodNumber;
|
|
610
|
+
top: z.ZodNumber;
|
|
611
|
+
width: z.ZodNumber;
|
|
612
|
+
}, z.core.$strip>;
|
|
613
|
+
id: z.ZodString;
|
|
614
|
+
layout: z.ZodType<RowNode, unknown, z.core.$ZodTypeInternals<RowNode, unknown>>;
|
|
615
|
+
minimized: z.ZodOptional<z.ZodBoolean>;
|
|
616
|
+
name: z.ZodOptional<z.ZodString>;
|
|
617
|
+
type: z.ZodLiteral<"float">;
|
|
618
|
+
}, z.core.$strip>>>;
|
|
539
619
|
}, z.core.$strip>;
|
|
540
620
|
type Json = JsonValue;
|
|
541
621
|
type Edge = z.infer<typeof edgeSchema>;
|
|
@@ -545,6 +625,8 @@ type Dimension = z.infer<typeof dimensionSchema>;
|
|
|
545
625
|
type SnapConfig = z.infer<typeof snapSchema>;
|
|
546
626
|
type TabNode = z.infer<typeof tabNodeSchema>;
|
|
547
627
|
type TabsetNode = z.infer<typeof tabsetNodeSchema>;
|
|
628
|
+
type Geometry = z.infer<typeof geometrySchema>;
|
|
629
|
+
type FloatNode = z.infer<typeof floatNodeSchema>;
|
|
548
630
|
type GlobalAttributes = z.infer<typeof globalAttributesSchema>;
|
|
549
631
|
type Dashfoo = z.infer<typeof dashfooSchema>;
|
|
550
632
|
type Node = RowNode | TabsetNode | TabNode;
|
|
@@ -578,8 +660,14 @@ type RowOptions = {
|
|
|
578
660
|
weight?: number;
|
|
579
661
|
};
|
|
580
662
|
declare const row: (children: RowNode["children"], options?: RowOptions) => RowNode;
|
|
663
|
+
type FloatOptions = {
|
|
664
|
+
id?: string;
|
|
665
|
+
name?: string;
|
|
666
|
+
};
|
|
667
|
+
declare const floatNode: (layout: RowNode, geometry: Geometry, options?: FloatOptions) => FloatNode;
|
|
581
668
|
type ModelOptions = {
|
|
582
669
|
activeTabsetId?: string;
|
|
670
|
+
floats?: Array<FloatNode>;
|
|
583
671
|
global?: GlobalAttributes;
|
|
584
672
|
maximizedTabsetId?: string;
|
|
585
673
|
};
|
|
@@ -746,6 +834,9 @@ type TabLocation = {
|
|
|
746
834
|
index: number;
|
|
747
835
|
tab: TabNode;
|
|
748
836
|
};
|
|
837
|
+
declare const collectRoots: (model: Dashfoo) => Array<RowNode>;
|
|
838
|
+
declare const findFloat: (model: Dashfoo, floatId: string) => FloatNode | undefined;
|
|
839
|
+
declare const collectTabsetsInRow: (row: RowNode, acc: Array<TabsetNode>) => void;
|
|
749
840
|
declare const collectTabsets: (model: Dashfoo) => Array<TabsetNode>;
|
|
750
841
|
declare const getFirstTabset: (model: Dashfoo) => TabsetNode | undefined;
|
|
751
842
|
declare const findTabset: (model: Dashfoo, tabsetId: string) => TabsetNode | undefined;
|
|
@@ -753,11 +844,12 @@ declare const findTab: (model: Dashfoo, tabId: string) => TabLocation | undefine
|
|
|
753
844
|
type AttributedNode = RowNode | TabNode | TabsetNode;
|
|
754
845
|
declare const findRow: (row: RowNode, id: string) => RowNode | undefined;
|
|
755
846
|
declare const findAttributedNode: (model: Dashfoo, id: string) => AttributedNode | undefined;
|
|
847
|
+
declare const findRootContaining: (model: Dashfoo, nodeId: string) => RowNode | undefined;
|
|
756
848
|
declare const findTabsetParent: (row: RowNode, tabsetId: string) => {
|
|
757
849
|
index: number;
|
|
758
850
|
parent: RowNode;
|
|
759
851
|
} | undefined;
|
|
760
852
|
declare const findDuplicateIds: (model: Dashfoo) => Array<string>;
|
|
761
853
|
//#endregion
|
|
762
|
-
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 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, collectTabsets, createHistory, createNodeId, createTabId, dashfooMachine, dashfooSchema, dimensionSchema, dispatch, dockLocationSchema, dockZonePolygons, dragDockMachine, edgeSchema, findAttributedNode, findDuplicateIds, findRow, findTab, findTabset, findTabsetParent, fromJSON, 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 };
|
|
854
|
+
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 };
|
|
763
855
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -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":";;;
|
|
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,sBAAA,EAAsB,CAAA,CAAA,QAAA,WAAA,CAAA,CAAA,SAAA;;2YAI1B;IAAA,2CAAA,gBAAA;EAAA;IAAA;;;;;;;;;;;;;;;;oTAJ0B,gBAAA,0BAAA,0BAAA,0BAAA,0BAAA,0BAAA,0BAAA,0BAAA,0BAAA,0BAAA;EAAA;IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAStB,kBAAA,EAAkB,CAAA,CAAA,OAAA;;;;;;;cAQlB,YAAA,EAAY,CAAA,CAAA,qBAAA,EAAA,CAAA,CAAA,SAAA;;;;;;;;;;;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