@riducms/admin 0.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/LICENSE +21 -0
- package/README.md +31 -0
- package/THIRD_PARTY_NOTICES.md +217 -0
- package/package.json +62 -0
- package/src/app/admin-core-view-route.svelte +89 -0
- package/src/app/admin-layout.svelte +457 -0
- package/src/app/admin-navigation-progress.svelte +204 -0
- package/src/app/admin-page-title.svelte +94 -0
- package/src/app/admin-provider-layer.svelte +26 -0
- package/src/app/admin-router-root.svelte +9 -0
- package/src/app/admin-routes.svelte +116 -0
- package/src/app/deferred-redirect.svelte +23 -0
- package/src/app/loading-boundary.svelte +70 -0
- package/src/app/not-found-route.svelte +29 -0
- package/src/app-meta.ts +2 -0
- package/src/app.css +467 -0
- package/src/app.svelte +88 -0
- package/src/assets/ridu-logo-arch.svg +3 -0
- package/src/assets/ridu-word-logo.svg +7 -0
- package/src/components/brand/ridu-logo.svelte +24 -0
- package/src/components/code-block/code-block.svelte +107 -0
- package/src/components/json-tree/json-tree-node.svelte +77 -0
- package/src/components/json-tree/json-viewer.svelte +113 -0
- package/src/components/ui/banner/banner.svelte +41 -0
- package/src/components/ui/banner/index.ts +5 -0
- package/src/components/ui/bulk-action-bar/bulk-action-bar.svelte +50 -0
- package/src/components/ui/bulk-action-bar/index.ts +1 -0
- package/src/components/ui/button/index.ts +8 -0
- package/src/components/ui/calendar/calendar-caption.svelte +72 -0
- package/src/components/ui/calendar/calendar-cell.svelte +20 -0
- package/src/components/ui/calendar/calendar-day.svelte +27 -0
- package/src/components/ui/calendar/calendar-grid-row.svelte +13 -0
- package/src/components/ui/calendar/calendar-grid.svelte +17 -0
- package/src/components/ui/calendar/calendar-head-cell.svelte +20 -0
- package/src/components/ui/calendar/calendar-header.svelte +20 -0
- package/src/components/ui/calendar/calendar-heading.svelte +17 -0
- package/src/components/ui/calendar/calendar-month-select.svelte +45 -0
- package/src/components/ui/calendar/calendar-month.svelte +16 -0
- package/src/components/ui/calendar/calendar-months.svelte +20 -0
- package/src/components/ui/calendar/calendar-nav.svelte +20 -0
- package/src/components/ui/calendar/calendar-next-button.svelte +30 -0
- package/src/components/ui/calendar/calendar-prev-button.svelte +30 -0
- package/src/components/ui/calendar/calendar-year-select.svelte +44 -0
- package/src/components/ui/calendar/calendar.svelte +118 -0
- package/src/components/ui/calendar/index.ts +1 -0
- package/src/components/ui/checkbox/checkbox.svelte +35 -0
- package/src/components/ui/checkbox/index.ts +1 -0
- package/src/components/ui/confirmation-dialog/confirmation-dialog.svelte +37 -0
- package/src/components/ui/confirmation-dialog/index.ts +1 -0
- package/src/components/ui/date-value-control/date-value-calendar.svelte +37 -0
- package/src/components/ui/date-value-control/date-value-control-loader.svelte +36 -0
- package/src/components/ui/date-value-control/date-value-control.svelte +177 -0
- package/src/components/ui/date-value-control/index.ts +3 -0
- package/src/components/ui/dialog/dialog-close.svelte +11 -0
- package/src/components/ui/dialog/dialog-content.svelte +52 -0
- package/src/components/ui/dialog/dialog-description.svelte +20 -0
- package/src/components/ui/dialog/dialog-footer.svelte +20 -0
- package/src/components/ui/dialog/dialog-header.svelte +20 -0
- package/src/components/ui/dialog/dialog-overlay.svelte +20 -0
- package/src/components/ui/dialog/dialog-title.svelte +17 -0
- package/src/components/ui/dialog/dialog-trigger.svelte +11 -0
- package/src/components/ui/dialog/dialog.svelte +7 -0
- package/src/components/ui/dialog/index.ts +8 -0
- package/src/components/ui/dropdown-menu/dropdown-menu-content.svelte +27 -0
- package/src/components/ui/dropdown-menu/dropdown-menu-item.svelte +20 -0
- package/src/components/ui/dropdown-menu/dropdown-menu-separator.svelte +17 -0
- package/src/components/ui/dropdown-menu/dropdown-menu-trigger.svelte +16 -0
- package/src/components/ui/dropdown-menu/dropdown-menu.svelte +7 -0
- package/src/components/ui/dropdown-menu/index.ts +5 -0
- package/src/components/ui/empty-state/empty-state.svelte +34 -0
- package/src/components/ui/empty-state/index.ts +1 -0
- package/src/components/ui/input/index.ts +1 -0
- package/src/components/ui/kbd/index.ts +1 -0
- package/src/components/ui/kbd/kbd.svelte +24 -0
- package/src/components/ui/pagination/index.ts +1 -0
- package/src/components/ui/pagination/pagination.svelte +88 -0
- package/src/components/ui/popover/index.ts +3 -0
- package/src/components/ui/popover/popover-content.svelte +29 -0
- package/src/components/ui/popover/popover-trigger.svelte +11 -0
- package/src/components/ui/popover/popover.svelte +7 -0
- package/src/components/ui/radio-group/index.ts +3 -0
- package/src/components/ui/radio-group/radio-card-item.svelte +38 -0
- package/src/components/ui/radio-group/radio-group-item.svelte +17 -0
- package/src/components/ui/radio-group/radio-group.svelte +19 -0
- package/src/components/ui/select/index.ts +4 -0
- package/src/components/ui/select/select-content.svelte +38 -0
- package/src/components/ui/select/select-item.svelte +40 -0
- package/src/components/ui/select/select-scroll-down-button.svelte +23 -0
- package/src/components/ui/select/select-scroll-up-button.svelte +23 -0
- package/src/components/ui/select/select-trigger.svelte +29 -0
- package/src/components/ui/select/select.svelte +11 -0
- package/src/components/ui/sheet/index.ts +6 -0
- package/src/components/ui/sheet/sheet-close.svelte +7 -0
- package/src/components/ui/sheet/sheet-content.svelte +77 -0
- package/src/components/ui/sheet/sheet-description.svelte +17 -0
- package/src/components/ui/sheet/sheet-overlay.svelte +36 -0
- package/src/components/ui/sheet/sheet-title.svelte +17 -0
- package/src/components/ui/sheet/sheet-trigger.svelte +7 -0
- package/src/components/ui/sheet/sheet.svelte +7 -0
- package/src/components/ui/skeleton/index.ts +1 -0
- package/src/components/ui/skeleton/skeleton.svelte +31 -0
- package/src/components/ui/slider/index.ts +3 -0
- package/src/components/ui/slider/slider-content.svelte +59 -0
- package/src/components/ui/slider/slider.svelte +35 -0
- package/src/components/ui/sonner/index.ts +1 -0
- package/src/components/ui/sonner/sonner.svelte +55 -0
- package/src/components/ui/status-indicator/index.ts +5 -0
- package/src/components/ui/status-indicator/status-indicator.svelte +54 -0
- package/src/components/ui/table/index.ts +6 -0
- package/src/components/ui/table/table-body.svelte +20 -0
- package/src/components/ui/table/table-cell.svelte +23 -0
- package/src/components/ui/table/table-head.svelte +23 -0
- package/src/components/ui/table/table-header.svelte +20 -0
- package/src/components/ui/table/table-row.svelte +23 -0
- package/src/components/ui/table/table.svelte +22 -0
- package/src/components/ui/tabs/index.ts +8 -0
- package/src/components/ui/tabs/tabs-content.svelte +17 -0
- package/src/components/ui/tabs/tabs-list.svelte +40 -0
- package/src/components/ui/tabs/tabs-trigger.svelte +23 -0
- package/src/components/ui/tabs/tabs.svelte +19 -0
- package/src/components/ui/textarea/index.ts +1 -0
- package/src/components/ui/tooltip/index.ts +4 -0
- package/src/components/ui/tooltip/tooltip-content.svelte +50 -0
- package/src/components/ui/tooltip/tooltip-provider.svelte +7 -0
- package/src/components/ui/tooltip/tooltip-trigger.svelte +7 -0
- package/src/components/ui/tooltip/tooltip.svelte +7 -0
- package/src/core/api/admin-client.ts +45 -0
- package/src/core/forms/field-condition.ts +63 -0
- package/src/core/forms/form-controller.svelte.ts +369 -0
- package/src/core/forms/form-draft-recovery.ts +80 -0
- package/src/core/forms/form-schema.ts +609 -0
- package/src/core/forms/form-validation.ts +750 -0
- package/src/core/i18n/admin-i18n.svelte.ts +364 -0
- package/src/core/i18n/localized-schema.ts +111 -0
- package/src/core/notifications/notification-center.svelte.ts +69 -0
- package/src/core/notifications/validation-toast.svelte +18 -0
- package/src/core/plugins/field-registry.ts +60 -0
- package/src/core/plugins/row-label-registry.ts +62 -0
- package/src/core/preferences/preference-write-queue.ts +107 -0
- package/src/core/routing/admin-paths.ts +137 -0
- package/src/core/runtime/admin-runtime.svelte.ts +625 -0
- package/src/features/auth/account-menu.svelte +159 -0
- package/src/features/auth/account-navigation.svelte +44 -0
- package/src/features/auth/account-route.svelte +395 -0
- package/src/features/auth/account-security-controller.svelte.ts +119 -0
- package/src/features/auth/account-security-route.svelte +460 -0
- package/src/features/auth/auth-brand.svelte +17 -0
- package/src/features/auth/auth-frame.svelte +18 -0
- package/src/features/auth/create-first-user-controller.svelte.ts +220 -0
- package/src/features/auth/create-first-user-route.svelte +174 -0
- package/src/features/auth/forgot-password-route.svelte +78 -0
- package/src/features/auth/login-route.svelte +221 -0
- package/src/features/auth/request-verification-route.svelte +73 -0
- package/src/features/auth/reset-password-route.svelte +107 -0
- package/src/features/auth/verify-email-route.svelte +60 -0
- package/src/features/collections/collection-list-bulk-actions.svelte +143 -0
- package/src/features/collections/collection-list-bulk-editor.svelte +157 -0
- package/src/features/collections/collection-list-controller.svelte.ts +717 -0
- package/src/features/collections/collection-list-filter-popover.svelte +238 -0
- package/src/features/collections/collection-list-preferences-controller.svelte.ts +393 -0
- package/src/features/collections/collection-list-results.svelte +410 -0
- package/src/features/collections/collection-list-route.svelte +951 -0
- package/src/features/collections/collection-list-workspace-toolbar.svelte +409 -0
- package/src/features/collections/collection-table-skeleton.svelte +44 -0
- package/src/features/collections/list-workspace.ts +265 -0
- package/src/features/dashboard/dashboard-route.svelte +141 -0
- package/src/features/development/development-tools.svelte +217 -0
- package/src/features/documents/document-api-view-loader.svelte +31 -0
- package/src/features/documents/document-api-view.svelte +547 -0
- package/src/features/documents/document-controller.svelte.ts +1252 -0
- package/src/features/documents/document-field-partition.ts +18 -0
- package/src/features/documents/document-field-sections.svelte +46 -0
- package/src/features/documents/document-heading.ts +20 -0
- package/src/features/documents/document-route-dirty.ts +43 -0
- package/src/features/documents/document-route-loader.svelte +22 -0
- package/src/features/documents/document-route.svelte +1124 -0
- package/src/features/documents/live-preview-panel.svelte +390 -0
- package/src/features/documents/live-preview.ts +61 -0
- package/src/features/documents/upload-document-preview-loader.svelte +40 -0
- package/src/features/documents/upload-document-preview.svelte +525 -0
- package/src/features/localization/content-locale-switcher.svelte +93 -0
- package/src/features/navigation/admin-breadcrumbs.svelte +124 -0
- package/src/features/navigation/admin-command-menu.svelte +245 -0
- package/src/features/navigation/admin-resource-groups.ts +72 -0
- package/src/features/reference-browser/reference-browser-loader.svelte +15 -0
- package/src/features/reference-browser/reference-browser-workflow.svelte.ts +691 -0
- package/src/features/reference-browser/reference-browser.svelte +844 -0
- package/src/features/uploads/bulk-upload-route.svelte +624 -0
- package/src/features/uploads/bulk-upload.ts +39 -0
- package/src/features/uploads/upload-metadata-fields.svelte +112 -0
- package/src/features/versions/version-diff.ts +72 -0
- package/src/features/versions/version-history-route.svelte +581 -0
- package/src/fields/field-clipboard.ts +132 -0
- package/src/fields/field-layout.svelte +60 -0
- package/src/fields/field-layout.ts +57 -0
- package/src/fields/field-messages.svelte +29 -0
- package/src/fields/field-renderer.svelte +152 -0
- package/src/fields/field-shell.svelte +30 -0
- package/src/fields/field-tab-layout.svelte +99 -0
- package/src/fields/join/join-field.svelte +358 -0
- package/src/fields/localized-field-presentation.ts +17 -0
- package/src/fields/nested/nested-field.svelte +602 -0
- package/src/fields/nested/scoped-field.ts +78 -0
- package/src/fields/nested/sortable-row.svelte +32 -0
- package/src/fields/point/point-field.svelte +52 -0
- package/src/fields/radio/radio-field.svelte +34 -0
- package/src/fields/relationship/relationship-field-controller.svelte.ts +245 -0
- package/src/fields/relationship/relationship-field.svelte +258 -0
- package/src/fields/relationship/relationship-lookup-controller.svelte.ts +129 -0
- package/src/fields/relationship/relationship-query.ts +88 -0
- package/src/fields/relationship/relationship-quick-picker-controller.svelte.ts +198 -0
- package/src/fields/relationship/relationship-quick-picker.svelte +327 -0
- package/src/fields/relationship/relationship-value.ts +47 -0
- package/src/fields/scalar/date-control-value.ts +60 -0
- package/src/fields/scalar/date-value.ts +26 -0
- package/src/fields/scalar/scalar-field.svelte +137 -0
- package/src/fields/select/select-field.svelte +132 -0
- package/src/fields/select/select-value.ts +14 -0
- package/src/fields/text/slug-field.svelte +87 -0
- package/src/fields/text/slug.ts +38 -0
- package/src/fields/text/text-field.svelte +41 -0
- package/src/fields/ui/ui-field.svelte +12 -0
- package/src/fields/virtual/virtual-field.svelte +28 -0
- package/src/index.ts +49 -0
- package/src/main.ts +12 -0
- package/src/vite-env.d.ts +9 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Haniel Ubogu
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# `@riducms/admin`
|
|
2
|
+
|
|
3
|
+
The framework-owned Svelte 5 authoring application embedded by Ridu servers. Generated projects
|
|
4
|
+
provide a thin entry that mounts this package with their exact generated SDK client and statically
|
|
5
|
+
registered plugin/language imports; applications do not fork or regenerate the admin source.
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
import { mountAdmin } from "@riducms/admin";
|
|
9
|
+
import { createClient, type RiduConfig } from "../generated/ridu.generated";
|
|
10
|
+
import { adminPlugins } from "./plugins";
|
|
11
|
+
|
|
12
|
+
const target = document.getElementById("app");
|
|
13
|
+
if (!target) throw new Error("Ridu admin requires #app.");
|
|
14
|
+
|
|
15
|
+
mountAdmin<RiduConfig>({
|
|
16
|
+
target,
|
|
17
|
+
clientFactory: () => createClient({ baseURL: window.location.origin }),
|
|
18
|
+
plugins: adminPlugins,
|
|
19
|
+
});
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Use the generated project entry unless you are building a custom Ridu admin host. Keep
|
|
23
|
+
`@riducms/admin`, `@riducms/sdk`, `@riducms/plugin`, `@riducms/ui`, and paired plugin packages on the
|
|
24
|
+
same Ridu release. Production uses the built static assets embedded in the Go binary; this package
|
|
25
|
+
does not introduce a JavaScript server runtime.
|
|
26
|
+
|
|
27
|
+
Start with [The Ridu admin](../website/src/content/docs/admin.md), then use the focused author task
|
|
28
|
+
guides for [browsing](../website/src/content/docs/browsing-content.md),
|
|
29
|
+
[editing](../website/src/content/docs/editing-documents.md),
|
|
30
|
+
[bulk/trash actions](../website/src/content/docs/bulk-and-trash.md), and
|
|
31
|
+
[document locks](../website/src/content/docs/document-locks.md).
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
# Third-party notices
|
|
2
|
+
|
|
3
|
+
The Ridu admin embeds the following third-party software and generated assets in its production
|
|
4
|
+
build. Exact package versions are listed so dependency updates cannot silently reuse stale notices.
|
|
5
|
+
|
|
6
|
+
## dnd-kit
|
|
7
|
+
|
|
8
|
+
- Package: `@dnd-kit/abstract 0.2.4`
|
|
9
|
+
- Package: `@dnd-kit/collision 0.2.4`
|
|
10
|
+
- Package: `@dnd-kit/dom 0.2.4`
|
|
11
|
+
- Package: `@dnd-kit/geometry 0.2.4`
|
|
12
|
+
- Package: `@dnd-kit/state 0.2.4`
|
|
13
|
+
- Copyright: Copyright (c) 2021, Claudéric Demers
|
|
14
|
+
- License: MIT
|
|
15
|
+
|
|
16
|
+
MIT License
|
|
17
|
+
|
|
18
|
+
Copyright (c) 2021, Claudéric Demers
|
|
19
|
+
|
|
20
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
21
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
22
|
+
in the Software without restriction, including without limitation the rights
|
|
23
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
24
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
25
|
+
furnished to do so, subject to the following conditions:
|
|
26
|
+
|
|
27
|
+
The above copyright notice and this permission notice shall be included in all
|
|
28
|
+
copies or substantial portions of the Software.
|
|
29
|
+
|
|
30
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
31
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
32
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
33
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
34
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
35
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
36
|
+
SOFTWARE.
|
|
37
|
+
|
|
38
|
+
## dnd-kit-svelte
|
|
39
|
+
|
|
40
|
+
- Package: `@dnd-kit-svelte/svelte 0.1.6`
|
|
41
|
+
- Copyright: Copyright (c) 2025 Haniel Ubogu
|
|
42
|
+
- License: MIT
|
|
43
|
+
- Upstream notice: this package contains modified portions of dnd-kit and retains the dnd-kit
|
|
44
|
+
attribution above.
|
|
45
|
+
|
|
46
|
+
MIT License
|
|
47
|
+
|
|
48
|
+
Copyright (c) 2025 Haniel Ubogu
|
|
49
|
+
|
|
50
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
51
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
52
|
+
in the Software without restriction, including without limitation the rights
|
|
53
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
54
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
55
|
+
furnished to do so, subject to the following conditions:
|
|
56
|
+
|
|
57
|
+
The above copyright notice and this permission notice shall be included in all
|
|
58
|
+
copies or substantial portions of the Software.
|
|
59
|
+
|
|
60
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
61
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
62
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
63
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
64
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
65
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
66
|
+
SOFTWARE.
|
|
67
|
+
|
|
68
|
+
## Lucide icons
|
|
69
|
+
|
|
70
|
+
- Package: `Lucide icons 2.2.509`
|
|
71
|
+
- Source snapshot: `@iconify/json 2.2.509`
|
|
72
|
+
- Copyright: Copyright (c) 2026 Lucide Icons and Contributors
|
|
73
|
+
- License: ISC, with Feather-derived icons under MIT
|
|
74
|
+
|
|
75
|
+
ISC License
|
|
76
|
+
|
|
77
|
+
Copyright (c) 2026 Lucide Icons and Contributors
|
|
78
|
+
|
|
79
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
80
|
+
purpose with or without fee is hereby granted, provided that the above
|
|
81
|
+
copyright notice and this permission notice appear in all copies.
|
|
82
|
+
|
|
83
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
84
|
+
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
85
|
+
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
86
|
+
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
87
|
+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
88
|
+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
89
|
+
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
90
|
+
|
|
91
|
+
Some Lucide icons are derived from the Feather project and remain under the MIT License:
|
|
92
|
+
|
|
93
|
+
Copyright (c) 2013-present Cole Bemis
|
|
94
|
+
|
|
95
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
96
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
97
|
+
in the Software without restriction, including without limitation the rights
|
|
98
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
99
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
100
|
+
furnished to do so, subject to the following conditions:
|
|
101
|
+
|
|
102
|
+
The above copyright notice and this permission notice shall be included in all
|
|
103
|
+
copies or substantial portions of the Software.
|
|
104
|
+
|
|
105
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
106
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
107
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
108
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
109
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
110
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
111
|
+
SOFTWARE.
|
|
112
|
+
|
|
113
|
+
## Geist
|
|
114
|
+
|
|
115
|
+
- Package: `@fontsource-variable/geist 5.3.0`
|
|
116
|
+
- Copyright: 2024 The Geist Project Authors (<https://github.com/vercel/geist-font>)
|
|
117
|
+
- Upstream attribution: Geist-Italic[wght].ttf, Copyright 2024 The Geist Project Authors
|
|
118
|
+
- License: SIL Open Font License 1.1
|
|
119
|
+
|
|
120
|
+
## Spline Sans Mono
|
|
121
|
+
|
|
122
|
+
- Package: `@fontsource-variable/spline-sans-mono 5.3.0`
|
|
123
|
+
- Copyright: 2022 The Spline Sans Mono Project Authors (<https://github.com/SorkinType/SplineSansMono>)
|
|
124
|
+
- Upstream attribution: SplineSansMono-Italic[wght].ttf, Copyright 2022 The Spline Sans Mono Project Authors
|
|
125
|
+
- License: SIL Open Font License 1.1
|
|
126
|
+
|
|
127
|
+
## SIL Open Font License 1.1
|
|
128
|
+
|
|
129
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
130
|
+
|
|
131
|
+
PREAMBLE
|
|
132
|
+
|
|
133
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
134
|
+
development of collaborative font projects, to support the font creation
|
|
135
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
136
|
+
open framework in which fonts may be shared and improved in partnership
|
|
137
|
+
with others.
|
|
138
|
+
|
|
139
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
140
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
141
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
142
|
+
redistributed and/or sold with any software provided that any reserved
|
|
143
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
144
|
+
however, cannot be released under any other type of license. The
|
|
145
|
+
requirement for fonts to remain under this license does not apply
|
|
146
|
+
to any document created using the fonts or their derivatives.
|
|
147
|
+
|
|
148
|
+
DEFINITIONS
|
|
149
|
+
|
|
150
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
151
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
152
|
+
include source files, build scripts and documentation.
|
|
153
|
+
|
|
154
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
155
|
+
copyright statement(s).
|
|
156
|
+
|
|
157
|
+
"Original Version" refers to the collection of Font Software components as
|
|
158
|
+
distributed by the Copyright Holder(s).
|
|
159
|
+
|
|
160
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
161
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
162
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
163
|
+
new environment.
|
|
164
|
+
|
|
165
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
166
|
+
writer or other person who contributed to the Font Software.
|
|
167
|
+
|
|
168
|
+
PERMISSION & CONDITIONS
|
|
169
|
+
|
|
170
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
171
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
172
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
173
|
+
Software, subject to the following conditions:
|
|
174
|
+
|
|
175
|
+
1) Neither the Font Software nor any of its individual components,
|
|
176
|
+
in Original or Modified Versions, may be sold by itself.
|
|
177
|
+
|
|
178
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
179
|
+
redistributed and/or sold with any software, provided that each copy
|
|
180
|
+
contains the above copyright notice and this license. These can be
|
|
181
|
+
included either as stand-alone text files, human-readable headers or
|
|
182
|
+
in the appropriate machine-readable metadata fields within text or
|
|
183
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
184
|
+
|
|
185
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
186
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
187
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
188
|
+
presented to the users.
|
|
189
|
+
|
|
190
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
191
|
+
Software shall not be used to promote, endorse or advertise any
|
|
192
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
193
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
194
|
+
permission.
|
|
195
|
+
|
|
196
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
197
|
+
must be distributed entirely under this license, and must not be
|
|
198
|
+
distributed under any other license. The requirement for fonts to
|
|
199
|
+
remain under this license does not apply to any document created
|
|
200
|
+
using the Font Software.
|
|
201
|
+
|
|
202
|
+
TERMINATION
|
|
203
|
+
|
|
204
|
+
This license becomes null and void if any of the above conditions are
|
|
205
|
+
not met.
|
|
206
|
+
|
|
207
|
+
DISCLAIMER
|
|
208
|
+
|
|
209
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
210
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
211
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
212
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
213
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
214
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
215
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
216
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
217
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|
package/package.json
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
{
|
|
2
|
+
"bugs": {
|
|
3
|
+
"url": "https://github.com/riducms/ridu/issues"
|
|
4
|
+
},
|
|
5
|
+
"dependencies": {
|
|
6
|
+
"@dnd-kit-svelte/svelte": "^0.1.6",
|
|
7
|
+
"@fontsource-variable/geist": "^5.3.0",
|
|
8
|
+
"@fontsource-variable/spline-sans-mono": "^5.3.0",
|
|
9
|
+
"@hvniel/svelte-router": "^0.0.6",
|
|
10
|
+
"@iconify/json": "^2.2.509",
|
|
11
|
+
"@internationalized/date": "^3.12.3",
|
|
12
|
+
"@riducms/plugin": "0.1.0",
|
|
13
|
+
"@riducms/protocol": "0.1.0",
|
|
14
|
+
"@riducms/sdk": "0.1.0",
|
|
15
|
+
"@riducms/translations": "0.1.0",
|
|
16
|
+
"@riducms/ui": "0.1.0",
|
|
17
|
+
"@types/prismjs": "^1.26.5",
|
|
18
|
+
"bits-ui": "^2.18.1",
|
|
19
|
+
"prismjs": "^1.30.0",
|
|
20
|
+
"svelte-sonner": "^1.1.1"
|
|
21
|
+
},
|
|
22
|
+
"description": "Framework-owned Svelte 5 authoring application embedded by Ridu servers.",
|
|
23
|
+
"devDependencies": {
|
|
24
|
+
"@hvniel/lexical-svelte": "^0.1.1",
|
|
25
|
+
"@riducms/build": "0.1.0",
|
|
26
|
+
"svelte": "^5.56.8"
|
|
27
|
+
},
|
|
28
|
+
"exports": {
|
|
29
|
+
".": "./src/index.ts"
|
|
30
|
+
},
|
|
31
|
+
"files": [
|
|
32
|
+
"src",
|
|
33
|
+
"!src/tsconfig.json",
|
|
34
|
+
"LICENSE",
|
|
35
|
+
"THIRD_PARTY_NOTICES.md"
|
|
36
|
+
],
|
|
37
|
+
"homepage": "https://riducms.com",
|
|
38
|
+
"license": "MIT",
|
|
39
|
+
"name": "@riducms/admin",
|
|
40
|
+
"peerDependencies": {
|
|
41
|
+
"svelte": "^5.56.8"
|
|
42
|
+
},
|
|
43
|
+
"publishConfig": {
|
|
44
|
+
"access": "public",
|
|
45
|
+
"provenance": true
|
|
46
|
+
},
|
|
47
|
+
"repository": {
|
|
48
|
+
"directory": "admin",
|
|
49
|
+
"type": "git",
|
|
50
|
+
"url": "git+https://github.com/riducms/ridu.git"
|
|
51
|
+
},
|
|
52
|
+
"scripts": {
|
|
53
|
+
"build": "vite build",
|
|
54
|
+
"check": "svelte-check --tsconfig ./tsconfig.app.json && tsc -p tsconfig.test.json",
|
|
55
|
+
"dev": "vite",
|
|
56
|
+
"lint": "tsc -p tsconfig.node.json && bun ../scripts/check-admin-ui-policy.ts",
|
|
57
|
+
"preview": "vite preview",
|
|
58
|
+
"test": "bun test"
|
|
59
|
+
},
|
|
60
|
+
"type": "module",
|
|
61
|
+
"version": "0.1.0"
|
|
62
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { useLocation, useParams } from "@hvniel/svelte-router";
|
|
3
|
+
import type { AdminCoreView, AdminCoreViewHost, AdminCoreViewSurface } from "@riducms/plugin";
|
|
4
|
+
import { untrack, type Component } from "svelte";
|
|
5
|
+
|
|
6
|
+
import { getNotificationCenter } from "@admin/core/notifications/notification-center.svelte";
|
|
7
|
+
import { documentIDFromAdminPath } from "@admin/core/routing/admin-paths";
|
|
8
|
+
import { getAdminRuntime } from "@admin/core/runtime/admin-runtime.svelte";
|
|
9
|
+
|
|
10
|
+
interface Props {
|
|
11
|
+
surface: AdminCoreViewSurface;
|
|
12
|
+
DefaultView: Component;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
let { surface, DefaultView }: Props = $props();
|
|
16
|
+
const runtime = getAdminRuntime();
|
|
17
|
+
const notifications = getNotificationCenter();
|
|
18
|
+
const params = $derived(useParams<"collection" | "document" | "global" | "view">());
|
|
19
|
+
const location = $derived(useLocation());
|
|
20
|
+
let documentID = $state(
|
|
21
|
+
untrack(() =>
|
|
22
|
+
params.document === undefined ? undefined : documentIDFromAdminPath(location.pathname)
|
|
23
|
+
)
|
|
24
|
+
);
|
|
25
|
+
$effect(() => {
|
|
26
|
+
if (params.document === undefined) {
|
|
27
|
+
documentID = undefined;
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
const decoded = documentIDFromAdminPath(location.pathname);
|
|
31
|
+
if (decoded !== undefined) documentID = decoded;
|
|
32
|
+
});
|
|
33
|
+
const collection = $derived(
|
|
34
|
+
runtime.manifest?.collections.find((candidate) => candidate.slug === params.collection)
|
|
35
|
+
);
|
|
36
|
+
const global = $derived(
|
|
37
|
+
runtime.manifest?.globals?.find((candidate) => candidate.slug === params.global)
|
|
38
|
+
);
|
|
39
|
+
const replacement = $derived(
|
|
40
|
+
resolveCoreView(runtime.coreViews, surface, params.collection, params.global)
|
|
41
|
+
);
|
|
42
|
+
const host: AdminCoreViewHost = {
|
|
43
|
+
refreshManifest: () => runtime.refreshManifest(),
|
|
44
|
+
documentsChanged: () => runtime.documentsChanged(),
|
|
45
|
+
notify: (tone, title, message) => notifications[tone]({ title, message }),
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
function resolveCoreView(
|
|
49
|
+
views: readonly AdminCoreView[],
|
|
50
|
+
viewSurface: AdminCoreViewSurface,
|
|
51
|
+
collectionSlug: string | undefined,
|
|
52
|
+
globalSlug: string | undefined
|
|
53
|
+
) {
|
|
54
|
+
const candidates = views.filter((view) => view.surface === viewSurface);
|
|
55
|
+
if (viewSurface === "global") {
|
|
56
|
+
return (
|
|
57
|
+
candidates.find((view) => "global" in view && view.global === globalSlug) ??
|
|
58
|
+
candidates.find((view) => "global" in view && view.global === undefined)
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
if (viewSurface !== "notFound") {
|
|
62
|
+
return (
|
|
63
|
+
candidates.find((view) => "collection" in view && view.collection === collectionSlug) ??
|
|
64
|
+
candidates.find((view) => "collection" in view && view.collection === undefined)
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
return candidates[0];
|
|
68
|
+
}
|
|
69
|
+
</script>
|
|
70
|
+
|
|
71
|
+
{#snippet defaultView()}
|
|
72
|
+
<DefaultView />
|
|
73
|
+
{/snippet}
|
|
74
|
+
|
|
75
|
+
{#if runtime.manifest !== undefined && replacement !== undefined}
|
|
76
|
+
<replacement.component
|
|
77
|
+
manifest={runtime.manifest}
|
|
78
|
+
user={runtime.session?.user}
|
|
79
|
+
{surface}
|
|
80
|
+
{collection}
|
|
81
|
+
{global}
|
|
82
|
+
{documentID}
|
|
83
|
+
{defaultView}
|
|
84
|
+
{host}
|
|
85
|
+
i18n={runtime.i18n}
|
|
86
|
+
/>
|
|
87
|
+
{:else}
|
|
88
|
+
{@render defaultView()}
|
|
89
|
+
{/if}
|