lilact 0.4.0 → 0.5.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.
- package/README.md +2 -2
- package/bin/transpile-dir.js +2 -2
- package/bin/transpile.js +5 -5
- package/dist/lilact.development.min.js +1 -1
- package/dist/lilact.development.min.js.LICENSE.txt +1 -1
- package/dist/lilact.development.min.js.map +1 -1
- package/dist/lilact.production.min.js +1 -1
- package/dist/lilact.production.min.js.map +1 -1
- package/docs/assets/highlight.css +42 -0
- package/docs/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/accessories.ErrorBoundary.html +8 -8
- package/docs/classes/accessories.Suspense.html +7 -7
- package/docs/classes/components.Component.html +10 -10
- package/docs/classes/components.HTMLComponent.html +10 -10
- package/docs/classes/components.RootComponent.html +10 -10
- package/docs/functions/components.createComponent.html +1 -1
- package/docs/functions/components.createRoot.html +1 -1
- package/docs/functions/components.render.html +1 -1
- package/docs/functions/errors.globalErrorHandler.html +7 -0
- package/docs/functions/errors.traceError.html +6 -0
- package/docs/functions/jsx.transpileJSX.html +3 -3
- package/docs/functions/misc.classNames.html +1 -1
- package/docs/functions/misc.deepEqual.html +1 -1
- package/docs/functions/misc.getComponentByPointer.html +1 -1
- package/docs/functions/misc.isAsync.html +1 -1
- package/docs/functions/misc.isClass.html +1 -1
- package/docs/functions/misc.isEmpty.html +1 -1
- package/docs/functions/misc.isError.html +1 -1
- package/docs/functions/misc.isThenable.html +1 -1
- package/docs/functions/misc.shallowEqual.html +1 -1
- package/docs/functions/misc.toBool.html +1 -1
- package/docs/functions/run.lazy.html +1 -1
- package/docs/functions/run.require.html +1 -1
- package/docs/functions/run.runScripts.html +1 -1
- package/docs/functions/transition.Transition.html +3 -3
- package/docs/index.html +2 -2
- package/docs/modules/errors.html +1 -0
- package/docs/modules/pane.html +1 -0
- package/docs/modules/run.html +1 -1
- package/docs/modules.html +1 -1
- package/docs/static/demos/error-1.jsx +10 -0
- package/docs/static/demos/error-2.jsx +7 -0
- package/docs/static/demos/error-3.jsx +20 -0
- package/docs/static/demos/error-4.jsx +7 -0
- package/docs/static/index.html +8 -4
- package/docs/static/lilact.development.min.js +1 -1
- package/docs/static/lilact.production.min.js +1 -1
- package/docs/variables/pane.ResizablePane.html +48 -0
- package/package.json +5 -2
- package/root/demos/error-1.jsx +10 -0
- package/root/demos/error-2.jsx +7 -0
- package/root/demos/error-3.jsx +20 -0
- package/root/demos/error-4.jsx +7 -0
- package/root/index.html +8 -4
- package/root/lilact.development.min.js +1 -1
- package/root/lilact.production.min.js +1 -1
- package/src/components.jsx +14 -12
- package/src/errors.jsx +231 -0
- package/src/events.jsx +4 -14
- package/src/jsx.js +35 -47
- package/src/lilact.jsx +15 -5
- package/src/misc.jsx +3 -59
- package/src/pane.jsx +52 -9
- package/src/run.jsx +22 -96
- package/typedoc.json +2 -0
- package/docs/functions/run.traceError.html +0 -6
- /package/docs/static/demos/{boundary.jsx → error-boundary.jsx} +0 -0
- /package/root/demos/{boundary.jsx → error-boundary.jsx} +0 -0
package/README.md
CHANGED
|
@@ -20,7 +20,7 @@ designed to work in the browser. It can be used as a single script
|
|
|
20
20
|
that is around `70kb` minified and around `25kb` gzipped and includes everything.
|
|
21
21
|
`Lilact` is very fast, it uses minimum resources and handles memory very efficiently.
|
|
22
22
|
|
|
23
|
-
`Lilact` uses its own
|
|
23
|
+
`Lilact` uses its own JSX transpiler, and not babel. It is a recursive-descent
|
|
24
24
|
parser with lookahead, but it doesn't parse the JS syntax completely and relies on the
|
|
25
25
|
JS runtime to detect some errors. The transpiler weights
|
|
26
26
|
only a few kilobytes and can be even incorporated into other React engines. To
|
|
@@ -42,7 +42,7 @@ To ease working, it already includes a `HashRouter`, `CSSTransition`, `ErrorBoun
|
|
|
42
42
|
that can be paused and resumed at will. `Lilact`'s `Suspense` even has a few more features
|
|
43
43
|
than the standard API.
|
|
44
44
|
|
|
45
|
-
You can see all the methods
|
|
45
|
+
You can see all the available methods in the documentation. And there is a list of
|
|
46
46
|
demos that can all be seen alongside their code at [Lilact Demo Examples](./static/index.html).
|
|
47
47
|
Just note that the modules are separated in the documentation to improve the doc
|
|
48
48
|
structure, and in practice all the methods and members are accessible via the `Lilact` object
|
package/bin/transpile-dir.js
CHANGED
|
@@ -16,7 +16,7 @@ function usage() {
|
|
|
16
16
|
" --outDir <dir> Output directory for transpiled files (required)\n\n" +
|
|
17
17
|
" --isDebug Add debug labels \n" +
|
|
18
18
|
" --discardComments Discard comments \n" +
|
|
19
|
-
" --injectTraceLabels Inject trace labels needed by Lilact only \n" +
|
|
19
|
+
// " --injectTraceLabels Inject trace labels needed by Lilact only \n" +
|
|
20
20
|
" --factory <func> The factory function (default: createComponent)\n" +
|
|
21
21
|
" -h, --help Show help\n"
|
|
22
22
|
);
|
|
@@ -100,7 +100,7 @@ for (const inputPath of files) {
|
|
|
100
100
|
|
|
101
101
|
if(isDebug) args.push("--isDebug");
|
|
102
102
|
if(discardComments) args.push("--discardComments");
|
|
103
|
-
if(injectTraceLabels) args.push("--injectTraceLabels");
|
|
103
|
+
// if(injectTraceLabels) args.push("--injectTraceLabels");
|
|
104
104
|
|
|
105
105
|
const res = spawnSync(
|
|
106
106
|
process.execPath,
|
package/bin/transpile.js
CHANGED
|
@@ -45,7 +45,7 @@ function usage()
|
|
|
45
45
|
" --out <filepath> Output filepath for transpiled files. Multiple inputs will be concatenated. If not given, each file will have a separate output with an additinoal .transpiled.js in its name.\n" +
|
|
46
46
|
" --isDebug Add debug labels \n\n" +
|
|
47
47
|
" --discardComments Discard comments \n\n" +
|
|
48
|
-
" --injectTraceLabels Inject trace labels needed by Lilact only \n\n" +
|
|
48
|
+
// " --injectTraceLabels Inject trace labels needed by Lilact only \n\n" +
|
|
49
49
|
" --factory <func> The factory function (default: createComponent)\n\n" +
|
|
50
50
|
" -h, --help Show help\n\n" +
|
|
51
51
|
"Example:\n" +
|
|
@@ -82,9 +82,9 @@ for (let i = 0; i < argv.length; i++) {
|
|
|
82
82
|
else if (a === "--discardComments") {
|
|
83
83
|
discardComments = true;
|
|
84
84
|
}
|
|
85
|
-
else if (a === "--injectTraceLabels") {
|
|
86
|
-
|
|
87
|
-
}
|
|
85
|
+
// else if (a === "--injectTraceLabels") {
|
|
86
|
+
// injectTraceLabels = true;
|
|
87
|
+
// }
|
|
88
88
|
else if (a === "--factory") {
|
|
89
89
|
factory = argv[++i];
|
|
90
90
|
}
|
|
@@ -117,7 +117,7 @@ for (const entry of entries) {
|
|
|
117
117
|
appendSourcemap: globalThis.DEBUG,
|
|
118
118
|
factory,
|
|
119
119
|
//mappings: [],
|
|
120
|
-
injectTraceLabels: injectTraceLabels,
|
|
120
|
+
//injectTraceLabels: injectTraceLabels,
|
|
121
121
|
discardComments: discardComments
|
|
122
122
|
}
|
|
123
123
|
);
|