ziko 0.0.29 → 0.0.31

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 (55) hide show
  1. package/dist/ziko.cjs +47 -181
  2. package/dist/ziko.js +47 -181
  3. package/dist/ziko.min.js +2 -2
  4. package/dist/ziko.mjs +46 -180
  5. package/package.json +24 -3
  6. package/src/__helpers__/index.js +6 -6
  7. package/src/app/globals.js +13 -3
  8. package/src/app/index.js +10 -10
  9. package/src/app/json-style-sheet.js +1 -1
  10. package/src/app/routes.js +0 -1
  11. package/src/app/spa-file-based-routing.js +2 -2
  12. package/src/app/spa.js +3 -3
  13. package/src/app/ziko-app.js +1 -1
  14. package/src/{reactivity/events-exp → events}/__ZikoEvent__.js +11 -6
  15. package/src/{reactivity/events-exp → events}/click.js +2 -3
  16. package/src/events/clipboard.js +16 -0
  17. package/src/events/custom-event.js +29 -0
  18. package/src/events/drag.js +16 -0
  19. package/src/events/focus.js +16 -0
  20. package/src/events/hash.js +16 -0
  21. package/src/events/index.d.ts +3 -0
  22. package/src/events/index.js +15 -0
  23. package/src/{reactivity/events-exp → events}/key.js +2 -2
  24. package/src/events/mouse.js +16 -0
  25. package/src/{reactivity/events-exp → events}/pointer.js +3 -4
  26. package/src/events/touch.js +16 -0
  27. package/src/events/types/__Shared__.d.ts +155 -0
  28. package/src/events/types/clipboard.d.ts +20 -0
  29. package/src/events/types/focus.d.ts +19 -0
  30. package/src/events/types/pointer.d.ts +45 -0
  31. package/src/events/wheel.js +16 -0
  32. package/src/index.js +16 -15
  33. package/src/reactivity/events/__note__ +1 -0
  34. package/src/reactivity/index.js +0 -3
  35. package/src/ui/elements/ZikoUIElement.js +15 -5
  36. package/src/ui/elements/embaded/html.js +1 -1
  37. package/src/ui/elements/embaded/youtube.js +2 -2
  38. package/src/ui/elements/grid/index.js +1 -1
  39. package/src/ui/index.js +21 -19
  40. package/src/ui/tags/index.d.ts +144 -0
  41. package/src/ui/tags/index.js +21 -0
  42. package/src/_global (To Be Removed )/_themes/dark.js +0 -885
  43. package/src/_global (To Be Removed )/_themes/index.js +0 -11
  44. package/src/_global (To Be Removed )/_themes/light.js +0 -255
  45. package/src/_global (To Be Removed )/app/index.js +0 -46
  46. package/src/_global (To Be Removed )/component/index.js +0 -38
  47. package/src/_global (To Be Removed )/globals/index.js +0 -20
  48. package/src/_global (To Be Removed )/index.js +0 -4
  49. package/src/_global (To Be Removed )/params/index.js +0 -40
  50. package/src/_global (To Be Removed )/router/index.js +0 -67
  51. package/src/_global (To Be Removed )/seo/index.js +0 -43
  52. package/src/_global (To Be Removed )/style/index.js +0 -1
  53. package/src/reactivity/events-exp/index.js +0 -5
  54. /package/src/{reactivity/events-exp → events}/__Events__.js +0 -0
  55. /package/src/{reactivity/events-exp → events}/utils.js +0 -0
@@ -19,9 +19,9 @@ function details_setter(){
19
19
 
20
20
  }
21
21
  }
22
- const __useKeyEvent = (target, customizer) => new ZikoEventKey(target, customizer)
22
+ const bindKeyEvent = (target, customizer) => new ZikoEventKey(target, customizer)
23
23
 
24
24
  export{
25
- __useKeyEvent,
25
+ bindKeyEvent,
26
26
  ZikoEventKey
27
27
  }
@@ -0,0 +1,16 @@
1
+ import { __ZikoEvent__ } from "./__ZikoEvent__.js";
2
+ import { Events } from "./__Events__.js";
3
+ class ZikoEventMouse extends __ZikoEvent__{
4
+ constructor(target, customizer){
5
+ super(target, Events.Mouse, details_setter, customizer)
6
+ }
7
+ }
8
+ function details_setter(){
9
+
10
+ }
11
+ const bindMouseEvent = (target, customizer) => new ZikoEventMouse(target, customizer)
12
+
13
+ export{
14
+ bindMouseEvent,
15
+ ZikoEventMouse
16
+ }
@@ -16,7 +16,7 @@ function details_setter(){
16
16
  case "pointermove" : {
17
17
  this.mx = parseInt(this.event.offsetX);
18
18
  this.my = parseInt(this.event.offsetY);
19
- this.isMove = true
19
+ this.isMoving = true
20
20
  }; break;
21
21
  case "pointerup" : {
22
22
  this.ux = parseInt(this.event.offsetX);
@@ -39,10 +39,9 @@ function details_setter(){
39
39
  // else this.dx = 1
40
40
  // console.log(this.currentEvent)
41
41
  }
42
- const __usePointerEvent = (target, customizer) => new ZikoEventPointer(target, customizer)
42
+ const bindPointerEvent = (target, customizer) => new ZikoEventPointer(target, customizer)
43
43
 
44
- globalThis.expPointer = __usePointerEvent
45
44
  export{
46
- __usePointerEvent,
45
+ bindPointerEvent,
47
46
  ZikoEventPointer
48
47
  }
@@ -0,0 +1,16 @@
1
+ import { __ZikoEvent__ } from "./__ZikoEvent__.js";
2
+ import { Events } from "./__Events__.js";
3
+ class ZikoEventTouch extends __ZikoEvent__{
4
+ constructor(target, customizer){
5
+ super(target, Events.Touch, details_setter, customizer)
6
+ }
7
+ }
8
+ function details_setter(){
9
+
10
+ }
11
+ const bindTouchEvent = (target, customizer) => new ZikoEventTouch(target, customizer)
12
+
13
+ export{
14
+ bindTouchEvent,
15
+ ZikoEventTouch
16
+ }
@@ -0,0 +1,155 @@
1
+ export type EventCustomizer = ((this: __ZikoEvent__) => void) | ((ctx: __ZikoEvent__) => void);
2
+
3
+ export type EventMethodesBinder<
4
+ EventKeys extends string,
5
+ InstanceType
6
+ > = {
7
+ [K in EventKeys as `on${K}`]: (...callbacks: ((ctx: InstanceType) => void)[]) => InstanceType
8
+ };
9
+
10
+ export type Callback<InstanceType> = (ctx: InstanceType) => void;
11
+
12
+ export interface ZikoEventStream {
13
+ enabled: Record<string, boolean>;
14
+ clear: Record<string, boolean>;
15
+ history: Record<string, any[]>;
16
+ t0?: number;
17
+ }
18
+
19
+ export interface ZikoEventCache {
20
+ currentEvent: string | null;
21
+ event: Event | null;
22
+ options: Record<string, AddEventListenerOptions>;
23
+ preventDefault: Record<string, boolean>;
24
+ stopPropagation: Record<string, boolean>;
25
+ stopImmediatePropagation: Record<string, boolean>;
26
+ event_flow: Record<string, unknown>;
27
+ paused: Record<string, boolean>;
28
+ stream: ZikoEventStream;
29
+ callbacks: Record<string, ((e: any) => void)[]>;
30
+ __controllers__: Record<string, (e: Event) => void>;
31
+ }
32
+
33
+ export declare class __ZikoEvent__ {
34
+ constructor(
35
+ target: any,
36
+ Events: string[],
37
+ details_setter?: (this: __ZikoEvent__) => void,
38
+ customizer?: EventCustomizer
39
+ );
40
+
41
+ target: any;
42
+ cache: ZikoEventCache;
43
+
44
+ get targetElement(): HTMLElement | null;
45
+ get isParent(): boolean;
46
+ get item(): any;
47
+ get currentEvent(): string | null;
48
+ get event(): Event | null;
49
+
50
+ _register_events(
51
+ Events: string[] | undefined,
52
+ details_setter: (e: this) => any,
53
+ customizer: (e: this) => any, // To Check
54
+ REGISTER_METHODES?: boolean
55
+ ): this;
56
+
57
+ setTarget(UI: any): this;
58
+
59
+ preventDefault(
60
+ overrides?: Partial<Record<string, boolean>>,
61
+ defaultValue?: boolean | "default"
62
+ ): this;
63
+
64
+ stopPropagation(
65
+ overrides?: Partial<Record<string, boolean>>,
66
+ defaultValue?: boolean | "default"
67
+ ): this;
68
+
69
+ stopImmediatePropagation(
70
+ overrides?: Partial<Record<string, boolean>>,
71
+ defaultValue?: boolean | "default"
72
+ ): this;
73
+
74
+ setEventOptions(
75
+ event: string,
76
+ options: AddEventListenerOptions
77
+ ): this;
78
+
79
+ pause(
80
+ overrides?: Partial<Record<string, boolean>>,
81
+ defaultValue?: boolean | "default"
82
+ ): this;
83
+
84
+ resume(
85
+ overrides?: Partial<Record<string, boolean>>,
86
+ defaultValue?: boolean | "default"
87
+ ): this;
88
+
89
+ stream(
90
+ overrides?: Partial<Record<string, boolean>>,
91
+ defaultValue?: boolean | "default"
92
+ ): this;
93
+
94
+ clear(): this;
95
+
96
+ dispose(
97
+ overrides?: Partial<Record<string, boolean>>,
98
+ defaultValue?: boolean | "default"
99
+ ): this;
100
+
101
+ // Internal
102
+ protected __handle(
103
+ event: string,
104
+ handler: EventListenerOrEventListenerObject,
105
+ options?: AddEventListenerOptions,
106
+ dispose?: any
107
+ ): this;
108
+
109
+ protected __onEvent(
110
+ event: string,
111
+ options?: AddEventListenerOptions,
112
+ dispose?: any,
113
+ ...callbacks: ((ctx: this) => void)[]
114
+ ): this;
115
+ }
116
+ // export type ClickEventKeys =
117
+ // | 'Click'
118
+ // | 'DblClick';
119
+
120
+ // export type PointerEventKeys =
121
+ // | 'PtrMove'
122
+ // | 'PtrDown'
123
+ // | 'PtrUp'
124
+ // | 'PtrLeave'
125
+ // | 'PtrEnter'
126
+ // | 'PtrOut'
127
+ // | 'PtrCancel'
128
+
129
+ // export type MouseEventKeys =
130
+ // | 'MouseMove'
131
+ // | 'MouseDown';
132
+ // export type TouchEventKeys =
133
+ // | 'ToucMove'
134
+ // | 'ToucDown';
135
+ // export type KeyEventKeys =
136
+ // | 'keyDown'
137
+ // | 'keyPress'
138
+ // | 'keyUs';
139
+ // export type ClipboardEventKeys =
140
+ // | 'Copy'
141
+ // | 'Cut'
142
+ // | 'Paste';
143
+ // export type FocusEventKeys =
144
+ // | 'focus'
145
+ // | 'blur';
146
+ // export type DragEventKeys =
147
+ // | 'Drag'
148
+ // | 'DragStart'
149
+ // | 'DragEnd'
150
+ // | 'Drop';
151
+ // export type MediaEventKeys =
152
+ // | '__';
153
+ // export type HashEventKeys =
154
+ // | 'HashChange'
155
+
@@ -0,0 +1,20 @@
1
+ import { __ZikoEvent__ } from "../__ZikoEvent__.js";
2
+ import type { Callback, ClipboardEventKeys } from './__Shared__.js';
3
+ import { ZikoUIElement } from "../../ui/index.js";
4
+
5
+ declare class ZikoEventClipboard extends __ZikoEvent__ {
6
+ constructor(target: any, customizer?: Function);
7
+
8
+ // Explicitly declare the dynamic methods to get editor support
9
+ onCopy(...callbacks: Callback<ZikoEventClipboard>[]): this;
10
+ onCut(...callbacks: Callback<ZikoEventClipboard>[]): this;
11
+ onPaste(...callbacks: Callback<ZikoEventClipboard>[]): this;
12
+
13
+ }
14
+
15
+ declare const bindClipboardEvent: (target: ZikoUIElement, customizer?: Function) => ZikoEventClipboard;
16
+
17
+ export {
18
+ ZikoEventClipboard,
19
+ bindClipboardEvent,
20
+ };
@@ -0,0 +1,19 @@
1
+ import { __ZikoEvent__ } from "../__ZikoEvent__.js";
2
+ import type { Callback } from './__Shared__.js';
3
+ import { ZikoUIElement } from "../../ui/index.js";
4
+
5
+ declare class ZikoEventFocus extends __ZikoEvent__ {
6
+ constructor(target: any, customizer?: Function);
7
+
8
+ // Explicitly declare the dynamic methods to get editor support
9
+ onFocus(...callbacks: Callback<ZikoEventFocus>[]): this;
10
+ onBlur(...callbacks: Callback<ZikoEventFocus>[]): this;
11
+
12
+ }
13
+
14
+ declare const bindFocusEvent: (target: ZikoUIElement, customizer?: Function) => ZikoEventFocus;
15
+
16
+ export {
17
+ ZikoEventFocus,
18
+ bindFocusEvent,
19
+ };
@@ -0,0 +1,45 @@
1
+ import { __ZikoEvent__ } from "../__ZikoEvent__.js";
2
+ import type { EventMethodesBinder, Callback, PointerEventKeys } from './__Shared__.js';
3
+ import { ZikoUIElement } from "../../ui/index.js";
4
+
5
+ type PointerEventMethodesBinder = EventMethodesBinder<PointerEventKeys, ZikoEventPointer>;
6
+
7
+ declare class ZikoEventPointer extends __ZikoEvent__ implements PointerEventMethodesBinder {
8
+ constructor(target: any, customizer?: Function);
9
+
10
+ isDown: boolean;
11
+
12
+ dx?: number;
13
+ dy?: number;
14
+
15
+ mx?: number;
16
+ my?: number;
17
+ isMoving?: boolean;
18
+
19
+ ux?: number;
20
+ uy?: number;
21
+
22
+ swippe?: {
23
+ h: "left" | "right" | "none";
24
+ v: "top" | "bottom" | "none";
25
+ delta_x: number;
26
+ delta_y: number;
27
+ };
28
+
29
+ // Explicitly declare the dynamic methods to get editor support
30
+ onPtrMove(...callbacks: Callback<ZikoEventPointer>[]): this;
31
+ onPtrDown(...callbacks: Callback<ZikoEventPointer>[]): this;
32
+ onPtrUp(...callbacks: Callback<ZikoEventPointer>[]): this;
33
+ onPtrLeave(...callbacks: Callback<ZikoEventPointer>[]): this;
34
+ onPtrEnter(...callbacks: Callback<ZikoEventPointer>[]): this;
35
+ onPtrOut(...callbacks: Callback<ZikoEventPointer>[]): this;
36
+ onPtrCancel(...callbacks: Callback<ZikoEventPointer>[]): this;
37
+
38
+ }
39
+
40
+ declare const bindPointerEvent: (target: ZikoUIElement, customizer?: Function) => ZikoEventPointer;
41
+
42
+ export {
43
+ ZikoEventPointer,
44
+ bindPointerEvent,
45
+ };
@@ -0,0 +1,16 @@
1
+ import { __ZikoEvent__ } from "./__ZikoEvent__.js";
2
+ import { Events } from "./__Events__.js";
3
+ class ZikoEventWheel extends __ZikoEvent__{
4
+ constructor(target, customizer){
5
+ super(target, Events.Wheel, details_setter, customizer)
6
+ }
7
+ }
8
+ function details_setter(){
9
+
10
+ }
11
+ const bindWheelEvent = (target, customizer) => new ZikoEventWheel(target, customizer)
12
+
13
+ export{
14
+ bindWheelEvent,
15
+ ZikoEventWheel
16
+ }
package/src/index.js CHANGED
@@ -1,19 +1,19 @@
1
- import { __ExtractAll__,__RemoveAll__ } from "./__helpers__";
2
- import Math from "./math";
3
- import UI from "./ui";
4
- import Time from "./time";
5
- import Data from "./data";
6
- import Reactivity from "./reactivity";
7
- import Graphics from "./graphics";
8
- import App,{__UI__,__HYDRATION_MAP__, __Config__, __CACHE__, defineParamsGetter} from "./app";
1
+ import { __ExtractAll__,__RemoveAll__ } from "./__helpers__/index.js";
2
+ import Math from "./math/index.js";
3
+ import UI from "./ui/index.js";
4
+ import Time from "./time/index.js";
5
+ import Data from "./data/index.js";
6
+ import Reactivity from "./reactivity/index.js";
7
+ import Graphics from "./graphics/index.js";
8
+ import App,{__UI__,__HYDRATION_MAP__, __Config__, __CACHE__, defineParamsGetter, __HYDRATION__} from "./app";
9
9
 
10
- export * from "./math";
11
- export * from "./ui";
12
- export * from "./time";
13
- export * from "./data";
14
- export * from "./reactivity"
15
- export * from "./graphics";
16
- export * from "./app";
10
+ export * from "./math/index.js";
11
+ export * from "./ui/index.js";
12
+ export * from "./time/index.js";
13
+ export * from "./data/index.js";
14
+ export * from "./reactivity/index.js"
15
+ export * from "./graphics/index.js";
16
+ export * from "./app/index.js";
17
17
 
18
18
  [
19
19
  App,
@@ -45,6 +45,7 @@ if ( globalThis.__Ziko__ ) {
45
45
  globalThis.__Ziko__={
46
46
  ...Ziko,
47
47
  __UI__,
48
+ __HYDRATION__,
48
49
  __HYDRATION_MAP__,
49
50
  __Config__,
50
51
  __CACHE__,
@@ -0,0 +1 @@
1
+ Should removed
@@ -1,15 +1,12 @@
1
1
  import * as Events from "./events";
2
2
  import * as Observer from "./observer"
3
3
  import * as Hooks from "./hooks"
4
- import * as EventsExp from "./events-exp"
5
4
  const Reactivity={
6
5
  ...Events,
7
6
  ...Observer,
8
7
  ...Hooks,
9
- ...EventsExp,
10
8
  }
11
9
  export * from "./events";
12
10
  export * from "./observer";
13
11
  export * from "./hooks";
14
- export * from "./events-exp";
15
12
  export default Reactivity;
@@ -65,7 +65,7 @@ class ZikoUIElement {
65
65
  intersection:null
66
66
  }
67
67
  this.uuid = `${this.cache.name}-${Random.string(16)}`
68
- this.ui_index = globalThis.__Ziko__.__CACHE__.get_ui_index()
68
+ this.ui_index = globalThis.__Ziko__.__CACHE__.get_ui_index();
69
69
  this.cache.style.linkTo(this);
70
70
  useDefaultStyle && this.style({
71
71
  position: "relative",
@@ -78,14 +78,24 @@ class ZikoUIElement {
78
78
  this.items = [];
79
79
  globalThis.__Ziko__.__UI__[this.cache.name]?globalThis.__Ziko__.__UI__[this.cache.name]?.push(this):globalThis.__Ziko__.__UI__[this.cache.name]=[this];
80
80
  element && globalThis.__Ziko__.__Config__.default.render && this.render()
81
- this.setAttr("data-ui-index", this.ui_index);
82
- if(globalThis.__Ziko__.__Config__.renderingMode !== "spa" && !globalThis.__Ziko__.__Config__.isSSC) {
83
- globalThis.__Ziko__.__HYDRATION_MAP__.set(this.uuid, ()=>this)
84
- }
81
+ if(
82
+ // globalThis.__Ziko__.__Config__.renderingMode !== "spa"
83
+ // &&
84
+ // !globalThis.__Ziko__.__Config__.isSSC
85
+ // &&
86
+ this.isInteractive()
87
+ ){
88
+ this.setAttr("ziko-hydration-index", globalThis.__Ziko__.__HYDRATION__.index);
89
+ globalThis.__Ziko__.__HYDRATION__.map.set(globalThis.__Ziko__.__HYDRATION__.index, ()=>this);
90
+ globalThis.__Ziko__.__HYDRATION__.increment()
91
+ }
85
92
  }
86
93
  get element(){
87
94
  return this.__ele__;
88
95
  }
96
+ isInteractive(){
97
+ return [true, false][Math.floor(2*Math.random())];
98
+ }
89
99
  get isZikoUIElement(){
90
100
  return true;
91
101
  }
@@ -1,4 +1,4 @@
1
- import ZikoUIElement from "../ZikoUIElement";
1
+ import ZikoUIElement from "../ZikoUIElement.js";
2
2
 
3
3
  class ZikoUIHtmlViewer extends ZikoUIElement{
4
4
  constructor(src, title){
@@ -1,5 +1,5 @@
1
- import ZikoUIElement from "../ZikoUIElement";
2
- import { Str } from "../../../../data";
1
+ import ZikoUIElement from "../ZikoUIElement.js";
2
+ import { Str } from "../../../../data.js";
3
3
  class ZikoUIYoutubePlayer extends ZikoUIElement{
4
4
  constructor(src, title){
5
5
  super("iframe", "YoutubePlayer");
@@ -1,4 +1,4 @@
1
- import ZikoUIElement from "../ZikoUIElement"
1
+ import ZikoUIElement from "../ZikoUIElement.js"
2
2
  class ZikoUIGrid extends ZikoUIElement {
3
3
  constructor(tag ="div", w = "50vw", h = "50vh") {
4
4
  super(tag,"Grid");
package/src/ui/index.js CHANGED
@@ -1,24 +1,26 @@
1
- export * from "./elements/text";
2
- export * from "./elements/list";
3
- export * from "./elements/io";
4
- export * from "./elements/media";
5
- export * from "./elements/table";
6
- export * from "./elements/semantic";
7
- export * from "./elements/misc";
8
- export * from "./elements/flex";
9
- export * from "./elements/grid";
1
+ export * from "./elements/text/index.js";
2
+ export * from "./elements/list/index.js";
3
+ export * from "./elements/io/index.js";
4
+ export * from "./elements/media/index.js";
5
+ export * from "./elements/table/index.js";
6
+ export * from "./elements/semantic/index.js";
7
+ export * from "./elements/misc/index.js";
8
+ export * from "./elements/flex/index.js";
9
+ export * from "./elements/grid/index.js";
10
+ export * from "./tags/index.js"
10
11
 
11
- import * as Text from "./elements/text";
12
- import * as List from "./elements/list";
13
- import * as Io from "./elements/io";
14
- import * as Media from "./elements/media";
15
- import * as Table from "./elements/table";
16
- import * as Semantic from "./elements/semantic";
17
- import * as Misc from "./elements/misc";
18
- import * as Flex from "./elements/flex";
19
- import * as Grid from "./elements/grid";
12
+ import * as Text from "./elements/text/index.js";
13
+ import * as List from "./elements/list/index.js";
14
+ import * as Io from "./elements/io/index.js";
15
+ import * as Media from "./elements/media/index.js";
16
+ import * as Table from "./elements/table/index.js";
17
+ import * as Semantic from "./elements/semantic/index.js";
18
+ import * as Misc from "./elements/misc/index.js";
19
+ import * as Flex from "./elements/flex/index.js";
20
+ import * as Grid from "./elements/grid/index.js";
20
21
 
21
- import ZikoUIElement from "./elements/ZikoUIElement";
22
+
23
+ import ZikoUIElement from "./elements/ZikoUIElement.js";
22
24
 
23
25
  export{
24
26
  ZikoUIElement
@@ -0,0 +1,144 @@
1
+ import ZikoUIElement from "../elements/ZikoUIElement.js";
2
+ interface HtmlTags {
3
+ a: ZikoUIElement;
4
+ abbr: ZikoUIElement;
5
+ address: ZikoUIElement;
6
+ area: ZikoUIElement;
7
+ article: ZikoUIElement;
8
+ aside: ZikoUIElement;
9
+ audio: ZikoUIElement;
10
+ b: ZikoUIElement;
11
+ base: ZikoUIElement;
12
+ bdi: ZikoUIElement;
13
+ bdo: ZikoUIElement;
14
+ blockquote: ZikoUIElement;
15
+ body: ZikoUIElement;
16
+ br: ZikoUIElement;
17
+ button: ZikoUIElement;
18
+ canvas: ZikoUIElement;
19
+ caption: ZikoUIElement;
20
+ cite: ZikoUIElement;
21
+ code: ZikoUIElement;
22
+ col: ZikoUIElement;
23
+ colgroup: ZikoUIElement;
24
+ data: ZikoUIElement;
25
+ datalist: ZikoUIElement;
26
+ dd: ZikoUIElement;
27
+ del: ZikoUIElement;
28
+ details: ZikoUIElement;
29
+ dfn: ZikoUIElement;
30
+ dialog: ZikoUIElement;
31
+ div: ZikoUIElement;
32
+ dl: ZikoUIElement;
33
+ dt: ZikoUIElement;
34
+ em: ZikoUIElement;
35
+ embed: ZikoUIElement;
36
+ fieldset: ZikoUIElement;
37
+ figcaption: ZikoUIElement;
38
+ figure: ZikoUIElement;
39
+ footer: ZikoUIElement;
40
+ form: ZikoUIElement;
41
+ h1: ZikoUIElement;
42
+ h2: ZikoUIElement;
43
+ h3: ZikoUIElement;
44
+ h4: ZikoUIElement;
45
+ h5: ZikoUIElement;
46
+ h6: ZikoUIElement;
47
+ head: ZikoUIElement;
48
+ header: ZikoUIElement;
49
+ hgroup: ZikoUIElement;
50
+ hr: ZikoUIElement;
51
+ html: ZikoUIElement;
52
+ i: ZikoUIElement;
53
+ iframe: ZikoUIElement;
54
+ img: ZikoUIElement;
55
+ input: ZikoUIElement;
56
+ ins: ZikoUIElement;
57
+ kbd: ZikoUIElement;
58
+ label: ZikoUIElement;
59
+ legend: ZikoUIElement;
60
+ li: ZikoUIElement;
61
+ link: ZikoUIElement;
62
+ main: ZikoUIElement;
63
+ map: ZikoUIElement;
64
+ mark: ZikoUIElement;
65
+ meta: ZikoUIElement;
66
+ meter: ZikoUIElement;
67
+ nav: ZikoUIElement;
68
+ noscript: ZikoUIElement;
69
+ object: ZikoUIElement;
70
+ ol: ZikoUIElement;
71
+ optgroup: ZikoUIElement;
72
+ option: ZikoUIElement;
73
+ output: ZikoUIElement;
74
+ p: ZikoUIElement;
75
+ param: ZikoUIElement;
76
+ picture: ZikoUIElement;
77
+ pre: ZikoUIElement;
78
+ progress: ZikoUIElement;
79
+ q: ZikoUIElement;
80
+ rp: ZikoUIElement;
81
+ rt: ZikoUIElement;
82
+ ruby: ZikoUIElement;
83
+ s: ZikoUIElement;
84
+ samp: ZikoUIElement;
85
+ script: ZikoUIElement;
86
+ section: ZikoUIElement;
87
+ select: ZikoUIElement;
88
+ small: ZikoUIElement;
89
+ source: ZikoUIElement;
90
+ span: ZikoUIElement;
91
+ strong: ZikoUIElement;
92
+ style: ZikoUIElement;
93
+ sub: ZikoUIElement;
94
+ summary: ZikoUIElement;
95
+ sup: ZikoUIElement;
96
+ table: ZikoUIElement;
97
+ tbody: ZikoUIElement;
98
+ td: ZikoUIElement;
99
+ template: ZikoUIElement;
100
+ textarea: ZikoUIElement;
101
+ tfoot: ZikoUIElement;
102
+ th: ZikoUIElement;
103
+ thead: ZikoUIElement;
104
+ time: ZikoUIElement;
105
+ title: ZikoUIElement;
106
+ tr: ZikoUIElement;
107
+ track: ZikoUIElement;
108
+ u: ZikoUIElement;
109
+ ul: ZikoUIElement;
110
+ var: ZikoUIElement;
111
+ video: ZikoUIElement;
112
+ wbr: ZikoUIElement;
113
+ }
114
+
115
+ interface SvgTags {
116
+ svg: ZikoUIElement;
117
+ circle: ZikoUIElement;
118
+ rect: ZikoUIElement;
119
+ line: ZikoUIElement;
120
+ path: ZikoUIElement;
121
+ g: ZikoUIElement;
122
+ text: ZikoUIElement;
123
+ //...
124
+ }
125
+
126
+ interface MathTags {
127
+ math: ZikoUIElement;
128
+ mrow: ZikoUIElement;
129
+ mi: ZikoUIElement;
130
+ mo: ZikoUIElement;
131
+ mn: ZikoUIElement;
132
+ ms: ZikoUIElement;
133
+ //...
134
+ }
135
+
136
+ export type Tags = HtmlTags & SvgTags & MathTags & {
137
+ [key: string]: ZikoUIElement;
138
+ };
139
+
140
+ declare const tags: Tags;
141
+
142
+ export {
143
+ tags
144
+ };
@@ -0,0 +1,21 @@
1
+ import ZikoUIElement from "../elements/ZikoUIElement.js";
2
+ const tags = new Proxy({}, {
3
+ get(target, prop) {
4
+ if (typeof prop !== 'string') return undefined;
5
+ let tag = prop.replaceAll("_","-").toLowerCase();
6
+ switch(tag){
7
+ case "html" : globalThis?.document?.createElement("html")
8
+ case "head" :
9
+ case "style" :
10
+ case "link" :
11
+ case "meta" :
12
+ case "srcipt":
13
+ case "body" : return null; break;
14
+ default : return new ZikoUIElement(tag);
15
+ }
16
+ }
17
+ });
18
+
19
+ export {
20
+ tags
21
+ }