@blockquote-web-components/blockquote-base-meta 1.0.13 → 1.0.15
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/package.json +4 -3
- package/src/BlockquoteBaseMeta.js +12 -10
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blockquote-web-components/blockquote-base-meta",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.15",
|
|
4
4
|
"description": "Webcomponent blockquote-base-meta following open-wc recommendations",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"lit",
|
|
@@ -135,11 +135,12 @@
|
|
|
135
135
|
"lit": "^2.0.0"
|
|
136
136
|
},
|
|
137
137
|
"devDependencies": {
|
|
138
|
-
"@blockquote-web-components/blockquote-base-common-dev-dependencies": "^1.
|
|
138
|
+
"@blockquote-web-components/blockquote-base-common-dev-dependencies": "^1.4.0",
|
|
139
|
+
"@blockquote-web-components/blockquote-base-embedded-webview": "^1.3.1"
|
|
139
140
|
},
|
|
140
141
|
"publishConfig": {
|
|
141
142
|
"access": "public"
|
|
142
143
|
},
|
|
143
144
|
"customElements": "custom-elements.json",
|
|
144
|
-
"gitHead": "
|
|
145
|
+
"gitHead": "3d63dcd1610b8197f6c731f2d793e850606e2646"
|
|
145
146
|
}
|
|
@@ -9,17 +9,19 @@ part of the polymer project is also subject to an additional IP rights grant
|
|
|
9
9
|
found at http://polymer.github.io/PATENTS.txt
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
const BLOCKQUOTE = Symbol.for('BLOCKQUOTE');
|
|
13
|
+
const blockquoteBaseMeta = Symbol.for('blockquoteBaseMeta');
|
|
14
|
+
const types = Symbol.for('types');
|
|
15
|
+
const uuid = Symbol.for('uuid');
|
|
13
16
|
|
|
14
|
-
window[
|
|
15
|
-
|
|
17
|
+
const blockquote = window[BLOCKQUOTE] || Object.create(null);
|
|
18
|
+
const baseMeta = blockquote[blockquoteBaseMeta] || Object.create(null);
|
|
16
19
|
|
|
17
|
-
|
|
20
|
+
baseMeta[types] = baseMeta[types] || new Map();
|
|
21
|
+
baseMeta[uuid] = baseMeta[uuid] || Math.random().toString(36).substring(2, 10);
|
|
18
22
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
symbolBaseMeta[Symbol.for('uuid')] =
|
|
22
|
-
symbolBaseMeta[Symbol.for('uuid')] || Math.random().toString(36).substr(2, 10);
|
|
23
|
+
blockquote[blockquoteBaseMeta] = baseMeta;
|
|
24
|
+
window[BLOCKQUOTE] = blockquote;
|
|
23
25
|
|
|
24
26
|
// https://www.oreilly.com/library/view/learning-javascript-design/9781449334840/ch13s15.html
|
|
25
27
|
// https://www.keithcirkel.co.uk/metaprogramming-in-es6-symbols/
|
|
@@ -111,11 +113,11 @@ export class BlockquoteBaseMeta {
|
|
|
111
113
|
}
|
|
112
114
|
|
|
113
115
|
static get types() {
|
|
114
|
-
return
|
|
116
|
+
return baseMeta[types];
|
|
115
117
|
}
|
|
116
118
|
|
|
117
119
|
static get uuid() {
|
|
118
|
-
return
|
|
120
|
+
return baseMeta[uuid];
|
|
119
121
|
}
|
|
120
122
|
|
|
121
123
|
/**
|