@plumeria/utils 18.1.9 → 18.2.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.
- package/dist/parser.js +3 -2
- package/package.json +1 -1
package/dist/parser.js
CHANGED
|
@@ -52,9 +52,10 @@ const zss_engine_1 = require("zss-engine");
|
|
|
52
52
|
const viewTransition_1 = require("./viewTransition");
|
|
53
53
|
const create_1 = require("./create");
|
|
54
54
|
const resolver_1 = require("./resolver");
|
|
55
|
+
const toIdent = (value) => value.replace(/[^A-Za-z0-9-]/g, '');
|
|
55
56
|
const getMarkerVar = (id, pseudo) => {
|
|
56
|
-
const
|
|
57
|
-
return `--${id}-${
|
|
57
|
+
const hash = (0, zss_engine_1.genBase36Hash)({ [id]: pseudo }, 1, 8);
|
|
58
|
+
return `--${hash}-${toIdent(id)}-${toIdent(pseudo.split('(')[0])}`;
|
|
58
59
|
};
|
|
59
60
|
const getRootIdentifier = (node) => {
|
|
60
61
|
if (exports.t.isIdentifier(node)) {
|