@fusion.dev/helix 0.33.0 → 0.33.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
CHANGED
|
@@ -20685,7 +20685,7 @@
|
|
|
20685
20685
|
"declarations": [
|
|
20686
20686
|
{
|
|
20687
20687
|
"kind": "class",
|
|
20688
|
-
"description": "The header sits above the code rather than floating on it. Overlaid, which is
|
|
20688
|
+
"description": "The header sits above the code rather than floating on it, and the copy\nbutton stands at its end. Overlaid, which is the usual build, the button\ncovers the first line, which is the one line of a snippet a reader is most\nlikely to be reading. A block with no name has no header, and the button\nstands beside the code in room the block keeps clear: an end gutter for code,\na band above the first hunk for a diff.\n\nA diff is drawn a block per file in the same frame, each changed line washed\nin its tone at Tag's resting strength with its `+` or `-` in the tone's ink,\nso the change does not rest on telling two pale grounds apart. A split diff\nstacks its two versions below about 40rem of the file's own width.",
|
|
20689
20689
|
"name": "HelixCodeBlock",
|
|
20690
20690
|
"cssProperties": [
|
|
20691
20691
|
{
|
|
@@ -20824,6 +20824,59 @@
|
|
|
20824
20824
|
"module": "src/code-block/root/code-block-root.ts"
|
|
20825
20825
|
}
|
|
20826
20826
|
},
|
|
20827
|
+
{
|
|
20828
|
+
"kind": "method",
|
|
20829
|
+
"name": "renderHeader",
|
|
20830
|
+
"privacy": "private",
|
|
20831
|
+
"return": {
|
|
20832
|
+
"type": {
|
|
20833
|
+
"text": "TemplateResult | typeof nothing"
|
|
20834
|
+
}
|
|
20835
|
+
},
|
|
20836
|
+
"parameters": [
|
|
20837
|
+
{
|
|
20838
|
+
"name": "name",
|
|
20839
|
+
"type": {
|
|
20840
|
+
"text": "string"
|
|
20841
|
+
}
|
|
20842
|
+
},
|
|
20843
|
+
{
|
|
20844
|
+
"name": "value",
|
|
20845
|
+
"optional": true,
|
|
20846
|
+
"type": {
|
|
20847
|
+
"text": "string"
|
|
20848
|
+
}
|
|
20849
|
+
}
|
|
20850
|
+
],
|
|
20851
|
+
"description": "The name with the copy button beside it, or nothing when there is no name.\n\n**The button is in the header wherever there is one**, because beside the\ncode it stands over the block and the block has to make room for it. A\ndiff cannot: its washes run to the edge, so the button stood on the hunk\nline and the line under it. In the header it is over nothing.\n\n**No name draws no header**, rather than a bar to hold one button, which\nturned a `Usage` section of one-line imports into a run of empty strips.\nThe button then stands beside the code, in room the block keeps for it.",
|
|
20852
|
+
"inheritedFrom": {
|
|
20853
|
+
"name": "HelixHeadlessCodeBlock",
|
|
20854
|
+
"module": "src/code-block/root/code-block-root.ts"
|
|
20855
|
+
}
|
|
20856
|
+
},
|
|
20857
|
+
{
|
|
20858
|
+
"kind": "method",
|
|
20859
|
+
"name": "renderCopy",
|
|
20860
|
+
"privacy": "private",
|
|
20861
|
+
"return": {
|
|
20862
|
+
"type": {
|
|
20863
|
+
"text": "TemplateResult | typeof nothing"
|
|
20864
|
+
}
|
|
20865
|
+
},
|
|
20866
|
+
"parameters": [
|
|
20867
|
+
{
|
|
20868
|
+
"name": "value",
|
|
20869
|
+
"optional": true,
|
|
20870
|
+
"type": {
|
|
20871
|
+
"text": "string"
|
|
20872
|
+
}
|
|
20873
|
+
}
|
|
20874
|
+
],
|
|
20875
|
+
"inheritedFrom": {
|
|
20876
|
+
"name": "HelixHeadlessCodeBlock",
|
|
20877
|
+
"module": "src/code-block/root/code-block-root.ts"
|
|
20878
|
+
}
|
|
20879
|
+
},
|
|
20827
20880
|
{
|
|
20828
20881
|
"kind": "method",
|
|
20829
20882
|
"name": "renderCopyButton",
|
|
@@ -21380,7 +21433,7 @@
|
|
|
21380
21433
|
}
|
|
21381
21434
|
},
|
|
21382
21435
|
{
|
|
21383
|
-
"description": "The copy button.",
|
|
21436
|
+
"description": "The copy button: in the header where there is one, and otherwise beside the code.",
|
|
21384
21437
|
"name": "copy",
|
|
21385
21438
|
"inheritedFrom": {
|
|
21386
21439
|
"name": "HelixHeadlessCodeBlock",
|
|
@@ -21500,7 +21553,7 @@
|
|
|
21500
21553
|
}
|
|
21501
21554
|
},
|
|
21502
21555
|
{
|
|
21503
|
-
"description": "The code and the copy button beside it.",
|
|
21556
|
+
"description": "The code, and the copy button beside it where there is no header.",
|
|
21504
21557
|
"name": "frame",
|
|
21505
21558
|
"inheritedFrom": {
|
|
21506
21559
|
"name": "HelixHeadlessCodeBlock",
|
|
@@ -21508,7 +21561,7 @@
|
|
|
21508
21561
|
}
|
|
21509
21562
|
},
|
|
21510
21563
|
{
|
|
21511
|
-
"description": "The bar carrying the name, where there is
|
|
21564
|
+
"description": "The bar carrying the name and the copy button, where there is a name.",
|
|
21512
21565
|
"name": "header",
|
|
21513
21566
|
"inheritedFrom": {
|
|
21514
21567
|
"name": "HelixHeadlessCodeBlock",
|
|
@@ -44605,12 +44658,6 @@
|
|
|
44605
44658
|
}
|
|
44606
44659
|
]
|
|
44607
44660
|
},
|
|
44608
|
-
{
|
|
44609
|
-
"kind": "javascript-module",
|
|
44610
|
-
"path": "src/element-events.generated.ts",
|
|
44611
|
-
"declarations": [],
|
|
44612
|
-
"exports": []
|
|
44613
|
-
},
|
|
44614
44661
|
{
|
|
44615
44662
|
"kind": "javascript-module",
|
|
44616
44663
|
"path": "src/empty/index.ts",
|
|
@@ -2,7 +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);
|
|
5
7
|
--_carousel-per-view: 1;
|
|
8
|
+
--_carousel-share: calc(
|
|
9
|
+
(100% - (var(--_carousel-per-view) - 1) * var(--_carousel-gap)) /
|
|
10
|
+
var(--_carousel-per-view)
|
|
11
|
+
);
|
|
6
12
|
}
|
|
7
13
|
|
|
8
14
|
:host {
|
|
@@ -198,16 +204,21 @@ scroll-snap-type: y mandatory;
|
|
|
198
204
|
|
|
199
205
|
[part="slide"] {
|
|
200
206
|
display: flex;
|
|
201
|
-
flex: 0 0
|
|
202
|
-
round(
|
|
203
|
-
up,
|
|
204
|
-
(100% - (var(--_carousel-per-view) - 1) * var(--_carousel-gap)) /
|
|
205
|
-
var(--_carousel-per-view),
|
|
206
|
-
1px
|
|
207
|
-
);
|
|
207
|
+
flex: 0 0 var(--_carousel-pane);
|
|
208
208
|
scroll-snap-align: start;
|
|
209
209
|
}
|
|
210
210
|
|
|
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
|
+
|
|
211
222
|
[part="slide"] ::slotted(*) {
|
|
212
223
|
flex: 1 1 0;
|
|
213
224
|
min-block-size: 0;
|
|
@@ -216,11 +227,7 @@ min-inline-size: 0;
|
|
|
216
227
|
|
|
217
228
|
:host([orientation="vertical"]) [part="slide"] {
|
|
218
229
|
flex-direction: column;
|
|
219
|
-
flex: 0 0
|
|
220
|
-
calc(
|
|
221
|
-
(100% - (var(--_carousel-per-view) - 1) * var(--_carousel-gap)) /
|
|
222
|
-
var(--_carousel-per-view)
|
|
223
|
-
);
|
|
230
|
+
flex: 0 0 var(--_carousel-share);
|
|
224
231
|
}
|
|
225
232
|
|
|
226
233
|
:host([per-view="2"]) {
|
|
@@ -28,16 +28,24 @@ border-end-start-radius: var(--helix-radii-none);
|
|
|
28
28
|
border-start-end-radius: var(--code-block-radius, var(--helix-radii-lg));
|
|
29
29
|
border-start-start-radius: var(--code-block-radius, var(--helix-radii-lg));
|
|
30
30
|
display: flex;
|
|
31
|
+
gap: var(--helix-space-sm);
|
|
31
32
|
|
|
32
33
|
padding-block: var(--helix-space-xs);
|
|
33
34
|
padding-inline: var(--helix-space-md);
|
|
34
35
|
}
|
|
35
36
|
|
|
37
|
+
[part="header"]:has(> [part="copy"]) {
|
|
38
|
+
padding-block: var(--helix-space-2xs);
|
|
39
|
+
padding-inline-end: var(--helix-space-2xs);
|
|
40
|
+
}
|
|
41
|
+
|
|
36
42
|
[part="label"] {
|
|
37
43
|
color: var(--helix-color-foreground-muted);
|
|
38
44
|
font-family: var(--helix-font-sans);
|
|
39
45
|
font-size: var(--helix-text-xs);
|
|
40
46
|
font-weight: var(--helix-weight-medium);
|
|
47
|
+
min-inline-size: 0;
|
|
48
|
+
overflow-wrap: anywhere;
|
|
41
49
|
}
|
|
42
50
|
|
|
43
51
|
[part="frame"] {
|
|
@@ -50,6 +58,13 @@ block-size: 100%;
|
|
|
50
58
|
|
|
51
59
|
[part="copy"] {
|
|
52
60
|
--icon-button-size: var(--helix-size-control-sm);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
[part="header"] > [part="copy"] {
|
|
64
|
+
margin-inline-start: auto;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
[part="frame"] > [part="copy"] {
|
|
53
68
|
inset-block-start: var(--_code-block-copy-inset);
|
|
54
69
|
inset-inline-end: var(--_code-block-copy-inset);
|
|
55
70
|
position: absolute;
|
|
@@ -67,7 +82,7 @@ padding-block: var(--helix-space-sm);
|
|
|
67
82
|
padding-inline: var(--helix-space-md);
|
|
68
83
|
}
|
|
69
84
|
|
|
70
|
-
:host(:not([no-copy])) [part="block"] {
|
|
85
|
+
:host(:not([diff], [no-copy])) [part="frame"]:not([part="header"] + *) > [part="block"] {
|
|
71
86
|
padding-inline-end: var(--_code-block-gutter);
|
|
72
87
|
}
|
|
73
88
|
|
|
@@ -114,7 +129,13 @@ padding-block: var(--helix-space-none) var(--helix-space-sm);
|
|
|
114
129
|
padding-inline: var(--helix-space-none);
|
|
115
130
|
}
|
|
116
131
|
|
|
117
|
-
[
|
|
132
|
+
:host([diff]:not([no-copy]))
|
|
133
|
+
[part="frame"]:not([part="header"] + *)
|
|
134
|
+
:is([part="block"], [part="old"], [part="new"]) {
|
|
135
|
+
padding-block-start: var(--_code-block-gutter);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
[part="header"] + [part="frame"] :is([part="block"], [part="split"] > *) {
|
|
118
139
|
border-block-start-width: var(--helix-space-none);
|
|
119
140
|
border-start-end-radius: var(--helix-radii-none);
|
|
120
141
|
border-start-start-radius: var(--helix-radii-none);
|
|
@@ -130,6 +151,16 @@ grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
|
|
|
130
151
|
[part="split"] {
|
|
131
152
|
grid-template-columns: minmax(0, 1fr);
|
|
132
153
|
}
|
|
154
|
+
|
|
155
|
+
[part="header"] + [part="frame"] [part="new"] {
|
|
156
|
+
border-block-start-width: var(--helix-border-thin);
|
|
157
|
+
border-start-end-radius: var(--code-block-radius, var(--helix-radii-lg));
|
|
158
|
+
border-start-start-radius: var(--code-block-radius, var(--helix-radii-lg));
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
:host([diff]:not([no-copy])) [part="frame"]:not([part="header"] + *) [part="new"] {
|
|
162
|
+
padding-block-start: var(--helix-space-none);
|
|
163
|
+
}
|
|
133
164
|
}
|
|
134
165
|
|
|
135
166
|
:host([diff]) [part="code"] {
|
|
@@ -147,10 +178,6 @@ padding-inline: var(--helix-space-md);
|
|
|
147
178
|
text-decoration: none;
|
|
148
179
|
}
|
|
149
180
|
|
|
150
|
-
:host(:not([no-copy])) :is([part="hunk"], [part="context"], [part="added"], [part="removed"]) {
|
|
151
|
-
padding-inline-end: var(--_code-block-gutter);
|
|
152
|
-
}
|
|
153
|
-
|
|
154
181
|
[part="hunk"] {
|
|
155
182
|
background-color: var(--helix-color-surface-sunken);
|
|
156
183
|
color: var(--helix-color-foreground-muted);
|
|
@@ -5,9 +5,12 @@ import '../../copy-button/index.js';
|
|
|
5
5
|
* @summary A block of code, with somewhere to put its name and a way to take it.
|
|
6
6
|
*
|
|
7
7
|
* @description
|
|
8
|
-
* The header sits above the code rather than floating on it
|
|
9
|
-
*
|
|
10
|
-
* of a snippet a reader is most
|
|
8
|
+
* The header sits above the code rather than floating on it, and the copy
|
|
9
|
+
* button stands at its end. Overlaid, which is the usual build, the button
|
|
10
|
+
* covers the first line, which is the one line of a snippet a reader is most
|
|
11
|
+
* likely to be reading. A block with no name has no header, and the button
|
|
12
|
+
* stands beside the code in room the block keeps clear: an end gutter for code,
|
|
13
|
+
* a band above the first hunk for a diff.
|
|
11
14
|
*
|
|
12
15
|
* A diff is drawn a block per file in the same frame, each changed line washed
|
|
13
16
|
* in its tone at Tag's resting strength with its `+` or `-` in the tone's ink,
|
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.2",
|
|
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.2",
|
|
51
|
+
"@fusion.dev/helix-headless": "0.33.2",
|
|
52
|
+
"@fusion.dev/helix-styles": "0.33.2"
|
|
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.2",
|
|
57
|
+
"@fusion.dev/helix-testing": "0.33.2",
|
|
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
|
@@ -22811,9 +22811,12 @@ export type CustomElements = {
|
|
|
22811
22811
|
>;
|
|
22812
22812
|
|
|
22813
22813
|
/**
|
|
22814
|
-
* The header sits above the code rather than floating on it
|
|
22815
|
-
*
|
|
22816
|
-
* of a snippet a reader is most
|
|
22814
|
+
* The header sits above the code rather than floating on it, and the copy
|
|
22815
|
+
* button stands at its end. Overlaid, which is the usual build, the button
|
|
22816
|
+
* covers the first line, which is the one line of a snippet a reader is most
|
|
22817
|
+
* likely to be reading. A block with no name has no header, and the button
|
|
22818
|
+
* stands beside the code in room the block keeps clear: an end gutter for code,
|
|
22819
|
+
* a band above the first hunk for a diff.
|
|
22817
22820
|
*
|
|
22818
22821
|
* A diff is drawn a block per file in the same frame, each changed line washed
|
|
22819
22822
|
* in its tone at Tag's resting strength with its `+` or `-` in the tone's ink,
|
|
@@ -22901,7 +22904,7 @@ export type CustomElements = {
|
|
|
22901
22904
|
* - `block`: The scrolling `<pre>`.
|
|
22902
22905
|
* - `code`: The `<code>` inside it.
|
|
22903
22906
|
* - `context`: In a diff, a line both versions share.
|
|
22904
|
-
* - `copy`: The copy button.
|
|
22907
|
+
* - `copy`: The copy button: in the header where there is one, and otherwise beside the code.
|
|
22905
22908
|
* - `copy-button`: The inner button.
|
|
22906
22909
|
* - `copy-mark`: The clipboard glyph, and the confirmation that replaces it.
|
|
22907
22910
|
* - `copy-tooltip`: The bubble, forwarded from the tooltip inside.
|
|
@@ -22916,8 +22919,8 @@ export type CustomElements = {
|
|
|
22916
22919
|
* - `copy-tooltip-top`: The bubble while it is above the copy button, beside `copy-tooltip`.
|
|
22917
22920
|
* - `file`: In a diff, one file's header and block.
|
|
22918
22921
|
* - `filler`: In a split diff, the empty row opposite a line the other side does not have.
|
|
22919
|
-
* - `frame`: The code and the copy button beside it.
|
|
22920
|
-
* - `header`: The bar carrying the name, where there is
|
|
22922
|
+
* - `frame`: The code, and the copy button beside it where there is no header.
|
|
22923
|
+
* - `header`: The bar carrying the name and the copy button, where there is a name.
|
|
22921
22924
|
* - `hunk`: In a diff, a `@@` line saying where the lines under it are.
|
|
22922
22925
|
* - `label`: The file name or language, where one is given.
|
|
22923
22926
|
* - `marker`: In a diff, the `+`, `-` or space that opens a line.
|
|
@@ -41641,9 +41644,12 @@ export type CustomElementsSolidJs = {
|
|
|
41641
41644
|
>;
|
|
41642
41645
|
|
|
41643
41646
|
/**
|
|
41644
|
-
* The header sits above the code rather than floating on it
|
|
41645
|
-
*
|
|
41646
|
-
* of a snippet a reader is most
|
|
41647
|
+
* The header sits above the code rather than floating on it, and the copy
|
|
41648
|
+
* button stands at its end. Overlaid, which is the usual build, the button
|
|
41649
|
+
* covers the first line, which is the one line of a snippet a reader is most
|
|
41650
|
+
* likely to be reading. A block with no name has no header, and the button
|
|
41651
|
+
* stands beside the code in room the block keeps clear: an end gutter for code,
|
|
41652
|
+
* a band above the first hunk for a diff.
|
|
41647
41653
|
*
|
|
41648
41654
|
* A diff is drawn a block per file in the same frame, each changed line washed
|
|
41649
41655
|
* in its tone at Tag's resting strength with its `+` or `-` in the tone's ink,
|
|
@@ -41731,7 +41737,7 @@ export type CustomElementsSolidJs = {
|
|
|
41731
41737
|
* - `block`: The scrolling `<pre>`.
|
|
41732
41738
|
* - `code`: The `<code>` inside it.
|
|
41733
41739
|
* - `context`: In a diff, a line both versions share.
|
|
41734
|
-
* - `copy`: The copy button.
|
|
41740
|
+
* - `copy`: The copy button: in the header where there is one, and otherwise beside the code.
|
|
41735
41741
|
* - `copy-button`: The inner button.
|
|
41736
41742
|
* - `copy-mark`: The clipboard glyph, and the confirmation that replaces it.
|
|
41737
41743
|
* - `copy-tooltip`: The bubble, forwarded from the tooltip inside.
|
|
@@ -41746,8 +41752,8 @@ export type CustomElementsSolidJs = {
|
|
|
41746
41752
|
* - `copy-tooltip-top`: The bubble while it is above the copy button, beside `copy-tooltip`.
|
|
41747
41753
|
* - `file`: In a diff, one file's header and block.
|
|
41748
41754
|
* - `filler`: In a split diff, the empty row opposite a line the other side does not have.
|
|
41749
|
-
* - `frame`: The code and the copy button beside it.
|
|
41750
|
-
* - `header`: The bar carrying the name, where there is
|
|
41755
|
+
* - `frame`: The code, and the copy button beside it where there is no header.
|
|
41756
|
+
* - `header`: The bar carrying the name and the copy button, where there is a name.
|
|
41751
41757
|
* - `hunk`: In a diff, a `@@` line saying where the lines under it are.
|
|
41752
41758
|
* - `label`: The file name or language, where one is given.
|
|
41753
41759
|
* - `marker`: In a diff, the `+`, `-` or space that opens a line.
|
package/types/vue.d.ts
CHANGED
|
@@ -11305,7 +11305,7 @@ export interface WcToolkitVueGlobalComponents {
|
|
|
11305
11305
|
HelixCheckboxVueProps,
|
|
11306
11306
|
HelixCheckboxVueEvents
|
|
11307
11307
|
>;
|
|
11308
|
-
/** The header sits above the code rather than floating on it. Overlaid, which is the usual build, the
|
|
11308
|
+
/** The header sits above the code rather than floating on it, and the copy button stands at its end. Overlaid, which is the usual build, the button covers the first line, which is the one line of a snippet a reader is most likely to be reading. A block with no name has no header, and the button stands beside the code in room the block keeps clear: an end gutter for code, a band above the first hunk for a diff. A diff is drawn a block per file in the same frame, each changed line washed in its tone at Tag's resting strength with its '+' or '-' in the tone's ink, so the change does not rest on telling two pale grounds apart. A split diff stacks its two versions below about 40rem of the file's own width. */
|
|
11309
11309
|
"helix-code-block": DefineCustomElement<
|
|
11310
11310
|
HelixCodeBlock,
|
|
11311
11311
|
HelixCodeBlockVueProps,
|