@epa-wg/custom-element 0.0.17 → 0.0.19

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/index.html CHANGED
@@ -9,7 +9,7 @@
9
9
  @import "demo/demo.css";
10
10
  </style>
11
11
  </head>
12
- <body>
12
+ <body xmlns:xhtml="http://www.w3.org/1999/xhtml">
13
13
  <nav>
14
14
  <h3><code>custom-element</code> demo</h3>
15
15
  <div><a href="https://github.com/EPA-WG/custom-element"
@@ -34,6 +34,7 @@
34
34
  <a href="./demo/hex-grid.html" >hex grid lib </a> |
35
35
  <a href="./demo/scoped-css.html" >scoped CSS </a> |
36
36
  <a href="./demo/parameters.html" >attributes </a> |
37
+ <a href="./demo/data-slices.html" >data slices/events </a> |
37
38
  <a href="./demo/dom-merge.html" >DOM merge on dynamic update </a>
38
39
  </section>
39
40
  </nav>
@@ -95,6 +96,7 @@
95
96
  <dce-4-slot>🥕</dce-4-slot>
96
97
  </template>
97
98
  </html-demo-element>
99
+
98
100
  <html-demo-element legend="2d. default slot"
99
101
  description="slot without `name` attribute use whole payload">
100
102
  <template>
@@ -115,12 +117,12 @@
115
117
  <template>
116
118
  <h3> {title} </h3> <!-- title is an attribute in instance
117
119
  mapped into /*/attributes/title -->
118
- <xsl:if test="//smile"> <!-- data-smile DCE instance attribute,
120
+ <if test="//smile"> <!-- data-smile DCE instance attribute,
119
121
  mapped into /*/dataset/smile
120
122
  used in condition -->
121
123
  <!-- data-smile DCE instance attribute, used as HTML -->
122
124
  <div>Smile as: {//smile}</div> <!-- /datadom/dataset/smile -->
123
- </xsl:if>
125
+ </if>
124
126
  <!-- image would not be visible in sandbox, see live demo -->
125
127
  <img src="https://unpkg.com/pokeapi-sprites@2.0.2/sprites/pokemon/other/dream-world/{pokemon-id}.svg"
126
128
  alt="{title} image"/>
@@ -130,7 +132,7 @@
130
132
 
131
133
  <!-- `slot name=xxx` replaced with elements with `slot=xxx` attribute -->
132
134
  <p><slot name="description"><i>description is not available</i></slot></p>
133
- <xsl:for-each select="//*[@pokemon-id]">
135
+ <for-each select="//*[@pokemon-id]">
134
136
  <!-- loop over payload elements with `pokemon-id` attribute,
135
137
  i.e LI elements -->
136
138
  <button>
@@ -141,7 +143,7 @@
141
143
  {text()} <!-- text from LI element in loop -->
142
144
  </button>
143
145
 
144
- </xsl:for-each>
146
+ </for-each>
145
147
  </template>
146
148
  </custom-element>
147
149
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epa-wg/custom-element",
3
- "version": "0.0.17",
3
+ "version": "0.0.19",
4
4
  "description": "Declarative Custom Element as W3C proposal PoC with native(XSLT) based templating",
5
5
  "browser": "custom-element.js",
6
6
  "module": "custom-element.js",
@@ -46,5 +46,7 @@
46
46
  "type": "patreon",
47
47
  "url": "https://www.patreon.com/sashafirsov"
48
48
  },
49
- "web-types": "./web-types.json"
49
+ "web-types": ["./ide/web-types-dce.json","./ide/web-types-xsl.json"],
50
+ "dependencies": {
51
+ }
50
52
  }
package/request.html CHANGED
@@ -34,9 +34,9 @@
34
34
  src="https://pokeapi.co/api/v2/pokemon?offset={//offset}&limit=10"
35
35
  ></http-request-json>
36
36
  <ol>
37
- <xsl:for-each select="">
37
+ <for-each select="">
38
38
 
39
- </xsl:for-each>
39
+ </for-each>
40
40
  </ol>
41
41
  </custom-element>
42
42
  <poke-list-page>