@riducms/admin 0.2.2 → 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/THIRD_PARTY_NOTICES.md +60 -37
- package/package.json +27 -15
- package/src/app/admin-core-view-route.svelte +38 -53
- package/src/app/admin-extension-route.svelte +19 -0
- package/src/app/admin-layout.scss +175 -0
- package/src/app/admin-layout.svelte +144 -410
- package/src/app/admin-navigation-progress.svelte +11 -77
- package/src/app/admin-page-title.svelte +17 -85
- package/src/app/admin-page-title.ts +136 -0
- package/src/app/admin-route-error.svelte +24 -0
- package/src/app/admin-router-provider.svelte +34 -0
- package/src/app/admin-router-root.svelte +41 -0
- package/src/app/admin-routes.svelte +56 -19
- package/src/app/loading-boundary.svelte +3 -1
- package/src/app-meta.ts +13 -0
- package/src/app.css +138 -496
- package/src/app.svelte +60 -26
- package/src/components/brand/ridu-logo.svelte +19 -5
- package/src/components/data/list-table.scss +63 -0
- package/src/components/icons/LICENSE.md +24 -0
- package/src/components/icons/chevron.svelte +8 -0
- package/src/components/icons/plus.svelte +12 -0
- package/src/components/icons/search.svelte +12 -0
- package/src/components/icons/x.svelte +8 -0
- package/src/components/json-tree/json-tree-node.svelte +61 -67
- package/src/components/json-tree/json-viewer.scss +153 -0
- package/src/components/json-tree/json-viewer.svelte +57 -96
- package/src/components/ui/banner/banner.scss +28 -0
- package/src/components/ui/banner/banner.svelte +9 -8
- package/src/components/ui/banner/index.ts +1 -5
- package/src/components/ui/code-editor/code-editor.scss +20 -0
- package/src/components/ui/code-editor/code-editor.svelte +71 -0
- package/src/components/ui/code-editor/code-editor.ts +151 -0
- package/src/components/ui/code-editor/code-languages.ts +29 -0
- package/src/components/ui/collapsible-panel/collapsible-panel.scss +38 -0
- package/src/components/ui/collapsible-panel/collapsible-panel.svelte +13 -0
- package/src/components/ui/collapsible-panel/index.ts +1 -0
- package/src/components/ui/combobox/combobox.scss +163 -0
- package/src/components/ui/combobox/index.ts +22 -0
- package/src/components/ui/date-value-control/date-value-calendar.svelte +128 -16
- package/src/components/ui/date-value-control/date-value-control-loader.scss +26 -0
- package/src/components/ui/date-value-control/date-value-control-loader.svelte +35 -13
- package/src/components/ui/date-value-control/date-value-control.scss +223 -0
- package/src/components/ui/date-value-control/date-value-control.svelte +62 -44
- package/src/components/ui/drawer/drawer-depth.ts +8 -0
- package/src/components/ui/dropdown-menu/dropdown-menu-content.svelte +2 -5
- package/src/components/ui/dropdown-menu/dropdown-menu-item.svelte +2 -5
- package/src/components/ui/dropdown-menu/dropdown-menu-separator.svelte +2 -2
- package/src/components/ui/dropdown-menu/dropdown-menu.scss +62 -0
- package/src/components/ui/kbd/kbd.scss +17 -0
- package/src/components/ui/kbd/kbd.svelte +3 -10
- package/src/components/ui/navigation-drawer/navigation-drawer.scss +40 -0
- package/src/components/ui/navigation-drawer/navigation-drawer.svelte +38 -0
- package/src/components/ui/popover/popover-content.svelte +3 -5
- package/src/components/ui/popover/popover.scss +18 -0
- package/src/components/ui/radio-group/index.ts +0 -1
- package/src/components/ui/radio-group/radio-card-item.svelte +7 -12
- package/src/components/ui/radio-group/radio-group.svelte +2 -2
- package/src/components/ui/radio-group/radio.scss +45 -0
- package/src/components/ui/select/select-content.svelte +5 -6
- package/src/components/ui/select/select-item.svelte +8 -8
- package/src/components/ui/select/select-scroll-down-button.svelte +3 -5
- package/src/components/ui/select/select-scroll-up-button.svelte +3 -5
- package/src/components/ui/select/select-trigger.svelte +6 -7
- package/src/components/ui/select/select.scss +126 -0
- package/src/components/ui/sheet/sheet-content.svelte +6 -34
- package/src/components/ui/sheet/sheet-description.svelte +2 -2
- package/src/components/ui/sheet/sheet-overlay.svelte +2 -21
- package/src/components/ui/sheet/sheet-title.svelte +2 -2
- package/src/components/ui/sheet/sheet.scss +221 -0
- package/src/components/ui/skeleton/skeleton.scss +20 -0
- package/src/components/ui/skeleton/skeleton.svelte +4 -16
- package/src/components/ui/sonner/sonner.scss +121 -0
- package/src/components/ui/sonner/sonner.svelte +11 -10
- package/src/components/ui/status-indicator/status-indicator.scss +48 -0
- package/src/components/ui/status-indicator/status-indicator.svelte +14 -14
- package/src/components/ui/tabs/tabs-content.svelte +2 -2
- package/src/components/ui/tabs/tabs-list.svelte +7 -7
- package/src/components/ui/tabs/tabs-trigger.svelte +2 -8
- package/src/components/ui/tabs/tabs.scss +86 -0
- package/src/components/ui/tabs/tabs.svelte +2 -2
- package/src/components/ui/timezone-picker/timezone-picker.svelte +152 -0
- package/src/core/api/admin-client.ts +2 -2
- package/src/core/bootstrap/admin-bootstrap.ts +396 -0
- package/src/core/bootstrap/admin-prepared-state.ts +213 -0
- package/src/core/bootstrap/admin-route-modules.ts +66 -0
- package/src/core/clipboard/copy-feedback.svelte.ts +43 -0
- package/src/core/forms/embedded-fields.ts +4 -8
- package/src/core/forms/field-editor-authoring.ts +8 -0
- package/src/core/forms/field-issue-focus.ts +4 -4
- package/src/core/forms/field-occurrence.ts +4 -7
- package/src/core/forms/form-controller.svelte.ts +14 -21
- package/src/core/forms/form-draft-recovery.ts +17 -4
- package/src/core/forms/form-issue-correlation.ts +13 -13
- package/src/core/forms/form-path.ts +17 -0
- package/src/core/forms/form-schema.ts +12 -43
- package/src/core/forms/form-validation.ts +7 -46
- package/src/core/forms/plugin-field-authoring.ts +6 -2
- package/src/core/forms/plugin-field-write.ts +2 -6
- package/src/core/i18n/admin-i18n.svelte.ts +18 -0
- package/src/core/i18n/format-admin-date-time.ts +19 -0
- package/src/core/i18n/humanize-identifier.ts +5 -0
- package/src/core/i18n/time-zone-label.ts +20 -0
- package/src/core/loaders/admin-view-host.svelte +72 -0
- package/src/core/loaders/admin-view-loader.svelte.ts +90 -0
- package/src/core/notifications/validation-toast.svelte +2 -2
- package/src/core/plugins/field-registry.ts +7 -8
- package/src/core/routing/admin-paths.ts +53 -2
- package/src/core/routing/admin-scroll.svelte.ts +74 -0
- package/src/core/routing/admin-view-selection.ts +78 -0
- package/src/core/runtime/admin-runtime.svelte.ts +121 -124
- package/src/core/schema/field-default.ts +33 -0
- package/src/core/schema/field-localization.ts +15 -0
- package/src/core/schema/read-document-path.ts +11 -0
- package/src/features/account/account-menu.scss +37 -0
- package/src/features/account/account-menu.svelte +115 -0
- package/src/features/{auth → account}/account-navigation.svelte +16 -19
- package/src/features/{auth → account}/account-route.svelte +206 -49
- package/src/features/account/account-security-controller.svelte.ts +157 -0
- package/src/features/{auth → account}/account-security-route.svelte +140 -42
- package/src/features/api-reference/api-reference-code.svelte +64 -0
- package/src/features/api-reference/api-reference-content.svelte +258 -0
- package/src/features/api-reference/api-reference-drawer.scss +74 -0
- package/src/features/api-reference/api-reference-examples.ts +381 -0
- package/src/features/api-reference/api-reference-schema.ts +332 -0
- package/src/features/api-reference/api-reference.scss +190 -0
- package/src/features/api-reference/api-reference.svelte +74 -0
- package/src/features/auth/auth-brand.svelte +5 -3
- package/src/features/auth/auth-field.svelte +92 -0
- package/src/features/auth/auth-frame.svelte +5 -8
- package/src/features/auth/auth.scss +122 -0
- package/src/features/auth/create-first-user-controller.svelte.ts +20 -51
- package/src/features/auth/create-first-user-route.svelte +83 -122
- package/src/features/auth/forgot-password-route.svelte +31 -23
- package/src/features/auth/login-route.svelte +68 -116
- package/src/features/auth/logout-button.scss +34 -0
- package/src/features/auth/logout-button.svelte +52 -0
- package/src/features/auth/request-verification-route.svelte +27 -22
- package/src/features/auth/reset-password-route.svelte +108 -41
- package/src/features/auth/verify-email-route.svelte +49 -15
- package/src/features/bulk-edit/bulk-edit-fields.ts +23 -0
- package/src/features/bulk-edit/bulk-edit.scss +152 -0
- package/src/features/bulk-edit/field-picker.svelte +176 -0
- package/src/features/collections/bulk/bulk-actions.svelte +148 -0
- package/src/features/collections/bulk/bulk-confirmation.svelte +153 -0
- package/src/features/collections/bulk/bulk-editor-loader.svelte +95 -0
- package/src/features/collections/bulk/bulk-editor.svelte +186 -0
- package/src/features/collections/collection-list-cell-values.ts +144 -0
- package/src/features/collections/collection-list-controller.svelte.ts +268 -379
- package/src/features/collections/collection-list-preferences-controller.svelte.ts +54 -40
- package/src/features/collections/collection-list-query.ts +223 -0
- package/src/features/collections/collection-list-results.svelte +205 -329
- package/src/features/collections/collection-list-route.svelte +143 -884
- package/src/features/collections/collection-list.scss +261 -0
- package/src/features/collections/collection-list.svelte.ts +362 -0
- package/src/features/collections/controls/column-picker.svelte +110 -0
- package/src/features/collections/controls/column-pill.svelte +62 -0
- package/src/features/collections/controls/filter-builder.svelte +193 -0
- package/src/features/collections/controls/filter-row.svelte +142 -0
- package/src/features/collections/controls/list-controls.scss +196 -0
- package/src/features/collections/controls/list-options.svelte +203 -0
- package/src/features/collections/controls/list-pagination.scss +78 -0
- package/src/features/collections/controls/list-pagination.svelte +115 -0
- package/src/features/collections/controls/list-toolbar.svelte +132 -0
- package/src/features/collections/controls/sort-heading.scss +52 -0
- package/src/features/collections/controls/sort-heading.svelte +78 -0
- package/src/features/collections/list-columns.ts +43 -0
- package/src/features/collections/list-workspace.ts +155 -54
- package/src/features/dashboard/dashboard-route.svelte +82 -86
- package/src/features/dashboard/dashboard.scss +131 -0
- package/src/features/development/development-tools.svelte +20 -36
- package/src/features/documents/document-action-bar.svelte +438 -0
- package/src/features/documents/document-api-view-loader.svelte +17 -6
- package/src/features/documents/document-api-view.scss +120 -0
- package/src/features/documents/document-api-view.svelte +169 -454
- package/src/features/documents/document-controller.svelte.ts +526 -613
- package/src/features/documents/document-credentials.scss +37 -0
- package/src/features/documents/document-credentials.svelte +72 -0
- package/src/features/documents/{document-route-dirty.ts → document-credentials.ts} +25 -0
- package/src/features/documents/document-field-sections.scss +39 -0
- package/src/features/documents/document-field-sections.svelte +4 -13
- package/src/features/documents/document-loading.scss +24 -0
- package/src/features/documents/document-lock-controller.svelte.ts +187 -0
- package/src/features/documents/document-operation-dialogs.svelte +110 -0
- package/src/features/documents/document-route-loader.svelte +17 -5
- package/src/features/documents/document-route.svelte +305 -811
- package/src/features/documents/document-schedule.scss +127 -0
- package/src/features/documents/document-schedule.svelte +323 -0
- package/src/features/documents/document-title.ts +25 -0
- package/src/features/documents/document.scss +274 -0
- package/src/features/documents/live-preview-panel.scss +117 -0
- package/src/features/documents/live-preview-panel.svelte +167 -168
- package/src/features/documents/live-preview.ts +2 -10
- package/src/features/documents/upload-document-preview-loader.svelte +26 -23
- package/src/features/localization/content-locale-switcher.scss +43 -0
- package/src/features/localization/content-locale-switcher.svelte +24 -17
- package/src/features/navigation/admin-breadcrumbs.scss +56 -0
- package/src/features/navigation/admin-breadcrumbs.svelte +102 -37
- package/src/features/navigation/admin-command-menu.svelte +38 -15
- package/src/features/navigation/admin-navigation.scss +133 -0
- package/src/features/navigation/admin-navigation.svelte +169 -0
- package/src/features/navigation/breadcrumb-context.svelte.ts +15 -0
- package/src/features/navigation/navigation-preference.svelte.ts +70 -0
- package/src/features/reference-browser/reference-browser-editor.svelte +180 -0
- package/src/features/reference-browser/reference-browser-list.scss +113 -0
- package/src/features/reference-browser/reference-browser-list.svelte +370 -0
- package/src/features/reference-browser/reference-browser-loader.svelte +26 -8
- package/src/features/reference-browser/reference-browser-workflow.svelte.ts +335 -236
- package/src/features/reference-browser/reference-browser.scss +217 -0
- package/src/features/reference-browser/reference-browser.svelte +154 -797
- package/src/features/reference-browser/reference-collection-picker.svelte +116 -0
- package/src/features/reference-browser/reference-list-query.ts +35 -0
- package/src/features/uploads/bulk-upload-controller.svelte.ts +604 -0
- package/src/features/uploads/bulk-upload-edit-all.svelte +92 -0
- package/src/features/uploads/bulk-upload-editor.svelte +191 -0
- package/src/features/uploads/bulk-upload-file-picker.svelte +70 -0
- package/src/features/uploads/bulk-upload-remote.svelte +100 -0
- package/src/features/uploads/bulk-upload-route-loader.svelte +54 -0
- package/src/features/uploads/bulk-upload-route.svelte +172 -592
- package/src/features/uploads/bulk-upload-sidebar.svelte +125 -0
- package/src/features/uploads/bulk-upload.scss +526 -0
- package/src/features/uploads/bulk-upload.ts +105 -14
- package/src/features/uploads/crop-surface.ts +150 -0
- package/src/features/uploads/image-editor.svelte +231 -0
- package/src/features/uploads/rendition-preview.svelte +64 -0
- package/src/features/uploads/upload-control.svelte +340 -0
- package/src/features/uploads/upload-document-contracts.ts +30 -0
- package/src/features/uploads/upload-draft.svelte.ts +294 -0
- package/src/features/uploads/upload-metadata-fields.scss +32 -0
- package/src/features/uploads/upload-metadata-fields.svelte +8 -7
- package/src/features/uploads/upload-thumbnail.svelte +47 -0
- package/src/features/uploads/upload.scss +361 -0
- package/src/features/versions/version-comparison.svelte +361 -0
- package/src/features/versions/version-diff-fields.svelte +136 -0
- package/src/features/versions/version-diff.ts +296 -41
- package/src/features/versions/version-history-controller.svelte.ts +311 -0
- package/src/features/versions/version-history-route-loader.svelte +32 -0
- package/src/features/versions/version-history-route.svelte +157 -522
- package/src/features/versions/version-history.scss +444 -0
- package/src/features/versions/version-history.ts +45 -0
- package/src/features/versions/version-table.svelte +91 -0
- package/src/fields/embedded-schema-draft-editor.scss +48 -0
- package/src/fields/embedded-schema-draft-editor.svelte +24 -16
- package/src/fields/field-collapsible.svelte +14 -8
- package/src/fields/field-layout.scss +171 -0
- package/src/fields/field-layout.svelte +3 -5
- package/src/fields/field-renderer.svelte +17 -29
- package/src/fields/field-shell.svelte +1 -1
- package/src/fields/field-tab-layout.svelte +25 -19
- package/src/fields/join/join-field-controller.svelte.ts +513 -0
- package/src/fields/join/join-field-values.ts +111 -0
- package/src/fields/join/join-field.scss +189 -0
- package/src/fields/join/join-field.svelte +164 -332
- package/src/fields/live-validation-feedback.svelte +4 -3
- package/src/fields/local-field-editor.svelte +2 -2
- package/src/fields/nested/block-name-input.svelte +11 -12
- package/src/fields/nested/block-picker.scss +128 -0
- package/src/fields/nested/block-picker.svelte +81 -0
- package/src/fields/nested/block-placeholder.svg +2 -0
- package/src/fields/nested/nested-field.scss +331 -0
- package/src/fields/nested/nested-field.svelte +265 -245
- package/src/fields/nested/sortable-row.svelte +9 -7
- package/src/fields/plugin-field.svelte +4 -6
- package/src/fields/point/point-field.svelte +51 -38
- package/src/fields/primitive-list/primitive-list-field.svelte +63 -19
- package/src/fields/primitive-list/primitive-list.scss +109 -0
- package/src/fields/radio/radio-field.svelte +2 -1
- package/src/fields/relationship/relationship-field-controller.svelte.ts +81 -41
- package/src/fields/relationship/relationship-field.svelte +144 -175
- package/src/fields/relationship/relationship-lookup-controller.svelte.ts +58 -30
- package/src/fields/relationship/relationship-query.ts +2 -10
- package/src/fields/relationship/relationship-quick-picker-controller.svelte.ts +36 -62
- package/src/fields/relationship/relationship-quick-picker.svelte +178 -227
- package/src/fields/relationship/relationship-selection.svelte +120 -0
- package/src/fields/relationship/relationship-value.ts +46 -7
- package/src/fields/relationship/relationship.scss +182 -0
- package/src/fields/scalar/code-field.svelte +101 -0
- package/src/fields/scalar/date-control-value.ts +13 -0
- package/src/fields/scalar/scalar-field.svelte +25 -67
- package/src/fields/select/select-field.svelte +132 -94
- package/src/fields/text/slug-field.scss +28 -0
- package/src/fields/text/slug-field.svelte +19 -15
- package/src/fields/text/text-field.svelte +1 -2
- package/src/fields/ui/ui-field.svelte +7 -4
- package/src/fields/virtual/virtual-field.svelte +2 -5
- package/src/index.ts +1 -2
- package/src/routing.ts +2 -0
- package/src/app/deferred-redirect.svelte +0 -23
- package/src/components/code-block/code-block.svelte +0 -107
- package/src/components/ui/bulk-action-bar/bulk-action-bar.svelte +0 -50
- package/src/components/ui/bulk-action-bar/index.ts +0 -1
- package/src/components/ui/button/index.ts +0 -8
- package/src/components/ui/calendar/calendar-caption.svelte +0 -72
- package/src/components/ui/calendar/calendar-cell.svelte +0 -20
- package/src/components/ui/calendar/calendar-day.svelte +0 -27
- package/src/components/ui/calendar/calendar-grid-row.svelte +0 -13
- package/src/components/ui/calendar/calendar-grid.svelte +0 -17
- package/src/components/ui/calendar/calendar-head-cell.svelte +0 -20
- package/src/components/ui/calendar/calendar-header.svelte +0 -20
- package/src/components/ui/calendar/calendar-heading.svelte +0 -17
- package/src/components/ui/calendar/calendar-month-select.svelte +0 -45
- package/src/components/ui/calendar/calendar-month.svelte +0 -16
- package/src/components/ui/calendar/calendar-months.svelte +0 -20
- package/src/components/ui/calendar/calendar-nav.svelte +0 -20
- package/src/components/ui/calendar/calendar-next-button.svelte +0 -30
- package/src/components/ui/calendar/calendar-prev-button.svelte +0 -30
- package/src/components/ui/calendar/calendar-year-select.svelte +0 -44
- package/src/components/ui/calendar/calendar.svelte +0 -118
- package/src/components/ui/calendar/index.ts +0 -1
- package/src/components/ui/checkbox/checkbox.svelte +0 -35
- package/src/components/ui/checkbox/index.ts +0 -1
- package/src/components/ui/dialog/dialog-close.svelte +0 -11
- package/src/components/ui/dialog/dialog-content.svelte +0 -52
- package/src/components/ui/dialog/dialog-description.svelte +0 -20
- package/src/components/ui/dialog/dialog-footer.svelte +0 -20
- package/src/components/ui/dialog/dialog-header.svelte +0 -20
- package/src/components/ui/dialog/dialog-overlay.svelte +0 -20
- package/src/components/ui/dialog/dialog-title.svelte +0 -17
- package/src/components/ui/dialog/dialog-trigger.svelte +0 -11
- package/src/components/ui/dialog/dialog.svelte +0 -7
- package/src/components/ui/dialog/index.ts +0 -8
- package/src/components/ui/empty-state/empty-state.svelte +0 -34
- package/src/components/ui/empty-state/index.ts +0 -1
- package/src/components/ui/input/index.ts +0 -1
- package/src/components/ui/pagination/index.ts +0 -1
- package/src/components/ui/pagination/pagination.svelte +0 -88
- package/src/components/ui/radio-group/radio-group-item.svelte +0 -17
- package/src/components/ui/slider/index.ts +0 -3
- package/src/components/ui/slider/slider-content.svelte +0 -59
- package/src/components/ui/slider/slider.svelte +0 -35
- package/src/components/ui/table/index.ts +0 -6
- package/src/components/ui/table/table-body.svelte +0 -20
- package/src/components/ui/table/table-cell.svelte +0 -23
- package/src/components/ui/table/table-head.svelte +0 -23
- package/src/components/ui/table/table-header.svelte +0 -20
- package/src/components/ui/table/table-row.svelte +0 -23
- package/src/components/ui/table/table.svelte +0 -22
- package/src/components/ui/textarea/index.ts +0 -1
- package/src/components/ui/tooltip/index.ts +0 -4
- package/src/components/ui/tooltip/tooltip-content.svelte +0 -50
- package/src/components/ui/tooltip/tooltip-provider.svelte +0 -7
- package/src/components/ui/tooltip/tooltip-trigger.svelte +0 -7
- package/src/components/ui/tooltip/tooltip.svelte +0 -7
- package/src/features/auth/account-menu.svelte +0 -159
- package/src/features/auth/account-security-controller.svelte.ts +0 -119
- package/src/features/collections/collection-list-bulk-actions.svelte +0 -143
- package/src/features/collections/collection-list-bulk-editor.svelte +0 -157
- package/src/features/collections/collection-list-filter-popover.svelte +0 -238
- package/src/features/collections/collection-list-workspace-toolbar.svelte +0 -409
- package/src/features/collections/collection-table-skeleton.svelte +0 -44
- package/src/features/documents/document-heading.ts +0 -20
- package/src/features/documents/upload-document-preview.svelte +0 -525
package/src/app.svelte
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { createBrowserRouter, RouterProvider } from "@hvniel/svelte-router";
|
|
3
2
|
import { setAdminI18n } from "@riducms/plugin";
|
|
4
3
|
import { TooltipProvider } from "@riducms/ui";
|
|
5
|
-
import { untrack } from "svelte";
|
|
6
4
|
|
|
7
|
-
import AdminRouterRoot from "@admin/app/admin-router-root.svelte";
|
|
8
5
|
import AdminProviderLayer from "@admin/app/admin-provider-layer.svelte";
|
|
6
|
+
import AdminRouterProvider from "@admin/app/admin-router-provider.svelte";
|
|
9
7
|
import LoadingBoundary from "@admin/app/loading-boundary.svelte";
|
|
10
8
|
import { Toaster } from "@admin/components/ui/sonner";
|
|
11
9
|
import {
|
|
@@ -13,19 +11,41 @@
|
|
|
13
11
|
setNotificationCenter,
|
|
14
12
|
} from "@admin/core/notifications/notification-center.svelte";
|
|
15
13
|
import { AdminRuntime, setAdminRuntime } from "@admin/core/runtime/admin-runtime.svelte";
|
|
14
|
+
import {
|
|
15
|
+
AdminBootstrapCoordinator,
|
|
16
|
+
setAdminBootstrapCoordinator,
|
|
17
|
+
} from "@admin/core/bootstrap/admin-bootstrap";
|
|
16
18
|
import type { AdminClient } from "@admin/core/api/admin-client";
|
|
17
19
|
import DevelopmentTools from "@admin/features/development/development-tools.svelte";
|
|
18
20
|
|
|
19
21
|
import type { AdminConfig } from "@riducms/plugin/admin";
|
|
22
|
+
|
|
20
23
|
interface Props {
|
|
21
24
|
adminConfig?: AdminConfig;
|
|
22
25
|
clientFactory: () => AdminClient;
|
|
23
26
|
adminBasePath?: string;
|
|
24
27
|
}
|
|
28
|
+
|
|
25
29
|
let { clientFactory, adminBasePath = "/admin", adminConfig = {} }: Props = $props();
|
|
26
|
-
|
|
30
|
+
const coordinator = setAdminBootstrapCoordinator(new AdminBootstrapCoordinator());
|
|
31
|
+
|
|
32
|
+
// The runtime owns the client factory, config, and base path selected when this admin instance
|
|
33
|
+
// is mounted. Those inputs intentionally remain stable for the instance lifetime.
|
|
27
34
|
// svelte-ignore state_referenced_locally
|
|
28
|
-
const runtime = setAdminRuntime(new AdminRuntime(clientFactory(), adminConfig));
|
|
35
|
+
const runtime = setAdminRuntime(new AdminRuntime(clientFactory(), adminConfig, adminBasePath));
|
|
36
|
+
coordinator.configure(runtime);
|
|
37
|
+
|
|
38
|
+
let preparedRuntimeAdopted = false;
|
|
39
|
+
if (coordinator.initialState?.runtime !== undefined) {
|
|
40
|
+
try {
|
|
41
|
+
runtime.adoptPrepared(coordinator.initialState.runtime);
|
|
42
|
+
preparedRuntimeAdopted = true;
|
|
43
|
+
} catch {
|
|
44
|
+
// An invalid embedded snapshot must fall back to the ordinary client bootstrap.
|
|
45
|
+
preparedRuntimeAdopted = false;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
29
49
|
setAdminI18n(runtime.i18n);
|
|
30
50
|
const notifications = setNotificationCenter(new NotificationCenter());
|
|
31
51
|
const development = import.meta.hot !== undefined;
|
|
@@ -33,45 +53,59 @@
|
|
|
33
53
|
development ? (runtime.i18n.direction === "rtl" ? "top-left" : "top-right") : undefined
|
|
34
54
|
);
|
|
35
55
|
let schemaRefreshQueued = $state(false);
|
|
36
|
-
|
|
37
|
-
// svelte-ignore state_referenced_locally
|
|
38
|
-
const router = createBrowserRouter([{ path: "*", Component: AdminRouterRoot }], {
|
|
39
|
-
basename: adminBasePath,
|
|
40
|
-
});
|
|
56
|
+
let startupReady = $state(false);
|
|
41
57
|
|
|
42
58
|
$effect(() => {
|
|
59
|
+
let active = true;
|
|
43
60
|
const hot = import.meta.hot;
|
|
44
|
-
if (hot === undefined) return;
|
|
45
61
|
const queueSchemaRefresh = () => {
|
|
46
62
|
schemaRefreshQueued = true;
|
|
47
63
|
};
|
|
48
|
-
hot
|
|
49
|
-
return () => hot.off("ridu:schema-update", queueSchemaRefresh);
|
|
50
|
-
});
|
|
64
|
+
hot?.on("ridu:schema-update", queueSchemaRefresh);
|
|
51
65
|
|
|
52
|
-
|
|
53
|
-
|
|
66
|
+
async function start() {
|
|
67
|
+
if (!preparedRuntimeAdopted) await runtime.bootstrap();
|
|
68
|
+
await coordinator.prepareInitial({ stageRoute: preparedRuntimeAdopted });
|
|
69
|
+
if (!active) return;
|
|
70
|
+
startupReady = true;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
start().catch(() => {
|
|
74
|
+
if (!active) return;
|
|
75
|
+
// Runtime and route controllers own their visible failures; the shell must still mount
|
|
76
|
+
// so their fallback state can render.
|
|
77
|
+
startupReady = true;
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
return () => {
|
|
81
|
+
active = false;
|
|
82
|
+
hot?.off("ridu:schema-update", queueSchemaRefresh);
|
|
83
|
+
runtime.dispose();
|
|
84
|
+
notifications.destroy();
|
|
85
|
+
};
|
|
54
86
|
});
|
|
55
87
|
|
|
56
88
|
$effect(() => {
|
|
57
89
|
if (!schemaRefreshQueued || runtime.loading || runtime.refreshingManifest) return;
|
|
58
90
|
const bootstrap = runtime.error !== undefined || runtime.manifest === undefined;
|
|
59
91
|
schemaRefreshQueued = false;
|
|
60
|
-
|
|
61
|
-
void (bootstrap ? runtime.bootstrap() : runtime.refreshManifest());
|
|
62
|
-
});
|
|
92
|
+
void (bootstrap ? runtime.bootstrap() : runtime.refreshManifest());
|
|
63
93
|
});
|
|
64
|
-
|
|
65
|
-
$effect(() => () => notifications.destroy());
|
|
66
94
|
</script>
|
|
67
95
|
|
|
68
96
|
<TooltipProvider delayDuration={350}>
|
|
69
|
-
<AdminProviderLayer providers={runtime.providers} i18n={runtime.i18n}>
|
|
70
|
-
|
|
71
|
-
<
|
|
72
|
-
|
|
97
|
+
<AdminProviderLayer providers={runtime.config.extensions.providers} i18n={runtime.i18n}>
|
|
98
|
+
{#if startupReady}
|
|
99
|
+
<LoadingBoundary>
|
|
100
|
+
<AdminRouterProvider {coordinator} {adminBasePath} />
|
|
101
|
+
</LoadingBoundary>
|
|
102
|
+
{#if development && !runtime.loading && runtime.error === undefined}
|
|
103
|
+
<DevelopmentTools />
|
|
104
|
+
{/if}
|
|
105
|
+
{:else}
|
|
106
|
+
<main class="ridu-surface-grid min-h-screen" aria-busy="true"></main>
|
|
107
|
+
{/if}
|
|
73
108
|
</AdminProviderLayer>
|
|
74
109
|
|
|
75
|
-
{#if development && !runtime.loading && runtime.error === undefined}<DevelopmentTools />{/if}
|
|
76
110
|
<Toaster theme={runtime.resolvedTheme} position={notificationPosition} />
|
|
77
111
|
</TooltipProvider>
|
|
@@ -14,11 +14,25 @@
|
|
|
14
14
|
</script>
|
|
15
15
|
|
|
16
16
|
<span
|
|
17
|
-
class={[
|
|
18
|
-
"inline-block shrink-0 bg-current [mask:var(--ridu-logo)_center/contain_no-repeat] [-webkit-mask:var(--ridu-logo)_center/contain_no-repeat]",
|
|
19
|
-
variant === "arch" ? "aspect-[82/70]" : "aspect-[234/70]",
|
|
20
|
-
className,
|
|
21
|
-
]}
|
|
17
|
+
class={["ridu-logo", variant === "arch" ? "ridu-logo--arch" : "ridu-logo--word", className]}
|
|
22
18
|
style={`--ridu-logo: url("${source}")`}
|
|
23
19
|
aria-hidden="true"
|
|
24
20
|
></span>
|
|
21
|
+
|
|
22
|
+
<style lang="scss">
|
|
23
|
+
@use "@riducms/ui/layers.css";
|
|
24
|
+
@layer ridu.components {
|
|
25
|
+
.ridu-logo {
|
|
26
|
+
display: inline-block;
|
|
27
|
+
flex-shrink: 0;
|
|
28
|
+
background: currentColor;
|
|
29
|
+
mask: var(--ridu-logo) center / contain no-repeat;
|
|
30
|
+
}
|
|
31
|
+
.ridu-logo--arch {
|
|
32
|
+
aspect-ratio: 82 / 70;
|
|
33
|
+
}
|
|
34
|
+
.ridu-logo--word {
|
|
35
|
+
aspect-ratio: 234 / 70;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
</style>
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
@layer ridu.components {
|
|
2
|
+
.ridu-list-table {
|
|
3
|
+
width: 100%;
|
|
4
|
+
border-collapse: separate;
|
|
5
|
+
border-spacing: 0;
|
|
6
|
+
font-size: 13px;
|
|
7
|
+
line-height: 20px;
|
|
8
|
+
text-align: start;
|
|
9
|
+
|
|
10
|
+
th,
|
|
11
|
+
td {
|
|
12
|
+
min-width: 150px;
|
|
13
|
+
padding: 12px;
|
|
14
|
+
text-align: start;
|
|
15
|
+
vertical-align: middle;
|
|
16
|
+
font-weight: 400;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
th {
|
|
20
|
+
color: var(--foreground-muted);
|
|
21
|
+
height: 54px;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
td {
|
|
25
|
+
color: var(--foreground);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
th:first-child,
|
|
29
|
+
td:first-child {
|
|
30
|
+
padding-inline-start: 16px;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
th:last-child,
|
|
34
|
+
td:last-child {
|
|
35
|
+
padding-inline-end: 16px;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.ridu-list-table__selection {
|
|
39
|
+
width: 48px;
|
|
40
|
+
min-width: 48px;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
tbody tr:nth-child(odd) {
|
|
44
|
+
background: var(--background-surface);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
tbody td:first-child {
|
|
48
|
+
border-start-start-radius: 3px;
|
|
49
|
+
border-end-start-radius: 3px;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
tbody td:last-child {
|
|
53
|
+
border-start-end-radius: 3px;
|
|
54
|
+
border-end-end-radius: 3px;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
td a {
|
|
58
|
+
color: inherit;
|
|
59
|
+
text-decoration: underline;
|
|
60
|
+
text-underline-offset: 2px;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
SVG paths adapted from Payload CMS packages/ui/src/icons.
|
|
2
|
+
|
|
3
|
+
MIT License
|
|
4
|
+
|
|
5
|
+
Copyright (c) 2018-2025 Payload CMS, Inc. <info@payloadcms.com>
|
|
6
|
+
|
|
7
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
8
|
+
a copy of this software and associated documentation files (the
|
|
9
|
+
'Software'), to deal in the Software without restriction, including
|
|
10
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
11
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
12
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
13
|
+
the following conditions:
|
|
14
|
+
|
|
15
|
+
The above copyright notice and this permission notice shall be
|
|
16
|
+
included in all copies or substantial portions of the Software.
|
|
17
|
+
|
|
18
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
|
19
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
20
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
21
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
22
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
23
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
24
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { SVGAttributes } from "svelte/elements";
|
|
3
|
+
let { ...props }: SVGAttributes<SVGSVGElement> = $props();
|
|
4
|
+
</script>
|
|
5
|
+
|
|
6
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" aria-hidden="true" {...props}>
|
|
7
|
+
<path d="M14 8L10 12L6 8" stroke="currentColor" stroke-linecap="square" />
|
|
8
|
+
</svg>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { SVGAttributes } from "svelte/elements";
|
|
3
|
+
let { ...props }: SVGAttributes<SVGSVGElement> = $props();
|
|
4
|
+
</script>
|
|
5
|
+
|
|
6
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" aria-hidden="true" {...props}>
|
|
7
|
+
<path
|
|
8
|
+
d="M5.33333 9.99998H14.6667M9.99999 5.33331V14.6667"
|
|
9
|
+
stroke="currentColor"
|
|
10
|
+
stroke-linecap="square"
|
|
11
|
+
/>
|
|
12
|
+
</svg>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { SVGAttributes } from "svelte/elements";
|
|
3
|
+
let { ...props }: SVGAttributes<SVGSVGElement> = $props();
|
|
4
|
+
</script>
|
|
5
|
+
|
|
6
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" aria-hidden="true" {...props}>
|
|
7
|
+
<path
|
|
8
|
+
d="M16 16L13.1333 13.1333M14.6667 9.33333C14.6667 12.2789 12.2789 14.6667 9.33333 14.6667C6.38781 14.6667 4 12.2789 4 9.33333C4 6.38781 6.38781 4 9.33333 4C12.2789 4 14.6667 6.38781 14.6667 9.33333Z"
|
|
9
|
+
stroke="currentColor"
|
|
10
|
+
stroke-linecap="square"
|
|
11
|
+
/>
|
|
12
|
+
</svg>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { SVGAttributes } from "svelte/elements";
|
|
3
|
+
let { ...props }: SVGAttributes<SVGSVGElement> = $props();
|
|
4
|
+
</script>
|
|
5
|
+
|
|
6
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" aria-hidden="true" {...props}>
|
|
7
|
+
<path d="M14 6L6 14M6 6L14 14" stroke="currentColor" stroke-linecap="square" />
|
|
8
|
+
</svg>
|
|
@@ -1,77 +1,71 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import
|
|
3
|
-
|
|
2
|
+
import { isRecord } from "@riducms/protocol";
|
|
3
|
+
import ChevronIcon from "@admin/components/icons/chevron.svelte";
|
|
4
4
|
import JsonTreeNode from "@admin/components/json-tree/json-tree-node.svelte";
|
|
5
5
|
|
|
6
|
-
let {
|
|
6
|
+
let {
|
|
7
|
+
name,
|
|
8
|
+
value,
|
|
9
|
+
last = true,
|
|
10
|
+
root = false,
|
|
11
|
+
disclosureLabel,
|
|
12
|
+
}: {
|
|
13
|
+
name?: string;
|
|
14
|
+
value: unknown;
|
|
15
|
+
last?: boolean;
|
|
16
|
+
root?: boolean;
|
|
17
|
+
disclosureLabel?: string;
|
|
18
|
+
} = $props();
|
|
19
|
+
|
|
20
|
+
let open = $state(true);
|
|
21
|
+
const array = $derived(Array.isArray(value));
|
|
7
22
|
const entries = $derived(
|
|
8
|
-
|
|
9
|
-
? value.map((item, index) => [String(index), item] as const)
|
|
10
|
-
: isRecord(value)
|
|
11
|
-
? Object.entries(value)
|
|
12
|
-
: []
|
|
23
|
+
array ? Object.entries(value as unknown[]) : isRecord(value) ? Object.entries(value) : []
|
|
13
24
|
);
|
|
14
|
-
const container = $derived(
|
|
15
|
-
const opening = $derived(
|
|
16
|
-
const closing = $derived(
|
|
17
|
-
const
|
|
18
|
-
Array.isArray(value)
|
|
19
|
-
? entries.length === 1
|
|
20
|
-
? "item"
|
|
21
|
-
: "items"
|
|
22
|
-
: entries.length === 1
|
|
23
|
-
? "key"
|
|
24
|
-
: "keys"
|
|
25
|
-
);
|
|
26
|
-
|
|
27
|
-
function isRecord(candidate: unknown): candidate is Record<string, unknown> {
|
|
28
|
-
return typeof candidate === "object" && candidate !== null && !Array.isArray(candidate);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
function primitive(candidate: unknown) {
|
|
32
|
-
if (typeof candidate === "string") return JSON.stringify(candidate);
|
|
33
|
-
if (candidate === undefined) return "undefined";
|
|
34
|
-
return String(candidate);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
function tone(candidate: unknown) {
|
|
38
|
-
if (typeof candidate === "string") return "text-[#b7c89a]";
|
|
39
|
-
if (typeof candidate === "number") return "text-[#c9b38b]";
|
|
40
|
-
if (typeof candidate === "boolean") return "text-[#9fb9d8]";
|
|
41
|
-
return "text-foreground-faint";
|
|
42
|
-
}
|
|
25
|
+
const container = $derived(array || isRecord(value));
|
|
26
|
+
const opening = $derived(array ? "[" : "{");
|
|
27
|
+
const closing = $derived(array ? "]" : "}");
|
|
28
|
+
const property = $derived(name === undefined ? "" : `${JSON.stringify(name)}: `);
|
|
43
29
|
</script>
|
|
44
30
|
|
|
45
|
-
{
|
|
46
|
-
|
|
47
|
-
<
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
31
|
+
<li class={["ridu-json-node", root && "ridu-json-node--root"]}>
|
|
32
|
+
{#if container && entries.length > 0}
|
|
33
|
+
<button
|
|
34
|
+
type="button"
|
|
35
|
+
class="ridu-json-node__toggle"
|
|
36
|
+
aria-label={disclosureLabel ?? name ?? (root ? "JSON" : opening + closing)}
|
|
37
|
+
aria-expanded={open}
|
|
38
|
+
onclick={() => (open = !open)}
|
|
52
39
|
>
|
|
53
|
-
<
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
<
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
40
|
+
<ChevronIcon class="ridu-json-node__chevron" />
|
|
41
|
+
<span>{property}{opening}</span>
|
|
42
|
+
</button>
|
|
43
|
+
|
|
44
|
+
{#if open}
|
|
45
|
+
<ul class="ridu-json-node__children">
|
|
46
|
+
{#each entries as [key, child], index (key)}
|
|
47
|
+
<JsonTreeNode
|
|
48
|
+
name={array ? undefined : key}
|
|
49
|
+
disclosureLabel={array ? `[${key}]` : undefined}
|
|
50
|
+
value={child}
|
|
51
|
+
last={index === entries.length - 1}
|
|
52
|
+
/>
|
|
53
|
+
{/each}
|
|
54
|
+
</ul>
|
|
55
|
+
{/if}
|
|
56
|
+
<div class="ridu-json-node__closing">{closing}{last ? "" : ","}</div>
|
|
57
|
+
{:else}
|
|
58
|
+
<div class="ridu-json-node__line">
|
|
59
|
+
<span>{property}</span>
|
|
60
|
+
<span
|
|
61
|
+
class={{
|
|
62
|
+
"ridu-json-node__string": typeof value === "string",
|
|
63
|
+
"ridu-json-node__number": typeof value === "number",
|
|
64
|
+
}}
|
|
65
|
+
>
|
|
66
|
+
{container ? `${opening}${closing}` : (JSON.stringify(value) ?? "undefined")}
|
|
62
67
|
</span>
|
|
63
|
-
|
|
64
|
-
</summary>
|
|
65
|
-
<div class="ms-3.5 border-s border-control-border ps-3">
|
|
66
|
-
{#each entries as [key, child], index (key)}
|
|
67
|
-
<JsonTreeNode name={key} value={child} last={index === entries.length - 1} />
|
|
68
|
-
{/each}
|
|
68
|
+
{last ? "" : ","}
|
|
69
69
|
</div>
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
<div class="flex gap-1 rounded px-0.5 hover:bg-control-hover">
|
|
73
|
-
{#if name !== undefined}<span class="text-[#9db5cd]">{JSON.stringify(name)}</span>
|
|
74
|
-
<span class="text-foreground-faint">:</span>{/if}
|
|
75
|
-
<span class={tone(value)}>{primitive(value)}{last ? "" : ","}</span>
|
|
76
|
-
</div>
|
|
77
|
-
{/if}
|
|
70
|
+
{/if}
|
|
71
|
+
</li>
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
@layer ridu.components {
|
|
2
|
+
.ridu-json-viewer {
|
|
3
|
+
min-width: 0;
|
|
4
|
+
background: var(--background-surface);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.ridu-json-viewer__toolbar {
|
|
8
|
+
position: sticky;
|
|
9
|
+
top: 0;
|
|
10
|
+
z-index: 1;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.ridu-json-viewer__actions {
|
|
14
|
+
position: absolute;
|
|
15
|
+
top: 10px;
|
|
16
|
+
right: 10px;
|
|
17
|
+
display: flex;
|
|
18
|
+
gap: 4px;
|
|
19
|
+
|
|
20
|
+
button {
|
|
21
|
+
display: grid;
|
|
22
|
+
place-items: center;
|
|
23
|
+
width: 30px;
|
|
24
|
+
height: 30px;
|
|
25
|
+
padding: 5px;
|
|
26
|
+
border: 0;
|
|
27
|
+
border-radius: 3px;
|
|
28
|
+
background: var(--background);
|
|
29
|
+
color: var(--control-border-hover);
|
|
30
|
+
cursor: pointer;
|
|
31
|
+
|
|
32
|
+
&:hover {
|
|
33
|
+
color: var(--foreground-muted);
|
|
34
|
+
}
|
|
35
|
+
&:focus-visible {
|
|
36
|
+
outline: var(--focus-outline);
|
|
37
|
+
outline-offset: var(--focus-outline-offset);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
svg {
|
|
41
|
+
width: 20px;
|
|
42
|
+
height: 20px;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.ridu-json-viewer__copy {
|
|
47
|
+
opacity: 0;
|
|
48
|
+
.ridu-json-viewer:hover &,
|
|
49
|
+
&:focus-visible {
|
|
50
|
+
opacity: 1;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.ridu-json-viewer__data {
|
|
55
|
+
padding: 10px 0 10px 10px;
|
|
56
|
+
overflow: auto;
|
|
57
|
+
font: var(--font-size-body) / var(--line-height-body) var(--font-mono);
|
|
58
|
+
color: var(--foreground);
|
|
59
|
+
ul {
|
|
60
|
+
list-style: none;
|
|
61
|
+
margin: 0;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.ridu-json-viewer__tree {
|
|
66
|
+
padding: 0;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.ridu-json-node {
|
|
70
|
+
padding-left: 8px;
|
|
71
|
+
white-space: nowrap;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.ridu-json-node__toggle {
|
|
75
|
+
display: flex;
|
|
76
|
+
align-items: center;
|
|
77
|
+
gap: 14px;
|
|
78
|
+
width: calc(100% + 3px);
|
|
79
|
+
margin-left: -34px;
|
|
80
|
+
padding: 0;
|
|
81
|
+
border: 0;
|
|
82
|
+
border-radius: 3px 0 0 3px;
|
|
83
|
+
background: var(--background-surface);
|
|
84
|
+
color: inherit;
|
|
85
|
+
font: inherit;
|
|
86
|
+
text-align: left;
|
|
87
|
+
cursor: pointer;
|
|
88
|
+
|
|
89
|
+
&:hover {
|
|
90
|
+
background: var(--background-layer);
|
|
91
|
+
}
|
|
92
|
+
&:focus-visible {
|
|
93
|
+
outline: var(--focus-outline);
|
|
94
|
+
outline-offset: -2px;
|
|
95
|
+
}
|
|
96
|
+
&[aria-expanded="false"] > svg {
|
|
97
|
+
transform: rotate(-90deg);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.ridu-json-node__chevron {
|
|
102
|
+
flex-shrink: 0;
|
|
103
|
+
color: var(--control-disabled-foreground);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.ridu-json-node__children {
|
|
107
|
+
position: relative;
|
|
108
|
+
padding-left: 24px;
|
|
109
|
+
|
|
110
|
+
&:before {
|
|
111
|
+
content: "";
|
|
112
|
+
position: absolute;
|
|
113
|
+
inset-block: 0;
|
|
114
|
+
border-left: 1px dashed var(--control-border);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.ridu-json-node__line {
|
|
119
|
+
display: flex;
|
|
120
|
+
> span:first-child {
|
|
121
|
+
white-space: pre;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.ridu-json-node__closing {
|
|
126
|
+
padding-left: 2px;
|
|
127
|
+
}
|
|
128
|
+
.ridu-json-node__string {
|
|
129
|
+
color: var(--json-string);
|
|
130
|
+
}
|
|
131
|
+
.ridu-json-node__number {
|
|
132
|
+
color: var(--json-number);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.ridu-json-node--root {
|
|
136
|
+
position: relative;
|
|
137
|
+
left: -3px;
|
|
138
|
+
padding-left: 0;
|
|
139
|
+
> .ridu-json-node__toggle {
|
|
140
|
+
margin-left: 0;
|
|
141
|
+
gap: 6px;
|
|
142
|
+
}
|
|
143
|
+
> .ridu-json-node__toggle > svg {
|
|
144
|
+
margin-left: -4px;
|
|
145
|
+
}
|
|
146
|
+
> .ridu-json-node__children {
|
|
147
|
+
padding-left: 20px;
|
|
148
|
+
}
|
|
149
|
+
> .ridu-json-node__closing {
|
|
150
|
+
padding-left: 18px;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|