bobe 0.0.72 → 0.0.73
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/bobe.cjs +4 -1
- package/dist/bobe.cjs.map +1 -1
- package/dist/bobe.compiler.cjs +4 -1
- package/dist/bobe.compiler.cjs.map +1 -1
- package/dist/bobe.compiler.esm.js +4 -1
- package/dist/bobe.compiler.esm.js.map +1 -1
- package/dist/bobe.esm.js +4 -1
- package/dist/bobe.esm.js.map +1 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.umd.js +4 -1
- package/dist/index.umd.js.map +1 -1
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -356,7 +356,10 @@ type ComponentNode$1 = LogicNode & {
|
|
|
356
356
|
type Dep = (() => any) | string;
|
|
357
357
|
type RenderWithMw = {
|
|
358
358
|
use: Mw['use'];
|
|
359
|
-
<T extends typeof Store>(Ctor: T, root: any): [ComponentNode$1, InstanceType<T>];
|
|
359
|
+
<T extends typeof Store>(Ctor: T, root: any, options?: RenderOptions<T>): [ComponentNode$1, InstanceType<T>];
|
|
360
|
+
};
|
|
361
|
+
type RenderOptions<T extends typeof Store> = {
|
|
362
|
+
props?: Partial<Omit<InstanceType<T>, 'ui' | 'parent'>>;
|
|
360
363
|
};
|
|
361
364
|
|
|
362
365
|
declare class Tokenizer {
|
package/dist/index.umd.js
CHANGED
|
@@ -2744,8 +2744,11 @@
|
|
|
2744
2744
|
}
|
|
2745
2745
|
function customRender(option) {
|
|
2746
2746
|
const mw = new Mw();
|
|
2747
|
-
function render(Ctor, root) {
|
|
2747
|
+
function render(Ctor, root, options = {}) {
|
|
2748
2748
|
const store = Ctor.new();
|
|
2749
|
+
if (options.props) {
|
|
2750
|
+
Object.assign(store, options.props);
|
|
2751
|
+
}
|
|
2749
2752
|
const tokenizer = store.ui(false);
|
|
2750
2753
|
const terp = new Interpreter(tokenizer);
|
|
2751
2754
|
terp.config(option);
|