@fusion.dev/helix 0.103.3 → 0.104.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/custom-elements.json +10516 -753
- package/dist/announcement/root/announcement-root.js +2 -1
- package/dist/canvas/edge/canvas-edge.d.ts +24 -0
- package/dist/canvas/edge/canvas-edge.js +20 -0
- package/dist/canvas/index.d.ts +5 -0
- package/dist/canvas/index.js +4 -0
- package/dist/canvas/node/canvas-node.css.d.ts +1 -0
- package/dist/canvas/node/canvas-node.css.js +360 -0
- package/dist/canvas/node/canvas-node.d.ts +53 -0
- package/dist/canvas/node/canvas-node.js +23 -0
- package/dist/canvas/root/canvas-root.css.d.ts +1 -0
- package/dist/canvas/root/canvas-root.css.js +268 -0
- package/dist/canvas/root/canvas-root.d.ts +63 -0
- package/dist/canvas/root/canvas-root.js +25 -0
- package/dist/chat/root/chat-root.css.js +4 -10
- package/dist/chat/root/chat-root.js +2 -1
- package/dist/data-table/root/data-table-root.d.ts +1 -0
- package/dist/data-table/root/data-table-root.js +2 -1
- package/dist/drilldown/root/drilldown-root.js +2 -1
- package/dist/element-events.generated.js +15 -0
- package/dist/empty/root/empty-root.js +2 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/lightbox/root/lightbox-root.css.js +4 -9
- package/dist/lightbox/root/lightbox-root.js +2 -1
- package/dist/listbox/root/listbox-root.js +2 -0
- package/dist/map/root/map-root.css.js +2 -102
- package/dist/map/root/map-root.d.ts +2 -2
- package/dist/map/root/map-root.js +2 -1
- package/dist/menu/root/menu-root.js +2 -0
- package/dist/notifications/root/notifications-root.d.ts +1 -0
- package/dist/notifications/root/notifications-root.js +2 -1
- package/dist/pagination/root/pagination-root.css.js +0 -9
- package/dist/pagination/root/pagination-root.js +2 -1
- package/dist/sandbox/root/sandbox-root.d.ts +16 -1
- package/dist/sandbox/root/sandbox-root.js +13 -5
- package/dist/shared/live/live.css.d.ts +1 -0
- package/dist/shared/live/live.css.js +9 -0
- package/dist/shared/viewport/viewport.css.d.ts +1 -0
- package/dist/shared/viewport/viewport.css.js +106 -0
- package/dist/table/root/table-root.d.ts +1 -0
- package/dist/table/root/table-root.js +2 -1
- package/dist/tree/root/tree-root.d.ts +1 -0
- package/dist/tree/root/tree-root.js +2 -1
- package/dist/video/root/video-root.js +2 -1
- package/package.json +6 -6
- package/types/jsx.d.ts +5408 -746
- package/types/svelte.d.ts +3 -0
- package/types/vue.d.ts +1653 -209
|
@@ -7,9 +7,10 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
import { customElement } from '@fusion.dev/helix-core';
|
|
8
8
|
import { HelixHeadlessAnnouncement } from '@fusion.dev/helix-headless/announcement';
|
|
9
9
|
import { property } from 'lit/decorators.js';
|
|
10
|
+
import { styles as liveStyles } from '../../shared/live/live.css.js';
|
|
10
11
|
import { styles } from './announcement-root.css.js';
|
|
11
12
|
let HelixAnnouncement = class HelixAnnouncement extends HelixHeadlessAnnouncement {
|
|
12
|
-
static { this.styles = styles; }
|
|
13
|
+
static { this.styles = [liveStyles, styles]; }
|
|
13
14
|
};
|
|
14
15
|
__decorate([
|
|
15
16
|
property({ reflect: true })
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { HelixHeadlessCanvasEdge } from '@fusion.dev/helix-headless/canvas';
|
|
2
|
+
import { type CSSResultGroup } from 'lit';
|
|
3
|
+
/**
|
|
4
|
+
* @summary A connector between two cards on a canvas.
|
|
5
|
+
*
|
|
6
|
+
* @description
|
|
7
|
+
* Draws nothing and takes no room: the board draws every connector into one
|
|
8
|
+
* layer under the cards, which is the only place a line between two of them can
|
|
9
|
+
* be drawn. What this element carries is which cards and which sides.
|
|
10
|
+
*
|
|
11
|
+
* @since 0.100.0
|
|
12
|
+
* @status experimental
|
|
13
|
+
* @category media
|
|
14
|
+
* @aliases CanvasConnector, BoardEdge
|
|
15
|
+
* @documentation https://fusion.dev/helix/components/canvas
|
|
16
|
+
*/
|
|
17
|
+
export declare class HelixCanvasEdge extends HelixHeadlessCanvasEdge {
|
|
18
|
+
static styles: CSSResultGroup;
|
|
19
|
+
}
|
|
20
|
+
declare global {
|
|
21
|
+
interface HTMLElementTagNameMap {
|
|
22
|
+
'helix-canvas-edge': HelixCanvasEdge;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { customElement } from '@fusion.dev/helix-core';
|
|
8
|
+
import { HelixHeadlessCanvasEdge } from '@fusion.dev/helix-headless/canvas';
|
|
9
|
+
import { css } from 'lit';
|
|
10
|
+
let HelixCanvasEdge = class HelixCanvasEdge extends HelixHeadlessCanvasEdge {
|
|
11
|
+
static { this.styles = css `
|
|
12
|
+
:host {
|
|
13
|
+
display: none;
|
|
14
|
+
}
|
|
15
|
+
`; }
|
|
16
|
+
};
|
|
17
|
+
HelixCanvasEdge = __decorate([
|
|
18
|
+
customElement('helix-canvas-edge')
|
|
19
|
+
], HelixCanvasEdge);
|
|
20
|
+
export { HelixCanvasEdge };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export type { CanvasDocument, CanvasEdge, CanvasEdgeProps, CanvasEnd, CanvasNode, CanvasNodeProps, CanvasPath, CanvasSide, CanvasTone, } from '@fusion.dev/helix-headless/canvas';
|
|
2
|
+
export { fromJsonCanvas } from '@fusion.dev/helix-headless/canvas';
|
|
3
|
+
export { HelixCanvasEdge } from './edge/canvas-edge.js';
|
|
4
|
+
export { HelixCanvasNode } from './node/canvas-node.js';
|
|
5
|
+
export { HelixCanvas } from './root/canvas-root.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const styles: import("lit").CSSResult;
|
|
@@ -0,0 +1,360 @@
|
|
|
1
|
+
import { createSheet } from '@fusion.dev/helix-core';
|
|
2
|
+
export const styles = createSheet(`:host {
|
|
3
|
+
|
|
4
|
+
--_canvas-card-x: 0px;
|
|
5
|
+
--_canvas-card-y: 0px;
|
|
6
|
+
--_canvas-card-inline-size: auto;
|
|
7
|
+
--_canvas-card-block-size: auto;
|
|
8
|
+
|
|
9
|
+
--_canvas-card-tone: var(--helix-color-border);
|
|
10
|
+
--_canvas-card-color: var(--canvas-node-color, var(--_canvas-card-tone));
|
|
11
|
+
|
|
12
|
+
--_canvas-handle-color: var(--_canvas-card-color);
|
|
13
|
+
|
|
14
|
+
background-color: var(--canvas-node-background-color, var(--helix-color-surface));
|
|
15
|
+
block-size: var(--_canvas-card-block-size);
|
|
16
|
+
box-shadow: var(--canvas-node-shadow, none);
|
|
17
|
+
border: var(--helix-border-thin) solid var(--_canvas-card-color);
|
|
18
|
+
border-radius: var(--helix-radii-sm);
|
|
19
|
+
box-sizing: border-box;
|
|
20
|
+
color: var(--helix-color-foreground);
|
|
21
|
+
display: block;
|
|
22
|
+
font-family: var(--helix-font-sans);
|
|
23
|
+
font-size: var(--helix-text-sm);
|
|
24
|
+
inline-size: var(--_canvas-card-inline-size);
|
|
25
|
+
inset-block-start: var(--_canvas-card-y);
|
|
26
|
+
inset-inline-start: var(--_canvas-card-x);
|
|
27
|
+
|
|
28
|
+
overflow: visible;
|
|
29
|
+
position: absolute;
|
|
30
|
+
z-index: 1;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
:host([group]) {
|
|
34
|
+
background-color: color-mix(in oklab, var(--helix-color-foreground) 4%, transparent);
|
|
35
|
+
border-style: dashed;
|
|
36
|
+
|
|
37
|
+
overflow: visible;
|
|
38
|
+
z-index: 0;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
:host([tone="accent"]) {
|
|
42
|
+
--_canvas-card-tone: var(--helix-color-accent);
|
|
43
|
+
}
|
|
44
|
+
:host([tone="danger"]) {
|
|
45
|
+
--_canvas-card-tone: var(--helix-color-danger);
|
|
46
|
+
}
|
|
47
|
+
:host([tone="info"]) {
|
|
48
|
+
--_canvas-card-tone: var(--helix-color-info);
|
|
49
|
+
}
|
|
50
|
+
:host([tone="primary"]) {
|
|
51
|
+
--_canvas-card-tone: var(--helix-color-primary);
|
|
52
|
+
}
|
|
53
|
+
:host([tone="success"]) {
|
|
54
|
+
--_canvas-card-tone: var(--helix-color-success);
|
|
55
|
+
}
|
|
56
|
+
:host([tone="warning"]) {
|
|
57
|
+
--_canvas-card-tone: var(--helix-color-warning);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
:host(:not([tone])),
|
|
61
|
+
:host([tone="neutral"]) {
|
|
62
|
+
--_canvas-handle-color: var(--canvas-node-color, var(--helix-color-foreground-muted));
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
:host(:state(selected)),
|
|
66
|
+
:host(:state(target)) {
|
|
67
|
+
--_canvas-handle-color: var(--helix-color-accent);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
:host([separation="filled"]:not([group])) {
|
|
71
|
+
background-color: color-mix(in oklab, var(--_canvas-card-color) 16%, var(--helix-color-surface));
|
|
72
|
+
border-color: transparent;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
:host([separation="elevated"]:not([group])) {
|
|
76
|
+
--canvas-node-shadow: var(--helix-shadow-md);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
:host([separation="plain"]:not([group])) {
|
|
80
|
+
background-color: transparent;
|
|
81
|
+
border-color: transparent;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
:host([material="glass"]:not([group])) {
|
|
85
|
+
backdrop-filter: var(--helix-material-backdrop);
|
|
86
|
+
background-color: var(--helix-material-translucent);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
:host([material="frosted"]:not([group])) {
|
|
90
|
+
backdrop-filter: blur(var(--helix-material-blur-lg));
|
|
91
|
+
background-color: var(--helix-material-translucent-strong);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
:host([material="transparent"]:not([group])) {
|
|
95
|
+
backdrop-filter: none;
|
|
96
|
+
background-color: transparent;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
[part="node"] {
|
|
100
|
+
block-size: 100%;
|
|
101
|
+
border-radius: inherit;
|
|
102
|
+
box-sizing: border-box;
|
|
103
|
+
display: flex;
|
|
104
|
+
flex-direction: column;
|
|
105
|
+
gap: var(--helix-space-2xs);
|
|
106
|
+
justify-content: center;
|
|
107
|
+
overflow: hidden;
|
|
108
|
+
padding: var(--canvas-node-padding, var(--helix-space-sm));
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
[part="node"]:focus-visible {
|
|
112
|
+
outline: var(--helix-size-focus-ring) solid var(--helix-color-focus-ring);
|
|
113
|
+
outline-offset: calc(var(--helix-size-focus-offset) * -1);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
:host([group]) [part="node"]::before {
|
|
117
|
+
color: var(--helix-color-foreground-muted);
|
|
118
|
+
content: attr(aria-label);
|
|
119
|
+
font-size: var(--helix-text-xs);
|
|
120
|
+
inset-block-end: 100%;
|
|
121
|
+
inset-inline-start: 0;
|
|
122
|
+
padding-block-end: var(--helix-space-2xs);
|
|
123
|
+
position: absolute;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
:host([group]) [part="node"] {
|
|
127
|
+
display: block;
|
|
128
|
+
overflow: visible;
|
|
129
|
+
position: relative;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
[part~="handle"] {
|
|
133
|
+
background-color: var(--helix-color-surface);
|
|
134
|
+
block-size: var(--canvas-handle-size, 0.625rem);
|
|
135
|
+
border: var(--helix-border-thick) solid var(--_canvas-handle-color);
|
|
136
|
+
border-radius: var(--helix-radii-full);
|
|
137
|
+
box-sizing: border-box;
|
|
138
|
+
cursor: crosshair;
|
|
139
|
+
inline-size: var(--canvas-handle-size, 0.625rem);
|
|
140
|
+
opacity: 0;
|
|
141
|
+
position: absolute;
|
|
142
|
+
transform: translate(-50%, -50%);
|
|
143
|
+
transition: opacity var(--helix-duration-fast) var(--helix-easing-standard);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
[part~="handle"]::after {
|
|
147
|
+
content: "";
|
|
148
|
+
inset: calc(var(--helix-space-sm) * -1);
|
|
149
|
+
position: absolute;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
:host(:hover) [part~="handle"],
|
|
153
|
+
:host(:focus-within) [part~="handle"],
|
|
154
|
+
:host(:state(candidate)) [part~="handle"] {
|
|
155
|
+
opacity: 1;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
:host(:state(selected)) {
|
|
159
|
+
outline: var(--helix-border-thick) solid var(--helix-color-accent);
|
|
160
|
+
outline-offset: calc(var(--helix-border-thin) * -1);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
:host(:state(target)) {
|
|
164
|
+
box-shadow: 0 0 0 var(--helix-border-thick) var(--helix-color-accent);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
:host(:state(target)) [part~="handle"] {
|
|
168
|
+
background-color: var(--_canvas-handle-color);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
@media (prefers-reduced-motion: reduce) {
|
|
172
|
+
[part~="handle"],
|
|
173
|
+
[part~="move"] {
|
|
174
|
+
transition: none;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
[part~="handle-top"] {
|
|
179
|
+
left: 50%;
|
|
180
|
+
top: 0;
|
|
181
|
+
}
|
|
182
|
+
[part~="handle-right"] {
|
|
183
|
+
left: 100%;
|
|
184
|
+
top: 50%;
|
|
185
|
+
}
|
|
186
|
+
[part~="handle-bottom"] {
|
|
187
|
+
left: 50%;
|
|
188
|
+
top: 100%;
|
|
189
|
+
}
|
|
190
|
+
[part~="handle-left"] {
|
|
191
|
+
left: 0;
|
|
192
|
+
top: 50%;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
::slotted([slot="description"]) {
|
|
196
|
+
color: var(--helix-color-foreground-subtle);
|
|
197
|
+
font-size: var(--helix-text-xs);
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
:host(:not([style*="--_canvas-card-x"])) {
|
|
201
|
+
position: static;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
[part~="grip"] {
|
|
205
|
+
background-color: var(--helix-color-surface);
|
|
206
|
+
block-size: var(--canvas-grip-size, 0.5rem);
|
|
207
|
+
border: var(--helix-border-thin) solid var(--helix-color-accent);
|
|
208
|
+
box-sizing: border-box;
|
|
209
|
+
inline-size: var(--canvas-grip-size, 0.5rem);
|
|
210
|
+
position: absolute;
|
|
211
|
+
transform: translate(-50%, -50%);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
[part~="grip"]::after {
|
|
215
|
+
content: "";
|
|
216
|
+
inset: calc(var(--helix-space-2xs) * -1);
|
|
217
|
+
position: absolute;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
[part~="grip-top-left"] {
|
|
221
|
+
cursor: nwse-resize;
|
|
222
|
+
left: 0;
|
|
223
|
+
top: 0;
|
|
224
|
+
}
|
|
225
|
+
[part~="grip-top-right"] {
|
|
226
|
+
cursor: nesw-resize;
|
|
227
|
+
left: 100%;
|
|
228
|
+
top: 0;
|
|
229
|
+
}
|
|
230
|
+
[part~="grip-bottom-right"] {
|
|
231
|
+
cursor: nwse-resize;
|
|
232
|
+
left: 100%;
|
|
233
|
+
top: 100%;
|
|
234
|
+
}
|
|
235
|
+
[part~="grip-bottom-left"] {
|
|
236
|
+
cursor: nesw-resize;
|
|
237
|
+
left: 0;
|
|
238
|
+
top: 100%;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
[part~="move"] {
|
|
242
|
+
background-image: radial-gradient(circle, currentColor 1px, transparent 1.25px);
|
|
243
|
+
background-size: 50% calc(100% / 3);
|
|
244
|
+
block-size: var(--canvas-move-block-size, 0.75rem);
|
|
245
|
+
color: var(--helix-color-foreground-subtle);
|
|
246
|
+
cursor: move;
|
|
247
|
+
inline-size: var(--canvas-move-inline-size, 0.5rem);
|
|
248
|
+
inset-block-start: var(--canvas-move-inset, var(--helix-space-xs));
|
|
249
|
+
inset-inline-start: var(--canvas-move-inset, var(--helix-space-xs));
|
|
250
|
+
opacity: 0;
|
|
251
|
+
position: absolute;
|
|
252
|
+
transition: opacity var(--helix-duration-fast) var(--helix-easing-standard);
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
[part~="move"]::after {
|
|
256
|
+
content: "";
|
|
257
|
+
inset: calc((1.5rem - 100%) / -2);
|
|
258
|
+
position: absolute;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
:host(:hover) [part~="move"],
|
|
262
|
+
:host(:focus-within) [part~="move"] {
|
|
263
|
+
opacity: 1;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
[part~="move"]:hover {
|
|
267
|
+
color: var(--helix-color-accent);
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
:host([shape="pill"]) [part~="move"],
|
|
271
|
+
:host([shape="circle"]) [part~="move"],
|
|
272
|
+
:host([shape="diamond"]) [part~="move"] {
|
|
273
|
+
inset-block-start: calc(var(--canvas-move-inset, var(--helix-space-xs)) * 2);
|
|
274
|
+
inset-inline: 0;
|
|
275
|
+
margin-inline: auto;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
:host([shape="square"]:not([group])) {
|
|
279
|
+
border-radius: 0;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
:host([shape="pill"]:not([group])) {
|
|
283
|
+
border-radius: var(--helix-radii-full);
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
:host([shape="circle"]:not([group])) {
|
|
287
|
+
border-radius: 50%;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
:host([shape="pill"]:not([group])) [part="node"],
|
|
291
|
+
:host([shape="circle"]:not([group])) [part="node"] {
|
|
292
|
+
align-items: center;
|
|
293
|
+
padding-inline: 15%;
|
|
294
|
+
text-align: center;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
:host([shape="diamond"]:not([group])) {
|
|
298
|
+
|
|
299
|
+
backdrop-filter: none;
|
|
300
|
+
background-color: transparent;
|
|
301
|
+
border-color: transparent;
|
|
302
|
+
--canvas-node-shadow: none;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
[part="outline"] {
|
|
306
|
+
block-size: calc(100% + var(--helix-border-thin) * 2);
|
|
307
|
+
inline-size: calc(100% + var(--helix-border-thin) * 2);
|
|
308
|
+
left: calc(var(--helix-border-thin) * -1);
|
|
309
|
+
overflow: visible;
|
|
310
|
+
pointer-events: none;
|
|
311
|
+
position: absolute;
|
|
312
|
+
top: calc(var(--helix-border-thin) * -1);
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
[part="outline"] polygon {
|
|
316
|
+
fill: var(--canvas-node-background-color, var(--helix-color-surface));
|
|
317
|
+
stroke: var(--_canvas-card-color);
|
|
318
|
+
stroke-width: var(--helix-border-thin);
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
:host([shape="diamond"][material="glass"]) [part="outline"] polygon {
|
|
322
|
+
fill: var(--helix-material-translucent);
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
:host([shape="diamond"][material="frosted"]) [part="outline"] polygon {
|
|
326
|
+
fill: var(--helix-material-translucent-strong);
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
:host([shape="diamond"][material="transparent"]) [part="outline"] polygon {
|
|
330
|
+
fill: transparent;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
:host([shape="diamond"][separation="filled"]) [part="outline"] polygon {
|
|
334
|
+
fill: color-mix(in oklab, var(--_canvas-card-color) 16%, var(--helix-color-surface));
|
|
335
|
+
stroke: transparent;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
:host([shape="diamond"][separation="plain"]) [part="outline"] polygon {
|
|
339
|
+
fill: transparent;
|
|
340
|
+
stroke: transparent;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
:host([shape="diamond"]:state(selected)),
|
|
344
|
+
:host([shape="diamond"]:state(target)) {
|
|
345
|
+
box-shadow: none;
|
|
346
|
+
outline: none;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
:host([shape="diamond"]:state(selected)) [part="outline"] polygon,
|
|
350
|
+
:host([shape="diamond"]:state(target)) [part="outline"] polygon {
|
|
351
|
+
stroke: var(--helix-color-accent);
|
|
352
|
+
stroke-width: var(--helix-border-thick);
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
:host([shape="diamond"]:not([group])) [part="node"] {
|
|
356
|
+
align-items: center;
|
|
357
|
+
padding-inline: 22%;
|
|
358
|
+
position: relative;
|
|
359
|
+
text-align: center;
|
|
360
|
+
}`);
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { HelixHeadlessCanvasNode } from '@fusion.dev/helix-headless/canvas';
|
|
2
|
+
import type { CSSResultGroup } from 'lit';
|
|
3
|
+
/**
|
|
4
|
+
* @summary One card or group on a canvas.
|
|
5
|
+
*
|
|
6
|
+
* @description
|
|
7
|
+
* The card is the host, because the board places the host: its coordinates are
|
|
8
|
+
* written onto this element, so a wrapper inside would have to be told the same
|
|
9
|
+
* things twice.
|
|
10
|
+
*
|
|
11
|
+
* **Before it is placed it is a card in the flow**, which is what a page
|
|
12
|
+
* without JavaScript has: the text somebody wrote, in the order they wrote it,
|
|
13
|
+
* rather than a heap at the origin.
|
|
14
|
+
*
|
|
15
|
+
* @since 0.100.0
|
|
16
|
+
* @status experimental
|
|
17
|
+
* @category media
|
|
18
|
+
* @aliases CanvasCard, BoardNode
|
|
19
|
+
* @documentation https://fusion.dev/helix/components/canvas
|
|
20
|
+
*
|
|
21
|
+
* @cssproperty --canvas-grip-size - How large the corners a selected card is resized from are.
|
|
22
|
+
* @cssproperty --canvas-handle-size - How large the points a connection is drawn from are.
|
|
23
|
+
* @cssproperty --canvas-move-block-size - How tall the grip a selected card is moved by is.
|
|
24
|
+
* @cssproperty --canvas-move-inline-size - How wide the grip a selected card is moved by is.
|
|
25
|
+
* @cssproperty --canvas-move-inset - How far in from the card's corner that grip sits.
|
|
26
|
+
* @cssproperty --canvas-node-background-color - The ground the card is drawn on.
|
|
27
|
+
* @cssproperty --canvas-node-color - A color with no meaning, where a tone will not do: a hex a document chose.
|
|
28
|
+
* @cssproperty --canvas-node-padding - Space between the card's edge and what it holds.
|
|
29
|
+
* @cssproperty --canvas-node-shadow - The lift under the card, which `separation="elevated"` sets.
|
|
30
|
+
*/
|
|
31
|
+
export declare class HelixCanvasNode extends HelixHeadlessCanvasNode {
|
|
32
|
+
/**
|
|
33
|
+
* What the card's ground is made of: `glass` or `frosted`, which let the
|
|
34
|
+
* board's ruling show through, or `transparent`.
|
|
35
|
+
*
|
|
36
|
+
* Absent is an opaque surface, a resting value being an attribute's absence.
|
|
37
|
+
*/
|
|
38
|
+
material?: 'frosted' | 'glass' | 'transparent';
|
|
39
|
+
/**
|
|
40
|
+
* How the card stands off the board.
|
|
41
|
+
*
|
|
42
|
+
* Outlined is where it rests, a surface with its color as the edge. `filled`
|
|
43
|
+
* puts the color into the ground, `elevated` lifts it and keeps the edge, and
|
|
44
|
+
* `plain` draws no box, for a label sitting on the board.
|
|
45
|
+
*/
|
|
46
|
+
separation?: 'elevated' | 'filled' | 'outlined' | 'plain';
|
|
47
|
+
static styles: CSSResultGroup;
|
|
48
|
+
}
|
|
49
|
+
declare global {
|
|
50
|
+
interface HTMLElementTagNameMap {
|
|
51
|
+
'helix-canvas-node': HelixCanvasNode;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { customElement } from '@fusion.dev/helix-core';
|
|
8
|
+
import { HelixHeadlessCanvasNode } from '@fusion.dev/helix-headless/canvas';
|
|
9
|
+
import { property } from 'lit/decorators.js';
|
|
10
|
+
import { styles } from './canvas-node.css.js';
|
|
11
|
+
let HelixCanvasNode = class HelixCanvasNode extends HelixHeadlessCanvasNode {
|
|
12
|
+
static { this.styles = styles; }
|
|
13
|
+
};
|
|
14
|
+
__decorate([
|
|
15
|
+
property({ reflect: true })
|
|
16
|
+
], HelixCanvasNode.prototype, "material", void 0);
|
|
17
|
+
__decorate([
|
|
18
|
+
property({ reflect: true })
|
|
19
|
+
], HelixCanvasNode.prototype, "separation", void 0);
|
|
20
|
+
HelixCanvasNode = __decorate([
|
|
21
|
+
customElement('helix-canvas-node')
|
|
22
|
+
], HelixCanvasNode);
|
|
23
|
+
export { HelixCanvasNode };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const styles: import("lit").CSSResult;
|