arche 0.3.0 → 0.3.1

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.
@@ -16,7 +16,7 @@ jobs:
16
16
 
17
17
  strategy:
18
18
  matrix:
19
- node-version: [10.x, 12.x, 14.x]
19
+ node-version: [14.x, 15.x, 16.x, 17.x, 18.x]
20
20
 
21
21
  steps:
22
22
  - uses: actions/checkout@v2
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  > Arche (/ˈɑːrki/; Ancient Greek: ἀρχή) is a Greek word with primary senses "beginning", "origin" or "source of action" (ἐξ' ἀρχῆς: from the beginning, οr ἐξ' ἀρχῆς λόγος: the original argument), and later "first principle" or "element". ([wikipedia](https://en.wikipedia.org/wiki/Arche))
4
4
 
5
5
  ![Node.js CI](https://github.com/richytong/arche/workflows/Node.js%20CI/badge.svg?branch=master)
6
- [![codecov](https://codecov.io/gh/richytong/arche/branch/master/graph/badge.svg)](https://codecov.io/gh/a-synchronous/rubico)
6
+ [![codecov](https://codecov.io/gh/richytong/arche/branch/master/graph/badge.svg)](https://codecov.io/gh/richytong/arche)
7
7
 
8
8
  HTML as JavaScript.
9
9
 
package/es.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Arche v0.2.0
2
+ * Arche v0.3.1
3
3
  * https://github.com/richytong/arche
4
4
  * (c) 2020-2021 Richard Tong
5
5
  * Arche may be freely distributed under the MIT license.
@@ -223,7 +223,7 @@ const Arche = function (creator, options = {}) {
223
223
  return creatorCreateElement(creator, type, arg0, arg1)
224
224
  }
225
225
  const { css, ...props } = arg0
226
- return creatorCreateElement(creator, styled[type](css), props, arg1)
226
+ return creatorCreateElement(creator, styled[type]([css]), props, arg1)
227
227
  }
228
228
 
229
229
  if (arg1 == null) {
@@ -231,14 +231,14 @@ const Arche = function (creator, options = {}) {
231
231
  return creatorCreateElement(creator, type, arg0, [])
232
232
  }
233
233
  const { css, ...props } = arg0
234
- return creatorCreateElement(creator, styled[type](css), props, [])
234
+ return creatorCreateElement(creator, styled[type]([css]), props, [])
235
235
  }
236
236
 
237
237
  if (arg0.css == null) {
238
238
  return creatorCreateElement(creator, type, arg0, [arg1])
239
239
  }
240
240
  const { css, ...props } = arg0
241
- return creatorCreateElement(creator, styled[type](css), props, [arg1])
241
+ return creatorCreateElement(creator, styled[type]([css]), props, [arg1])
242
242
  }
243
243
 
244
244
  const rootElement = (
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Arche v0.2.0
2
+ * Arche v0.3.1
3
3
  * https://github.com/richytong/arche
4
4
  * (c) 2020-2021 Richard Tong
5
5
  * Arche may be freely distributed under the MIT license.
@@ -229,7 +229,7 @@ const Arche = function (creator, options = {}) {
229
229
  return creatorCreateElement(creator, type, arg0, arg1)
230
230
  }
231
231
  const { css, ...props } = arg0
232
- return creatorCreateElement(creator, styled[type](css), props, arg1)
232
+ return creatorCreateElement(creator, styled[type]([css]), props, arg1)
233
233
  }
234
234
 
235
235
  if (arg1 == null) {
@@ -237,14 +237,14 @@ const Arche = function (creator, options = {}) {
237
237
  return creatorCreateElement(creator, type, arg0, [])
238
238
  }
239
239
  const { css, ...props } = arg0
240
- return creatorCreateElement(creator, styled[type](css), props, [])
240
+ return creatorCreateElement(creator, styled[type]([css]), props, [])
241
241
  }
242
242
 
243
243
  if (arg0.css == null) {
244
244
  return creatorCreateElement(creator, type, arg0, [arg1])
245
245
  }
246
246
  const { css, ...props } = arg0
247
- return creatorCreateElement(creator, styled[type](css), props, [arg1])
247
+ return creatorCreateElement(creator, styled[type]([css]), props, [arg1])
248
248
  }
249
249
 
250
250
  const rootElement = (
package/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Arche v0.2.0
2
+ * Arche v0.3.1
3
3
  * https://github.com/richytong/arche
4
4
  * (c) 2020-2021 Richard Tong
5
5
  * Arche may be freely distributed under the MIT license.
@@ -223,7 +223,7 @@ const Arche = function (creator, options = {}) {
223
223
  return creatorCreateElement(creator, type, arg0, arg1)
224
224
  }
225
225
  const { css, ...props } = arg0
226
- return creatorCreateElement(creator, styled[type](css), props, arg1)
226
+ return creatorCreateElement(creator, styled[type]([css]), props, arg1)
227
227
  }
228
228
 
229
229
  if (arg1 == null) {
@@ -231,14 +231,14 @@ const Arche = function (creator, options = {}) {
231
231
  return creatorCreateElement(creator, type, arg0, [])
232
232
  }
233
233
  const { css, ...props } = arg0
234
- return creatorCreateElement(creator, styled[type](css), props, [])
234
+ return creatorCreateElement(creator, styled[type]([css]), props, [])
235
235
  }
236
236
 
237
237
  if (arg0.css == null) {
238
238
  return creatorCreateElement(creator, type, arg0, [arg1])
239
239
  }
240
240
  const { css, ...props } = arg0
241
- return creatorCreateElement(creator, styled[type](css), props, [arg1])
241
+ return creatorCreateElement(creator, styled[type]([css]), props, [arg1])
242
242
  }
243
243
 
244
244
  const rootElement = (
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arche",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "HTML as JavaScript",
5
5
  "author": "Richard Tong",
6
6
  "license": "MIT",
package/test.js CHANGED
@@ -73,16 +73,16 @@ describe('Arche', () => {
73
73
  },
74
74
  }
75
75
 
76
- const identity = value => value
76
+ const get0 = value => value[0]
77
77
 
78
78
  const styled = {
79
- h1: identity,
80
- h2: identity,
81
- div: identity,
82
- p: identity,
83
- b: identity,
84
- span: identity,
85
- article: identity,
79
+ h1: get0,
80
+ h2: get0,
81
+ div: get0,
82
+ p: get0,
83
+ b: get0,
84
+ span: get0,
85
+ article: get0,
86
86
  }
87
87
 
88
88
  const rootElement = Arche(mockReact, { styled })