@ircam/comote-helpers 0.3.1 → 1.0.1
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/.babelrc +5 -0
- package/.github/workflows/main.yml +3 -3
- package/.history/.gitignore_20250415160643 +6 -0
- package/.history/.gitignore_20250415160723 +6 -0
- package/.history/examples/simple-webview/package-lock_20250415130242.json +5109 -0
- package/.history/examples/simple-webview/package-lock_20250416103557.json +5109 -0
- package/.history/examples/simple-webview/package_20250415130704.json +26 -0
- package/.history/examples/simple-webview/package_20250415184837.json +26 -0
- package/.history/examples/simple-webview/package_20250415190300.json +23 -0
- package/.history/examples/simple-webview/src/server_20250415105733.js +20 -0
- package/.history/examples/simple-webview/src/server_20250415184604.js +20 -0
- package/.history/examples/soundworks/package_20250415132431.json +35 -0
- package/.history/examples/soundworks/package_20250416105956.json +35 -0
- package/.history/max/CoMote/examples/simple-webview/package_20250415184836.json +26 -0
- package/.history/max/CoMote/examples/simple-webview/package_20250415185949.json +23 -0
- package/.history/max/CoMote/examples/simple-webview/package_20250415185950.json +23 -0
- package/.history/max/CoMote/package-info_20241018173608.json +41 -0
- package/.history/max/CoMote/package-info_20250416105743.json +27 -0
- package/.history/max/CoMote/package-info_20250416105826.json +27 -0
- package/.history/max/CoMote/source/comote-connect/package_20250415132759.json +19 -0
- package/.history/max/CoMote/source/comote-connect/package_20250416110158.json +19 -0
- package/.history/max/CoMote/source/comote-connect/server_20250414175059.js +193 -0
- package/.history/max/CoMote/source/comote-connect/server_20250415180549.js +193 -0
- package/.history/package_20250415143437.json +26 -0
- package/.history/package_20250416105907.json +26 -0
- package/LICENSE +2 -2
- package/examples/simple-webview/README.md +10 -0
- package/examples/simple-webview/build/comote-simple-webview-server.js +44 -0
- package/examples/simple-webview/package-lock.json +5109 -0
- package/examples/simple-webview/package.json +23 -0
- package/examples/simple-webview/public/favicon.ico +0 -0
- package/examples/simple-webview/public/index.html +13 -0
- package/examples/simple-webview/public/index.mjs +3623 -0
- package/examples/simple-webview/public/styles.css +99 -0
- package/examples/simple-webview/src/client.js +35 -0
- package/examples/simple-webview/src/server.js +20 -0
- package/examples/soundworks/.build/clients/components/sw-audit.js +64 -0
- package/examples/soundworks/.build/clients/components/sw-audit.js.map +1 -0
- package/examples/soundworks/.build/clients/components/sw-credits.js +73 -0
- package/examples/soundworks/.build/clients/components/sw-credits.js.map +1 -0
- package/examples/soundworks/.build/clients/player/.editorbackup/PlayerExperience.js~ +131 -0
- package/examples/soundworks/.build/clients/player/index.js +116 -0
- package/examples/soundworks/.build/clients/player/index.js.map +1 -0
- package/examples/soundworks/.build/clients/styles/app.scss +79 -0
- package/examples/soundworks/.build/clients/styles/normalize.scss +359 -0
- package/examples/soundworks/.build/clients/webview/index.js +72 -0
- package/examples/soundworks/.build/clients/webview/index.js.map +1 -0
- package/examples/soundworks/.build/public/css/app.css +76 -0
- package/examples/soundworks/.build/public/css/app.css.map +1 -0
- package/examples/soundworks/.build/public/css/normalize.css +321 -0
- package/examples/soundworks/.build/public/css/normalize.css.map +1 -0
- package/examples/soundworks/.build/public/player.js +98098 -0
- package/examples/soundworks/.build/public/player.js.map +1 -0
- package/examples/soundworks/.build/public/webview.js +50725 -0
- package/examples/soundworks/.build/public/webview.js.map +1 -0
- package/examples/soundworks/.build/server/index.js +57 -0
- package/examples/soundworks/.build/server/index.js.map +1 -0
- package/examples/soundworks/.build/server/schemas/.gitkeep +1 -0
- package/examples/soundworks/.build/server/schemas/global.js +19 -0
- package/examples/soundworks/.build/server/schemas/global.js.map +1 -0
- package/examples/soundworks/.build/server/tmpl/default.tmpl +27 -0
- package/examples/soundworks/.build/utils/catch-unhandled-errors.js +9 -0
- package/examples/soundworks/.build/utils/catch-unhandled-errors.js.map +1 -0
- package/examples/soundworks/.editorconfig +12 -0
- package/examples/soundworks/.eslintrc +3 -0
- package/examples/soundworks/.soundworks +7 -0
- package/examples/soundworks/.vendors/public/webcomponentsjs/CHANGELOG.md +76 -0
- package/examples/soundworks/.vendors/public/webcomponentsjs/LICENSE.md +19 -0
- package/examples/soundworks/.vendors/public/webcomponentsjs/README.md +259 -0
- package/examples/soundworks/.vendors/public/webcomponentsjs/bundles/webcomponents-ce.js +63 -0
- package/examples/soundworks/.vendors/public/webcomponentsjs/bundles/webcomponents-ce.js.map +1 -0
- package/examples/soundworks/.vendors/public/webcomponentsjs/bundles/webcomponents-pf_dom.js +62 -0
- package/examples/soundworks/.vendors/public/webcomponentsjs/bundles/webcomponents-pf_dom.js.map +1 -0
- package/examples/soundworks/.vendors/public/webcomponentsjs/bundles/webcomponents-pf_js.js +95 -0
- package/examples/soundworks/.vendors/public/webcomponentsjs/bundles/webcomponents-pf_js.js.map +1 -0
- package/examples/soundworks/.vendors/public/webcomponentsjs/bundles/webcomponents-sd-ce-pf.js +374 -0
- package/examples/soundworks/.vendors/public/webcomponentsjs/bundles/webcomponents-sd-ce-pf.js.map +1 -0
- package/examples/soundworks/.vendors/public/webcomponentsjs/bundles/webcomponents-sd-ce.js +240 -0
- package/examples/soundworks/.vendors/public/webcomponentsjs/bundles/webcomponents-sd-ce.js.map +1 -0
- package/examples/soundworks/.vendors/public/webcomponentsjs/bundles/webcomponents-sd.js +196 -0
- package/examples/soundworks/.vendors/public/webcomponentsjs/bundles/webcomponents-sd.js.map +1 -0
- package/examples/soundworks/.vendors/public/webcomponentsjs/custom-elements-es5-adapter.js +15 -0
- package/examples/soundworks/.vendors/public/webcomponentsjs/package.json +51 -0
- package/examples/soundworks/.vendors/public/webcomponentsjs/src/entrypoints/custom-elements-es5-adapter-index.js +16 -0
- package/examples/soundworks/.vendors/public/webcomponentsjs/src/entrypoints/webcomponents-bundle-index.js +55 -0
- package/examples/soundworks/.vendors/public/webcomponentsjs/src/entrypoints/webcomponents-ce-index.js +17 -0
- package/examples/soundworks/.vendors/public/webcomponentsjs/src/entrypoints/webcomponents-pf_dom-index.js +19 -0
- package/examples/soundworks/.vendors/public/webcomponentsjs/src/entrypoints/webcomponents-pf_js-index.js +13 -0
- package/examples/soundworks/.vendors/public/webcomponentsjs/src/entrypoints/webcomponents-sd-ce-index.js +19 -0
- package/examples/soundworks/.vendors/public/webcomponentsjs/src/entrypoints/webcomponents-sd-ce-pf-index.js +25 -0
- package/examples/soundworks/.vendors/public/webcomponentsjs/src/entrypoints/webcomponents-sd-index.js +18 -0
- package/examples/soundworks/.vendors/public/webcomponentsjs/src/flag-parser.js +69 -0
- package/examples/soundworks/.vendors/public/webcomponentsjs/src/platform/baseuri.js +28 -0
- package/examples/soundworks/.vendors/public/webcomponentsjs/src/platform/child-node/after.js +47 -0
- package/examples/soundworks/.vendors/public/webcomponentsjs/src/platform/child-node/before.js +40 -0
- package/examples/soundworks/.vendors/public/webcomponentsjs/src/platform/child-node/index.js +14 -0
- package/examples/soundworks/.vendors/public/webcomponentsjs/src/platform/child-node/remove.js +37 -0
- package/examples/soundworks/.vendors/public/webcomponentsjs/src/platform/child-node/replace-with.js +42 -0
- package/examples/soundworks/.vendors/public/webcomponentsjs/src/platform/custom-event.js +79 -0
- package/examples/soundworks/.vendors/public/webcomponentsjs/src/platform/es6-misc.js +38 -0
- package/examples/soundworks/.vendors/public/webcomponentsjs/src/platform/event-listener-options.js +122 -0
- package/examples/soundworks/.vendors/public/webcomponentsjs/src/platform/get-attribute-names.js +27 -0
- package/examples/soundworks/.vendors/public/webcomponentsjs/src/platform/matches.js +21 -0
- package/examples/soundworks/.vendors/public/webcomponentsjs/src/platform/parent-node/append.js +31 -0
- package/examples/soundworks/.vendors/public/webcomponentsjs/src/platform/parent-node/index.js +13 -0
- package/examples/soundworks/.vendors/public/webcomponentsjs/src/platform/parent-node/prepend.js +42 -0
- package/examples/soundworks/.vendors/public/webcomponentsjs/src/platform/parent-node/replace-children.js +45 -0
- package/examples/soundworks/.vendors/public/webcomponentsjs/src/platform/promise.js +50 -0
- package/examples/soundworks/.vendors/public/webcomponentsjs/src/platform/svg-element-class-list.js +28 -0
- package/examples/soundworks/.vendors/public/webcomponentsjs/src/platform/symbol.js +64 -0
- package/examples/soundworks/.vendors/public/webcomponentsjs/src/platform/toggle-attribute.js +39 -0
- package/examples/soundworks/.vendors/public/webcomponentsjs/src/unresolved.js +32 -0
- package/examples/soundworks/.vendors/public/webcomponentsjs/webcomponents-bundle.d.ts +175 -0
- package/examples/soundworks/.vendors/public/webcomponentsjs/webcomponents-bundle.js +384 -0
- package/examples/soundworks/.vendors/public/webcomponentsjs/webcomponents-bundle.js.map +1 -0
- package/examples/soundworks/.vendors/public/webcomponentsjs/webcomponents-loader.js +238 -0
- package/examples/soundworks/LICENSE +28 -0
- package/examples/soundworks/README.md +26 -0
- package/examples/soundworks/config/application.yaml +8 -0
- package/examples/soundworks/config/env-default.yaml +12 -0
- package/examples/soundworks/package.json +35 -0
- package/examples/soundworks/public/favicon.ico +0 -0
- package/examples/soundworks/public/images/loader.gif +0 -0
- package/examples/soundworks/src/clients/components/sw-audit.js +78 -0
- package/examples/soundworks/src/clients/components/sw-credits.js +80 -0
- package/examples/soundworks/src/clients/player/.editorbackup/PlayerExperience.js~ +131 -0
- package/examples/soundworks/src/clients/player/index.js +118 -0
- package/examples/soundworks/src/clients/styles/app.scss +79 -0
- package/examples/soundworks/src/clients/styles/normalize.scss +359 -0
- package/examples/soundworks/src/clients/webview/index.js +78 -0
- package/examples/soundworks/src/server/index.js +62 -0
- package/examples/soundworks/src/server/schemas/.gitkeep +1 -0
- package/examples/soundworks/src/server/schemas/global.js +18 -0
- package/examples/soundworks/src/server/tmpl/default.tmpl +27 -0
- package/examples/soundworks/src/utils/catch-unhandled-errors.js +9 -0
- package/index.html +51 -0
- package/max/CoMote/docs/sw.shared-state.maxref.xml +95 -0
- package/max/CoMote/examples/simple-webview/README.md +10 -0
- package/max/CoMote/examples/simple-webview/build/comote-simple-webview-server.js +44 -0
- package/max/CoMote/examples/simple-webview/comote-simple-webview-server.maxpat +186 -0
- package/max/CoMote/examples/simple-webview/package-lock.json +5109 -0
- package/max/CoMote/examples/simple-webview/package.json +23 -0
- package/max/CoMote/examples/simple-webview/public/favicon.ico +0 -0
- package/max/CoMote/examples/simple-webview/public/index.html +13 -0
- package/max/CoMote/examples/simple-webview/public/index.mjs +3623 -0
- package/max/CoMote/examples/simple-webview/public/styles.css +99 -0
- package/max/CoMote/examples/simple-webview/src/client.js +35 -0
- package/max/CoMote/examples/simple-webview/src/server.js +20 -0
- package/max/CoMote/examples/soundworks/.editorconfig +12 -0
- package/max/CoMote/examples/soundworks/.eslintrc +3 -0
- package/max/CoMote/examples/soundworks/.soundworks +7 -0
- package/max/CoMote/examples/soundworks/LICENSE +28 -0
- package/max/CoMote/examples/soundworks/README.md +26 -0
- package/max/CoMote/examples/soundworks/config/application.yaml +8 -0
- package/max/CoMote/examples/soundworks/config/env-default.yaml +12 -0
- package/max/CoMote/examples/soundworks/package.json +35 -0
- package/max/CoMote/examples/soundworks/public/favicon.ico +0 -0
- package/max/CoMote/examples/soundworks/public/images/loader.gif +0 -0
- package/max/CoMote/examples/soundworks/src/clients/components/sw-audit.js +78 -0
- package/max/CoMote/examples/soundworks/src/clients/components/sw-credits.js +80 -0
- package/max/CoMote/examples/soundworks/src/clients/player/.editorbackup/PlayerExperience.js~ +131 -0
- package/max/CoMote/examples/soundworks/src/clients/player/index.js +118 -0
- package/max/CoMote/examples/soundworks/src/clients/styles/app.scss +79 -0
- package/max/CoMote/examples/soundworks/src/clients/styles/normalize.scss +359 -0
- package/max/CoMote/examples/soundworks/src/clients/webview/index.js +78 -0
- package/max/CoMote/examples/soundworks/src/server/index.js +62 -0
- package/max/CoMote/examples/soundworks/src/server/schemas/.gitkeep +1 -0
- package/max/CoMote/examples/soundworks/src/server/schemas/global.js +18 -0
- package/max/CoMote/examples/soundworks/src/server/tmpl/default.tmpl +27 -0
- package/max/CoMote/examples/soundworks/src/utils/catch-unhandled-errors.js +9 -0
- package/max/CoMote/extras/CoMote.maxpat +1994 -0
- package/max/CoMote/help/comote_osc_receive.maxhelp +946 -0
- package/max/CoMote/icon.png +0 -0
- package/max/CoMote/init/objectmappings.txt +2 -0
- package/max/CoMote/media/comote-screenshot.png +0 -0
- package/max/CoMote/package-info.json +27 -0
- package/max/CoMote/patchers/comote-connect/comote-connect-public/comote-connect-client.mjs +2821 -0
- package/max/CoMote/patchers/comote-connect/comote-connect-public/favicon.ico +0 -0
- package/max/CoMote/patchers/comote-connect/comote-connect-public/index.html +22 -0
- package/max/CoMote/patchers/comote-connect/comote-connect-server.js +24775 -0
- package/max/CoMote/patchers/comote-connect/comote-connect.maxpat +1048 -0
- package/max/CoMote/patchers/comote-connect/package.json +4 -0
- package/max/CoMote/patchers/comote_format_from_comote_v2.maxpat +613 -0
- package/max/CoMote/patchers/comote_format_from_v3.maxpat +443 -0
- package/max/CoMote/patchers/comote_format_gyro_v2_to_v3.maxpat +240 -0
- package/max/CoMote/patchers/comote_format_gyro_v3_to_v2.maxpat +240 -0
- package/max/CoMote/patchers/comote_format_heading_v2_to_v3.maxpat +171 -0
- package/max/CoMote/patchers/comote_osc_receive.maxpat +440 -0
- package/max/CoMote/patchers/comote_osc_to_list.maxpat +161 -0
- package/max/CoMote/readme.md +22 -0
- package/max/CoMote/source/comote-connect/client.js +104 -0
- package/max/CoMote/source/comote-connect/package-lock.json +591 -0
- package/max/CoMote/source/comote-connect/package.json +19 -0
- package/max/CoMote/source/comote-connect/server.js +193 -0
- package/max-update.bash +44 -0
- package/package.json +10 -29
- package/src/.editorbackup/network-infos.js~ +60 -0
- package/src/.editorbackup/wifi-infos.js~ +33 -0
- package/src/network-infos.js +67 -0
- package/{qrcode.js → src/qrcode.js} +26 -40
- package/{server.js → src/server.js} +45 -69
- package/src/wifi-infos.js +33 -0
- package/README.md +0 -160
- package/wifi-infos.js +0 -41
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
|
|
4
|
+
* This code may only be used under the BSD style license found at
|
|
5
|
+
* http://polymer.github.io/LICENSE.txt The complete set of authors may be found
|
|
6
|
+
* at http://polymer.github.io/AUTHORS.txt The complete set of contributors may
|
|
7
|
+
* be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
|
|
8
|
+
* Google as part of the polymer project is also subject to an additional IP
|
|
9
|
+
* rights grant found at http://polymer.github.io/PATENTS.txt
|
|
10
|
+
*/
|
|
11
|
+
if (!Array.from) {
|
|
12
|
+
Array.from = (object) => {
|
|
13
|
+
return [].slice.call(object);
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
if (!Object.assign) {
|
|
17
|
+
const assign = (target, source) => {
|
|
18
|
+
const n$ = Object.keys(source);
|
|
19
|
+
for (let i = 0; i < n$.length; i++) {
|
|
20
|
+
const p = n$[i];
|
|
21
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
22
|
+
target[p] = source[p];
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
Object.assign = function (target) {
|
|
26
|
+
// eslint-disable-next-line prefer-rest-params
|
|
27
|
+
const args = [].slice.call(arguments, 1);
|
|
28
|
+
for (let i = 0, s; i < args.length; i++) {
|
|
29
|
+
s = args[i];
|
|
30
|
+
if (s) {
|
|
31
|
+
assign(target, s);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
return target;
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
export {};
|
|
38
|
+
//# sourceMappingURL=es6-misc.js.map
|
package/examples/soundworks/.vendors/public/webcomponentsjs/src/platform/event-listener-options.js
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
|
|
4
|
+
* This code may only be used under the BSD style license found at
|
|
5
|
+
* http://polymer.github.io/LICENSE.txt The complete set of authors may be found
|
|
6
|
+
* at http://polymer.github.io/AUTHORS.txt The complete set of contributors may
|
|
7
|
+
* be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
|
|
8
|
+
* Google as part of the polymer project is also subject to an additional IP
|
|
9
|
+
* rights grant found at http://polymer.github.io/PATENTS.txt
|
|
10
|
+
*/
|
|
11
|
+
var _a;
|
|
12
|
+
// Older browsers like IE do not support an object as the options parameter
|
|
13
|
+
// to add/removeEventListener.
|
|
14
|
+
// https://connect.microsoft.com/IE/feedback/details/790389/event-defaultprevented-returns-false-after-preventdefault-was-called
|
|
15
|
+
const supportsEventOptions = (() => {
|
|
16
|
+
let supported = false;
|
|
17
|
+
let onceSupported = false;
|
|
18
|
+
const eventOptions = {
|
|
19
|
+
get capture() {
|
|
20
|
+
supported = true;
|
|
21
|
+
return true;
|
|
22
|
+
},
|
|
23
|
+
get once() {
|
|
24
|
+
onceSupported = true;
|
|
25
|
+
return true;
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
let callCount = 0;
|
|
29
|
+
const listener = () => {
|
|
30
|
+
callCount++;
|
|
31
|
+
};
|
|
32
|
+
const d = document.createElement('div');
|
|
33
|
+
// NOTE: These will be unpatched at this point.
|
|
34
|
+
d.addEventListener('click', listener, eventOptions);
|
|
35
|
+
let fullySupported = supported && onceSupported;
|
|
36
|
+
// Once + capture broken on Edge >= 17 < 79.
|
|
37
|
+
if (fullySupported) {
|
|
38
|
+
d.dispatchEvent(new Event('click'));
|
|
39
|
+
d.dispatchEvent(new Event('click'));
|
|
40
|
+
fullySupported = callCount == 1;
|
|
41
|
+
}
|
|
42
|
+
d.removeEventListener('click', listener, eventOptions);
|
|
43
|
+
return fullySupported;
|
|
44
|
+
})();
|
|
45
|
+
const nativeEventTarget = (_a = window.EventTarget) !== null && _a !== void 0 ? _a : window.Node;
|
|
46
|
+
if (!supportsEventOptions &&
|
|
47
|
+
'addEventListener' in nativeEventTarget.prototype) {
|
|
48
|
+
const parseEventOptions = (optionsOrCapture) => {
|
|
49
|
+
let capture, once;
|
|
50
|
+
if (optionsOrCapture &&
|
|
51
|
+
(typeof optionsOrCapture === 'object' ||
|
|
52
|
+
typeof optionsOrCapture === 'function')) {
|
|
53
|
+
capture = Boolean(optionsOrCapture.capture);
|
|
54
|
+
once = Boolean(optionsOrCapture.once);
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
capture = Boolean(optionsOrCapture);
|
|
58
|
+
once = false;
|
|
59
|
+
}
|
|
60
|
+
return {
|
|
61
|
+
capture,
|
|
62
|
+
once,
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
const origAddEventListener = nativeEventTarget.prototype.addEventListener;
|
|
66
|
+
const origRemoveEventListener = nativeEventTarget.prototype.removeEventListener;
|
|
67
|
+
const captureListenerMap = new WeakMap();
|
|
68
|
+
const listenerMap = new WeakMap();
|
|
69
|
+
const getListenerMap = (target, type, capture) => {
|
|
70
|
+
const elMap = capture ? captureListenerMap : listenerMap;
|
|
71
|
+
let typeMap = elMap.get(target);
|
|
72
|
+
if (typeMap === undefined) {
|
|
73
|
+
elMap.set(target, (typeMap = new Map()));
|
|
74
|
+
}
|
|
75
|
+
let listeners = typeMap.get(type);
|
|
76
|
+
if (listeners === undefined) {
|
|
77
|
+
typeMap.set(type, (listeners = new WeakMap()));
|
|
78
|
+
}
|
|
79
|
+
return listeners;
|
|
80
|
+
};
|
|
81
|
+
nativeEventTarget.prototype.addEventListener = function (type, listener, options) {
|
|
82
|
+
if (listener == null) {
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
const { capture, once } = parseEventOptions(options);
|
|
86
|
+
const map = getListenerMap(this, type, capture);
|
|
87
|
+
if (!map.has(listener)) {
|
|
88
|
+
const cachedListener = once
|
|
89
|
+
? (e) => {
|
|
90
|
+
map.delete(listener);
|
|
91
|
+
origRemoveEventListener.call(this, type, cachedListener, capture);
|
|
92
|
+
if (typeof listener === 'function') {
|
|
93
|
+
return listener.call(this, e);
|
|
94
|
+
}
|
|
95
|
+
if (typeof (listener === null || listener === void 0 ? void 0 : listener.handleEvent) === 'function') {
|
|
96
|
+
return listener.handleEvent(e);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
: null;
|
|
100
|
+
map.set(listener, cachedListener);
|
|
101
|
+
// Note, the cached listener is null if no wrapper is used to avoid
|
|
102
|
+
// a strong ref to it;
|
|
103
|
+
origAddEventListener.call(this, type, cachedListener !== null && cachedListener !== void 0 ? cachedListener : listener, capture);
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
nativeEventTarget.prototype.removeEventListener = function (type, listener, options) {
|
|
107
|
+
if (listener == null) {
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
const { capture } = parseEventOptions(options);
|
|
111
|
+
const map = getListenerMap(this, type, capture);
|
|
112
|
+
const cachedListener = map.get(listener);
|
|
113
|
+
if (cachedListener !== undefined) {
|
|
114
|
+
map.delete(listener);
|
|
115
|
+
// Note, the cached listener is null if no wrapper was used so that a
|
|
116
|
+
// strong ref to it is not kept.
|
|
117
|
+
origRemoveEventListener.call(this, type, cachedListener !== null && cachedListener !== void 0 ? cachedListener : listener, capture);
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
export {};
|
|
122
|
+
//# sourceMappingURL=event-listener-options.js.map
|
package/examples/soundworks/.vendors/public/webcomponentsjs/src/platform/get-attribute-names.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
@license
|
|
3
|
+
Copyright (c) 2020 The Polymer Project Authors. All rights reserved.
|
|
4
|
+
This code may only be used under the BSD style license found at
|
|
5
|
+
http://polymer.github.io/LICENSE.txt The complete set of authors may be found at
|
|
6
|
+
http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
|
|
7
|
+
found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
8
|
+
part of the polymer project is also subject to an additional IP rights grant
|
|
9
|
+
found at http://polymer.github.io/PATENTS.txt
|
|
10
|
+
*/
|
|
11
|
+
var _a, _b;
|
|
12
|
+
const Element_prototype = Element.prototype;
|
|
13
|
+
// In IE11, the `attributes` descriptor is on `Node.prototype`.
|
|
14
|
+
const attributesDescriptor = (_a = Object.getOwnPropertyDescriptor(Element_prototype, 'attributes')) !== null && _a !== void 0 ? _a : Object.getOwnPropertyDescriptor(Node.prototype, 'attributes');
|
|
15
|
+
// In Safari 9, the `attributes` descriptor's getter is undefined. In Chrome 41,
|
|
16
|
+
// the `attributes` descriptor is a data descriptor on each Element instance.
|
|
17
|
+
const getAttributes = (_b = attributesDescriptor === null || attributesDescriptor === void 0 ? void 0 : attributesDescriptor.get) !== null && _b !== void 0 ? _b : function () {
|
|
18
|
+
return this.attributes;
|
|
19
|
+
};
|
|
20
|
+
const map = Array.prototype.map;
|
|
21
|
+
if (!Element_prototype.hasOwnProperty('getAttributeNames')) {
|
|
22
|
+
Element_prototype.getAttributeNames = function getAttributeNames() {
|
|
23
|
+
return map.call(getAttributes.call(this), (attr) => attr.name);
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
export {};
|
|
27
|
+
//# sourceMappingURL=get-attribute-names.js.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
@license
|
|
3
|
+
Copyright (c) 2020 The Polymer Project Authors. All rights reserved.
|
|
4
|
+
This code may only be used under the BSD style license found at
|
|
5
|
+
http://polymer.github.io/LICENSE.txt The complete set of authors may be found at
|
|
6
|
+
http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
|
|
7
|
+
found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
8
|
+
part of the polymer project is also subject to an additional IP rights grant
|
|
9
|
+
found at http://polymer.github.io/PATENTS.txt
|
|
10
|
+
*/
|
|
11
|
+
var _a;
|
|
12
|
+
const Element_prototype = Element.prototype;
|
|
13
|
+
if (!Element_prototype.hasOwnProperty('matches')) {
|
|
14
|
+
Element_prototype.matches =
|
|
15
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
16
|
+
(_a = Element_prototype.webkitMatchesSelector) !== null && _a !== void 0 ? _a :
|
|
17
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
18
|
+
Element_prototype.msMatchesSelector;
|
|
19
|
+
}
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=matches.js.map
|
package/examples/soundworks/.vendors/public/webcomponentsjs/src/platform/parent-node/append.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
@license
|
|
3
|
+
Copyright (c) 2020 The Polymer Project Authors. All rights reserved.
|
|
4
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
5
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
6
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
7
|
+
Code distributed by Google as part of the polymer project is also
|
|
8
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
9
|
+
*/
|
|
10
|
+
const nativeAppendChild = Node.prototype.appendChild;
|
|
11
|
+
const installAppend = (constructor) => {
|
|
12
|
+
const prototype = constructor.prototype;
|
|
13
|
+
if (prototype.hasOwnProperty('append')) {
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
Object.defineProperty(prototype, 'append', {
|
|
17
|
+
configurable: true,
|
|
18
|
+
enumerable: true,
|
|
19
|
+
writable: true,
|
|
20
|
+
value: function append(...args) {
|
|
21
|
+
for (const arg of args) {
|
|
22
|
+
nativeAppendChild.call(this, typeof arg === 'string' ? document.createTextNode(arg) : arg);
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
installAppend(Document);
|
|
28
|
+
installAppend(DocumentFragment);
|
|
29
|
+
installAppend(Element);
|
|
30
|
+
export {};
|
|
31
|
+
//# sourceMappingURL=append.js.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
@license
|
|
3
|
+
Copyright (c) 2020 The Polymer Project Authors. All rights reserved.
|
|
4
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
5
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
6
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
7
|
+
Code distributed by Google as part of the polymer project is also
|
|
8
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
9
|
+
*/
|
|
10
|
+
import './append.js';
|
|
11
|
+
import './prepend.js';
|
|
12
|
+
import './replace-children.js';
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
package/examples/soundworks/.vendors/public/webcomponentsjs/src/platform/parent-node/prepend.js
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
@license
|
|
3
|
+
Copyright (c) 2020 The Polymer Project Authors. All rights reserved.
|
|
4
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
5
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
6
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
7
|
+
Code distributed by Google as part of the polymer project is also
|
|
8
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
9
|
+
*/
|
|
10
|
+
var _a, _b;
|
|
11
|
+
const nativeInsertBefore = Node.prototype.insertBefore;
|
|
12
|
+
const nativeGetFirstChild =
|
|
13
|
+
// In Chrome 41, `firstChild` is a data descriptor on every instance, not a
|
|
14
|
+
// accessor descriptor on `Node.prototype`.
|
|
15
|
+
(_b = (_a = Object.getOwnPropertyDescriptor(Node.prototype, 'firstChild')) === null || _a === void 0 ? void 0 : _a.get) !== null && _b !== void 0 ? _b :
|
|
16
|
+
// In Safari 9, the `firstChild` descriptor's `get` and `set` are undefined.
|
|
17
|
+
function () {
|
|
18
|
+
return this.firstChild;
|
|
19
|
+
};
|
|
20
|
+
const installPrepend = (constructor) => {
|
|
21
|
+
const prototype = constructor.prototype;
|
|
22
|
+
if (prototype.hasOwnProperty('prepend')) {
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
Object.defineProperty(prototype, 'prepend', {
|
|
26
|
+
configurable: true,
|
|
27
|
+
enumerable: true,
|
|
28
|
+
writable: true,
|
|
29
|
+
value: function prepend(...args) {
|
|
30
|
+
const firstChild = nativeGetFirstChild.call(this);
|
|
31
|
+
for (const arg of args) {
|
|
32
|
+
const newNode = typeof arg === 'string' ? document.createTextNode(arg) : arg;
|
|
33
|
+
nativeInsertBefore.call(this, newNode, firstChild);
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
};
|
|
38
|
+
installPrepend(Document);
|
|
39
|
+
installPrepend(DocumentFragment);
|
|
40
|
+
installPrepend(Element);
|
|
41
|
+
export {};
|
|
42
|
+
//# sourceMappingURL=prepend.js.map
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
@license
|
|
3
|
+
Copyright (c) 2020 The Polymer Project Authors. All rights reserved.
|
|
4
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
5
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
6
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
7
|
+
Code distributed by Google as part of the polymer project is also
|
|
8
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
9
|
+
*/
|
|
10
|
+
var _a, _b;
|
|
11
|
+
const nativeAppendChild = Node.prototype.appendChild;
|
|
12
|
+
const nativeRemoveChild = Node.prototype.removeChild;
|
|
13
|
+
const nativeGetFirstChild =
|
|
14
|
+
// In Chrome 41, `firstChild` is a data descriptor on every instance, not a
|
|
15
|
+
// accessor descriptor on `Node.prototype`.
|
|
16
|
+
(_b = (_a = Object.getOwnPropertyDescriptor(Node.prototype, 'firstChild')) === null || _a === void 0 ? void 0 : _a.get) !== null && _b !== void 0 ? _b :
|
|
17
|
+
// In Safari 9, the `firstChild` descriptor's `get` and `set` are undefined.
|
|
18
|
+
function () {
|
|
19
|
+
return this.firstChild;
|
|
20
|
+
};
|
|
21
|
+
const installReplaceChildren = (constructor) => {
|
|
22
|
+
const prototype = constructor.prototype;
|
|
23
|
+
if (prototype.hasOwnProperty('replaceChildren')) {
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
Object.defineProperty(prototype, 'replaceChildren', {
|
|
27
|
+
configurable: true,
|
|
28
|
+
enumerable: true,
|
|
29
|
+
writable: true,
|
|
30
|
+
value: function replaceChildren(...args) {
|
|
31
|
+
let child;
|
|
32
|
+
while ((child = nativeGetFirstChild.call(this)) !== null) {
|
|
33
|
+
nativeRemoveChild.call(this, child);
|
|
34
|
+
}
|
|
35
|
+
for (const arg of args) {
|
|
36
|
+
nativeAppendChild.call(this, typeof arg === 'string' ? document.createTextNode(arg) : arg);
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
installReplaceChildren(Document);
|
|
42
|
+
installReplaceChildren(DocumentFragment);
|
|
43
|
+
installReplaceChildren(Element);
|
|
44
|
+
export {};
|
|
45
|
+
//# sourceMappingURL=replace-children.js.map
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
@license
|
|
3
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
4
|
+
This code may only be used under the BSD style license found at
|
|
5
|
+
http://polymer.github.io/LICENSE.txt The complete set of authors may be found at
|
|
6
|
+
http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
|
|
7
|
+
found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
8
|
+
part of the polymer project is also subject to an additional IP rights grant
|
|
9
|
+
found at http://polymer.github.io/PATENTS.txt
|
|
10
|
+
*/
|
|
11
|
+
import PromisePolyfill from 'promise-polyfill/src/index.js';
|
|
12
|
+
/*
|
|
13
|
+
Assign the ES6 promise polyfill to window ourselves instead of using the "auto"
|
|
14
|
+
polyfill to work around
|
|
15
|
+
https://github.com/webcomponents/webcomponentsjs/issues/837
|
|
16
|
+
*/
|
|
17
|
+
if (!window.Promise) {
|
|
18
|
+
window.Promise = PromisePolyfill;
|
|
19
|
+
// save Promise API
|
|
20
|
+
/* eslint-disable no-self-assign */
|
|
21
|
+
// PromisePolyfill.prototype['catch'] = PromisePolyfill.prototype.catch;
|
|
22
|
+
PromisePolyfill.prototype['then'] = PromisePolyfill.prototype.then;
|
|
23
|
+
// PromisePolyfill.prototype['finally'] = PromisePolyfill.prototype.finally;
|
|
24
|
+
PromisePolyfill['all'] = PromisePolyfill.all;
|
|
25
|
+
PromisePolyfill['race'] = PromisePolyfill.race;
|
|
26
|
+
PromisePolyfill['resolve'] = PromisePolyfill.resolve;
|
|
27
|
+
PromisePolyfill['reject'] = PromisePolyfill.reject;
|
|
28
|
+
/* eslint-enable */
|
|
29
|
+
// approach copied from
|
|
30
|
+
// https://github.com/Polymer/polymer/blob/v3.0.2/lib/utils/async.js
|
|
31
|
+
const node = document.createTextNode('');
|
|
32
|
+
const twiddleNode = function twiddleNode() {
|
|
33
|
+
node.textContent = node.textContent.length > 0 ? '' : 'a';
|
|
34
|
+
};
|
|
35
|
+
/** @type {!Array<function():void>} */
|
|
36
|
+
const callbacks = [];
|
|
37
|
+
new MutationObserver(() => {
|
|
38
|
+
const len = callbacks.length;
|
|
39
|
+
for (let i = 0; i < len; i++) {
|
|
40
|
+
callbacks[i]();
|
|
41
|
+
}
|
|
42
|
+
callbacks.splice(0, len);
|
|
43
|
+
}).observe(node, { characterData: true });
|
|
44
|
+
// set _immediateFn to a MutationObserver for close-to-native timing
|
|
45
|
+
PromisePolyfill._immediateFn = (fn) => {
|
|
46
|
+
callbacks.push(fn);
|
|
47
|
+
twiddleNode();
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=promise.js.map
|
package/examples/soundworks/.vendors/public/webcomponentsjs/src/platform/svg-element-class-list.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
@license
|
|
3
|
+
Copyright (c) 2020 The Polymer Project Authors. All rights reserved.
|
|
4
|
+
This code may only be used under the BSD style license found at
|
|
5
|
+
http://polymer.github.io/LICENSE.txt The complete set of authors may be found at
|
|
6
|
+
http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
|
|
7
|
+
found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
8
|
+
part of the polymer project is also subject to an additional IP rights grant
|
|
9
|
+
found at http://polymer.github.io/PATENTS.txt
|
|
10
|
+
*/
|
|
11
|
+
const Element_prototype = window.Element.prototype;
|
|
12
|
+
const HTMLElement_prototype = window.HTMLElement.prototype;
|
|
13
|
+
const SVGElement_prototype = window['SVGElement'].prototype;
|
|
14
|
+
// Thanks to @justinfagnani for finding this:
|
|
15
|
+
//
|
|
16
|
+
// In IE11, `classList` is only supported on `HTMLElement` instances: the
|
|
17
|
+
// descriptor is an own property of `HTMLElement.prototype` and is an accessor
|
|
18
|
+
// descriptor with `set` as `undefined` and no `get`. However, it seems to be
|
|
19
|
+
// implemented generically enough such that copying it to something in the
|
|
20
|
+
// prototype chain of `SVGElement` correctly adds support for `classList` (as
|
|
21
|
+
// far as `DOMTokenList` implemented in IE11).
|
|
22
|
+
if (HTMLElement_prototype.hasOwnProperty('classList') &&
|
|
23
|
+
!Element_prototype.hasOwnProperty('classList') &&
|
|
24
|
+
!SVGElement_prototype.hasOwnProperty('classList')) {
|
|
25
|
+
Object.defineProperty(Element_prototype, 'classList', Object.getOwnPropertyDescriptor(HTMLElement_prototype, 'classList'));
|
|
26
|
+
}
|
|
27
|
+
export {};
|
|
28
|
+
//# sourceMappingURL=svg-element-class-list.js.map
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
@license
|
|
3
|
+
Copyright (c) 2018 The Polymer Project Authors. All rights reserved.
|
|
4
|
+
This code may only be used under the BSD style license found at
|
|
5
|
+
http://polymer.github.io/LICENSE.txt The complete set of authors may be found at
|
|
6
|
+
http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
|
|
7
|
+
found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
8
|
+
part of the polymer project is also subject to an additional IP rights grant
|
|
9
|
+
found at http://polymer.github.io/PATENTS.txt
|
|
10
|
+
*/
|
|
11
|
+
// import polyfill for Symbol and Object.getOwnPropertySymbols
|
|
12
|
+
import 'get-own-property-symbols/build/get-own-property-symbols.max';
|
|
13
|
+
// Fix issue in toString patch when compiled into strict mode via closure
|
|
14
|
+
// https://github.com/es-shims/get-own-property-symbols/issues/16
|
|
15
|
+
const toString = Object.prototype.toString;
|
|
16
|
+
Object.prototype.toString = function () {
|
|
17
|
+
if (this === undefined) {
|
|
18
|
+
return '[object Undefined]';
|
|
19
|
+
}
|
|
20
|
+
else if (this === null) {
|
|
21
|
+
return '[object Null]';
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
return toString.call(this);
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
// overwrite Object.keys to filter out symbols
|
|
28
|
+
Object.keys = function (obj) {
|
|
29
|
+
return Object.getOwnPropertyNames(obj).filter((name) => {
|
|
30
|
+
const prop = Object.getOwnPropertyDescriptor(obj, name);
|
|
31
|
+
return prop && prop.enumerable;
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
// implement iterators for IE 11
|
|
35
|
+
if (!String.prototype[Symbol.iterator] || !String.prototype.codePointAt) {
|
|
36
|
+
String.prototype[Symbol.iterator] = function* () {
|
|
37
|
+
for (let i = 0; i < this.length; i++) {
|
|
38
|
+
yield this[i];
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
if (!Set.prototype[Symbol.iterator]) {
|
|
43
|
+
Set.prototype[Symbol.iterator] = function* () {
|
|
44
|
+
const temp = [];
|
|
45
|
+
this.forEach((value) => {
|
|
46
|
+
temp.push(value);
|
|
47
|
+
});
|
|
48
|
+
for (let i = 0; i < temp.length; i++) {
|
|
49
|
+
yield temp[i];
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
if (!Map.prototype[Symbol.iterator]) {
|
|
54
|
+
Map.prototype[Symbol.iterator] = function* () {
|
|
55
|
+
const entries = [];
|
|
56
|
+
this.forEach((value, key) => {
|
|
57
|
+
entries.push([key, value]);
|
|
58
|
+
});
|
|
59
|
+
for (let i = 0; i < entries.length; i++) {
|
|
60
|
+
yield entries[i];
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=symbol.js.map
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
@license
|
|
3
|
+
Copyright (c) 2020 The Polymer Project Authors. All rights reserved.
|
|
4
|
+
This code may only be used under the BSD style license found at
|
|
5
|
+
http://polymer.github.io/LICENSE.txt The complete set of authors may be found at
|
|
6
|
+
http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
|
|
7
|
+
found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
8
|
+
part of the polymer project is also subject to an additional IP rights grant
|
|
9
|
+
found at http://polymer.github.io/PATENTS.txt
|
|
10
|
+
*/
|
|
11
|
+
const Element_prototype = Element.prototype;
|
|
12
|
+
const nativeHasAttribute = Element.prototype.hasAttribute;
|
|
13
|
+
const nativeSetAttribute = Element.prototype.setAttribute;
|
|
14
|
+
const nativeRemoveAttribute = Element.prototype.removeAttribute;
|
|
15
|
+
if (!Element_prototype.hasOwnProperty('toggleAttribute')) {
|
|
16
|
+
Element_prototype.toggleAttribute = function toggleAttribute(name, force) {
|
|
17
|
+
if (force === undefined) {
|
|
18
|
+
if (nativeHasAttribute.call(this, name)) {
|
|
19
|
+
nativeRemoveAttribute.call(this, name);
|
|
20
|
+
return false;
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
nativeSetAttribute.call(this, name, '');
|
|
24
|
+
return true;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
if (force) {
|
|
28
|
+
if (!nativeHasAttribute.call(this, name)) {
|
|
29
|
+
nativeSetAttribute.call(this, name, '');
|
|
30
|
+
}
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
// force is falsey
|
|
34
|
+
nativeRemoveAttribute.call(this, name);
|
|
35
|
+
return false;
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
export {};
|
|
39
|
+
//# sourceMappingURL=toggle-attribute.js.map
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
|
|
4
|
+
* This code may only be used under the BSD style license found at
|
|
5
|
+
* http://polymer.github.io/LICENSE.txt The complete set of authors may be found
|
|
6
|
+
* at http://polymer.github.io/AUTHORS.txt The complete set of contributors may
|
|
7
|
+
* be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
|
|
8
|
+
* Google as part of the polymer project is also subject to an additional IP
|
|
9
|
+
* rights grant found at http://polymer.github.io/PATENTS.txt
|
|
10
|
+
*/
|
|
11
|
+
// It's desireable to provide a default stylesheet
|
|
12
|
+
// that's convenient for styling unresolved elements, but
|
|
13
|
+
// it's cumbersome to have to include this manually in every page.
|
|
14
|
+
// It would make sense to put inside some HTMLImport but
|
|
15
|
+
// the HTMLImports polyfill does not allow loading of stylesheets
|
|
16
|
+
// that block rendering. Therefore this injection is tolerated here.
|
|
17
|
+
//
|
|
18
|
+
// NOTE: position: relative fixes IE's failure to inherit opacity
|
|
19
|
+
// when a child is not statically positioned.
|
|
20
|
+
const style = document.createElement('style');
|
|
21
|
+
style.textContent =
|
|
22
|
+
'' +
|
|
23
|
+
'body {' +
|
|
24
|
+
'transition: opacity ease-in 0.2s;' +
|
|
25
|
+
' } \n' +
|
|
26
|
+
'body[unresolved] {' +
|
|
27
|
+
'opacity: 0; display: block; overflow: hidden; position: relative;' +
|
|
28
|
+
' } \n';
|
|
29
|
+
const head = document.querySelector('head');
|
|
30
|
+
head.insertBefore(style, head.firstChild);
|
|
31
|
+
export {};
|
|
32
|
+
//# sourceMappingURL=unresolved.js.map
|