@canonical/react-ssr 0.17.1 → 0.21.0
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { toCamelCase } from "@canonical/utils";
|
|
2
2
|
import { NodeWithChildren } from "domhandler";
|
|
3
3
|
import { parseDocument } from "htmlparser2";
|
|
4
4
|
import React from "react";
|
|
@@ -64,7 +64,7 @@ class Extractor {
|
|
|
64
64
|
*/
|
|
65
65
|
convertKeyToReactKey(key) {
|
|
66
66
|
const reactKey = REACT_KEYS_DICTIONARY[key.toLowerCase()];
|
|
67
|
-
return reactKey ? reactKey :
|
|
67
|
+
return reactKey ? reactKey : toCamelCase(key);
|
|
68
68
|
}
|
|
69
69
|
/**
|
|
70
70
|
* Converts a parsed {@link domhandler#Element | DOM Element} into a {@link react#React.ReactElement | ReactElement}.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Extractor.js","sourceRoot":"","sources":["../../../src/renderer/Extractor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"Extractor.js","sourceRoot":"","sources":["../../../src/renderer/Extractor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAA+B,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC3E,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,qBAAqB,GAA0C;IACnE,KAAK,EAAE,WAAW;IAClB,GAAG,EAAE,SAAS;IACd,WAAW,EAAE,aAAa;IAC1B,OAAO,EAAE,SAAS;CACnB,CAAC;AAEF;;;;;;;;;GASG;AACH,MAAM,SAAS;IACb;;OAEG;IACgB,QAAQ,CAAW;IAEtC;;OAEG;IACH,YAAY,IAAY;QACtB,IAAI,CAAC,QA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,wEAAwE;QACxE,OAAO,iBAAiB,CAAC,OAAO,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,qBAAqB,EAAE,IAAI,CAAC,CAAC;IAC3E,CAAC;CACF;AAED,eAAe,SAAS,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@canonical/react-ssr",
|
|
3
3
|
"description": "TBD",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.21.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
7
7
|
"types": "dist/types/index.d.ts",
|
|
@@ -17,13 +17,13 @@
|
|
|
17
17
|
},
|
|
18
18
|
"repository": {
|
|
19
19
|
"type": "git",
|
|
20
|
-
"url": "https://github.com/canonical/
|
|
20
|
+
"url": "https://github.com/canonical/pragma"
|
|
21
21
|
},
|
|
22
22
|
"license": "LGPL-3.0",
|
|
23
23
|
"bugs": {
|
|
24
|
-
"url": "https://github.com/canonical/
|
|
24
|
+
"url": "https://github.com/canonical/pragma/issues"
|
|
25
25
|
},
|
|
26
|
-
"homepage": "https://github.com/canonical/
|
|
26
|
+
"homepage": "https://github.com/canonical/pragma#readme",
|
|
27
27
|
"scripts": {
|
|
28
28
|
"build": "tsc -p tsconfig.build.json",
|
|
29
29
|
"build:all": "tsc -p tsconfig.build.json",
|
|
@@ -54,23 +54,23 @@
|
|
|
54
54
|
}
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
|
-
"@biomejs/biome": "2.4.
|
|
58
|
-
"@canonical/biome-config": "^0.
|
|
59
|
-
"@canonical/typescript-config-react": "^0.
|
|
60
|
-
"@canonical/webarchitect": "^0.
|
|
57
|
+
"@biomejs/biome": "2.4.9",
|
|
58
|
+
"@canonical/biome-config": "^0.21.0",
|
|
59
|
+
"@canonical/typescript-config-react": "^0.21.0",
|
|
60
|
+
"@canonical/webarchitect": "^0.21.0",
|
|
61
61
|
"@types/express": "^5.0.6",
|
|
62
|
-
"@types/node": "^24.
|
|
63
|
-
"@types/react": "^19.2.
|
|
62
|
+
"@types/node": "^24.12.0",
|
|
63
|
+
"@types/react": "^19.2.14",
|
|
64
64
|
"@types/react-dom": "^19.2.3",
|
|
65
65
|
"typescript": "^5.9.3"
|
|
66
66
|
},
|
|
67
67
|
"dependencies": {
|
|
68
|
-
"@canonical/utils": "^0.
|
|
69
|
-
"domhandler": "^
|
|
68
|
+
"@canonical/utils": "^0.21.0",
|
|
69
|
+
"domhandler": "^6.0.0",
|
|
70
70
|
"express": "^5.2.1",
|
|
71
71
|
"htmlparser2": "^10.1.0",
|
|
72
72
|
"react": "^19.2.4",
|
|
73
73
|
"react-dom": "^19.2.4"
|
|
74
74
|
},
|
|
75
|
-
"gitHead": "
|
|
75
|
+
"gitHead": "4a39c954e7bbad4903397f8371f801982034a26d"
|
|
76
76
|
}
|