proto-sudoku-wc 0.0.480 → 0.0.482
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/cjs/{index-02cc516d.js → index-0f8ed4ca.js} +160 -142
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/proto-sudoku-wc.cjs.js +2 -2
- package/dist/cjs/proto-sudoku.cjs.entry.js +1767 -848
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/esm/{index-f468fcee.js → index-aa4026b4.js} +160 -142
- package/dist/esm/loader.js +2 -2
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/esm/proto-sudoku-wc.js +2 -2
- package/dist/esm/proto-sudoku.entry.js +1767 -848
- package/dist/proto-sudoku-wc/p-5fac1fa8.entry.js +1 -0
- package/dist/proto-sudoku-wc/p-68909a5a.js +2 -0
- package/dist/proto-sudoku-wc/proto-sudoku-wc.esm.js +1 -1
- package/dist/types/stencil-public-runtime.d.ts +15 -4
- package/package.json +3 -3
- package/dist/proto-sudoku-wc/p-3561d2f7.js +0 -2
- package/dist/proto-sudoku-wc/p-e3accc5e.entry.js +0 -1
@@ -22,33 +22,19 @@ function _interopNamespace(e) {
|
|
22
22
|
|
23
23
|
const NAMESPACE = 'proto-sudoku-wc';
|
24
24
|
|
25
|
+
/**
|
26
|
+
* Virtual DOM patching algorithm based on Snabbdom by
|
27
|
+
* Simon Friis Vindum (@paldepind)
|
28
|
+
* Licensed under the MIT License
|
29
|
+
* https://github.com/snabbdom/snabbdom/blob/master/LICENSE
|
30
|
+
*
|
31
|
+
* Modified for Stencil's renderer and slot projection
|
32
|
+
*/
|
25
33
|
let scopeId;
|
26
34
|
let hostTagName;
|
27
35
|
let isSvgMode = false;
|
28
36
|
let renderingRef = null;
|
29
37
|
let queuePending = false;
|
30
|
-
const win = typeof window !== 'undefined' ? window : {};
|
31
|
-
const doc = win.document || { head: {} };
|
32
|
-
const plt = {
|
33
|
-
$flags$: 0,
|
34
|
-
$resourcesUrl$: '',
|
35
|
-
jmp: (h) => h(),
|
36
|
-
raf: (h) => requestAnimationFrame(h),
|
37
|
-
ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
|
38
|
-
rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
|
39
|
-
ce: (eventName, opts) => new CustomEvent(eventName, opts),
|
40
|
-
};
|
41
|
-
const promiseResolve = (v) => Promise.resolve(v);
|
42
|
-
const supportsConstructableStylesheets = /*@__PURE__*/ (() => {
|
43
|
-
try {
|
44
|
-
new CSSStyleSheet();
|
45
|
-
return typeof new CSSStyleSheet().replaceSync === 'function';
|
46
|
-
}
|
47
|
-
catch (e) { }
|
48
|
-
return false;
|
49
|
-
})()
|
50
|
-
;
|
51
|
-
const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
|
52
38
|
const createTime = (fnName, tagName = '') => {
|
53
39
|
{
|
54
40
|
return () => {
|
@@ -63,76 +49,7 @@ const uniqueTime = (key, measureText) => {
|
|
63
49
|
};
|
64
50
|
}
|
65
51
|
};
|
66
|
-
const
|
67
|
-
const registerStyle = (scopeId, cssText, allowCS) => {
|
68
|
-
let style = styles.get(scopeId);
|
69
|
-
if (supportsConstructableStylesheets && allowCS) {
|
70
|
-
style = (style || new CSSStyleSheet());
|
71
|
-
if (typeof style === 'string') {
|
72
|
-
style = cssText;
|
73
|
-
}
|
74
|
-
else {
|
75
|
-
style.replaceSync(cssText);
|
76
|
-
}
|
77
|
-
}
|
78
|
-
else {
|
79
|
-
style = cssText;
|
80
|
-
}
|
81
|
-
styles.set(scopeId, style);
|
82
|
-
};
|
83
|
-
const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
|
84
|
-
let scopeId = getScopeId(cmpMeta);
|
85
|
-
const style = styles.get(scopeId);
|
86
|
-
// if an element is NOT connected then getRootNode() will return the wrong root node
|
87
|
-
// so the fallback is to always use the document for the root node in those cases
|
88
|
-
styleContainerNode = styleContainerNode.nodeType === 11 /* NODE_TYPE.DocumentFragment */ ? styleContainerNode : doc;
|
89
|
-
if (style) {
|
90
|
-
if (typeof style === 'string') {
|
91
|
-
styleContainerNode = styleContainerNode.head || styleContainerNode;
|
92
|
-
let appliedStyles = rootAppliedStyles.get(styleContainerNode);
|
93
|
-
let styleElm;
|
94
|
-
if (!appliedStyles) {
|
95
|
-
rootAppliedStyles.set(styleContainerNode, (appliedStyles = new Set()));
|
96
|
-
}
|
97
|
-
if (!appliedStyles.has(scopeId)) {
|
98
|
-
{
|
99
|
-
{
|
100
|
-
styleElm = doc.createElement('style');
|
101
|
-
styleElm.innerHTML = style;
|
102
|
-
}
|
103
|
-
styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
|
104
|
-
}
|
105
|
-
if (appliedStyles) {
|
106
|
-
appliedStyles.add(scopeId);
|
107
|
-
}
|
108
|
-
}
|
109
|
-
}
|
110
|
-
else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
|
111
|
-
styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
|
112
|
-
}
|
113
|
-
}
|
114
|
-
return scopeId;
|
115
|
-
};
|
116
|
-
const attachStyles = (hostRef) => {
|
117
|
-
const cmpMeta = hostRef.$cmpMeta$;
|
118
|
-
const elm = hostRef.$hostElement$;
|
119
|
-
const flags = cmpMeta.$flags$;
|
120
|
-
const endAttachStyles = createTime('attachStyles', cmpMeta.$tagName$);
|
121
|
-
const scopeId = addStyle(elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(), cmpMeta);
|
122
|
-
if (flags & 10 /* CMP_FLAGS.needsScopedEncapsulation */) {
|
123
|
-
// only required when we're NOT using native shadow dom (slot)
|
124
|
-
// or this browser doesn't support native shadow dom
|
125
|
-
// and this host element was NOT created with SSR
|
126
|
-
// let's pick out the inner content for slot projection
|
127
|
-
// create a node to represent where the original
|
128
|
-
// content was first placed, which is useful later on
|
129
|
-
// DOM WRITE!!
|
130
|
-
elm['s-sc'] = scopeId;
|
131
|
-
elm.classList.add(scopeId + '-h');
|
132
|
-
}
|
133
|
-
endAttachStyles();
|
134
|
-
};
|
135
|
-
const getScopeId = (cmp, mode) => 'sc-' + (cmp.$tagName$);
|
52
|
+
const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
|
136
53
|
/**
|
137
54
|
* Default style mode id
|
138
55
|
*/
|
@@ -260,6 +177,126 @@ const convertToPrivate = (node) => {
|
|
260
177
|
vnode.$name$ = node.vname;
|
261
178
|
return vnode;
|
262
179
|
};
|
180
|
+
/**
|
181
|
+
* Parse a new property value for a given property type.
|
182
|
+
*
|
183
|
+
* While the prop value can reasonably be expected to be of `any` type as far as TypeScript's type checker is concerned,
|
184
|
+
* it is not safe to assume that the string returned by evaluating `typeof propValue` matches:
|
185
|
+
* 1. `any`, the type given to `propValue` in the function signature
|
186
|
+
* 2. the type stored from `propType`.
|
187
|
+
*
|
188
|
+
* This function provides the capability to parse/coerce a property's value to potentially any other JavaScript type.
|
189
|
+
*
|
190
|
+
* Property values represented in TSX preserve their type information. In the example below, the number 0 is passed to
|
191
|
+
* a component. This `propValue` will preserve its type information (`typeof propValue === 'number'`). Note that is
|
192
|
+
* based on the type of the value being passed in, not the type declared of the class member decorated with `@Prop`.
|
193
|
+
* ```tsx
|
194
|
+
* <my-cmp prop-val={0}></my-cmp>
|
195
|
+
* ```
|
196
|
+
*
|
197
|
+
* HTML prop values on the other hand, will always a string
|
198
|
+
*
|
199
|
+
* @param propValue the new value to coerce to some type
|
200
|
+
* @param propType the type of the prop, expressed as a binary number
|
201
|
+
* @returns the parsed/coerced value
|
202
|
+
*/
|
203
|
+
const parsePropertyValue = (propValue, propType) => {
|
204
|
+
// ensure this value is of the correct prop type
|
205
|
+
if (propValue != null && !isComplexType(propValue)) {
|
206
|
+
if (propType & 1 /* MEMBER_FLAGS.String */) {
|
207
|
+
// could have been passed as a number or boolean
|
208
|
+
// but we still want it as a string
|
209
|
+
return String(propValue);
|
210
|
+
}
|
211
|
+
// redundant return here for better minification
|
212
|
+
return propValue;
|
213
|
+
}
|
214
|
+
// not sure exactly what type we want
|
215
|
+
// so no need to change to a different type
|
216
|
+
return propValue;
|
217
|
+
};
|
218
|
+
/**
|
219
|
+
* Helper function to create & dispatch a custom Event on a provided target
|
220
|
+
* @param elm the target of the Event
|
221
|
+
* @param name the name to give the custom Event
|
222
|
+
* @param opts options for configuring a custom Event
|
223
|
+
* @returns the custom Event
|
224
|
+
*/
|
225
|
+
const emitEvent = (elm, name, opts) => {
|
226
|
+
const ev = plt.ce(name, opts);
|
227
|
+
elm.dispatchEvent(ev);
|
228
|
+
return ev;
|
229
|
+
};
|
230
|
+
const rootAppliedStyles = /*@__PURE__*/ new WeakMap();
|
231
|
+
const registerStyle = (scopeId, cssText, allowCS) => {
|
232
|
+
let style = styles.get(scopeId);
|
233
|
+
if (supportsConstructableStylesheets && allowCS) {
|
234
|
+
style = (style || new CSSStyleSheet());
|
235
|
+
if (typeof style === 'string') {
|
236
|
+
style = cssText;
|
237
|
+
}
|
238
|
+
else {
|
239
|
+
style.replaceSync(cssText);
|
240
|
+
}
|
241
|
+
}
|
242
|
+
else {
|
243
|
+
style = cssText;
|
244
|
+
}
|
245
|
+
styles.set(scopeId, style);
|
246
|
+
};
|
247
|
+
const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
|
248
|
+
let scopeId = getScopeId(cmpMeta);
|
249
|
+
const style = styles.get(scopeId);
|
250
|
+
// if an element is NOT connected then getRootNode() will return the wrong root node
|
251
|
+
// so the fallback is to always use the document for the root node in those cases
|
252
|
+
styleContainerNode = styleContainerNode.nodeType === 11 /* NODE_TYPE.DocumentFragment */ ? styleContainerNode : doc;
|
253
|
+
if (style) {
|
254
|
+
if (typeof style === 'string') {
|
255
|
+
styleContainerNode = styleContainerNode.head || styleContainerNode;
|
256
|
+
let appliedStyles = rootAppliedStyles.get(styleContainerNode);
|
257
|
+
let styleElm;
|
258
|
+
if (!appliedStyles) {
|
259
|
+
rootAppliedStyles.set(styleContainerNode, (appliedStyles = new Set()));
|
260
|
+
}
|
261
|
+
if (!appliedStyles.has(scopeId)) {
|
262
|
+
{
|
263
|
+
{
|
264
|
+
styleElm = doc.createElement('style');
|
265
|
+
styleElm.innerHTML = style;
|
266
|
+
}
|
267
|
+
styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
|
268
|
+
}
|
269
|
+
if (appliedStyles) {
|
270
|
+
appliedStyles.add(scopeId);
|
271
|
+
}
|
272
|
+
}
|
273
|
+
}
|
274
|
+
else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
|
275
|
+
styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
|
276
|
+
}
|
277
|
+
}
|
278
|
+
return scopeId;
|
279
|
+
};
|
280
|
+
const attachStyles = (hostRef) => {
|
281
|
+
const cmpMeta = hostRef.$cmpMeta$;
|
282
|
+
const elm = hostRef.$hostElement$;
|
283
|
+
const flags = cmpMeta.$flags$;
|
284
|
+
const endAttachStyles = createTime('attachStyles', cmpMeta.$tagName$);
|
285
|
+
const scopeId = addStyle(elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(), cmpMeta);
|
286
|
+
if (flags & 10 /* CMP_FLAGS.needsScopedEncapsulation */) {
|
287
|
+
// only required when we're NOT using native shadow dom (slot)
|
288
|
+
// or this browser doesn't support native shadow dom
|
289
|
+
// and this host element was NOT created with SSR
|
290
|
+
// let's pick out the inner content for slot projection
|
291
|
+
// create a node to represent where the original
|
292
|
+
// content was first placed, which is useful later on
|
293
|
+
// DOM WRITE!!
|
294
|
+
elm['s-sc'] = scopeId;
|
295
|
+
elm.classList.add(scopeId + '-h');
|
296
|
+
}
|
297
|
+
endAttachStyles();
|
298
|
+
};
|
299
|
+
const getScopeId = (cmp, mode) => 'sc-' + (cmp.$tagName$);
|
263
300
|
/**
|
264
301
|
* Production setAccessor() function based on Preact by
|
265
302
|
* Jason Miller (@developit)
|
@@ -747,18 +784,6 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
747
784
|
// synchronous patch
|
748
785
|
patch(oldVNode, rootVnode);
|
749
786
|
};
|
750
|
-
/**
|
751
|
-
* Helper function to create & dispatch a custom Event on a provided target
|
752
|
-
* @param elm the target of the Event
|
753
|
-
* @param name the name to give the custom Event
|
754
|
-
* @param opts options for configuring a custom Event
|
755
|
-
* @returns the custom Event
|
756
|
-
*/
|
757
|
-
const emitEvent = (elm, name, opts) => {
|
758
|
-
const ev = plt.ce(name, opts);
|
759
|
-
elm.dispatchEvent(ev);
|
760
|
-
return ev;
|
761
|
-
};
|
762
787
|
const attachToAncestor = (hostRef, ancestorComponent) => {
|
763
788
|
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent['s-p']) {
|
764
789
|
ancestorComponent['s-p'].push(new Promise((r) => (hostRef.$onRenderResolve$ = r)));
|
@@ -927,44 +952,6 @@ const then = (promise, thenFn) => {
|
|
927
952
|
};
|
928
953
|
const addHydratedFlag = (elm) => elm.classList.add('hydrated')
|
929
954
|
;
|
930
|
-
/**
|
931
|
-
* Parse a new property value for a given property type.
|
932
|
-
*
|
933
|
-
* While the prop value can reasonably be expected to be of `any` type as far as TypeScript's type checker is concerned,
|
934
|
-
* it is not safe to assume that the string returned by evaluating `typeof propValue` matches:
|
935
|
-
* 1. `any`, the type given to `propValue` in the function signature
|
936
|
-
* 2. the type stored from `propType`.
|
937
|
-
*
|
938
|
-
* This function provides the capability to parse/coerce a property's value to potentially any other JavaScript type.
|
939
|
-
*
|
940
|
-
* Property values represented in TSX preserve their type information. In the example below, the number 0 is passed to
|
941
|
-
* a component. This `propValue` will preserve its type information (`typeof propValue === 'number'`). Note that is
|
942
|
-
* based on the type of the value being passed in, not the type declared of the class member decorated with `@Prop`.
|
943
|
-
* ```tsx
|
944
|
-
* <my-cmp prop-val={0}></my-cmp>
|
945
|
-
* ```
|
946
|
-
*
|
947
|
-
* HTML prop values on the other hand, will always a string
|
948
|
-
*
|
949
|
-
* @param propValue the new value to coerce to some type
|
950
|
-
* @param propType the type of the prop, expressed as a binary number
|
951
|
-
* @returns the parsed/coerced value
|
952
|
-
*/
|
953
|
-
const parsePropertyValue = (propValue, propType) => {
|
954
|
-
// ensure this value is of the correct prop type
|
955
|
-
if (propValue != null && !isComplexType(propValue)) {
|
956
|
-
if (propType & 1 /* MEMBER_FLAGS.String */) {
|
957
|
-
// could have been passed as a number or boolean
|
958
|
-
// but we still want it as a string
|
959
|
-
return String(propValue);
|
960
|
-
}
|
961
|
-
// redundant return here for better minification
|
962
|
-
return propValue;
|
963
|
-
}
|
964
|
-
// not sure exactly what type we want
|
965
|
-
// so no need to change to a different type
|
966
|
-
return propValue;
|
967
|
-
};
|
968
955
|
const getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
|
969
956
|
const setValue = (ref, propName, newVal, cmpMeta) => {
|
970
957
|
// check our new property value against our internal value
|
@@ -991,6 +978,16 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
991
978
|
}
|
992
979
|
}
|
993
980
|
};
|
981
|
+
/**
|
982
|
+
* Attach a series of runtime constructs to a compiled Stencil component
|
983
|
+
* constructor, including getters and setters for the `@Prop` and `@State`
|
984
|
+
* decorators, callbacks for when attributes change, and so on.
|
985
|
+
*
|
986
|
+
* @param Cstr the constructor for a component that we need to process
|
987
|
+
* @param cmpMeta metadata collected previously about the component
|
988
|
+
* @param flags a number used to store a series of bit flags
|
989
|
+
* @returns a reference to the same constructor passed in (but now mutated)
|
990
|
+
*/
|
994
991
|
const proxyComponent = (Cstr, cmpMeta, flags) => {
|
995
992
|
if (cmpMeta.$members$) {
|
996
993
|
// It's better to have a const than two Object.entries()
|
@@ -1326,6 +1323,27 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
1326
1323
|
}, consoleError);
|
1327
1324
|
};
|
1328
1325
|
const styles = /*@__PURE__*/ new Map();
|
1326
|
+
const win = typeof window !== 'undefined' ? window : {};
|
1327
|
+
const doc = win.document || { head: {} };
|
1328
|
+
const plt = {
|
1329
|
+
$flags$: 0,
|
1330
|
+
$resourcesUrl$: '',
|
1331
|
+
jmp: (h) => h(),
|
1332
|
+
raf: (h) => requestAnimationFrame(h),
|
1333
|
+
ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
|
1334
|
+
rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
|
1335
|
+
ce: (eventName, opts) => new CustomEvent(eventName, opts),
|
1336
|
+
};
|
1337
|
+
const promiseResolve = (v) => Promise.resolve(v);
|
1338
|
+
const supportsConstructableStylesheets = /*@__PURE__*/ (() => {
|
1339
|
+
try {
|
1340
|
+
new CSSStyleSheet();
|
1341
|
+
return typeof new CSSStyleSheet().replaceSync === 'function';
|
1342
|
+
}
|
1343
|
+
catch (e) { }
|
1344
|
+
return false;
|
1345
|
+
})()
|
1346
|
+
;
|
1329
1347
|
const queueDomReads = [];
|
1330
1348
|
const queueDomWrites = [];
|
1331
1349
|
const queueTask = (queue, write) => (cb) => {
|
package/dist/cjs/loader.cjs.js
CHANGED
@@ -2,10 +2,10 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
const index = require('./index-
|
5
|
+
const index = require('./index-0f8ed4ca.js');
|
6
6
|
|
7
7
|
/*
|
8
|
-
Stencil Client Patch Esm v2.18.
|
8
|
+
Stencil Client Patch Esm v2.18.1 | MIT Licensed | https://stenciljs.com
|
9
9
|
*/
|
10
10
|
const patchEsm = () => {
|
11
11
|
return index.promiseResolve();
|
@@ -1,9 +1,9 @@
|
|
1
1
|
'use strict';
|
2
2
|
|
3
|
-
const index = require('./index-
|
3
|
+
const index = require('./index-0f8ed4ca.js');
|
4
4
|
|
5
5
|
/*
|
6
|
-
Stencil Client Patch Browser v2.18.
|
6
|
+
Stencil Client Patch Browser v2.18.1 | MIT Licensed | https://stenciljs.com
|
7
7
|
*/
|
8
8
|
const patchBrowser = () => {
|
9
9
|
const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('proto-sudoku-wc.cjs.js', document.baseURI).href));
|