@webqit/oohtml 2.1.72 → 2.1.74

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.
Files changed (2) hide show
  1. package/README.md +23 -22
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -640,13 +640,14 @@ Here, we get the `binding` attribute for a declarative and neat, key/value data-
640
640
  | :---- | :---- | :---- |
641
641
  | `&` | CSS Property | `<div binding="&color: someColor;"></div>` |
642
642
  | `%` | Class Name | `<div binding="%active: app.isActive;"></div>` |
643
- | `~` | Attribute Name | `<a binding="~href: person.profileUrl + '#bio';"></a>` |
643
+ | `~` | Attribute Name | `<a binding="~href: person.profileUrl+'#bio';"></a>` |
644
+ | | A Toggled Attribute | `<a binding="~required?: formField.required;"></a>` |
644
645
  | `@` | Structural Directive: | *See next table* |
645
646
 
646
647
  | Directive | Meaning | Usage |
647
648
  | :---- | :---- | :---- |
648
- | `@text` | Plain text content | `<span binding="@text: firstName + ' ' + lastName;"></span>` |
649
- | `@html` | Markup content | `<span binding="@html: '<i>' + firstName + '</i>';"></span>` |
649
+ | `@text` | Plain text content | `<span binding="@text: firstName+' '+lastName;"></span>` |
650
+ | `@html` | Markup content | `<span binding="@html: '<i>'+firstName+'</i>';"></span>` |
650
651
  | `@items` | A list, with argument in the following format:<br>`<declaration> <of\|in> <iterable> / <importRef>` | *See next two tables* |
651
652
 
652
653
  <details><summary>About <code>For ... Of</code> Loops</summary>
@@ -654,9 +655,9 @@ Here, we get the `binding` attribute for a declarative and neat, key/value data-
654
655
  | Idea | Usage |
655
656
  | :---- | :---- |
656
657
  | A `for...of` loop over an array/iterable | `<ul binding="@items: value of [1,2,3] / 'foo#fragment';"></ul>` |
657
- | Same as above but with a `key` declaration | `<ul binding="@items: (value, key) of [1,2,3] / 'foo#fragment';"></ul>` |
658
- | Same as above but with different variable names | `<ul binding="@items: (product, id) of store.products / 'foo#fragment';"></ul>` |
659
- | Same as above but with a dynamic `importRef` | `<ul binding="@items: (product, id) of store.products / store.importRef;"></ul>` |
658
+ | Same as above but with a `key` declaration | `<ul binding="@items: (value,key) of [1,2,3] / 'foo#fragment';"></ul>` |
659
+ | Same as above but with different variable names | `<ul binding="@items: (product,id) of store.products / 'foo#fragment';"></ul>` |
660
+ | Same as above but with a dynamic `importRef` | `<ul binding="@items: (product,id) of store.products / store.importRef;"></ul>` |
660
661
 
661
662
  </details>
662
663
 
@@ -664,8 +665,20 @@ Here, we get the `binding` attribute for a declarative and neat, key/value data-
664
665
 
665
666
  | Idea | Usage |
666
667
  | :---- | :---- |
667
- | A `for...in` loop over an object | `<ul binding="@items: key in { a: 1, b: 2 } / 'foo#fragment';"></ul>` |
668
- | Same as above but with a `value` and `index` declaration | `<ul binding="@items: (key, value, index) in { a: 1, b: 2 } / 'foo#fragment';"></ul>` |
668
+ | A `for...in` loop over an object | `<ul binding="@items: key in {a:1,b:2} / 'foo#fragment';"></ul>` |
669
+ | Same as above but with a `value` and `index` declaration | `<ul binding="@items: (key,value,index) in {a:1, b:2} / 'foo#fragment';"></ul>` |
670
+
671
+ </details>
672
+
673
+ <details><summary>All in Realtime</summary>
674
+
675
+ Lists are rendered in realtime, which means that in-place mutations - additions and removals - on the *iteratee* will be automatically reflected on the UI!
676
+
677
+ </details>
678
+
679
+ <details><summary>With SSR Support</summary>
680
+
681
+ Generated item elements are automatically assigned a corresponding index with a `data-index` attribute! This helps in remapping generated item nodes to their respective entry in *iteratee* - universally.
669
682
 
670
683
  </details>
671
684
 
@@ -676,27 +689,15 @@ Here, we get the `binding` attribute for a declarative and neat, key/value data-
676
689
 
677
690
  <!-- The "items" template -->
678
691
  <template def="item" scoped>
679
- <li binding="@text: index + ': ' + name;"></li>
692
+ <li><a binding="~href: '/animals#'+name;"><?{ index+': '+name }?></a></li>
680
693
  </template>
681
694
 
682
695
  <!-- The loop -->
683
- <ul binding="@items: (name, index) of ['dog','cat','ram'] / 'item';"></ul>
696
+ <ul binding="@items: (name,index) of ['dog','cat','ram'] / 'item';"></ul>
684
697
 
685
698
  </section>
686
699
  ```
687
700
 
688
- <details><summary>All in Realtime</summary>
689
-
690
- Lists are rendered in realtime, which means that in-place mutations - additions and removals - on the *iteratee* will be automatically reflected on the UI!
691
-
692
- </details>
693
-
694
- <details><summary>With SSR Support</summary>
695
-
696
- Generated item elements are automatically assigned a corresponding index with a `data-index` attribute! This helps in remapping generated item nodes to their respective entry in *iteratee* - universally.
697
-
698
- </details>
699
-
700
701
  ## Data Plumbing
701
702
 
702
703
  *[TODO]: The Context API and Bindings API*
package/package.json CHANGED
@@ -14,7 +14,7 @@
14
14
  "wicg-proposal"
15
15
  ],
16
16
  "homepage": "https://webqit.io/tooling/oohtml",
17
- "version": "2.1.72",
17
+ "version": "2.1.74",
18
18
  "license": "MIT",
19
19
  "repository": {
20
20
  "type": "git",