@razaman2/reactive-view 0.1.0-beta.9 → 0.2.1

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 (65) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +1 -1
  3. package/dist/Editor-DMCekNFl.mjs +364 -0
  4. package/dist/Editor-JraAPAuW.js +1 -0
  5. package/dist/Label-CkJjlfli.js +1 -0
  6. package/dist/Label-DD9yGa7V.mjs +49 -0
  7. package/dist/ReactiveView.d.mts +20 -0
  8. package/dist/ReactiveView.d.ts +20 -0
  9. package/dist/Select-D8LFsK4R.js +1 -0
  10. package/dist/Select-x96YoTl5.mjs +238 -0
  11. package/dist/Subscription.d.mts +17 -0
  12. package/dist/Subscription.d.ts +17 -0
  13. package/dist/Subscriptions.d.mts +5 -0
  14. package/dist/Subscriptions.d.ts +5 -0
  15. package/dist/Types.d.mts +28 -0
  16. package/dist/Types.d.ts +28 -0
  17. package/dist/components/Button.vue.d.mts +3 -0
  18. package/dist/components/Button.vue.d.ts +3 -0
  19. package/dist/components/ConfirmationModal.vue.d.mts +3 -0
  20. package/dist/components/ConfirmationModal.vue.d.ts +3 -0
  21. package/dist/components/CustomAlert.vue.d.mts +69 -0
  22. package/dist/components/CustomAlert.vue.d.ts +69 -0
  23. package/dist/components/CustomButton.vue.d.mts +3 -0
  24. package/dist/components/CustomButton.vue.d.ts +3 -0
  25. package/dist/components/CustomModal.vue.d.mts +3 -0
  26. package/dist/components/CustomModal.vue.d.ts +3 -0
  27. package/dist/components/CustomTable.vue.d.mts +3 -0
  28. package/dist/components/CustomTable.vue.d.ts +3 -0
  29. package/dist/components/CustomTableRow.vue.d.mts +3 -0
  30. package/dist/components/CustomTableRow.vue.d.ts +3 -0
  31. package/dist/components/Datetime.vue.d.mts +3 -0
  32. package/dist/components/Datetime.vue.d.ts +3 -0
  33. package/dist/components/DraggableList.vue.d.mts +3 -0
  34. package/dist/components/DraggableList.vue.d.ts +3 -0
  35. package/dist/components/Editor.vue.d.mts +3 -0
  36. package/dist/components/Editor.vue.d.ts +3 -0
  37. package/dist/components/Input.vue.d.mts +3 -0
  38. package/dist/components/Input.vue.d.ts +3 -0
  39. package/dist/components/ItemsList.vue.d.mts +3 -0
  40. package/dist/components/ItemsList.vue.d.ts +3 -0
  41. package/dist/components/Label.vue.d.mts +3 -0
  42. package/dist/components/Label.vue.d.ts +3 -0
  43. package/dist/components/ListPagination.vue.d.mts +3 -0
  44. package/dist/components/ListPagination.vue.d.ts +3 -0
  45. package/dist/components/Popover.vue.d.mts +3 -0
  46. package/dist/components/Popover.vue.d.ts +3 -0
  47. package/dist/components/Select.vue.d.mts +3 -0
  48. package/dist/components/Select.vue.d.ts +3 -0
  49. package/dist/components/drag.d.mts +1 -0
  50. package/dist/components/drag.d.ts +1 -0
  51. package/dist/components/index.d.mts +17 -0
  52. package/dist/components/index.d.ts +17 -0
  53. package/dist/components/masks.d.mts +22 -0
  54. package/dist/components/masks.d.ts +22 -0
  55. package/dist/components.js +1 -0
  56. package/dist/components.mjs +1660 -0
  57. package/dist/index.d.mts +43 -121
  58. package/dist/index.d.ts +43 -121
  59. package/dist/index.js +1 -963
  60. package/dist/index.mjs +2 -916
  61. package/dist/reactive-view.css +2 -0
  62. package/dist/rolldown-runtime-C-QNzSnW.mjs +11 -0
  63. package/dist/src-BJaQUsvj.js +1 -0
  64. package/dist/src-DwXft6y4.mjs +528 -0
  65. package/package.json +126 -48
package/dist/index.d.mts CHANGED
@@ -1,94 +1,10 @@
1
- import * as vue from 'vue';
2
- import { SetupContext, ComponentPublicInstance, UnwrapRef, defineComponent } from 'vue';
3
-
4
- type ComponentExtension = {
5
- parent?: ComponentExtension;
6
- self?: Record<string | symbol, any>;
7
- access?: () => ComponentExtension;
8
- value?: ComponentExtension;
9
- };
10
- type PropOptions = {
11
- exclude: string | Array<string>;
12
- include: Record<string, any>;
13
- };
14
- type SubscriptionItem = {
15
- name: string;
16
- handler: Function;
17
- data?: any;
18
- };
19
- type PropType = {
20
- default: any;
21
- required: boolean;
22
- validator: ((value: any) => boolean);
23
- type: any | Array<any>;
24
- };
25
- type PropExclusions = Array<string> | string;
26
-
27
- declare class Subscription {
28
- private subscriptions;
29
- private data;
30
- static create(): Subscription;
31
- subscribe(name: string, handler: Function, data?: any): Subscription;
32
- replace(name: string, handler: Function, data?: any): Subscription;
33
- unsubscribe(subscription?: string): Subscription;
34
- unsubscribe(subscriptions?: Array<string>): Subscription;
35
- size(): number;
36
- hasSubscription(name: string): boolean;
37
- private remove;
38
- private find;
39
- private isNameAvailable;
40
- registrations(): Array<SubscriptionItem>;
41
- get(name: string): SubscriptionItem;
42
- }
43
-
44
- declare const setup: {
45
- type: FunctionConstructor;
46
- default: (parent?: {}, self?: {}) => {};
47
- ReactiveView: boolean;
48
- };
49
- declare const _default: {
50
- props: {
51
- setup: {};
52
- beta: (BooleanConstructor | StringConstructor)[];
53
- ReactiveView: {
54
- type: BooleanConstructor;
55
- default: boolean;
56
- };
57
- instance: {
58
- default: vue.Ref<any, any>;
59
- };
60
- notifications: ObjectConstructor;
61
- subscriptions: ObjectConstructor;
62
- beforeSetData: FunctionConstructor;
63
- data: {
64
- default: {};
65
- };
66
- defaultData: {};
67
- getDefaultData: {
68
- type: FunctionConstructor;
69
- default: (data: any) => any;
70
- };
71
- model: {};
72
- defer: {};
73
- logging: {
74
- validator: (logging: boolean) => boolean;
75
- };
76
- modelName: {
77
- type: StringConstructor;
78
- default: string;
79
- };
80
- debug: {
81
- type: BooleanConstructor;
82
- default: boolean;
83
- };
84
- state: {
85
- default: {};
86
- };
87
- };
88
- setup(props: Record<string, any>, context: SetupContext): (vue: ComponentPublicInstance) => any;
89
- };
90
-
91
- declare function safeRequest(request: {
1
+ import type { PropExclusions, PropOptions, ComponentExtension } from "./Types.mjs";
2
+ import ReactiveView, { setup } from "./ReactiveView.mjs";
3
+ import { defineComponent, type UnwrapRef } from "vue";
4
+ export default ReactiveView;
5
+ export { setup };
6
+ export declare const build: Readonly<Record<string, string>>;
7
+ export declare function safeRequest(request: {
92
8
  try: () => Promise<any> | any;
93
9
  catch?: ((error: any) => Promise<any> | any) | false;
94
10
  finally?: () => Promise<any> | any;
@@ -100,49 +16,55 @@ declare function safeRequest(request: {
100
16
  message?: string;
101
17
  alternative?: boolean;
102
18
  }): Promise<any>;
103
- declare function getProps(props: Record<string, any>, exclude: PropExclusions): Record<string, any>;
104
- declare function getProps(props: Record<string, any>, options: PropOptions): Record<string, any>;
105
- declare function getReactiveViewComponent(component: any, options?: Record<string, any>): vue.VNode<vue.RendererNode, vue.RendererElement, {
19
+ export declare function showComponent(component: never, options?: Partial<{
20
+ id: string;
21
+ app: HTMLElement;
22
+ container: string;
23
+ placement: "appendChild" | "replaceChildren" | "prepend";
24
+ }>): void;
25
+ export declare function getProps(props: Record<string, any>, exclude: PropExclusions): Record<string, any>;
26
+ export declare function getProps(props: Record<string, any>, options: PropOptions): Record<string, any>;
27
+ export declare function getReactiveViewComponent(component: any, options?: Record<string, any>): import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
106
28
  [key: string]: any;
107
29
  }>;
108
- declare function getDate(timestamp: {
30
+ export declare function getDate(timestamp: {
109
31
  toDate: () => Date;
110
32
  } | Date, format?: string): string;
111
- declare function getDate(timestamp: {
33
+ export declare function getDate(timestamp: {
112
34
  toDate: () => Date;
113
35
  } | Date, options?: {
114
36
  format?: string;
115
37
  timezone?: string;
116
38
  }): string;
117
- declare function access(view?: ComponentExtension | UnwrapRef<any> | (() => ComponentExtension), alternative?: any): any;
118
- declare function useSubscription(): {
119
- addSubscription(name: string, handler?: () => boolean, data?: any): void;
120
- replaceSubscription(name: string, handler?: () => boolean, data?: any): void;
39
+ export declare const copy: <T>(value: T, copies?: Map<unknown, unknown>) => T;
40
+ export declare function access(view?: ComponentExtension | UnwrapRef<any> | (() => ComponentExtension), alternative?: any): any;
41
+ export declare function useSubscription(): {
42
+ addSubscription(name: string, handler: () => void, data?: any): void;
43
+ replaceSubscription(name: string, handler: () => void, data?: any): void;
121
44
  removeSubscriptions(): void;
122
45
  removeSubscription(name: string): void;
123
46
  hasSubscription(name: string): boolean;
124
47
  subscriptions: any[];
125
- subscription: Subscription;
48
+ subscription: import("./Subscription.mjs").default;
126
49
  };
127
- declare const Prop: ({ default: value, type, validator, required }?: Partial<PropType>) => {
128
- required: boolean | undefined;
50
+ export declare const Prop: (prop?: Partial<{
51
+ type: Array<any> | any;
52
+ required: boolean;
53
+ default: any;
54
+ validator: (value: any) => boolean;
55
+ }>) => {
56
+ default: any;
129
57
  validator: (value: any) => boolean;
130
- default?: vue.Ref<any, any> | undefined;
58
+ required?: boolean | undefined;
59
+ type?: any[] | undefined;
131
60
  };
132
- declare function StyleParser(styles?: Array<string> | Record<string, boolean> | string): {};
133
- declare function MergeStyles(...params: any): any;
134
- declare const extendVnode: (component: Record<string, any>, element: any) => Record<string, (props?: Record<string, any>, slots?: Record<string, any> | ((slots: Record<string, any>) => Record<string, any>)) => any>;
135
- declare function defineReactiveView(): ReturnType<typeof defineComponent>;
136
- declare function defineReactiveView(options: Record<string, any>): ReturnType<typeof defineComponent>;
137
- declare function defineReactiveView(options: Record<string, any>, component: typeof _default): ReturnType<typeof defineComponent>;
138
- declare function showComponent(component: any, options?: {
139
- container?: string;
140
- key?: string;
141
- router?: any;
142
- plugins?: Array<any>;
143
- }): any;
144
- declare const getData: (component: any, path: number | string, alternative: any) => any;
145
- declare const setData: (component: any, data: any, path?: string) => any;
146
- declare const dataPath: (component: any, path: string | number) => any;
147
-
148
- export { MergeStyles, Prop, StyleParser, access, dataPath, _default as default, defineReactiveView, extendVnode, getData, getDate, getProps, getReactiveViewComponent, safeRequest, setData, setup, showComponent, useSubscription };
61
+ export declare function StyleParser(styles?: Array<string> | Record<string, boolean> | string): {};
62
+ export declare function MergeStyles(...params: any): any;
63
+ export declare const extendVnode: (...params: [Record<string, any>, any]) => any;
64
+ export declare function defineReactiveView(): ReturnType<typeof defineComponent>;
65
+ export declare function defineReactiveView(options: Record<string, any>): ReturnType<typeof defineComponent>;
66
+ export declare function defineReactiveView(options: Record<string, any>, component: typeof ReactiveView): ReturnType<typeof defineComponent>;
67
+ export declare const setData: (component: any, data: any, path?: string) => any;
68
+ export declare const getData: (component: any, path: number | string, alternative: any) => any;
69
+ export declare const dataPath: (component: any, path: string | number) => any;
70
+ export declare function throwError(e: any): void;
package/dist/index.d.ts CHANGED
@@ -1,94 +1,10 @@
1
- import * as vue from 'vue';
2
- import { SetupContext, ComponentPublicInstance, UnwrapRef, defineComponent } from 'vue';
3
-
4
- type ComponentExtension = {
5
- parent?: ComponentExtension;
6
- self?: Record<string | symbol, any>;
7
- access?: () => ComponentExtension;
8
- value?: ComponentExtension;
9
- };
10
- type PropOptions = {
11
- exclude: string | Array<string>;
12
- include: Record<string, any>;
13
- };
14
- type SubscriptionItem = {
15
- name: string;
16
- handler: Function;
17
- data?: any;
18
- };
19
- type PropType = {
20
- default: any;
21
- required: boolean;
22
- validator: ((value: any) => boolean);
23
- type: any | Array<any>;
24
- };
25
- type PropExclusions = Array<string> | string;
26
-
27
- declare class Subscription {
28
- private subscriptions;
29
- private data;
30
- static create(): Subscription;
31
- subscribe(name: string, handler: Function, data?: any): Subscription;
32
- replace(name: string, handler: Function, data?: any): Subscription;
33
- unsubscribe(subscription?: string): Subscription;
34
- unsubscribe(subscriptions?: Array<string>): Subscription;
35
- size(): number;
36
- hasSubscription(name: string): boolean;
37
- private remove;
38
- private find;
39
- private isNameAvailable;
40
- registrations(): Array<SubscriptionItem>;
41
- get(name: string): SubscriptionItem;
42
- }
43
-
44
- declare const setup: {
45
- type: FunctionConstructor;
46
- default: (parent?: {}, self?: {}) => {};
47
- ReactiveView: boolean;
48
- };
49
- declare const _default: {
50
- props: {
51
- setup: {};
52
- beta: (BooleanConstructor | StringConstructor)[];
53
- ReactiveView: {
54
- type: BooleanConstructor;
55
- default: boolean;
56
- };
57
- instance: {
58
- default: vue.Ref<any, any>;
59
- };
60
- notifications: ObjectConstructor;
61
- subscriptions: ObjectConstructor;
62
- beforeSetData: FunctionConstructor;
63
- data: {
64
- default: {};
65
- };
66
- defaultData: {};
67
- getDefaultData: {
68
- type: FunctionConstructor;
69
- default: (data: any) => any;
70
- };
71
- model: {};
72
- defer: {};
73
- logging: {
74
- validator: (logging: boolean) => boolean;
75
- };
76
- modelName: {
77
- type: StringConstructor;
78
- default: string;
79
- };
80
- debug: {
81
- type: BooleanConstructor;
82
- default: boolean;
83
- };
84
- state: {
85
- default: {};
86
- };
87
- };
88
- setup(props: Record<string, any>, context: SetupContext): (vue: ComponentPublicInstance) => any;
89
- };
90
-
91
- declare function safeRequest(request: {
1
+ import type { PropExclusions, PropOptions, ComponentExtension } from "./Types";
2
+ import ReactiveView, { setup } from "./ReactiveView";
3
+ import { defineComponent, type UnwrapRef } from "vue";
4
+ export default ReactiveView;
5
+ export { setup };
6
+ export declare const build: Readonly<Record<string, string>>;
7
+ export declare function safeRequest(request: {
92
8
  try: () => Promise<any> | any;
93
9
  catch?: ((error: any) => Promise<any> | any) | false;
94
10
  finally?: () => Promise<any> | any;
@@ -100,49 +16,55 @@ declare function safeRequest(request: {
100
16
  message?: string;
101
17
  alternative?: boolean;
102
18
  }): Promise<any>;
103
- declare function getProps(props: Record<string, any>, exclude: PropExclusions): Record<string, any>;
104
- declare function getProps(props: Record<string, any>, options: PropOptions): Record<string, any>;
105
- declare function getReactiveViewComponent(component: any, options?: Record<string, any>): vue.VNode<vue.RendererNode, vue.RendererElement, {
19
+ export declare function showComponent(component: never, options?: Partial<{
20
+ id: string;
21
+ app: HTMLElement;
22
+ container: string;
23
+ placement: "appendChild" | "replaceChildren" | "prepend";
24
+ }>): void;
25
+ export declare function getProps(props: Record<string, any>, exclude: PropExclusions): Record<string, any>;
26
+ export declare function getProps(props: Record<string, any>, options: PropOptions): Record<string, any>;
27
+ export declare function getReactiveViewComponent(component: any, options?: Record<string, any>): import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
106
28
  [key: string]: any;
107
29
  }>;
108
- declare function getDate(timestamp: {
30
+ export declare function getDate(timestamp: {
109
31
  toDate: () => Date;
110
32
  } | Date, format?: string): string;
111
- declare function getDate(timestamp: {
33
+ export declare function getDate(timestamp: {
112
34
  toDate: () => Date;
113
35
  } | Date, options?: {
114
36
  format?: string;
115
37
  timezone?: string;
116
38
  }): string;
117
- declare function access(view?: ComponentExtension | UnwrapRef<any> | (() => ComponentExtension), alternative?: any): any;
118
- declare function useSubscription(): {
119
- addSubscription(name: string, handler?: () => boolean, data?: any): void;
120
- replaceSubscription(name: string, handler?: () => boolean, data?: any): void;
39
+ export declare const copy: <T>(value: T, copies?: Map<unknown, unknown>) => T;
40
+ export declare function access(view?: ComponentExtension | UnwrapRef<any> | (() => ComponentExtension), alternative?: any): any;
41
+ export declare function useSubscription(): {
42
+ addSubscription(name: string, handler: () => void, data?: any): void;
43
+ replaceSubscription(name: string, handler: () => void, data?: any): void;
121
44
  removeSubscriptions(): void;
122
45
  removeSubscription(name: string): void;
123
46
  hasSubscription(name: string): boolean;
124
47
  subscriptions: any[];
125
- subscription: Subscription;
48
+ subscription: import("./Subscription").default;
126
49
  };
127
- declare const Prop: ({ default: value, type, validator, required }?: Partial<PropType>) => {
128
- required: boolean | undefined;
50
+ export declare const Prop: (prop?: Partial<{
51
+ type: Array<any> | any;
52
+ required: boolean;
53
+ default: any;
54
+ validator: (value: any) => boolean;
55
+ }>) => {
56
+ default: any;
129
57
  validator: (value: any) => boolean;
130
- default?: vue.Ref<any, any> | undefined;
58
+ required?: boolean | undefined;
59
+ type?: any[] | undefined;
131
60
  };
132
- declare function StyleParser(styles?: Array<string> | Record<string, boolean> | string): {};
133
- declare function MergeStyles(...params: any): any;
134
- declare const extendVnode: (component: Record<string, any>, element: any) => Record<string, (props?: Record<string, any>, slots?: Record<string, any> | ((slots: Record<string, any>) => Record<string, any>)) => any>;
135
- declare function defineReactiveView(): ReturnType<typeof defineComponent>;
136
- declare function defineReactiveView(options: Record<string, any>): ReturnType<typeof defineComponent>;
137
- declare function defineReactiveView(options: Record<string, any>, component: typeof _default): ReturnType<typeof defineComponent>;
138
- declare function showComponent(component: any, options?: {
139
- container?: string;
140
- key?: string;
141
- router?: any;
142
- plugins?: Array<any>;
143
- }): any;
144
- declare const getData: (component: any, path: number | string, alternative: any) => any;
145
- declare const setData: (component: any, data: any, path?: string) => any;
146
- declare const dataPath: (component: any, path: string | number) => any;
147
-
148
- export { MergeStyles, Prop, StyleParser, access, dataPath, _default as default, defineReactiveView, extendVnode, getData, getDate, getProps, getReactiveViewComponent, safeRequest, setData, setup, showComponent, useSubscription };
61
+ export declare function StyleParser(styles?: Array<string> | Record<string, boolean> | string): {};
62
+ export declare function MergeStyles(...params: any): any;
63
+ export declare const extendVnode: (...params: [Record<string, any>, any]) => any;
64
+ export declare function defineReactiveView(): ReturnType<typeof defineComponent>;
65
+ export declare function defineReactiveView(options: Record<string, any>): ReturnType<typeof defineComponent>;
66
+ export declare function defineReactiveView(options: Record<string, any>, component: typeof ReactiveView): ReturnType<typeof defineComponent>;
67
+ export declare const setData: (component: any, data: any, path?: string) => any;
68
+ export declare const getData: (component: any, path: number | string, alternative: any) => any;
69
+ export declare const dataPath: (component: any, path: string | number) => any;
70
+ export declare function throwError(e: any): void;