@mapples/app 2.1.0-beta.20261116120553 → 2.1.0-beta.20261116200745
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/CHANGELOG.md +10 -6
- package/dist/MapplesApp.d.ts +5 -0
- package/dist/MapplesApp.d.ts.map +1 -1
- package/dist/MapplesApp.js +41 -13
- package/dist/MapplesApp.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @mapples/render
|
|
2
2
|
|
|
3
|
-
## 2.1.0-beta.
|
|
3
|
+
## 2.1.0-beta.20261116200745
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
@@ -20,14 +20,18 @@
|
|
|
20
20
|
|
|
21
21
|
Creator: a Translations panel (languages, texts per language, missing markers, JSON / CSV import and export, a locale preview for the canvas and Play), translation keys in the binding picker, and the same data in the share viewer and the Preview app.
|
|
22
22
|
|
|
23
|
+
- d00525c: A `MapplesApp` mounted inside another `MapplesApp` passes its children through instead of starting a second set of providers, so a theme variant or style context set by the app's own root layout reaches the screens of the CLI's generated root layout (mapplesorg/mapples#98). Props given to the inner one are ignored with a warning.
|
|
24
|
+
|
|
25
|
+
Breaking (included in 2.1.0, owner 2026-11-16): a `MapplesApp` inside another no longer starts its own providers, so props given to the inner one stop taking effect.
|
|
26
|
+
|
|
23
27
|
- Updated dependencies [5fdf9ed]
|
|
24
28
|
- Updated dependencies [dcfd14b]
|
|
25
29
|
- Updated dependencies [dd68ce2]
|
|
26
|
-
- @mapples/state@2.1.0-beta.
|
|
27
|
-
- @mapples/navigation@2.1.0-beta.
|
|
28
|
-
- @mapples/action@2.1.0-beta.
|
|
29
|
-
- @mapples/fonts@2.1.0-beta.
|
|
30
|
-
- @mapples/request@2.1.0-beta.
|
|
30
|
+
- @mapples/state@2.1.0-beta.20261116200745
|
|
31
|
+
- @mapples/navigation@2.1.0-beta.20261116200745
|
|
32
|
+
- @mapples/action@2.1.0-beta.20261116200745
|
|
33
|
+
- @mapples/fonts@2.1.0-beta.20261116200745
|
|
34
|
+
- @mapples/request@2.1.0-beta.20261116200745
|
|
31
35
|
|
|
32
36
|
## 2.0.4
|
|
33
37
|
|
package/dist/MapplesApp.d.ts
CHANGED
|
@@ -43,6 +43,11 @@ export interface MapplesAppProps {
|
|
|
43
43
|
* that are required for all Mapples applications. It handles font loading and provides
|
|
44
44
|
* a unified entry point for the Mapples ecosystem.
|
|
45
45
|
*
|
|
46
|
+
* Mount it once. A MapplesApp inside another one (an app's root layout and
|
|
47
|
+
* the `mapples` CLI's generated navigator layout below it) passes its
|
|
48
|
+
* children through, so whatever the outer one provides — and any style
|
|
49
|
+
* context override made between the two — reaches every screen.
|
|
50
|
+
*
|
|
46
51
|
* @component
|
|
47
52
|
* @param props - The component props
|
|
48
53
|
* @param props.children - The application content to render inside the Mapples providers
|
package/dist/MapplesApp.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MapplesApp.d.ts","sourceRoot":"","sources":["../src/MapplesApp.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"MapplesApp.d.ts","sourceRoot":"","sources":["../src/MapplesApp.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,EAAE,EACF,iBAAiB,EACjB,GAAG,EAIJ,MAAM,OAAO,CAAC;AAGf,OAAO,EAAE,SAAS,EAAkB,MAAM,iBAAiB,CAAC;AAC5D,OAAO,EACL,gBAAgB,EAIjB,MAAM,gBAAgB,CAAC;AAexB,OAAO,EAAE,aAAa,EAAsB,MAAM,qBAAqB,CAAC;AAExE,OAAuB,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/E,OAAO,EAAE,cAAc,EAAiB,MAAM,mBAAmB,CAAC;AAalE;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B,kFAAkF;IAClF,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB,kFAAkF;IAClF,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,iIAAiI;IACjI,UAAU,CAAC,EAAE,aAAa,CAAC;IAC3B,4EAA4E;IAC5E,oBAAoB,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IACnC,4BAA4B;IAC5B,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B;;;;;OAKG;IACH,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,qDAAqD;IACrD,gBAAgB,CAAC,EAAE,mBAAmB,CAAC,kBAAkB,CAAC,CAAC;IAC3D,+EAA+E;IAC/E,SAAS,CAAC,EAAE,mBAAmB,CAAC,WAAW,CAAC,CAAC;IAC7C,uGAAuG;IACvG,aAAa,CAAC,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACrD,yGAAyG;IACzG,MAAM,CAAC,EAAE,mBAAmB,CAAC,QAAQ,CAAC,CAAC;CACxC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,QAAA,MAAM,UAAU,EAAE,EAAE,CAAC,iBAAiB,CAAC,eAAe,CAAC,CAOtD,CAAC;AA+FF,eAAe,UAAU,CAAC"}
|
package/dist/MapplesApp.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useEffect, useMemo } from 'react';
|
|
1
|
+
import { createContext, useContext, useEffect, useMemo, } from 'react';
|
|
2
2
|
import { Components } from '@mapples/components';
|
|
3
3
|
import { RenderProvider } from '@mapples/render';
|
|
4
4
|
import { StyleProvider, Styler, ThemeVariantProvider, } from '@mapples/style';
|
|
@@ -21,6 +21,13 @@ import MapplesRuntime from './runtime/MapplesRuntime';
|
|
|
21
21
|
import { syncedProject } from './runtime/project';
|
|
22
22
|
import { resolveAssets, toStyleContext } from './utils';
|
|
23
23
|
const rootStyle = { flex: 1 };
|
|
24
|
+
/**
|
|
25
|
+
* Set by the outermost MapplesApp. A MapplesApp below one (the CLI's
|
|
26
|
+
* generated root layout inside an app whose own root layout mounts
|
|
27
|
+
* MapplesApp) passes its children through, so the providers and any style
|
|
28
|
+
* context override made between the two keep reaching the screens.
|
|
29
|
+
*/
|
|
30
|
+
const MapplesAppMounted = createContext(false);
|
|
24
31
|
/**
|
|
25
32
|
* The main MapplesApp component that provides the core Mapples ecosystem functionality.
|
|
26
33
|
*
|
|
@@ -28,6 +35,11 @@ const rootStyle = { flex: 1 };
|
|
|
28
35
|
* that are required for all Mapples applications. It handles font loading and provides
|
|
29
36
|
* a unified entry point for the Mapples ecosystem.
|
|
30
37
|
*
|
|
38
|
+
* Mount it once. A MapplesApp inside another one (an app's root layout and
|
|
39
|
+
* the `mapples` CLI's generated navigator layout below it) passes its
|
|
40
|
+
* children through, so whatever the outer one provides — and any style
|
|
41
|
+
* context override made between the two — reaches every screen.
|
|
42
|
+
*
|
|
31
43
|
* @component
|
|
32
44
|
* @param props - The component props
|
|
33
45
|
* @param props.children - The application content to render inside the Mapples providers
|
|
@@ -62,7 +74,21 @@ const rootStyle = { flex: 1 };
|
|
|
62
74
|
* }
|
|
63
75
|
* ```
|
|
64
76
|
*/
|
|
65
|
-
const MapplesApp = (
|
|
77
|
+
const MapplesApp = (props) => {
|
|
78
|
+
const mounted = useContext(MapplesAppMounted);
|
|
79
|
+
return mounted ? (<MapplesAppPassThrough {...props}/>) : (<MapplesAppRoot {...props}/>);
|
|
80
|
+
};
|
|
81
|
+
/** A MapplesApp inside another: the outer one's providers serve its children. */
|
|
82
|
+
const MapplesAppPassThrough = ({ children, ...props }) => {
|
|
83
|
+
const ignored = Object.keys(props).join(', ');
|
|
84
|
+
useEffect(() => {
|
|
85
|
+
if (ignored === '')
|
|
86
|
+
return;
|
|
87
|
+
console.warn(`[@mapples/app] MapplesApp is already mounted above this one, which passes its children through and ignores ${ignored} — set them on the outer MapplesApp`);
|
|
88
|
+
}, [ignored]);
|
|
89
|
+
return <>{children}</>;
|
|
90
|
+
};
|
|
91
|
+
const MapplesAppRoot = ({ children, style, assets, navigation, FontLoadingIndicator, onFontLoaded, project, variablesStorage, transport, themeVariable, locale, }) => {
|
|
66
92
|
const runtimeProject = useMemo(() => project ?? syncedProject(), [project]);
|
|
67
93
|
const resolved = useMemo(() => resolveAssets(assets ?? assetsModule), [assets]);
|
|
68
94
|
const styleContext = useMemo(() => Styler.init(style ?? toStyleContext(themeModule)), [style]);
|
|
@@ -89,17 +115,19 @@ const MapplesApp = ({ children, style, assets, navigation, FontLoadingIndicator,
|
|
|
89
115
|
// Gesture-driven library components (Slider, BottomSheet) need the
|
|
90
116
|
// gesture-handler root; the canvas provides its own through DnDRootView.
|
|
91
117
|
<GestureHandlerRootView style={rootStyle}>
|
|
92
|
-
<
|
|
93
|
-
<
|
|
94
|
-
<
|
|
95
|
-
<
|
|
96
|
-
<
|
|
97
|
-
{
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
118
|
+
<MapplesAppMounted.Provider value>
|
|
119
|
+
<ThemeVariantProvider>
|
|
120
|
+
<StyleProvider style={styleContext}>
|
|
121
|
+
<RenderProvider components={{ ...Components, ...UIComponents }} assets={resolved.assets}>
|
|
122
|
+
<NavigationProvider navigation={navigation}>
|
|
123
|
+
<MapplesRuntime project={runtimeProject} variablesStorage={variablesStorage} transport={transport} themeVariable={themeVariable} locale={locale}>
|
|
124
|
+
{children}
|
|
125
|
+
</MapplesRuntime>
|
|
126
|
+
</NavigationProvider>
|
|
127
|
+
</RenderProvider>
|
|
128
|
+
</StyleProvider>
|
|
129
|
+
</ThemeVariantProvider>
|
|
130
|
+
</MapplesAppMounted.Provider>
|
|
103
131
|
</GestureHandlerRootView>);
|
|
104
132
|
};
|
|
105
133
|
export default MapplesApp;
|
package/dist/MapplesApp.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MapplesApp.js","sourceRoot":"","sources":["../src/MapplesApp.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"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,CAAC,cAAc,CAAC,CACxB,gBAAgB,CAAC,CAAC,gBAAgB,CAAC,CACnC,SAAS,CAAC,CAAC,SAAS,CAAC,CACrB,aAAa,CAAC,CAAC,aAAa,CAAC,CAC7B,MAAM,CAAC,CAAC,MAAM,CAAC,CAEf;kBAAA,CAAC,QAAQ,CACX;gBAAA,EAAE,cAAc,CAClB;cAAA,EAAE,kBAAkB,CACtB;YAAA,EAAE,cAAc,CAClB;UAAA,EAAE,aAAa,CACjB;QAAA,EAAE,oBAAoB,CACxB;MAAA,EAAE,iBAAiB,CAAC,QAAQ,CAC9B;IAAA,EAAE,sBAAsB,CAAC,CAC1B,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mapples/app",
|
|
3
|
-
"version": "2.1.0-beta.
|
|
3
|
+
"version": "2.1.0-beta.20261116200745",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"scripts": {
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"rxjs": "^7.0.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@mapples/navigation": "^2.1.0-beta.
|
|
36
|
+
"@mapples/navigation": "^2.1.0-beta.20261116200745",
|
|
37
37
|
"typescript": "~6.0.3"
|
|
38
38
|
},
|
|
39
39
|
"files": [
|