native-document 1.0.11 → 1.0.12

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/docs/anchor.md CHANGED
@@ -6,9 +6,13 @@ Anchors are a NativeDocument class that enables dynamic DOM manipulation without
6
6
 
7
7
  Anchors are instances of the Anchor class that use two comment nodes as invisible markers:
8
8
 
9
+ `NativeDocumentFragment is Anchor alias`
10
+
9
11
  ```javascript
10
12
  // Create an anchor instance
11
13
  const anchor = new Anchor("My Content");
14
+ // Or
15
+ // const anchor = new NativeDocumentFragment("My Content");
12
16
 
13
17
  // In the DOM, this creates:
14
18
  // <!-- Anchor Start : My Content -->
@@ -177,7 +181,7 @@ fragment.appendChild(Div("Content"));
177
181
  // Gets replaced entirely when appended to parent
178
182
  ```
179
183
 
180
- **Use Anchor** for dynamic content management:
184
+ **Use Anchor (NativeDocumentFragment)** for dynamic content management:
181
185
 
182
186
  ```javascript
183
187
  // Dynamic content area that can be updated multiple times
package/elements.js CHANGED
@@ -1,4 +1,4 @@
1
1
  import Anchor from "./src/elements/anchor";
2
2
  export * from './src/elements/index';
3
3
 
4
- export { Anchor };
4
+ export { Anchor, Anchor as NativeDocumentFragment };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "native-document",
3
- "version": "1.0.11",
3
+ "version": "1.0.12",
4
4
  "main": "index.js",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -10,7 +10,7 @@ const getChildAsNode = (child) => {
10
10
  if(Validator.isElement(child)) {
11
11
  return child;
12
12
  }
13
- return createTextNode(String(child))
13
+ return createTextNode(child)
14
14
  }
15
15
 
16
16
  export default function Anchor(name) {