opacacms 0.2.0 → 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/README.md +31 -22
- package/dist/admin/auth-client.d.ts +39 -39
- package/dist/admin/index.d.ts +2 -2
- package/dist/admin/index.js +15 -10520
- package/dist/admin/plugin-client.d.ts +65 -0
- package/dist/admin/react.d.ts +2 -2
- package/dist/admin/react.js +34 -4
- package/dist/admin/stores/ui.d.ts +19 -4
- package/dist/admin/ui/components/PluginSettingsForm.d.ts +2 -2
- package/dist/admin/ui/components/custom-alert.d.ts +7 -0
- package/dist/admin/ui/components/{DetailSheet.d.ts → detail-sheet.d.ts} +1 -2
- package/dist/admin/ui/components/fields/FieldLabel.d.ts +1 -1
- package/dist/admin/ui/components/fields/RelationshipField.d.ts +1 -1
- package/dist/admin/ui/components/media/AssetManagerModal.d.ts +2 -2
- package/dist/admin/ui/components/plugin-iframe.d.ts +7 -0
- package/dist/admin/ui/components/ui/accordion.d.ts +17 -7
- package/dist/admin/ui/components/ui/alert-dialog.d.ts +16 -12
- package/dist/admin/ui/components/ui/button.d.ts +11 -7
- package/dist/admin/ui/components/ui/relationship.d.ts +1 -1
- package/dist/admin/ui/components/ui/sheet.d.ts +14 -27
- package/dist/admin/ui/components/ui/tooltip.d.ts +7 -0
- package/dist/admin/ui/components/versions-sheet.d.ts +4 -5
- package/dist/admin/ui/views/collection-list-view.d.ts +1 -1
- package/dist/admin/ui/views/dashboard-view.d.ts +1 -1
- package/dist/admin/ui/views/media-registry-view.d.ts +3 -3
- package/dist/admin/ui/views/settings-view.d.ts +2 -2
- package/dist/admin/vue.js +27 -4
- package/dist/admin/webcomponent.js +20 -2
- package/dist/admin.css +1 -1
- package/dist/auth/index.d.ts +43 -43
- package/dist/{chunk-7y1nbmw6.js → chunk-1bd7fz7n.js} +32 -2
- package/dist/chunk-1qm0m8r8.js +413 -0
- package/dist/chunk-2k3ysje3.js +31 -0
- package/dist/chunk-3j9zjfmn.js +376 -0
- package/dist/{chunk-byq8g0rd.js → chunk-48ywpd0a.js} +16 -22
- package/dist/{chunk-esrg9qj0.js → chunk-5422w4eq.js} +70 -54
- package/dist/chunk-56n342hs.js +95 -0
- package/dist/chunk-5b8r0v8c.js +47 -0
- package/dist/chunk-63yg00vx.js +263 -0
- package/dist/{chunk-8sqjbsgt.js → chunk-6bywt602.js} +26 -1
- package/dist/{chunk-v9z61v3g.js → chunk-6qs0g65f.js} +43 -3
- package/dist/chunk-7rr5p01g.js +581 -0
- package/dist/{chunk-51z3x7kq.js → chunk-a3qae86h.js} +1 -1
- package/dist/{chunk-3rdhbedb.js → chunk-adq2b75c.js} +2 -2
- package/dist/chunk-d0tb1xjw.js +93 -0
- package/dist/chunk-d7cgd6vn.js +318 -0
- package/dist/{chunk-0bq155dy.js → chunk-e0g6gn7n.js} +89 -100
- package/dist/chunk-ec4jhybj.js +1137 -0
- package/dist/chunk-fatyf6f7.js +221 -0
- package/dist/{chunk-526a3gqx.js → chunk-fnsf1dfm.js} +1 -1
- package/dist/chunk-g9bxb6h0.js +205 -0
- package/dist/chunk-gyaf5kgf.js +10 -0
- package/dist/{chunk-9kxpbcb1.js → chunk-h6dhexzr.js} +16 -7
- package/dist/{chunk-dykn5hr6.js → chunk-j8js1y0h.js} +31 -74
- package/dist/{chunk-t0zg026p.js → chunk-jq1drsen.js} +12 -1
- package/dist/{chunk-b3kr8w41.js → chunk-m24yqkeq.js} +38 -26
- package/dist/chunk-m5ems3hh.js +410 -0
- package/dist/{chunk-8scgdznr.js → chunk-m83ybzf8.js} +15 -18
- package/dist/chunk-majsbncm.js +98 -0
- package/dist/chunk-mp2gt9yh.js +237 -0
- package/dist/chunk-n1twhqmf.js +54 -0
- package/dist/{chunk-gmee4mdc.js → chunk-naqcqj8n.js} +92 -106
- package/dist/chunk-q5sb5dcr.js +15 -0
- package/dist/{chunk-d1asgtke.js → chunk-qhdsjek6.js} +90 -121
- package/dist/{chunk-0gtxnxmd.js → chunk-qsh2nqz3.js} +85 -105
- package/dist/chunk-r0ms5tk1.js +76 -0
- package/dist/chunk-rwqwsanx.js +75 -0
- package/dist/chunk-sqsfk9p4.js +700 -0
- package/dist/{chunk-5gvbp2qa.js → chunk-x7bnzswh.js} +25 -18
- package/dist/{chunk-kc4jfnv7.js → chunk-z3ffn2b7.js} +851 -324
- package/dist/cli/commands/dev.d.ts +8 -0
- package/dist/cli/commands/doctor.d.ts +8 -0
- package/dist/cli/commands/generate.d.ts +26 -0
- package/dist/cli/commands/init.d.ts +13 -1
- package/dist/cli/commands/migrate.d.ts +33 -0
- package/dist/cli/commands/plugin.d.ts +13 -0
- package/dist/cli/commands/seed.d.ts +21 -0
- package/dist/cli/{commands/migrate-commands.d.ts → core/migrations/migrate-logic.d.ts} +2 -2
- package/dist/cli/core/migrations/schema-diff-engine.d.ts +12 -0
- package/dist/cli/core/migrations/schema-diff.d.ts +11 -0
- package/dist/cli/{seeding.d.ts → core/seeding/auto-seed.d.ts} +7 -4
- package/dist/cli/core/seeding/seed-logic.d.ts +2 -0
- package/dist/cli/index.d.ts +4 -0
- package/dist/cli/index.js +6 -170
- package/dist/client/RichText.d.ts +5 -0
- package/dist/client/rich-text-utils.d.ts +5 -0
- package/dist/client.js +3 -2
- package/dist/config.d.ts +3 -3
- package/dist/db/adapter.d.ts +2 -2
- package/dist/db/better-sqlite.d.ts +3 -3
- package/dist/db/better-sqlite.js +6 -5
- package/dist/db/bun-sqlite.d.ts +3 -3
- package/dist/db/bun-sqlite.js +6 -5
- package/dist/db/d1.d.ts +13 -7
- package/dist/db/d1.js +6 -5
- package/dist/db/index.d.ts +2 -2
- package/dist/db/index.js +10 -12
- package/dist/db/kysely/factory.d.ts +29 -0
- package/dist/db/kysely/plugins/audit-logging.d.ts +48 -0
- package/dist/db/kysely/plugins/auto-timestamps.d.ts +38 -0
- package/dist/db/kysely/plugins/cursor-pagination.d.ts +42 -0
- package/dist/db/kysely/plugins/deadlock-handler.d.ts +47 -0
- package/dist/db/kysely/plugins/draft-swapper.d.ts +33 -0
- package/dist/db/kysely/plugins/field-masking.d.ts +45 -0
- package/dist/db/kysely/plugins/fts-normalizer.d.ts +38 -0
- package/dist/db/kysely/plugins/i18n-fallback.d.ts +48 -0
- package/dist/db/kysely/plugins/id-generation.d.ts +42 -0
- package/dist/db/kysely/plugins/index.d.ts +16 -0
- package/dist/db/kysely/plugins/json-flattener.d.ts +38 -0
- package/dist/db/kysely/plugins/relationship-preloading.d.ts +39 -0
- package/dist/db/kysely/plugins/slug-generation.d.ts +37 -0
- package/dist/db/kysely/plugins/soft-delete.d.ts +42 -0
- package/dist/db/kysely/plugins/tree-resolver.d.ts +39 -0
- package/dist/db/kysely/plugins/virtual-field-resolver.d.ts +54 -0
- package/dist/db/kysely/plugins/zod-coercion.d.ts +34 -0
- package/dist/db/kysely/snapshot/snapshot-manager.d.ts +18 -0
- package/dist/db/postgres.d.ts +4 -4
- package/dist/db/postgres.js +6 -5
- package/dist/db/sqlite.d.ts +3 -3
- package/dist/db/sqlite.js +6 -5
- package/dist/index.d.ts +3 -0
- package/dist/index.js +161 -7
- package/dist/runtimes/bun.js +9 -6
- package/dist/runtimes/cloudflare-workers.d.ts +3 -1
- package/dist/runtimes/cloudflare-workers.js +36 -7
- package/dist/runtimes/next.js +8 -5
- package/dist/runtimes/node.js +9 -6
- package/dist/schema/collection.d.ts +116 -70
- package/dist/schema/compiler.d.ts +6 -0
- package/dist/schema/global.d.ts +38 -71
- package/dist/schema/index.d.ts +5 -4
- package/dist/schema/index.js +35 -550
- package/dist/schema/zod.d.ts +564 -0
- package/dist/server/admin-router.d.ts +1 -1
- package/dist/server/collection-router.d.ts +1 -1
- package/dist/server/graphql.d.ts +6 -0
- package/dist/server/handlers.d.ts +25 -7
- package/dist/server/middlewares/auth.d.ts +1 -1
- package/dist/server/plugins-loader.d.ts +1 -1
- package/dist/server/router.d.ts +2 -2
- package/dist/server/routers/admin.d.ts +1 -1
- package/dist/server/routers/auth.d.ts +1 -1
- package/dist/server/routers/collections.d.ts +4 -1
- package/dist/server/routers/plugins.d.ts +2 -2
- package/dist/server/setup-middlewares.d.ts +1 -1
- package/dist/server/system-router.d.ts +1 -1
- package/dist/server.js +11 -6
- package/dist/storage/adapters/cloudflare-r2.d.ts +11 -2
- package/dist/storage/index.js +39 -30
- package/dist/types.d.ts +255 -44
- package/dist/utils/context.d.ts +14 -0
- package/dist/utils/logger.d.ts +2 -0
- package/dist/utils/string.d.ts +10 -0
- package/dist/utils/webhooks-engine.d.ts +24 -0
- package/dist/validation.d.ts +67 -1
- package/dist/validator.d.ts +1 -0
- package/package.json +36 -33
- package/src/cli/index.ts +117 -0
- package/dist/chunk-6qq3ne6b.js +0 -288
- package/dist/chunk-6v1fw7q7.js +0 -126
- package/dist/chunk-7a9kn0np.js +0 -116
- package/dist/chunk-bexcv7xe.js +0 -36
- package/dist/chunk-d3ffeqp9.js +0 -87
- package/dist/chunk-fj19qccp.js +0 -78
- package/dist/chunk-j53pz21t.js +0 -20
- package/dist/chunk-mkn49zmy.js +0 -102
- package/dist/chunk-qb6ztvw9.js +0 -17
- package/dist/chunk-r39em4yj.js +0 -29
- package/dist/chunk-rsf0tpy1.js +0 -8
- package/dist/chunk-srsac177.js +0 -85
- package/dist/chunk-swtcpvhf.js +0 -2442
- package/dist/chunk-twpvxfce.js +0 -64
- package/dist/chunk-ywm4t2gm.js +0 -19
- package/dist/cli/commands/plugin-sync.d.ts +0 -1
- package/dist/cli/commands/seed-command.d.ts +0 -2
- package/dist/plugins/ui-bridge.d.ts +0 -12
- package/dist/schema/fields/base.d.ts +0 -84
- package/dist/schema/fields/index.d.ts +0 -147
- package/dist/schema/infer.d.ts +0 -55
- /package/dist/admin/ui/components/{ColumnVisibilityToggle.d.ts → column-visibility-toggle.d.ts} +0 -0
- /package/dist/admin/ui/components/{DataDetailView.d.ts → data-detail-view.d.ts} +0 -0
- /package/dist/cli/{d1-mock.d.ts → core/mocks/d1-mock.d.ts} +0 -0
- /package/dist/cli/{r2-mock.d.ts → core/mocks/r2-mock.d.ts} +0 -0
- /package/dist/cli/{commands → core/plugins}/plugin-build.d.ts +0 -0
- /package/dist/cli/{commands → core/plugins}/plugin-init.d.ts +0 -0
- /package/dist/cli/{commands → core/types}/generate-types.d.ts +0 -0
- /package/dist/{schema/fields/validation.test.d.ts → cli/seeding.test.d.ts} +0 -0
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpacaCMS Plugin Client SDK
|
|
3
|
+
*
|
|
4
|
+
* This SDK provides a secure way for plugins running inside iframes to communicate
|
|
5
|
+
* with the host Admin UI using postMessage.
|
|
6
|
+
*/
|
|
7
|
+
export interface OpacaMessage {
|
|
8
|
+
type: string;
|
|
9
|
+
payload?: any;
|
|
10
|
+
}
|
|
11
|
+
export declare const opaca: {
|
|
12
|
+
/**
|
|
13
|
+
* Roteamento (Navigation)
|
|
14
|
+
*/
|
|
15
|
+
router: {
|
|
16
|
+
/**
|
|
17
|
+
* Navigates to a specific path in the parent Admin UI.
|
|
18
|
+
*/
|
|
19
|
+
push: (path: string) => void;
|
|
20
|
+
/**
|
|
21
|
+
* Refreshes the parent Admin UI router/view.
|
|
22
|
+
*/
|
|
23
|
+
refresh: () => void;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Native UI Components
|
|
27
|
+
*/
|
|
28
|
+
ui: {
|
|
29
|
+
/**
|
|
30
|
+
* Toast Notifications
|
|
31
|
+
*/
|
|
32
|
+
toast: {
|
|
33
|
+
success: (message: string) => void;
|
|
34
|
+
error: (message: string) => void;
|
|
35
|
+
info: (message: string) => void;
|
|
36
|
+
warning: (message: string) => void;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* Alert Dialogs
|
|
40
|
+
*/
|
|
41
|
+
alert: (options: {
|
|
42
|
+
title: string;
|
|
43
|
+
description?: string;
|
|
44
|
+
variant?: "default" | "destructive";
|
|
45
|
+
}) => void;
|
|
46
|
+
/**
|
|
47
|
+
* Side Sheets (Panéis Deslizantes)
|
|
48
|
+
*/
|
|
49
|
+
sheet: {
|
|
50
|
+
/**
|
|
51
|
+
* Opens a side sheet with a specific URL or content.
|
|
52
|
+
*/
|
|
53
|
+
open: (options: {
|
|
54
|
+
title: string;
|
|
55
|
+
src: string;
|
|
56
|
+
size?: "sm" | "md" | "lg" | "xl" | "full";
|
|
57
|
+
}) => void;
|
|
58
|
+
/**
|
|
59
|
+
* Closes the current side sheet.
|
|
60
|
+
*/
|
|
61
|
+
close: () => void;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
export default opaca;
|
package/dist/admin/react.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { type CustomFieldProps } from
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { type CustomFieldProps } from "../admin/custom-field";
|
|
3
3
|
export declare function defineReactField<TValue = any, TConfig = Record<string, any>>(tagName: string, Component: React.ComponentType<CustomFieldProps<TValue, TConfig>>): void;
|
package/dist/admin/react.js
CHANGED
|
@@ -1,8 +1,38 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import"../chunk-
|
|
5
|
-
|
|
2
|
+
defineCustomField
|
|
3
|
+
} from "../chunk-rqyjjqgy.js";
|
|
4
|
+
import"../chunk-6bywt602.js";
|
|
5
|
+
|
|
6
|
+
// src/admin/react.tsx
|
|
7
|
+
import React from "react";
|
|
8
|
+
import { createRoot } from "react-dom/client";
|
|
9
|
+
function defineReactField(tagName, Component) {
|
|
10
|
+
defineCustomField(tagName, {
|
|
11
|
+
mount: (container, props) => {
|
|
12
|
+
const el = container;
|
|
13
|
+
const root = createRoot(el);
|
|
14
|
+
el._opacaReactRoot = root;
|
|
15
|
+
root.render(React.createElement(Component, props));
|
|
16
|
+
},
|
|
17
|
+
update: (container, props) => {
|
|
18
|
+
const el = container;
|
|
19
|
+
const root = el._opacaReactRoot;
|
|
20
|
+
if (root) {
|
|
21
|
+
root.render(React.createElement(Component, props));
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
unmount: (container) => {
|
|
25
|
+
const el = container;
|
|
26
|
+
const root = el._opacaReactRoot;
|
|
27
|
+
if (root) {
|
|
28
|
+
setTimeout(() => {
|
|
29
|
+
root.unmount();
|
|
30
|
+
delete el._opacaReactRoot;
|
|
31
|
+
}, 0);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
}
|
|
6
36
|
export {
|
|
7
37
|
defineReactField
|
|
8
38
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { LucideIcons } from "../../types";
|
|
2
2
|
export interface ToastItem {
|
|
3
3
|
id: string;
|
|
4
4
|
message: string;
|
|
@@ -12,10 +12,25 @@ export declare function notify(message: string, type?: ToastItem["type"]): void;
|
|
|
12
12
|
export declare function clearToast(id: string): void;
|
|
13
13
|
export interface SidebarItem {
|
|
14
14
|
label: string;
|
|
15
|
-
icon?:
|
|
15
|
+
icon?: LucideIcons | string;
|
|
16
16
|
path: string;
|
|
17
|
-
|
|
18
|
-
render?: (serverUrl: string, config: any, user: any) => string;
|
|
17
|
+
ssrPath?: string;
|
|
19
18
|
}
|
|
20
19
|
export declare const $customSidebarItems: import("nanostores").PreinitializedWritableAtom<SidebarItem[]> & object;
|
|
21
20
|
export declare function registerSidebarItem(item: SidebarItem): void;
|
|
21
|
+
export interface AlertOptions {
|
|
22
|
+
title: string;
|
|
23
|
+
description?: string;
|
|
24
|
+
variant?: "default" | "destructive";
|
|
25
|
+
}
|
|
26
|
+
export declare const $activeAlert: import("nanostores").PreinitializedWritableAtom<AlertOptions | null> & object;
|
|
27
|
+
export declare function openAlert(options: AlertOptions): void;
|
|
28
|
+
export declare function closeAlert(): void;
|
|
29
|
+
export interface SheetOptions {
|
|
30
|
+
title: string;
|
|
31
|
+
src: string;
|
|
32
|
+
size?: "sm" | "md" | "lg" | "xl" | "full";
|
|
33
|
+
}
|
|
34
|
+
export declare const $activeSheet: import("nanostores").PreinitializedWritableAtom<SheetOptions | null> & object;
|
|
35
|
+
export declare function openSheet(options: SheetOptions): void;
|
|
36
|
+
export declare function closeSheet(): void;
|
|
@@ -5,7 +5,7 @@ interface PluginSettingsFormProps {
|
|
|
5
5
|
configSchema?: any[];
|
|
6
6
|
};
|
|
7
7
|
onBack: () => void;
|
|
8
|
-
notify?: (message: string, type?:
|
|
8
|
+
notify?: (message: string, type?: "success" | "error") => void;
|
|
9
9
|
}
|
|
10
|
-
export declare function PluginSettingsForm({ plugin, onBack, notify
|
|
10
|
+
export declare function PluginSettingsForm({ plugin, onBack, notify }: PluginSettingsFormProps): import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
export {};
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import type React from "react";
|
|
2
2
|
import "../../../admin/ui/styles/data-detail.scss";
|
|
3
3
|
interface DetailSheetProps {
|
|
4
|
-
open: boolean;
|
|
5
|
-
onOpenChange: (open: boolean) => void;
|
|
6
4
|
title: string;
|
|
7
5
|
description?: string;
|
|
8
6
|
data?: any;
|
|
@@ -10,6 +8,7 @@ interface DetailSheetProps {
|
|
|
10
8
|
id?: string | number;
|
|
11
9
|
onSave?: (updatedData: any) => void;
|
|
12
10
|
field?: string;
|
|
11
|
+
children: React.ReactNode;
|
|
13
12
|
}
|
|
14
13
|
/**
|
|
15
14
|
* Universal sheet for viewing and editing document or data details.
|
|
@@ -1,11 +1,21 @@
|
|
|
1
|
+
import * as AccordionPrimitive from "@radix-ui/react-accordion";
|
|
1
2
|
import * as React from "react";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
declare const Accordion: React.ForwardRefExoticComponent<(AccordionPrimitive.AccordionSingleProps | AccordionPrimitive.AccordionMultipleProps) & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
+
declare const AccordionItem: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
+
declare const AccordionTrigger: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
6
|
+
declare const AccordionContent: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
/**
|
|
8
|
+
* Custom Accordion helper for easy implementation.
|
|
9
|
+
* API similar to DetailSheet where trigger can be passed as a prop or children.
|
|
10
|
+
*/
|
|
11
|
+
interface CustomAccordionProps {
|
|
12
|
+
title?: React.ReactNode;
|
|
5
13
|
children: React.ReactNode;
|
|
6
|
-
|
|
14
|
+
trigger?: React.ReactNode;
|
|
15
|
+
value?: string;
|
|
7
16
|
className?: string;
|
|
8
|
-
|
|
17
|
+
type?: "single" | "multiple";
|
|
18
|
+
collapsible?: boolean;
|
|
9
19
|
}
|
|
10
|
-
export declare
|
|
11
|
-
export {};
|
|
20
|
+
export declare function CustomAccordion({ title, children, trigger, value, className, type, collapsible, }: CustomAccordionProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger };
|
|
@@ -1,12 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
|
|
1
|
+
import { AlertDialog as AlertDialogPrimitive } from "radix-ui";
|
|
2
|
+
import type * as React from "react";
|
|
3
|
+
import { Button } from "./button";
|
|
4
|
+
declare function AlertDialog({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function AlertDialogTrigger({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function AlertDialogPortal({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function AlertDialogOverlay({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Overlay>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare function AlertDialogContent({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare function AlertDialogHeader({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare function AlertDialogFooter({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare function AlertDialogMedia({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare function AlertDialogTitle({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Title>): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare function AlertDialogDescription({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Description>): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
declare function AlertDialogAction({ className, variant, size, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Action> & Pick<React.ComponentProps<typeof Button>, "variant" | "size">): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
declare function AlertDialogCancel({ className, variant, size, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Cancel> & Pick<React.ComponentProps<typeof Button>, "variant" | "size">): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, };
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import "
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
import type * as React from "react";
|
|
3
|
+
import "../../styles/button.scss";
|
|
4
|
+
declare const buttonVariants: (props?: ({
|
|
5
|
+
variant?: "default" | "link" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
|
|
6
|
+
size?: "default" | "icon" | "sm" | "lg" | "icon-sm" | "icon-xs" | "icon-lg" | "xs" | null | undefined;
|
|
7
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
|
+
declare function Button({ className, variant, size, asChild, ...props }: React.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
|
|
9
|
+
asChild?: boolean;
|
|
10
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export { Button, buttonVariants };
|
|
@@ -1,28 +1,15 @@
|
|
|
1
|
+
import { Dialog as SheetPrimitive } from "radix-ui";
|
|
1
2
|
import type * as React from "react";
|
|
2
|
-
import "
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
className?: string;
|
|
16
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
17
|
-
export declare function SheetTitle({ children, className, }: {
|
|
18
|
-
children: React.ReactNode;
|
|
19
|
-
className?: string;
|
|
20
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
21
|
-
export declare function SheetDescription({ children, className, }: {
|
|
22
|
-
children: React.ReactNode;
|
|
23
|
-
className?: string;
|
|
24
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
25
|
-
export declare function SheetFooter({ children, className, }: {
|
|
26
|
-
children: React.ReactNode;
|
|
27
|
-
className?: string;
|
|
28
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
import "../../styles/sheet.scss";
|
|
4
|
+
declare function Sheet({ ...props }: React.ComponentProps<typeof SheetPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function SheetTrigger({ ...props }: React.ComponentProps<typeof SheetPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function SheetClose({ ...props }: React.ComponentProps<typeof SheetPrimitive.Close>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function SheetContent({ className, children, side, showCloseButton, ...props }: React.ComponentProps<typeof SheetPrimitive.Content> & {
|
|
8
|
+
side?: "top" | "right" | "bottom" | "left";
|
|
9
|
+
showCloseButton?: boolean;
|
|
10
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare function SheetHeader({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare function SheetFooter({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare function SheetTitle({ className, ...props }: React.ComponentProps<typeof SheetPrimitive.Title>): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
declare function SheetDescription({ className, ...props }: React.ComponentProps<typeof SheetPrimitive.Description>): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
2
|
+
import type * as React from "react";
|
|
3
|
+
declare function TooltipProvider({ delayDuration, ...props }: React.ComponentProps<typeof TooltipPrimitive.Provider>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function Tooltip({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function TooltipTrigger({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function TooltipContent({ className, sideOffset, children, ...props }: React.ComponentProps<typeof TooltipPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import type { SerializableCollection } from
|
|
2
|
-
import
|
|
1
|
+
import type { SerializableCollection } from "../../../types";
|
|
2
|
+
import "../../../admin/ui/styles/versions.scss";
|
|
3
3
|
interface VersionsSheetProps {
|
|
4
4
|
collection: SerializableCollection;
|
|
5
5
|
parentId: string;
|
|
6
|
-
open: boolean;
|
|
7
|
-
onOpenChange: (open: boolean) => void;
|
|
8
6
|
onRestore: (data: Record<string, any>) => void;
|
|
7
|
+
children: React.ReactNode;
|
|
9
8
|
}
|
|
10
|
-
export declare function VersionsSheet({ collection, parentId,
|
|
9
|
+
export declare function VersionsSheet({ collection, parentId, onRestore, children }: VersionsSheetProps): import("react/jsx-runtime").JSX.Element;
|
|
11
10
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { SerializableCollection, SerializableConfig } from
|
|
2
|
-
import
|
|
1
|
+
import type { SerializableCollection, SerializableConfig } from '../../../types';
|
|
2
|
+
import '../../../admin/ui/styles/media-registry.scss';
|
|
3
3
|
export interface MediaRegistryViewProps {
|
|
4
4
|
collection: SerializableCollection;
|
|
5
5
|
config: SerializableConfig;
|
|
6
6
|
}
|
|
7
|
-
export declare function MediaRegistryView({ collection, config }: MediaRegistryViewProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare function MediaRegistryView({ collection, config, }: MediaRegistryViewProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
1
|
+
import type { ToastType } from "../../../admin/stores/ui";
|
|
2
|
+
import type { SerializableConfig } from "../../../types";
|
|
3
3
|
export interface SettingsViewProps {
|
|
4
4
|
notify?: (message: string, type?: ToastType) => void;
|
|
5
5
|
config: SerializableConfig;
|
package/dist/admin/vue.js
CHANGED
|
@@ -1,8 +1,31 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import"../chunk-
|
|
5
|
-
|
|
2
|
+
defineCustomField
|
|
3
|
+
} from "../chunk-rqyjjqgy.js";
|
|
4
|
+
import"../chunk-6bywt602.js";
|
|
5
|
+
|
|
6
|
+
// src/admin/vue.tsx
|
|
7
|
+
function defineVueField(tagName, Component, options) {
|
|
8
|
+
defineCustomField(tagName, {
|
|
9
|
+
mount: (container, props) => {
|
|
10
|
+
const app = options.createApp(Component, props);
|
|
11
|
+
container._opacaVueApp = app;
|
|
12
|
+
app.mount(container);
|
|
13
|
+
},
|
|
14
|
+
update: (container, props) => {
|
|
15
|
+
const app = container._opacaVueApp;
|
|
16
|
+
if (app && app._instance) {
|
|
17
|
+
Object.assign(app._instance.props, props);
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
unmount: (container) => {
|
|
21
|
+
const app = container._opacaVueApp;
|
|
22
|
+
if (app) {
|
|
23
|
+
app.unmount();
|
|
24
|
+
delete container._opacaVueApp;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
}
|
|
6
29
|
export {
|
|
7
30
|
defineVueField
|
|
8
31
|
};
|