@fusion.dev/helix-core 0.207.2 → 0.208.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/index.d.ts
CHANGED
|
@@ -62,7 +62,7 @@ export { MixinTokens, type MixinTokensInterface } from './mixins/mixin-tokens/mi
|
|
|
62
62
|
export { MixinViewport, type ViewportControlsPlacement, type ViewportElement, type ViewportGestureLabels, type ViewportGestureMode, type ViewportGestures, type ViewportWay, } from './mixins/mixin-viewport/mixin-viewport.js';
|
|
63
63
|
export { anchorElement } from './utils/anchor-element/anchor-element.js';
|
|
64
64
|
export { arrowReach, sideOf } from './utils/arrow/arrow.js';
|
|
65
|
-
export { assignSlots } from './utils/assign-slots/assign-slots.js';
|
|
65
|
+
export { assignSlot, assignSlots } from './utils/assign-slots/assign-slots.js';
|
|
66
66
|
export { type DrawAutofillOptions, drawAutofill, } from './utils/autofill-select/autofill-select.js';
|
|
67
67
|
export { type BoxAxisText, type BoxLabel, type BoxLabelSizes, type BoxPlace, boxLabels, type SeenPlace, } from './utils/box-labels/box-labels.js';
|
|
68
68
|
export { addDays, addMonths, type Barring, barredBy, type CalendarParts, type CalendarView, calendarLocale, type DateCalendar, localToday, MONTH_CALENDARS, type MonthCalendar, type MonthSystem, monthOf, monthOut, monthSystem, type PeriodCell, type PeriodPage, periodCells, periodKey, periodMove, sameMonth, todayIn, weekendOf, weekStartOf, YEARS_SHOWN, yearOut, yearPageOf, } from './utils/calendar/calendar.js';
|
package/dist/index.js
CHANGED
|
@@ -62,7 +62,7 @@ export { MixinTokens } from './mixins/mixin-tokens/mixin-tokens.js';
|
|
|
62
62
|
export { MixinViewport, } from './mixins/mixin-viewport/mixin-viewport.js';
|
|
63
63
|
export { anchorElement } from './utils/anchor-element/anchor-element.js';
|
|
64
64
|
export { arrowReach, sideOf } from './utils/arrow/arrow.js';
|
|
65
|
-
export { assignSlots } from './utils/assign-slots/assign-slots.js';
|
|
65
|
+
export { assignSlot, assignSlots } from './utils/assign-slots/assign-slots.js';
|
|
66
66
|
export { drawAutofill, } from './utils/autofill-select/autofill-select.js';
|
|
67
67
|
export { boxLabels, } from './utils/box-labels/box-labels.js';
|
|
68
68
|
export { addDays, addMonths, barredBy, calendarLocale, localToday, MONTH_CALENDARS, monthOf, monthOut, monthSystem, periodCells, periodKey, periodMove, sameMonth, todayIn, weekendOf, weekStartOf, YEARS_SHOWN, yearOut, yearPageOf, } from './utils/calendar/calendar.js';
|
|
@@ -16,3 +16,14 @@
|
|
|
16
16
|
* after the first render, the case no `slotchange` reports.
|
|
17
17
|
*/
|
|
18
18
|
export declare const assignSlots: (root: ParentNode | null | undefined, children: Iterable<Element>, place?: (child: Element) => string | undefined) => void;
|
|
19
|
+
/**
|
|
20
|
+
* Assigns `nodes` to `slot` by hand, unless it already holds exactly them.
|
|
21
|
+
*
|
|
22
|
+
* **An assignment that changes nothing still costs something in WebKit.** It
|
|
23
|
+
* cancels a smooth scroll running in the scroller around the slot, and a track
|
|
24
|
+
* that snaps then returns to where the scroll began. Measured on WebKit 26.6 on
|
|
25
|
+
* October 10, 2026: Carousel assigned its slides on every update, so a press of
|
|
26
|
+
* next moved the dots and left the slides where they were. Chromium carries on
|
|
27
|
+
* scrolling.
|
|
28
|
+
*/
|
|
29
|
+
export declare const assignSlot: (slot: HTMLSlotElement, ...nodes: (Element | Text)[]) => void;
|
|
@@ -5,10 +5,12 @@ export const assignSlots = (root, children, place = () => undefined) => {
|
|
|
5
5
|
named.set(name, [...(named.get(name) ?? []), child]);
|
|
6
6
|
}
|
|
7
7
|
for (const slot of root?.querySelectorAll?.('slot') ?? []) {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
assignSlot(slot, ...(named.get(slot.name) ?? []));
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
export const assignSlot = (slot, ...nodes) => {
|
|
12
|
+
const had = slot.assignedNodes?.() ?? [];
|
|
13
|
+
if (had.length !== nodes.length || had.some((one, at) => one !== nodes[at])) {
|
|
14
|
+
slot.assign?.(...nodes);
|
|
13
15
|
}
|
|
14
16
|
};
|
package/dist/version.d.ts
CHANGED
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.208.1';
|
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.
|
|
4
|
+
"version": "0.208.1",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Ross Sheppard <ross.sheppard@fusion.dev>",
|
|
7
7
|
"repository": {
|
|
@@ -81,12 +81,12 @@
|
|
|
81
81
|
"bugs": "https://github.com/project-fusion/fusion/issues",
|
|
82
82
|
"dependencies": {
|
|
83
83
|
"@floating-ui/dom": "^1.8.0",
|
|
84
|
-
"@fusion.dev/helix-icons": "0.
|
|
84
|
+
"@fusion.dev/helix-icons": "0.208.1",
|
|
85
85
|
"tslib": "^2.8.1"
|
|
86
86
|
},
|
|
87
87
|
"devDependencies": {
|
|
88
|
-
"@fusion.dev/helix-cem": "0.
|
|
89
|
-
"@fusion.dev/helix-testing": "0.
|
|
88
|
+
"@fusion.dev/helix-cem": "0.208.1",
|
|
89
|
+
"@fusion.dev/helix-testing": "0.208.1",
|
|
90
90
|
"@lit-labs/ssr": "^4.1.0",
|
|
91
91
|
"lit": "^3.2.1"
|
|
92
92
|
},
|