rimecms 0.33.0 → 1.0.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/adapter-sqlite/auth.server.d.ts +2 -2
- package/dist/adapter-sqlite/columns.server.js +2 -2
- package/dist/adapter-sqlite/connect.server.d.ts +12 -0
- package/dist/adapter-sqlite/connect.server.js +31 -0
- package/dist/adapter-sqlite/generate-schema/index.server.js +11 -3
- package/dist/adapter-sqlite/generate-schema/root.server.d.ts +13 -4
- package/dist/adapter-sqlite/generate-schema/root.server.js +75 -131
- package/dist/adapter-sqlite/generate-schema/templates.server.d.ts +27 -6
- package/dist/adapter-sqlite/generate-schema/templates.server.js +52 -10
- package/dist/adapter-sqlite/index.server.d.ts +13 -5
- package/dist/adapter-sqlite/index.server.js +9 -6
- package/dist/adapter-sqlite/naming.server.d.ts +6 -8
- package/dist/adapter-sqlite/naming.server.js +22 -4
- package/dist/adapter-sqlite/paths.server.d.ts +10 -0
- package/dist/adapter-sqlite/paths.server.js +122 -0
- package/dist/adapter-sqlite/read.server.d.ts +10 -1
- package/dist/adapter-sqlite/read.server.js +22 -10
- package/dist/adapter-sqlite/select.server.d.ts +19 -0
- package/dist/adapter-sqlite/select.server.js +71 -63
- package/dist/adapter-sqlite/table.server.d.ts +2 -2
- package/dist/adapter-sqlite/transform.server.js +33 -3
- package/dist/adapter-sqlite/types.server.d.ts +10 -3
- package/dist/adapter-sqlite/where.server.d.ts +2 -3
- package/dist/adapter-sqlite/where.server.js +19 -1
- package/dist/core/adapter.d.ts +94 -0
- package/dist/core/auth/better-auth/config.server.d.ts +3 -3
- package/dist/core/auth/better-auth/instance.server.d.ts +6 -6
- package/dist/core/auth/handler/index.server.js +1 -1
- package/dist/core/auth/staff/derive.js +1 -1
- package/dist/core/auth/validate-config.js +3 -5
- package/dist/core/boot.server.d.ts +6 -6
- package/dist/core/config/types.d.ts +43 -5
- package/dist/core/config/validate.server.js +34 -51
- package/dist/core/dev/cli/commands/build.js +21 -6
- package/dist/core/dev/cli/commands/init.server.d.ts +2 -1
- package/dist/core/dev/cli/commands/init.server.js +32 -6
- package/dist/core/dev/cli/index.js +1 -0
- package/dist/core/dev/cli/templates/init.d.ts +6 -1
- package/dist/core/dev/cli/templates/init.js +30 -2
- package/dist/core/dev/cli/util/package-manager.server.d.ts +1 -0
- package/dist/core/dev/cli/util/package-manager.server.js +11 -8
- package/dist/core/dev/cli/util/package.server.d.ts +9 -0
- package/dist/core/dev/cli/util/package.server.js +43 -0
- package/dist/core/dev/codegen/types/contributions.server.d.ts +3 -2
- package/dist/core/dev/codegen/types/contributions.server.js +10 -3
- package/dist/core/dev/vite.server.js +4 -3
- package/dist/core/fields/blank.d.ts +21 -0
- package/dist/core/fields/blank.js +37 -0
- package/dist/core/fields/builders/field-builder.d.ts +53 -0
- package/dist/core/fields/builders/field-builder.js +14 -1
- package/dist/core/fields/builders/form-field-builder.d.ts +8 -0
- package/dist/core/fields/builders/form-field-builder.js +14 -1
- package/dist/core/fields/util.d.ts +9 -2
- package/dist/core/fields/util.js +123 -135
- package/dist/core/fields/walk.d.ts +44 -0
- package/dist/core/fields/walk.js +55 -0
- package/dist/core/handler.server.js +4 -0
- package/dist/core/i18n/context.d.ts +5 -0
- package/dist/core/i18n/context.js +6 -0
- package/dist/core/i18n/en/common.d.ts +71 -0
- package/dist/core/i18n/en/common.js +72 -1
- package/dist/core/i18n/en/fields.d.ts +68 -0
- package/dist/core/i18n/en/fields.js +69 -1
- package/dist/core/i18n/fr/common.d.ts +71 -0
- package/dist/core/i18n/fr/common.js +72 -1
- package/dist/core/i18n/fr/fields.d.ts +68 -0
- package/dist/core/i18n/fr/fields.js +69 -1
- package/dist/core/i18n/index.d.ts +29 -3
- package/dist/core/i18n/index.js +55 -29
- package/dist/core/locale/copy.server.js +3 -3
- package/dist/core/logger.server.js +15 -6
- package/dist/core/pipeline/build-document.server.d.ts +3 -0
- package/dist/core/pipeline/build-document.server.js +10 -7
- package/dist/core/pipeline/config-map/index.d.ts +9 -0
- package/dist/core/pipeline/config-map/index.js +16 -50
- package/dist/core/pipeline/hooks/process-document-fields.server.d.ts +3 -0
- package/dist/core/pipeline/hooks/process-document-fields.server.js +48 -12
- package/dist/core/pipeline/hooks/set-default-values.server.d.ts +1 -0
- package/dist/core/pipeline/hooks/set-default-values.server.js +1 -0
- package/dist/core/pipeline/persist/blocks/extract.server.js +1 -1
- package/dist/core/pipeline/persist/relations/extract.server.js +2 -0
- package/dist/core/pipeline/populate-relations.server.d.ts +27 -0
- package/dist/core/pipeline/populate-relations.server.js +42 -0
- package/dist/core/pipeline/run.server.d.ts +17 -6
- package/dist/core/pipeline/run.server.js +44 -30
- package/dist/core/plugins/cache/module.server.d.ts +1 -1
- package/dist/core/plugins/cache/module.server.js +5 -5
- package/dist/core/prototype/area/api.server.js +1 -2
- package/dist/core/prototype/area/definition.js +1 -10
- package/dist/core/prototype/area/definition.server.js +4 -5
- package/dist/core/prototype/area/hooks.server.js +3 -2
- package/dist/core/prototype/area/operations/find.js +2 -0
- package/dist/core/prototype/blank.d.ts +26 -0
- package/dist/core/prototype/blank.js +22 -0
- package/dist/core/prototype/collection/api.server.d.ts +29 -3
- package/dist/core/prototype/collection/api.server.js +47 -4
- package/dist/core/prototype/collection/definition.js +0 -3
- package/dist/core/prototype/collection/hooks/merge-with-blank.server.d.ts +5 -1
- package/dist/core/prototype/collection/hooks/merge-with-blank.server.js +8 -22
- package/dist/core/prototype/collection/hooks.server.js +11 -5
- package/dist/core/prototype/collection/nested/module.server.js +3 -1
- package/dist/core/prototype/collection/nested/tree.d.ts +12 -0
- package/dist/core/prototype/collection/nested/tree.js +42 -0
- package/dist/core/prototype/collection/operations/find-by-id.js +2 -0
- package/dist/core/prototype/collection/operations/find-by-ids.d.ts +19 -0
- package/dist/core/prototype/collection/operations/find-by-ids.js +54 -0
- package/dist/core/prototype/collection/operations/find.js +21 -27
- package/dist/core/prototype/collection/operations/update-slug-by-id.d.ts +20 -0
- package/dist/core/prototype/collection/operations/update-slug-by-id.js +53 -0
- package/dist/core/prototype/collection/rest/index.server.js +3 -1
- package/dist/core/prototype/collection/rest/update-slug-by-id.server.d.ts +2 -0
- package/dist/core/prototype/collection/rest/update-slug-by-id.server.js +20 -0
- package/dist/core/prototype/collection/thumbnail/find-thumbnail.d.ts +2 -1
- package/dist/core/prototype/collection/thumbnail/find-thumbnail.js +4 -27
- package/dist/core/prototype/collection/upload/directories/derive.js +3 -1
- package/dist/core/prototype/collection/upload/disk/delete.server.js +1 -2
- package/dist/core/prototype/define.js +2 -0
- package/dist/core/prototype/shared/metas/fields.js +2 -1
- package/dist/core/prototype/shared/title/find-title.d.ts +2 -1
- package/dist/core/prototype/shared/title/find-title.js +5 -28
- package/dist/core/prototype/shared/url/addresses.server.d.ts +26 -0
- package/dist/core/prototype/shared/url/addresses.server.js +119 -0
- package/dist/core/prototype/shared/url/doc-type.d.ts +6 -0
- package/dist/core/prototype/shared/url/doc-type.js +9 -0
- package/dist/core/prototype/shared/url/format.server.d.ts +27 -0
- package/dist/core/prototype/shared/url/format.server.js +38 -0
- package/dist/core/prototype/shared/url/hooks/create-paths.server.d.ts +2 -0
- package/dist/core/prototype/shared/url/hooks/create-paths.server.js +9 -0
- package/dist/core/prototype/shared/url/hooks/detach-paths.server.d.ts +5 -0
- package/dist/core/prototype/shared/url/hooks/detach-paths.server.js +18 -0
- package/dist/core/prototype/shared/url/hooks/index.server.d.ts +5 -1
- package/dist/core/prototype/shared/url/hooks/index.server.js +5 -1
- package/dist/core/prototype/shared/url/hooks/set-area-url.server.d.ts +2 -0
- package/dist/core/prototype/shared/url/hooks/set-area-url.server.js +8 -0
- package/dist/core/prototype/shared/url/hooks/set-live-url.server.d.ts +5 -0
- package/dist/core/prototype/shared/url/hooks/set-live-url.server.js +19 -0
- package/dist/core/prototype/shared/url/hooks/sync-paths.server.d.ts +7 -0
- package/dist/core/prototype/shared/url/hooks/sync-paths.server.js +37 -0
- package/dist/core/prototype/shared/url/refresh.server.d.ts +36 -0
- package/dist/core/prototype/shared/url/refresh.server.js +58 -0
- package/dist/core/prototype/shared/versions/configure.server.js +3 -0
- package/dist/core/routes/context.server.d.ts +2 -1
- package/dist/fields/blocks/component/AddBlockButton.svelte +48 -137
- package/dist/fields/blocks/component/Block.svelte +153 -117
- package/dist/fields/blocks/component/Block.svelte.d.ts +11 -5
- package/dist/fields/blocks/component/BlockActions.svelte +76 -26
- package/dist/fields/blocks/component/BlockActions.svelte.d.ts +3 -0
- package/dist/fields/blocks/component/Blocks.svelte +248 -91
- package/dist/fields/blocks/component/focus/BlocksFocus.svelte +680 -0
- package/dist/fields/blocks/component/focus/BlocksFocus.svelte.d.ts +7 -0
- package/dist/fields/blocks/component/focus/Layers.svelte +145 -0
- package/dist/fields/blocks/component/focus/Layers.svelte.d.ts +9 -0
- package/dist/fields/blocks/component/focus/LayersList.svelte +304 -0
- package/dist/fields/blocks/component/focus/LayersList.svelte.d.ts +10 -0
- package/dist/fields/blocks/component/focus/Palette.svelte +135 -0
- package/dist/fields/blocks/component/focus/Palette.svelte.d.ts +9 -0
- package/dist/fields/blocks/component/focus/RenderPlaceholder.svelte +77 -0
- package/dist/fields/blocks/component/focus/RenderPlaceholder.svelte.d.ts +10 -0
- package/dist/fields/blocks/component/focus/Renders.svelte +302 -0
- package/dist/fields/blocks/component/focus/Renders.svelte.d.ts +11 -0
- package/dist/fields/blocks/component/focus/Stage.svelte +190 -0
- package/dist/fields/blocks/component/focus/Stage.svelte.d.ts +8 -0
- package/dist/fields/blocks/component/focus/StagePlaceholder.svelte +69 -0
- package/dist/fields/blocks/component/focus/StagePlaceholder.svelte.d.ts +3 -0
- package/dist/fields/blocks/component/focus/focus.svelte.d.ts +140 -0
- package/dist/fields/blocks/component/focus/focus.svelte.js +424 -0
- package/dist/fields/blocks/component/picker/BlockPicker.svelte +88 -0
- package/dist/fields/blocks/component/picker/BlockPicker.svelte.d.ts +10 -0
- package/dist/fields/blocks/component/picker/BlockTile.svelte +121 -0
- package/dist/fields/blocks/component/picker/BlockTile.svelte.d.ts +12 -0
- package/dist/fields/blocks/index.d.ts +49 -7
- package/dist/fields/blocks/index.js +61 -12
- package/dist/fields/checkbox/component/Checkbox.svelte +11 -37
- package/dist/fields/checkbox/component/Checkbox.svelte.d.ts +1 -0
- package/dist/fields/combobox/component/ComboBox.svelte +37 -7
- package/dist/fields/combobox/component/combobox.css +26 -10
- package/dist/fields/date/component/Date.svelte +43 -12
- package/dist/fields/group/component/Group.svelte +110 -41
- package/dist/fields/group/index.d.ts +5 -1
- package/dist/fields/group/index.js +10 -2
- package/dist/fields/link/component/Link.svelte +184 -143
- package/dist/fields/link/component/RessourceInput.svelte +26 -24
- package/dist/fields/link/index.d.ts +1 -0
- package/dist/fields/link/module.server.js +2 -4
- package/dist/fields/number/component/Number.svelte +38 -20
- package/dist/fields/number/component/number.css +22 -20
- package/dist/fields/number/index.d.ts +1 -0
- package/dist/fields/radio/component/Radio.svelte +12 -0
- package/dist/fields/radio/index.js +1 -1
- package/dist/fields/relation/component/Relation.svelte +169 -40
- package/dist/fields/relation/component/RelationInline.svelte +258 -0
- package/dist/fields/relation/component/RelationInline.svelte.d.ts +26 -0
- package/dist/fields/relation/component/default/Default.svelte +210 -100
- package/dist/fields/relation/component/default/Default.svelte.d.ts +14 -1
- package/dist/fields/relation/component/types.d.ts +4 -0
- package/dist/fields/relation/component/upload/Browse.svelte +619 -88
- package/dist/fields/relation/component/upload/Browse.svelte.d.ts +10 -2
- package/dist/fields/relation/component/upload/Create.svelte +41 -0
- package/dist/fields/relation/component/upload/Create.svelte.d.ts +13 -0
- package/dist/fields/relation/component/upload/Upload.svelte +287 -101
- package/dist/fields/relation/component/upload/Upload.svelte.d.ts +6 -1
- package/dist/fields/relation/component/upload/upload.css +5 -81
- package/dist/fields/relation/module.server.js +7 -1
- package/dist/fields/relation/value.d.ts +25 -0
- package/dist/fields/relation/value.js +27 -0
- package/dist/fields/rich-text/component/RichText.svelte +12 -80
- package/dist/fields/rich-text/component/RichText.svelte.d.ts +1 -1
- package/dist/fields/rich-text/component/RichTextInline.svelte +28 -0
- package/dist/fields/rich-text/component/RichTextInline.svelte.d.ts +11 -0
- package/dist/fields/rich-text/component/bubble-menu/bubble-menu.css +4 -3
- package/dist/fields/rich-text/component/bubble-menu/bubble-menu.svelte +3 -1
- package/dist/fields/rich-text/component/bubble-menu/icon-button/icon-button.css +2 -2
- package/dist/fields/rich-text/component/bubble-menu/node-selector/node-selector.css +7 -10
- package/dist/fields/rich-text/component/drag-handle/drag-handle.css +0 -2
- package/dist/fields/rich-text/component/styles/editor.css +111 -0
- package/dist/fields/rich-text/component/styles/field.css +71 -0
- package/dist/fields/rich-text/component/suggestion/suggestion.svelte +41 -56
- package/dist/fields/rich-text/core/build-editor-config.js +1 -1
- package/dist/fields/rich-text/core/extensions/drag-handle/drag-handle-plugin.js +29 -3
- package/dist/fields/rich-text/core/extensions/drag-handle/drag-handle.d.ts +1 -0
- package/dist/fields/rich-text/core/extensions/drag-handle/drag-handle.js +2 -1
- package/dist/fields/rich-text/core/features/fields/fields.css +2 -3
- package/dist/fields/rich-text/core/features/hr/hr.css +4 -4
- package/dist/fields/rich-text/core/features/link/component/link-selector.css +0 -4
- package/dist/fields/rich-text/core/features/link/component/link-selector.svelte +24 -8
- package/dist/fields/rich-text/core/features/resource/resource.svelte +20 -6
- package/dist/fields/rich-text/core/features/upload/upload.svelte +20 -8
- package/dist/fields/rich-text/core/rich-text-editor-core.svelte +103 -0
- package/dist/fields/rich-text/core/rich-text-editor-core.svelte.d.ts +15 -0
- package/dist/fields/select/component/Select.svelte +67 -28
- package/dist/fields/slug/component/Slug.svelte +26 -53
- package/dist/fields/slug/index.d.ts +1 -0
- package/dist/fields/slug/index.js +1 -1
- package/dist/fields/tabs/component/Tabs.svelte +28 -22
- package/dist/fields/tabs/index.d.ts +4 -1
- package/dist/fields/tabs/index.js +17 -5
- package/dist/fields/text/index.d.ts +1 -0
- package/dist/fields/textarea/component/TextArea.svelte +28 -13
- package/dist/fields/textarea/index.d.ts +1 -0
- package/dist/fields/time/component/Time.svelte +9 -2
- package/dist/fields/toggle/component/Toggle.svelte +8 -25
- package/dist/fields/toggle/component/Toggle.svelte.d.ts +1 -0
- package/dist/fields/toggle/index.d.ts +1 -0
- package/dist/fields/tree/component/AddItemButton.svelte +18 -5
- package/dist/fields/tree/component/Tree.svelte +48 -19
- package/dist/fields/tree/component/TreeBlock.svelte +318 -104
- package/dist/fields/tree/component/TreeBlockActions.svelte +71 -7
- package/dist/fields/tree/component/TreeBlockActions.svelte.d.ts +4 -0
- package/dist/fields/tree/component/props.d.ts +2 -1
- package/dist/fields/tree/index.d.ts +13 -1
- package/dist/fields/tree/index.js +35 -9
- package/dist/fields/types.d.ts +3 -1
- package/dist/index.d.ts +4 -3
- package/dist/index.js +3 -2
- package/dist/panel/components/Root.svelte +16 -44
- package/dist/panel/components/Root.svelte.d.ts +1 -1
- package/dist/panel/components/fields/Error.svelte +18 -3
- package/dist/panel/components/fields/FieldsPreview.svelte +30 -17
- package/dist/panel/components/fields/FieldsPreviewTrigger.svelte +25 -3
- package/dist/panel/components/fields/Hint.svelte +51 -8
- package/dist/panel/components/fields/Hint.svelte.d.ts +11 -0
- package/dist/panel/components/fields/Label.svelte +2 -0
- package/dist/panel/components/fields/LabelFor.svelte +7 -2
- package/dist/panel/components/fields/RenderFields.svelte +10 -3
- package/dist/panel/components/fields/fieldset.svelte.d.ts +4 -1
- package/dist/panel/components/fields/fieldset.svelte.js +9 -2
- package/dist/panel/components/fields/index.d.ts +1 -0
- package/dist/panel/components/fields/setting.css +82 -0
- package/dist/panel/components/sections/auth/AuthForm.svelte +25 -26
- package/dist/panel/components/sections/collection/Avatar.svelte +61 -0
- package/dist/panel/components/sections/collection/Avatar.svelte.d.ts +9 -0
- package/dist/panel/components/sections/collection/DocStatus.svelte +28 -0
- package/dist/panel/components/sections/collection/DocStatus.svelte.d.ts +7 -0
- package/dist/panel/components/sections/collection/Empty.svelte +3 -3
- package/dist/panel/components/sections/collection/StatusDot.svelte +7 -5
- package/dist/panel/components/sections/collection/When.svelte +33 -0
- package/dist/panel/components/sections/collection/When.svelte.d.ts +8 -0
- package/dist/panel/components/sections/collection/bulk-upload/BulkUploadDialog.svelte +65 -21
- package/dist/panel/components/sections/collection/bulk-upload/BulkUploadDialog.svelte.d.ts +3 -2
- package/dist/panel/components/sections/collection/bulk-upload/DropZone.svelte +45 -162
- package/dist/panel/components/sections/collection/bulk-upload/DropZone.svelte.d.ts +3 -2
- package/dist/panel/components/sections/collection/bulk-upload/FileDrop.svelte +151 -0
- package/dist/panel/components/sections/collection/bulk-upload/FileDrop.svelte.d.ts +17 -0
- package/dist/panel/components/sections/collection/bulk-upload/PageDrop.svelte +177 -0
- package/dist/panel/components/sections/collection/bulk-upload/PageDrop.svelte.d.ts +12 -0
- package/dist/panel/components/sections/collection/bulk-upload/UploadProgress.svelte +75 -0
- package/dist/panel/components/sections/collection/bulk-upload/UploadProgress.svelte.d.ts +8 -0
- package/dist/panel/components/sections/collection/folder/Folder.svelte +18 -3
- package/dist/panel/components/sections/collection/folder/FolderEdit.svelte +26 -18
- package/dist/panel/components/sections/collection/folder/FolderWithActions.svelte +98 -58
- package/dist/panel/components/sections/collection/folder/FolderWithActions.svelte.d.ts +0 -1
- package/dist/panel/components/sections/collection/folder/Folders.svelte +60 -0
- package/dist/panel/components/sections/collection/folder/Folders.svelte.d.ts +7 -0
- package/dist/panel/components/sections/collection/grid/CollectionGrid.svelte +31 -71
- package/dist/panel/components/sections/collection/grid/CollectionGrid.svelte.d.ts +1 -0
- package/dist/panel/components/sections/collection/grid/create-directory-dialog/CreateDirectoryDialog.svelte +5 -3
- package/dist/panel/components/sections/collection/grid/grid-item/GridItem.svelte +250 -37
- package/dist/panel/components/sections/collection/grid/grid-item/GridItem.svelte.d.ts +2 -0
- package/dist/panel/components/sections/collection/header/ButtonCreate.svelte +43 -18
- package/dist/panel/components/sections/collection/header/ButtonCreate.svelte.d.ts +6 -4
- package/dist/panel/components/sections/collection/header/DisplayMode.svelte +69 -58
- package/dist/panel/components/sections/collection/header/DisplayMode.svelte.d.ts +0 -1
- package/dist/panel/components/sections/collection/header/FilterMenu.svelte +60 -0
- package/dist/panel/components/sections/collection/header/FilterMenu.svelte.d.ts +14 -0
- package/dist/panel/components/sections/collection/header/SearchInput.svelte +17 -26
- package/dist/panel/components/sections/collection/header/SelectUI.svelte +19 -34
- package/dist/panel/components/sections/collection/list/CollectionList.svelte +99 -68
- package/dist/panel/components/sections/collection/list/columns.d.ts +21 -0
- package/dist/panel/components/sections/collection/list/columns.js +23 -0
- package/dist/panel/components/sections/collection/list/header/Header.svelte +99 -51
- package/dist/panel/components/sections/collection/list/row/Row.svelte +165 -82
- package/dist/panel/components/sections/collection/list/row/Row.svelte.d.ts +4 -0
- package/dist/panel/components/sections/collection/tree/CollectionTree.svelte +92 -44
- package/dist/panel/components/sections/collection/tree/CollectionTree.svelte.d.ts +1 -0
- package/dist/panel/components/sections/collection/tree/CollectionTreeNode.svelte +139 -43
- package/dist/panel/components/sections/collection/tree/CollectionTreeNode.svelte.d.ts +2 -0
- package/dist/panel/components/sections/collection/upload-thumb-cell/UploadThumbCell.svelte +1 -1
- package/dist/panel/components/sections/commands/CommandButton.svelte +99 -0
- package/dist/panel/components/sections/commands/CommandButton.svelte.d.ts +10 -0
- package/dist/panel/components/sections/commands/CommandPalette.svelte +275 -0
- package/dist/panel/components/sections/commands/CommandPalette.svelte.d.ts +8 -0
- package/dist/panel/components/sections/commands/Commands.svelte +18 -0
- package/dist/panel/components/sections/commands/Commands.svelte.d.ts +9 -0
- package/dist/panel/components/sections/document/AuthAPIKeyDialog.svelte +23 -7
- package/dist/panel/components/sections/document/AuthFooter.svelte +31 -12
- package/dist/panel/components/sections/document/AutoSaveBanner.svelte +24 -7
- package/dist/panel/components/sections/document/ButtonSave.svelte +32 -21
- package/dist/panel/components/sections/document/ButtonSave.svelte.d.ts +5 -5
- package/dist/panel/components/sections/document/ButtonStatus.svelte +68 -20
- package/dist/panel/components/sections/document/ChangeSlugDialog.svelte +199 -0
- package/dist/panel/components/sections/document/ChangeSlugDialog.svelte.d.ts +10 -0
- package/dist/panel/components/sections/document/CurrentlyEdited.svelte +2 -2
- package/dist/panel/components/sections/document/Document.svelte +96 -65
- package/dist/panel/components/sections/document/DocumentChildren.svelte +175 -0
- package/dist/panel/components/sections/document/DocumentChildren.svelte.d.ts +8 -0
- package/dist/panel/components/sections/document/DocumentUrl.svelte +119 -0
- package/dist/panel/components/sections/document/DocumentUrl.svelte.d.ts +9 -0
- package/dist/panel/components/sections/document/Header.svelte +171 -94
- package/dist/panel/components/sections/document/Settings.svelte +255 -110
- package/dist/panel/components/sections/document/Settings.svelte.d.ts +0 -1
- package/dist/panel/components/sections/document/Versions.svelte +5 -3
- package/dist/panel/components/sections/document/upload-header/UploadHeader.svelte +112 -53
- package/dist/panel/components/sections/document/upload-header/UploadHeader.svelte.d.ts +2 -2
- package/dist/panel/components/sections/document/upload-header/drop-zone/DropZone.svelte +74 -41
- package/dist/panel/components/sections/document/upload-header/drop-zone/DropZone.svelte.d.ts +1 -1
- package/dist/panel/components/sections/live/LiveEdit.svelte +2 -2
- package/dist/panel/components/sections/live/LiveFloatingUI.svelte +30 -11
- package/dist/panel/components/sections/live/live-edit-panel.css +2 -2
- package/dist/panel/components/sections/page-layout/Page.svelte +13 -1
- package/dist/panel/components/ui/breadcrumb/BreadCrumb.svelte +55 -27
- package/dist/panel/components/ui/button/button.svelte +81 -54
- package/dist/panel/components/ui/button/index.d.ts +7 -3
- package/dist/panel/components/ui/button/index.js +2 -2
- package/dist/panel/components/ui/calendar/calendar.css +27 -27
- package/dist/panel/components/ui/calendar/calendar.svelte.d.ts +1 -1
- package/dist/panel/components/ui/card/card-description.svelte +1 -1
- package/dist/panel/components/ui/card/card.svelte +21 -4
- package/dist/panel/components/ui/card-document/card-document.svelte +24 -12
- package/dist/panel/components/ui/card-resource/card-resource.svelte +26 -8
- package/dist/panel/components/ui/checkbox/checkbox.css +8 -10
- package/dist/panel/components/ui/command/command-dialog.css +28 -4
- package/dist/panel/components/ui/command/command-dialog.svelte +4 -1
- package/dist/panel/components/ui/command/command-dialog.svelte.d.ts +2 -0
- package/dist/panel/components/ui/command/command-empty.css +1 -1
- package/dist/panel/components/ui/command/command-group.css +3 -3
- package/dist/panel/components/ui/command/command-input-select.svelte +3 -3
- package/dist/panel/components/ui/command/command-input.svelte +38 -14
- package/dist/panel/components/ui/command/command-input.svelte.d.ts +6 -1
- package/dist/panel/components/ui/command/command-item.css +2 -2
- package/dist/panel/components/ui/command/command-list.css +1 -1
- package/dist/panel/components/ui/command/command-separator.css +1 -1
- package/dist/panel/components/ui/context-menu/context-menu-item.css +2 -2
- package/dist/panel/components/ui/context-menu/context-menu.css +6 -7
- package/dist/panel/components/ui/dialog/dialog-content.css +8 -10
- package/dist/panel/components/ui/dialog/dialog-content.svelte +19 -0
- package/dist/panel/components/ui/dialog/dialog-description.css +1 -1
- package/dist/panel/components/ui/dialog/dialog-footer.svelte +5 -1
- package/dist/panel/components/ui/dialog/dialog-overlay.css +1 -1
- package/dist/panel/components/ui/dropdown-menu/dropdown-menu-checkbox-item.svelte +19 -5
- package/dist/panel/components/ui/dropdown-menu/dropdown-menu-content.css +6 -4
- package/dist/panel/components/ui/dropdown-menu/dropdown-menu-item.css +1 -1
- package/dist/panel/components/ui/dropdown-menu/dropdown-menu-radio-item.css +1 -1
- package/dist/panel/components/ui/dropdown-menu/dropdown-menu-separator.css +1 -1
- package/dist/panel/components/ui/input/input.svelte +57 -31
- package/dist/panel/components/ui/kbd/Kbd.svelte +90 -0
- package/dist/panel/components/ui/kbd/Kbd.svelte.d.ts +11 -0
- package/dist/panel/components/ui/kbd/index.d.ts +1 -0
- package/dist/panel/components/ui/kbd/index.js +1 -0
- package/dist/panel/components/ui/label/label.css +5 -3
- package/dist/panel/components/ui/language-switcher/LanguageSwitcher.svelte +27 -15
- package/dist/panel/components/ui/nav/Nav.svelte +180 -110
- package/dist/panel/components/ui/nav/Nav.svelte.d.ts +0 -2
- package/dist/panel/components/ui/nav/NavGroup.svelte +87 -73
- package/dist/panel/components/ui/nav/NavItemButton.svelte +69 -29
- package/dist/panel/components/ui/nav/UserButton.svelte +132 -71
- package/dist/panel/components/ui/page-header/PageHeader.svelte +140 -42
- package/dist/panel/components/ui/page-header/PageHeader.svelte.d.ts +8 -1
- package/dist/panel/components/ui/popover/popover-content.css +4 -3
- package/dist/panel/components/ui/radio-group/radio-group.css +4 -6
- package/dist/panel/components/ui/radio-row-group/radio-row-group.css +19 -7
- package/dist/panel/components/ui/scroll-area/scroll-area.css +2 -2
- package/dist/panel/components/ui/separator/separator.svelte +1 -1
- package/dist/panel/components/ui/sheet/index.d.ts +4 -4
- package/dist/panel/components/ui/sheet/index.js +5 -5
- package/dist/panel/components/ui/sheet/sheet.css +50 -11
- package/dist/panel/components/ui/sonner/sonner.css +11 -8
- package/dist/panel/components/ui/switch/switch.css +13 -18
- package/dist/panel/components/ui/tabs/tabs.css +44 -35
- package/dist/panel/components/ui/tag/tag.svelte +20 -6
- package/dist/panel/components/ui/tooltip/tooltip-content.svelte +14 -4
- package/dist/panel/components/ui/tree/tree-rows.css +146 -0
- package/dist/panel/context/blocks-ops.d.ts +78 -0
- package/dist/panel/context/blocks-ops.js +170 -0
- package/dist/panel/context/collection.svelte.d.ts +28 -0
- package/dist/panel/context/collection.svelte.js +120 -65
- package/dist/panel/context/commands.svelte.d.ts +80 -0
- package/dist/panel/context/commands.svelte.js +108 -0
- package/dist/panel/context/documentForm.svelte.d.ts +34 -2
- package/dist/panel/context/documentForm.svelte.js +105 -102
- package/dist/panel/context/live.svelte.js +2 -73
- package/dist/panel/context/nav.svelte.d.ts +23 -0
- package/dist/panel/context/nav.svelte.js +56 -0
- package/dist/panel/fonts/Geist-VariableFont_wght.ttf +0 -0
- package/dist/panel/fonts/GeistMono-VariableFont_wght.ttf +0 -0
- package/dist/panel/index.d.ts +7 -1
- package/dist/panel/index.js +10 -1
- package/dist/panel/pages/auth/forgot-password/ForgotPassword.svelte +16 -1
- package/dist/panel/pages/collection/CollectionPage.svelte +236 -61
- package/dist/panel/pages/collection/load.server.js +1 -1
- package/dist/panel/pages/dashboard/Dashboard.svelte +135 -90
- package/dist/panel/pages/dashboard/DashboardCard.svelte +109 -0
- package/dist/panel/pages/dashboard/DashboardCard.svelte.d.ts +14 -0
- package/dist/panel/pages/dashboard/DashboardCollection.svelte +180 -57
- package/dist/panel/pages/dashboard/DashboardCollection.svelte.d.ts +1 -0
- package/dist/panel/pages/dashboard/DashboardRow.svelte +93 -0
- package/dist/panel/pages/dashboard/DashboardRow.svelte.d.ts +16 -0
- package/dist/panel/pages/dashboard/load.server.js +49 -25
- package/dist/panel/pages/dashboard/time.d.ts +19 -0
- package/dist/panel/pages/dashboard/time.js +29 -0
- package/dist/panel/pages/dashboard/types.d.ts +9 -2
- package/dist/panel/pages/live/Live.svelte +53 -50
- package/dist/panel/style/font.css +21 -32
- package/dist/panel/style/index.css +191 -122
- package/dist/panel/style/mixins/index.css +14 -0
- package/dist/panel/style/palette.css +35 -26
- package/dist/panel/style/postcss/size-function.d.ts +4 -0
- package/dist/panel/style/postcss/size-function.js +24 -0
- package/dist/panel/style/radius.css +4 -5
- package/dist/panel/style/scheme.css +111 -0
- package/dist/panel/style/size.css +3 -0
- package/dist/panel/util/Sortable.js +9 -4
- package/dist/panel/util/keys.d.ts +24 -0
- package/dist/panel/util/keys.js +63 -0
- package/dist/panel/util/populate.d.ts +8 -0
- package/dist/panel/util/populate.js +49 -0
- package/dist/panel/util/time.d.ts +12 -0
- package/dist/panel/util/time.js +35 -0
- package/dist/panel/util/upload-file.d.ts +106 -0
- package/dist/panel/util/upload-file.js +165 -0
- package/dist/util/index.d.ts +7 -10
- package/dist/util/index.js +7 -8
- package/dist/util/object.d.ts +10 -0
- package/dist/util/object.js +22 -1
- package/dist/util/string.d.ts +17 -0
- package/dist/util/string.js +23 -0
- package/package.json +1 -3
- package/dist/core/pipeline/config-map/build-tree-map.d.ts +0 -4
- package/dist/core/pipeline/config-map/build-tree-map.js +0 -30
- package/dist/core/prototype/doc.d.ts +0 -31
- package/dist/core/prototype/doc.js +0 -118
- package/dist/core/prototype/shared/url/augment.d.ts +0 -13
- package/dist/core/prototype/shared/url/augment.js +0 -11
- package/dist/core/prototype/shared/url/hooks/populate-url.server.d.ts +0 -4
- package/dist/core/prototype/shared/url/hooks/populate-url.server.js +0 -120
- package/dist/fields/rich-text/component/styles/rich-text.css +0 -183
- package/dist/panel/components/sections/collection/header/Header.svelte +0 -17
- package/dist/panel/components/sections/collection/header/Header.svelte.d.ts +0 -3
- package/dist/panel/components/sections/collection/header/Separator.svelte +0 -8
- package/dist/panel/components/sections/collection/header/Separator.svelte.d.ts +0 -26
- package/dist/panel/components/sections/collection/tree/util.d.ts +0 -12
- package/dist/panel/components/sections/collection/tree/util.js +0 -22
- package/dist/panel/fonts/ChivoMono-Italic-VariableFont_wght.ttf +0 -0
- package/dist/panel/fonts/ChivoMono-VariableFont_wght.ttf +0 -0
- package/dist/panel/fonts/Inter-VariableFont_slnt,wght.ttf +0 -0
- package/dist/panel/fonts/Lora-Italic-VariableFont_wght.ttf +0 -0
- package/dist/panel/fonts/Lora-VariableFont_wght.ttf +0 -0
- package/dist/panel/style/shadow.css +0 -10
- package/dist/util/path.d.ts +0 -16
- package/dist/util/path.js +0 -19
|
@@ -7,60 +7,94 @@
|
|
|
7
7
|
import Button from '../../../panel/components/ui/button/button.svelte';
|
|
8
8
|
import { getLocaleContext } from '../../../panel/context/locale.svelte';
|
|
9
9
|
import { useSortable } from '../../../panel/util/Sortable.js';
|
|
10
|
-
import {
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
10
|
+
import { normalizeFieldPath } from '../../../util/string.js';
|
|
11
|
+
import { Download, Maximize2 } from '@lucide/svelte';
|
|
12
|
+
import { onMount } from 'svelte';
|
|
13
|
+
import { SvelteSet } from 'svelte/reactivity';
|
|
13
14
|
import AddBlockButton from './AddBlockButton.svelte';
|
|
14
15
|
import Block from './Block.svelte';
|
|
16
|
+
import { getBlocksFocusContext } from './focus/focus.svelte.js';
|
|
15
17
|
import type { BlocksProps } from './props.js';
|
|
16
18
|
|
|
17
19
|
const { path, config, form }: BlocksProps = $props();
|
|
18
20
|
|
|
19
|
-
|
|
21
|
+
/** The document's focus mode, absent in a nested form. */
|
|
22
|
+
const focus = getBlocksFocusContext();
|
|
23
|
+
const list = $derived(normalizeFieldPath(path));
|
|
24
|
+
const summary = $derived(config.get.layout === 'summary' && !!focus);
|
|
20
25
|
|
|
21
26
|
const field = $derived(form.useField(path, config));
|
|
22
27
|
const blockState = $derived(form.useBlocks(path));
|
|
23
|
-
const
|
|
24
|
-
let sortingInitialized = $state(false);
|
|
28
|
+
const count = $derived(blockState.blocks.length);
|
|
25
29
|
let sorting = $state(false);
|
|
26
|
-
let sortableInstance = $state<any>(null);
|
|
27
|
-
let blocksComponents: ReturnType<typeof Block>[] = $state([]);
|
|
28
30
|
|
|
29
31
|
const locale = getLocaleContext();
|
|
30
32
|
|
|
33
|
+
/**
|
|
34
|
+
* The blocks shown open, by id; the others are rows. The browser keeps the open ones:
|
|
35
|
+
* `rz-block-open:<id>` is set while a block is open.
|
|
36
|
+
*/
|
|
37
|
+
const OPEN_KEY = 'rz-block-open:';
|
|
38
|
+
const opened = new SvelteSet<string>();
|
|
39
|
+
const anyOpen = $derived(blockState.blocks.some((block) => opened.has(block.id)));
|
|
40
|
+
|
|
41
|
+
onMount(() => {
|
|
42
|
+
for (const block of blockState.blocks) {
|
|
43
|
+
if (localStorage.getItem(OPEN_KEY + block.id)) opened.add(block.id);
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
function setOpen(id: string, open: boolean) {
|
|
48
|
+
if (open) {
|
|
49
|
+
opened.add(id);
|
|
50
|
+
localStorage.setItem(OPEN_KEY + id, '1');
|
|
51
|
+
} else {
|
|
52
|
+
opened.delete(id);
|
|
53
|
+
localStorage.removeItem(OPEN_KEY + id);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
function toggleAll() {
|
|
58
|
+
const open = !anyOpen;
|
|
59
|
+
for (const block of blockState.blocks) setOpen(block.id, open);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/** A block added from the form opens, its fields ready to fill. */
|
|
63
|
+
const add = (options: Omit<GenericBlock, 'id' | 'path'>) => {
|
|
64
|
+
blockState.addBlock({ ...options, position: count });
|
|
65
|
+
const added = blockState.blocks.at(-1);
|
|
66
|
+
if (added) setOpen(added.id, true);
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
/** The copy opens when the block it copies is open. */
|
|
70
|
+
const duplicate = (index: number) => {
|
|
71
|
+
const source = blockState.blocks[index];
|
|
72
|
+
blockState.duplicateBlock(index);
|
|
73
|
+
const copy = blockState.blocks[index + 1];
|
|
74
|
+
if (source && copy && opened.has(source.id)) setOpen(copy.id, true);
|
|
75
|
+
};
|
|
76
|
+
|
|
31
77
|
// svelte-ignore state_referenced_locally
|
|
32
|
-
const
|
|
78
|
+
const { sortable } = useSortable({
|
|
33
79
|
handle: '.rz-block__grip',
|
|
34
80
|
group: path,
|
|
35
81
|
animation: 150,
|
|
36
82
|
onStart: () => (sorting = true),
|
|
37
83
|
onUnchoose: () => (sorting = false),
|
|
38
|
-
onEnd:
|
|
39
|
-
const { oldIndex, newIndex } =
|
|
84
|
+
onEnd: (event) => {
|
|
85
|
+
const { oldIndex, newIndex } = event;
|
|
40
86
|
if (oldIndex !== undefined && newIndex !== undefined) {
|
|
41
87
|
blockState.moveBlock(oldIndex, newIndex);
|
|
42
88
|
}
|
|
43
89
|
sorting = false;
|
|
44
90
|
}
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
const add = (options: Omit<GenericBlock, 'id' | 'path'>) => {
|
|
48
|
-
blockState.addBlock({
|
|
49
|
-
...options,
|
|
50
|
-
position: blockState.blocks.length
|
|
51
|
-
});
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
const shouldInit = $derived(!sortingInitialized && blockState.blocks.length > 0);
|
|
55
|
-
const { sortable } = useSortable(sortableOptions);
|
|
56
|
-
|
|
57
|
-
$effect(() => {
|
|
58
|
-
if (shouldInit) {
|
|
59
|
-
sortableInstance = sortable(blockList);
|
|
60
|
-
sortingInitialized = true;
|
|
61
|
-
}
|
|
62
91
|
});
|
|
63
92
|
|
|
93
|
+
function sortableList(node: HTMLElement) {
|
|
94
|
+
const instance = sortable(node);
|
|
95
|
+
return { destroy: () => instance.destroy() };
|
|
96
|
+
}
|
|
97
|
+
|
|
64
98
|
function getConfigByBlockType(type: string): BlocksFieldBlock {
|
|
65
99
|
const blockConfig = config.get.blocks.find((b) => type === b.name);
|
|
66
100
|
if (!blockConfig) {
|
|
@@ -68,104 +102,227 @@
|
|
|
68
102
|
}
|
|
69
103
|
return blockConfig.block;
|
|
70
104
|
}
|
|
71
|
-
|
|
72
|
-
function collapseAll() {
|
|
73
|
-
blocksComponents.forEach((comp) => comp.setCollapse(true));
|
|
74
|
-
}
|
|
75
|
-
function expandAll() {
|
|
76
|
-
blocksComponents.forEach((comp) => comp.setCollapse(false));
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
onDestroy(() => {
|
|
80
|
-
if (sortableInstance) sortableInstance.destroy();
|
|
81
|
-
});
|
|
82
105
|
</script>
|
|
83
106
|
|
|
84
107
|
<fieldset class="rz-field-blocks {config.get.className || ''}" use:fieldset={field}>
|
|
85
|
-
|
|
108
|
+
<!-- The label's line: its name, and on the right the ways to see the blocks. -->
|
|
109
|
+
<div class="rz-blocks__header">
|
|
110
|
+
<Field.Label {config} />
|
|
111
|
+
<div class="rz-blocks__actions">
|
|
112
|
+
{#if !summary && count > 1}
|
|
113
|
+
<Button variant="ghost" size="sm" onclick={toggleAll}>
|
|
114
|
+
{anyOpen ? t__('fields.collapse_all') : t__('fields.expand_all')}
|
|
115
|
+
</Button>
|
|
116
|
+
{/if}
|
|
117
|
+
{#if focus && !summary}
|
|
118
|
+
<Button
|
|
119
|
+
variant="ghost"
|
|
120
|
+
size="sm"
|
|
121
|
+
icon={Maximize2}
|
|
122
|
+
onclick={() => focus.open(list)}
|
|
123
|
+
data-focus-open={list}
|
|
124
|
+
>
|
|
125
|
+
{t__('fields.open_editor')}
|
|
126
|
+
</Button>
|
|
127
|
+
{/if}
|
|
128
|
+
</div>
|
|
129
|
+
</div>
|
|
130
|
+
<Field.Hint {config} />
|
|
86
131
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
{
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
</
|
|
95
|
-
<
|
|
132
|
+
{#if summary && focus}
|
|
133
|
+
<!-- One row: how many blocks, and the way into focus mode where they are edited. -->
|
|
134
|
+
<div class="rz-blocks__summary">
|
|
135
|
+
<span class="rz-blocks__count">
|
|
136
|
+
{count === 1
|
|
137
|
+
? t__('fields.blocks_count', '1')
|
|
138
|
+
: t__('fields.blocks_count|m|p', String(count))}
|
|
139
|
+
</span>
|
|
140
|
+
<Button
|
|
141
|
+
onclick={() => focus.open(list)}
|
|
142
|
+
size="sm"
|
|
143
|
+
variant="ghost"
|
|
144
|
+
icon={Maximize2}
|
|
145
|
+
data-focus-open={list}
|
|
146
|
+
>
|
|
147
|
+
{t__('fields.edit')}
|
|
148
|
+
</Button>
|
|
96
149
|
</div>
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
<Button onclick={expandAll} size="xs" variant="outline">Expand all</Button>
|
|
101
|
-
</div>
|
|
102
|
-
{/if}
|
|
103
|
-
</header>
|
|
104
|
-
|
|
105
|
-
<div class="rz-blocks__list" data-empty={!hasBlocks ? '' : null} bind:this={blockList}>
|
|
106
|
-
{#if hasBlocks}
|
|
150
|
+
{:else}
|
|
151
|
+
<!-- One raised card, a row per block. -->
|
|
152
|
+
<div class="rz-blocks__list" data-empty={count ? null : ''} use:sortableList>
|
|
107
153
|
{#each blockState.blocks as block, index (block.id)}
|
|
108
154
|
<Block
|
|
109
|
-
|
|
155
|
+
open={opened.has(block.id)}
|
|
156
|
+
toggle={() => setOpen(block.id, !opened.has(block.id))}
|
|
110
157
|
deleteBlock={() => blockState.deleteBlock(index)}
|
|
111
|
-
duplicateBlock={() =>
|
|
158
|
+
duplicateBlock={() => duplicate(index)}
|
|
159
|
+
moveUp={index > 0 ? () => blockState.moveBlock(index, index - 1) : undefined}
|
|
160
|
+
moveDown={index < count - 1 ? () => blockState.moveBlock(index, index + 1) : undefined}
|
|
161
|
+
focusBlock={focus ? () => focus.open(list, `${list}.${index}`) : undefined}
|
|
112
162
|
{form}
|
|
113
163
|
{sorting}
|
|
114
164
|
path="{path}.{index}:{block.type}"
|
|
115
165
|
config={getConfigByBlockType(block.type)}
|
|
116
166
|
/>
|
|
117
167
|
{/each}
|
|
118
|
-
|
|
119
|
-
</div>
|
|
168
|
+
</div>
|
|
120
169
|
|
|
121
|
-
|
|
122
|
-
|
|
170
|
+
<div class="rz-blocks__actions-bottom">
|
|
171
|
+
<AddBlockButton addBlock={add} {config} />
|
|
123
172
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
173
|
+
{#if locale && locale.code !== locale.defaultCode && config.get.localized}
|
|
174
|
+
<Button icon={Download} size="sm" onclick={field.setValueFromDefaultLocale} variant="ghost">
|
|
175
|
+
{t__('fields.get_data_from')}
|
|
176
|
+
{locale.defaultCode}
|
|
177
|
+
</Button>
|
|
178
|
+
{/if}
|
|
179
|
+
</div>
|
|
180
|
+
{/if}
|
|
181
|
+
|
|
182
|
+
<Field.Error error={field.error} />
|
|
131
183
|
</fieldset>
|
|
132
184
|
|
|
133
|
-
<style
|
|
134
|
-
|
|
135
|
-
|
|
185
|
+
<style>/* A level: its fill, a hairline, its shadow. raised, float. */
|
|
186
|
+
|
|
187
|
+
/* A well: an input, a track, a dropzone. Its edge shows on hover. */
|
|
188
|
+
|
|
189
|
+
/* The hover tint, laid over the element's own fill. */
|
|
190
|
+
|
|
191
|
+
/* The picked item of a segmented control. */
|
|
192
|
+
|
|
193
|
+
/* The primary button's face: black on light, white on dark. */
|
|
194
|
+
|
|
195
|
+
/* Keyboard focus on a button, a tab, a link. */
|
|
196
|
+
|
|
197
|
+
/* A focused input: an accent edge and a soft halo. */
|
|
198
|
+
|
|
199
|
+
/* An input with an error. */
|
|
200
|
+
.rz-blocks__header {
|
|
201
|
+
display: flex;
|
|
202
|
+
align-items: center;
|
|
203
|
+
justify-content: space-between;
|
|
204
|
+
gap: var(--rz-size-2);
|
|
205
|
+
min-height: var(--rz-size-7);
|
|
206
|
+
margin-bottom: var(--rz-size-2);
|
|
207
|
+
|
|
208
|
+
:global(.rz-field-label) {
|
|
209
|
+
margin-bottom: 0;
|
|
210
|
+
min-width: 0;
|
|
211
|
+
}
|
|
136
212
|
}
|
|
137
213
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
214
|
+
.rz-blocks__header + :global(.rz-field-hint) {
|
|
215
|
+
margin-top: 0;
|
|
216
|
+
margin-bottom: var(--rz-size-2);
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
/* Small ghost buttons on the label's line and under the card, quiet until hovered. */
|
|
220
|
+
.rz-blocks__actions,
|
|
221
|
+
.rz-blocks__actions-bottom {
|
|
222
|
+
display: flex;
|
|
223
|
+
align-items: center;
|
|
224
|
+
gap: var(--rz-size-0-5);
|
|
225
|
+
|
|
226
|
+
:global(.rz-button:not(.rz-add-block)) {
|
|
227
|
+
height: var(--rz-size-6);
|
|
228
|
+
gap: var(--rz-size-1-5);
|
|
229
|
+
padding-inline: var(--rz-size-2);
|
|
230
|
+
color: var(--rz-fg-muted);
|
|
231
|
+
font-size: var(--rz-text-sm);
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
:global(.rz-button__icon) {
|
|
235
|
+
width: auto;
|
|
236
|
+
height: auto;
|
|
237
|
+
color: var(--rz-fg-subtle);
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
:global(.rz-button:hover:not(:disabled)),
|
|
241
|
+
:global(.rz-button:hover:not(:disabled) .rz-button__icon) {
|
|
242
|
+
color: var(--rz-fg);
|
|
243
|
+
}
|
|
141
244
|
}
|
|
142
245
|
|
|
143
246
|
.rz-blocks__actions {
|
|
144
|
-
|
|
247
|
+
margin-right: calc(-2 * var(--rz-unit));
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
.rz-blocks__summary {
|
|
145
251
|
display: flex;
|
|
146
|
-
align-items:
|
|
147
|
-
|
|
252
|
+
align-items: center;
|
|
253
|
+
justify-content: space-between;
|
|
254
|
+
gap: var(--rz-size-4);
|
|
255
|
+
min-height: var(--rz-size-11);
|
|
256
|
+
padding: 0 var(--rz-size-1-5) 0 var(--rz-size-3-5);
|
|
257
|
+
background-color: var(--rz-bg-raised);
|
|
258
|
+
box-shadow:
|
|
259
|
+
0 0 0 1px var(--rz-border),
|
|
260
|
+
var(--rz-shadow-raised);
|
|
261
|
+
border-radius: var(--rz-radius-xl);
|
|
262
|
+
|
|
263
|
+
:global(.rz-button) {
|
|
264
|
+
height: var(--rz-size-7);
|
|
265
|
+
color: var(--rz-fg-muted);
|
|
266
|
+
}
|
|
267
|
+
:global(.rz-button:hover:not(:disabled)) {
|
|
268
|
+
color: var(--rz-fg);
|
|
269
|
+
}
|
|
148
270
|
}
|
|
149
271
|
|
|
272
|
+
.rz-blocks__count {
|
|
273
|
+
font-size: var(--rz-text-md);
|
|
274
|
+
color: var(--rz-fg-subtle);
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
/* One raised card, the blocks its rows, a hairline between two. */
|
|
150
278
|
.rz-blocks__list {
|
|
279
|
+
--rz-blocks-radius: var(--rz-radius-xl);
|
|
151
280
|
display: grid;
|
|
152
|
-
|
|
281
|
+
/* One column the card's width: a long preview ellipsizes instead of widening the row. */
|
|
282
|
+
grid-template-columns: minmax(0, 1fr);
|
|
283
|
+
border-radius: var(--rz-blocks-radius);
|
|
153
284
|
|
|
154
285
|
&:not([data-empty]) {
|
|
155
|
-
|
|
286
|
+
background-color: var(--rz-bg-raised);
|
|
287
|
+
box-shadow:
|
|
288
|
+
0 0 0 1px var(--rz-border),
|
|
289
|
+
var(--rz-shadow-raised);
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
> :global(.rz-block + .rz-block) {
|
|
293
|
+
border-top: 1px solid var(--rz-border);
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
/* An open block draws its own edge. */
|
|
297
|
+
> :global(.rz-block[data-open] + .rz-block) {
|
|
298
|
+
border-top-color: transparent;
|
|
156
299
|
}
|
|
157
300
|
}
|
|
158
301
|
|
|
159
|
-
.
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
302
|
+
/* Inside a group, a block, a tree item or a stage card: a hairline, no second fill. */
|
|
303
|
+
:global(.rz-group-field__content) :is(.rz-blocks__list:not([data-empty]), .rz-blocks__summary),
|
|
304
|
+
:global(.rz-block__fields) :is(.rz-blocks__list:not([data-empty]), .rz-blocks__summary),
|
|
305
|
+
:global(.rz-tree-item__fields) :is(.rz-blocks__list:not([data-empty]), .rz-blocks__summary),
|
|
306
|
+
:global(.rz-stage__fields) :is(.rz-blocks__list:not([data-empty]), .rz-blocks__summary) {
|
|
307
|
+
background-color: transparent;
|
|
308
|
+
box-shadow: 0 0 0 1px var(--rz-border);
|
|
163
309
|
}
|
|
310
|
+
|
|
311
|
+
/* Under the card: the add button on the left, the locale import on the right. */
|
|
164
312
|
.rz-blocks__actions-bottom {
|
|
165
|
-
display: flex;
|
|
166
|
-
gap: var(--rz-size-3);
|
|
167
|
-
padding-right: var(--rz-size-3);
|
|
168
|
-
align-items: center;
|
|
169
313
|
justify-content: space-between;
|
|
314
|
+
margin-top: var(--rz-size-2-5);
|
|
315
|
+
margin-left: calc(-0.5 * var(--rz-unit));
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
.rz-blocks__list[data-empty] + .rz-blocks__actions-bottom {
|
|
319
|
+
margin-top: 0;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
/* The error sits under the field, clear of the buttons on the label's line. */
|
|
323
|
+
.rz-field-blocks > :global(.rz-field-error) {
|
|
324
|
+
position: static;
|
|
325
|
+
display: inline-block;
|
|
326
|
+
margin-top: var(--rz-size-1-5);
|
|
170
327
|
}
|
|
171
328
|
</style>
|