lilact 0.24.0 → 0.24.2
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/README.md +3 -1
- package/dist/lilact.development.js +10 -1
- package/dist/lilact.development.js.map +2 -2
- package/dist/lilact.development.min.js +19 -19
- package/dist/lilact.development.min.js.map +3 -3
- package/dist/lilact.production.min.js +21 -21
- package/docs/classes/accessories.ErrorBoundary.html +8 -8
- package/docs/classes/accessories.Suspense.html +7 -7
- package/docs/classes/components.Component.html +11 -11
- package/docs/classes/components.HTMLComponent.html +11 -11
- package/docs/classes/components.RootComponent.html +11 -11
- package/docs/functions/components.cloneComponent.html +1 -1
- package/docs/functions/components.createComponent.html +1 -1
- package/docs/functions/components.createPortal.html +1 -1
- package/docs/functions/components.createRoot.html +1 -1
- package/docs/functions/components.memo.html +1 -1
- package/docs/functions/components.render.html +1 -1
- package/docs/index.html +2 -1
- package/docs/static/demos/cloneelement.jsx +1 -1
- package/docs/static/index.html +1 -1
- package/docs/static/lilact.development.js +10 -1
- package/docs/static/lilact.development.js.map +2 -2
- package/docs/static/lilact.development.min.js +19 -19
- package/docs/static/lilact.development.min.js.map +3 -3
- package/docs/static/lilact.production.min.js +21 -21
- package/docs/variables/components.cloneElement.html +1 -1
- package/examples/demos/cloneelement.jsx +1 -1
- package/examples/index.html +1 -1
- package/examples/lilact.development.js +10 -1
- package/examples/lilact.development.js.map +2 -2
- package/examples/lilact.development.min.js +19 -19
- package/examples/lilact.development.min.js.map +3 -3
- package/examples/lilact.production.min.js +21 -21
- package/package.json +1 -1
- package/src/components.jsx +13 -1
- package/impexptest.js +0 -51
package/src/components.jsx
CHANGED
|
@@ -35,6 +35,8 @@ import { shallowEqual, toBool, isClass } from "./misc.jsx";
|
|
|
35
35
|
|
|
36
36
|
import { PropTypes } from './proptypes.jsx';
|
|
37
37
|
|
|
38
|
+
const SVG_NS = "http://www.w3.org/2000/svg";
|
|
39
|
+
|
|
38
40
|
/*
|
|
39
41
|
ComponentCache is for internal use. It is the heart of the JSX runtime,
|
|
40
42
|
it holds child components and detects which one is being rendered or updated.
|
|
@@ -210,7 +212,14 @@ if(DEBUG) {
|
|
|
210
212
|
|
|
211
213
|
if( typeof(this.entity)==='string' ) {
|
|
212
214
|
if(!(this.element instanceof Element)) {
|
|
213
|
-
|
|
215
|
+
|
|
216
|
+
if(this.is_svg || this.container.is_svg) {
|
|
217
|
+
this.is_svg = true;
|
|
218
|
+
this.element = document.createElementNS(SVG_NS, this.entity);
|
|
219
|
+
}
|
|
220
|
+
else {
|
|
221
|
+
this.element = document.createElement(this.entity);
|
|
222
|
+
}
|
|
214
223
|
if(next_props?.defaultValue) this.element.value = String(next_props.defaultValue).slice(0, next_props?.maxLength);
|
|
215
224
|
if(next_props?.defaultChecked) this.element.checked = next_props.defaultChecked;
|
|
216
225
|
}
|
|
@@ -1043,6 +1052,9 @@ export class HTMLComponent extends Component
|
|
|
1043
1052
|
{
|
|
1044
1053
|
super(props);
|
|
1045
1054
|
this[CORE].entity = entity;
|
|
1055
|
+
if(entity==='svg') {
|
|
1056
|
+
this[CORE].is_svg = true;
|
|
1057
|
+
}
|
|
1046
1058
|
}
|
|
1047
1059
|
|
|
1048
1060
|
render()
|
package/impexptest.js
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
// Imports
|
|
2
|
-
import foo from "foo";
|
|
3
|
-
import { a, b } from "foo";
|
|
4
|
-
import {a as alpha, b as beta} from "foo";
|
|
5
|
-
import * as utils from "foo";
|
|
6
|
-
import foo, { a, b as c, d } from "foo";
|
|
7
|
-
import "foo";
|
|
8
|
-
|
|
9
|
-
// Re-exports from other modules
|
|
10
|
-
export * from "foo";
|
|
11
|
-
export { a, b } from "foo";
|
|
12
|
-
export { default as Foo } from "foo";
|
|
13
|
-
|
|
14
|
-
export * from "./some-module.js";
|
|
15
|
-
export { exportedThing } from "./another-module.js";
|
|
16
|
-
export { default as depDefault } from "./yet-another-module.js";
|
|
17
|
-
export { default as depDefault, a, b, c as depC } from "./...";
|
|
18
|
-
|
|
19
|
-
// Default export forms
|
|
20
|
-
const defaultValue = { ok: true };
|
|
21
|
-
export default defaultValue;
|
|
22
|
-
|
|
23
|
-
export default function defaultFn() {
|
|
24
|
-
return "defaultFn";
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export default class DefaultClass {
|
|
28
|
-
constructor() {}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
export {localA as a, localB as b, localC as c};
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
export { localFn as renamedFn };
|
|
36
|
-
|
|
37
|
-
// Additional named exports (declared bindings)
|
|
38
|
-
export const namedConst = 1;
|
|
39
|
-
export let namedLet = 2;
|
|
40
|
-
export var namedVar = 3;
|
|
41
|
-
|
|
42
|
-
export function namedFn() {
|
|
43
|
-
return "namedFn";
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
export class NamedClass {}
|
|
48
|
-
|
|
49
|
-
// Re-exporting local bindings is OK (examples)
|
|
50
|
-
export defaultValue;
|
|
51
|
-
export { defaultValue };
|