native-document 1.0.124 → 1.0.126
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/native-document.components.min.js +75 -45
- package/dist/native-document.dev.js +84 -78
- package/dist/native-document.dev.js.map +1 -1
- package/dist/native-document.min.js +1 -1
- package/package.json +1 -1
- package/src/components/BaseComponent.js +1 -1
- package/src/components/context-menu/ContextMenu.js +1 -1
- package/src/components/menu/Menu.js +5 -0
- package/src/components/menu/MenuDivider.js +1 -1
- package/src/components/menu/MenuItem.js +20 -0
- package/src/core/elements/anchor/anchor-with-sentinel.js +5 -1
- package/src/core/elements/anchor/anchor.js +5 -15
- package/src/core/elements/control/for-each-array.js +6 -9
- package/src/core/wrappers/DocumentObserver.js +13 -6
- package/src/core/wrappers/HtmlElementWrapper.js +5 -1
- package/src/router/RouterComponent.js +4 -0
- package/src/ui/components/button/Button.js +8 -0
- package/src/ui/components/button/button.css +0 -0
- package/src/ui/index.js +0 -0
- package/src/ui/theme.js +5 -0
- package/src/ui/tokens/vars.css +0 -0
|
@@ -57,6 +57,10 @@ export default function HtmlElementWrapper(name, customWrapper = null) {
|
|
|
57
57
|
|
|
58
58
|
return (attr, children) => createElement(attr, children)
|
|
59
59
|
}
|
|
60
|
-
return (
|
|
60
|
+
return (children, name = '') => {
|
|
61
|
+
const anchor = Anchor(name);
|
|
62
|
+
anchor.append(children);
|
|
63
|
+
return anchor;
|
|
64
|
+
};
|
|
61
65
|
};
|
|
62
66
|
|
|
@@ -36,6 +36,7 @@ export function RouterComponent(router, container) {
|
|
|
36
36
|
$lastNodeInserted.remove();
|
|
37
37
|
}
|
|
38
38
|
};
|
|
39
|
+
|
|
39
40
|
const cleanContainer = () => {
|
|
40
41
|
container.nodeValue = '';
|
|
41
42
|
removeLastNodeInserted();
|
|
@@ -61,10 +62,12 @@ export function RouterComponent(router, container) {
|
|
|
61
62
|
if(cachedLayout === $currentLayout) {
|
|
62
63
|
const layoutAnchor = getNodeAnchorForLayout(nodeToInsert, path);
|
|
63
64
|
removeLastNodeInserted();
|
|
65
|
+
$lastNodeInserted = nodeToInsert;
|
|
64
66
|
layoutAnchor.replaceContent(nodeToInsert);
|
|
65
67
|
return;
|
|
66
68
|
}
|
|
67
69
|
cleanContainer();
|
|
70
|
+
$lastNodeInserted = nodeToInsert;
|
|
68
71
|
$currentLayout = cachedLayout;
|
|
69
72
|
const layoutAnchor = getNodeAnchorForLayout(nodeToInsert, path);
|
|
70
73
|
layoutAnchor.replaceContent(nodeToInsert);
|
|
@@ -72,6 +75,7 @@ export function RouterComponent(router, container) {
|
|
|
72
75
|
return;
|
|
73
76
|
}
|
|
74
77
|
cleanContainer();
|
|
78
|
+
$lastNodeInserted = nodeToInsert;
|
|
75
79
|
const anchor = getNodeAnchorForLayout(nodeToInsert, path);
|
|
76
80
|
|
|
77
81
|
$currentLayout = ElementCreator.getChild(layout(anchor));
|
|
File without changes
|
package/src/ui/index.js
ADDED
|
File without changes
|
|
File without changes
|