@spectrum-web-components/shared 0.15.3 → 0.15.4

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spectrum-web-components/shared",
3
- "version": "0.15.3",
3
+ "version": "0.15.4",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -9,10 +9,10 @@
9
9
  "repository": {
10
10
  "type": "git",
11
11
  "url": "https://github.com/adobe/spectrum-web-components.git",
12
- "directory": "packages/shared"
12
+ "directory": "tools/shared"
13
13
  },
14
14
  "author": "",
15
- "homepage": "https://adobe.github.io/spectrum-web-components/components/shared",
15
+ "homepage": "https://opensource.adobe.com/spectrum-web-components/tools/shared",
16
16
  "bugs": {
17
17
  "url": "https://github.com/adobe/spectrum-web-components/issues"
18
18
  },
@@ -89,7 +89,7 @@
89
89
  ],
90
90
  "dependencies": {
91
91
  "@lit-labs/observers": "^1.0.1",
92
- "@spectrum-web-components/base": "^0.7.2",
92
+ "@spectrum-web-components/base": "^0.7.3",
93
93
  "focus-visible": "^5.1.0"
94
94
  },
95
95
  "types": "./src/index.d.ts",
@@ -97,5 +97,5 @@
97
97
  "sideEffects": [
98
98
  "./**/*.dev.js"
99
99
  ],
100
- "gitHead": "370295c7ce89dd64d3d9a4373fd84e861904ec5a"
100
+ "gitHead": "02534b6685ff89a21dba86c09b2169f5b30a46f2"
101
101
  }
package/src/platform.d.ts CHANGED
@@ -5,4 +5,6 @@ export declare function isIOS(): boolean;
5
5
  export declare function isAppleDevice(): boolean;
6
6
  export declare function isWebKit(): boolean;
7
7
  export declare function isChrome(): boolean;
8
+ export declare function isFirefox(): boolean;
9
+ export declare function isSeamonkey(): boolean;
8
10
  export declare function isAndroid(): boolean;
@@ -26,6 +26,12 @@ export function isWebKit() {
26
26
  export function isChrome() {
27
27
  return testUserAgent(/Chrome/);
28
28
  }
29
+ export function isFirefox() {
30
+ return testUserAgent(/Firefox/) && !isSeamonkey();
31
+ }
32
+ export function isSeamonkey() {
33
+ return testUserAgent(/Seamonkey/);
34
+ }
29
35
  export function isAndroid() {
30
36
  return testUserAgent(/Android/);
31
37
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["platform.ts"],
4
- "sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nfunction testUserAgent(re: RegExp): boolean {\n return typeof window !== 'undefined' && window.navigator != null\n ? re.test(window.navigator.userAgent)\n : false;\n}\n\nfunction testPlatform(re: RegExp): boolean {\n return typeof window !== 'undefined' && window.navigator != null\n ? re.test(window.navigator.platform)\n : false;\n}\n\n/* c8 ignore next 3 */\nexport function isMac(): boolean {\n return testPlatform(/^Mac/);\n}\n\nexport function isIPhone(): boolean {\n return testPlatform(/^iPhone/);\n}\n\nexport function isIPad(): boolean {\n return (\n testPlatform(/^iPad/) ||\n // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.\n (isMac() && navigator.maxTouchPoints > 1)\n );\n}\n\nexport function isIOS(): boolean {\n return isIPhone() || isIPad();\n}\n\n/* c8 ignore next 3 */\nexport function isAppleDevice(): boolean {\n return isMac() || isIOS();\n}\n\n/* c8 ignore next 3 */\nexport function isWebKit(): boolean {\n return testUserAgent(/AppleWebKit/) && !isChrome();\n}\n\n/* c8 ignore next 3 */\nexport function isChrome(): boolean {\n return testUserAgent(/Chrome/);\n}\n\nexport function isAndroid(): boolean {\n return testUserAgent(/Android/);\n}\n"],
5
- "mappings": ";AAYA,SAAS,cAAc,IAAqB;AACxC,SAAO,OAAO,WAAW,eAAe,OAAO,aAAa,OACtD,GAAG,KAAK,OAAO,UAAU,SAAS,IAClC;AACV;AAEA,SAAS,aAAa,IAAqB;AACvC,SAAO,OAAO,WAAW,eAAe,OAAO,aAAa,OACtD,GAAG,KAAK,OAAO,UAAU,QAAQ,IACjC;AACV;AAGO,gBAAS,QAAiB;AAC7B,SAAO,aAAa,MAAM;AAC9B;AAEO,gBAAS,WAAoB;AAChC,SAAO,aAAa,SAAS;AACjC;AAEO,gBAAS,SAAkB;AAC9B,SACI,aAAa,OAAO,KAEnB,MAAM,KAAK,UAAU,iBAAiB;AAE/C;AAEO,gBAAS,QAAiB;AAC7B,SAAO,SAAS,KAAK,OAAO;AAChC;AAGO,gBAAS,gBAAyB;AACrC,SAAO,MAAM,KAAK,MAAM;AAC5B;AAGO,gBAAS,WAAoB;AAChC,SAAO,cAAc,aAAa,KAAK,CAAC,SAAS;AACrD;AAGO,gBAAS,WAAoB;AAChC,SAAO,cAAc,QAAQ;AACjC;AAEO,gBAAS,YAAqB;AACjC,SAAO,cAAc,SAAS;AAClC;",
4
+ "sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nfunction testUserAgent(re: RegExp): boolean {\n return typeof window !== 'undefined' && window.navigator != null\n ? re.test(window.navigator.userAgent)\n : false;\n}\n\nfunction testPlatform(re: RegExp): boolean {\n return typeof window !== 'undefined' && window.navigator != null\n ? re.test(window.navigator.platform)\n : false;\n}\n\n/* c8 ignore next 3 */\nexport function isMac(): boolean {\n return testPlatform(/^Mac/);\n}\n\nexport function isIPhone(): boolean {\n return testPlatform(/^iPhone/);\n}\n\nexport function isIPad(): boolean {\n return (\n testPlatform(/^iPad/) ||\n // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.\n (isMac() && navigator.maxTouchPoints > 1)\n );\n}\n\nexport function isIOS(): boolean {\n return isIPhone() || isIPad();\n}\n\n/* c8 ignore next 3 */\nexport function isAppleDevice(): boolean {\n return isMac() || isIOS();\n}\n\n/* c8 ignore next 3 */\nexport function isWebKit(): boolean {\n return testUserAgent(/AppleWebKit/) && !isChrome();\n}\n\n/* c8 ignore next 3 */\nexport function isChrome(): boolean {\n return testUserAgent(/Chrome/);\n}\n\nexport function isFirefox(): boolean {\n return testUserAgent(/Firefox/) && !isSeamonkey();\n}\n\nexport function isSeamonkey(): boolean {\n return testUserAgent(/Seamonkey/);\n}\n\nexport function isAndroid(): boolean {\n return testUserAgent(/Android/);\n}\n"],
5
+ "mappings": ";AAYA,SAAS,cAAc,IAAqB;AACxC,SAAO,OAAO,WAAW,eAAe,OAAO,aAAa,OACtD,GAAG,KAAK,OAAO,UAAU,SAAS,IAClC;AACV;AAEA,SAAS,aAAa,IAAqB;AACvC,SAAO,OAAO,WAAW,eAAe,OAAO,aAAa,OACtD,GAAG,KAAK,OAAO,UAAU,QAAQ,IACjC;AACV;AAGO,gBAAS,QAAiB;AAC7B,SAAO,aAAa,MAAM;AAC9B;AAEO,gBAAS,WAAoB;AAChC,SAAO,aAAa,SAAS;AACjC;AAEO,gBAAS,SAAkB;AAC9B,SACI,aAAa,OAAO,KAEnB,MAAM,KAAK,UAAU,iBAAiB;AAE/C;AAEO,gBAAS,QAAiB;AAC7B,SAAO,SAAS,KAAK,OAAO;AAChC;AAGO,gBAAS,gBAAyB;AACrC,SAAO,MAAM,KAAK,MAAM;AAC5B;AAGO,gBAAS,WAAoB;AAChC,SAAO,cAAc,aAAa,KAAK,CAAC,SAAS;AACrD;AAGO,gBAAS,WAAoB;AAChC,SAAO,cAAc,QAAQ;AACjC;AAEO,gBAAS,YAAqB;AACjC,SAAO,cAAc,SAAS,KAAK,CAAC,YAAY;AACpD;AAEO,gBAAS,cAAuB;AACnC,SAAO,cAAc,WAAW;AACpC;AAEO,gBAAS,YAAqB;AACjC,SAAO,cAAc,SAAS;AAClC;",
6
6
  "names": []
7
7
  }
package/src/platform.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";function o(n){return typeof window!="undefined"&&window.navigator!=null?n.test(window.navigator.userAgent):!1}function e(n){return typeof window!="undefined"&&window.navigator!=null?n.test(window.navigator.platform):!1}export function isMac(){return e(/^Mac/)}export function isIPhone(){return e(/^iPhone/)}export function isIPad(){return e(/^iPad/)||isMac()&&navigator.maxTouchPoints>1}export function isIOS(){return isIPhone()||isIPad()}export function isAppleDevice(){return isMac()||isIOS()}export function isWebKit(){return o(/AppleWebKit/)&&!isChrome()}export function isChrome(){return o(/Chrome/)}export function isAndroid(){return o(/Android/)}
1
+ "use strict";function n(o){return typeof window!="undefined"&&window.navigator!=null?o.test(window.navigator.userAgent):!1}function e(o){return typeof window!="undefined"&&window.navigator!=null?o.test(window.navigator.platform):!1}export function isMac(){return e(/^Mac/)}export function isIPhone(){return e(/^iPhone/)}export function isIPad(){return e(/^iPad/)||isMac()&&navigator.maxTouchPoints>1}export function isIOS(){return isIPhone()||isIPad()}export function isAppleDevice(){return isMac()||isIOS()}export function isWebKit(){return n(/AppleWebKit/)&&!isChrome()}export function isChrome(){return n(/Chrome/)}export function isFirefox(){return n(/Firefox/)&&!isSeamonkey()}export function isSeamonkey(){return n(/Seamonkey/)}export function isAndroid(){return n(/Android/)}
2
2
  //# sourceMappingURL=platform.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["platform.ts"],
4
- "sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nfunction testUserAgent(re: RegExp): boolean {\n return typeof window !== 'undefined' && window.navigator != null\n ? re.test(window.navigator.userAgent)\n : false;\n}\n\nfunction testPlatform(re: RegExp): boolean {\n return typeof window !== 'undefined' && window.navigator != null\n ? re.test(window.navigator.platform)\n : false;\n}\n\n/* c8 ignore next 3 */\nexport function isMac(): boolean {\n return testPlatform(/^Mac/);\n}\n\nexport function isIPhone(): boolean {\n return testPlatform(/^iPhone/);\n}\n\nexport function isIPad(): boolean {\n return (\n testPlatform(/^iPad/) ||\n // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.\n (isMac() && navigator.maxTouchPoints > 1)\n );\n}\n\nexport function isIOS(): boolean {\n return isIPhone() || isIPad();\n}\n\n/* c8 ignore next 3 */\nexport function isAppleDevice(): boolean {\n return isMac() || isIOS();\n}\n\n/* c8 ignore next 3 */\nexport function isWebKit(): boolean {\n return testUserAgent(/AppleWebKit/) && !isChrome();\n}\n\n/* c8 ignore next 3 */\nexport function isChrome(): boolean {\n return testUserAgent(/Chrome/);\n}\n\nexport function isAndroid(): boolean {\n return testUserAgent(/Android/);\n}\n"],
5
- "mappings": "aAYA,SAASA,EAAcC,EAAqB,CACxC,OAAO,OAAO,QAAW,aAAe,OAAO,WAAa,KACtDA,EAAG,KAAK,OAAO,UAAU,SAAS,EAClC,EACV,CAEA,SAASC,EAAaD,EAAqB,CACvC,OAAO,OAAO,QAAW,aAAe,OAAO,WAAa,KACtDA,EAAG,KAAK,OAAO,UAAU,QAAQ,EACjC,EACV,CAGO,gBAAS,OAAiB,CAC7B,OAAOC,EAAa,MAAM,CAC9B,CAEO,gBAAS,UAAoB,CAChC,OAAOA,EAAa,SAAS,CACjC,CAEO,gBAAS,QAAkB,CAC9B,OACIA,EAAa,OAAO,GAEnB,MAAM,GAAK,UAAU,eAAiB,CAE/C,CAEO,gBAAS,OAAiB,CAC7B,OAAO,SAAS,GAAK,OAAO,CAChC,CAGO,gBAAS,eAAyB,CACrC,OAAO,MAAM,GAAK,MAAM,CAC5B,CAGO,gBAAS,UAAoB,CAChC,OAAOF,EAAc,aAAa,GAAK,CAAC,SAAS,CACrD,CAGO,gBAAS,UAAoB,CAChC,OAAOA,EAAc,QAAQ,CACjC,CAEO,gBAAS,WAAqB,CACjC,OAAOA,EAAc,SAAS,CAClC",
4
+ "sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nfunction testUserAgent(re: RegExp): boolean {\n return typeof window !== 'undefined' && window.navigator != null\n ? re.test(window.navigator.userAgent)\n : false;\n}\n\nfunction testPlatform(re: RegExp): boolean {\n return typeof window !== 'undefined' && window.navigator != null\n ? re.test(window.navigator.platform)\n : false;\n}\n\n/* c8 ignore next 3 */\nexport function isMac(): boolean {\n return testPlatform(/^Mac/);\n}\n\nexport function isIPhone(): boolean {\n return testPlatform(/^iPhone/);\n}\n\nexport function isIPad(): boolean {\n return (\n testPlatform(/^iPad/) ||\n // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.\n (isMac() && navigator.maxTouchPoints > 1)\n );\n}\n\nexport function isIOS(): boolean {\n return isIPhone() || isIPad();\n}\n\n/* c8 ignore next 3 */\nexport function isAppleDevice(): boolean {\n return isMac() || isIOS();\n}\n\n/* c8 ignore next 3 */\nexport function isWebKit(): boolean {\n return testUserAgent(/AppleWebKit/) && !isChrome();\n}\n\n/* c8 ignore next 3 */\nexport function isChrome(): boolean {\n return testUserAgent(/Chrome/);\n}\n\nexport function isFirefox(): boolean {\n return testUserAgent(/Firefox/) && !isSeamonkey();\n}\n\nexport function isSeamonkey(): boolean {\n return testUserAgent(/Seamonkey/);\n}\n\nexport function isAndroid(): boolean {\n return testUserAgent(/Android/);\n}\n"],
5
+ "mappings": "aAYA,SAASA,EAAcC,EAAqB,CACxC,OAAO,OAAO,QAAW,aAAe,OAAO,WAAa,KACtDA,EAAG,KAAK,OAAO,UAAU,SAAS,EAClC,EACV,CAEA,SAASC,EAAaD,EAAqB,CACvC,OAAO,OAAO,QAAW,aAAe,OAAO,WAAa,KACtDA,EAAG,KAAK,OAAO,UAAU,QAAQ,EACjC,EACV,CAGO,gBAAS,OAAiB,CAC7B,OAAOC,EAAa,MAAM,CAC9B,CAEO,gBAAS,UAAoB,CAChC,OAAOA,EAAa,SAAS,CACjC,CAEO,gBAAS,QAAkB,CAC9B,OACIA,EAAa,OAAO,GAEnB,MAAM,GAAK,UAAU,eAAiB,CAE/C,CAEO,gBAAS,OAAiB,CAC7B,OAAO,SAAS,GAAK,OAAO,CAChC,CAGO,gBAAS,eAAyB,CACrC,OAAO,MAAM,GAAK,MAAM,CAC5B,CAGO,gBAAS,UAAoB,CAChC,OAAOF,EAAc,aAAa,GAAK,CAAC,SAAS,CACrD,CAGO,gBAAS,UAAoB,CAChC,OAAOA,EAAc,QAAQ,CACjC,CAEO,gBAAS,WAAqB,CACjC,OAAOA,EAAc,SAAS,GAAK,CAAC,YAAY,CACpD,CAEO,gBAAS,aAAuB,CACnC,OAAOA,EAAc,WAAW,CACpC,CAEO,gBAAS,WAAqB,CACjC,OAAOA,EAAc,SAAS,CAClC",
6
6
  "names": ["testUserAgent", "re", "testPlatform"]
7
7
  }