@r2digisolutions/components 0.24.4 → 0.24.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/dist/components/molecules/CanvasInspector/CanvasInspector.svelte +25 -5
- package/dist/components/molecules/LocaleSwitcher/LocaleSwitcher.svelte +1 -1
- package/dist/components/molecules/MediaStage/MediaStage.svelte +11 -17
- package/dist/components/molecules/PropertyField/PropertyField.svelte +14 -22
- package/dist/components/molecules/Stepper/Stepper.svelte +2 -0
- package/dist/components/organisms/CanvasEditor/CanvasEditor.svelte +299 -70
- package/dist/components/organisms/CanvasEditor/CanvasPageStrip.svelte +135 -0
- package/dist/components/organisms/CanvasEditor/CanvasPageStrip.svelte.d.ts +13 -0
- package/dist/components/organisms/CanvasEditor/CanvasQuickDock.svelte +132 -0
- package/dist/components/organisms/CanvasEditor/CanvasQuickDock.svelte.d.ts +10 -0
- package/dist/components/organisms/DataListPage/DataListPage.svelte.d.ts +1 -1
- package/dist/components/organisms/ResourceStudio/ResourceStudio.svelte.d.ts +1 -1
- package/dist/components/organisms/SearchResults/SearchResults.svelte.d.ts +1 -1
- package/dist/components/templates/ListingTemplate/ListingTemplate.svelte.d.ts +1 -1
- package/dist/components/templates/ResourceStudioTemplate/ResourceStudioTemplate.svelte.d.ts +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/styles.css +1 -1
- package/dist/utils/canvasDocument.d.ts +25 -0
- package/dist/utils/canvasDocument.js +102 -5
- package/package.json +1 -1
|
@@ -1200,7 +1200,11 @@
|
|
|
1200
1200
|
patch({ fontSize: Number((e.currentTarget as HTMLInputElement).value) })}
|
|
1201
1201
|
/>
|
|
1202
1202
|
</PropertyField>
|
|
1203
|
-
<PropertyField
|
|
1203
|
+
<PropertyField
|
|
1204
|
+
label="Weight"
|
|
1205
|
+
modified={fieldModified('fontWeight')}
|
|
1206
|
+
onreset={() => resetField('fontWeight')}
|
|
1207
|
+
>
|
|
1204
1208
|
<Select
|
|
1205
1209
|
size="xs"
|
|
1206
1210
|
options={weightOptions}
|
|
@@ -1208,7 +1212,11 @@
|
|
|
1208
1212
|
onchange={(v) => patch({ fontWeight: v })}
|
|
1209
1213
|
/>
|
|
1210
1214
|
</PropertyField>
|
|
1211
|
-
<PropertyField
|
|
1215
|
+
<PropertyField
|
|
1216
|
+
label="Style"
|
|
1217
|
+
modified={fieldModified('fontStyle')}
|
|
1218
|
+
onreset={() => resetField('fontStyle')}
|
|
1219
|
+
>
|
|
1212
1220
|
<Select
|
|
1213
1221
|
size="xs"
|
|
1214
1222
|
options={styleOptions}
|
|
@@ -1216,7 +1224,11 @@
|
|
|
1216
1224
|
onchange={(v) => patch({ fontStyle: v as CanvasLayer['fontStyle'] })}
|
|
1217
1225
|
/>
|
|
1218
1226
|
</PropertyField>
|
|
1219
|
-
<PropertyField
|
|
1227
|
+
<PropertyField
|
|
1228
|
+
label="Decoration"
|
|
1229
|
+
modified={fieldModified('textDecoration')}
|
|
1230
|
+
onreset={() => resetField('textDecoration')}
|
|
1231
|
+
>
|
|
1220
1232
|
<Select
|
|
1221
1233
|
size="xs"
|
|
1222
1234
|
options={decoOptions}
|
|
@@ -1296,7 +1308,11 @@
|
|
|
1296
1308
|
/>
|
|
1297
1309
|
</PropertyField>
|
|
1298
1310
|
{/if}
|
|
1299
|
-
<PropertyField
|
|
1311
|
+
<PropertyField
|
|
1312
|
+
label="Letter spacing"
|
|
1313
|
+
modified={fieldModified('letterSpacing')}
|
|
1314
|
+
onreset={() => resetField('letterSpacing')}
|
|
1315
|
+
>
|
|
1300
1316
|
<Input
|
|
1301
1317
|
type="number"
|
|
1302
1318
|
size="sm"
|
|
@@ -1305,7 +1321,11 @@
|
|
|
1305
1321
|
patch({ letterSpacing: Number((e.currentTarget as HTMLInputElement).value) })}
|
|
1306
1322
|
/>
|
|
1307
1323
|
</PropertyField>
|
|
1308
|
-
<PropertyField
|
|
1324
|
+
<PropertyField
|
|
1325
|
+
label="Line height"
|
|
1326
|
+
modified={fieldModified('lineHeight')}
|
|
1327
|
+
onreset={() => resetField('lineHeight')}
|
|
1328
|
+
>
|
|
1309
1329
|
<Input
|
|
1310
1330
|
type="number"
|
|
1311
1331
|
size="sm"
|
|
@@ -333,8 +333,8 @@
|
|
|
333
333
|
const cell = Math.max(4, cellSize);
|
|
334
334
|
const major = cell * 5;
|
|
335
335
|
const line = 1 / Math.max(0.05, scale);
|
|
336
|
-
const fine = 'color-mix(in oklab, #
|
|
337
|
-
const bold = 'color-mix(in oklab, #
|
|
336
|
+
const fine = 'color-mix(in oklab, #171717 28%, transparent)';
|
|
337
|
+
const bold = 'color-mix(in oklab, #171717 48%, transparent)';
|
|
338
338
|
return [
|
|
339
339
|
`background-image:`,
|
|
340
340
|
`linear-gradient(to right, ${fine} ${line}px, transparent ${line}px),`,
|
|
@@ -1277,13 +1277,7 @@
|
|
|
1277
1277
|
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
|
1278
1278
|
<div
|
|
1279
1279
|
bind:this={viewportEl}
|
|
1280
|
-
class="min-h-0 min-w-0 relative flex-1 overflow-auto"
|
|
1281
|
-
style:background-color="#dfe3e8"
|
|
1282
|
-
style:background-image="linear-gradient(45deg,#cfd5dc 25%,transparent
|
|
1283
|
-
25%),linear-gradient(-45deg,#cfd5dc 25%,transparent 25%),linear-gradient(45deg,transparent
|
|
1284
|
-
75%,#cfd5dc 75%),linear-gradient(-45deg,transparent 75%,#cfd5dc 75%)"
|
|
1285
|
-
style:background-size="16px 16px"
|
|
1286
|
-
style:background-position="0 0,0 8px,8px -8px,-8px 0"
|
|
1280
|
+
class="min-h-0 min-w-0 relative flex-1 overflow-auto bg-neutral-200 dark:bg-neutral-950"
|
|
1287
1281
|
role="presentation"
|
|
1288
1282
|
onclick={clearSelectionIfEmptyClick}
|
|
1289
1283
|
ondragover={handleElementDragOver}
|
|
@@ -1347,11 +1341,11 @@
|
|
|
1347
1341
|
{#if artboardTransparent}
|
|
1348
1342
|
<div
|
|
1349
1343
|
class="inset-0 absolute"
|
|
1350
|
-
style:background-color="#
|
|
1351
|
-
style:background-image="linear-gradient(45deg,#
|
|
1352
|
-
25%),linear-gradient(-45deg,#
|
|
1353
|
-
25%),linear-gradient(45deg,transparent 75%,#
|
|
1354
|
-
75%),linear-gradient(-45deg,transparent 75%,#
|
|
1344
|
+
style:background-color="#f5f5f5"
|
|
1345
|
+
style:background-image="linear-gradient(45deg,#e5e5e5 25%,transparent
|
|
1346
|
+
25%),linear-gradient(-45deg,#e5e5e5 25%,transparent
|
|
1347
|
+
25%),linear-gradient(45deg,transparent 75%,#e5e5e5
|
|
1348
|
+
75%),linear-gradient(-45deg,transparent 75%,#e5e5e5 75%)"
|
|
1355
1349
|
style:background-size="16px 16px"
|
|
1356
1350
|
style:background-position="0 0,0 8px,8px -8px,-8px 0"
|
|
1357
1351
|
></div>
|
|
@@ -1537,7 +1531,7 @@
|
|
|
1537
1531
|
>
|
|
1538
1532
|
<div
|
|
1539
1533
|
data-scroll-thumb="y"
|
|
1540
|
-
class="left-0.5 right-0.5 bg-
|
|
1534
|
+
class="left-0.5 right-0.5 bg-neutral-400/80 absolute cursor-grab rounded-full active:cursor-grabbing"
|
|
1541
1535
|
style:top="{vScroll.offset}px"
|
|
1542
1536
|
style:height="{vScroll.thumb}px"
|
|
1543
1537
|
onpointerdown={(e) =>
|
|
@@ -1555,7 +1549,7 @@
|
|
|
1555
1549
|
>
|
|
1556
1550
|
<div
|
|
1557
1551
|
data-scroll-thumb="x"
|
|
1558
|
-
class="top-0.5 bottom-0.5 bg-
|
|
1552
|
+
class="top-0.5 bottom-0.5 bg-neutral-400/80 absolute cursor-grab rounded-full active:cursor-grabbing"
|
|
1559
1553
|
style:left="{hScroll.offset}px"
|
|
1560
1554
|
style:width="{hScroll.thumb}px"
|
|
1561
1555
|
onpointerdown={(e) =>
|
|
@@ -1672,7 +1666,7 @@
|
|
|
1672
1666
|
{/if}
|
|
1673
1667
|
</svg>
|
|
1674
1668
|
<div
|
|
1675
|
-
class="bottom-3 rounded-md bg-
|
|
1669
|
+
class="bottom-3 rounded-md bg-neutral-900/90 px-3 py-1.5 text-white pointer-events-none absolute left-1/2 z-50 -translate-x-1/2 text-[11px]"
|
|
1676
1670
|
>
|
|
1677
1671
|
Click to add · near start to close · double-click / Enter to finish · Esc cancel
|
|
1678
1672
|
</div>
|
|
@@ -45,9 +45,7 @@
|
|
|
45
45
|
}: PropertyFieldProps = $props();
|
|
46
46
|
|
|
47
47
|
const canReset = $derived(!!onreset && modified && !disabled);
|
|
48
|
-
const columns = $derived(
|
|
49
|
-
compact ? `${labelWidth} minmax(0, 1fr)` : `1.25rem ${labelWidth} minmax(0, 1fr)`
|
|
50
|
-
);
|
|
48
|
+
const columns = $derived(`${labelWidth} minmax(0, 1fr)`);
|
|
51
49
|
</script>
|
|
52
50
|
|
|
53
51
|
<div
|
|
@@ -59,33 +57,27 @@
|
|
|
59
57
|
]}
|
|
60
58
|
style:grid-template-columns={columns}
|
|
61
59
|
>
|
|
62
|
-
{#if !compact}
|
|
63
|
-
<!-- Reset gutter: always reserved so every row shares the same label/value columns -->
|
|
64
|
-
<span class="flex h-7 w-5 items-center justify-center">
|
|
65
|
-
{#if canReset}
|
|
66
|
-
<Tooltip content="Reset to default" side="top">
|
|
67
|
-
<IconButton
|
|
68
|
-
label="Reset to default"
|
|
69
|
-
size="xs"
|
|
70
|
-
class="text-amber-500 hover:bg-amber-500/10 hover:text-amber-600 dark:text-amber-400 dark:hover:text-amber-300"
|
|
71
|
-
onclick={() => onreset?.()}
|
|
72
|
-
>
|
|
73
|
-
<RotateCcw class="h-3 w-3" strokeWidth={2.5} />
|
|
74
|
-
</IconButton>
|
|
75
|
-
</Tooltip>
|
|
76
|
-
{/if}
|
|
77
|
-
</span>
|
|
78
|
-
{/if}
|
|
79
|
-
|
|
80
60
|
<span class="flex min-w-0 items-center justify-start gap-0.5 text-left" title={label}>
|
|
81
61
|
<Text
|
|
82
62
|
size="xs"
|
|
83
63
|
tone={canReset ? 'primary' : 'secondary'}
|
|
84
64
|
as="span"
|
|
85
|
-
class={['min-w-0
|
|
65
|
+
class={['min-w-0 truncate font-medium', canReset && 'text-amber-700 dark:text-amber-400']}
|
|
86
66
|
>
|
|
87
67
|
{label}
|
|
88
68
|
</Text>
|
|
69
|
+
{#if canReset}
|
|
70
|
+
<Tooltip content="Restablecer" side="top">
|
|
71
|
+
<IconButton
|
|
72
|
+
label="Restablecer"
|
|
73
|
+
size="xs"
|
|
74
|
+
class="shrink-0 text-amber-500 hover:bg-amber-500/10 hover:text-amber-600 dark:text-amber-400 dark:hover:text-amber-300"
|
|
75
|
+
onclick={() => onreset?.()}
|
|
76
|
+
>
|
|
77
|
+
<RotateCcw class="h-3 w-3" strokeWidth={2.5} />
|
|
78
|
+
</IconButton>
|
|
79
|
+
</Tooltip>
|
|
80
|
+
{/if}
|
|
89
81
|
{#if exposed !== null}
|
|
90
82
|
<IconButton
|
|
91
83
|
label={exposed ? 'Hide from instances' : 'Expose on instances'}
|
|
@@ -187,6 +187,7 @@
|
|
|
187
187
|
type="button"
|
|
188
188
|
disabled={!navigable}
|
|
189
189
|
onclick={() => goTo(index)}
|
|
190
|
+
aria-label={`${index + 1}. ${step.label}`}
|
|
190
191
|
aria-current={state === 'current' || state === 'error' ? 'step' : undefined}
|
|
191
192
|
aria-disabled={step.disabled || undefined}
|
|
192
193
|
class={[
|
|
@@ -215,6 +216,7 @@
|
|
|
215
216
|
type="button"
|
|
216
217
|
disabled={!navigable}
|
|
217
218
|
onclick={() => goTo(index)}
|
|
219
|
+
aria-label={`${index + 1}. ${step.label}`}
|
|
218
220
|
aria-current={state === 'current' || state === 'error' ? 'step' : undefined}
|
|
219
221
|
aria-disabled={step.disabled || undefined}
|
|
220
222
|
class={[
|