@unsetsoft/ryunixjs 0.4.13-nightly.4 → 0.4.13-nightly.41
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/Ryunix.js +17 -1
- package/dist/cj/Ryunix.js +702 -0
- package/package.json +21 -7
- package/src/lib/commits.ts +69 -0
- package/src/lib/components.ts +33 -0
- package/src/lib/createElement.ts +61 -0
- package/src/lib/dom.js +12 -1
- package/src/lib/dom.ts +85 -0
- package/src/lib/effects.ts +55 -0
- package/src/lib/hooks.ts +80 -0
- package/src/lib/index.ts +23 -0
- package/src/lib/navigation.ts +74 -0
- package/src/lib/reconciler.ts +62 -0
- package/src/lib/render.ts +33 -0
- package/src/lib/workers.ts +60 -0
- package/src/main.ts +12 -0
- package/src/utils/index.js +7 -2
- package/src/utils/index.ts +32 -0
package/dist/Ryunix.js
CHANGED
|
@@ -24,9 +24,14 @@
|
|
|
24
24
|
const STRINGS = Object.freeze({
|
|
25
25
|
object: 'object',
|
|
26
26
|
function: 'function',
|
|
27
|
+
style: 'ryunix-style',
|
|
28
|
+
className: 'ryunix-class',
|
|
29
|
+
children: 'children',
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
const OLD_STRINGS = Object.freeze({
|
|
27
33
|
style: 'style',
|
|
28
34
|
className: 'className',
|
|
29
|
-
children: 'children',
|
|
30
35
|
});
|
|
31
36
|
|
|
32
37
|
const EFFECT_TAGS = Object.freeze({
|
|
@@ -394,11 +399,22 @@
|
|
|
394
399
|
.filter(isNew(prevProps, nextProps))
|
|
395
400
|
.forEach((name) => {
|
|
396
401
|
if (name === STRINGS.style) {
|
|
402
|
+
DomStyle(dom, nextProps['ryunix-style']);
|
|
403
|
+
} else if (name === OLD_STRINGS.style) {
|
|
397
404
|
DomStyle(dom, nextProps.style);
|
|
398
405
|
} else if (name === STRINGS.className) {
|
|
406
|
+
if (nextProps['ryunix-class'] === '') {
|
|
407
|
+
throw new Error('data-class cannot be empty.')
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
prevProps['ryunix-class'] &&
|
|
411
|
+
dom.classList.remove(...prevProps['ryunix-class'].split(/\s+/));
|
|
412
|
+
dom.classList.add(...nextProps['ryunix-class'].split(/\s+/));
|
|
413
|
+
} else if (name === OLD_STRINGS.className) {
|
|
399
414
|
if (nextProps.className === '') {
|
|
400
415
|
throw new Error('className cannot be empty.')
|
|
401
416
|
}
|
|
417
|
+
|
|
402
418
|
prevProps.className &&
|
|
403
419
|
dom.classList.remove(...prevProps.className.split(/\s+/));
|
|
404
420
|
dom.classList.add(...nextProps.className.split(/\s+/));
|