@threadlabs/looma 0.2.20 → 0.3.0
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/{chunk-A5MSXQ7Y.js → chunk-3NVMCHGR.js} +2225 -1255
- package/dist/chunk-XDNZIKNI.js +2721 -0
- package/dist/declarative-generated.cjs +93 -79
- package/dist/declarative-generated.d.cts +7 -1
- package/dist/declarative-generated.d.ts +7 -1
- package/dist/declarative-generated.js +91 -78
- package/dist/declarative.cjs +1499 -1702
- package/dist/declarative.d.cts +77 -3
- package/dist/declarative.d.ts +77 -3
- package/dist/declarative.js +5 -3
- package/dist/index.cjs +3732 -3025
- package/dist/index.d.cts +211 -35
- package/dist/index.d.ts +211 -35
- package/dist/index.js +6 -61
- package/dist/loader.cjs +3725 -2962
- package/dist/loader.js +2 -2
- package/editor/{chunk-VAXI7Q6T.js → chunk-U36XNFJN.js} +105 -77
- package/editor/extensions/index.d.ts +272 -27
- package/editor/index.d.ts +1 -1
- package/editor/index.js +1 -1
- package/editor/{table-overlay-DoiLie4h.d.ts → table-overlay-DZFGHQDt.d.ts} +48 -6
- package/editor/ui.d.ts +15 -11
- package/editor/ui.js +1 -1
- package/layout/index.cjs +197 -340
- package/layout/index.d.cts +11 -0
- package/layout/index.d.ts +11 -0
- package/layout/index.js +197 -340
- package/layout.css +31 -134
- package/package.json +24 -11
- package/react/index.d.ts +1276 -0
- package/react/index.js +1526 -0
- package/styles.css +5 -10
- package/svelte/index.d.ts +204 -0
- package/svelte/index.js +1881 -0
- package/theme-dark.css +81 -2
- package/theme-high-contrast.css +14 -0
- package/theme-light.css +30 -1
- package/tokens.css +45 -1
- package/vue/chunk-UZMTYDP6.js +4355 -0
- package/vue/editor/index.d.ts +78 -8
- package/vue/editor/index.js +54 -49
- package/vue/index.d.ts +67 -78
- package/vue/index.js +3 -9
- package/dist/chunk-ECJQ4YGC.js +0 -2925
- package/dist/valibot.cjs +0 -31
- package/dist/valibot.d.cts +0 -10
- package/dist/valibot.d.ts +0 -10
- package/dist/valibot.js +0 -9
- package/dist/validation-bxcou-l-.d.cts +0 -58
- package/dist/validation-bxcou-l-.d.ts +0 -58
- package/vue/chunk-P7BZ2KJZ.js +0 -3559
package/layout.css
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
/*
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
:where(ui-stack, ui-
|
|
1
|
+
/*
|
|
2
|
+
* Keep the box model outside `@layer components`: these are composition
|
|
3
|
+
* guarantees for authored light-DOM children, not themeable component styles.
|
|
4
|
+
*/
|
|
5
|
+
:where(ui-stack, ui-cluster, ui-grid, ui-container, ui-switcher, ui-sidebar, ui-reel, ui-separator),
|
|
6
|
+
:where(ui-stack, ui-cluster, ui-grid, ui-container, ui-switcher, ui-sidebar, ui-reel, ui-separator) *,
|
|
7
|
+
:where(ui-stack, ui-cluster, ui-grid, ui-container, ui-switcher, ui-sidebar, ui-reel, ui-separator) *::before,
|
|
8
|
+
:where(ui-stack, ui-cluster, ui-grid, ui-container, ui-switcher, ui-sidebar, ui-reel, ui-separator) *::after {
|
|
6
9
|
box-sizing: border-box;
|
|
7
10
|
}
|
|
8
11
|
|
|
9
|
-
:where(ui-stack, ui-
|
|
10
|
-
/*
|
|
12
|
+
:where(ui-stack, ui-cluster, ui-grid, ui-container, ui-switcher, ui-sidebar, ui-reel, ui-separator) {
|
|
13
|
+
/* `revert-layer` exposes `@layer components`; `revert` would skip the author layer entirely. */
|
|
11
14
|
all: revert-layer;
|
|
12
15
|
box-sizing: border-box;
|
|
13
16
|
font-family: var(--ui-font-family-sans);
|
|
@@ -16,7 +19,8 @@
|
|
|
16
19
|
color: var(--ui-text-primary);
|
|
17
20
|
}
|
|
18
21
|
|
|
19
|
-
:where(ui-stack, ui-
|
|
22
|
+
:where(ui-stack, ui-cluster, ui-grid, ui-container, ui-switcher, ui-sidebar, ui-reel, ui-separator)[data-ui-inherit-typography] {
|
|
23
|
+
/* Consumers opt into surrounding prose styles; isolated component defaults remain the safe default. */
|
|
20
24
|
font-family: inherit;
|
|
21
25
|
font-size: inherit;
|
|
22
26
|
line-height: inherit;
|
|
@@ -31,7 +35,7 @@
|
|
|
31
35
|
}
|
|
32
36
|
|
|
33
37
|
@layer components {
|
|
34
|
-
:where(ui-stack, ui-
|
|
38
|
+
:where(ui-stack, ui-cluster, ui-grid, ui-container, ui-switcher, ui-sidebar, ui-reel, ui-separator) {
|
|
35
39
|
min-inline-size: 0;
|
|
36
40
|
max-inline-size: 100%;
|
|
37
41
|
margin: 0;
|
|
@@ -60,29 +64,28 @@
|
|
|
60
64
|
ui-stack[justify="end"] { --ui-layout-justify: flex-end; }
|
|
61
65
|
ui-stack[justify="between"] { --ui-layout-justify: space-between; }
|
|
62
66
|
|
|
63
|
-
ui-inline,
|
|
64
67
|
ui-cluster {
|
|
65
68
|
--ui-layout-gap: var(--ui-space-3, 0.75rem);
|
|
66
69
|
--ui-layout-align: center;
|
|
67
|
-
--ui-layout-justify: flex-start;
|
|
68
70
|
display: flex;
|
|
69
71
|
flex-wrap: wrap;
|
|
70
72
|
align-items: var(--ui-layout-align);
|
|
71
|
-
justify-content: var(--ui-layout-justify);
|
|
72
73
|
gap: var(--ui-layout-gap);
|
|
73
74
|
}
|
|
74
75
|
|
|
75
|
-
ui-inline[wrap="nowrap"] { flex-wrap: nowrap; }
|
|
76
|
-
ui-inline[gap="xs"],
|
|
77
76
|
ui-cluster[gap="xs"] { --ui-layout-gap: var(--ui-space-2, 0.5rem); }
|
|
78
|
-
ui-inline[gap="s"],
|
|
79
77
|
ui-cluster[gap="s"] { --ui-layout-gap: var(--ui-space-3, 0.75rem); }
|
|
80
|
-
ui-inline[gap="m"],
|
|
81
78
|
ui-cluster[gap="m"] { --ui-layout-gap: var(--ui-space-4, 1rem); }
|
|
79
|
+
ui-cluster[gap="l"] { --ui-layout-gap: var(--ui-space-5, 1.5rem); }
|
|
80
|
+
ui-cluster[gap="xl"] { --ui-layout-gap: var(--ui-space-6, 2rem); }
|
|
81
|
+
ui-cluster[align="start"] { --ui-layout-align: flex-start; }
|
|
82
|
+
ui-cluster[align="center"] { --ui-layout-align: center; }
|
|
83
|
+
ui-cluster[align="end"] { --ui-layout-align: flex-end; }
|
|
84
|
+
ui-cluster[align="stretch"] { --ui-layout-align: stretch; }
|
|
82
85
|
|
|
83
86
|
ui-grid {
|
|
84
87
|
--ui-grid-gap: var(--ui-space-4, 1rem);
|
|
85
|
-
--ui-grid-min:
|
|
88
|
+
--ui-grid-min: 12rem;
|
|
86
89
|
display: grid;
|
|
87
90
|
gap: var(--ui-grid-gap);
|
|
88
91
|
grid-template-columns: repeat(auto-fit, minmax(min(var(--ui-grid-min), 100%), 1fr));
|
|
@@ -96,21 +99,21 @@
|
|
|
96
99
|
ui-grid[min="md"] { --ui-grid-min: 16rem; }
|
|
97
100
|
ui-grid[min="lg"] { --ui-grid-min: 20rem; }
|
|
98
101
|
|
|
99
|
-
ui-
|
|
100
|
-
--ui-
|
|
101
|
-
--ui-
|
|
102
|
+
ui-container {
|
|
103
|
+
--ui-container-measure: 65ch;
|
|
104
|
+
--ui-container-gutters: var(--ui-space-4, 1rem);
|
|
102
105
|
display: block;
|
|
103
106
|
inline-size: 100%;
|
|
104
|
-
max-inline-size: var(--ui-
|
|
107
|
+
max-inline-size: var(--ui-container-measure);
|
|
105
108
|
margin-inline: auto;
|
|
106
|
-
padding-inline: var(--ui-
|
|
109
|
+
padding-inline: var(--ui-container-gutters);
|
|
107
110
|
}
|
|
108
111
|
|
|
109
|
-
ui-
|
|
110
|
-
ui-
|
|
111
|
-
ui-
|
|
112
|
-
ui-
|
|
113
|
-
ui-
|
|
112
|
+
ui-container[measure="narrow"] { --ui-container-measure: 45ch; }
|
|
113
|
+
ui-container[measure="wide"] { --ui-container-measure: 80ch; }
|
|
114
|
+
ui-container[gutters="s"] { --ui-container-gutters: var(--ui-space-3, 0.75rem); }
|
|
115
|
+
ui-container[gutters="m"] { --ui-container-gutters: var(--ui-space-4, 1rem); }
|
|
116
|
+
ui-container[gutters="l"] { --ui-container-gutters: var(--ui-space-5, 1.5rem); }
|
|
114
117
|
|
|
115
118
|
ui-switcher {
|
|
116
119
|
--ui-switcher-gap: var(--ui-space-4, 1rem);
|
|
@@ -125,6 +128,7 @@
|
|
|
125
128
|
ui-switcher > * {
|
|
126
129
|
min-inline-size: 0;
|
|
127
130
|
flex-grow: 1;
|
|
131
|
+
/* The large multiplier makes the basis flip as a group at the intrinsic threshold. */
|
|
128
132
|
flex-basis: calc((var(--ui-switcher-threshold) - 100%) * 999);
|
|
129
133
|
}
|
|
130
134
|
|
|
@@ -140,113 +144,6 @@
|
|
|
140
144
|
ui-switcher[align="center"] { --ui-switcher-align: center; }
|
|
141
145
|
ui-switcher[align="end"] { --ui-switcher-align: flex-end; }
|
|
142
146
|
|
|
143
|
-
ui-sidebar {
|
|
144
|
-
--ui-sidebar-gap: var(--ui-space-4, 1rem);
|
|
145
|
-
--ui-sidebar-width: 18rem;
|
|
146
|
-
--ui-sidebar-content-min: 50%;
|
|
147
|
-
--ui-sidebar-align: stretch;
|
|
148
|
-
display: flex;
|
|
149
|
-
flex-wrap: wrap;
|
|
150
|
-
gap: var(--ui-sidebar-gap);
|
|
151
|
-
align-items: var(--ui-sidebar-align);
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
ui-sidebar > :not([data-ui-sidebar-resizer]) { min-inline-size: 0; }
|
|
155
|
-
ui-sidebar > :first-child {
|
|
156
|
-
flex-basis: var(--ui-sidebar-width);
|
|
157
|
-
flex-grow: 1;
|
|
158
|
-
}
|
|
159
|
-
ui-sidebar > :last-child:not([data-ui-sidebar-resizer]),
|
|
160
|
-
ui-sidebar[resizable] > :nth-last-child(2):not([data-ui-sidebar-resizer]) {
|
|
161
|
-
flex-basis: 0;
|
|
162
|
-
flex-grow: 999;
|
|
163
|
-
min-inline-size: min(var(--ui-sidebar-content-min), 100%);
|
|
164
|
-
}
|
|
165
|
-
ui-sidebar[side="end"] > :first-child {
|
|
166
|
-
flex-basis: 0;
|
|
167
|
-
flex-grow: 999;
|
|
168
|
-
min-inline-size: min(var(--ui-sidebar-content-min), 100%);
|
|
169
|
-
}
|
|
170
|
-
ui-sidebar[side="end"] > :last-child:not([data-ui-sidebar-resizer]),
|
|
171
|
-
ui-sidebar[side="end"][resizable] > :nth-last-child(2):not([data-ui-sidebar-resizer]) {
|
|
172
|
-
flex-basis: var(--ui-sidebar-width);
|
|
173
|
-
flex-grow: 1;
|
|
174
|
-
min-inline-size: 0;
|
|
175
|
-
}
|
|
176
|
-
ui-sidebar[gap="xs"] { --ui-sidebar-gap: var(--ui-space-2, 0.5rem); }
|
|
177
|
-
ui-sidebar[gap="s"] { --ui-sidebar-gap: var(--ui-space-3, 0.75rem); }
|
|
178
|
-
ui-sidebar[gap="m"] { --ui-sidebar-gap: var(--ui-space-4, 1rem); }
|
|
179
|
-
ui-sidebar[gap="l"] { --ui-sidebar-gap: var(--ui-space-5, 1.5rem); }
|
|
180
|
-
ui-sidebar[width="narrow"] { --ui-sidebar-width: 14rem; }
|
|
181
|
-
ui-sidebar[width="wide"] { --ui-sidebar-width: 24rem; }
|
|
182
|
-
ui-sidebar[align="start"] { --ui-sidebar-align: flex-start; }
|
|
183
|
-
ui-sidebar[align="center"] { --ui-sidebar-align: center; }
|
|
184
|
-
ui-sidebar[align="end"] { --ui-sidebar-align: flex-end; }
|
|
185
|
-
ui-sidebar[resizable] {
|
|
186
|
-
position: relative;
|
|
187
|
-
flex-wrap: nowrap;
|
|
188
|
-
}
|
|
189
|
-
ui-sidebar[resizable] > :first-child:not([data-ui-sidebar-resizer]) {
|
|
190
|
-
flex: 0 0 var(--ui-sidebar-width);
|
|
191
|
-
}
|
|
192
|
-
ui-sidebar[side="end"][resizable] > :first-child:not([data-ui-sidebar-resizer]) {
|
|
193
|
-
flex: 1 1 0;
|
|
194
|
-
}
|
|
195
|
-
ui-sidebar[side="end"][resizable] > :nth-last-child(2):not([data-ui-sidebar-resizer]) {
|
|
196
|
-
flex: 0 0 var(--ui-sidebar-width);
|
|
197
|
-
}
|
|
198
|
-
ui-sidebar > [data-ui-sidebar-resizer] {
|
|
199
|
-
position: absolute;
|
|
200
|
-
z-index: 1;
|
|
201
|
-
inset-block: 0;
|
|
202
|
-
inset-inline-start: var(--ui-sidebar-width);
|
|
203
|
-
inline-size: 8px;
|
|
204
|
-
min-inline-size: 8px;
|
|
205
|
-
transform: translateX(-50%);
|
|
206
|
-
cursor: col-resize;
|
|
207
|
-
touch-action: none;
|
|
208
|
-
outline: none;
|
|
209
|
-
}
|
|
210
|
-
ui-sidebar[side="end"] > [data-ui-sidebar-resizer] {
|
|
211
|
-
inset-inline-start: auto;
|
|
212
|
-
inset-inline-end: var(--ui-sidebar-width);
|
|
213
|
-
transform: translateX(50%);
|
|
214
|
-
}
|
|
215
|
-
ui-sidebar > [data-ui-sidebar-resizer]::after {
|
|
216
|
-
content: "";
|
|
217
|
-
position: absolute;
|
|
218
|
-
inset-block: 0;
|
|
219
|
-
inset-inline-start: 3px;
|
|
220
|
-
inline-size: 2px;
|
|
221
|
-
background: color-mix(in srgb, var(--ui-affordance-guide-color, var(--ui-border-strong)) 45%, transparent);
|
|
222
|
-
opacity: var(--ui-affordance-guide-opacity, 0.42);
|
|
223
|
-
transition:
|
|
224
|
-
background-color var(--ui-affordance-motion, var(--ui-motion-fast, 120ms)) var(--ui-motion-ease, ease),
|
|
225
|
-
opacity var(--ui-affordance-motion, var(--ui-motion-fast, 120ms)) var(--ui-motion-ease, ease);
|
|
226
|
-
}
|
|
227
|
-
ui-sidebar > [data-ui-sidebar-resizer] > [data-ui-guide] {
|
|
228
|
-
position: absolute;
|
|
229
|
-
inset-block-start: 50%;
|
|
230
|
-
inset-inline-start: 50%;
|
|
231
|
-
inline-size: 6px;
|
|
232
|
-
block-size: 22px;
|
|
233
|
-
border: 1px solid var(--ui-border-strong, #c8c8c4);
|
|
234
|
-
border-radius: var(--ui-radius-round, 999px);
|
|
235
|
-
background: var(--ui-surface-elevated, #fff);
|
|
236
|
-
opacity: 0;
|
|
237
|
-
transform: translate(-50%, -50%);
|
|
238
|
-
transition: opacity var(--ui-affordance-motion, var(--ui-motion-fast, 120ms)) var(--ui-motion-ease, ease);
|
|
239
|
-
pointer-events: none;
|
|
240
|
-
}
|
|
241
|
-
ui-sidebar > [data-ui-sidebar-resizer]:hover::after,
|
|
242
|
-
ui-sidebar > [data-ui-sidebar-resizer]:focus-visible::after {
|
|
243
|
-
background: var(--ui-affordance-direct-color, var(--ui-accent-solid, var(--ui-color-focus, Highlight)));
|
|
244
|
-
opacity: 1;
|
|
245
|
-
}
|
|
246
|
-
ui-sidebar > [data-ui-sidebar-resizer]:is(:hover, :focus-visible) > [data-ui-guide] {
|
|
247
|
-
opacity: 1;
|
|
248
|
-
}
|
|
249
|
-
|
|
250
147
|
ui-reel {
|
|
251
148
|
--ui-reel-gap: var(--ui-space-4, 1rem);
|
|
252
149
|
--ui-reel-item-width: auto;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@threadlabs/looma",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Looma declarative components, responsive layout primitives, a complete editor, and supported Vue adapters.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -57,7 +57,8 @@
|
|
|
57
57
|
},
|
|
58
58
|
"./editor/ui": {
|
|
59
59
|
"types": "./editor/ui.d.ts",
|
|
60
|
-
"import": "./editor/ui.js"
|
|
60
|
+
"import": "./editor/ui.js",
|
|
61
|
+
"default": "./editor/ui.js"
|
|
61
62
|
},
|
|
62
63
|
"./editor/extensions": {
|
|
63
64
|
"types": "./editor/extensions/index.d.ts",
|
|
@@ -71,23 +72,29 @@
|
|
|
71
72
|
"types": "./vue/editor/index.d.ts",
|
|
72
73
|
"import": "./vue/editor/index.js"
|
|
73
74
|
},
|
|
75
|
+
"./react": {
|
|
76
|
+
"types": "./react/index.d.ts",
|
|
77
|
+
"import": "./react/index.js"
|
|
78
|
+
},
|
|
79
|
+
"./svelte": {
|
|
80
|
+
"types": "./svelte/index.d.ts",
|
|
81
|
+
"import": "./svelte/index.js"
|
|
82
|
+
},
|
|
74
83
|
"./tokens.css": "./tokens.css",
|
|
75
84
|
"./theme-light.css": "./theme-light.css",
|
|
76
85
|
"./theme-dark.css": "./theme-dark.css",
|
|
77
86
|
"./theme-high-contrast.css": "./theme-high-contrast.css",
|
|
78
87
|
"./layout.css": "./layout.css",
|
|
79
88
|
"./styles.css": "./styles.css",
|
|
80
|
-
"./editor.css": "./editor.css"
|
|
81
|
-
"./valibot": {
|
|
82
|
-
"types": "./dist/valibot.d.ts",
|
|
83
|
-
"import": "./dist/valibot.js"
|
|
84
|
-
}
|
|
89
|
+
"./editor.css": "./editor.css"
|
|
85
90
|
},
|
|
86
91
|
"files": [
|
|
87
92
|
"dist/",
|
|
88
93
|
"layout/",
|
|
89
94
|
"editor/",
|
|
90
95
|
"vue/",
|
|
96
|
+
"react/",
|
|
97
|
+
"svelte/",
|
|
91
98
|
"tokens.css",
|
|
92
99
|
"theme-light.css",
|
|
93
100
|
"theme-dark.css",
|
|
@@ -104,6 +111,8 @@
|
|
|
104
111
|
"./editor/*.js",
|
|
105
112
|
"./vue/index.js",
|
|
106
113
|
"./vue/editor/*.js",
|
|
114
|
+
"./react/index.js",
|
|
115
|
+
"./svelte/index.js",
|
|
107
116
|
"./*.css"
|
|
108
117
|
],
|
|
109
118
|
"dependencies": {
|
|
@@ -114,8 +123,9 @@
|
|
|
114
123
|
"@tiptap/core": ">=2 <3",
|
|
115
124
|
"@tiptap/pm": ">=2 <3",
|
|
116
125
|
"@tiptap/vue-3": ">=2 <3",
|
|
117
|
-
"
|
|
118
|
-
"
|
|
126
|
+
"react": "^19.0.0",
|
|
127
|
+
"svelte": "^5.0.0",
|
|
128
|
+
"vue": "^3.5.0"
|
|
119
129
|
},
|
|
120
130
|
"peerDependenciesMeta": {
|
|
121
131
|
"@tiptap/core": {
|
|
@@ -127,10 +137,13 @@
|
|
|
127
137
|
"@tiptap/vue-3": {
|
|
128
138
|
"optional": true
|
|
129
139
|
},
|
|
130
|
-
"
|
|
140
|
+
"react": {
|
|
131
141
|
"optional": true
|
|
132
142
|
},
|
|
133
|
-
"
|
|
143
|
+
"svelte": {
|
|
144
|
+
"optional": true
|
|
145
|
+
},
|
|
146
|
+
"vue": {
|
|
134
147
|
"optional": true
|
|
135
148
|
}
|
|
136
149
|
},
|