@symbo.ls/create 2.34.24 → 2.34.27

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.
@@ -46,6 +46,9 @@ const prepareContext = async (app, context = {}) => {
46
46
  const key = context.key = context.key || ((0, import_utils.isString)(app) ? app : "smblsapp");
47
47
  context.define = context.define || import_define.defaultDefine;
48
48
  context.window = (0, import_prepare.prepareWindow)(context);
49
+ if (context.sharedLibraries) {
50
+ (0, import_prepare.prepareSharedLibs)(context);
51
+ }
49
52
  const [scratcDesignSystem, emotion, registry] = (0, import_prepare.prepareDesignSystem)(
50
53
  key,
51
54
  context
@@ -63,9 +66,6 @@ const prepareContext = async (app, context = {}) => {
63
66
  context.routerOptions = (0, import_router.initRouter)(app, context);
64
67
  context.defaultExtends = [uikit.Box];
65
68
  context.version = import_package.version;
66
- if (context.sharedLibraries) {
67
- (0, import_prepare.prepareSharedLibs)(context);
68
- }
69
69
  if (context.forceDomql3) {
70
70
  for (const key2 in context.components) {
71
71
  if (!key2.includes("smbls.") && context.components.hasOwnProperty(key2)) {
@@ -109,7 +109,8 @@ const prepareMethods = (context) => {
109
109
  return {
110
110
  ...context.methods || {},
111
111
  require: context.utils.require,
112
- requireOnDemand: context.utils.requireOnDemand
112
+ requireOnDemand: context.utils.requireOnDemand,
113
+ router: context.utils.router
113
114
  };
114
115
  };
115
116
  const cachedDeps = {};
@@ -230,6 +231,7 @@ const prepareState = (app, context) => {
230
231
  const state = {};
231
232
  if (context.state) utils.deepMerge(state, context.state);
232
233
  if (app && app.state) (0, import_utils.deepMerge)(state, app.state);
234
+ state.isRootState = true;
233
235
  return (0, import_utils.deepClone)(state);
234
236
  };
235
237
  const preparePages = (app, context) => {
@@ -43,6 +43,9 @@ const prepareContext = async (app, context = {}) => {
43
43
  const key = context.key = context.key || (isString(app) ? app : "smblsapp");
44
44
  context.define = context.define || defaultDefine;
45
45
  context.window = prepareWindow(context);
46
+ if (context.sharedLibraries) {
47
+ prepareSharedLibs(context);
48
+ }
46
49
  const [scratcDesignSystem, emotion, registry] = prepareDesignSystem(
47
50
  key,
48
51
  context
@@ -60,9 +63,6 @@ const prepareContext = async (app, context = {}) => {
60
63
  context.routerOptions = initRouter(app, context);
61
64
  context.defaultExtends = [uikit.Box];
62
65
  context.version = version;
63
- if (context.sharedLibraries) {
64
- prepareSharedLibs(context);
65
- }
66
66
  if (context.forceDomql3) {
67
67
  for (const key2 in context.components) {
68
68
  if (!key2.includes("smbls.") && context.components.hasOwnProperty(key2)) {
@@ -85,7 +85,8 @@ const prepareUtils = (context) => {
85
85
  const prepareMethods = (context) => {
86
86
  return __spreadProps(__spreadValues({}, context.methods || {}), {
87
87
  require: context.utils.require,
88
- requireOnDemand: context.utils.requireOnDemand
88
+ requireOnDemand: context.utils.requireOnDemand,
89
+ router: context.utils.router
89
90
  });
90
91
  };
91
92
  const cachedDeps = {};
@@ -206,6 +207,7 @@ const prepareState = (app, context) => {
206
207
  const state = {};
207
208
  if (context.state) utils.deepMerge(state, context.state);
208
209
  if (app && app.state) deepMerge(state, app.state);
210
+ state.isRootState = true;
209
211
  return deepClone(state);
210
212
  };
211
213
  const preparePages = (app, context) => {
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@symbo.ls/create",
3
- "version": "2.34.24",
3
+ "version": "2.34.27",
4
4
  "license": "MIT",
5
- "gitHead": "4886a866c3adef97083fc36e3e4db40c1543054d",
5
+ "gitHead": "1994ef5ac77cba0564a416c60e9d0a984543d9af",
6
6
  "type": "module",
7
7
  "module": "src/index.js",
8
8
  "main": "src/index.js",
@@ -29,17 +29,17 @@
29
29
  "prepublish": "npm run build; npm run copy:package:cjs"
30
30
  },
31
31
  "dependencies": {
32
- "@domql/emotion": "^2.34.24",
33
- "@domql/event": "^2.34.24",
34
- "@domql/report": "^2.34.24",
35
- "@domql/router": "^2.34.24",
36
- "@symbo.ls/fetch": "^2.34.24",
37
- "@symbo.ls/init": "^2.34.24",
38
- "@symbo.ls/scratch": "^2.34.24",
39
- "@symbo.ls/sync": "^2.34.24",
40
- "@symbo.ls/uikit": "^2.34.24",
41
- "@symbo.ls/utils": "^2.34.24",
42
- "domql": "^2.34.24"
32
+ "@domql/emotion": "^2.34.27",
33
+ "@domql/event": "^2.34.27",
34
+ "@domql/report": "^2.34.27",
35
+ "@domql/router": "^2.34.27",
36
+ "@symbo.ls/fetch": "^2.34.27",
37
+ "@symbo.ls/init": "^2.34.27",
38
+ "@symbo.ls/scratch": "^2.34.27",
39
+ "@symbo.ls/sync": "^2.34.27",
40
+ "@symbo.ls/uikit": "^2.34.27",
41
+ "@symbo.ls/utils": "^2.34.27",
42
+ "domql": "^2.34.27"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@babel/core": "^7.27.1"
@@ -33,6 +33,11 @@ export const prepareContext = async (app, context = {}) => {
33
33
  const key = (context.key = context.key || (isString(app) ? app : 'smblsapp'))
34
34
  context.define = context.define || defaultDefine
35
35
  context.window = prepareWindow(context)
36
+
37
+ if (context.sharedLibraries) {
38
+ prepareSharedLibs(context)
39
+ }
40
+
36
41
  const [scratcDesignSystem, emotion, registry] = prepareDesignSystem(
37
42
  key,
38
43
  context
@@ -51,10 +56,6 @@ export const prepareContext = async (app, context = {}) => {
51
56
  context.defaultExtends = [uikit.Box]
52
57
  context.version = version
53
58
 
54
- if (context.sharedLibraries) {
55
- prepareSharedLibs(context)
56
- }
57
-
58
59
  // Iterate over components and pages to run domql3hack
59
60
  if (context.forceDomql3) {
60
61
  for (const key in context.components) {
package/src/prepare.js CHANGED
@@ -93,7 +93,8 @@ export const prepareMethods = (context) => {
93
93
  return {
94
94
  ...(context.methods || {}),
95
95
  require: context.utils.require,
96
- requireOnDemand: context.utils.requireOnDemand
96
+ requireOnDemand: context.utils.requireOnDemand,
97
+ router: context.utils.router
97
98
  }
98
99
  }
99
100
 
@@ -232,6 +233,7 @@ export const prepareState = (app, context) => {
232
233
  const state = {}
233
234
  if (context.state) utils.deepMerge(state, context.state)
234
235
  if (app && app.state) deepMerge(state, app.state)
236
+ state.isRootState = true
235
237
  return deepClone(state)
236
238
  }
237
239