@fukict/basic 0.1.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/LICENSE +21 -0
- package/dist/component-class/fukict.d.ts +207 -0
- package/dist/component-class/fukict.d.ts.map +1 -0
- package/dist/component-class/fukict.js +299 -0
- package/dist/component-class/fukict.js.map +1 -0
- package/dist/component-class/index.d.ts +5 -0
- package/dist/component-class/index.d.ts.map +1 -0
- package/dist/component-class/index.js +5 -0
- package/dist/component-class/index.js.map +1 -0
- package/dist/component-class/slot.d.ts +9 -0
- package/dist/component-class/slot.d.ts.map +1 -0
- package/dist/component-class/slot.js +46 -0
- package/dist/component-class/slot.js.map +1 -0
- package/dist/component-function/define.d.ts +36 -0
- package/dist/component-function/define.d.ts.map +1 -0
- package/dist/component-function/define.js +23 -0
- package/dist/component-function/define.js.map +1 -0
- package/dist/component-function/index.d.ts +6 -0
- package/dist/component-function/index.d.ts.map +1 -0
- package/dist/component-function/index.js +5 -0
- package/dist/component-function/index.js.map +1 -0
- package/dist/dom/attributes.d.ts +36 -0
- package/dist/dom/attributes.d.ts.map +1 -0
- package/dist/dom/attributes.js +113 -0
- package/dist/dom/attributes.js.map +1 -0
- package/dist/dom/element.d.ts +22 -0
- package/dist/dom/element.d.ts.map +1 -0
- package/dist/dom/element.js +98 -0
- package/dist/dom/element.js.map +1 -0
- package/dist/dom/events.d.ts +14 -0
- package/dist/dom/events.d.ts.map +1 -0
- package/dist/dom/events.js +18 -0
- package/dist/dom/events.js.map +1 -0
- package/dist/dom/index.d.ts +10 -0
- package/dist/dom/index.d.ts.map +1 -0
- package/dist/dom/index.js +14 -0
- package/dist/dom/index.js.map +1 -0
- package/dist/dom/node.d.ts +22 -0
- package/dist/dom/node.d.ts.map +1 -0
- package/dist/dom/node.js +30 -0
- package/dist/dom/node.js.map +1 -0
- package/dist/index.d.ts +22 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +26 -0
- package/dist/index.js.map +1 -0
- package/dist/jsx-runtime.d.ts +10 -0
- package/dist/jsx-runtime.d.ts.map +1 -0
- package/dist/jsx-runtime.js +9 -0
- package/dist/jsx-runtime.js.map +1 -0
- package/dist/metadata.d.ts +14 -0
- package/dist/metadata.d.ts.map +1 -0
- package/dist/metadata.js +14 -0
- package/dist/metadata.js.map +1 -0
- package/dist/renderer/attributes.d.ts +15 -0
- package/dist/renderer/attributes.d.ts.map +1 -0
- package/dist/renderer/attributes.js +61 -0
- package/dist/renderer/attributes.js.map +1 -0
- package/dist/renderer/create.d.ts +30 -0
- package/dist/renderer/create.d.ts.map +1 -0
- package/dist/renderer/create.js +223 -0
- package/dist/renderer/create.js.map +1 -0
- package/dist/renderer/diff/children.d.ts +12 -0
- package/dist/renderer/diff/children.d.ts.map +1 -0
- package/dist/renderer/diff/children.js +55 -0
- package/dist/renderer/diff/children.js.map +1 -0
- package/dist/renderer/diff/class.d.ts +8 -0
- package/dist/renderer/diff/class.d.ts.map +1 -0
- package/dist/renderer/diff/class.js +38 -0
- package/dist/renderer/diff/class.js.map +1 -0
- package/dist/renderer/diff/element.d.ts +14 -0
- package/dist/renderer/diff/element.d.ts.map +1 -0
- package/dist/renderer/diff/element.js +34 -0
- package/dist/renderer/diff/element.js.map +1 -0
- package/dist/renderer/diff/fragment.d.ts +13 -0
- package/dist/renderer/diff/fragment.d.ts.map +1 -0
- package/dist/renderer/diff/fragment.js +32 -0
- package/dist/renderer/diff/fragment.js.map +1 -0
- package/dist/renderer/diff/function.d.ts +9 -0
- package/dist/renderer/diff/function.d.ts.map +1 -0
- package/dist/renderer/diff/function.js +58 -0
- package/dist/renderer/diff/function.js.map +1 -0
- package/dist/renderer/diff/helpers.d.ts +19 -0
- package/dist/renderer/diff/helpers.d.ts.map +1 -0
- package/dist/renderer/diff/helpers.js +194 -0
- package/dist/renderer/diff/helpers.js.map +1 -0
- package/dist/renderer/diff/index.d.ts +18 -0
- package/dist/renderer/diff/index.d.ts.map +1 -0
- package/dist/renderer/diff/index.js +103 -0
- package/dist/renderer/diff/index.js.map +1 -0
- package/dist/renderer/diff/props.d.ts +18 -0
- package/dist/renderer/diff/props.d.ts.map +1 -0
- package/dist/renderer/diff/props.js +99 -0
- package/dist/renderer/diff/props.js.map +1 -0
- package/dist/renderer/index.d.ts +26 -0
- package/dist/renderer/index.d.ts.map +1 -0
- package/dist/renderer/index.js +93 -0
- package/dist/renderer/index.js.map +1 -0
- package/dist/renderer/mount.d.ts +30 -0
- package/dist/renderer/mount.d.ts.map +1 -0
- package/dist/renderer/mount.js +209 -0
- package/dist/renderer/mount.js.map +1 -0
- package/dist/types/class.d.ts +88 -0
- package/dist/types/class.d.ts.map +1 -0
- package/dist/types/class.js +2 -0
- package/dist/types/class.js.map +1 -0
- package/dist/types/context.d.ts +36 -0
- package/dist/types/context.d.ts.map +1 -0
- package/dist/types/context.js +9 -0
- package/dist/types/context.js.map +1 -0
- package/dist/types/core.d.ts +124 -0
- package/dist/types/core.d.ts.map +1 -0
- package/dist/types/core.js +15 -0
- package/dist/types/core.js.map +1 -0
- package/dist/types/dom-attributes.d.ts +236 -0
- package/dist/types/dom-attributes.d.ts.map +1 -0
- package/dist/types/dom-attributes.js +2 -0
- package/dist/types/dom-attributes.js.map +1 -0
- package/dist/types/events.d.ts +13 -0
- package/dist/types/events.d.ts.map +1 -0
- package/dist/types/events.js +7 -0
- package/dist/types/events.js.map +1 -0
- package/dist/types/index.d.ts +12 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +7 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/jsx.d.ts +215 -0
- package/dist/types/jsx.d.ts.map +1 -0
- package/dist/types/jsx.js +2 -0
- package/dist/types/jsx.js.map +1 -0
- package/dist/utils/context.d.ts +31 -0
- package/dist/utils/context.d.ts.map +1 -0
- package/dist/utils/context.js +80 -0
- package/dist/utils/context.js.map +1 -0
- package/dist/utils/dom-helpers.d.ts +29 -0
- package/dist/utils/dom-helpers.d.ts.map +1 -0
- package/dist/utils/dom-helpers.js +53 -0
- package/dist/utils/dom-helpers.js.map +1 -0
- package/dist/vnode.d.ts +28 -0
- package/dist/vnode.d.ts.map +1 -0
- package/dist/vnode.js +68 -0
- package/dist/vnode.js.map +1 -0
- package/package.json +61 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Define a function component with type inference
|
|
3
|
+
*
|
|
4
|
+
* This is a no-op helper function that provides better TypeScript type inference.
|
|
5
|
+
* It doesn't change the runtime behavior, just helps with types.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```typescript
|
|
9
|
+
* const Greeting = defineFukict<{ name: string }>((props) => {
|
|
10
|
+
* return h('div', null, [`Hello, ${props.name}!`]);
|
|
11
|
+
* });
|
|
12
|
+
* ```
|
|
13
|
+
*
|
|
14
|
+
* @param fn - Function component
|
|
15
|
+
* @returns The same function with better types and __COMPONENT_TYPE__ marker
|
|
16
|
+
*/
|
|
17
|
+
export function defineFukict(fn) {
|
|
18
|
+
// Add component type marker for Babel plugin
|
|
19
|
+
fn.__COMPONENT_TYPE__ =
|
|
20
|
+
'function';
|
|
21
|
+
return fn;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=define.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"define.js","sourceRoot":"","sources":["../../src/component-function/define.ts"],"names":[],"mappings":"AAwBA;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,YAAY,CAC1B,EAAwB;IAExB,6CAA6C;IAC5C,EAAiD,CAAC,kBAAkB;QACnE,UAAU,CAAC;IACb,OAAO,EAAE,CAAC;AACZ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/component-function/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,YAAY,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/component-function/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fukict/runtime - DOM Attributes
|
|
3
|
+
*
|
|
4
|
+
* Attribute and property manipulation
|
|
5
|
+
*/
|
|
6
|
+
import { ClassValue } from '../types/dom-attributes';
|
|
7
|
+
/**
|
|
8
|
+
* Set class attribute on element with enhanced support
|
|
9
|
+
*
|
|
10
|
+
* Supports multiple formats:
|
|
11
|
+
* - string: 'foo bar'
|
|
12
|
+
* - array: ['foo', 'bar'] => 'foo bar'
|
|
13
|
+
* - object: { foo: true, bar: false } => 'foo'
|
|
14
|
+
* - mixed: ['foo', { bar: true, baz: false }] => 'foo bar'
|
|
15
|
+
*
|
|
16
|
+
* @param element - DOM element
|
|
17
|
+
* @param value - Class value in various formats
|
|
18
|
+
*/
|
|
19
|
+
export declare function setClass(element: Element, value: ClassValue): void;
|
|
20
|
+
/**
|
|
21
|
+
* Set attribute on element
|
|
22
|
+
*/
|
|
23
|
+
export declare function setAttribute(element: Element, key: string, value: unknown): void;
|
|
24
|
+
/**
|
|
25
|
+
* Remove attribute from element
|
|
26
|
+
*/
|
|
27
|
+
export declare function removeAttribute(element: Element, key: string): void;
|
|
28
|
+
/**
|
|
29
|
+
* Set property on element (for special properties like value, checked)
|
|
30
|
+
*/
|
|
31
|
+
export declare function setProperty(element: Element, key: string, value: unknown): void;
|
|
32
|
+
/**
|
|
33
|
+
* Set style property
|
|
34
|
+
*/
|
|
35
|
+
export declare function setStyle(element: HTMLElement, key: string, value: string | number): void;
|
|
36
|
+
//# sourceMappingURL=attributes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attributes.d.ts","sourceRoot":"","sources":["../../src/dom/attributes.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAuCrD;;;;;;;;;;;GAWG;AACH,wBAAgB,QAAQ,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,GAAG,IAAI,CAOlE;AAED;;GAEG;AACH,wBAAgB,YAAY,CAC1B,OAAO,EAAE,OAAO,EAChB,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,OAAO,GACb,IAAI,CAQN;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,CAEnE;AAED;;GAEG;AACH,wBAAgB,WAAW,CACzB,OAAO,EAAE,OAAO,EAChB,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,OAAO,GACb,IAAI,CAEN;AAED;;GAEG;AACH,wBAAgB,QAAQ,CACtB,OAAO,EAAE,WAAW,EACpB,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,GAAG,MAAM,GACrB,IAAI,CAMN"}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Convert ClassValue to class string
|
|
3
|
+
*
|
|
4
|
+
* @param value - Class value in various formats
|
|
5
|
+
* @returns Normalized class string
|
|
6
|
+
*/
|
|
7
|
+
function normalizeClassValue(value) {
|
|
8
|
+
// Handle string
|
|
9
|
+
if (typeof value === 'string') {
|
|
10
|
+
return value;
|
|
11
|
+
}
|
|
12
|
+
// Handle array
|
|
13
|
+
if (Array.isArray(value)) {
|
|
14
|
+
return value
|
|
15
|
+
.map(item => {
|
|
16
|
+
if (typeof item === 'string') {
|
|
17
|
+
return item;
|
|
18
|
+
}
|
|
19
|
+
// Handle object in array
|
|
20
|
+
return normalizeClassValue(item);
|
|
21
|
+
})
|
|
22
|
+
.filter(Boolean)
|
|
23
|
+
.join(' ');
|
|
24
|
+
}
|
|
25
|
+
// Handle object (boolean mode)
|
|
26
|
+
if (typeof value === 'object' && value !== null) {
|
|
27
|
+
return Object.entries(value)
|
|
28
|
+
.filter(([_, enabled]) => enabled)
|
|
29
|
+
.map(([className]) => className)
|
|
30
|
+
.join(' ');
|
|
31
|
+
}
|
|
32
|
+
return '';
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Set class attribute on element with enhanced support
|
|
36
|
+
*
|
|
37
|
+
* Supports multiple formats:
|
|
38
|
+
* - string: 'foo bar'
|
|
39
|
+
* - array: ['foo', 'bar'] => 'foo bar'
|
|
40
|
+
* - object: { foo: true, bar: false } => 'foo'
|
|
41
|
+
* - mixed: ['foo', { bar: true, baz: false }] => 'foo bar'
|
|
42
|
+
*
|
|
43
|
+
* @param element - DOM element
|
|
44
|
+
* @param value - Class value in various formats
|
|
45
|
+
*/
|
|
46
|
+
export function setClass(element, value) {
|
|
47
|
+
const classString = normalizeClassValue(value);
|
|
48
|
+
if (classString) {
|
|
49
|
+
element.setAttribute('class', classString);
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
element.removeAttribute('class');
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Set attribute on element
|
|
57
|
+
*/
|
|
58
|
+
export function setAttribute(element, key, value) {
|
|
59
|
+
if (value == null || value === false) {
|
|
60
|
+
element.removeAttribute(key);
|
|
61
|
+
}
|
|
62
|
+
else if (value === true) {
|
|
63
|
+
element.setAttribute(key, '');
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
element.setAttribute(key, String(value));
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Remove attribute from element
|
|
71
|
+
*/
|
|
72
|
+
export function removeAttribute(element, key) {
|
|
73
|
+
element.removeAttribute(key);
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Set property on element (for special properties like value, checked)
|
|
77
|
+
*/
|
|
78
|
+
export function setProperty(element, key, value) {
|
|
79
|
+
element[key] = value;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Set style property
|
|
83
|
+
*/
|
|
84
|
+
export function setStyle(element, key, value) {
|
|
85
|
+
if (typeof value === 'number' && !isUnitlessNumber(key)) {
|
|
86
|
+
element.style[key] = value + 'px';
|
|
87
|
+
}
|
|
88
|
+
else {
|
|
89
|
+
element.style[key] = value;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Check if CSS property should be unitless
|
|
94
|
+
*/
|
|
95
|
+
function isUnitlessNumber(key) {
|
|
96
|
+
const unitlessNumbers = new Set([
|
|
97
|
+
'animationIterationCount',
|
|
98
|
+
'columnCount',
|
|
99
|
+
'fillOpacity',
|
|
100
|
+
'flexGrow',
|
|
101
|
+
'flexShrink',
|
|
102
|
+
'fontWeight',
|
|
103
|
+
'lineHeight',
|
|
104
|
+
'opacity',
|
|
105
|
+
'order',
|
|
106
|
+
'orphans',
|
|
107
|
+
'widows',
|
|
108
|
+
'zIndex',
|
|
109
|
+
'zoom',
|
|
110
|
+
]);
|
|
111
|
+
return unitlessNumbers.has(key);
|
|
112
|
+
}
|
|
113
|
+
//# sourceMappingURL=attributes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attributes.js","sourceRoot":"","sources":["../../src/dom/attributes.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fukict/runtime - DOM Element Creation
|
|
3
|
+
*
|
|
4
|
+
* Create HTML and SVG elements
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Check if a tag is an SVG element
|
|
8
|
+
*/
|
|
9
|
+
export declare function isSVGTag(tag: string): boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Create an element (HTML or SVG)
|
|
12
|
+
*/
|
|
13
|
+
export declare function createElement(tag: string): Element;
|
|
14
|
+
/**
|
|
15
|
+
* Create a text node
|
|
16
|
+
*/
|
|
17
|
+
export declare function createTextNode(text: string): Text;
|
|
18
|
+
/**
|
|
19
|
+
* Create a comment node
|
|
20
|
+
*/
|
|
21
|
+
export declare function createComment(data: string): Comment;
|
|
22
|
+
//# sourceMappingURL=element.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"element.d.ts","sourceRoot":"","sources":["../../src/dom/element.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAqEH;;GAEG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAE7C;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAKlD;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAEjD;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEnD"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fukict/runtime - DOM Element Creation
|
|
3
|
+
*
|
|
4
|
+
* Create HTML and SVG elements
|
|
5
|
+
*/
|
|
6
|
+
const SVG_NAMESPACE = 'http://www.w3.org/2000/svg';
|
|
7
|
+
/**
|
|
8
|
+
* SVG tag names that require createElementNS
|
|
9
|
+
*/
|
|
10
|
+
const SVG_TAGS = new Set([
|
|
11
|
+
'svg',
|
|
12
|
+
'animate',
|
|
13
|
+
'animateMotion',
|
|
14
|
+
'animateTransform',
|
|
15
|
+
'circle',
|
|
16
|
+
'clipPath',
|
|
17
|
+
'defs',
|
|
18
|
+
'desc',
|
|
19
|
+
'ellipse',
|
|
20
|
+
'feBlend',
|
|
21
|
+
'feColorMatrix',
|
|
22
|
+
'feComponentTransfer',
|
|
23
|
+
'feComposite',
|
|
24
|
+
'feConvolveMatrix',
|
|
25
|
+
'feDiffuseLighting',
|
|
26
|
+
'feDisplacementMap',
|
|
27
|
+
'feDistantLight',
|
|
28
|
+
'feDropShadow',
|
|
29
|
+
'feFlood',
|
|
30
|
+
'feFuncA',
|
|
31
|
+
'feFuncB',
|
|
32
|
+
'feFuncG',
|
|
33
|
+
'feFuncR',
|
|
34
|
+
'feGaussianBlur',
|
|
35
|
+
'feImage',
|
|
36
|
+
'feMerge',
|
|
37
|
+
'feMergeNode',
|
|
38
|
+
'feMorphology',
|
|
39
|
+
'feOffset',
|
|
40
|
+
'fePointLight',
|
|
41
|
+
'feSpecularLighting',
|
|
42
|
+
'feSpotLight',
|
|
43
|
+
'feTile',
|
|
44
|
+
'feTurbulence',
|
|
45
|
+
'filter',
|
|
46
|
+
'foreignObject',
|
|
47
|
+
'g',
|
|
48
|
+
'image',
|
|
49
|
+
'line',
|
|
50
|
+
'linearGradient',
|
|
51
|
+
'marker',
|
|
52
|
+
'mask',
|
|
53
|
+
'metadata',
|
|
54
|
+
'mpath',
|
|
55
|
+
'path',
|
|
56
|
+
'pattern',
|
|
57
|
+
'polygon',
|
|
58
|
+
'polyline',
|
|
59
|
+
'radialGradient',
|
|
60
|
+
'rect',
|
|
61
|
+
'set',
|
|
62
|
+
'stop',
|
|
63
|
+
'switch',
|
|
64
|
+
'symbol',
|
|
65
|
+
'text',
|
|
66
|
+
'textPath',
|
|
67
|
+
'tspan',
|
|
68
|
+
'use',
|
|
69
|
+
'view',
|
|
70
|
+
]);
|
|
71
|
+
/**
|
|
72
|
+
* Check if a tag is an SVG element
|
|
73
|
+
*/
|
|
74
|
+
export function isSVGTag(tag) {
|
|
75
|
+
return SVG_TAGS.has(tag);
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Create an element (HTML or SVG)
|
|
79
|
+
*/
|
|
80
|
+
export function createElement(tag) {
|
|
81
|
+
if (isSVGTag(tag)) {
|
|
82
|
+
return document.createElementNS(SVG_NAMESPACE, tag);
|
|
83
|
+
}
|
|
84
|
+
return document.createElement(tag);
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Create a text node
|
|
88
|
+
*/
|
|
89
|
+
export function createTextNode(text) {
|
|
90
|
+
return document.createTextNode(text);
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Create a comment node
|
|
94
|
+
*/
|
|
95
|
+
export function createComment(data) {
|
|
96
|
+
return document.createComment(data);
|
|
97
|
+
}
|
|
98
|
+
//# sourceMappingURL=element.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"element.js","sourceRoot":"","sources":["../../src/dom/element.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,aAAa,GAAG,4BAA4B,CAAC;AAEnD;;GAEG;AACH,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC;IACvB,KAAK;IACL,SAAS;IACT,eAAe;IACf,kBAAkB;IAClB,QAAQ;IACR,UAAU;IACV,MAAM;IACN,MAAM;IACN,SAAS;IACT,SAAS;IACT,eAAe;IACf,qBAAqB;IACrB,aAAa;IACb,kBAAkB;IAClB,mBAAmB;IACnB,mBAAmB;IACnB,gBAAgB;IAChB,cAAc;IACd,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,gBAAgB;IAChB,SAAS;IACT,SAAS;IACT,aAAa;IACb,cAAc;IACd,UAAU;IACV,cAAc;IACd,oBAAoB;IACpB,aAAa;IACb,QAAQ;IACR,cAAc;IACd,QAAQ;IACR,eAAe;IACf,GAAG;IACH,OAAO;IACP,MAAM;IACN,gBAAgB;IAChB,QAAQ;IACR,MAAM;IACN,UAAU;IACV,OAAO;IACP,MAAM;IACN,SAAS;IACT,SAAS;IACT,UAAU;IACV,gBAAgB;IAChB,MAAM;IACN,KAAK;IACL,MAAM;IACN,QAAQ;IACR,QAAQ;IACR,MAAM;IACN,UAAU;IACV,OAAO;IACP,KAAK;IACL,MAAM;CACP,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,UAAU,QAAQ,CAAC,GAAW;IAClC,OAAO,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAC3B,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,GAAW;IACvC,IAAI,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;QAClB,OAAO,QAAQ,CAAC,eAAe,CAAC,aAAa,EAAE,GAAG,CAAC,CAAC;IACtD,CAAC;IACD,OAAO,QAAQ,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;AACrC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,cAAc,CAAC,IAAY;IACzC,OAAO,QAAQ,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;AACvC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,IAAY;IACxC,OAAO,QAAQ,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;AACtC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fukict/runtime - DOM Events
|
|
3
|
+
*
|
|
4
|
+
* Event listener management
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Add event listener
|
|
8
|
+
*/
|
|
9
|
+
export declare function addEventListener(element: Element, type: string, handler: EventListener): void;
|
|
10
|
+
/**
|
|
11
|
+
* Remove event listener
|
|
12
|
+
*/
|
|
13
|
+
export declare function removeEventListener(element: Element, type: string, handler: EventListener): void;
|
|
14
|
+
//# sourceMappingURL=events.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/dom/events.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,aAAa,GACrB,IAAI,CAEN;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,aAAa,GACrB,IAAI,CAEN"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fukict/runtime - DOM Events
|
|
3
|
+
*
|
|
4
|
+
* Event listener management
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Add event listener
|
|
8
|
+
*/
|
|
9
|
+
export function addEventListener(element, type, handler) {
|
|
10
|
+
element.addEventListener(type, handler);
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Remove event listener
|
|
14
|
+
*/
|
|
15
|
+
export function removeEventListener(element, type, handler) {
|
|
16
|
+
element.removeEventListener(type, handler);
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=events.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events.js","sourceRoot":"","sources":["../../src/dom/events.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAC9B,OAAgB,EAChB,IAAY,EACZ,OAAsB;IAEtB,OAAO,CAAC,gBAAgB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;AAC1C,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,mBAAmB,CACjC,OAAgB,EAChB,IAAY,EACZ,OAAsB;IAEtB,OAAO,CAAC,mBAAmB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;AAC7C,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fukict/runtime - DOM Utilities
|
|
3
|
+
*
|
|
4
|
+
* Unified exports for DOM operations
|
|
5
|
+
*/
|
|
6
|
+
export { createElement, createTextNode, createComment, isSVGTag, } from './element.js';
|
|
7
|
+
export { appendChild, removeChild, replaceChild, insertBefore, } from './node.js';
|
|
8
|
+
export { setAttribute, removeAttribute, setProperty, setStyle, setClass, } from './attributes.js';
|
|
9
|
+
export { addEventListener, removeEventListener } from './events.js';
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/dom/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EACL,aAAa,EACb,cAAc,EACd,aAAa,EACb,QAAQ,GACT,MAAM,cAAc,CAAC;AAGtB,OAAO,EACL,WAAW,EACX,WAAW,EACX,YAAY,EACZ,YAAY,GACb,MAAM,WAAW,CAAC;AAGnB,OAAO,EACL,YAAY,EACZ,eAAe,EACf,WAAW,EACX,QAAQ,EACR,QAAQ,GACT,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fukict/runtime - DOM Utilities
|
|
3
|
+
*
|
|
4
|
+
* Unified exports for DOM operations
|
|
5
|
+
*/
|
|
6
|
+
// Element creation
|
|
7
|
+
export { createElement, createTextNode, createComment, isSVGTag, } from './element.js';
|
|
8
|
+
// Node operations
|
|
9
|
+
export { appendChild, removeChild, replaceChild, insertBefore, } from './node.js';
|
|
10
|
+
// Attributes and properties
|
|
11
|
+
export { setAttribute, removeAttribute, setProperty, setStyle, setClass, } from './attributes.js';
|
|
12
|
+
// Events
|
|
13
|
+
export { addEventListener, removeEventListener } from './events.js';
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/dom/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,mBAAmB;AACnB,OAAO,EACL,aAAa,EACb,cAAc,EACd,aAAa,EACb,QAAQ,GACT,MAAM,cAAc,CAAC;AAEtB,kBAAkB;AAClB,OAAO,EACL,WAAW,EACX,WAAW,EACX,YAAY,EACZ,YAAY,GACb,MAAM,WAAW,CAAC;AAEnB,4BAA4B;AAC5B,OAAO,EACL,YAAY,EACZ,eAAe,EACf,WAAW,EACX,QAAQ,EACR,QAAQ,GACT,MAAM,iBAAiB,CAAC;AAEzB,SAAS;AACT,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fukict/runtime - DOM Node Operations
|
|
3
|
+
*
|
|
4
|
+
* Node manipulation functions
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Append child to parent
|
|
8
|
+
*/
|
|
9
|
+
export declare function appendChild(parent: Node, child: Node): void;
|
|
10
|
+
/**
|
|
11
|
+
* Remove child from parent
|
|
12
|
+
*/
|
|
13
|
+
export declare function removeChild(parent: Node, child: Node): void;
|
|
14
|
+
/**
|
|
15
|
+
* Replace old child with new child
|
|
16
|
+
*/
|
|
17
|
+
export declare function replaceChild(parent: Node, newChild: Node, oldChild: Node): void;
|
|
18
|
+
/**
|
|
19
|
+
* Insert new child before reference node
|
|
20
|
+
*/
|
|
21
|
+
export declare function insertBefore(parent: Node, newChild: Node, referenceNode: Node | null): void;
|
|
22
|
+
//# sourceMappingURL=node.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../src/dom/node.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,GAAG,IAAI,CAE3D;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,GAAG,IAAI,CAE3D;AAED;;GAEG;AACH,wBAAgB,YAAY,CAC1B,MAAM,EAAE,IAAI,EACZ,QAAQ,EAAE,IAAI,EACd,QAAQ,EAAE,IAAI,GACb,IAAI,CAEN;AAED;;GAEG;AACH,wBAAgB,YAAY,CAC1B,MAAM,EAAE,IAAI,EACZ,QAAQ,EAAE,IAAI,EACd,aAAa,EAAE,IAAI,GAAG,IAAI,GACzB,IAAI,CAEN"}
|
package/dist/dom/node.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fukict/runtime - DOM Node Operations
|
|
3
|
+
*
|
|
4
|
+
* Node manipulation functions
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Append child to parent
|
|
8
|
+
*/
|
|
9
|
+
export function appendChild(parent, child) {
|
|
10
|
+
parent.appendChild(child);
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Remove child from parent
|
|
14
|
+
*/
|
|
15
|
+
export function removeChild(parent, child) {
|
|
16
|
+
parent.removeChild(child);
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Replace old child with new child
|
|
20
|
+
*/
|
|
21
|
+
export function replaceChild(parent, newChild, oldChild) {
|
|
22
|
+
parent.replaceChild(newChild, oldChild);
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Insert new child before reference node
|
|
26
|
+
*/
|
|
27
|
+
export function insertBefore(parent, newChild, referenceNode) {
|
|
28
|
+
parent.insertBefore(newChild, referenceNode);
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node.js","sourceRoot":"","sources":["../../src/dom/node.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,MAAM,UAAU,WAAW,CAAC,MAAY,EAAE,KAAW;IACnD,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC5B,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,WAAW,CAAC,MAAY,EAAE,KAAW;IACnD,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC5B,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,YAAY,CAC1B,MAAY,EACZ,QAAc,EACd,QAAc;IAEd,MAAM,CAAC,YAAY,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;AAC1C,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,YAAY,CAC1B,MAAY,EACZ,QAAc,EACd,aAA0B;IAE1B,MAAM,CAAC,YAAY,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC;AAC/C,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fukict/runtime
|
|
3
|
+
*
|
|
4
|
+
* Lightweight DOM rendering runtime with extension mechanism
|
|
5
|
+
*/
|
|
6
|
+
import { METADATA } from './metadata.js';
|
|
7
|
+
export { METADATA };
|
|
8
|
+
export declare const VERSION: "0.1.0";
|
|
9
|
+
export type { VNode, VNodeChild, ElementVNode, FragmentVNode, FunctionComponentVNode, ClassComponentVNode, UnregisterFn, RefCallback, CSSProperties, ClassValue, RuntimeAttributes, EventHandlers, HTMLAttributes, SVGAttributes, Slots, Ref, FukictLifecycle, FukictComponent, FukictProps, FukictSlots, FukictConstructor, } from './types/index.js';
|
|
10
|
+
export type { Context, ContextData } from './types/context.js';
|
|
11
|
+
export { VNodeType } from './types/index.js';
|
|
12
|
+
export type { JSX } from './types/jsx.js';
|
|
13
|
+
export { Fragment } from './types/index.js';
|
|
14
|
+
export { hyperscript, h, jsx, jsxs, jsxDEV } from './vnode.js';
|
|
15
|
+
export { Fukict } from './component-class/index.js';
|
|
16
|
+
export { defineFukict } from './component-function/index.js';
|
|
17
|
+
export type { FunctionComponent } from './component-function/index.js';
|
|
18
|
+
export { attach, replaceNode, unmount, diff } from './renderer/index.js';
|
|
19
|
+
export { createRealNode } from './renderer/create.js';
|
|
20
|
+
export { isDomArray, normalizeDom, getFirstDomNode, getAllDomNodes, isVNode, } from './utils/dom-helpers.js';
|
|
21
|
+
export * as dom from './dom/index.js';
|
|
22
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,OAAO,EAAE,QAAQ,EAAE,CAAC;AAEpB,eAAO,MAAM,OAAO,SAAmB,CAAC;AAGxC,YAAY,EACV,KAAK,EACL,UAAU,EACV,YAAY,EACZ,aAAa,EACb,sBAAsB,EACtB,mBAAmB,EACnB,YAAY,EACZ,WAAW,EACX,aAAa,EACb,UAAU,EACV,iBAAiB,EACjB,aAAa,EACb,cAAc,EACd,aAAa,EACb,KAAK,EACL,GAAG,EACH,eAAe,EACf,eAAe,EACf,WAAW,EACX,WAAW,EACX,iBAAiB,GAClB,MAAM,kBAAkB,CAAC;AAG1B,YAAY,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAE/D,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAG7C,YAAY,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AAE1C,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAG5C,OAAO,EAAE,WAAW,EAAE,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAG/D,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAGpD,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,YAAY,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAGvE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAGzE,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAGtD,OAAO,EACL,UAAU,EACV,YAAY,EACZ,eAAe,EACf,cAAc,EACd,OAAO,GACR,MAAM,wBAAwB,CAAC;AAGhC,OAAO,KAAK,GAAG,MAAM,gBAAgB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fukict/runtime
|
|
3
|
+
*
|
|
4
|
+
* Lightweight DOM rendering runtime with extension mechanism
|
|
5
|
+
*/
|
|
6
|
+
// Package metadata
|
|
7
|
+
import { METADATA } from './metadata.js';
|
|
8
|
+
export { METADATA };
|
|
9
|
+
export const VERSION = METADATA.version;
|
|
10
|
+
export { VNodeType } from './types/index.js';
|
|
11
|
+
export { Fragment } from './types/index.js';
|
|
12
|
+
// VNode creation
|
|
13
|
+
export { hyperscript, h, jsx, jsxs, jsxDEV } from './vnode.js';
|
|
14
|
+
// Class component
|
|
15
|
+
export { Fukict } from './component-class/index.js';
|
|
16
|
+
// Function component
|
|
17
|
+
export { defineFukict } from './component-function/index.js';
|
|
18
|
+
// Rendering
|
|
19
|
+
export { attach, replaceNode, unmount, diff } from './renderer/index.js';
|
|
20
|
+
// DOM node creation (exported for advanced use)
|
|
21
|
+
export { createRealNode } from './renderer/create.js';
|
|
22
|
+
// DOM helper utilities
|
|
23
|
+
export { isDomArray, normalizeDom, getFirstDomNode, getAllDomNodes, isVNode, } from './utils/dom-helpers.js';
|
|
24
|
+
// DOM utilities (exported for widget package use)
|
|
25
|
+
export * as dom from './dom/index.js';
|
|
26
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,mBAAmB;AACnB,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,OAAO,EAAE,QAAQ,EAAE,CAAC;AAEpB,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC;AA8BxC,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAK7C,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,iBAAiB;AACjB,OAAO,EAAE,WAAW,EAAE,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAE/D,kBAAkB;AAClB,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAEpD,qBAAqB;AACrB,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAG7D,YAAY;AACZ,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAEzE,gDAAgD;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD,uBAAuB;AACvB,OAAO,EACL,UAAU,EACV,YAAY,EACZ,eAAe,EACf,cAAc,EACd,OAAO,GACR,MAAM,wBAAwB,CAAC;AAEhC,kDAAkD;AAClD,OAAO,KAAK,GAAG,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fukict/runtime - JSX Runtime
|
|
3
|
+
*
|
|
4
|
+
* JSX automatic runtime for @fukict/runtime
|
|
5
|
+
* Use with: "jsxImportSource": "@fukict/runtime"
|
|
6
|
+
*/
|
|
7
|
+
export { Fragment } from './types/core.js';
|
|
8
|
+
export { jsx, jsxs, jsxDEV } from './vnode.js';
|
|
9
|
+
export type { JSX } from './types/jsx.js';
|
|
10
|
+
//# sourceMappingURL=jsx-runtime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsx-runtime.d.ts","sourceRoot":"","sources":["../src/jsx-runtime.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAC/C,YAAY,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fukict/runtime - JSX Runtime
|
|
3
|
+
*
|
|
4
|
+
* JSX automatic runtime for @fukict/runtime
|
|
5
|
+
* Use with: "jsxImportSource": "@fukict/runtime"
|
|
6
|
+
*/
|
|
7
|
+
export { Fragment } from './types/core.js';
|
|
8
|
+
export { jsx, jsxs, jsxDEV } from './vnode.js';
|
|
9
|
+
//# sourceMappingURL=jsx-runtime.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsx-runtime.js","sourceRoot":"","sources":["../src/jsx-runtime.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Package metadata
|
|
3
|
+
* Auto-generated by extract-metadata.ts - DO NOT EDIT MANUALLY
|
|
4
|
+
*/
|
|
5
|
+
export declare const METADATA: {
|
|
6
|
+
readonly name: "@fukict/basic";
|
|
7
|
+
readonly version: "0.1.0";
|
|
8
|
+
readonly description: "Lightweight DOM rendering basic with extension mechanism";
|
|
9
|
+
readonly author: "Fukict Team";
|
|
10
|
+
readonly license: "MIT";
|
|
11
|
+
readonly homepage: "";
|
|
12
|
+
readonly repository: "https://github.com/fukict/fukict.git";
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=metadata.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"metadata.d.ts","sourceRoot":"","sources":["../src/metadata.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,QAAQ;;;;;;;;CAQX,CAAC"}
|
package/dist/metadata.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Package metadata
|
|
3
|
+
* Auto-generated by extract-metadata.ts - DO NOT EDIT MANUALLY
|
|
4
|
+
*/
|
|
5
|
+
export const METADATA = {
|
|
6
|
+
name: '@fukict/basic',
|
|
7
|
+
version: '0.1.0',
|
|
8
|
+
description: 'Lightweight DOM rendering basic with extension mechanism',
|
|
9
|
+
author: 'Fukict Team',
|
|
10
|
+
license: 'MIT',
|
|
11
|
+
homepage: '',
|
|
12
|
+
repository: 'https://github.com/fukict/fukict.git',
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=metadata.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"metadata.js","sourceRoot":"","sources":["../src/metadata.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,IAAI,EAAE,eAAe;IACrB,OAAO,EAAE,OAAO;IAChB,WAAW,EAAE,0DAA0D;IACvE,MAAM,EAAE,aAAa;IACrB,OAAO,EAAE,KAAK;IACd,QAAQ,EAAE,EAAE;IACZ,UAAU,EAAE,sCAAsC;CAC1C,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fukict/runtime - Renderer: Attributes
|
|
3
|
+
*
|
|
4
|
+
* Set attributes on elements
|
|
5
|
+
*/
|
|
6
|
+
import type { Fukict } from '../component-class/fukict.js';
|
|
7
|
+
/**
|
|
8
|
+
* Set attributes on element
|
|
9
|
+
*
|
|
10
|
+
* @param element - DOM element
|
|
11
|
+
* @param props - Props object
|
|
12
|
+
* @param componentInstance - Optional component instance for fukict:ref
|
|
13
|
+
*/
|
|
14
|
+
export declare function setAttributes(element: Element, props: Record<string, unknown>, componentInstance?: Fukict): void;
|
|
15
|
+
//# sourceMappingURL=attributes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attributes.d.ts","sourceRoot":"","sources":["../../src/renderer/attributes.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AAG3D;;;;;;GAMG;AACH,wBAAgB,aAAa,CAC3B,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9B,iBAAiB,CAAC,EAAE,MAAM,GACzB,IAAI,CAoEN"}
|