@questpie/admin 3.0.3 → 3.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +34 -5
- package/dist/client/blocks/block-renderer.d.mts +2 -2
- package/dist/client/blocks/block-renderer.mjs +4 -1
- package/dist/client/builder/types/action-types.d.mts +31 -3
- package/dist/client/builder/types/collection-types.d.mts +140 -0
- package/dist/client/builder/types/ui-config.d.mts +16 -2
- package/dist/client/builder/types/views.d.mts +57 -0
- package/dist/client/builder/types/widget-types.d.mts +5 -0
- package/dist/client/components/actions/action-button.mjs +137 -199
- package/dist/client/components/actions/action-dialog.mjs +198 -156
- package/dist/client/components/actions/confirmation-dialog.mjs +2 -2
- package/dist/client/components/actions/header-actions.mjs +52 -53
- package/dist/client/components/admin-link.d.mts +2 -2
- package/dist/client/components/auth/auth-loading.mjs +41 -18
- package/dist/client/components/blocks/block-editor-layout.mjs +2 -2
- package/dist/client/components/blocks/block-fields-renderer.mjs +64 -28
- package/dist/client/components/blocks/block-insert-button.mjs +4 -4
- package/dist/client/components/blocks/block-item.mjs +2 -2
- package/dist/client/components/blocks/block-library-sidebar.mjs +91 -63
- package/dist/client/components/component-renderer.mjs +1 -1
- package/dist/client/components/fields/array-field.mjs +14 -14
- package/dist/client/components/fields/asset-preview-field.mjs +1 -1
- package/dist/client/components/fields/blocks-field/blocks-field.mjs +84 -104
- package/dist/client/components/fields/json-field.mjs +2 -2
- package/dist/client/components/fields/object-array-field.mjs +22 -22
- package/dist/client/components/fields/object-field.mjs +5 -5
- package/dist/client/components/fields/relation/displays/cards-display.mjs +16 -9
- package/dist/client/components/fields/relation/displays/chips-display.mjs +15 -12
- package/dist/client/components/fields/relation/displays/grid-display.mjs +15 -11
- package/dist/client/components/fields/relation/displays/list-display.mjs +33 -20
- package/dist/client/components/fields/relation/displays/table-display.mjs +62 -93
- package/dist/client/components/fields/relation/relation-items-display.mjs +1 -1
- package/dist/client/components/fields/relation-picker.mjs +7 -6
- package/dist/client/components/fields/relation-select.mjs +71 -47
- package/dist/client/components/fields/rich-text-editor/bubble-menu.mjs +392 -82
- package/dist/client/components/fields/rich-text-editor/extensions.mjs +54 -23
- package/dist/client/components/fields/rich-text-editor/image-popover.mjs +24 -50
- package/dist/client/components/fields/rich-text-editor/image-upload.mjs +66 -0
- package/dist/client/components/fields/rich-text-editor/index.d.mts +38 -0
- package/dist/client/components/fields/rich-text-editor/index.mjs +637 -376
- package/dist/client/components/fields/rich-text-editor/link-utils.mjs +26 -0
- package/dist/client/components/fields/rich-text-editor/presets.d.mts +10 -0
- package/dist/client/components/fields/rich-text-editor/slash-commands.mjs +27 -6
- package/dist/client/components/fields/rich-text-editor/toolbar.mjs +464 -346
- package/dist/client/components/fields/rich-text-editor/types.d.mts +77 -0
- package/dist/client/components/fields/upload-field.mjs +45 -49
- package/dist/client/components/filter-builder/columns-tab.mjs +69 -62
- package/dist/client/components/filter-builder/filter-builder-sheet.mjs +473 -308
- package/dist/client/components/filter-builder/filters-tab.mjs +109 -82
- package/dist/client/components/filter-builder/saved-views-tab.mjs +300 -198
- package/dist/client/components/history-sidebar.mjs +850 -340
- package/dist/client/components/layout/field-layout-renderer.mjs +6 -5
- package/dist/client/components/locale-switcher.mjs +8 -8
- package/dist/client/components/media/media-grid.mjs +106 -86
- package/dist/client/components/media/media-picker-dialog.mjs +242 -230
- package/dist/client/components/preview/live-preview-mode.mjs +1 -1
- package/dist/client/components/primitives/asset-preview.mjs +37 -22
- package/dist/client/components/primitives/date-input.mjs +212 -249
- package/dist/client/components/primitives/dropzone.mjs +192 -159
- package/dist/client/components/primitives/field-select-control.mjs +93 -0
- package/dist/client/components/primitives/select-multi.mjs +406 -365
- package/dist/client/components/primitives/select-single.mjs +391 -323
- package/dist/client/components/primitives/time-input.mjs +2 -2
- package/dist/client/components/sheets/resource-sheet.mjs +2 -0
- package/dist/client/components/ui/accordion.mjs +4 -4
- package/dist/client/components/ui/alert.mjs +3 -3
- package/dist/client/components/ui/badge.mjs +4 -4
- package/dist/client/components/ui/button.mjs +47 -37
- package/dist/client/components/ui/card.mjs +2 -2
- package/dist/client/components/ui/checkbox.mjs +1 -1
- package/dist/client/components/ui/command.mjs +5 -5
- package/dist/client/components/ui/dialog.mjs +3 -3
- package/dist/client/components/ui/drawer.mjs +1 -1
- package/dist/client/components/ui/dropdown-menu.mjs +157 -15
- package/dist/client/components/ui/empty-state.mjs +88 -59
- package/dist/client/components/ui/field.mjs +2 -2
- package/dist/client/components/ui/input-group.mjs +3 -3
- package/dist/client/components/ui/input.mjs +1 -1
- package/dist/client/components/ui/kbd.mjs +1 -1
- package/dist/client/components/ui/label.mjs +1 -1
- package/dist/client/components/ui/popover.mjs +19 -11
- package/dist/client/components/ui/scroll-fade.mjs +170 -0
- package/dist/client/components/ui/search-input.mjs +1 -1
- package/dist/client/components/ui/select.mjs +129 -27
- package/dist/client/components/ui/sheet.mjs +54 -34
- package/dist/client/components/ui/sidebar.mjs +15 -14
- package/dist/client/components/ui/skeleton.mjs +28 -12
- package/dist/client/components/ui/switch.mjs +2 -2
- package/dist/client/components/ui/table.mjs +82 -74
- package/dist/client/components/ui/tabs.mjs +26 -31
- package/dist/client/components/ui/textarea.mjs +1 -1
- package/dist/client/components/ui/tooltip.mjs +1 -1
- package/dist/client/components/widgets/chart-widget.mjs +154 -100
- package/dist/client/components/widgets/progress-widget.mjs +63 -36
- package/dist/client/components/widgets/quick-actions-widget.mjs +207 -115
- package/dist/client/components/widgets/recent-items-widget.mjs +147 -103
- package/dist/client/components/widgets/stats-widget.mjs +91 -72
- package/dist/client/components/widgets/table-widget.mjs +161 -247
- package/dist/client/components/widgets/timeline-widget.mjs +119 -78
- package/dist/client/components/widgets/value-widget.mjs +286 -157
- package/dist/client/components/widgets/widget-empty-state.mjs +88 -0
- package/dist/client/components/widgets/widget-skeletons.mjs +53 -20
- package/dist/client/contexts/focus-context.d.mts +2 -2
- package/dist/client/hooks/use-action.mjs +63 -55
- package/dist/client/hooks/use-audit-history.mjs +1 -65
- package/dist/client/hooks/use-collection-validation.mjs +36 -23
- package/dist/client/hooks/use-collection.mjs +96 -1
- package/dist/client/hooks/use-saved-views.mjs +70 -49
- package/dist/client/hooks/use-server-actions.mjs +70 -46
- package/dist/client/hooks/use-server-validation.mjs +156 -41
- package/dist/client/hooks/use-server-widget-data.mjs +1 -1
- package/dist/client/hooks/use-setup-status.d.mts +3 -3
- package/dist/client/hooks/use-setup-status.mjs +2 -2
- package/dist/client/hooks/use-transition-stage.mjs +2 -10
- package/dist/client/hooks/use-validation-error-map.mjs +31 -13
- package/dist/client/hooks/use-view-state.mjs +238 -174
- package/dist/client/i18n/date-locale.mjs +33 -0
- package/dist/client/i18n/hooks.mjs +17 -1
- package/dist/client/lib/utils.mjs +3 -2
- package/dist/client/preview/block-scope-context.d.mts +2 -2
- package/dist/client/preview/preview-banner.d.mts +2 -2
- package/dist/client/preview/preview-banner.mjs +75 -46
- package/dist/client/preview/preview-field.d.mts +4 -4
- package/dist/client/preview/preview-field.mjs +2 -2
- package/dist/client/runtime/provider.mjs +8 -1
- package/dist/client/runtime/translations-provider.mjs +1 -1
- package/dist/client/scope/picker.d.mts +2 -2
- package/dist/client/scope/provider.d.mts +2 -2
- package/dist/client/styles/base.css +1022 -0
- package/dist/client/styles/index.css +3 -589
- package/dist/client/utils/auto-expand-fields.mjs +4 -2
- package/dist/client/utils/keyboard-shortcuts.mjs +26 -0
- package/dist/client/utils/use-lazy-component.mjs +80 -0
- package/dist/client/views/auth/accept-invite-form.d.mts +2 -2
- package/dist/client/views/auth/auth-layout.d.mts +17 -10
- package/dist/client/views/auth/auth-layout.mjs +291 -80
- package/dist/client/views/auth/forgot-password-form.d.mts +2 -2
- package/dist/client/views/auth/forgot-password-form.mjs +2 -2
- package/dist/client/views/auth/login-form.d.mts +2 -2
- package/dist/client/views/auth/login-form.mjs +1 -1
- package/dist/client/views/auth/reset-password-form.d.mts +2 -2
- package/dist/client/views/auth/reset-password-form.mjs +2 -2
- package/dist/client/views/auth/setup-form.d.mts +2 -2
- package/dist/client/views/collection/auto-form-fields.mjs +11 -9
- package/dist/client/views/collection/bulk-action-toolbar.mjs +173 -138
- package/dist/client/views/collection/cells/complex-cells.mjs +22 -22
- package/dist/client/views/collection/cells/primitive-cells.mjs +1 -1
- package/dist/client/views/collection/cells/relation-cells.mjs +147 -129
- package/dist/client/views/collection/cells/shared/asset-thumbnail.mjs +224 -278
- package/dist/client/views/collection/cells/shared/relation-chip.mjs +64 -36
- package/dist/client/views/collection/cells/upload-cells.mjs +199 -9
- package/dist/client/views/collection/columns/build-columns.mjs +29 -9
- package/dist/client/views/collection/columns/column-defaults.mjs +2 -2
- package/dist/client/views/collection/field-renderer.mjs +50 -89
- package/dist/client/views/collection/form-view.mjs +237 -227
- package/dist/client/views/collection/table-view.mjs +1167 -234
- package/dist/client/views/collection/view-skeletons.mjs +222 -79
- package/dist/client/views/common/global-search.mjs +29 -18
- package/dist/client/views/dashboard/dashboard-grid.mjs +678 -501
- package/dist/client/views/dashboard/dashboard-widget.mjs +6 -3
- package/dist/client/views/dashboard/widget-card.mjs +23 -14
- package/dist/client/views/globals/global-form-view.mjs +634 -589
- package/dist/client/views/layout/admin-layout-provider.mjs +67 -70
- package/dist/client/views/layout/admin-layout.d.mts +3 -6
- package/dist/client/views/layout/admin-layout.mjs +152 -155
- package/dist/client/views/layout/admin-router.mjs +936 -616
- package/dist/client/views/layout/admin-sidebar.d.mts +38 -1
- package/dist/client/views/layout/admin-sidebar.mjs +762 -592
- package/dist/client/views/layout/admin-theme.d.mts +10 -0
- package/dist/client/views/layout/admin-theme.mjs +84 -0
- package/dist/client/views/layout/admin-view-layout.mjs +161 -0
- package/dist/client/views/pages/accept-invite-page.d.mts +2 -2
- package/dist/client/views/pages/accept-invite-page.mjs +49 -26
- package/dist/client/views/pages/dashboard-page.d.mts +2 -2
- package/dist/client/views/pages/forgot-password-page.d.mts +2 -2
- package/dist/client/views/pages/forgot-password-page.mjs +2 -19
- package/dist/client/views/pages/invite-page.d.mts +2 -2
- package/dist/client/views/pages/invite-page.mjs +2 -19
- package/dist/client/views/pages/login-page.d.mts +3 -3
- package/dist/client/views/pages/login-page.mjs +4 -21
- package/dist/client/views/pages/reset-password-page.d.mts +2 -2
- package/dist/client/views/pages/reset-password-page.mjs +3 -20
- package/dist/client/views/pages/setup-page.d.mts +2 -2
- package/dist/client/views/pages/setup-page.mjs +70 -71
- package/dist/client.d.mts +6 -2
- package/dist/client.mjs +2 -1
- package/dist/components/rich-text/rich-text-renderer.d.mts +2 -2
- package/dist/index.d.mts +6 -2
- package/dist/index.mjs +2 -1
- package/dist/server/augmentation/dashboard.d.mts +67 -3
- package/dist/server/augmentation/form-layout.d.mts +21 -0
- package/dist/server/augmentation/index.d.mts +1 -1
- package/dist/server/codegen/admin-client-template.mjs +4 -0
- package/dist/server/fields/blocks.d.mts +1 -1
- package/dist/server/fields/blocks.mjs +12 -0
- package/dist/server/fields/rich-text.d.mts +1 -1
- package/dist/server/fields/rich-text.mjs +8 -0
- package/dist/server/i18n/index.mjs +29 -7
- package/dist/server/i18n/messages/cs.mjs +414 -1
- package/dist/server/i18n/messages/de.mjs +412 -1
- package/dist/server/i18n/messages/en.mjs +166 -1
- package/dist/server/i18n/messages/es.mjs +412 -1
- package/dist/server/i18n/messages/fr.mjs +412 -1
- package/dist/server/i18n/messages/pl.mjs +416 -1
- package/dist/server/i18n/messages/pt.mjs +409 -1
- package/dist/server/i18n/messages/sk.mjs +216 -2
- package/dist/server/modules/admin/block/introspection.mjs +4 -1
- package/dist/server/modules/admin/block/prefetch.mjs +12 -2
- package/dist/server/modules/admin/collections/account.d.mts +2 -2
- package/dist/server/modules/admin/collections/admin-locks.d.mts +2 -2
- package/dist/server/modules/admin/collections/admin-preferences.d.mts +39 -39
- package/dist/server/modules/admin/collections/admin-saved-views.d.mts +47 -47
- package/dist/server/modules/admin/collections/apikey.d.mts +42 -42
- package/dist/server/modules/admin/collections/assets.d.mts +20 -20
- package/dist/server/modules/admin/collections/assets.mjs +0 -1
- package/dist/server/modules/admin/collections/session.d.mts +42 -42
- package/dist/server/modules/admin/collections/user.d.mts +40 -28
- package/dist/server/modules/admin/collections/user.mjs +40 -9
- package/dist/server/modules/admin/collections/verification.d.mts +36 -36
- package/dist/server/modules/admin/dto/admin-config.dto.mjs +2 -0
- package/dist/server/modules/admin/factories.mjs +7 -18
- package/dist/server/modules/admin/index.d.mts +1 -1
- package/dist/server/modules/admin/routes/admin-config.d.mts +2 -2
- package/dist/server/modules/admin/routes/admin-config.mjs +34 -16
- package/dist/server/modules/admin/routes/execute-action.d.mts +9 -9
- package/dist/server/modules/admin/routes/execute-action.mjs +67 -28
- package/dist/server/modules/admin/routes/i18n-helpers.mjs +34 -0
- package/dist/server/modules/admin/routes/locales.d.mts +2 -2
- package/dist/server/modules/admin/routes/preview.mjs +25 -17
- package/dist/server/modules/admin/routes/reactive.d.mts +9 -9
- package/dist/server/modules/admin/routes/route-helpers.mjs +1 -1
- package/dist/server/modules/admin/routes/setup.d.mts +10 -10
- package/dist/server/modules/admin/routes/setup.mjs +16 -13
- package/dist/server/modules/admin/routes/translations.d.mts +4 -4
- package/dist/server/modules/admin/routes/translations.mjs +5 -1
- package/dist/server/modules/admin-preferences/collections/admin-preferences.mjs +1 -1
- package/dist/server/modules/admin-preferences/collections/saved-views.d.mts +2 -2
- package/dist/server/modules/audit/.generated/module.d.mts +1 -1
- package/dist/server/modules/audit/.generated/module.mjs +1 -1
- package/dist/server/modules/audit/collections/audit-log.d.mts +2 -2
- package/dist/server/modules/audit/collections/audit-log.mjs +1 -1
- package/dist/server/modules/audit/config/app.mjs +99 -42
- package/dist/server/modules/audit/jobs/audit-cleanup.mjs +1 -1
- package/dist/server/plugin.mjs +4 -2
- package/dist/server/proxy-factories.d.mts +4 -3
- package/dist/server/proxy-factories.mjs +34 -8
- package/dist/shared/types/saved-views.types.d.mts +2 -0
- package/package.json +6 -4
- package/dist/client/components/fields/rich-text-editor/link-popover.mjs +0 -85
- package/dist/client/components/ui/spinner.mjs +0 -52
- package/dist/client/components/ui/toolbar.mjs +0 -136
- package/dist/client/contexts/breadcrumb-context.mjs +0 -60
- package/dist/client/views/layout/admin-topbar.mjs +0 -236
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime22 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/client/preview/preview-banner.d.ts
|
|
4
4
|
|
|
@@ -40,6 +40,6 @@ declare function PreviewBanner({
|
|
|
40
40
|
isPreviewMode,
|
|
41
41
|
className,
|
|
42
42
|
exitPreviewUrl
|
|
43
|
-
}: PreviewBannerProps):
|
|
43
|
+
}: PreviewBannerProps): react_jsx_runtime22.JSX.Element | null;
|
|
44
44
|
//#endregion
|
|
45
45
|
export { PreviewBanner, PreviewBannerProps };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
+
import { useSafeI18n } from "../i18n/hooks.mjs";
|
|
3
4
|
import { c } from "react/compiler-runtime";
|
|
4
5
|
import "react";
|
|
5
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -32,14 +33,22 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
32
33
|
* ```
|
|
33
34
|
*/
|
|
34
35
|
function PreviewBanner(t0) {
|
|
35
|
-
const $ = c(
|
|
36
|
+
const $ = c(19);
|
|
36
37
|
const { isPreviewMode, className, exitPreviewUrl: t1 } = t0;
|
|
37
38
|
const exitPreviewUrl = t1 === void 0 ? "/api/preview?disable=true" : t1;
|
|
38
|
-
|
|
39
|
+
const i18n = useSafeI18n();
|
|
39
40
|
let t2;
|
|
41
|
+
if ($[0] !== i18n) {
|
|
42
|
+
t2 = (key, fallback) => i18n?.t(key) ?? fallback;
|
|
43
|
+
$[0] = i18n;
|
|
44
|
+
$[1] = t2;
|
|
45
|
+
} else t2 = $[1];
|
|
46
|
+
const t = t2;
|
|
47
|
+
if (!isPreviewMode) return null;
|
|
40
48
|
let t3;
|
|
41
|
-
|
|
42
|
-
|
|
49
|
+
let t4;
|
|
50
|
+
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
51
|
+
t3 = {
|
|
43
52
|
position: "sticky",
|
|
44
53
|
top: 0,
|
|
45
54
|
left: 0,
|
|
@@ -56,35 +65,47 @@ function PreviewBanner(t0) {
|
|
|
56
65
|
fontWeight: 500,
|
|
57
66
|
borderBottom: "1px solid var(--border)"
|
|
58
67
|
};
|
|
59
|
-
|
|
68
|
+
t4 = {
|
|
60
69
|
display: "flex",
|
|
61
70
|
alignItems: "center",
|
|
62
71
|
gap: "0.5rem"
|
|
63
72
|
};
|
|
64
|
-
$[
|
|
65
|
-
$[
|
|
73
|
+
$[2] = t3;
|
|
74
|
+
$[3] = t4;
|
|
66
75
|
} else {
|
|
67
|
-
|
|
68
|
-
|
|
76
|
+
t3 = $[2];
|
|
77
|
+
t4 = $[3];
|
|
69
78
|
}
|
|
70
|
-
let t4;
|
|
71
|
-
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
72
|
-
t4 = /* @__PURE__ */ jsxs("div", {
|
|
73
|
-
style: t3,
|
|
74
|
-
children: [/* @__PURE__ */ jsxs("svg", {
|
|
75
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
76
|
-
width: "16",
|
|
77
|
-
height: "16",
|
|
78
|
-
viewBox: "0 0 256 256",
|
|
79
|
-
fill: "currentColor",
|
|
80
|
-
children: [/* @__PURE__ */ jsx("title", { children: "Eye icon" }), /* @__PURE__ */ jsx("path", { d: "M247.31,124.76c-.35-.79-8.82-19.58-27.65-38.41C194.57,61.26,162.88,48,128,48S61.43,61.26,36.34,86.35C17.51,105.18,9,124,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208s66.57-13.26,91.66-38.34c18.83-18.83,27.3-37.61,27.65-38.4A8,8,0,0,0,247.31,124.76ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.47,133.47,0,0,1,25,128,133.33,133.33,0,0,1,48.07,97.25C70.33,75.19,97.22,64,128,64s57.67,11.19,79.93,33.25A133.46,133.46,0,0,1,231.05,128C223.84,141.46,192.43,192,128,192Zm0-112a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Z" })]
|
|
81
|
-
}), /* @__PURE__ */ jsx("span", { children: "Preview Mode" })]
|
|
82
|
-
});
|
|
83
|
-
$[2] = t4;
|
|
84
|
-
} else t4 = $[2];
|
|
85
79
|
let t5;
|
|
86
|
-
if ($[
|
|
87
|
-
t5 = {
|
|
80
|
+
if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
|
|
81
|
+
t5 = /* @__PURE__ */ jsxs("svg", {
|
|
82
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
83
|
+
width: "16",
|
|
84
|
+
height: "16",
|
|
85
|
+
viewBox: "0 0 256 256",
|
|
86
|
+
fill: "currentColor",
|
|
87
|
+
children: [/* @__PURE__ */ jsx("title", { children: "Eye icon" }), /* @__PURE__ */ jsx("path", { d: "M247.31,124.76c-.35-.79-8.82-19.58-27.65-38.41C194.57,61.26,162.88,48,128,48S61.43,61.26,36.34,86.35C17.51,105.18,9,124,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208s66.57-13.26,91.66-38.34c18.83-18.83,27.3-37.61,27.65-38.4A8,8,0,0,0,247.31,124.76ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.47,133.47,0,0,1,25,128,133.33,133.33,0,0,1,48.07,97.25C70.33,75.19,97.22,64,128,64s57.67,11.19,79.93,33.25A133.46,133.46,0,0,1,231.05,128C223.84,141.46,192.43,192,128,192Zm0-112a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Z" })]
|
|
88
|
+
});
|
|
89
|
+
$[4] = t5;
|
|
90
|
+
} else t5 = $[4];
|
|
91
|
+
let t6;
|
|
92
|
+
if ($[5] !== t) {
|
|
93
|
+
t6 = t("preview.mode", "Preview Mode");
|
|
94
|
+
$[5] = t;
|
|
95
|
+
$[6] = t6;
|
|
96
|
+
} else t6 = $[6];
|
|
97
|
+
let t7;
|
|
98
|
+
if ($[7] !== t6) {
|
|
99
|
+
t7 = /* @__PURE__ */ jsxs("div", {
|
|
100
|
+
style: t4,
|
|
101
|
+
children: [t5, /* @__PURE__ */ jsx("span", { children: t6 })]
|
|
102
|
+
});
|
|
103
|
+
$[7] = t6;
|
|
104
|
+
$[8] = t7;
|
|
105
|
+
} else t7 = $[8];
|
|
106
|
+
let t8;
|
|
107
|
+
if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
|
|
108
|
+
t8 = {
|
|
88
109
|
padding: "0.25rem 0.75rem",
|
|
89
110
|
backgroundColor: "rgba(255, 255, 255, 0.2)",
|
|
90
111
|
border: "1px solid rgba(255, 255, 255, 0.3)",
|
|
@@ -96,32 +117,40 @@ function PreviewBanner(t0) {
|
|
|
96
117
|
cursor: "pointer",
|
|
97
118
|
transition: "background-color 0.2s"
|
|
98
119
|
};
|
|
99
|
-
$[
|
|
100
|
-
} else
|
|
101
|
-
let
|
|
102
|
-
if ($[
|
|
103
|
-
|
|
120
|
+
$[9] = t8;
|
|
121
|
+
} else t8 = $[9];
|
|
122
|
+
let t9;
|
|
123
|
+
if ($[10] !== t) {
|
|
124
|
+
t9 = t("preview.exitPreview", "Exit Preview");
|
|
125
|
+
$[10] = t;
|
|
126
|
+
$[11] = t9;
|
|
127
|
+
} else t9 = $[11];
|
|
128
|
+
let t10;
|
|
129
|
+
if ($[12] !== exitPreviewUrl || $[13] !== t9) {
|
|
130
|
+
t10 = /* @__PURE__ */ jsx("a", {
|
|
104
131
|
href: exitPreviewUrl,
|
|
105
|
-
style:
|
|
132
|
+
style: t8,
|
|
106
133
|
onMouseEnter: _temp,
|
|
107
134
|
onMouseLeave: _temp2,
|
|
108
|
-
children:
|
|
135
|
+
children: t9
|
|
109
136
|
});
|
|
110
|
-
$[
|
|
111
|
-
$[
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
137
|
+
$[12] = exitPreviewUrl;
|
|
138
|
+
$[13] = t9;
|
|
139
|
+
$[14] = t10;
|
|
140
|
+
} else t10 = $[14];
|
|
141
|
+
let t11;
|
|
142
|
+
if ($[15] !== className || $[16] !== t10 || $[17] !== t7) {
|
|
143
|
+
t11 = /* @__PURE__ */ jsxs("div", {
|
|
116
144
|
className,
|
|
117
|
-
style:
|
|
118
|
-
children: [
|
|
145
|
+
style: t3,
|
|
146
|
+
children: [t7, t10]
|
|
119
147
|
});
|
|
120
|
-
$[
|
|
121
|
-
$[
|
|
122
|
-
$[
|
|
123
|
-
|
|
124
|
-
|
|
148
|
+
$[15] = className;
|
|
149
|
+
$[16] = t10;
|
|
150
|
+
$[17] = t7;
|
|
151
|
+
$[18] = t11;
|
|
152
|
+
} else t11 = $[18];
|
|
153
|
+
return t11;
|
|
125
154
|
}
|
|
126
155
|
function _temp2(e_0) {
|
|
127
156
|
e_0.currentTarget.style.backgroundColor = "rgba(255, 255, 255, 0.2)";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime23 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/client/preview/preview-field.d.ts
|
|
5
5
|
|
|
@@ -45,7 +45,7 @@ declare function PreviewProvider({
|
|
|
45
45
|
fieldType?: "regular" | "block" | "relation";
|
|
46
46
|
}) => void;
|
|
47
47
|
children: React.ReactNode;
|
|
48
|
-
}):
|
|
48
|
+
}): react_jsx_runtime23.JSX.Element;
|
|
49
49
|
/**
|
|
50
50
|
* Hook to access preview context.
|
|
51
51
|
*/
|
|
@@ -81,7 +81,7 @@ declare function PreviewField({
|
|
|
81
81
|
as: Component,
|
|
82
82
|
className,
|
|
83
83
|
onClick
|
|
84
|
-
}: PreviewFieldProps):
|
|
84
|
+
}: PreviewFieldProps): react_jsx_runtime23.JSX.Element;
|
|
85
85
|
/**
|
|
86
86
|
* Standalone PreviewField that works without context.
|
|
87
87
|
* Useful when you can't use PreviewProvider.
|
|
@@ -102,6 +102,6 @@ declare function StandalonePreviewField({
|
|
|
102
102
|
blockId?: string;
|
|
103
103
|
fieldType?: "regular" | "block" | "relation";
|
|
104
104
|
}) => void;
|
|
105
|
-
}):
|
|
105
|
+
}): react_jsx_runtime23.JSX.Element;
|
|
106
106
|
//#endregion
|
|
107
107
|
export { PreviewField, PreviewFieldProps, PreviewProvider, StandalonePreviewField, usePreviewContext };
|
|
@@ -125,7 +125,7 @@ function PreviewField(t0) {
|
|
|
125
125
|
const t5 = isFocused && "outline-primary outline outline-2 outline-offset-2";
|
|
126
126
|
let t6;
|
|
127
127
|
if ($[10] !== className || $[11] !== t5) {
|
|
128
|
-
t6 = cn(className, "group relative cursor-pointer transition-
|
|
128
|
+
t6 = cn(className, "group relative cursor-pointer transition-[outline-color,outline-offset] duration-150", "hover:outline-primary/60 hover:hover:outline hover:outline-2 hover:outline-offset-2 hover:outline-dashed", t5);
|
|
129
129
|
$[10] = className;
|
|
130
130
|
$[11] = t5;
|
|
131
131
|
$[12] = t6;
|
|
@@ -196,7 +196,7 @@ function StandalonePreviewField(t0) {
|
|
|
196
196
|
const t5 = isFocused && "outline-primary outline outline-2 outline-offset-2";
|
|
197
197
|
let t6;
|
|
198
198
|
if ($[9] !== className || $[10] !== t5) {
|
|
199
|
-
t6 = cn(className, "group relative cursor-pointer transition-
|
|
199
|
+
t6 = cn(className, "group relative cursor-pointer transition-[outline-color,outline-offset] duration-150", "hover:outline-primary/60 hover:hover:outline hover:outline-2 hover:outline-offset-2 hover:outline-dashed", t5);
|
|
200
200
|
$[9] = className;
|
|
201
201
|
$[10] = t5;
|
|
202
202
|
$[11] = t6;
|
|
@@ -370,6 +370,13 @@ function useAdminStore(selector) {
|
|
|
370
370
|
if (!store) throw new Error("useAdminStore must be used within AdminProvider. Wrap your app with <AdminProvider admin={admin} client={client}>");
|
|
371
371
|
return useStore(store, selector);
|
|
372
372
|
}
|
|
373
|
+
/**
|
|
374
|
+
* Get the raw store from context (or null if outside provider).
|
|
375
|
+
* For advanced use cases where you need conditional store access.
|
|
376
|
+
*/
|
|
377
|
+
function useAdminStoreRaw() {
|
|
378
|
+
return useContext(AdminStoreContext);
|
|
379
|
+
}
|
|
373
380
|
/** Select admin instance */
|
|
374
381
|
const selectAdmin = (s) => s.admin;
|
|
375
382
|
/** Select client instance */
|
|
@@ -390,4 +397,4 @@ const selectSetContentLocale = (s) => s.setContentLocale;
|
|
|
390
397
|
const selectBrandName = (s) => s.brandName;
|
|
391
398
|
|
|
392
399
|
//#endregion
|
|
393
|
-
export { AdminProvider, selectAdmin, selectAuthClient, selectBasePath, selectBrandName, selectClient, selectContentLocale, selectNavigate, selectRealtime, selectSetContentLocale, useAdminStore };
|
|
400
|
+
export { AdminProvider, selectAdmin, selectAuthClient, selectBasePath, selectBrandName, selectClient, selectContentLocale, selectNavigate, selectRealtime, selectSetContentLocale, useAdminStore, useAdminStoreRaw };
|
|
@@ -172,7 +172,7 @@ function LoadingFallback() {
|
|
|
172
172
|
className: "qp-flex qp-h-screen qp-w-screen qp-items-center qp-justify-center qp-bg-background",
|
|
173
173
|
children: /* @__PURE__ */ jsxs("div", {
|
|
174
174
|
className: "qp-flex qp-flex-col qp-items-center qp-gap-4",
|
|
175
|
-
children: [/* @__PURE__ */ jsx("div", { className: "qp-h-8 qp-w-8 qp-animate-spin qp-rounded-full qp-border-4 qp-border-
|
|
175
|
+
children: [/* @__PURE__ */ jsx("div", { className: "qp-h-8 qp-w-8 qp-animate-spin qp-rounded-full qp-border-4 qp-border-foreground qp-border-t-transparent" }), /* @__PURE__ */ jsx("span", {
|
|
176
176
|
className: "qp-text-sm qp-text-muted-foreground",
|
|
177
177
|
children: "Loading..."
|
|
178
178
|
})]
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ScopePickerProps } from "./types.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime26 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/client/scope/picker.d.ts
|
|
5
5
|
|
|
@@ -48,6 +48,6 @@ declare function ScopePicker({
|
|
|
48
48
|
clearText,
|
|
49
49
|
className,
|
|
50
50
|
compact
|
|
51
|
-
}: ScopePickerProps):
|
|
51
|
+
}: ScopePickerProps): react_jsx_runtime26.JSX.Element;
|
|
52
52
|
//#endregion
|
|
53
53
|
export { ScopePicker };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ScopeContextValue, ScopeProviderProps } from "./types.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime27 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/client/scope/provider.d.ts
|
|
5
5
|
|
|
@@ -29,7 +29,7 @@ declare function ScopeProvider({
|
|
|
29
29
|
headerName,
|
|
30
30
|
storageKey,
|
|
31
31
|
defaultScope
|
|
32
|
-
}: ScopeProviderProps):
|
|
32
|
+
}: ScopeProviderProps): react_jsx_runtime27.JSX.Element;
|
|
33
33
|
/**
|
|
34
34
|
* Hook to access the current scope context.
|
|
35
35
|
*
|