@fusion.dev/helix-core 0.0.0-dev → 0.0.2
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/custom-elements.json +156 -124
- package/dist/controllers/aria-forward-controller/aria-forward-controller.d.ts +2 -0
- package/dist/controllers/aria-forward-controller/aria-forward-controller.js +44 -17
- package/dist/controllers/chart-pointer-controller/chart-pointer-controller.d.ts +5 -6
- package/dist/controllers/chart-pointer-controller/chart-pointer-controller.js +5 -6
- package/dist/controllers/command-controller/command-controller.d.ts +5 -7
- package/dist/controllers/command-controller/command-controller.js +5 -7
- package/dist/controllers/copy-controller/copy-controller.d.ts +2 -4
- package/dist/controllers/copy-controller/copy-controller.js +7 -9
- package/dist/controllers/disabled-cascade-controller/disabled-cascade-controller.d.ts +10 -17
- package/dist/controllers/disabled-cascade-controller/disabled-cascade-controller.js +11 -18
- package/dist/controllers/dismiss-controller/dismiss-controller.d.ts +44 -6
- package/dist/controllers/dismiss-controller/dismiss-controller.js +77 -10
- package/dist/controllers/drilldown-controller/drilldown-controller.d.ts +3 -6
- package/dist/controllers/drilldown-controller/drilldown-controller.js +3 -6
- package/dist/controllers/floating-controller/floating-controller.d.ts +7 -8
- package/dist/controllers/floating-controller/floating-controller.js +69 -38
- package/dist/controllers/focus-trap-controller/focus-trap-controller.js +7 -10
- package/dist/controllers/indicator-controller/indicator-controller.d.ts +17 -29
- package/dist/controllers/indicator-controller/indicator-controller.js +11 -21
- package/dist/controllers/keyboard-navigation-controller/keyboard-navigation-controller.d.ts +3 -13
- package/dist/controllers/keyboard-navigation-controller/keyboard-navigation-controller.js +11 -24
- package/dist/controllers/popover-controller/popover-controller.d.ts +2 -7
- package/dist/controllers/popover-controller/popover-controller.js +3 -9
- package/dist/controllers/source-controller/source-controller.d.ts +2 -5
- package/dist/controllers/source-controller/source-controller.js +2 -5
- package/dist/controllers/token-color-controller/token-color-controller.d.ts +2 -4
- package/dist/controllers/token-color-controller/token-color-controller.js +2 -4
- package/dist/controllers/virtualize-controller/virtualize-controller.d.ts +1 -1
- package/dist/controllers/virtualize-controller/virtualize-controller.js +15 -15
- package/dist/events/element-events.js +0 -5
- package/dist/events/events.d.ts +55 -93
- package/dist/events/events.js +68 -105
- package/dist/helix-element/helix-element.d.ts +26 -27
- package/dist/helix-element/helix-element.js +83 -100
- package/dist/helix-form-element/helix-form-element.d.ts +11 -17
- package/dist/helix-form-element/helix-form-element.js +15 -21
- package/dist/mixins/mixin-chart-source/mixin-chart-source.d.ts +6 -14
- package/dist/mixins/mixin-chart-source/mixin-chart-source.js +12 -25
- package/dist/mixins/mixin-collection/mixin-collection.d.ts +1 -7
- package/dist/mixins/mixin-collection/mixin-collection.js +16 -23
- package/dist/mixins/mixin-controller-active/mixin-controller-active.d.ts +15 -16
- package/dist/mixins/mixin-controller-active/mixin-controller-active.js +28 -42
- package/dist/mixins/mixin-controller-checked/mixin-controller-checked.d.ts +15 -17
- package/dist/mixins/mixin-controller-checked/mixin-controller-checked.js +33 -45
- package/dist/mixins/mixin-controller-open/mixin-controller-open.d.ts +4 -4
- package/dist/mixins/mixin-controller-open/mixin-controller-open.js +29 -45
- package/dist/mixins/mixin-controller-value/mixin-controller-value.d.ts +10 -18
- package/dist/mixins/mixin-controller-value/mixin-controller-value.js +14 -31
- package/dist/mixins/mixin-dismissible/mixin-dismissible.d.ts +10 -15
- package/dist/mixins/mixin-dismissible/mixin-dismissible.js +10 -15
- package/dist/mixins/mixin-field/mixin-field.d.ts +10 -12
- package/dist/mixins/mixin-field/mixin-field.js +48 -64
- package/dist/utils/capture-pointer/capture-pointer.d.ts +1 -4
- package/dist/utils/capture-pointer/capture-pointer.js +1 -4
- package/dist/utils/closest-instance/closest-instance.d.ts +6 -10
- package/dist/utils/closest-instance/closest-instance.js +6 -10
- package/dist/utils/create-sheet/create-sheet.d.ts +1 -1
- package/dist/utils/create-sheet/create-sheet.js +1 -1
- package/dist/utils/custom-element/custom-element.d.ts +0 -21
- package/dist/utils/custom-element/custom-element.js +1 -1
- package/dist/utils/draw-icon/draw-icon.d.ts +3 -3
- package/dist/utils/draw-icon/draw-icon.js +3 -3
- package/dist/utils/elapsed-time/elapsed-time.js +1 -3
- package/dist/utils/focusable-elements/focusable-elements.d.ts +3 -4
- package/dist/utils/focusable-elements/focusable-elements.js +9 -11
- package/dist/utils/format-numbers/format-numbers.js +1 -4
- package/dist/utils/host-aria/host-aria.d.ts +2 -2
- package/dist/utils/host-aria/host-aria.js +2 -2
- package/dist/utils/line-path/line-path.js +1 -1
- package/dist/utils/on-unless-false/on-unless-false.d.ts +0 -5
- package/dist/utils/on-unless-false/on-unless-false.js +0 -5
- package/dist/utils/read-series/read-series.d.ts +26 -0
- package/dist/utils/read-series/read-series.js +26 -29
- package/dist/utils/relative-time/relative-time.js +5 -6
- package/dist/utils/request-change/request-change.d.ts +9 -20
- package/dist/utils/resolve-active-item/resolve-active-item.d.ts +3 -3
- package/dist/utils/resolve-active-item/resolve-active-item.js +3 -3
- package/dist/utils/restore-value/restore-value.js +1 -6
- package/dist/utils/scroll-item-into-view/scroll-item-into-view.js +4 -5
- package/dist/utils/slot-filled/slot-filled.d.ts +2 -4
- package/dist/utils/slot-filled/slot-filled.js +2 -4
- package/dist/utils/tell-disclosure/tell-disclosure.d.ts +15 -18
- package/dist/utils/tell-disclosure/tell-disclosure.js +15 -18
- package/dist/utils/tone-marks/tone-marks.d.ts +10 -16
- package/dist/utils/tone-marks/tone-marks.js +6 -10
- package/dist/utils/value-as/value-as.d.ts +0 -28
- package/dist/utils/value-as/value-as.js +5 -10
- package/package.json +6 -6
|
@@ -1,31 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A date or time control's string value, read as the platform reads it.
|
|
3
|
-
*
|
|
4
|
-
* **Six families needed this and none of them could have it alone.** `Date
|
|
5
|
-
* Input` and `Date Picker` both hold `YYYY-MM-DD`, `Time Input` and `Time
|
|
6
|
-
* Picker` both hold `HH:mm`, and `Number Input` and `Rating` both hold a
|
|
7
|
-
* number, so `valueAsDate` and `valueAsNumber` would have been four
|
|
8
|
-
* implementations of two conversions with four chances to disagree about what
|
|
9
|
-
* an invalid value returns. Here rather than in a shared folder under
|
|
10
|
-
* `helix/headless`, because there is no such folder and this is a pure function
|
|
11
|
-
* of a string: it sits beside `formatNumbers` and `relativeTime`, which are the
|
|
12
|
-
* same kind of thing.
|
|
13
|
-
*
|
|
14
|
-
* **UTC throughout, which is the platform's own choice and looks wrong until it
|
|
15
|
-
* is explained.** `<input type="date">.valueAsDate` returns midnight UTC rather
|
|
16
|
-
* than midnight local, so a date that is the same date everywhere does not
|
|
17
|
-
* become a different one by crossing a timezone. Constructing through
|
|
18
|
-
* `new Date('2026-08-26')` happens to do this and `new Date(2026, 7, 26)` does
|
|
19
|
-
* not, and the difference is a whole day for anybody west of Greenwich: the
|
|
20
|
-
* local constructor gives a `Date` whose UTC date is the 25th. `Date.UTC` says
|
|
21
|
-
* which one is meant rather than relying on a parse rule.
|
|
22
|
-
*
|
|
23
|
-
* **Invalid is `null` and `NaN`, never a thrown error and never a guess.** That
|
|
24
|
-
* is what the platform answers for a half-typed date, which is most of the
|
|
25
|
-
* keystrokes a reader makes in one: a control that threw on the way to a valid
|
|
26
|
-
* value would be unusable, and one that guessed would submit a date nobody
|
|
27
|
-
* chose.
|
|
28
|
-
*/
|
|
29
1
|
/**
|
|
30
2
|
* The date a `YYYY-MM-DD` value names, at midnight UTC, or `null`.
|
|
31
3
|
*
|
|
@@ -1,15 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/*
|
|
2
2
|
* A date or time control's string value, read as the platform reads it.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* implementations of two conversions with four chances to disagree about what
|
|
9
|
-
* an invalid value returns. Here rather than in a shared folder under
|
|
10
|
-
* `helix/headless`, because there is no such folder and this is a pure function
|
|
11
|
-
* of a string: it sits beside `formatNumbers` and `relativeTime`, which are the
|
|
12
|
-
* same kind of thing.
|
|
4
|
+
* Shared, because six families hold three formats between them and separate
|
|
5
|
+
* implementations of one conversion are chances to disagree about what an
|
|
6
|
+
* invalid value returns. A pure function of a string, so it sits here beside
|
|
7
|
+
* `formatNumbers` and `relativeTime` rather than under `helix/headless`.
|
|
13
8
|
*
|
|
14
9
|
* **UTC throughout, which is the platform's own choice and looks wrong until it
|
|
15
10
|
* is explained.** `<input type="date">.valueAsDate` returns midnight UTC rather
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fusion.dev/helix-core",
|
|
3
3
|
"description": "Helix element primitives: base classes, mixins, decorators, utilities.",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.2",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Ross Sheppard <ross.sheppard@fusion.dev>",
|
|
7
7
|
"repository": {
|
|
@@ -27,18 +27,18 @@
|
|
|
27
27
|
"scripts": {
|
|
28
28
|
"analyze": "cem analyze --config custom-elements-manifest.config.ts",
|
|
29
29
|
"build": "tsc -p tsconfig.json",
|
|
30
|
-
"
|
|
31
|
-
"
|
|
30
|
+
"test": "bun test src",
|
|
31
|
+
"typecheck": "tsc -p tsconfig.json --noEmit"
|
|
32
32
|
},
|
|
33
33
|
"bugs": "https://github.com/project-fusion/fusion/issues",
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@floating-ui/dom": "^1.8.0",
|
|
36
|
-
"@fusion.dev/helix-icons": "0.0.
|
|
36
|
+
"@fusion.dev/helix-icons": "0.0.2"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@custom-elements-manifest/analyzer": "^0.11.0",
|
|
40
|
-
"@fusion.dev/helix-cem": "0.0.
|
|
41
|
-
"@fusion.dev/helix-testing": "0.0.
|
|
40
|
+
"@fusion.dev/helix-cem": "0.0.2",
|
|
41
|
+
"@fusion.dev/helix-testing": "0.0.2",
|
|
42
42
|
"lit": "^3.2.1"
|
|
43
43
|
},
|
|
44
44
|
"homepage": "https://fusion.dev",
|