@symbo.ls/create 2.11.511 → 2.11.514
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 +2 -1
- package/dist/cjs/prepare.js +0 -20
- package/dist/esm/createDomql.js +2 -2
- package/dist/esm/prepare.js +0 -20
- package/package.json +8 -7
- package/src/createDomql.js +2 -2
- package/src/prepare.js +0 -24
package/dist/cjs/createDomql.js
CHANGED
|
@@ -35,6 +35,7 @@ module.exports = __toCommonJS(createDomql_exports);
|
|
|
35
35
|
var import_domql = __toESM(require("domql"), 1);
|
|
36
36
|
var uikit = __toESM(require("@symbo.ls/uikit"), 1);
|
|
37
37
|
var import_utils = require("@domql/utils");
|
|
38
|
+
var import_event = require("@domql/event");
|
|
38
39
|
var import_define = require("./define");
|
|
39
40
|
var import_router = require("./router");
|
|
40
41
|
var import_syncExtend = require("./syncExtend");
|
|
@@ -78,7 +79,7 @@ const createDomqlElement = async (app, ctx) => {
|
|
|
78
79
|
app.state = ctx.state;
|
|
79
80
|
app.context = ctx;
|
|
80
81
|
app.data = app.data || {};
|
|
81
|
-
app.data.frameListeners = (0,
|
|
82
|
+
app.data.frameListeners = (0, import_event.initAnimationFrame)(ctx);
|
|
82
83
|
(0, import_prepare.prepareRequire)({
|
|
83
84
|
functions: ctx.functions,
|
|
84
85
|
utils: ctx.utils,
|
package/dist/cjs/prepare.js
CHANGED
|
@@ -29,7 +29,6 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
29
29
|
var prepare_exports = {};
|
|
30
30
|
__export(prepare_exports, {
|
|
31
31
|
UIkitWithPrefix: () => UIkitWithPrefix,
|
|
32
|
-
initAnimationFrame: () => initAnimationFrame,
|
|
33
32
|
prepareComponents: () => prepareComponents,
|
|
34
33
|
prepareDependencies: () => prepareDependencies,
|
|
35
34
|
prepareDesignSystem: () => prepareDesignSystem,
|
|
@@ -188,22 +187,3 @@ const preparePages = (app, context) => {
|
|
|
188
187
|
return pages2;
|
|
189
188
|
}, pages);
|
|
190
189
|
};
|
|
191
|
-
const initAnimationFrame = () => {
|
|
192
|
-
const frameListeners = /* @__PURE__ */ new Set();
|
|
193
|
-
function requestFrame() {
|
|
194
|
-
for (const element of frameListeners) {
|
|
195
|
-
if (!document.body.contains(element.node)) {
|
|
196
|
-
frameListeners.delete(element);
|
|
197
|
-
} else {
|
|
198
|
-
try {
|
|
199
|
-
(element.on.frame || element.props.onFrame)(element, element.state, element.context);
|
|
200
|
-
} catch (e) {
|
|
201
|
-
console.warn(e);
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
window.requestAnimationFrame(requestFrame);
|
|
206
|
-
}
|
|
207
|
-
requestFrame();
|
|
208
|
-
return frameListeners;
|
|
209
|
-
};
|
package/dist/esm/createDomql.js
CHANGED
|
@@ -17,11 +17,11 @@ var __spreadValues = (a, b) => {
|
|
|
17
17
|
import DOM from "domql";
|
|
18
18
|
import * as uikit from "@symbo.ls/uikit";
|
|
19
19
|
import { isString, isNode, isObject } from "@domql/utils";
|
|
20
|
+
import { initAnimationFrame } from "@domql/event";
|
|
20
21
|
import { defaultDefine } from "./define";
|
|
21
22
|
import { initRouter } from "./router";
|
|
22
23
|
import { initializeExtend, initializeInspect, initializeNotifications, initializeSync } from "./syncExtend";
|
|
23
24
|
import {
|
|
24
|
-
initAnimationFrame,
|
|
25
25
|
prepareComponents,
|
|
26
26
|
prepareDependencies,
|
|
27
27
|
prepareDesignSystem,
|
|
@@ -71,7 +71,7 @@ const createDomqlElement = async (app, ctx) => {
|
|
|
71
71
|
app.state = ctx.state;
|
|
72
72
|
app.context = ctx;
|
|
73
73
|
app.data = app.data || {};
|
|
74
|
-
app.data.frameListeners = initAnimationFrame();
|
|
74
|
+
app.data.frameListeners = initAnimationFrame(ctx);
|
|
75
75
|
prepareRequire(__spreadValues({
|
|
76
76
|
functions: ctx.functions,
|
|
77
77
|
utils: ctx.utils,
|
package/dist/esm/prepare.js
CHANGED
|
@@ -169,28 +169,8 @@ const preparePages = (app, context) => {
|
|
|
169
169
|
return pages2;
|
|
170
170
|
}, pages);
|
|
171
171
|
};
|
|
172
|
-
const initAnimationFrame = () => {
|
|
173
|
-
const frameListeners = /* @__PURE__ */ new Set();
|
|
174
|
-
function requestFrame() {
|
|
175
|
-
for (const element of frameListeners) {
|
|
176
|
-
if (!document.body.contains(element.node)) {
|
|
177
|
-
frameListeners.delete(element);
|
|
178
|
-
} else {
|
|
179
|
-
try {
|
|
180
|
-
(element.on.frame || element.props.onFrame)(element, element.state, element.context);
|
|
181
|
-
} catch (e) {
|
|
182
|
-
console.warn(e);
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
window.requestAnimationFrame(requestFrame);
|
|
187
|
-
}
|
|
188
|
-
requestFrame();
|
|
189
|
-
return frameListeners;
|
|
190
|
-
};
|
|
191
172
|
export {
|
|
192
173
|
UIkitWithPrefix,
|
|
193
|
-
initAnimationFrame,
|
|
194
174
|
prepareComponents,
|
|
195
175
|
prepareDependencies,
|
|
196
176
|
prepareDesignSystem,
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@symbo.ls/create",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.514",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"gitHead": "
|
|
5
|
+
"gitHead": "7744e475b747954ee8f0a8968651ff0eae11127a",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"module": "src/index.js",
|
|
8
8
|
"main": "src/index.js",
|
|
@@ -30,14 +30,15 @@
|
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@domql/emotion": "^2.5.0",
|
|
33
|
+
"@domql/event": "^2.5.0",
|
|
33
34
|
"@domql/report": "^2.5.0",
|
|
34
35
|
"@domql/router": "^2.5.0",
|
|
35
36
|
"@symbo.ls/fetch": "^2.11.511",
|
|
36
|
-
"@symbo.ls/init": "^2.11.
|
|
37
|
-
"@symbo.ls/scratch": "^2.11.
|
|
38
|
-
"@symbo.ls/sync": "^2.11.
|
|
39
|
-
"@symbo.ls/uikit": "^2.11.
|
|
40
|
-
"@symbo.ls/utils": "^2.11.
|
|
37
|
+
"@symbo.ls/init": "^2.11.514",
|
|
38
|
+
"@symbo.ls/scratch": "^2.11.514",
|
|
39
|
+
"@symbo.ls/sync": "^2.11.514",
|
|
40
|
+
"@symbo.ls/uikit": "^2.11.514",
|
|
41
|
+
"@symbo.ls/utils": "^2.11.512",
|
|
41
42
|
"domql": "^2.5.158"
|
|
42
43
|
},
|
|
43
44
|
"devDependencies": {
|
package/src/createDomql.js
CHANGED
|
@@ -4,12 +4,12 @@ import DOM from 'domql'
|
|
|
4
4
|
import * as uikit from '@symbo.ls/uikit'
|
|
5
5
|
|
|
6
6
|
import { isString, isNode, isObject } from '@domql/utils'
|
|
7
|
+
import { initAnimationFrame } from '@domql/event'
|
|
7
8
|
import { defaultDefine } from './define'
|
|
8
9
|
import { initRouter } from './router'
|
|
9
10
|
import { initializeExtend, initializeInspect, initializeNotifications, initializeSync } from './syncExtend'
|
|
10
11
|
|
|
11
12
|
import {
|
|
12
|
-
initAnimationFrame,
|
|
13
13
|
prepareComponents,
|
|
14
14
|
prepareDependencies,
|
|
15
15
|
prepareDesignSystem,
|
|
@@ -63,7 +63,7 @@ export const createDomqlElement = async (app, ctx) => {
|
|
|
63
63
|
app.state = ctx.state
|
|
64
64
|
app.context = ctx
|
|
65
65
|
app.data = app.data || {}
|
|
66
|
-
app.data.frameListeners = initAnimationFrame()
|
|
66
|
+
app.data.frameListeners = initAnimationFrame(ctx)
|
|
67
67
|
|
|
68
68
|
prepareRequire({
|
|
69
69
|
functions: ctx.functions,
|
package/src/prepare.js
CHANGED
|
@@ -171,27 +171,3 @@ export const preparePages = (app, context) => {
|
|
|
171
171
|
return pages
|
|
172
172
|
}, pages)
|
|
173
173
|
}
|
|
174
|
-
|
|
175
|
-
export const initAnimationFrame = () => {
|
|
176
|
-
const frameListeners = new Set()
|
|
177
|
-
|
|
178
|
-
function requestFrame () {
|
|
179
|
-
// Iterate over frameListeners
|
|
180
|
-
for (const element of frameListeners) {
|
|
181
|
-
if (!document.body.contains(element.node)) {
|
|
182
|
-
frameListeners.delete(element) // Remove if node has no parent
|
|
183
|
-
} else {
|
|
184
|
-
try {
|
|
185
|
-
(element.on.frame || element.props.onFrame)(element, element.state, element.context)
|
|
186
|
-
} catch (e) {
|
|
187
|
-
console.warn(e)
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
window.requestAnimationFrame(requestFrame)
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
requestFrame()
|
|
195
|
-
|
|
196
|
-
return frameListeners
|
|
197
|
-
}
|