rimecms 1.0.1 → 1.1.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/core/i18n/en/fields.d.ts +1 -1
- package/dist/core/i18n/en/fields.js +1 -1
- package/dist/core/i18n/fr/fields.d.ts +1 -1
- package/dist/core/i18n/fr/fields.js +1 -1
- package/dist/fields/blocks/component/AddBlockButton.svelte +1 -1
- package/dist/fields/blocks/component/Block.svelte +4 -5
- package/dist/fields/blocks/component/Blocks.svelte +17 -13
- package/dist/fields/blocks/component/focus/BlocksFocus.svelte +52 -64
- package/dist/fields/blocks/component/focus/DefaultRender.svelte +108 -0
- package/dist/fields/blocks/component/focus/{RenderPlaceholder.svelte.d.ts → DefaultRender.svelte.d.ts} +3 -3
- package/dist/fields/blocks/component/focus/Inspector.svelte +160 -0
- package/dist/fields/blocks/component/focus/Inspector.svelte.d.ts +7 -0
- package/dist/fields/blocks/component/focus/Layers.svelte +16 -3
- package/dist/fields/blocks/component/focus/LayersList.svelte +28 -11
- package/dist/fields/blocks/component/focus/LayersList.svelte.d.ts +2 -0
- package/dist/fields/blocks/component/focus/Palette.svelte +3 -3
- package/dist/fields/blocks/component/focus/Renders.svelte +66 -15
- package/dist/fields/blocks/component/focus/Renders.svelte.d.ts +5 -1
- package/dist/fields/blocks/component/focus/StagePlaceholder.svelte +1 -4
- package/dist/fields/blocks/component/focus/focus.svelte.d.ts +26 -12
- package/dist/fields/blocks/component/focus/focus.svelte.js +114 -57
- package/dist/fields/blocks/component/picker/BlockTile.svelte +3 -5
- package/dist/fields/combobox/component/ComboBox.svelte +1 -1
- package/dist/fields/combobox/component/combobox.css +1 -1
- package/dist/fields/date/component/Date.svelte +1 -1
- package/dist/fields/group/component/Group.svelte +4 -4
- package/dist/fields/link/component/Link.svelte +1 -1
- package/dist/fields/link/component/RessourceInput.svelte +2 -2
- package/dist/fields/number/component/Number.svelte +1 -1
- package/dist/fields/relation/component/Cell.svelte +3 -1
- package/dist/fields/relation/component/RelationInline.svelte +50 -19
- package/dist/fields/relation/component/default/Default.svelte +3 -3
- package/dist/fields/relation/component/upload/Browse.svelte +2 -2
- package/dist/fields/relation/component/upload/Upload.svelte +2 -2
- package/dist/fields/rich-text/component/bubble-menu/bubble-menu.css +1 -1
- package/dist/fields/rich-text/component/bubble-menu/node-selector/node-selector.css +1 -1
- package/dist/fields/rich-text/core/features/link/component/link-selector.svelte +2 -2
- package/dist/fields/rich-text/core/features/resource/resource.svelte +1 -1
- package/dist/fields/rich-text/core/features/upload/upload.svelte +1 -1
- package/dist/fields/select/component/Select.svelte +2 -2
- package/dist/fields/text/component/TextInline.svelte +113 -0
- package/dist/fields/text/component/TextInline.svelte.d.ts +14 -0
- package/dist/fields/textarea/component/TextArea.svelte +1 -1
- package/dist/fields/tree/component/TreeBlock.svelte +4 -4
- package/dist/panel/components/fields/Error.svelte +1 -1
- package/dist/panel/components/fields/FieldsPreview.svelte +1 -1
- package/dist/panel/components/fields/FieldsPreviewTrigger.svelte +1 -1
- package/dist/panel/components/fields/Hint.svelte +1 -1
- package/dist/panel/components/fields/setting.css +6 -6
- package/dist/panel/components/sections/auth/AuthForm.svelte +2 -2
- package/dist/panel/components/sections/collection/Avatar.svelte +1 -1
- package/dist/panel/components/sections/collection/bulk-upload/FileDrop.svelte +1 -1
- package/dist/panel/components/sections/collection/bulk-upload/PageDrop.svelte +3 -3
- package/dist/panel/components/sections/collection/bulk-upload/UploadProgress.svelte +1 -1
- package/dist/panel/components/sections/collection/folder/Folder.svelte +1 -1
- package/dist/panel/components/sections/collection/folder/FolderWithActions.svelte +2 -2
- package/dist/panel/components/sections/collection/grid/grid-item/GridItem.svelte +1 -1
- package/dist/panel/components/sections/collection/header/DisplayMode.svelte +1 -2
- package/dist/panel/components/sections/collection/list/CollectionList.svelte +2 -2
- package/dist/panel/components/sections/collection/list/header/Header.svelte +1 -1
- package/dist/panel/components/sections/collection/list/row/Row.svelte +1 -1
- package/dist/panel/components/sections/collection/tree/CollectionTree.svelte +1 -1
- package/dist/panel/components/sections/collection/tree/CollectionTreeNode.svelte +1 -1
- package/dist/panel/components/sections/collection/upload-thumb-cell/UploadThumbCell.svelte +1 -1
- package/dist/panel/components/sections/commands/CommandButton.svelte +1 -1
- package/dist/panel/components/sections/document/AuthAPIKeyDialog.svelte +1 -1
- package/dist/panel/components/sections/document/AuthFooter.svelte +2 -2
- package/dist/panel/components/sections/document/AutoSaveBanner.svelte +2 -2
- package/dist/panel/components/sections/document/ButtonStatus.svelte +1 -1
- package/dist/panel/components/sections/document/ChangeSlugDialog.svelte +1 -1
- package/dist/panel/components/sections/document/DocumentChildren.svelte +2 -2
- package/dist/panel/components/sections/document/upload-header/UploadHeader.svelte +2 -2
- package/dist/panel/components/sections/document/upload-header/drop-zone/DropZone.svelte +1 -1
- package/dist/panel/components/sections/live/LiveFloatingUI.svelte +2 -2
- package/dist/panel/components/ui/breadcrumb/BreadCrumb.svelte +1 -1
- package/dist/panel/components/ui/button/button.svelte +3 -4
- package/dist/panel/components/ui/card/card.svelte +2 -2
- package/dist/panel/components/ui/card-document/card-document.svelte +2 -2
- package/dist/panel/components/ui/card-resource/card-resource.svelte +2 -2
- package/dist/panel/components/ui/command/command-input.svelte +1 -1
- package/dist/panel/components/ui/context-menu/context-menu.css +1 -1
- package/dist/panel/components/ui/dialog/dialog-content.css +1 -1
- package/dist/panel/components/ui/dropdown-menu/dropdown-menu-checkbox-item.svelte +1 -1
- package/dist/panel/components/ui/dropdown-menu/dropdown-menu-content.css +1 -1
- package/dist/panel/components/ui/input/input.svelte +1 -1
- package/dist/panel/components/ui/nav/Nav.svelte +2 -3
- package/dist/panel/components/ui/nav/NavGroup.svelte +1 -1
- package/dist/panel/components/ui/nav/NavItemButton.svelte +1 -1
- package/dist/panel/components/ui/nav/UserButton.svelte +1 -1
- package/dist/panel/components/ui/page-header/PageHeader.svelte +1 -1
- package/dist/panel/components/ui/popover/popover-content.css +1 -1
- package/dist/panel/components/ui/radio-row-group/radio-row-group.css +0 -1
- package/dist/panel/components/ui/sheet/sheet.css +1 -1
- package/dist/panel/components/ui/sonner/sonner.css +1 -1
- package/dist/panel/components/ui/switch/switch.css +0 -2
- package/dist/panel/components/ui/tabs/tabs.css +2 -1
- package/dist/panel/components/ui/tag/tag.svelte +1 -1
- package/dist/panel/components/ui/tree/tree-rows.css +3 -3
- package/dist/panel/index.d.ts +2 -1
- package/dist/panel/index.js +2 -1
- package/dist/panel/pages/auth/forgot-password/ForgotPassword.svelte +1 -1
- package/dist/panel/pages/dashboard/Dashboard.svelte +1 -1
- package/dist/panel/pages/dashboard/DashboardCard.svelte +2 -2
- package/dist/panel/pages/dashboard/DashboardCollection.svelte +1 -1
- package/dist/panel/pages/dashboard/DashboardRow.svelte +1 -1
- package/dist/panel/style/index.css +13 -37
- package/dist/panel/style/mixins/index.css +1 -1
- package/dist/panel/style/palette.css +3 -3
- package/dist/panel/style/scheme.css +10 -34
- package/package.json +1 -1
- package/dist/fields/blocks/component/focus/RenderPlaceholder.svelte +0 -77
- package/dist/fields/blocks/component/focus/Stage.svelte +0 -190
- package/dist/fields/blocks/component/focus/Stage.svelte.d.ts +0 -8
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { t__ } from '../../../../core/i18n/index.js';
|
|
3
|
-
import { ToyBrick } from '@lucide/svelte';
|
|
4
|
-
import type { Snippet } from 'svelte';
|
|
5
|
-
import type { LayerRow } from './focus.svelte.js';
|
|
6
|
-
|
|
7
|
-
type Props = { row: LayerRow; error?: unknown; children?: Snippet<[name?: string]> };
|
|
8
|
-
const { row, error, children }: Props = $props();
|
|
9
|
-
|
|
10
|
-
const Icon = $derived(row.config?.icon ?? ToyBrick);
|
|
11
|
-
|
|
12
|
-
$effect(() => {
|
|
13
|
-
if (error) console.error(`Render of block ${row.path} failed`, error);
|
|
14
|
-
});
|
|
15
|
-
</script>
|
|
16
|
-
|
|
17
|
-
<!-- A block without a render, or one whose render threw: its icon, its title, its nested lists. -->
|
|
18
|
-
<div class="rz-render-placeholder" data-error={error ? '' : undefined}>
|
|
19
|
-
<p class="rz-render-placeholder__title">
|
|
20
|
-
<span class="rz-render-placeholder__icon"><Icon size={14} /></span>
|
|
21
|
-
<span>{row.title}</span>
|
|
22
|
-
{#if error}
|
|
23
|
-
<span class="rz-render-placeholder__error">{t__('fields.render_failed')}</span>
|
|
24
|
-
{/if}
|
|
25
|
-
</p>
|
|
26
|
-
{@render children?.()}
|
|
27
|
-
</div>
|
|
28
|
-
|
|
29
|
-
<style>/* A level: its fill, a hairline, its shadow. raised, float. */
|
|
30
|
-
|
|
31
|
-
/* A well: an input, a track, a dropzone. Its edge shows on hover. */
|
|
32
|
-
|
|
33
|
-
/* The hover tint, laid over the element's own fill. */
|
|
34
|
-
|
|
35
|
-
/* The picked item of a segmented control. */
|
|
36
|
-
|
|
37
|
-
/* The primary button's face: black on light, white on dark. */
|
|
38
|
-
|
|
39
|
-
/* Keyboard focus on a button, a tab, a link. */
|
|
40
|
-
|
|
41
|
-
/* A focused input: an accent edge and a soft halo. */
|
|
42
|
-
|
|
43
|
-
/* An input with an error. */
|
|
44
|
-
.rz-render-placeholder {
|
|
45
|
-
display: grid;
|
|
46
|
-
gap: var(--rz-size-3);
|
|
47
|
-
padding: var(--rz-size-3) var(--rz-size-4);
|
|
48
|
-
border: 1px dashed var(--rz-border-strong);
|
|
49
|
-
border-radius: var(--rz-radius-md);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.rz-render-placeholder__title {
|
|
53
|
-
display: flex;
|
|
54
|
-
align-items: center;
|
|
55
|
-
gap: var(--rz-size-2);
|
|
56
|
-
font-size: var(--rz-text-sm);
|
|
57
|
-
font-variation-settings: 'wght' 500;
|
|
58
|
-
font-weight: 500;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.rz-render-placeholder__icon {
|
|
62
|
-
display: grid;
|
|
63
|
-
place-items: center;
|
|
64
|
-
width: var(--rz-size-6);
|
|
65
|
-
height: var(--rz-size-6);
|
|
66
|
-
flex-shrink: 0;
|
|
67
|
-
border-radius: var(--rz-radius-sm);
|
|
68
|
-
background-color: var(--rz-bg-well);
|
|
69
|
-
color: var(--rz-fg-muted);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.rz-render-placeholder__error {
|
|
73
|
-
font-variation-settings: 'wght' 400;
|
|
74
|
-
font-weight: 400;
|
|
75
|
-
color: var(--rz-danger);
|
|
76
|
-
}
|
|
77
|
-
</style>
|
|
@@ -1,190 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { getFieldListAtPath } from '../../../../core/fields/util.js';
|
|
3
|
-
import { t__ } from '../../../../core/i18n/index.js';
|
|
4
|
-
import RenderFields from '../../../../panel/components/fields/RenderFields.svelte';
|
|
5
|
-
import { Button } from '../../../../panel/components/ui/button/index.js';
|
|
6
|
-
import { withBlockTypes } from '../../../../panel/context/blocks-ops.js';
|
|
7
|
-
import type { DocumentFormContext } from '../../../../panel/context/documentForm.svelte.js';
|
|
8
|
-
import { CopyPlus, ToyBrick, Trash2 } from '@lucide/svelte';
|
|
9
|
-
import { getBlocksFocusContext, type LayerRow } from './focus.svelte.js';
|
|
10
|
-
import StagePlaceholder from './StagePlaceholder.svelte';
|
|
11
|
-
|
|
12
|
-
type Props = { form: DocumentFormContext; onRemove: () => void };
|
|
13
|
-
const { form, onRemove }: Props = $props();
|
|
14
|
-
|
|
15
|
-
const focus = getBlocksFocusContext()!;
|
|
16
|
-
const current = $derived(focus.currentRow);
|
|
17
|
-
/** A block selected: that block alone. The root node: every block of the open list. */
|
|
18
|
-
const rows = $derived(current ? [current] : focus.path ? focus.rowsOf(focus.path) : []);
|
|
19
|
-
|
|
20
|
-
const fieldsOf = (row: LayerRow) =>
|
|
21
|
-
getFieldListAtPath(withBlockTypes(row.path, form.values), form.config.fields);
|
|
22
|
-
</script>
|
|
23
|
-
|
|
24
|
-
<div class="rz-stage" data-mode={current ? 'block' : 'all'}>
|
|
25
|
-
{#each rows as row (row.block.id)}
|
|
26
|
-
{@const Icon = row.config?.icon ?? ToyBrick}
|
|
27
|
-
{@const rendered = fieldsOf(row)}
|
|
28
|
-
<article class="rz-stage__card" data-block-path={row.path}>
|
|
29
|
-
<header class="rz-stage__header">
|
|
30
|
-
<button
|
|
31
|
-
type="button"
|
|
32
|
-
class="rz-stage__title"
|
|
33
|
-
onclick={() => focus.select(row.path)}
|
|
34
|
-
disabled={!!current}
|
|
35
|
-
>
|
|
36
|
-
<span class="rz-stage__icon"><Icon size={14} /></span>
|
|
37
|
-
<h3>{row.title}</h3>
|
|
38
|
-
<span class="rz-stage__path">{row.path}</span>
|
|
39
|
-
</button>
|
|
40
|
-
{#if current && !focus.locked}
|
|
41
|
-
<div class="rz-stage__actions">
|
|
42
|
-
<Button
|
|
43
|
-
variant="ghost"
|
|
44
|
-
size="icon-sm"
|
|
45
|
-
icon={CopyPlus}
|
|
46
|
-
title={t__('common.duplicate')}
|
|
47
|
-
aria-label={t__('common.duplicate')}
|
|
48
|
-
onclick={focus.duplicateSelection}
|
|
49
|
-
/>
|
|
50
|
-
<Button
|
|
51
|
-
variant="ghost"
|
|
52
|
-
size="icon-sm"
|
|
53
|
-
icon={Trash2}
|
|
54
|
-
title={t__('fields.delete_block')}
|
|
55
|
-
aria-label={t__('fields.delete_block')}
|
|
56
|
-
onclick={onRemove}
|
|
57
|
-
/>
|
|
58
|
-
</div>
|
|
59
|
-
{/if}
|
|
60
|
-
</header>
|
|
61
|
-
<div class="rz-stage__fields">
|
|
62
|
-
<RenderFields fields={rendered.fields} path={rendered.path} {form} />
|
|
63
|
-
</div>
|
|
64
|
-
</article>
|
|
65
|
-
{:else}
|
|
66
|
-
<p class="rz-stage__empty">{t__('fields.no_blocks_yet')}</p>
|
|
67
|
-
{/each}
|
|
68
|
-
{#if !current && rows.length && !focus.locked}
|
|
69
|
-
<StagePlaceholder />
|
|
70
|
-
{/if}
|
|
71
|
-
</div>
|
|
72
|
-
|
|
73
|
-
<style>/* A level: its fill, a hairline, its shadow. raised, float. */
|
|
74
|
-
|
|
75
|
-
/* A well: an input, a track, a dropzone. Its edge shows on hover. */
|
|
76
|
-
|
|
77
|
-
/* The hover tint, laid over the element's own fill. */
|
|
78
|
-
|
|
79
|
-
/* The picked item of a segmented control. */
|
|
80
|
-
|
|
81
|
-
/* The primary button's face: black on light, white on dark. */
|
|
82
|
-
|
|
83
|
-
/* Keyboard focus on a button, a tab, a link. */
|
|
84
|
-
|
|
85
|
-
/* A focused input: an accent edge and a soft halo. */
|
|
86
|
-
|
|
87
|
-
/* An input with an error. */
|
|
88
|
-
.rz-stage {
|
|
89
|
-
display: grid;
|
|
90
|
-
align-content: start;
|
|
91
|
-
gap: var(--rz-size-6);
|
|
92
|
-
min-height: 100%;
|
|
93
|
-
padding-bottom: var(--rz-size-16);
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
.rz-stage[data-mode='all'] {
|
|
97
|
-
padding: var(--rz-size-6) var(--rz-size-6) var(--rz-size-16);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
.rz-stage[data-mode='all'] .rz-stage__card {
|
|
101
|
-
background-color: var(--rz-bg-raised);
|
|
102
|
-
box-shadow:
|
|
103
|
-
0 0 0 1px var(--rz-border),
|
|
104
|
-
var(--rz-shadow-raised);
|
|
105
|
-
border-radius: var(--rz-radius-md);
|
|
106
|
-
overflow: hidden;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
/* A block's head: its icon, its title, its path, and on the right what it can do. */
|
|
110
|
-
.rz-stage__header {
|
|
111
|
-
display: flex;
|
|
112
|
-
align-items: center;
|
|
113
|
-
justify-content: space-between;
|
|
114
|
-
gap: var(--rz-size-2);
|
|
115
|
-
height: calc(11.5 * var(--rz-unit));
|
|
116
|
-
padding-inline: var(--rz-size-3) var(--rz-size-1-5);
|
|
117
|
-
border-bottom: 1px solid var(--rz-border);
|
|
118
|
-
background-color: var(--rz-bg-raised);
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
/* Alone, the head stays on top of the fields, on the page's own fill. */
|
|
122
|
-
.rz-stage[data-mode='block'] .rz-stage__header {
|
|
123
|
-
position: sticky;
|
|
124
|
-
top: 0;
|
|
125
|
-
z-index: 1;
|
|
126
|
-
background-color: var(--rz-bg-page);
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
.rz-stage__title {
|
|
130
|
-
display: flex;
|
|
131
|
-
align-items: center;
|
|
132
|
-
gap: var(--rz-size-2);
|
|
133
|
-
min-width: 0;
|
|
134
|
-
h3 {
|
|
135
|
-
font-variation-settings: 'wght' 500;
|
|
136
|
-
font-weight: 500;
|
|
137
|
-
font-size: var(--rz-text-md);
|
|
138
|
-
white-space: nowrap;
|
|
139
|
-
}
|
|
140
|
-
&:not(:disabled):hover h3 {
|
|
141
|
-
text-decoration: underline;
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
.rz-stage__icon {
|
|
146
|
-
display: grid;
|
|
147
|
-
place-items: center;
|
|
148
|
-
width: var(--rz-size-6);
|
|
149
|
-
height: var(--rz-size-6);
|
|
150
|
-
flex-shrink: 0;
|
|
151
|
-
border-radius: var(--rz-radius-sm);
|
|
152
|
-
background-color: var(--rz-bg-well);
|
|
153
|
-
color: var(--rz-fg-muted);
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
.rz-stage__path {
|
|
157
|
-
font-family: var(--rz-font-mono);
|
|
158
|
-
font-size: var(--rz-text-xs);
|
|
159
|
-
color: var(--rz-fg-subtle);
|
|
160
|
-
overflow: hidden;
|
|
161
|
-
text-overflow: ellipsis;
|
|
162
|
-
white-space: nowrap;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
/* Ghost icon buttons, quiet until hovered. */
|
|
166
|
-
.rz-stage__actions {
|
|
167
|
-
--rz-button-ghost-fg: var(--rz-fg-muted);
|
|
168
|
-
display: flex;
|
|
169
|
-
gap: var(--rz-size-0-5);
|
|
170
|
-
flex-shrink: 0;
|
|
171
|
-
:global(.rz-button) {
|
|
172
|
-
width: var(--rz-size-7);
|
|
173
|
-
height: var(--rz-size-7);
|
|
174
|
-
}
|
|
175
|
-
:global(.rz-button:hover) {
|
|
176
|
-
color: var(--rz-fg);
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
.rz-stage__fields {
|
|
181
|
-
padding-block: var(--rz-size-6);
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
.rz-stage__empty {
|
|
185
|
-
padding: var(--rz-size-16) var(--rz-size-6);
|
|
186
|
-
text-align: center;
|
|
187
|
-
font-size: var(--rz-text-sm);
|
|
188
|
-
color: var(--rz-fg-subtle);
|
|
189
|
-
}
|
|
190
|
-
</style>
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { DocumentFormContext } from '../../../../panel/context/documentForm.svelte.js';
|
|
2
|
-
type Props = {
|
|
3
|
-
form: DocumentFormContext;
|
|
4
|
-
onRemove: () => void;
|
|
5
|
-
};
|
|
6
|
-
declare const Stage: import("svelte").Component<Props, {}, "">;
|
|
7
|
-
type Stage = ReturnType<typeof Stage>;
|
|
8
|
-
export default Stage;
|