@fusion.dev/helix 0.33.5 → 0.34.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.
@@ -131881,6 +131881,20 @@
131881
131881
  "module": "src/tree/root/tree-root.ts"
131882
131882
  }
131883
131883
  },
131884
+ {
131885
+ "kind": "field",
131886
+ "name": "nesting",
131887
+ "type": {
131888
+ "text": "'heading' | 'peer' | 'subordinate' | undefined"
131889
+ },
131890
+ "description": "What a step inward means: nothing, a rank, or a heading over what follows.\n\nAll three answers are right, for different trees, which is why this is\nasked rather than decided. `peer` is a file explorer: every row is the same\nkind of thing, a name that may hold more names, and the indent alone says\nwhere one sits. `subordinate` is side navigation or a categorization: a\nsection holds pages and a facet holds values, so a step inward is a change\nof kind and the rows say so. `heading` is a documentation sidebar, where\nthe change is at the *parent*: \"Getting started\" is not a lesser page than\nthe pages under it and not a page at all, it is the name of the list, so\nthe branch takes the rail-heading treatment and its children stay at the\nsize every other row is.\n\n`subordinate` and `heading` are not the same answer said twice. One keys on\ndepth and quiets the child; the other keys on holding children and relabels\nthe parent, so a top-level leaf beside a branch is untouched by the first\nand untouched by the second for opposite reasons.\n\nOn the root rather than the item, because it is a fact about the tree. Set\nper row it would make a tree writable in which one branch ranks its\nchildren and the next does not, and it would have to be repeated on every\nrow to say one thing.\n\nHere rather than on the styled tier, because it is not about paint: with\nevery stylesheet deleted it is still true that this tree ranks its depths,\nthat this one heads them, and that a file explorer does neither. The styled\ntier steps a subordinate row once down the type scale and sets a heading\nbranch as a label; a headless consumer reads the attribute and the\n`--tree-level` each row carries, and draws either however they like.\n\n**Optional, with no default**, per the reflected-property rule: a value\nwritten here appears in the served markup of every tree anybody renders.\nThe resting state is the absence of the attribute, which is `peer`.",
131891
+ "attribute": "nesting",
131892
+ "reflects": true,
131893
+ "inheritedFrom": {
131894
+ "name": "HelixHeadlessTree",
131895
+ "module": "src/tree/root/tree-root.ts"
131896
+ }
131897
+ },
131884
131898
  {
131885
131899
  "kind": "field",
131886
131900
  "name": "watcher",
@@ -132465,6 +132479,18 @@
132465
132479
  "name": "HelixHeadlessTree",
132466
132480
  "module": "src/tree/root/tree-root.ts"
132467
132481
  }
132482
+ },
132483
+ {
132484
+ "name": "nesting",
132485
+ "type": {
132486
+ "text": "'heading' | 'peer' | 'subordinate' | undefined"
132487
+ },
132488
+ "description": "What a step inward means: nothing, a rank, or a heading over what follows.\n\nAll three answers are right, for different trees, which is why this is\nasked rather than decided. `peer` is a file explorer: every row is the same\nkind of thing, a name that may hold more names, and the indent alone says\nwhere one sits. `subordinate` is side navigation or a categorization: a\nsection holds pages and a facet holds values, so a step inward is a change\nof kind and the rows say so. `heading` is a documentation sidebar, where\nthe change is at the *parent*: \"Getting started\" is not a lesser page than\nthe pages under it and not a page at all, it is the name of the list, so\nthe branch takes the rail-heading treatment and its children stay at the\nsize every other row is.\n\n`subordinate` and `heading` are not the same answer said twice. One keys on\ndepth and quiets the child; the other keys on holding children and relabels\nthe parent, so a top-level leaf beside a branch is untouched by the first\nand untouched by the second for opposite reasons.\n\nOn the root rather than the item, because it is a fact about the tree. Set\nper row it would make a tree writable in which one branch ranks its\nchildren and the next does not, and it would have to be repeated on every\nrow to say one thing.\n\nHere rather than on the styled tier, because it is not about paint: with\nevery stylesheet deleted it is still true that this tree ranks its depths,\nthat this one heads them, and that a file explorer does neither. The styled\ntier steps a subordinate row once down the type scale and sets a heading\nbranch as a label; a headless consumer reads the attribute and the\n`--tree-level` each row carries, and draws either however they like.\n\n**Optional, with no default**, per the reflected-property rule: a value\nwritten here appears in the served markup of every tree anybody renders.\nThe resting state is the absence of the attribute, which is `peer`.",
132489
+ "fieldName": "nesting",
132490
+ "inheritedFrom": {
132491
+ "name": "HelixHeadlessTree",
132492
+ "module": "src/tree/root/tree-root.ts"
132493
+ }
132468
132494
  }
132469
132495
  ],
132470
132496
  "superclass": {
@@ -132505,6 +132531,10 @@
132505
132531
  "description": "A node told its own depth, for a tree built from a flat list rather than by nesting.",
132506
132532
  "slug": "flattened"
132507
132533
  },
132534
+ {
132535
+ "description": "Depth as a position, depth as a rank, and a branch that is a heading.",
132536
+ "slug": "nesting"
132537
+ },
132508
132538
  {
132509
132539
  "description": "The same tree with a glyph on each node.",
132510
132540
  "slug": "with-icons"
@@ -18,7 +18,7 @@ color: var(--helix-color-foreground-muted);
18
18
  cursor: pointer;
19
19
  display: flex;
20
20
 
21
- font-size: var(--helix-text-sm);
21
+ font-size: var(--_tree-text, var(--helix-text-sm));
22
22
  gap: var(--helix-space-2xs);
23
23
 
24
24
  margin-block-end: var(--tree-gap, var(--helix-space-2xs));
@@ -50,13 +50,20 @@ var(--_tree-reserve, calc(var(--_tree-chevron) + var(--helix-space-2xs)))
50
50
  }
51
51
 
52
52
  [part="row"]:has([part="toggle"]) {
53
+ color: var(--_tree-heading-ink, var(--helix-color-foreground-muted));
54
+ font-size: var(--_tree-heading-text, var(--_tree-text, var(--helix-text-sm)));
53
55
  font-weight: var(--helix-weight-medium);
56
+ letter-spacing: var(--_tree-heading-tracking, var(--helix-tracking-normal));
54
57
  }
55
58
 
56
59
  [part="row"]:not(:has([part="toggle"])) {
57
60
  font-weight: var(--helix-weight-medium);
58
61
  }
59
62
 
63
+ slot[name="children"]::slotted(*) {
64
+ --_tree-text: var(--_tree-nested-text, var(--helix-text-sm));
65
+ }
66
+
60
67
  [part="row"]:hover {
61
68
  background-color: var(--helix-color-surface-raised);
62
69
  color: var(--helix-color-foreground);
@@ -20,6 +20,16 @@ flex-direction: column;
20
20
  --_tree-reserve: var(--helix-space-none);
21
21
  }
22
22
 
23
+ :host([nesting="subordinate"]) {
24
+ --_tree-nested-text: var(--helix-text-xs);
25
+ }
26
+
27
+ :host([nesting="heading"]) {
28
+ --_tree-heading-ink: var(--helix-color-foreground-subtle);
29
+ --_tree-heading-text: var(--helix-text-xs);
30
+ --_tree-heading-tracking: var(--helix-tracking-wide);
31
+ }
32
+
23
33
  :host([loading]) [part="tree"] {
24
34
  opacity: 0.5;
25
35
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fusion.dev/helix",
3
3
  "description": "Styled component tier. Extends the headless tier with token-driven presentation.",
4
- "version": "0.33.5",
4
+ "version": "0.34.1",
5
5
  "license": "MIT",
6
6
  "author": "Ross Sheppard <ross.sheppard@fusion.dev>",
7
7
  "repository": {
@@ -47,14 +47,14 @@
47
47
  },
48
48
  "bugs": "https://github.com/project-fusion/fusion/issues",
49
49
  "dependencies": {
50
- "@fusion.dev/helix-core": "0.33.5",
51
- "@fusion.dev/helix-headless": "0.33.5",
52
- "@fusion.dev/helix-styles": "0.33.5"
50
+ "@fusion.dev/helix-core": "0.34.1",
51
+ "@fusion.dev/helix-headless": "0.34.1",
52
+ "@fusion.dev/helix-styles": "0.34.1"
53
53
  },
54
54
  "devDependencies": {
55
55
  "@custom-elements-manifest/analyzer": "^0.11.0",
56
- "@fusion.dev/helix-cem": "0.33.5",
57
- "@fusion.dev/helix-testing": "0.33.5",
56
+ "@fusion.dev/helix-cem": "0.34.1",
57
+ "@fusion.dev/helix-testing": "0.34.1",
58
58
  "@fusion.dev/scripts": "0.0.0-dev",
59
59
  "@happy-dom/global-registrator": "^20.0.0",
60
60
  "@lit-labs/ssr": "^4.1.0",
package/types/jsx.d.ts CHANGED
@@ -18861,6 +18861,40 @@ Ignored once `active` is written. */
18861
18861
  defaultActive?: (HelixTree["defaultActive"]) | undefined;
18862
18862
  /** Accessible name for the tree. */
18863
18863
  label?: (HelixTree["label"]) | undefined;
18864
+ /** What a step inward means: nothing, a rank, or a heading over what follows.
18865
+
18866
+ All three answers are right, for different trees, which is why this is
18867
+ asked rather than decided. `peer` is a file explorer: every row is the same
18868
+ kind of thing, a name that may hold more names, and the indent alone says
18869
+ where one sits. `subordinate` is side navigation or a categorization: a
18870
+ section holds pages and a facet holds values, so a step inward is a change
18871
+ of kind and the rows say so. `heading` is a documentation sidebar, where
18872
+ the change is at the *parent*: "Getting started" is not a lesser page than
18873
+ the pages under it and not a page at all, it is the name of the list, so
18874
+ the branch takes the rail-heading treatment and its children stay at the
18875
+ size every other row is.
18876
+
18877
+ `subordinate` and `heading` are not the same answer said twice. One keys on
18878
+ depth and quiets the child; the other keys on holding children and relabels
18879
+ the parent, so a top-level leaf beside a branch is untouched by the first
18880
+ and untouched by the second for opposite reasons.
18881
+
18882
+ On the root rather than the item, because it is a fact about the tree. Set
18883
+ per row it would make a tree writable in which one branch ranks its
18884
+ children and the next does not, and it would have to be repeated on every
18885
+ row to say one thing.
18886
+
18887
+ Here rather than on the styled tier, because it is not about paint: with
18888
+ every stylesheet deleted it is still true that this tree ranks its depths,
18889
+ that this one heads them, and that a file explorer does neither. The styled
18890
+ tier steps a subordinate row once down the type scale and sets a heading
18891
+ branch as a label; a headless consumer reads the attribute and the
18892
+ `--tree-level` each row carries, and draws either however they like.
18893
+
18894
+ **Optional, with no default**, per the reflected-property rule: a value
18895
+ written here appears in the served markup of every tree anybody renders.
18896
+ The resting state is the absence of the attribute, which is `peer`. */
18897
+ nesting?: (HelixTree["nesting"]) | undefined;
18864
18898
 
18865
18899
  /** Fired when an item is chosen. Dispatched by the item and listened for here, because the tree is what a consumer holds a reference to. Cancelable: refusing it takes the decision and nothing moves. */
18866
18900
  "onhelix-select"?: ((e: HelixTreeHelixSelectElementEvent) => void) | undefined;
@@ -18950,6 +18984,40 @@ Ignored once `active` is written. */
18950
18984
  "prop:defaultActive"?: (HelixTree["defaultActive"]) | undefined;
18951
18985
  /** Accessible name for the tree. */
18952
18986
  "prop:label"?: (HelixTree["label"]) | undefined;
18987
+ /** What a step inward means: nothing, a rank, or a heading over what follows.
18988
+
18989
+ All three answers are right, for different trees, which is why this is
18990
+ asked rather than decided. `peer` is a file explorer: every row is the same
18991
+ kind of thing, a name that may hold more names, and the indent alone says
18992
+ where one sits. `subordinate` is side navigation or a categorization: a
18993
+ section holds pages and a facet holds values, so a step inward is a change
18994
+ of kind and the rows say so. `heading` is a documentation sidebar, where
18995
+ the change is at the *parent*: "Getting started" is not a lesser page than
18996
+ the pages under it and not a page at all, it is the name of the list, so
18997
+ the branch takes the rail-heading treatment and its children stay at the
18998
+ size every other row is.
18999
+
19000
+ `subordinate` and `heading` are not the same answer said twice. One keys on
19001
+ depth and quiets the child; the other keys on holding children and relabels
19002
+ the parent, so a top-level leaf beside a branch is untouched by the first
19003
+ and untouched by the second for opposite reasons.
19004
+
19005
+ On the root rather than the item, because it is a fact about the tree. Set
19006
+ per row it would make a tree writable in which one branch ranks its
19007
+ children and the next does not, and it would have to be repeated on every
19008
+ row to say one thing.
19009
+
19010
+ Here rather than on the styled tier, because it is not about paint: with
19011
+ every stylesheet deleted it is still true that this tree ranks its depths,
19012
+ that this one heads them, and that a file explorer does neither. The styled
19013
+ tier steps a subordinate row once down the type scale and sets a heading
19014
+ branch as a label; a headless consumer reads the attribute and the
19015
+ `--tree-level` each row carries, and draws either however they like.
19016
+
19017
+ **Optional, with no default**, per the reflected-property rule: a value
19018
+ written here appears in the served markup of every tree anybody renders.
19019
+ The resting state is the absence of the attribute, which is `peer`. */
19020
+ "prop:nesting"?: (HelixTree["nesting"]) | undefined;
18953
19021
  /** Fired when an item is chosen. Dispatched by the item and listened for here, because the tree is what a consumer holds a reference to. Cancelable: refusing it takes the decision and nothing moves. */
18954
19022
  "on:helix-select"?: ((e: HelixTreeHelixSelectElementEvent) => void) | undefined;
18955
19023
  /** Fired once the current one has moved, so the element already holds it. */
@@ -37717,6 +37785,39 @@ export type CustomElements = {
37717
37785
  *
37718
37786
  * Ignored once `active` is written.
37719
37787
  * - `label`: Accessible name for the tree.
37788
+ * - `nesting`: What a step inward means: nothing, a rank, or a heading over what follows.
37789
+ *
37790
+ * All three answers are right, for different trees, which is why this is
37791
+ * asked rather than decided. `peer` is a file explorer: every row is the same
37792
+ * kind of thing, a name that may hold more names, and the indent alone says
37793
+ * where one sits. `subordinate` is side navigation or a categorization: a
37794
+ * section holds pages and a facet holds values, so a step inward is a change
37795
+ * of kind and the rows say so. `heading` is a documentation sidebar, where
37796
+ * the change is at the *parent*: "Getting started" is not a lesser page than
37797
+ * the pages under it and not a page at all, it is the name of the list, so
37798
+ * the branch takes the rail-heading treatment and its children stay at the
37799
+ * size every other row is.
37800
+ *
37801
+ * `subordinate` and `heading` are not the same answer said twice. One keys on
37802
+ * depth and quiets the child; the other keys on holding children and relabels
37803
+ * the parent, so a top-level leaf beside a branch is untouched by the first
37804
+ * and untouched by the second for opposite reasons.
37805
+ *
37806
+ * On the root rather than the item, because it is a fact about the tree. Set
37807
+ * per row it would make a tree writable in which one branch ranks its
37808
+ * children and the next does not, and it would have to be repeated on every
37809
+ * row to say one thing.
37810
+ *
37811
+ * Here rather than on the styled tier, because it is not about paint: with
37812
+ * every stylesheet deleted it is still true that this tree ranks its depths,
37813
+ * that this one heads them, and that a file explorer does neither. The styled
37814
+ * tier steps a subordinate row once down the type scale and sets a heading
37815
+ * branch as a label; a headless consumer reads the attribute and the
37816
+ * `--tree-level` each row carries, and draws either however they like.
37817
+ *
37818
+ * **Optional, with no default**, per the reflected-property rule: a value
37819
+ * written here appears in the served markup of every tree anybody renders.
37820
+ * The resting state is the absence of the attribute, which is `peer`.
37720
37821
  * - `whenSettled`: Resolves a frame after the first update, when transitions are switched on.
37721
37822
  *
37722
37823
  * **Named `whenSettled` because `settled` is taken four times over**, by
@@ -56885,6 +56986,39 @@ export type CustomElementsSolidJs = {
56885
56986
  *
56886
56987
  * Ignored once `active` is written.
56887
56988
  * - `label`: Accessible name for the tree.
56989
+ * - `nesting`: What a step inward means: nothing, a rank, or a heading over what follows.
56990
+ *
56991
+ * All three answers are right, for different trees, which is why this is
56992
+ * asked rather than decided. `peer` is a file explorer: every row is the same
56993
+ * kind of thing, a name that may hold more names, and the indent alone says
56994
+ * where one sits. `subordinate` is side navigation or a categorization: a
56995
+ * section holds pages and a facet holds values, so a step inward is a change
56996
+ * of kind and the rows say so. `heading` is a documentation sidebar, where
56997
+ * the change is at the *parent*: "Getting started" is not a lesser page than
56998
+ * the pages under it and not a page at all, it is the name of the list, so
56999
+ * the branch takes the rail-heading treatment and its children stay at the
57000
+ * size every other row is.
57001
+ *
57002
+ * `subordinate` and `heading` are not the same answer said twice. One keys on
57003
+ * depth and quiets the child; the other keys on holding children and relabels
57004
+ * the parent, so a top-level leaf beside a branch is untouched by the first
57005
+ * and untouched by the second for opposite reasons.
57006
+ *
57007
+ * On the root rather than the item, because it is a fact about the tree. Set
57008
+ * per row it would make a tree writable in which one branch ranks its
57009
+ * children and the next does not, and it would have to be repeated on every
57010
+ * row to say one thing.
57011
+ *
57012
+ * Here rather than on the styled tier, because it is not about paint: with
57013
+ * every stylesheet deleted it is still true that this tree ranks its depths,
57014
+ * that this one heads them, and that a file explorer does neither. The styled
57015
+ * tier steps a subordinate row once down the type scale and sets a heading
57016
+ * branch as a label; a headless consumer reads the attribute and the
57017
+ * `--tree-level` each row carries, and draws either however they like.
57018
+ *
57019
+ * **Optional, with no default**, per the reflected-property rule: a value
57020
+ * written here appears in the served markup of every tree anybody renders.
57021
+ * The resting state is the absence of the attribute, which is `peer`.
56888
57022
  * - `whenSettled`: Resolves a frame after the first update, when transitions are switched on.
56889
57023
  *
56890
57024
  * **Named `whenSettled` because `settled` is taken four times over**, by
package/types/vue.d.ts CHANGED
@@ -9717,6 +9717,40 @@ Ignored once `active` is written. */
9717
9717
  defaultActive?: (HelixTree["defaultActive"]) | undefined;
9718
9718
  /** Accessible name for the tree. */
9719
9719
  label?: (HelixTree["label"]) | undefined;
9720
+ /** What a step inward means: nothing, a rank, or a heading over what follows.
9721
+
9722
+ All three answers are right, for different trees, which is why this is
9723
+ asked rather than decided. `peer` is a file explorer: every row is the same
9724
+ kind of thing, a name that may hold more names, and the indent alone says
9725
+ where one sits. `subordinate` is side navigation or a categorization: a
9726
+ section holds pages and a facet holds values, so a step inward is a change
9727
+ of kind and the rows say so. `heading` is a documentation sidebar, where
9728
+ the change is at the *parent*: "Getting started" is not a lesser page than
9729
+ the pages under it and not a page at all, it is the name of the list, so
9730
+ the branch takes the rail-heading treatment and its children stay at the
9731
+ size every other row is.
9732
+
9733
+ `subordinate` and `heading` are not the same answer said twice. One keys on
9734
+ depth and quiets the child; the other keys on holding children and relabels
9735
+ the parent, so a top-level leaf beside a branch is untouched by the first
9736
+ and untouched by the second for opposite reasons.
9737
+
9738
+ On the root rather than the item, because it is a fact about the tree. Set
9739
+ per row it would make a tree writable in which one branch ranks its
9740
+ children and the next does not, and it would have to be repeated on every
9741
+ row to say one thing.
9742
+
9743
+ Here rather than on the styled tier, because it is not about paint: with
9744
+ every stylesheet deleted it is still true that this tree ranks its depths,
9745
+ that this one heads them, and that a file explorer does neither. The styled
9746
+ tier steps a subordinate row once down the type scale and sets a heading
9747
+ branch as a label; a headless consumer reads the attribute and the
9748
+ `--tree-level` each row carries, and draws either however they like.
9749
+
9750
+ **Optional, with no default**, per the reflected-property rule: a value
9751
+ written here appears in the served markup of every tree anybody renders.
9752
+ The resting state is the absence of the attribute, which is `peer`. */
9753
+ nesting?: (HelixTree["nesting"]) | undefined;
9720
9754
  };
9721
9755
 
9722
9756
  export type HelixTreeVueEvents = {