@bimetal/tree-svelte-components 0.32.0 → 1.0.0-rc.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/dist/Tree.svelte CHANGED
@@ -7,6 +7,14 @@
7
7
  import TreeDialog from './TreeDialog.svelte';
8
8
  import { isEditableTarget } from '@bimetal/a11y-dom';
9
9
 
10
+ /**
11
+ * The default Svelte 5 tree / treeview binding over `@bimetal/tree-headless`.
12
+ * Renders the canonical `.bm-tree*` DOM with ARIA tree roles; the controller owns
13
+ * selection, expand/collapse, tri-state checkboxes, drag-reorder, keyboard
14
+ * nav/move, rename and undo. Dual-API (composition contract, F1): pass
15
+ * `controller` (host-owned) OR `store`/`treeId`/`config` (standalone; the
16
+ * component creates + owns one).
17
+ */
10
18
  let {
11
19
  controller,
12
20
  store,
@@ -28,14 +36,23 @@
28
36
  * setConfig it (binding stays null). Pass this OR the standalone props.
29
37
  */
30
38
  controller?: TreeController;
39
+ /** The tree store. Immutable after mount (the controller is created once). */
31
40
  store?: TreeStore;
41
+ /** The tree aggregate id this view binds to. Immutable after mount. */
32
42
  treeId?: string;
43
+ /** Locale + geometry (indent/rowHeight) + checkboxes + nodeMeta overrides. */
33
44
  config?: TreeConfigInput;
45
+ /** Apply the dark token set (`data-theme="dark"`). */
34
46
  darkMode?: boolean;
47
+ /** Text/layout direction, applied as `dir` on the root (`ltr`/`rtl`). */
35
48
  dir?: 'ltr' | 'rtl';
49
+ /** Optional toolbar heading. Omitted → no heading is rendered. */
36
50
  title?: string;
51
+ /** Optional small toolbar tagline next to the heading. */
37
52
  tag?: string;
53
+ /** Accessible name for the `role="tree"` list. Falls back to `title`, else the locale label. */
38
54
  ariaLabel?: string;
55
+ /** Surfaces infrastructure errors (a domain rejection becomes an undo toast). */
39
56
  onError?: (err: unknown) => void;
40
57
  /** OBSERVE hook (standalone only): fires when the selection changes (ordered selected node ids). */
41
58
  onSelectionChange?: (selectedIds: readonly string[]) => void;
@@ -8,14 +8,23 @@ type $$ComponentProps = {
8
8
  * setConfig it (binding stays null). Pass this OR the standalone props.
9
9
  */
10
10
  controller?: TreeController;
11
+ /** The tree store. Immutable after mount (the controller is created once). */
11
12
  store?: TreeStore;
13
+ /** The tree aggregate id this view binds to. Immutable after mount. */
12
14
  treeId?: string;
15
+ /** Locale + geometry (indent/rowHeight) + checkboxes + nodeMeta overrides. */
13
16
  config?: TreeConfigInput;
17
+ /** Apply the dark token set (`data-theme="dark"`). */
14
18
  darkMode?: boolean;
19
+ /** Text/layout direction, applied as `dir` on the root (`ltr`/`rtl`). */
15
20
  dir?: 'ltr' | 'rtl';
21
+ /** Optional toolbar heading. Omitted → no heading is rendered. */
16
22
  title?: string;
23
+ /** Optional small toolbar tagline next to the heading. */
17
24
  tag?: string;
25
+ /** Accessible name for the `role="tree"` list. Falls back to `title`, else the locale label. */
18
26
  ariaLabel?: string;
27
+ /** Surfaces infrastructure errors (a domain rejection becomes an undo toast). */
19
28
  onError?: (err: unknown) => void;
20
29
  /** OBSERVE hook (standalone only): fires when the selection changes (ordered selected node ids). */
21
30
  onSelectionChange?: (selectedIds: readonly string[]) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"Tree.svelte.d.ts","sourceRoot":"","sources":["../src/Tree.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,EAAsB,KAAK,OAAO,EAAE,MAAM,QAAQ,CAAC;AAE1D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAA0B,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAOlH,KAAK,gBAAgB,GAAI;IACtB;;;;OAIG;IACH,UAAU,CAAC,EAAE,cAAc,CAAC;IAC5B,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,eAAe,CAAC;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB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,GAAG,KAAK,CAAC;IACpB,kEAAkE;IAClE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0DAA0D;IAC1D,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,gGAAgG;IAChG,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iFAAiF;IACjF,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,IAAI,CAAC;IACjC,oGAAoG;IACpG,iBAAiB,CAAC,EAAE,CAAC,WAAW,EAAE,SAAS,MAAM,EAAE,KAAK,IAAI,CAAC;IAC7D;8EAC0E;IAC1E,eAAe,CAAC,EAAE,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,KAAK,IAAI,CAAC;IAC1D,4DAA4D;IAC5D,UAAU,CAAC,EAAE,OAAO,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC;CACrC,CAAC;AA0JJ,QAAA,MAAM,IAAI,sDAAwC,CAAC;AACnD,KAAK,IAAI,GAAG,UAAU,CAAC,OAAO,IAAI,CAAC,CAAC;AACpC,eAAe,IAAI,CAAC"}
package/dist/index.d.ts CHANGED
@@ -8,5 +8,4 @@
8
8
  * `.bm-tree*` DOM; styles ship from `@bimetal/tree-themes`.
9
9
  */
10
10
  export { default as Tree } from './Tree.svelte';
11
- export * from '@bimetal/svelte';
12
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,eAAe,CAAC;AAGhD,cAAc,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,eAAe,CAAC"}
package/dist/index.js CHANGED
@@ -9,4 +9,3 @@
9
9
  */
10
10
  export { default as Tree } from './Tree.svelte';
11
11
  // Re-export the generic Svelte bindings for convenience.
12
- export * from '@bimetal/svelte';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bimetal/tree-svelte-components",
3
- "version": "0.32.0",
3
+ "version": "1.0.0-rc.1",
4
4
  "description": "Default Svelte 5 tree / treeview — multi-select, expand/collapse, tri-state checkboxes, drag-reorder, rename, undo, theming. A thin binding over the canonical tree controller.",
5
5
  "type": "module",
6
6
  "svelte": "./dist/index.js",
@@ -27,11 +27,11 @@
27
27
  "prepublishOnly": "npm run build"
28
28
  },
29
29
  "dependencies": {
30
- "@bimetal/svelte": "^0.32.0",
31
- "@bimetal/tree-data": "^0.32.0",
32
- "@bimetal/tree-headless": "^0.32.0",
33
- "@bimetal/tree-themes": "^0.32.0",
34
- "@bimetal/a11y-dom": "^0.32.0"
30
+ "@bimetal/svelte": "^1.0.0-rc.1",
31
+ "@bimetal/tree-data": "^1.0.0-rc.1",
32
+ "@bimetal/tree-headless": "^1.0.0-rc.1",
33
+ "@bimetal/tree-themes": "^1.0.0-rc.1",
34
+ "@bimetal/a11y-dom": "^1.0.0-rc.1"
35
35
  },
36
36
  "peerDependencies": {
37
37
  "svelte": "^5.46.4"