@aham.ro/ui-designer 0.1.12 → 0.1.14

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.
Files changed (78) hide show
  1. package/dist/Designer.vue.d.ts +13 -1
  2. package/dist/index.d.ts +7 -3
  3. package/dist/preview.d.ts +40 -0
  4. package/dist/stores/checklist.d.ts +1 -1
  5. package/dist/stores/session.d.ts +13 -0
  6. package/dist/stores/templates.d.ts +5 -1
  7. package/dist/stores/theme.d.ts +12 -5
  8. package/dist/stores/translations.d.ts +9 -1
  9. package/dist/stores/workspace.d.ts +124 -4
  10. package/dist/ui-designer.css +1 -1
  11. package/dist/ui-designer.js +5382 -2391
  12. package/dist/widgets/ComponenList.vue.d.ts +13 -5
  13. package/dist/widgets/Header.vue.d.ts +3 -0
  14. package/dist/widgets/Properties.vue.d.ts +10 -2
  15. package/dist/widgets/SideInfo.vue.d.ts +7 -0
  16. package/dist/widgets/TemplateList.vue.d.ts +1 -0
  17. package/dist/widgets/Workspace.vue.d.ts +10 -1
  18. package/dist/widgets/components/Alert.vue.d.ts +1 -4
  19. package/dist/widgets/components/Checkbox.vue.d.ts +2 -4
  20. package/dist/widgets/components/ConsentCard.vue.d.ts +1 -4
  21. package/dist/widgets/components/Container.vue.d.ts +7 -16
  22. package/dist/widgets/components/DatePicker.vue.d.ts +10 -0
  23. package/dist/widgets/components/Divider.vue.d.ts +1 -3
  24. package/dist/widgets/components/EmailInput.vue.d.ts +1 -5
  25. package/dist/widgets/components/Errors.vue.d.ts +9 -0
  26. package/dist/widgets/components/Heading.vue.d.ts +2 -4
  27. package/dist/widgets/components/Image.vue.d.ts +1 -9
  28. package/dist/widgets/components/Layout.vue.d.ts +3 -7
  29. package/dist/widgets/components/LayoutRef.vue.d.ts +13 -7
  30. package/dist/widgets/components/LayoutSlot.vue.d.ts +13 -0
  31. package/dist/widgets/components/OtpInput.vue.d.ts +1 -4
  32. package/dist/widgets/components/PasswordInput.vue.d.ts +5 -7
  33. package/dist/widgets/components/ScopeList.vue.d.ts +1 -3
  34. package/dist/widgets/components/SocialButton.vue.d.ts +1 -4
  35. package/dist/widgets/components/Spacer.vue.d.ts +1 -3
  36. package/dist/widgets/components/SubmitButton.vue.d.ts +1 -4
  37. package/dist/widgets/components/Text.vue.d.ts +2 -3
  38. package/dist/widgets/components/TextInput.vue.d.ts +5 -5
  39. package/dist/widgets/components/TextLink.vue.d.ts +4 -5
  40. package/dist/widgets/components/ThemeToggler.vue.d.ts +11 -0
  41. package/dist/widgets/components/base/AlertBase.vue.d.ts +10 -0
  42. package/dist/widgets/components/base/CheckboxBase.vue.d.ts +13 -0
  43. package/dist/widgets/components/base/ConsentCardBase.vue.d.ts +10 -0
  44. package/dist/widgets/components/{Card.vue.d.ts → base/ContainerBase.vue.d.ts} +10 -9
  45. package/dist/widgets/components/base/DatePickerBase.vue.d.ts +17 -0
  46. package/dist/widgets/components/base/DividerBase.vue.d.ts +8 -0
  47. package/dist/widgets/components/base/EmailInputBase.vue.d.ts +18 -0
  48. package/dist/widgets/components/base/HeadingBase.vue.d.ts +12 -0
  49. package/dist/widgets/components/base/ImageBase.vue.d.ts +20 -0
  50. package/dist/widgets/components/base/LayoutBase.vue.d.ts +22 -0
  51. package/dist/widgets/components/base/LayoutRefBase.vue.d.ts +23 -0
  52. package/dist/widgets/components/base/OtpInputBase.vue.d.ts +10 -0
  53. package/dist/widgets/components/base/PasswordInputBase.vue.d.ts +30 -0
  54. package/dist/widgets/components/base/ScopeListBase.vue.d.ts +8 -0
  55. package/dist/widgets/components/base/SocialButtonBase.vue.d.ts +11 -0
  56. package/dist/widgets/components/base/SpacerBase.vue.d.ts +8 -0
  57. package/dist/widgets/components/base/SubmitButtonBase.vue.d.ts +10 -0
  58. package/dist/widgets/components/base/TextBase.vue.d.ts +10 -0
  59. package/dist/widgets/components/base/TextInputBase.vue.d.ts +21 -0
  60. package/dist/widgets/components/base/TextLinkBase.vue.d.ts +18 -0
  61. package/dist/widgets/components/base/ThemeTogglerBase.vue.d.ts +20 -0
  62. package/dist/widgets/components/base/index.d.ts +49 -0
  63. package/dist/widgets/components/index.d.ts +19 -15
  64. package/dist/widgets/components/linkResolver.d.ts +4 -0
  65. package/dist/widgets/components/types.d.ts +5 -0
  66. package/dist/widgets/header/IconButton.vue.d.ts +1 -1
  67. package/dist/widgets/header/SaveButton.vue.d.ts +5 -1
  68. package/dist/widgets/header/types.d.ts +5 -0
  69. package/dist/widgets/workspace/Breadcrumb.vue.d.ts +4 -1
  70. package/dist/widgets/workspace/ComponentHandler.vue.d.ts +4 -4
  71. package/dist/widgets/workspace/Composer.vue.d.ts +4 -1
  72. package/dist/widgets/workspace/DataExpose.vue.d.ts +13 -0
  73. package/dist/widgets/workspace/Editable.vue.d.ts +18 -0
  74. package/dist/widgets/workspace/WorkspaceNode.vue.d.ts +11 -4
  75. package/dist/widgets/workspace/ZoomController.vue.d.ts +0 -1
  76. package/dist/widgets/workspace/configuration.d.ts +3 -4
  77. package/dist/widgets/workspace/editable.d.ts +8 -4
  78. package/package.json +5 -1
@@ -0,0 +1,12 @@
1
+ type __VLS_Props = {
2
+ text?: string;
3
+ size?: 'sm' | 'md' | 'lg' | 'xl';
4
+ textAlign?: 'left' | 'center' | 'right';
5
+ };
6
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
7
+ size: "sm" | "md" | "lg" | "xl";
8
+ text: string;
9
+ textAlign: "left" | "center" | "right";
10
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
+ declare const _default: typeof __VLS_export;
12
+ export default _default;
@@ -0,0 +1,20 @@
1
+ type __VLS_Props = {
2
+ src?: string;
3
+ alt?: string;
4
+ width?: string | number;
5
+ height?: string | number;
6
+ radius?: string | number;
7
+ href?: string;
8
+ hrefTarget?: '_self' | '_blank';
9
+ };
10
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
11
+ height: string | number;
12
+ width: string | number;
13
+ radius: string | number;
14
+ src: string;
15
+ alt: string;
16
+ href: string;
17
+ hrefTarget: "_self" | "_blank";
18
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
19
+ declare const _default: typeof __VLS_export;
20
+ export default _default;
@@ -0,0 +1,22 @@
1
+ type __VLS_Props = {
2
+ direction?: 'row' | 'column';
3
+ gap?: number | string;
4
+ padding?: number | string;
5
+ };
6
+ declare var __VLS_1: {};
7
+ type __VLS_Slots = {} & {
8
+ default?: (props: typeof __VLS_1) => any;
9
+ };
10
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
11
+ padding: number | string;
12
+ gap: number | string;
13
+ direction: "row" | "column";
14
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
15
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
16
+ declare const _default: typeof __VLS_export;
17
+ export default _default;
18
+ type __VLS_WithSlots<T, S> = T & {
19
+ new (): {
20
+ $slots: S;
21
+ };
22
+ };
@@ -0,0 +1,23 @@
1
+ import { type BoxProps } from '../types';
2
+ type __VLS_Props = BoxProps & {
3
+ layoutKey?: string;
4
+ label?: string;
5
+ minHeight?: string | number;
6
+ };
7
+ declare var __VLS_1: {};
8
+ type __VLS_Slots = {} & {
9
+ default?: (props: typeof __VLS_1) => any;
10
+ };
11
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
12
+ layoutKey: string;
13
+ label: string;
14
+ width: import("../types").ComponentLength;
15
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
16
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
17
+ declare const _default: typeof __VLS_export;
18
+ export default _default;
19
+ type __VLS_WithSlots<T, S> = T & {
20
+ new (): {
21
+ $slots: S;
22
+ };
23
+ };
@@ -0,0 +1,10 @@
1
+ type __VLS_Props = {
2
+ label?: string;
3
+ digits?: number;
4
+ };
5
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
6
+ label: string;
7
+ digits: number;
8
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
9
+ declare const _default: typeof __VLS_export;
10
+ export default _default;
@@ -0,0 +1,30 @@
1
+ type __VLS_Props = {
2
+ label?: string;
3
+ placeholder?: string;
4
+ required?: boolean;
5
+ textColor?: string;
6
+ showForgot?: boolean;
7
+ showForgotLabel?: string;
8
+ forgotDestinationType?: 'custom' | 'template';
9
+ forgotHref?: string;
10
+ forgotTemplateKey?: string;
11
+ forgotTemplateId?: string;
12
+ modelValue?: string;
13
+ name?: string;
14
+ interaction?: boolean;
15
+ };
16
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
17
+ name: string;
18
+ label: string;
19
+ placeholder: string;
20
+ required: boolean;
21
+ interaction: boolean;
22
+ showForgot: boolean;
23
+ showForgotLabel: string;
24
+ forgotDestinationType: "custom" | "template";
25
+ forgotHref: string;
26
+ forgotTemplateKey: string;
27
+ forgotTemplateId: string;
28
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
29
+ declare const _default: typeof __VLS_export;
30
+ export default _default;
@@ -0,0 +1,8 @@
1
+ type __VLS_Props = {
2
+ scopes?: string[] | string;
3
+ };
4
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
5
+ scopes: string[] | string;
6
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
7
+ declare const _default: typeof __VLS_export;
8
+ export default _default;
@@ -0,0 +1,11 @@
1
+ type Provider = 'google' | 'github' | 'microsoft' | 'apple';
2
+ type __VLS_Props = {
3
+ provider?: Provider;
4
+ text?: string;
5
+ };
6
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
7
+ text: string;
8
+ provider: Provider;
9
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
10
+ declare const _default: typeof __VLS_export;
11
+ export default _default;
@@ -0,0 +1,8 @@
1
+ type __VLS_Props = {
2
+ height?: number | string;
3
+ };
4
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
5
+ height: number | string;
6
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
7
+ declare const _default: typeof __VLS_export;
8
+ export default _default;
@@ -0,0 +1,10 @@
1
+ type __VLS_Props = {
2
+ text?: string;
3
+ style?: 'primary' | 'secondary';
4
+ };
5
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
6
+ text: string;
7
+ style: "primary" | "secondary";
8
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
9
+ declare const _default: typeof __VLS_export;
10
+ export default _default;
@@ -0,0 +1,10 @@
1
+ type __VLS_Props = {
2
+ text?: string;
3
+ textAlign?: 'left' | 'center' | 'right';
4
+ };
5
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
6
+ text: string;
7
+ textAlign: "left" | "center" | "right";
8
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
9
+ declare const _default: typeof __VLS_export;
10
+ export default _default;
@@ -0,0 +1,21 @@
1
+ type __VLS_Props = {
2
+ name?: string;
3
+ dataSource?: 'given_name' | 'family_name' | 'attributes';
4
+ attributesKey?: string;
5
+ label?: string;
6
+ inputType?: 'text' | 'number' | 'phone';
7
+ placeholder?: string;
8
+ required?: boolean;
9
+ modelValue?: string;
10
+ interaction?: boolean;
11
+ };
12
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
13
+ name: string;
14
+ label: string;
15
+ placeholder: string;
16
+ required: boolean;
17
+ interaction: boolean;
18
+ inputType: "text" | "number" | "phone";
19
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
20
+ declare const _default: typeof __VLS_export;
21
+ export default _default;
@@ -0,0 +1,18 @@
1
+ type __VLS_Props = {
2
+ text?: string;
3
+ destinationType?: 'custom' | 'template';
4
+ href?: string;
5
+ templateKey?: string;
6
+ templateId?: string;
7
+ target?: '_self' | '_blank';
8
+ };
9
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
10
+ text: string;
11
+ templateId: string;
12
+ href: string;
13
+ target: "_self" | "_blank";
14
+ destinationType: "custom" | "template";
15
+ templateKey: string;
16
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
17
+ declare const _default: typeof __VLS_export;
18
+ export default _default;
@@ -0,0 +1,20 @@
1
+ import { type BoxProps } from '../types';
2
+ type __VLS_Props = Omit<BoxProps, 'width' | 'height' | 'background' | 'borderStyle' | 'borderColor' | 'borderWidth' | 'radius' | 'padding'> & {
3
+ icon?: string;
4
+ iconSize?: string | number;
5
+ preview?: boolean;
6
+ placement?: string;
7
+ transform?: string;
8
+ };
9
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
10
+ icon: string;
11
+ right: import("../types").ComponentLength;
12
+ preview: boolean;
13
+ position: "relative" | "absolute";
14
+ bottom: import("../types").ComponentLength;
15
+ align: string;
16
+ iconSize: string | number;
17
+ placement: string;
18
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
19
+ declare const _default: typeof __VLS_export;
20
+ export default _default;
@@ -0,0 +1,49 @@
1
+ export { default as AlertBase } from './AlertBase.vue';
2
+ export { default as CheckboxBase } from './CheckboxBase.vue';
3
+ export { default as ConsentCardBase } from './ConsentCardBase.vue';
4
+ export { default as ContainerBase } from './ContainerBase.vue';
5
+ export { default as DividerBase } from './DividerBase.vue';
6
+ export { default as DatePickerBase } from './DatePickerBase.vue';
7
+ export { default as EmailInputBase } from './EmailInputBase.vue';
8
+ export { default as HeadingBase } from './HeadingBase.vue';
9
+ export { default as ImageBase } from './ImageBase.vue';
10
+ export { default as LayoutBase } from './LayoutBase.vue';
11
+ export { default as LayoutRefBase } from './LayoutRefBase.vue';
12
+ export { default as ThemeTogglerBase } from './ThemeTogglerBase.vue';
13
+ export { default as OtpInputBase } from './OtpInputBase.vue';
14
+ export { default as PasswordInputBase } from './PasswordInputBase.vue';
15
+ export { default as ScopeListBase } from './ScopeListBase.vue';
16
+ export { default as SocialButtonBase } from './SocialButtonBase.vue';
17
+ export { default as SpacerBase } from './SpacerBase.vue';
18
+ export { default as SubmitButtonBase } from './SubmitButtonBase.vue';
19
+ export { default as TextBase } from './TextBase.vue';
20
+ export { default as TextInputBase } from './TextInputBase.vue';
21
+ export { default as TextLinkBase } from './TextLinkBase.vue';
22
+ import { type Component, type VNode } from 'vue';
23
+ export interface BaseComponentData {
24
+ name?: string;
25
+ type?: string;
26
+ props?: Record<string, unknown>;
27
+ }
28
+ export type RenderDevice = 'base' | 'phone' | 'tablet' | 'desktop';
29
+ export type ComponentNode = BaseComponentData & {
30
+ id?: string;
31
+ layoutId?: string;
32
+ children?: ComponentNode[];
33
+ };
34
+ export type RenderTemplate = {
35
+ components?: ComponentNode[];
36
+ };
37
+ export type RenderWalker = (node: ComponentNode, context: {
38
+ device: RenderDevice;
39
+ index: number;
40
+ path: number[];
41
+ }) => Record<string, unknown> | undefined;
42
+ declare const components: Record<string, Component>;
43
+ export declare function renderBaseComponent(data: BaseComponentData): {
44
+ name: string | undefined;
45
+ component: Component;
46
+ props: Record<string, unknown>;
47
+ } | undefined;
48
+ export declare function render(source: ComponentNode[] | RenderTemplate, device?: RenderDevice, walker?: RenderWalker, path?: number[]): VNode[];
49
+ export default components;
@@ -1,22 +1,26 @@
1
+ export { default as Alert } from './Alert.vue';
2
+ export { default as Checkbox } from './Checkbox.vue';
3
+ export { default as ConsentCard } from './ConsentCard.vue';
1
4
  export { default as Container } from './Container.vue';
2
- export { default as Card } from './Card.vue';
3
- export { default as Spacer } from './Spacer.vue';
5
+ export { default as Content } from './Content.vue';
4
6
  export { default as Divider } from './Divider.vue';
7
+ export { default as DatePicker } from './DatePicker.vue';
8
+ export { default as Document } from './Document.vue';
9
+ export { default as EmailInput } from './EmailInput.vue';
10
+ export { default as Errors } from './Errors.vue';
11
+ export { default as Heading } from './Heading.vue';
12
+ export { default as Image } from './Image.vue';
5
13
  export { default as Layout } from './Layout.vue';
6
14
  export { default as LayoutRef } from './LayoutRef.vue';
7
- export { default as EmailInput } from './EmailInput.vue';
8
- export { default as TextInput } from './TextInput.vue';
9
- export { default as PasswordInput } from './PasswordInput.vue';
15
+ export { default as LayoutSlot } from './LayoutSlot.vue';
10
16
  export { default as OtpInput } from './OtpInput.vue';
11
- export { default as Checkbox } from './Checkbox.vue';
12
- export { default as SubmitButton } from './SubmitButton.vue';
17
+ export { default as PasswordInput } from './PasswordInput.vue';
18
+ export { default as ScopeList } from './ScopeList.vue';
13
19
  export { default as SocialButton } from './SocialButton.vue';
14
- export { default as TextLink } from './TextLink.vue';
15
- export { default as Heading } from './Heading.vue';
20
+ export { default as Spacer } from './Spacer.vue';
21
+ export { default as SubmitButton } from './SubmitButton.vue';
16
22
  export { default as Text } from './Text.vue';
17
- export { default as Image } from './Image.vue';
18
- export { default as Alert } from './Alert.vue';
19
- export { default as Content } from './Content.vue';
20
- export { default as ConsentCard } from './ConsentCard.vue';
21
- export { default as ScopeList } from './ScopeList.vue';
22
- export { default as Document } from './Document.vue';
23
+ export { default as TextInput } from './TextInput.vue';
24
+ export { default as TextLink } from './TextLink.vue';
25
+ export { default as ThemeToggler } from './ThemeToggler.vue';
26
+ export * from './base';
@@ -0,0 +1,4 @@
1
+ import { type InjectionKey } from 'vue';
2
+ export type DesignerLinks = Record<string, string>;
3
+ export declare const designerLinksKey: InjectionKey<DesignerLinks>;
4
+ export declare function resolveDesignerLink(key: string | undefined, fallback?: string): string;
@@ -2,6 +2,11 @@ export type ComponentLength = string | number;
2
2
  export interface BoxProps {
3
3
  width?: ComponentLength;
4
4
  height?: ComponentLength;
5
+ minWidth?: ComponentLength;
6
+ maxWidth?: ComponentLength;
7
+ minHeight?: ComponentLength;
8
+ maxHeight?: ComponentLength;
9
+ flex?: string | number;
5
10
  margin?: ComponentLength;
6
11
  padding?: ComponentLength;
7
12
  layout?: 'flex' | 'grid' | 'block';
@@ -6,8 +6,8 @@ type __VLS_Props = {
6
6
  };
7
7
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
8
8
  title: string;
9
- active: boolean;
10
9
  icon: string;
10
+ active: boolean;
11
11
  disabled: boolean;
12
12
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
13
  declare const _default: typeof __VLS_export;
@@ -2,7 +2,11 @@ type __VLS_Props = {
2
2
  disabled?: boolean;
3
3
  working?: boolean;
4
4
  };
5
- declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
5
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
6
+ click: () => any;
7
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
8
+ onClick?: (() => any) | undefined;
9
+ }>, {
6
10
  disabled: boolean;
7
11
  working: boolean;
8
12
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -1,6 +1,7 @@
1
1
  export interface MoreMenuItem {
2
2
  id: string;
3
3
  label: string;
4
+ type?: 'item' | 'divider';
4
5
  icon?: string;
5
6
  disabled?: boolean;
6
7
  }
@@ -11,6 +12,10 @@ export interface Template {
11
12
  channel: string;
12
13
  icon: string;
13
14
  changed: boolean;
15
+ hasDraft?: boolean;
16
+ draftVersionId?: string;
17
+ canDelete?: boolean;
18
+ requiredComponents?: string[];
14
19
  type?: 'predefined' | 'dynamic';
15
20
  }
16
21
  export interface ChecklistItem {
@@ -1,3 +1,6 @@
1
- declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
1
+ type __VLS_Props = {
2
+ channel?: string;
3
+ };
4
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
2
5
  declare const _default: typeof __VLS_export;
3
6
  export default _default;
@@ -5,15 +5,15 @@ type __VLS_Props = {
5
5
  selected?: boolean;
6
6
  preview?: boolean;
7
7
  };
8
- declare var __VLS_7: {};
8
+ declare var __VLS_15: {};
9
9
  type __VLS_Slots = {} & {
10
- default?: (props: typeof __VLS_7) => any;
10
+ default?: (props: typeof __VLS_15) => any;
11
11
  };
12
12
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
13
- select: () => any;
13
+ select: (id?: string | undefined) => any;
14
14
  moveStart: (id: string, event: DragEvent) => any;
15
15
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
16
- onSelect?: (() => any) | undefined;
16
+ onSelect?: ((id?: string | undefined) => any) | undefined;
17
17
  onMoveStart?: ((id: string, event: DragEvent) => any) | undefined;
18
18
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
19
19
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -1,14 +1,17 @@
1
1
  import { type WorkspaceComponent } from '../../stores/workspace';
2
2
  type __VLS_Props = {
3
3
  preview?: boolean;
4
+ zoom?: number;
4
5
  };
5
- declare function addComponent(type: string): void;
6
+ declare function addComponent(type: string, componentProps?: Record<string, unknown>): void;
6
7
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
7
8
  addComponent: typeof addComponent;
8
9
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
10
+ contextMenu: (id: string, event: MouseEvent) => any;
9
11
  componentDrop: (type: string) => any;
10
12
  componentSelect: (component: WorkspaceComponent) => any;
11
13
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
14
+ onContextMenu?: ((id: string, event: MouseEvent) => any) | undefined;
12
15
  onComponentDrop?: ((type: string) => any) | undefined;
13
16
  onComponentSelect?: ((component: WorkspaceComponent) => any) | undefined;
14
17
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -0,0 +1,13 @@
1
+ import { type DynamicTemplateData } from '../../stores/workspace';
2
+ type __VLS_Props = {
3
+ dynamicTemplates?: DynamicTemplateData[];
4
+ };
5
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
6
+ dynamicTemplatesImported: (templates: DynamicTemplateData[]) => any;
7
+ workspaceImported: () => any;
8
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
9
+ onDynamicTemplatesImported?: ((templates: DynamicTemplateData[]) => any) | undefined;
10
+ onWorkspaceImported?: (() => any) | undefined;
11
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
12
+ declare const _default: typeof __VLS_export;
13
+ export default _default;
@@ -0,0 +1,18 @@
1
+ type __VLS_Props = {
2
+ disabled?: boolean;
3
+ };
4
+ declare var __VLS_1: {};
5
+ type __VLS_Slots = {} & {
6
+ default?: (props: typeof __VLS_1) => any;
7
+ };
8
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
9
+ disabled: boolean;
10
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
12
+ declare const _default: typeof __VLS_export;
13
+ export default _default;
14
+ type __VLS_WithSlots<T, S> = T & {
15
+ new (): {
16
+ $slots: S;
17
+ };
18
+ };
@@ -2,18 +2,25 @@ import { type WorkspaceComponent, type WorkspaceDevice } from '../../stores/work
2
2
  type __VLS_Props = {
3
3
  component: WorkspaceComponent;
4
4
  selectedId?: string;
5
+ selectedTemplateId?: string;
6
+ templateId?: string;
5
7
  preview?: boolean;
6
8
  depth?: number;
7
9
  device?: WorkspaceDevice;
10
+ zoom?: number;
11
+ layoutSlotContent?: WorkspaceComponent[];
12
+ layoutSlotTargetId?: string;
8
13
  };
9
14
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
10
- select: (id: string) => any;
11
- drop: (parentId: string, type: string) => any;
15
+ select: (id: string, templateId?: string | undefined) => any;
16
+ drop: (parentId: string, type: string, index?: number | undefined) => any;
12
17
  moveStart: (id: string, event: DragEvent) => any;
18
+ contextMenu: (id: string, event: MouseEvent) => any;
13
19
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
14
- onSelect?: ((id: string) => any) | undefined;
15
- onDrop?: ((parentId: string, type: string) => any) | undefined;
20
+ onSelect?: ((id: string, templateId?: string | undefined) => any) | undefined;
21
+ onDrop?: ((parentId: string, type: string, index?: number | undefined) => any) | undefined;
16
22
  onMoveStart?: ((id: string, event: DragEvent) => any) | undefined;
23
+ onContextMenu?: ((id: string, event: MouseEvent) => any) | undefined;
17
24
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
18
25
  declare const _default: typeof __VLS_export;
19
26
  export default _default;
@@ -1,7 +1,6 @@
1
1
  type __VLS_Props = {
2
2
  modelValue: number;
3
3
  pan: boolean;
4
- debug?: boolean;
5
4
  };
6
5
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
7
6
  "update:modelValue": (value: number) => any;
@@ -1,12 +1,11 @@
1
1
  import type { Component } from 'vue';
2
- import { withEditable, type EditablePropDefinition } from './editable';
3
- export { withEditable };
4
- export type { EditablePropDefinition };
2
+ import { withProperties } from './editable';
3
+ export { withProperties };
5
4
  export declare const componentDisplayNames: Record<string, string>;
6
5
  export declare const componentIcons: Record<string, string>;
7
6
  export declare function getComponentDisplayName(type: string): string;
8
7
  export declare const componentMap: Record<string, Component>;
9
- export declare const componentPropDefinitions: Record<string, (EditablePropDefinition & {
8
+ export declare const componentPropDefinitions: Record<string, (import("./editable").PropertyDefinition & {
10
9
  key: string;
11
10
  })[]>;
12
11
  export declare const slotComponentTypes: Set<string>;
@@ -1,12 +1,16 @@
1
- export type EditablePropDefinition = {
1
+ import type { ThemeVariable } from '../..';
2
+ export type PropertyDefinition = {
2
3
  label?: string;
3
4
  type: 'string' | 'text' | 'number' | 'boolean' | 'select' | 'color';
4
5
  translations?: boolean;
6
+ syncAcrossScreens?: boolean;
5
7
  options?: string[];
6
8
  defaultValue?: string | number | boolean;
7
9
  };
8
- export type EditablePropDefinitions = Record<string, EditablePropDefinition>;
9
- export declare const editablePropDefinitions: Record<string, (EditablePropDefinition & {
10
+ export type PropertyDefinitions = Record<string, PropertyDefinition>;
11
+ export declare const propertyDefinitions: Record<string, (PropertyDefinition & {
10
12
  key: string;
11
13
  })[]>;
12
- export declare function withEditable(componentType: string, definitions: EditablePropDefinitions): EditablePropDefinitions;
14
+ export declare function withProperties(componentType: string, definitions: PropertyDefinitions): PropertyDefinitions;
15
+ export declare function withStyleVariables(componentType: string, definitions: ThemeVariable[]): ThemeVariable[];
16
+ export declare function setPropertyOptions(componentType: string, propertyKey: string, options: string[]): void;
package/package.json CHANGED
@@ -1,10 +1,14 @@
1
1
  {
2
2
  "name": "@aham.ro/ui-designer",
3
- "version": "0.1.12",
3
+ "version": "0.1.14",
4
4
  "description": "Vue components for the UI designer for IAM and email templates.",
5
5
  "keywords": [
6
6
  "stable"
7
7
  ],
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://gitlab.com/aham.ro/iam/designer.git"
11
+ },
8
12
  "type": "module",
9
13
  "files": [
10
14
  "dist"