@fusion.dev/helix 0.33.4 → 0.33.5
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
CHANGED
|
@@ -13154,8 +13154,28 @@
|
|
|
13154
13154
|
"name": "--carousel-block-size"
|
|
13155
13155
|
},
|
|
13156
13156
|
{
|
|
13157
|
-
"description": "Space between slides.",
|
|
13158
|
-
"name": "--carousel-gap"
|
|
13157
|
+
"description": "Space between slides. A sheet sets it and the component measures the run with it.",
|
|
13158
|
+
"name": "--carousel-gap",
|
|
13159
|
+
"inheritedFrom": {
|
|
13160
|
+
"name": "HelixHeadlessCarousel",
|
|
13161
|
+
"module": "src/carousel/root/carousel-root.ts"
|
|
13162
|
+
}
|
|
13163
|
+
},
|
|
13164
|
+
{
|
|
13165
|
+
"description": "The size one pane is laid out at. A sheet sets it and the component measures the run with it.",
|
|
13166
|
+
"name": "--carousel-pane",
|
|
13167
|
+
"inheritedFrom": {
|
|
13168
|
+
"name": "HelixHeadlessCarousel",
|
|
13169
|
+
"module": "src/carousel/root/carousel-root.ts"
|
|
13170
|
+
}
|
|
13171
|
+
},
|
|
13172
|
+
{
|
|
13173
|
+
"description": "How far short of a whole pixel the run ends, on the last slide alone, for a sheet to take up as `margin-inline-end`. See `runEnd`.",
|
|
13174
|
+
"name": "--carousel-run-end",
|
|
13175
|
+
"inheritedFrom": {
|
|
13176
|
+
"name": "HelixHeadlessCarousel",
|
|
13177
|
+
"module": "src/carousel/root/carousel-root.ts"
|
|
13178
|
+
}
|
|
13159
13179
|
}
|
|
13160
13180
|
],
|
|
13161
13181
|
"members": [
|
|
@@ -13726,6 +13746,21 @@
|
|
|
13726
13746
|
"module": "src/carousel/root/carousel-root.ts"
|
|
13727
13747
|
}
|
|
13728
13748
|
},
|
|
13749
|
+
{
|
|
13750
|
+
"kind": "method",
|
|
13751
|
+
"name": "runEnd",
|
|
13752
|
+
"privacy": "private",
|
|
13753
|
+
"return": {
|
|
13754
|
+
"type": {
|
|
13755
|
+
"text": "string | typeof nothing"
|
|
13756
|
+
}
|
|
13757
|
+
},
|
|
13758
|
+
"description": "How far short of a whole pixel the run of slides ends, for the last one.\n\n**The run has to end on a whole pixel, because a right-to-left track cannot\nreach a fraction.** Three across 692 makes the run 450.66 longer than the\ntrack. Chromium measures a right-to-left scroller from its far end and\nfloors that length, so the track stops at -450 where a left-to-right one\nrounds to 451, and two thirds of a pixel of the slide before stays at the\nleading edge. Ending on a whole pixel, the far end is one number both ways\nand the last place rests on it in both, so a swipe to the end stops there\ntoo.\n\n**Here rather than in a stylesheet, because the count is the component's.**\nThe arithmetic wants how many slides there are, and CSS can only ask\n`sibling-count()`, which is Chromium-only, evaluates to 0 through\n`::part()`, and needs a `:last-child` that `::part()` cannot carry either.\nSo the styled tier could correct its run and a consumer writing their own\nseveral-across sheet could not: measured in Chromium at three across, the\nheadless tier rested at 451 against -450 while the styled tier rested at\none number both ways. Published from here, one declaration reading this\ngets both tiers and any consumer to the same place.\n\n**WebKit takes the margin and does not need it**, which is the reason a\ncorrection written in CSS looked like enough. It has no `sibling-count()`\nat all, so nothing reached that engine, and its track rested on one number\nboth ways anyway. Measured with the margin in place, the same widths:\nevery resting place is the number it was without it.\n\n**On the last slide alone, which is what makes that one declaration\nenough.** A sheet writes `margin-inline-end: var(--carousel-run-end, 0px)`\nacross every pane and the fallback answers on all but the last, so nothing\nhas to select a slide by its position in the run.\n\n**A sheet says how wide a pane is and how far apart they sit, and this\nreads both back.** Set neither and the correction is invalid at\ncomputed-value time, which is the fallback rather than a broken margin. The\npercentage resolves where the value is used, on the last pane, so it is the\ntrack's content box and not the track's own containing block: the width the\nrun is actually measured against.\n\nHorizontal only. A vertical track scrolls the other axis, `scrollTop`\ncounts up from zero whatever the writing mode, and there is no far end to\nfloor.",
|
|
13759
|
+
"inheritedFrom": {
|
|
13760
|
+
"name": "HelixHeadlessCarousel",
|
|
13761
|
+
"module": "src/carousel/root/carousel-root.ts"
|
|
13762
|
+
}
|
|
13763
|
+
},
|
|
13729
13764
|
{
|
|
13730
13765
|
"kind": "field",
|
|
13731
13766
|
"name": "tier",
|
|
@@ -2,13 +2,13 @@ import { createSheet } from '@fusion.dev/helix-core';
|
|
|
2
2
|
export const styles = createSheet(`:host {
|
|
3
3
|
--_carousel-bleed: var(--carousel-bleed, var(--helix-space-md));
|
|
4
4
|
--_carousel-gap: var(--carousel-gap, var(--helix-space-md));
|
|
5
|
-
|
|
6
|
-
--_carousel-pane: calc(round(var(--_carousel-share) - 0.015625px, 0.03125px) + 0.015625px);
|
|
7
5
|
--_carousel-per-view: 1;
|
|
8
6
|
--_carousel-share: calc(
|
|
9
7
|
(100% - (var(--_carousel-per-view) - 1) * var(--_carousel-gap)) /
|
|
10
8
|
var(--_carousel-per-view)
|
|
11
9
|
);
|
|
10
|
+
|
|
11
|
+
--carousel-pane: calc(round(var(--_carousel-share) - 0.015625px, 0.03125px) + 0.015625px);
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
:host {
|
|
@@ -179,6 +179,8 @@ inline-size: 1em;
|
|
|
179
179
|
}
|
|
180
180
|
|
|
181
181
|
[part="track"] {
|
|
182
|
+
|
|
183
|
+
--carousel-gap: var(--_carousel-gap);
|
|
182
184
|
display: flex;
|
|
183
185
|
gap: var(--_carousel-gap);
|
|
184
186
|
overflow-x: auto;
|
|
@@ -204,21 +206,11 @@ scroll-snap-type: y mandatory;
|
|
|
204
206
|
|
|
205
207
|
[part="slide"] {
|
|
206
208
|
display: flex;
|
|
207
|
-
flex: 0 0 var(--
|
|
209
|
+
flex: 0 0 var(--carousel-pane);
|
|
210
|
+
margin-inline-end: var(--carousel-run-end, 0px);
|
|
208
211
|
scroll-snap-align: start;
|
|
209
212
|
}
|
|
210
213
|
|
|
211
|
-
:host(:not([orientation="vertical"])) [part="slide"]:last-child {
|
|
212
|
-
--_carousel-overrun: calc(
|
|
213
|
-
sibling-count() *
|
|
214
|
-
(var(--_carousel-pane) + var(--_carousel-gap)) -
|
|
215
|
-
var(--_carousel-gap) -
|
|
216
|
-
100%
|
|
217
|
-
);
|
|
218
|
-
--_carousel-run-end: calc(round(var(--_carousel-overrun), 1px) - var(--_carousel-overrun));
|
|
219
|
-
margin-inline-end: var(--_carousel-run-end);
|
|
220
|
-
}
|
|
221
|
-
|
|
222
214
|
[part="slide"] ::slotted(*) {
|
|
223
215
|
flex: 1 1 0;
|
|
224
216
|
min-block-size: 0;
|
|
@@ -22,7 +22,6 @@ import type { CSSResultGroup } from 'lit';
|
|
|
22
22
|
* focus ring is not clipped by it. Defaults to enough for `--helix-shadow-md`, which reaches
|
|
23
23
|
* 16px below the box it is on; a slide on `--helix-shadow-lg` reaches 44px and wants more.
|
|
24
24
|
* @cssproperty --carousel-block-size - Height of a vertical track.
|
|
25
|
-
* @cssproperty --carousel-gap - Space between slides.
|
|
26
25
|
*/
|
|
27
26
|
export declare class HelixCarousel extends HelixHeadlessCarousel {
|
|
28
27
|
/**
|
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.
|
|
4
|
+
"version": "0.33.5",
|
|
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.
|
|
51
|
-
"@fusion.dev/helix-headless": "0.33.
|
|
52
|
-
"@fusion.dev/helix-styles": "0.33.
|
|
50
|
+
"@fusion.dev/helix-core": "0.33.5",
|
|
51
|
+
"@fusion.dev/helix-headless": "0.33.5",
|
|
52
|
+
"@fusion.dev/helix-styles": "0.33.5"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@custom-elements-manifest/analyzer": "^0.11.0",
|
|
56
|
-
"@fusion.dev/helix-cem": "0.33.
|
|
57
|
-
"@fusion.dev/helix-testing": "0.33.
|
|
56
|
+
"@fusion.dev/helix-cem": "0.33.5",
|
|
57
|
+
"@fusion.dev/helix-testing": "0.33.5",
|
|
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
|
@@ -22041,7 +22041,9 @@ export type CustomElements = {
|
|
|
22041
22041
|
*
|
|
22042
22042
|
* - `--carousel-bleed`: Room inside the scroller so a slide's own shadow, border or focus ring is not clipped by it. Defaults to enough for `--helix-shadow-md`, which reaches 16px below the box it is on; a slide on `--helix-shadow-lg` reaches 44px and wants more. (default: `undefined`)
|
|
22043
22043
|
* - `--carousel-block-size`: Height of a vertical track. (default: `undefined`)
|
|
22044
|
-
* - `--carousel-gap`: Space between slides. (default: `undefined`)
|
|
22044
|
+
* - `--carousel-gap`: Space between slides. A sheet sets it and the component measures the run with it. (default: `undefined`)
|
|
22045
|
+
* - `--carousel-pane`: The size one pane is laid out at. A sheet sets it and the component measures the run with it. (default: `undefined`)
|
|
22046
|
+
* - `--carousel-run-end`: How far short of a whole pixel the run ends, on the last slide alone, for a sheet to take up as `margin-inline-end`. See `runEnd`. (default: `undefined`)
|
|
22045
22047
|
*
|
|
22046
22048
|
* ## CSS Parts
|
|
22047
22049
|
*
|
|
@@ -40862,7 +40864,9 @@ export type CustomElementsSolidJs = {
|
|
|
40862
40864
|
*
|
|
40863
40865
|
* - `--carousel-bleed`: Room inside the scroller so a slide's own shadow, border or focus ring is not clipped by it. Defaults to enough for `--helix-shadow-md`, which reaches 16px below the box it is on; a slide on `--helix-shadow-lg` reaches 44px and wants more. (default: `undefined`)
|
|
40864
40866
|
* - `--carousel-block-size`: Height of a vertical track. (default: `undefined`)
|
|
40865
|
-
* - `--carousel-gap`: Space between slides. (default: `undefined`)
|
|
40867
|
+
* - `--carousel-gap`: Space between slides. A sheet sets it and the component measures the run with it. (default: `undefined`)
|
|
40868
|
+
* - `--carousel-pane`: The size one pane is laid out at. A sheet sets it and the component measures the run with it. (default: `undefined`)
|
|
40869
|
+
* - `--carousel-run-end`: How far short of a whole pixel the run ends, on the last slide alone, for a sheet to take up as `margin-inline-end`. See `runEnd`. (default: `undefined`)
|
|
40866
40870
|
*
|
|
40867
40871
|
* ## CSS Parts
|
|
40868
40872
|
*
|
|
@@ -57855,8 +57859,12 @@ export type CustomCssProperties = {
|
|
|
57855
57859
|
"--carousel-bleed"?: (string) | undefined;
|
|
57856
57860
|
/** Height of a vertical track. */
|
|
57857
57861
|
"--carousel-block-size"?: (string) | undefined;
|
|
57858
|
-
/** Space between slides. */
|
|
57862
|
+
/** Space between slides. A sheet sets it and the component measures the run with it. */
|
|
57859
57863
|
"--carousel-gap"?: (string) | undefined;
|
|
57864
|
+
/** The size one pane is laid out at. A sheet sets it and the component measures the run with it. */
|
|
57865
|
+
"--carousel-pane"?: (string) | undefined;
|
|
57866
|
+
/** How far short of a whole pixel the run ends, on the last slide alone, for a sheet to take up as `margin-inline-end`. See `runEnd`. */
|
|
57867
|
+
"--carousel-run-end"?: (string) | undefined;
|
|
57860
57868
|
/** Fill behind the composer. */
|
|
57861
57869
|
"--chat-composer-background-color"?: (string) | undefined;
|
|
57862
57870
|
/** The composer's edge, so a theme can remove it. */
|
package/types/vue.d.ts
CHANGED
|
@@ -10277,8 +10277,12 @@ export type CustomCssProperties = {
|
|
|
10277
10277
|
"--carousel-bleed"?: (string) | undefined;
|
|
10278
10278
|
/** Height of a vertical track. */
|
|
10279
10279
|
"--carousel-block-size"?: (string) | undefined;
|
|
10280
|
-
/** Space between slides. */
|
|
10280
|
+
/** Space between slides. A sheet sets it and the component measures the run with it. */
|
|
10281
10281
|
"--carousel-gap"?: (string) | undefined;
|
|
10282
|
+
/** The size one pane is laid out at. A sheet sets it and the component measures the run with it. */
|
|
10283
|
+
"--carousel-pane"?: (string) | undefined;
|
|
10284
|
+
/** How far short of a whole pixel the run ends, on the last slide alone, for a sheet to take up as `margin-inline-end`. See `runEnd`. */
|
|
10285
|
+
"--carousel-run-end"?: (string) | undefined;
|
|
10282
10286
|
/** Fill behind the composer. */
|
|
10283
10287
|
"--chat-composer-background-color"?: (string) | undefined;
|
|
10284
10288
|
/** The composer's edge, so a theme can remove it. */
|