hypel 0.2.2 → 0.2.4

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/hypel.js +9 -5
  2. package/package.json +7 -7
package/hypel.js CHANGED
@@ -85,12 +85,16 @@ const hypelsvg = h => {
85
85
  // div.properties.id; // hello
86
86
  const encodeid = idstr => idstr.replace(nsSepPlainRe, ':')
87
87
  const decodeid = idstr => idstr.replace(nsSepEncodeRe, '/')
88
- const getoptsclassidstr = (opts, classidstr) => (
89
- encodeid(classidstr.replace(nsKeyRe, m => (
88
+ const tryprefix = (opts, classstr, prop) => (
89
+ prop = opts[prop + 'prefix'],
90
+ prop && prop !== classstr ? prop + '.' + classstr : classstr)
91
+ const getoptsclassidstr = (opts, classidstr, s) => (
92
+ s = encodeid(classidstr.replace(nsKeyRe, m => (
90
93
  m = m.slice(1),
91
- m = m in opts ? String(opts[m]) : m,
92
- m
93
- ))))
94
+ // classidstr.charCodeAt(offset + m.length + 1) === charCodeHyphen
95
+ tryprefix(opts, m in opts ? String(opts[m]) : m, m)
96
+ ))),
97
+ s)
94
98
 
95
99
  const buildoptfns = helperfns => helperfns.TAG_NAMES.reduce((hhh, cur) => (
96
100
  hhh[cur] = (...args) => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "hypel",
3
3
  "type": "module",
4
- "version": "0.2.2",
4
+ "version": "0.2.4",
5
5
  "license": "MIT",
6
6
  "readmeFilename": "README.md",
7
7
  "description": "Terse syntax for hyperscript",
@@ -26,14 +26,14 @@
26
26
  "dynamic class"
27
27
  ],
28
28
  "devDependencies": {
29
- "inferno-hyperscript": "8.2.2",
30
- "inferno-server": "8.2.2",
29
+ "inferno-hyperscript": "9.0.3",
30
+ "inferno-server": "9.0.3",
31
31
  "html-tag-names": "^2.1.0",
32
32
  "hyperscript": "^2.0.2",
33
- "snabbdom": "3.5.1",
34
- "eslint": "^8.51.0",
35
- "jsdom": "^22.1.0",
36
- "react": "^18.2.0"
33
+ "snabbdom": "3.6.2",
34
+ "eslint": "^9.32.0",
35
+ "jsdom": "^26.1.0",
36
+ "react": "^19.1.1"
37
37
  },
38
38
  "scripts" : {
39
39
  "lint": "eslint .",