@symbo.ls/create 2.33.40 → 2.34.0
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/cjs/createDomql.js +18 -4
- package/dist/cjs/options.js +1 -0
- package/dist/esm/createDomql.js +18 -4
- package/dist/esm/options.js +1 -0
- package/package.json +13 -13
- package/src/createDomql.js +23 -6
- package/src/options.js +1 -0
package/dist/cjs/createDomql.js
CHANGED
|
@@ -40,6 +40,7 @@ var import_define = require("./define.js");
|
|
|
40
40
|
var import_router = require("./router.js");
|
|
41
41
|
var import_syncExtend = require("./syncExtend.js");
|
|
42
42
|
var import_prepare = require("./prepare.js");
|
|
43
|
+
var import_utils2 = require("@symbo.ls/utils");
|
|
43
44
|
const prepareContext = async (app, context = {}) => {
|
|
44
45
|
const key = context.key = context.key || ((0, import_utils.isString)(app) ? app : "smblsapp");
|
|
45
46
|
context.define = context.define || import_define.defaultDefine;
|
|
@@ -60,6 +61,20 @@ const prepareContext = async (app, context = {}) => {
|
|
|
60
61
|
context.methods = (0, import_prepare.prepareMethods)(context);
|
|
61
62
|
context.routerOptions = (0, import_router.initRouter)(app, context);
|
|
62
63
|
context.defaultExtends = [uikit.Box];
|
|
64
|
+
if (context.forceDomql3) {
|
|
65
|
+
for (const key2 in context.components) {
|
|
66
|
+
if (!key2.includes("smbls.") && context.components.hasOwnProperty(key2)) {
|
|
67
|
+
context.components[key2] = (0, import_utils2.temporaryDomqlHackReverse)(
|
|
68
|
+
context.components[key2]
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
for (const key2 in context.pages) {
|
|
73
|
+
if (context.pages.hasOwnProperty(key2)) {
|
|
74
|
+
context.pages[key2] = (0, import_utils2.temporaryDomqlHackReverse)(context.pages[key2]);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
63
78
|
return context;
|
|
64
79
|
};
|
|
65
80
|
const createDomqlElement = async (app, ctx) => {
|
|
@@ -67,13 +82,12 @@ const createDomqlElement = async (app, ctx) => {
|
|
|
67
82
|
if ((0, import_utils.isNode)(app)) {
|
|
68
83
|
app = {};
|
|
69
84
|
ctx.parent = app;
|
|
70
|
-
}
|
|
71
|
-
if ((0, import_utils.isString)(app)) {
|
|
85
|
+
} else if ((0, import_utils.isString)(app)) {
|
|
72
86
|
app = {};
|
|
73
87
|
ctx.key = app;
|
|
74
|
-
}
|
|
75
|
-
if (!(0, import_utils.isObject)(app)) {
|
|
88
|
+
} else if (!(0, import_utils.isObject)(app)) {
|
|
76
89
|
app = {};
|
|
90
|
+
} else {
|
|
77
91
|
}
|
|
78
92
|
await prepareContext(app, ctx);
|
|
79
93
|
app.extend = (0, import_syncExtend.initializeExtend)(app, ctx);
|
package/dist/cjs/options.js
CHANGED
package/dist/esm/createDomql.js
CHANGED
|
@@ -36,6 +36,7 @@ import {
|
|
|
36
36
|
prepareUtils,
|
|
37
37
|
prepareMethods
|
|
38
38
|
} from "./prepare.js";
|
|
39
|
+
import { temporaryDomqlHackReverse } from "@symbo.ls/utils";
|
|
39
40
|
const prepareContext = async (app, context = {}) => {
|
|
40
41
|
const key = context.key = context.key || (isString(app) ? app : "smblsapp");
|
|
41
42
|
context.define = context.define || defaultDefine;
|
|
@@ -56,6 +57,20 @@ const prepareContext = async (app, context = {}) => {
|
|
|
56
57
|
context.methods = prepareMethods(context);
|
|
57
58
|
context.routerOptions = initRouter(app, context);
|
|
58
59
|
context.defaultExtends = [uikit.Box];
|
|
60
|
+
if (context.forceDomql3) {
|
|
61
|
+
for (const key2 in context.components) {
|
|
62
|
+
if (!key2.includes("smbls.") && context.components.hasOwnProperty(key2)) {
|
|
63
|
+
context.components[key2] = temporaryDomqlHackReverse(
|
|
64
|
+
context.components[key2]
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
for (const key2 in context.pages) {
|
|
69
|
+
if (context.pages.hasOwnProperty(key2)) {
|
|
70
|
+
context.pages[key2] = temporaryDomqlHackReverse(context.pages[key2]);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
59
74
|
return context;
|
|
60
75
|
};
|
|
61
76
|
const createDomqlElement = async (app, ctx) => {
|
|
@@ -63,13 +78,12 @@ const createDomqlElement = async (app, ctx) => {
|
|
|
63
78
|
if (isNode(app)) {
|
|
64
79
|
app = {};
|
|
65
80
|
ctx.parent = app;
|
|
66
|
-
}
|
|
67
|
-
if (isString(app)) {
|
|
81
|
+
} else if (isString(app)) {
|
|
68
82
|
app = {};
|
|
69
83
|
ctx.key = app;
|
|
70
|
-
}
|
|
71
|
-
if (!isObject(app)) {
|
|
84
|
+
} else if (!isObject(app)) {
|
|
72
85
|
app = {};
|
|
86
|
+
} else {
|
|
73
87
|
}
|
|
74
88
|
await prepareContext(app, ctx);
|
|
75
89
|
app.extend = initializeExtend(app, ctx);
|
package/dist/esm/options.js
CHANGED
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@symbo.ls/create",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.34.0",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"gitHead": "
|
|
5
|
+
"gitHead": "36ad7eff7cf19c4b684e754e04fa80c88448c3aa",
|
|
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.
|
|
33
|
-
"@domql/event": "^2.
|
|
34
|
-
"@domql/report": "^2.
|
|
35
|
-
"@domql/router": "^2.
|
|
36
|
-
"@symbo.ls/fetch": "^2.
|
|
37
|
-
"@symbo.ls/init": "^2.
|
|
38
|
-
"@symbo.ls/scratch": "^2.
|
|
39
|
-
"@symbo.ls/sync": "^2.
|
|
40
|
-
"@symbo.ls/uikit": "^2.
|
|
41
|
-
"@symbo.ls/utils": "^2.
|
|
42
|
-
"domql": "^2.
|
|
32
|
+
"@domql/emotion": "^2.34.0",
|
|
33
|
+
"@domql/event": "^2.34.0",
|
|
34
|
+
"@domql/report": "^2.34.0",
|
|
35
|
+
"@domql/router": "^2.34.0",
|
|
36
|
+
"@symbo.ls/fetch": "^2.34.0",
|
|
37
|
+
"@symbo.ls/init": "^2.34.0",
|
|
38
|
+
"@symbo.ls/scratch": "^2.34.0",
|
|
39
|
+
"@symbo.ls/sync": "^2.34.0",
|
|
40
|
+
"@symbo.ls/uikit": "^2.34.0",
|
|
41
|
+
"@symbo.ls/utils": "^2.34.0",
|
|
42
|
+
"domql": "^2.34.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@babel/core": "^7.27.1"
|
package/src/createDomql.js
CHANGED
|
@@ -9,7 +9,6 @@ import { defaultDefine } from './define.js'
|
|
|
9
9
|
import { initRouter } from './router.js'
|
|
10
10
|
import {
|
|
11
11
|
initializeExtend,
|
|
12
|
-
// initializeInspect,
|
|
13
12
|
initializeNotifications,
|
|
14
13
|
initializeSync
|
|
15
14
|
} from './syncExtend.js'
|
|
@@ -26,8 +25,9 @@ import {
|
|
|
26
25
|
prepareMethods
|
|
27
26
|
} from './prepare.js'
|
|
28
27
|
|
|
28
|
+
import { temporaryDomqlHackReverse } from '@symbo.ls/utils'
|
|
29
|
+
|
|
29
30
|
export const prepareContext = async (app, context = {}) => {
|
|
30
|
-
// const rcFileKey = process?.env?.SYMBOLS_KEY
|
|
31
31
|
const key = (context.key = context.key || (isString(app) ? app : 'smblsapp'))
|
|
32
32
|
context.define = context.define || defaultDefine
|
|
33
33
|
context.window = prepareWindow(context)
|
|
@@ -47,6 +47,23 @@ export const prepareContext = async (app, context = {}) => {
|
|
|
47
47
|
context.methods = prepareMethods(context)
|
|
48
48
|
context.routerOptions = initRouter(app, context)
|
|
49
49
|
context.defaultExtends = [uikit.Box]
|
|
50
|
+
|
|
51
|
+
// Iterate over components and pages to run domql3hack
|
|
52
|
+
if (context.forceDomql3) {
|
|
53
|
+
for (const key in context.components) {
|
|
54
|
+
if (!key.includes('smbls.') && context.components.hasOwnProperty(key)) {
|
|
55
|
+
context.components[key] = temporaryDomqlHackReverse(
|
|
56
|
+
context.components[key]
|
|
57
|
+
)
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
for (const key in context.pages) {
|
|
61
|
+
if (context.pages.hasOwnProperty(key)) {
|
|
62
|
+
context.pages[key] = temporaryDomqlHackReverse(context.pages[key])
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
50
67
|
return context
|
|
51
68
|
}
|
|
52
69
|
|
|
@@ -55,13 +72,13 @@ export const createDomqlElement = async (app, ctx) => {
|
|
|
55
72
|
if (isNode(app)) {
|
|
56
73
|
app = {}
|
|
57
74
|
ctx.parent = app
|
|
58
|
-
}
|
|
59
|
-
if (isString(app)) {
|
|
75
|
+
} else if (isString(app)) {
|
|
60
76
|
app = {}
|
|
61
77
|
ctx.key = app
|
|
62
|
-
}
|
|
63
|
-
if (!isObject(app)) {
|
|
78
|
+
} else if (!isObject(app)) {
|
|
64
79
|
app = {}
|
|
80
|
+
} else {
|
|
81
|
+
// app = temporaryDomqlHackReverse(app)
|
|
65
82
|
}
|
|
66
83
|
|
|
67
84
|
await prepareContext(app, ctx)
|