@mmapp/react 0.1.0-alpha.18 → 0.1.0-alpha.20
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/actions-HOXZPBTT.mjs +116 -0
- package/dist/actions-MFI2V4DX.mjs +116 -0
- package/dist/atoms/index.d.mts +2 -2
- package/dist/atoms/index.d.ts +2 -2
- package/dist/atoms/index.js +1 -1
- package/dist/atoms/index.mjs +1 -1
- package/dist/builtin-atoms-C-sNyYJl.d.mts +647 -0
- package/dist/builtin-atoms-C-sNyYJl.d.ts +647 -0
- package/dist/builtin-atoms-DCKrjG7i.d.mts +96 -0
- package/dist/builtin-atoms-DCKrjG7i.d.ts +96 -0
- package/dist/builtin-atoms-DRD3EwG6.d.mts +648 -0
- package/dist/builtin-atoms-DRD3EwG6.d.ts +648 -0
- package/dist/builtin-atoms-jt04b7Rw.d.mts +643 -0
- package/dist/builtin-atoms-jt04b7Rw.d.ts +643 -0
- package/dist/chunk-247T4GDJ.mjs +677 -0
- package/dist/chunk-3H6CR7E7.mjs +1924 -0
- package/dist/chunk-3PL6FL6I.mjs +96 -0
- package/dist/chunk-3SJSW3C4.mjs +2039 -0
- package/dist/chunk-5OI2VI57.mjs +1964 -0
- package/dist/chunk-CL6FYZ43.mjs +105 -0
- package/dist/chunk-ENQOCZI5.mjs +1938 -0
- package/dist/chunk-FB3WCZAU.mjs +512 -0
- package/dist/chunk-FBKUGKQI.mjs +1938 -0
- package/dist/chunk-GLJ7VC7Z.mjs +684 -0
- package/dist/chunk-HHMWR6NA.mjs +504 -0
- package/dist/chunk-HULEMSN2.mjs +120 -0
- package/dist/chunk-J5MW6CRU.mjs +1938 -0
- package/dist/chunk-PNTTKNYU.mjs +677 -0
- package/dist/chunk-TY5OTJP4.mjs +684 -0
- package/dist/chunk-WV7DVCP6.mjs +513 -0
- package/dist/chunk-YFMPTGUF.mjs +677 -0
- package/dist/chunk-ZAHMWAER.mjs +1960 -0
- package/dist/{chunk-2VJQJM7S.mjs → chunk-ZDWACXZN.mjs} +1 -1
- package/dist/composition-BJ6QQTWT.mjs +12 -0
- package/dist/composition-XBGKKCI7.mjs +57 -0
- package/dist/content-QVPFUG4P.mjs +246 -0
- package/dist/control-flow-CBREHWJW.mjs +35 -0
- package/dist/control-flow-FWBOI6SM.mjs +35 -0
- package/dist/control-flow-ZWUGCDSP.mjs +35 -0
- package/dist/data-WCMIZYKD.mjs +97 -0
- package/dist/grouping-E6F377VZ.mjs +204 -0
- package/dist/grouping-FRPOEXO3.mjs +233 -0
- package/dist/index.d.mts +4 -433
- package/dist/index.d.ts +4 -433
- package/dist/index.js +3671 -582
- package/dist/index.mjs +335 -1040
- package/dist/input-PUOZDNSI.mjs +222 -0
- package/dist/layout-RATDMCLP.mjs +106 -0
- package/dist/navigation-VCT7ZBMA.mjs +15 -0
- package/dist/navigation-WFV7YWOU.mjs +14 -0
- package/dist/player/index.d.mts +37 -11
- package/dist/player/index.d.ts +37 -11
- package/dist/player/index.js +3321 -193
- package/dist/player/index.mjs +55 -5
- package/package.json +4 -4
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
|
|
3
|
+
/** Minimal types for the standalone player CTR. */
|
|
4
|
+
interface ComponentNode {
|
|
5
|
+
/** Component type — accepts either `type` (simple) or `component` (compiler IR) */
|
|
6
|
+
type?: string;
|
|
7
|
+
/** Alias for `type` — used by the compiler's IR experience nodes */
|
|
8
|
+
component?: string;
|
|
9
|
+
/** Props — accepts either `props` (simple) or `config` (compiler IR) */
|
|
10
|
+
props?: Record<string, unknown>;
|
|
11
|
+
/** Alias for `props` — used by the compiler's IR experience nodes */
|
|
12
|
+
config?: Record<string, unknown>;
|
|
13
|
+
/** Stable node ID (compiler IR) */
|
|
14
|
+
id?: string;
|
|
15
|
+
/** CSS class name (compiler IR) */
|
|
16
|
+
className?: string;
|
|
17
|
+
children?: ComponentNode[] | string;
|
|
18
|
+
$if?: string;
|
|
19
|
+
$for?: {
|
|
20
|
+
each: string;
|
|
21
|
+
as: string;
|
|
22
|
+
key?: string;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
type ComponentTree = ComponentNode | ComponentNode[];
|
|
26
|
+
interface ScopeData {
|
|
27
|
+
state_data?: Record<string, unknown>;
|
|
28
|
+
memory?: Record<string, unknown>;
|
|
29
|
+
context?: Record<string, unknown>;
|
|
30
|
+
[key: string]: unknown;
|
|
31
|
+
}
|
|
32
|
+
type AtomComponent = React.ComponentType<Record<string, unknown>>;
|
|
33
|
+
type AtomRegistry = Record<string, AtomComponent>;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Standalone ComponentTreeRenderer for the dev player.
|
|
37
|
+
*
|
|
38
|
+
* Renders a JSON component tree (IR experience nodes) to React elements.
|
|
39
|
+
* Uses the minimal evaluator and accepts an AtomRegistry for component resolution.
|
|
40
|
+
*/
|
|
41
|
+
|
|
42
|
+
interface ComponentTreeRendererProps {
|
|
43
|
+
/** The component tree to render */
|
|
44
|
+
tree: ComponentTree;
|
|
45
|
+
/** Data scopes for expression evaluation */
|
|
46
|
+
scopes: Partial<ScopeData>;
|
|
47
|
+
/** Runtime atom registry — maps type names to React components */
|
|
48
|
+
atoms?: AtomRegistry;
|
|
49
|
+
/** Event handlers */
|
|
50
|
+
onEvent?: (eventName: string, payload?: unknown) => void;
|
|
51
|
+
/** Error boundary fallback */
|
|
52
|
+
fallback?: React__default.ReactNode;
|
|
53
|
+
}
|
|
54
|
+
declare const ComponentTreeRenderer: React__default.FC<ComponentTreeRendererProps>;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* DevPlayer — Development shell for previewing workflow component trees.
|
|
58
|
+
*
|
|
59
|
+
* Provides:
|
|
60
|
+
* - ComponentTreeRenderer with built-in atoms
|
|
61
|
+
* - Scope inspector panel (collapsible)
|
|
62
|
+
* - Event log
|
|
63
|
+
* - HMR integration (listens to __mm_dev WebSocket for live reload)
|
|
64
|
+
* - Error boundary with dev-friendly error display
|
|
65
|
+
*/
|
|
66
|
+
|
|
67
|
+
interface DevPlayerProps {
|
|
68
|
+
/** The component tree to render */
|
|
69
|
+
tree: ComponentTree;
|
|
70
|
+
/** Data scopes for expression evaluation */
|
|
71
|
+
scopes?: Partial<ScopeData>;
|
|
72
|
+
/** Additional atoms (merged with built-ins; overrides win) */
|
|
73
|
+
atoms?: AtomRegistry;
|
|
74
|
+
/** Title shown in the dev chrome */
|
|
75
|
+
title?: string;
|
|
76
|
+
/** Hide the dev toolbar (render tree only) */
|
|
77
|
+
bare?: boolean;
|
|
78
|
+
/** WebSocket URL for HMR (default: auto-detect from window.location) */
|
|
79
|
+
wsUrl?: string;
|
|
80
|
+
/** Called when the tree is reloaded via HMR */
|
|
81
|
+
onReload?: () => void;
|
|
82
|
+
/** Called on every atom event */
|
|
83
|
+
onEvent?: (eventName: string, payload?: unknown) => void;
|
|
84
|
+
}
|
|
85
|
+
declare const DevPlayer: React__default.FC<DevPlayerProps>;
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Built-in atom components for the standalone player.
|
|
89
|
+
*
|
|
90
|
+
* These are minimal HTML-based implementations of the core layout and
|
|
91
|
+
* display atoms. Projects can override any of these via the AtomRegistry.
|
|
92
|
+
*/
|
|
93
|
+
|
|
94
|
+
declare const builtinAtoms: AtomRegistry;
|
|
95
|
+
|
|
96
|
+
export { type AtomComponent as A, ComponentTreeRenderer as C, DevPlayer as D, type ScopeData as S, type ComponentTreeRendererProps as a, type DevPlayerProps as b, builtinAtoms as c, type ComponentNode as d, type ComponentTree as e, type AtomRegistry as f };
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
|
|
3
|
+
/** Minimal types for the standalone player CTR. */
|
|
4
|
+
interface ComponentNode {
|
|
5
|
+
/** Component type — accepts either `type` (simple) or `component` (compiler IR) */
|
|
6
|
+
type?: string;
|
|
7
|
+
/** Alias for `type` — used by the compiler's IR experience nodes */
|
|
8
|
+
component?: string;
|
|
9
|
+
/** Props — accepts either `props` (simple) or `config` (compiler IR) */
|
|
10
|
+
props?: Record<string, unknown>;
|
|
11
|
+
/** Alias for `props` — used by the compiler's IR experience nodes */
|
|
12
|
+
config?: Record<string, unknown>;
|
|
13
|
+
/** Stable node ID (compiler IR) */
|
|
14
|
+
id?: string;
|
|
15
|
+
/** CSS class name (compiler IR) */
|
|
16
|
+
className?: string;
|
|
17
|
+
children?: ComponentNode[] | string;
|
|
18
|
+
$if?: string;
|
|
19
|
+
$for?: {
|
|
20
|
+
each: string;
|
|
21
|
+
as: string;
|
|
22
|
+
key?: string;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
type ComponentTree = ComponentNode | ComponentNode[];
|
|
26
|
+
interface ScopeData {
|
|
27
|
+
state_data?: Record<string, unknown>;
|
|
28
|
+
memory?: Record<string, unknown>;
|
|
29
|
+
context?: Record<string, unknown>;
|
|
30
|
+
[key: string]: unknown;
|
|
31
|
+
}
|
|
32
|
+
type AtomComponent = React.ComponentType<Record<string, unknown>>;
|
|
33
|
+
type AtomRegistry = Record<string, AtomComponent>;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Standalone ComponentTreeRenderer for the dev player.
|
|
37
|
+
*
|
|
38
|
+
* Renders a JSON component tree (IR experience nodes) to React elements.
|
|
39
|
+
* Uses the minimal evaluator and accepts an AtomRegistry for component resolution.
|
|
40
|
+
*/
|
|
41
|
+
|
|
42
|
+
interface ComponentTreeRendererProps {
|
|
43
|
+
/** The component tree to render */
|
|
44
|
+
tree: ComponentTree;
|
|
45
|
+
/** Data scopes for expression evaluation */
|
|
46
|
+
scopes: Partial<ScopeData>;
|
|
47
|
+
/** Runtime atom registry — maps type names to React components */
|
|
48
|
+
atoms?: AtomRegistry;
|
|
49
|
+
/** Event handlers */
|
|
50
|
+
onEvent?: (eventName: string, payload?: unknown) => void;
|
|
51
|
+
/** Error boundary fallback */
|
|
52
|
+
fallback?: React__default.ReactNode;
|
|
53
|
+
}
|
|
54
|
+
declare const ComponentTreeRenderer: React__default.FC<ComponentTreeRendererProps>;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* DevPlayer — Development shell for previewing workflow component trees.
|
|
58
|
+
*
|
|
59
|
+
* Provides:
|
|
60
|
+
* - ComponentTreeRenderer with built-in atoms
|
|
61
|
+
* - Scope inspector panel (collapsible)
|
|
62
|
+
* - Event log
|
|
63
|
+
* - HMR integration (listens to __mm_dev WebSocket for live reload)
|
|
64
|
+
* - Error boundary with dev-friendly error display
|
|
65
|
+
*/
|
|
66
|
+
|
|
67
|
+
interface DevPlayerProps {
|
|
68
|
+
/** The component tree to render */
|
|
69
|
+
tree: ComponentTree;
|
|
70
|
+
/** Data scopes for expression evaluation */
|
|
71
|
+
scopes?: Partial<ScopeData>;
|
|
72
|
+
/** Additional atoms (merged with built-ins; overrides win) */
|
|
73
|
+
atoms?: AtomRegistry;
|
|
74
|
+
/** Title shown in the dev chrome */
|
|
75
|
+
title?: string;
|
|
76
|
+
/** Hide the dev toolbar (render tree only) */
|
|
77
|
+
bare?: boolean;
|
|
78
|
+
/** WebSocket URL for HMR (default: auto-detect from window.location) */
|
|
79
|
+
wsUrl?: string;
|
|
80
|
+
/** Called when the tree is reloaded via HMR */
|
|
81
|
+
onReload?: () => void;
|
|
82
|
+
/** Called on every atom event */
|
|
83
|
+
onEvent?: (eventName: string, payload?: unknown) => void;
|
|
84
|
+
}
|
|
85
|
+
declare const DevPlayer: React__default.FC<DevPlayerProps>;
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Built-in atom components for the standalone player.
|
|
89
|
+
*
|
|
90
|
+
* These are minimal HTML-based implementations of the core layout and
|
|
91
|
+
* display atoms. Projects can override any of these via the AtomRegistry.
|
|
92
|
+
*/
|
|
93
|
+
|
|
94
|
+
declare const builtinAtoms: AtomRegistry;
|
|
95
|
+
|
|
96
|
+
export { type AtomComponent as A, ComponentTreeRenderer as C, DevPlayer as D, type ScopeData as S, type ComponentTreeRendererProps as a, type DevPlayerProps as b, builtinAtoms as c, type ComponentNode as d, type ComponentTree as e, type AtomRegistry as f };
|