@aham.ro/ui-designer 0.1.9 → 0.1.10

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.
@@ -1,3 +1,19 @@
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
+ import type { WorkspaceComponent } from '../stores/workspace';
2
+ type __VLS_Props = {
3
+ layers?: {
4
+ id: string;
5
+ type: string;
6
+ label: string;
7
+ icon: string;
8
+ }[];
9
+ selectedComponent?: WorkspaceComponent;
10
+ };
11
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
12
+ updateProps: (props: Record<string, unknown>) => any;
13
+ focusTranslation: (id: string) => any;
14
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
15
+ onUpdateProps?: ((props: Record<string, unknown>) => any) | undefined;
16
+ onFocusTranslation?: ((id: string) => any) | undefined;
17
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
2
18
  declare const _default: typeof __VLS_export;
3
19
  export default _default;
@@ -4,12 +4,12 @@ type __VLS_Props = {
4
4
  focusedTemplateId?: string;
5
5
  };
6
6
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
7
- select: (id: string) => any;
8
7
  add: () => any;
8
+ select: (id: string) => any;
9
9
  rename: (id: string, name: string) => any;
10
10
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
11
- onSelect?: ((id: string) => any) | undefined;
12
11
  onAdd?: (() => any) | undefined;
12
+ onSelect?: ((id: string) => any) | undefined;
13
13
  onRename?: ((id: string, name: string) => any) | undefined;
14
14
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
15
15
  declare const _default: typeof __VLS_export;
@@ -9,6 +9,7 @@ export interface TranslationField {
9
9
  type __VLS_Props = {
10
10
  open: boolean;
11
11
  fields?: TranslationField[];
12
+ focusedFieldId?: string;
12
13
  };
13
14
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
14
15
  close: () => any;
@@ -0,0 +1,15 @@
1
+ type __VLS_Props = {
2
+ subject: string;
3
+ templateId?: string;
4
+ templateName?: string;
5
+ };
6
+ declare function addComponent(type: string): void;
7
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
8
+ addComponent: typeof addComponent;
9
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
10
+ componentDrop: (type: string) => any;
11
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
12
+ onComponentDrop?: ((type: string) => any) | undefined;
13
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
14
+ declare const _default: typeof __VLS_export;
15
+ export default _default;
@@ -3,8 +3,8 @@ type __VLS_Props = {
3
3
  size?: 'sm' | 'md' | 'lg' | 'xl';
4
4
  };
5
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
6
  size: "sm" | "md" | "lg" | "xl";
7
+ text: string;
8
8
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
9
9
  declare const _default: typeof __VLS_export;
10
10
  export default _default;
@@ -0,0 +1,3 @@
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>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
@@ -0,0 +1,15 @@
1
+ type __VLS_Props = {
2
+ type: string;
3
+ id?: string;
4
+ componentProps?: Record<string, unknown>;
5
+ selected?: boolean;
6
+ };
7
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
8
+ select: () => any;
9
+ moveStart: (id: string, event: DragEvent) => any;
10
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
11
+ onSelect?: (() => any) | undefined;
12
+ onMoveStart?: ((id: string, event: DragEvent) => any) | undefined;
13
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
14
+ declare const _default: typeof __VLS_export;
15
+ export default _default;
@@ -0,0 +1,13 @@
1
+ import { type WorkspaceComponent } from '../../stores/workspace';
2
+ declare function addComponent(type: string): void;
3
+ declare const __VLS_export: import("vue").DefineComponent<{}, {
4
+ addComponent: typeof addComponent;
5
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
6
+ componentDrop: (type: string) => any;
7
+ componentSelect: (component: WorkspaceComponent) => any;
8
+ }, string, import("vue").PublicProps, Readonly<{}> & Readonly<{
9
+ onComponentDrop?: ((type: string) => any) | undefined;
10
+ onComponentSelect?: ((component: WorkspaceComponent) => any) | undefined;
11
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
12
+ declare const _default: typeof __VLS_export;
13
+ export default _default;
@@ -0,0 +1,31 @@
1
+ interface RenderedComponent {
2
+ type: string;
3
+ props?: Record<string, unknown>;
4
+ }
5
+ type __VLS_Props = {
6
+ components: RenderedComponent[];
7
+ selectedIndex?: number;
8
+ };
9
+ declare var __VLS_1: {
10
+ type: string;
11
+ props: Record<string, unknown> | undefined;
12
+ index: number;
13
+ selected: boolean;
14
+ select: () => void;
15
+ };
16
+ type __VLS_Slots = {} & {
17
+ default?: (props: typeof __VLS_1) => any;
18
+ };
19
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
20
+ select: (index: number) => any;
21
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
22
+ onSelect?: ((index: number) => any) | undefined;
23
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
24
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
25
+ declare const _default: typeof __VLS_export;
26
+ export default _default;
27
+ type __VLS_WithSlots<T, S> = T & {
28
+ new (): {
29
+ $slots: S;
30
+ };
31
+ };
@@ -0,0 +1,11 @@
1
+ import type { Component } from 'vue';
2
+ import { withEditable, type EditablePropDefinition } from './editable';
3
+ export { withEditable };
4
+ export type { EditablePropDefinition };
5
+ export declare const componentDisplayNames: Record<string, string>;
6
+ export declare const componentIcons: Record<string, string>;
7
+ export declare function getComponentDisplayName(type: string): string;
8
+ export declare const componentMap: Record<string, Component>;
9
+ export declare const componentPropDefinitions: Record<string, (EditablePropDefinition & {
10
+ key: string;
11
+ })[]>;
@@ -0,0 +1,12 @@
1
+ export type EditablePropDefinition = {
2
+ label?: string;
3
+ type: 'string' | 'text' | 'number' | 'boolean' | 'select';
4
+ translations?: boolean;
5
+ options?: string[];
6
+ defaultValue?: string | number | boolean;
7
+ };
8
+ export type EditablePropDefinitions = Record<string, EditablePropDefinition>;
9
+ export declare const editablePropDefinitions: Record<string, Array<EditablePropDefinition & {
10
+ key: string;
11
+ }>>;
12
+ export declare function withEditable(componentType: string, definitions: EditablePropDefinitions): EditablePropDefinitions;
@@ -0,0 +1,13 @@
1
+ declare var __VLS_1: {};
2
+ type __VLS_Slots = {} & {
3
+ default?: (props: typeof __VLS_1) => any;
4
+ };
5
+ declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
6
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
7
+ declare const _default: typeof __VLS_export;
8
+ export default _default;
9
+ type __VLS_WithSlots<T, S> = T & {
10
+ new (): {
11
+ $slots: S;
12
+ };
13
+ };
@@ -0,0 +1,16 @@
1
+ type __VLS_Props = {
2
+ mode: 'phone' | 'tablet';
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<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
9
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
10
+ declare const _default: typeof __VLS_export;
11
+ export default _default;
12
+ type __VLS_WithSlots<T, S> = T & {
13
+ new (): {
14
+ $slots: S;
15
+ };
16
+ };
@@ -0,0 +1,13 @@
1
+ declare var __VLS_8: {};
2
+ type __VLS_Slots = {} & {
3
+ default?: (props: typeof __VLS_8) => any;
4
+ };
5
+ declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
6
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
7
+ declare const _default: typeof __VLS_export;
8
+ export default _default;
9
+ type __VLS_WithSlots<T, S> = T & {
10
+ new (): {
11
+ $slots: S;
12
+ };
13
+ };
@@ -0,0 +1,13 @@
1
+ declare var __VLS_8: {};
2
+ type __VLS_Slots = {} & {
3
+ default?: (props: typeof __VLS_8) => any;
4
+ };
5
+ declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
6
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
7
+ declare const _default: typeof __VLS_export;
8
+ export default _default;
9
+ type __VLS_WithSlots<T, S> = T & {
10
+ new (): {
11
+ $slots: S;
12
+ };
13
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aham.ro/ui-designer",
3
- "version": "0.1.9",
3
+ "version": "0.1.10",
4
4
  "description": "Vue components for the UI designer for IAM and email templates.",
5
5
  "type": "module",
6
6
  "files": [
@@ -1,26 +0,0 @@
1
- export interface ScreenBase {
2
- id: string;
3
- name: string;
4
- icon: string;
5
- channel: string;
6
- version: string;
7
- changed: boolean;
8
- }
9
- export interface PredefinedScreen extends ScreenBase {
10
- type: 'predefined';
11
- }
12
- export interface DynamicScreen extends ScreenBase {
13
- type: 'dynamic';
14
- content?: Record<string, unknown>;
15
- }
16
- export type Screen = PredefinedScreen | DynamicScreen;
17
- export declare const useScreensStore: import("pinia").StoreDefinition<"screens", {
18
- screens: Screen[];
19
- screen: Screen | null;
20
- }, {}, {
21
- setScreens(screens: Screen[]): void;
22
- setActive(id: string): void;
23
- addDynamicLayout(template?: DynamicScreen): void;
24
- rename(id: string, name: string): void;
25
- clear(): void;
26
- }>;