lilact 0.22.0 → 0.23.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/dist/lilact.development.js +21 -8
- package/dist/lilact.development.js.map +2 -2
- package/dist/lilact.development.min.js +26 -25
- package/dist/lilact.development.min.js.map +3 -3
- package/dist/lilact.production.min.js +26 -25
- package/docs/assets/hierarchy.js +1 -1
- package/docs/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/components.Component.html +1 -1
- package/docs/classes/components.HTMLComponent.html +1 -1
- package/docs/classes/components.RootComponent.html +1 -1
- package/docs/functions/accessories.DragHandle.html +2 -2
- package/docs/functions/accessories.Spinner.html +2 -2
- package/docs/functions/components.cloneComponent.html +1 -0
- package/docs/functions/components.memo.html +1 -1
- package/docs/functions/components.render.html +1 -1
- package/docs/functions/redux.Provider.html +2 -2
- package/docs/functions/redux.connect.html +2 -2
- package/docs/functions/router.HashRouter.html +2 -2
- package/docs/functions/router.Link.html +2 -2
- package/docs/functions/router.NavLink.html +2 -2
- package/docs/functions/router.Routes.html +2 -2
- package/docs/functions/run.lazy.html +3 -3
- package/docs/functions/run.require.html +3 -7
- package/docs/functions/run.runScripts.html +1 -1
- package/docs/functions/timers.timeoutPromise.html +144 -2
- package/docs/functions/transition.CSSTransition.html +4 -4
- package/docs/functions/transition.SwitchTransition.html +2 -2
- package/docs/functions/transition.Transition.html +3 -3
- package/docs/hierarchy.html +1 -1
- package/docs/modules/components.html +1 -1
- package/docs/static/demos/cloneelement.jsx +66 -0
- package/docs/static/demos/reducer.jsx +2 -0
- package/docs/static/demos/router.jsx +1 -1
- package/docs/static/index.html +31 -30
- package/docs/static/lilact.development.js +21 -8
- package/docs/static/lilact.development.js.map +2 -2
- package/docs/static/lilact.development.min.js +26 -25
- package/docs/static/lilact.development.min.js.map +3 -3
- package/docs/static/lilact.production.min.js +26 -25
- package/docs/variables/components.cloneElement.html +1 -0
- package/examples/demos/cloneelement.jsx +66 -0
- package/examples/demos/reducer.jsx +2 -0
- package/examples/demos/router.jsx +1 -1
- package/examples/index.html +31 -30
- package/examples/lilact.development.js +21 -8
- package/examples/lilact.development.js.map +2 -2
- package/examples/lilact.development.min.js +26 -25
- package/examples/lilact.development.min.js.map +3 -3
- package/examples/lilact.production.min.js +26 -25
- package/package.json +1 -1
- package/src/components.jsx +7 -0
- package/src/expscan.js +7 -3
- package/src/lilact.jsx +5 -5
- package/src/run.jsx +6 -8
|
@@ -1973,6 +1973,8 @@ __export(components_exports, {
|
|
|
1973
1973
|
RootComponent: () => RootComponent,
|
|
1974
1974
|
boolean_html_attributes_set: () => boolean_html_attributes_set,
|
|
1975
1975
|
capture_events_set: () => capture_events_set,
|
|
1976
|
+
cloneComponent: () => cloneComponent,
|
|
1977
|
+
cloneElement: () => cloneElement,
|
|
1976
1978
|
createComponent: () => createComponent2,
|
|
1977
1979
|
createElement: () => createElement,
|
|
1978
1980
|
createPortal: () => createPortal,
|
|
@@ -3071,6 +3073,10 @@ function createRoot(element) {
|
|
|
3071
3073
|
function createPortal(children, element) {
|
|
3072
3074
|
return createComponent2(lilact_default.Portal, { "view": element }, children);
|
|
3073
3075
|
}
|
|
3076
|
+
function cloneComponent(component, propsPatch, ...children) {
|
|
3077
|
+
return { entity: component.entity, props: { ...component.props, ...propsPatch, children } };
|
|
3078
|
+
}
|
|
3079
|
+
var cloneElement = cloneComponent;
|
|
3074
3080
|
function render(component, element) {
|
|
3075
3081
|
if (component[CORE] && (component[CORE].container || component[CORE].parent)) {
|
|
3076
3082
|
throw new Error("Component is already in use");
|
|
@@ -5316,19 +5322,20 @@ function processImportExports(node3, jsx2) {
|
|
|
5316
5322
|
const src = jsx2.substring(node3.out[m.index + imp.length - 1].begin, node3.out[m.index + imp.length - 1].end);
|
|
5317
5323
|
const imports = {};
|
|
5318
5324
|
let star_imports = [];
|
|
5325
|
+
let import_alls = [];
|
|
5319
5326
|
for (i2 = m.index + 1; i2 < m.index + imp.length - 1; i2++) {
|
|
5320
5327
|
node3.out.splice(m.index, 1, {
|
|
5321
5328
|
type: "import",
|
|
5322
5329
|
begin: begins[m.index],
|
|
5323
|
-
end: begins[m.index + imp.length]
|
|
5330
|
+
end: begins[m.index + imp.length],
|
|
5331
|
+
cjs: ""
|
|
5324
5332
|
});
|
|
5325
5333
|
skip_spaces();
|
|
5326
5334
|
switch (s[i2]) {
|
|
5327
5335
|
case ",":
|
|
5328
5336
|
break;
|
|
5329
5337
|
case "I": {
|
|
5330
|
-
|
|
5331
|
-
imports[prop] = "default";
|
|
5338
|
+
import_alls.push(node3.out[i2]);
|
|
5332
5339
|
continue;
|
|
5333
5340
|
}
|
|
5334
5341
|
case "J": {
|
|
@@ -5371,8 +5378,12 @@ function processImportExports(node3, jsx2) {
|
|
|
5371
5378
|
node3.out[i2] = null;
|
|
5372
5379
|
}
|
|
5373
5380
|
let cjs = "";
|
|
5374
|
-
for (const s2 of
|
|
5381
|
+
for (const s2 of import_alls) {
|
|
5375
5382
|
cjs += `const ${s2} = require(${src},{requirer:module});
|
|
5383
|
+
`;
|
|
5384
|
+
}
|
|
5385
|
+
for (const s2 of star_imports) {
|
|
5386
|
+
cjs += `const ${s2} = require(${src},{requirer:module, checkExport: ['default']}).default;
|
|
5376
5387
|
`;
|
|
5377
5388
|
}
|
|
5378
5389
|
if (Object.keys(imports).length) {
|
|
@@ -6387,7 +6398,7 @@ function transpileJSX(jsx2, {
|
|
|
6387
6398
|
|
|
6388
6399
|
// .tmp/src/lilact.jsx
|
|
6389
6400
|
var Lilact2 = {
|
|
6390
|
-
VERSION: "beta.
|
|
6401
|
+
VERSION: "beta.23",
|
|
6391
6402
|
// Configuration
|
|
6392
6403
|
defaultTransitionTimeout: 300,
|
|
6393
6404
|
defaultIsEqual: Object.is,
|
|
@@ -6409,9 +6420,10 @@ var Lilact2 = {
|
|
|
6409
6420
|
// Dependencies
|
|
6410
6421
|
PropTypes,
|
|
6411
6422
|
redux: redux_exports,
|
|
6412
|
-
emotion: emotion_css_esm_exports
|
|
6413
|
-
default: Lilact2
|
|
6423
|
+
emotion: emotion_css_esm_exports
|
|
6414
6424
|
};
|
|
6425
|
+
Lilact2.default = Lilact2;
|
|
6426
|
+
var lilact_default = Lilact2;
|
|
6415
6427
|
Lilact2.importObjectPaths = {
|
|
6416
6428
|
"lilact": Lilact2,
|
|
6417
6429
|
"@emotion/css": Lilact2.emotion,
|
|
@@ -6433,7 +6445,6 @@ if (true) {
|
|
|
6433
6445
|
console.log(`Lilact (Version: ${Lilact2.VERSION}) - Debug Mode`);
|
|
6434
6446
|
console.log(`Copyright(C) 2024-2026 Arash Kazemi <contact.arash.kazemi@gmail.com>`);
|
|
6435
6447
|
}
|
|
6436
|
-
var lilact_default = Lilact2;
|
|
6437
6448
|
export {
|
|
6438
6449
|
CSSTransition,
|
|
6439
6450
|
Children,
|
|
@@ -6465,6 +6476,8 @@ export {
|
|
|
6465
6476
|
capture_events_set,
|
|
6466
6477
|
clearInterval,
|
|
6467
6478
|
clearTimeout2 as clearTimeout,
|
|
6479
|
+
cloneComponent,
|
|
6480
|
+
cloneElement,
|
|
6468
6481
|
combineReducers2 as combineReducers,
|
|
6469
6482
|
connect,
|
|
6470
6483
|
createComponent2 as createComponent,
|