@spectrum-web-components/shared 0.15.0 → 0.15.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.
Files changed (54) hide show
  1. package/package.json +2 -2
  2. package/src/first-focusable-in.dev.js +4 -1
  3. package/src/first-focusable-in.dev.js.map +1 -1
  4. package/src/first-focusable-in.js +1 -1
  5. package/src/first-focusable-in.js.map +2 -2
  6. package/src/focus-visible.dev.js +10 -2
  7. package/src/focus-visible.dev.js.map +1 -1
  8. package/src/focus-visible.js +1 -1
  9. package/src/focus-visible.js.map +2 -2
  10. package/src/focusable.d.ts +2 -0
  11. package/src/focusable.dev.js +36 -10
  12. package/src/focusable.dev.js.map +2 -2
  13. package/src/focusable.js +1 -1
  14. package/src/focusable.js.map +3 -3
  15. package/src/get-active-element.dev.js +1 -0
  16. package/src/get-active-element.dev.js.map +1 -1
  17. package/src/get-active-element.js +1 -1
  18. package/src/get-active-element.js.map +2 -2
  19. package/src/get-deep-element-from-point.dev.js +1 -0
  20. package/src/get-deep-element-from-point.dev.js.map +1 -1
  21. package/src/get-deep-element-from-point.js +1 -1
  22. package/src/get-deep-element-from-point.js.map +2 -2
  23. package/src/index.dev.js +1 -0
  24. package/src/index.dev.js.map +1 -1
  25. package/src/index.js +1 -1
  26. package/src/index.js.map +1 -1
  27. package/src/like-anchor.dev.js +1 -0
  28. package/src/like-anchor.dev.js.map +1 -1
  29. package/src/like-anchor.js +7 -7
  30. package/src/like-anchor.js.map +2 -2
  31. package/src/observe-slot-presence.dev.js +11 -3
  32. package/src/observe-slot-presence.dev.js.map +1 -1
  33. package/src/observe-slot-presence.js +1 -1
  34. package/src/observe-slot-presence.js.map +2 -2
  35. package/src/observe-slot-text.dev.js +8 -5
  36. package/src/observe-slot-text.dev.js.map +1 -1
  37. package/src/observe-slot-text.js +1 -1
  38. package/src/observe-slot-text.js.map +2 -2
  39. package/src/platform.dev.js +1 -0
  40. package/src/platform.dev.js.map +1 -1
  41. package/src/platform.js +1 -1
  42. package/src/platform.js.map +2 -2
  43. package/src/reparent-children.dev.js +9 -2
  44. package/src/reparent-children.dev.js.map +1 -1
  45. package/src/reparent-children.js +1 -1
  46. package/src/reparent-children.js.map +2 -2
  47. package/test/focusable.test.js +23 -2
  48. package/test/focusable.test.js.map +1 -1
  49. package/test/observe-slot-presence.test.js +27 -3
  50. package/test/observe-slot-presence.test.js.map +1 -1
  51. package/test/observe-slot-text.test.js +24 -3
  52. package/test/observe-slot-text.test.js.map +1 -1
  53. package/test/reparent-children.test.js +181 -9
  54. package/test/reparent-children.test.js.map +2 -2
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["like-anchor.ts"],
4
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*/\nimport {\n html,\n ReactiveElement,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport { property } from '@spectrum-web-components/base/src/decorators.js';\nimport { ifDefined } from '@spectrum-web-components/base/src/directives.js';\n\ntype Constructor<T = Record<string, unknown>> = {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n new (...args: any[]): T;\n prototype: T;\n};\n\ntype RenderAnchorOptions = {\n id: string;\n className?: string;\n ariaHidden?: boolean;\n anchorContent?: TemplateResult | TemplateResult[];\n labelledby?: string;\n tabindex?: -1 | 0;\n};\n\nexport interface LikeAnchorInterface {\n download?: string;\n label?: string;\n href?: string;\n rel?: string;\n target?: '_blank' | '_parent' | '_self' | '_top';\n renderAnchor(options: RenderAnchorOptions): TemplateResult;\n}\n\nexport function LikeAnchor<T extends Constructor<ReactiveElement>>(\n constructor: T\n): T & Constructor<LikeAnchorInterface> {\n class LikeAnchorElement extends constructor {\n @property({ reflect: true })\n public download?: string;\n\n @property()\n public label?: string;\n\n @property({ reflect: true })\n public href?: string;\n\n @property({ reflect: true })\n public target?: '_blank' | '_parent' | '_self' | '_top';\n\n @property({ reflect: true })\n public rel?: string;\n\n public renderAnchor({\n id,\n className,\n ariaHidden,\n labelledby,\n tabindex,\n // prettier-ignore\n anchorContent = html`<slot></slot>`,\n }: RenderAnchorOptions): TemplateResult {\n // prettier-ignore\n return html\n `<a\n id=${id}\n class=${ifDefined(className)}\n href=${ifDefined(this.href)}\n download=${ifDefined(this.download)}\n target=${ifDefined(this.target)}\n aria-label=${ifDefined(this.label)}\n aria-labelledby=${ifDefined(labelledby)}\n aria-hidden=${ifDefined(ariaHidden ? 'true' : undefined)}\n tabindex=${ifDefined(tabindex)}\n rel=${ifDefined(this.rel)}\n >${anchorContent}</a>`;\n }\n }\n return LikeAnchorElement;\n}\n"],
5
- "mappings": "wMAWA,qDAKA,2EACA,4EA0BO,2BACH,EACoC,CACpC,MAAM,SAA0B,EAAY,CAgBjC,aAAa,CAChB,KACA,YACA,aACA,aACA,WAEA,gBAAgB,kBACoB,CAEpC,MAAO;AAAA,yBAEM;AAAA,4BACG,EAAU,CAAS;AAAA,2BACpB,EAAU,KAAK,IAAI;AAAA,+BACf,EAAU,KAAK,QAAQ;AAAA,6BACzB,EAAU,KAAK,MAAM;AAAA,iCACjB,EAAU,KAAK,KAAK;AAAA,sCACf,EAAU,CAAU;AAAA,kCACxB,EAAU,EAAa,OAAS,MAAS;AAAA,+BAC5C,EAAU,CAAQ;AAAA,0BACvB,EAAU,KAAK,GAAG;AAAA,mBACzB,OACX,CACJ,CAtCW,UADP,AAAC,EAAS,CAAE,QAAS,EAAK,CAAC,GACpB,AAFX,EAEW,wBAGA,GADP,AAAC,EAAS,GACH,AALX,EAKW,qBAGA,GADP,AAAC,EAAS,CAAE,QAAS,EAAK,CAAC,GACpB,AARX,EAQW,oBAGA,GADP,AAAC,EAAS,CAAE,QAAS,EAAK,CAAC,GACpB,AAXX,EAWW,sBAGA,GADP,AAAC,EAAS,CAAE,QAAS,EAAK,CAAC,GACpB,AAdX,EAcW,mBA2BJ,CACX",
6
- "names": []
5
+ "mappings": "qNAWA,OACI,QAAAA,MAGG,gCACP,OAAS,YAAAC,MAAgB,kDACzB,OAAS,aAAAC,MAAiB,kDA0BnB,gBAAS,WACZC,EACoC,CACpC,MAAMC,UAA0BD,CAAY,CAgBjC,aAAa,CAChB,GAAAE,EACA,UAAAC,EACA,WAAAC,EACA,WAAAC,EACA,SAAAC,EAEA,cAAAC,EAAgBV,gBACpB,EAAwC,CAEpC,OAAOA;AAAA,yBAEMK;AAAA,4BACGH,EAAUI,CAAS;AAAA,2BACpBJ,EAAU,KAAK,IAAI;AAAA,+BACfA,EAAU,KAAK,QAAQ;AAAA,6BACzBA,EAAU,KAAK,MAAM;AAAA,iCACjBA,EAAU,KAAK,KAAK;AAAA,sCACfA,EAAUM,CAAU;AAAA,kCACxBN,EAAUK,EAAa,OAAS,MAAS;AAAA,+BAC5CL,EAAUO,CAAQ;AAAA,0BACvBP,EAAU,KAAK,GAAG;AAAA,mBACzBQ,OACX,CACJ,CAtCW,OAAAC,EAAA,CADNV,EAAS,CAAE,QAAS,EAAK,CAAC,GADzBG,EAEK,wBAGAO,EAAA,CADNV,EAAS,GAJRG,EAKK,qBAGAO,EAAA,CADNV,EAAS,CAAE,QAAS,EAAK,CAAC,GAPzBG,EAQK,oBAGAO,EAAA,CADNV,EAAS,CAAE,QAAS,EAAK,CAAC,GAVzBG,EAWK,sBAGAO,EAAA,CADNV,EAAS,CAAE,QAAS,EAAK,CAAC,GAbzBG,EAcK,mBA2BJA,CACX",
6
+ "names": ["html", "property", "ifDefined", "constructor", "LikeAnchorElement", "id", "className", "ariaHidden", "labelledby", "tabindex", "anchorContent", "__decorateClass"]
7
7
  }
@@ -1,3 +1,4 @@
1
+ "use strict";
1
2
  import { MutationController } from "@lit-labs/observers/mutation_controller.js";
2
3
  const slotContentIsPresent = Symbol("slotContentIsPresent");
3
4
  export function ObserveSlotPresence(constructor, lightDomSelector) {
@@ -13,7 +14,10 @@ export function ObserveSlotPresence(constructor, lightDomSelector) {
13
14
  const nextValue = !!this.querySelector(selector);
14
15
  const previousValue = this[slotContentIsPresent].get(selector) || false;
15
16
  changes = changes || previousValue !== nextValue;
16
- this[slotContentIsPresent].set(selector, !!this.querySelector(selector));
17
+ this[slotContentIsPresent].set(
18
+ selector,
19
+ !!this.querySelector(selector)
20
+ );
17
21
  });
18
22
  if (changes) {
19
23
  this.updateComplete.then(() => {
@@ -36,14 +40,18 @@ export function ObserveSlotPresence(constructor, lightDomSelector) {
36
40
  if (lightDomSelectors.length === 1) {
37
41
  return this[slotContentIsPresent].get(lightDomSelectors[0]) || false;
38
42
  } else {
39
- throw new Error("Multiple selectors provided to `ObserveSlotPresence` use `getSlotContentPresence(selector: string)` instead.");
43
+ throw new Error(
44
+ "Multiple selectors provided to `ObserveSlotPresence` use `getSlotContentPresence(selector: string)` instead."
45
+ );
40
46
  }
41
47
  }
42
48
  getSlotContentPresence(selector) {
43
49
  if (this[slotContentIsPresent].has(selector)) {
44
50
  return this[slotContentIsPresent].get(selector) || false;
45
51
  }
46
- throw new Error(`The provided selector \`${selector}\` is not being observed.`);
52
+ throw new Error(
53
+ `The provided selector \`${selector}\` is not being observed.`
54
+ );
47
55
  }
48
56
  }
49
57
  _a = slotContentIsPresent;
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["observe-slot-presence.ts"],
4
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\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*/\nimport { ReactiveElement } from '@spectrum-web-components/base';\nimport { MutationController } from '@lit-labs/observers/mutation_controller.js';\n\nconst slotContentIsPresent = Symbol('slotContentIsPresent');\n\ntype Constructor<T = Record<string, unknown>> = {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n new (...args: any[]): T;\n prototype: T;\n};\n\nexport interface SlotPresenceObservingInterface {\n slotContentIsPresent: boolean;\n getSlotContentPresence(selector: string): boolean;\n managePresenceObservedSlot(): void;\n}\n\nexport function ObserveSlotPresence<T extends Constructor<ReactiveElement>>(\n constructor: T,\n lightDomSelector: string | string[]\n): T & Constructor<SlotPresenceObservingInterface> {\n const lightDomSelectors = Array.isArray(lightDomSelector)\n ? lightDomSelector\n : [lightDomSelector];\n class SlotPresenceObservingElement\n extends constructor\n implements SlotPresenceObservingInterface\n {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n constructor(...args: any[]) {\n super(args);\n\n new MutationController(this, {\n config: {\n childList: true,\n subtree: true,\n },\n callback: () => {\n this.managePresenceObservedSlot();\n },\n });\n\n this.managePresenceObservedSlot();\n }\n\n /**\n * @private\n */\n public get slotContentIsPresent(): boolean {\n if (lightDomSelectors.length === 1) {\n return (\n this[slotContentIsPresent].get(lightDomSelectors[0]) ||\n false\n );\n } else {\n throw new Error(\n 'Multiple selectors provided to `ObserveSlotPresence` use `getSlotContentPresence(selector: string)` instead.'\n );\n }\n }\n private [slotContentIsPresent]: Map<string, boolean> = new Map();\n\n public getSlotContentPresence(selector: string): boolean {\n if (this[slotContentIsPresent].has(selector)) {\n return this[slotContentIsPresent].get(selector) || false;\n }\n throw new Error(\n `The provided selector \\`${selector}\\` is not being observed.`\n );\n }\n\n public managePresenceObservedSlot = (): void => {\n let changes = false;\n lightDomSelectors.forEach((selector) => {\n const nextValue = !!this.querySelector(selector);\n const previousValue =\n this[slotContentIsPresent].get(selector) || false;\n changes = changes || previousValue !== nextValue;\n this[slotContentIsPresent].set(\n selector,\n !!this.querySelector(selector)\n );\n });\n if (changes) {\n this.updateComplete.then(() => {\n this.requestUpdate();\n });\n }\n };\n }\n return SlotPresenceObservingElement;\n}\n"],
5
- "mappings": "AAWA;AAEA,MAAM,uBAAuB,OAAO,sBAAsB;AAcnD,oCACH,aACA,kBAC+C;AA9BnD;AA+BI,QAAM,oBAAoB,MAAM,QAAQ,gBAAgB,IAClD,mBACA,CAAC,gBAAgB;AACvB,QAAM,qCACM,YAEZ;AAAA,IAEI,eAAe,MAAa;AACxB,YAAM,IAAI;AA8BL,iBAA8C,oBAAI,IAAI;AAWxD,wCAA6B,MAAY;AAC5C,YAAI,UAAU;AACd,0BAAkB,QAAQ,CAAC,aAAa;AACpC,gBAAM,YAAY,CAAC,CAAC,KAAK,cAAc,QAAQ;AAC/C,gBAAM,gBACF,KAAK,sBAAsB,IAAI,QAAQ,KAAK;AAChD,oBAAU,WAAW,kBAAkB;AACvC,eAAK,sBAAsB,IACvB,UACA,CAAC,CAAC,KAAK,cAAc,QAAQ,CACjC;AAAA,QACJ,CAAC;AACD,YAAI,SAAS;AACT,eAAK,eAAe,KAAK,MAAM;AAC3B,iBAAK,cAAc;AAAA,UACvB,CAAC;AAAA,QACL;AAAA,MACJ;AAxDI,UAAI,mBAAmB,MAAM;AAAA,QACzB,QAAQ;AAAA,UACJ,WAAW;AAAA,UACX,SAAS;AAAA,QACb;AAAA,QACA,UAAU,MAAM;AACZ,eAAK,2BAA2B;AAAA,QACpC;AAAA,MACJ,CAAC;AAED,WAAK,2BAA2B;AAAA,IACpC;AAAA,QAKW,uBAAgC;AACvC,UAAI,kBAAkB,WAAW,GAAG;AAChC,eACI,KAAK,sBAAsB,IAAI,kBAAkB,EAAE,KACnD;AAAA,MAER,OAAO;AACH,cAAM,IAAI,MACN,8GACJ;AAAA,MACJ;AAAA,IACJ;AAAA,IAGO,uBAAuB,UAA2B;AACrD,UAAI,KAAK,sBAAsB,IAAI,QAAQ,GAAG;AA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;AAAA,MACJ;AAAA,IACJ;AAAA,IAGO,uBAAuB,UAA2B;AACrD,UAAI,KAAK,sBAAsB,IAAI,QAAQ,GAAG;AAC1C,eAAO,KAAK,sBAAsB,IAAI,QAAQ,KAAK;AAAA,MACvD;AACA,YAAM,IAAI;AAAA,QACN,2BAA2B;AAAA,MAC/B;AAAA,IACJ;AAAA,EAoBJ;AAnGJ,EAsEiB;AA8Bb,SAAO;AACX;",
6
6
  "names": []
7
7
  }
@@ -1,2 +1,2 @@
1
- import{MutationController as c}from"@lit-labs/observers/mutation_controller.js";const t=Symbol("slotContentIsPresent");export function ObserveSlotPresence(o,r){var g;const s=Array.isArray(r)?r:[r];class i extends o{constructor(...e){super(e);this[g]=new Map;this.managePresenceObservedSlot=()=>{let e=!1;s.forEach(n=>{const l=!!this.querySelector(n),a=this[t].get(n)||!1;e=e||a!==l,this[t].set(n,!!this.querySelector(n))}),e&&this.updateComplete.then(()=>{this.requestUpdate()})};new c(this,{config:{childList:!0,subtree:!0},callback:()=>{this.managePresenceObservedSlot()}}),this.managePresenceObservedSlot()}get slotContentIsPresent(){if(s.length===1)return this[t].get(s[0])||!1;throw new Error("Multiple selectors provided to `ObserveSlotPresence` use `getSlotContentPresence(selector: string)` instead.")}getSlotContentPresence(e){if(this[t].has(e))return this[t].get(e)||!1;throw new Error(`The provided selector \`${e}\` is not being observed.`)}}return g=t,i}
1
+ "use strict";import{MutationController as g}from"@lit-labs/observers/mutation_controller.js";const t=Symbol("slotContentIsPresent");export function ObserveSlotPresence(o,r){var l;const s=Array.isArray(r)?r:[r];class i extends o{constructor(...e){super(e);this[l]=new Map;this.managePresenceObservedSlot=()=>{let e=!1;s.forEach(n=>{const a=!!this.querySelector(n),c=this[t].get(n)||!1;e=e||c!==a,this[t].set(n,!!this.querySelector(n))}),e&&this.updateComplete.then(()=>{this.requestUpdate()})};new g(this,{config:{childList:!0,subtree:!0},callback:()=>{this.managePresenceObservedSlot()}}),this.managePresenceObservedSlot()}get slotContentIsPresent(){if(s.length===1)return this[t].get(s[0])||!1;throw new Error("Multiple selectors provided to `ObserveSlotPresence` use `getSlotContentPresence(selector: string)` instead.")}getSlotContentPresence(e){if(this[t].has(e))return this[t].get(e)||!1;throw new Error(`The provided selector \`${e}\` is not being observed.`)}}return l=t,i}
2
2
  //# sourceMappingURL=observe-slot-presence.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["observe-slot-presence.ts"],
4
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\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*/\nimport { ReactiveElement } from '@spectrum-web-components/base';\nimport { MutationController } from '@lit-labs/observers/mutation_controller.js';\n\nconst slotContentIsPresent = Symbol('slotContentIsPresent');\n\ntype Constructor<T = Record<string, unknown>> = {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n new (...args: any[]): T;\n prototype: T;\n};\n\nexport interface SlotPresenceObservingInterface {\n slotContentIsPresent: boolean;\n getSlotContentPresence(selector: string): boolean;\n managePresenceObservedSlot(): void;\n}\n\nexport function ObserveSlotPresence<T extends Constructor<ReactiveElement>>(\n constructor: T,\n lightDomSelector: string | string[]\n): T & Constructor<SlotPresenceObservingInterface> {\n const lightDomSelectors = Array.isArray(lightDomSelector)\n ? lightDomSelector\n : [lightDomSelector];\n class SlotPresenceObservingElement\n extends constructor\n implements SlotPresenceObservingInterface\n {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n constructor(...args: any[]) {\n super(args);\n\n new MutationController(this, {\n config: {\n childList: true,\n subtree: true,\n },\n callback: () => {\n this.managePresenceObservedSlot();\n },\n });\n\n this.managePresenceObservedSlot();\n }\n\n /**\n * @private\n */\n public get slotContentIsPresent(): boolean {\n if (lightDomSelectors.length === 1) {\n return (\n this[slotContentIsPresent].get(lightDomSelectors[0]) ||\n false\n );\n } else {\n throw new Error(\n 'Multiple selectors provided to `ObserveSlotPresence` use `getSlotContentPresence(selector: string)` instead.'\n );\n }\n }\n private [slotContentIsPresent]: Map<string, boolean> = new Map();\n\n public getSlotContentPresence(selector: string): boolean {\n if (this[slotContentIsPresent].has(selector)) {\n return this[slotContentIsPresent].get(selector) || false;\n }\n throw new Error(\n `The provided selector \\`${selector}\\` is not being observed.`\n );\n }\n\n public managePresenceObservedSlot = (): void => {\n let changes = false;\n lightDomSelectors.forEach((selector) => {\n const nextValue = !!this.querySelector(selector);\n const previousValue =\n this[slotContentIsPresent].get(selector) || false;\n changes = changes || previousValue !== nextValue;\n this[slotContentIsPresent].set(\n selector,\n !!this.querySelector(selector)\n );\n });\n if (changes) {\n this.updateComplete.then(() => {\n this.requestUpdate();\n });\n }\n };\n }\n return SlotPresenceObservingElement;\n}\n"],
5
- "mappings": "AAWA,gFAEA,KAAM,GAAuB,OAAO,sBAAsB,EAcnD,oCACH,EACA,EAC+C,CA9BnD,MA+BI,KAAM,GAAoB,MAAM,QAAQ,CAAgB,EAClD,EACA,CAAC,CAAgB,EACvB,MAAM,SACM,EAEZ,CAEI,eAAe,EAAa,CACxB,MAAM,CAAI,EA8BL,QAA8C,GAAI,KAWpD,gCAA6B,IAAY,CAC5C,GAAI,GAAU,GACd,EAAkB,QAAQ,AAAC,GAAa,CACpC,KAAM,GAAY,CAAC,CAAC,KAAK,cAAc,CAAQ,EACzC,EACF,KAAK,GAAsB,IAAI,CAAQ,GAAK,GAChD,EAAU,GAAW,IAAkB,EACvC,KAAK,GAAsB,IACvB,EACA,CAAC,CAAC,KAAK,cAAc,CAAQ,CACjC,CACJ,CAAC,EACG,GACA,KAAK,eAAe,KAAK,IAAM,CAC3B,KAAK,cAAc,CACvB,CAAC,CAET,EAxDI,G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AC,EAED,KAAK,2BAA2B,CACpC,CAKA,IAAW,sBAAgC,CACvC,GAAIK,EAAkB,SAAW,EAC7B,OACI,KAAKJ,GAAsB,IAAII,EAAkB,EAAE,GACnD,GAGJ,MAAM,IAAI,MACN,8GACJ,CAER,CAGO,uBAAuBI,EAA2B,CACrD,GAAI,KAAKR,GAAsB,IAAIQ,CAAQ,EACvC,OAAO,KAAKR,GAAsB,IAAIQ,CAAQ,GAAK,GAEvD,MAAM,IAAI,MACN,2BAA2BA,4BAC/B,CACJ,CAoBJ,CAnGJ,OAsEiBL,EAAAH,EA8BNK,CACX",
6
+ "names": ["MutationController", "slotContentIsPresent", "constructor", "lightDomSelector", "_a", "lightDomSelectors", "SlotPresenceObservingElement", "args", "changes", "selector", "nextValue", "previousValue"]
7
7
  }
@@ -1,3 +1,4 @@
1
+ "use strict";
1
2
  var __defProp = Object.defineProperty;
2
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
4
  var __decorateClass = (decorators, target, key, kind) => {
@@ -39,12 +40,14 @@ export function ObserveSlotText(constructor, slotName) {
39
40
  manageTextObservedSlot() {
40
41
  if (!this[assignedNodesList])
41
42
  return;
42
- const assignedNodes = [...this[assignedNodesList]].filter((node) => {
43
- if (node.tagName) {
44
- return true;
43
+ const assignedNodes = [...this[assignedNodesList]].filter(
44
+ (node) => {
45
+ if (node.tagName) {
46
+ return true;
47
+ }
48
+ return node.textContent ? node.textContent.trim() : false;
45
49
  }
46
- return node.textContent ? node.textContent.trim() : false;
47
- });
50
+ );
48
51
  this.slotHasContent = assignedNodes.length > 0;
49
52
  }
50
53
  update(changedProperties) {
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["observe-slot-text.ts"],
4
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*/\nimport { PropertyValues, ReactiveElement } from '@spectrum-web-components/base';\nimport {\n property,\n queryAssignedNodes,\n} from '@spectrum-web-components/base/src/decorators.js';\nimport { MutationController } from '@lit-labs/observers/mutation_controller.js';\n\nconst assignedNodesList = Symbol('assignedNodes');\n\ntype Constructor<T = Record<string, unknown>> = {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n new (...args: any[]): T;\n prototype: T;\n};\n\nexport interface SlotTextObservingInterface {\n slotHasContent: boolean;\n manageTextObservedSlot(): void;\n}\n\nexport function ObserveSlotText<T extends Constructor<ReactiveElement>>(\n constructor: T,\n slotName?: string\n): T & Constructor<SlotTextObservingInterface> {\n class SlotTextObservingElement\n extends constructor\n implements SlotTextObservingInterface\n {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n constructor(...args: any[]) {\n super(args);\n\n new MutationController(this, {\n config: {\n characterData: true,\n subtree: true,\n },\n callback: (mutationsList: Array<MutationRecord>) => {\n for (const mutation of mutationsList) {\n if (mutation.type === 'characterData') {\n this.manageTextObservedSlot();\n return;\n }\n }\n },\n });\n }\n\n @property({ type: Boolean, attribute: false })\n public slotHasContent = false;\n\n @queryAssignedNodes(slotName, true)\n private [assignedNodesList]!: NodeListOf<HTMLElement>;\n\n public manageTextObservedSlot(): void {\n if (!this[assignedNodesList]) return;\n const assignedNodes = [...this[assignedNodesList]].filter(\n (node) => {\n if ((node as HTMLElement).tagName) {\n return true;\n }\n return node.textContent ? node.textContent.trim() : false;\n }\n );\n this.slotHasContent = assignedNodes.length > 0;\n }\n\n protected override update(changedProperties: PropertyValues): void {\n if (!this.hasUpdated) {\n const { childNodes } = this;\n const textNodes = [...childNodes].filter((node) => {\n if ((node as HTMLElement).tagName) {\n return slotName\n ? (node as HTMLElement).getAttribute('slot') ===\n slotName\n : !(node as HTMLElement).hasAttribute('slot');\n }\n return node.textContent ? node.textContent.trim() : false;\n });\n this.slotHasContent = textNodes.length > 0;\n }\n super.update(changedProperties);\n }\n\n protected override firstUpdated(\n changedProperties: PropertyValues\n ): void {\n super.firstUpdated(changedProperties);\n this.updateComplete.then(() => {\n this.manageTextObservedSlot();\n });\n }\n }\n return SlotTextObservingElement;\n}\n"],
5
- "mappings": ";;;;;;;;;;;AAYA;AAAA;AAAA;AAAA;AAIA;AAEA,MAAM,oBAAoB,OAAO,eAAe;AAazC,gCACH,aACA,UAC2C;AAlC/C;AAmCI,QAAM,iCACM,YAEZ;AAAA,IAEI,eAAe,MAAa;AACxB,YAAM,IAAI;AAmBP,4BAAiB;AAjBpB,UAAI,mBAAmB,MAAM;AAAA,QACzB,QAAQ;AAAA,UACJ,eAAe;AAAA,UACf,SAAS;AAAA,QACb;AAAA,QACA,UAAU,CAAC,kBAAyC;AAChD,qBAAW,YAAY,eAAe;AAClC,gBAAI,SAAS,SAAS,iBAAiB;AACnC,mBAAK,uBAAuB;AAC5B;AAAA,YACJ;AAAA,UACJ;AAAA,QACJ;AAAA,MACJ,CAAC;AAAA,IACL;AAAA,IAQO,yBAA+B;AAClC,UAAI,CAAC,KAAK;AAAoB;AAC9B,YAAM,gBAAgB,CAAC,GAAG,KAAK,kBAAkB,EAAE,OAC/C,CAAC,SAAS;AACN,YAAK,KAAqB,SAAS;AAC/B,iBAAO;AAAA,QACX;AACA,eAAO,KAAK,cAAc,KAAK,YAAY,KAAK,IAAI;AAAA,MACxD,CACJ;AACA,WAAK,iBAAiB,cAAc,SAAS;AAAA,IACjD;AAAA,IAEmB,OAAO,mBAAyC;AAC/D,UAAI,CAAC,KAAK,YAAY;AAClB,cAAM,EAAE,eAAe;AACvB,cAAM,YAAY,CAAC,GAAG,UAAU,EAAE,OAAO,CAAC,SAAS;AAC/C,cAAK,KAAqB,SAAS;AAC/B,mBAAO,WACA,KAAqB,aAAa,MAAM,MACrC,WAC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AAAA,UACX;AACA,iBAAO,KAAK,cAAc,KAAK,YAAY,KAAK,IAAI;AAAA,QACxD;AAAA,MACJ;AACA,WAAK,iBAAiB,cAAc,SAAS;AAAA,IACjD;AAAA,IAEmB,OAAO,mBAAyC;AAC/D,UAAI,CAAC,KAAK,YAAY;AAClB,cAAM,EAAE,WAAW,IAAI;AACvB,cAAM,YAAY,CAAC,GAAG,UAAU,EAAE,OAAO,CAAC,SAAS;AAC/C,cAAK,KAAqB,SAAS;AAC/B,mBAAO,WACA,KAAqB,aAAa,MAAM,MACrC,WACJ,CAAE,KAAqB,aAAa,MAAM;AAAA,UACpD;AACA,iBAAO,KAAK,cAAc,KAAK,YAAY,KAAK,IAAI;AAAA,QACxD,CAAC;AACD,aAAK,iBAAiB,UAAU,SAAS;AAAA,MAC7C;AACA,YAAM,OAAO,iBAAiB;AAAA,IAClC;AAAA,IAEmB,aACf,mBACI;AACJ,YAAM,aAAa,iBAAiB;AACpC,WAAK,eAAe,KAAK,MAAM;AAC3B,aAAK,uBAAuB;AAAA,MAChC,CAAC;AAAA,IACL;AAAA,EACJ;AAvGJ,EA+DiB;AAHF;AAAA,IADN,SAAS,EAAE,MAAM,SAAS,WAAW,MAAM,CAAC;AAAA,KAxB3C,yBAyBK;AAGE;AAAA,IADR,mBAAmB,UAAU,IAAI;AAAA,KA3BhC,yBA4BO;AAyCb,SAAO;AACX;",
6
6
  "names": []
7
7
  }
@@ -1,2 +1,2 @@
1
- var d=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var u=(i,r,o,n)=>{for(var s=n>1?void 0:n?p(r,o):r,t=i.length-1,e;t>=0;t--)(e=i[t])&&(s=(n?e(r,o,s):e(s))||s);return n&&s&&d(r,o,s),s};import{property as f,queryAssignedNodes as m}from"@spectrum-web-components/base/src/decorators.js";import{MutationController as g}from"@lit-labs/observers/mutation_controller.js";const c=Symbol("assignedNodes");export function ObserveSlotText(i,r){var n;class o extends i{constructor(...t){super(t);this.slotHasContent=!1;new g(this,{config:{characterData:!0,subtree:!0},callback:e=>{for(const l of e)if(l.type==="characterData"){this.manageTextObservedSlot();return}}})}manageTextObservedSlot(){if(!this[c])return;const t=[...this[c]].filter(e=>e.tagName?!0:e.textContent?e.textContent.trim():!1);this.slotHasContent=t.length>0}update(t){if(!this.hasUpdated){const{childNodes:e}=this,l=[...e].filter(a=>a.tagName?r?a.getAttribute("slot")===r:!a.hasAttribute("slot"):a.textContent?a.textContent.trim():!1);this.slotHasContent=l.length>0}super.update(t)}firstUpdated(t){super.firstUpdated(t),this.updateComplete.then(()=>{this.manageTextObservedSlot()})}}return n=c,u([f({type:Boolean,attribute:!1})],o.prototype,"slotHasContent",2),u([m(r,!0)],o.prototype,n,2),o}
1
+ "use strict";var p=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var c=(i,e,s,n)=>{for(var r=n>1?void 0:n?f(e,s):e,l=i.length-1,t;l>=0;l--)(t=i[l])&&(r=(n?t(e,s,r):t(r))||r);return n&&r&&p(e,s,r),r};import{property as m,queryAssignedNodes as g}from"@spectrum-web-components/base/src/decorators.js";import{MutationController as h}from"@lit-labs/observers/mutation_controller.js";const d=Symbol("assignedNodes");export function ObserveSlotText(i,e){var n;class s extends i{constructor(...t){super(t);this.slotHasContent=!1;new h(this,{config:{characterData:!0,subtree:!0},callback:o=>{for(const u of o)if(u.type==="characterData"){this.manageTextObservedSlot();return}}})}manageTextObservedSlot(){if(!this[d])return;const t=[...this[d]].filter(o=>o.tagName?!0:o.textContent?o.textContent.trim():!1);this.slotHasContent=t.length>0}update(t){if(!this.hasUpdated){const{childNodes:o}=this,u=[...o].filter(a=>a.tagName?e?a.getAttribute("slot")===e:!a.hasAttribute("slot"):a.textContent?a.textContent.trim():!1);this.slotHasContent=u.length>0}super.update(t)}firstUpdated(t){super.firstUpdated(t),this.updateComplete.then(()=>{this.manageTextObservedSlot()})}}return n=d,c([m({type:Boolean,attribute:!1})],s.prototype,"slotHasContent",2),c([g(e,!0)],s.prototype,n,2),s}
2
2
  //# sourceMappingURL=observe-slot-text.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["observe-slot-text.ts"],
4
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*/\nimport { PropertyValues, ReactiveElement } from '@spectrum-web-components/base';\nimport {\n property,\n queryAssignedNodes,\n} from '@spectrum-web-components/base/src/decorators.js';\nimport { MutationController } from '@lit-labs/observers/mutation_controller.js';\n\nconst assignedNodesList = Symbol('assignedNodes');\n\ntype Constructor<T = Record<string, unknown>> = {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n new (...args: any[]): T;\n prototype: T;\n};\n\nexport interface SlotTextObservingInterface {\n slotHasContent: boolean;\n manageTextObservedSlot(): void;\n}\n\nexport function ObserveSlotText<T extends Constructor<ReactiveElement>>(\n constructor: T,\n slotName?: string\n): T & Constructor<SlotTextObservingInterface> {\n class SlotTextObservingElement\n extends constructor\n implements SlotTextObservingInterface\n {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n constructor(...args: any[]) {\n super(args);\n\n new MutationController(this, {\n config: {\n characterData: true,\n subtree: true,\n },\n callback: (mutationsList: Array<MutationRecord>) => {\n for (const mutation of mutationsList) {\n if (mutation.type === 'characterData') {\n this.manageTextObservedSlot();\n return;\n }\n }\n },\n });\n }\n\n @property({ type: Boolean, attribute: false })\n public slotHasContent = false;\n\n @queryAssignedNodes(slotName, true)\n private [assignedNodesList]!: NodeListOf<HTMLElement>;\n\n public manageTextObservedSlot(): void {\n if (!this[assignedNodesList]) return;\n const assignedNodes = [...this[assignedNodesList]].filter(\n (node) => {\n if ((node as HTMLElement).tagName) {\n return true;\n }\n return node.textContent ? node.textContent.trim() : false;\n }\n );\n this.slotHasContent = assignedNodes.length > 0;\n }\n\n protected override update(changedProperties: PropertyValues): void {\n if (!this.hasUpdated) {\n const { childNodes } = this;\n const textNodes = [...childNodes].filter((node) => {\n if ((node as HTMLElement).tagName) {\n return slotName\n ? (node as HTMLElement).getAttribute('slot') ===\n slotName\n : !(node as HTMLElement).hasAttribute('slot');\n }\n return node.textContent ? node.textContent.trim() : false;\n });\n this.slotHasContent = textNodes.length > 0;\n }\n super.update(changedProperties);\n }\n\n protected override firstUpdated(\n changedProperties: PropertyValues\n ): void {\n super.firstUpdated(changedProperties);\n this.updateComplete.then(() => {\n this.manageTextObservedSlot();\n });\n }\n }\n return SlotTextObservingElement;\n}\n"],
5
- "mappings": "wMAYA,mGAIA,gFAEA,KAAM,GAAoB,OAAO,eAAe,EAazC,gCACH,EACA,EAC2C,CAlC/C,MAmCI,MAAM,SACM,EAEZ,CAEI,eAAe,EAAa,CACxB,MAAM,CAAI,EAmBP,oBAAiB,GAjBpB,GAAI,GAAmB,KAAM,CACzB,OAAQ,CACJ,cAAe,GACf,QAAS,EACb,EACA,SAAU,AAAC,GAAyC,CAChD,SAAW,KAAY,GACnB,GAAI,EAAS,OAAS,gBAAiB,CACnC,KAAK,uBAAuB,EAC5B,MACJ,CAER,CACJ,CAAC,CACL,CAQO,wBAA+B,CAClC,GAAI,CAAC,KAAK,GAAoB,OAC9B,KAAM,GAAgB,CAAC,GAAG,KAAK,EAAkB,EAAE,OAC/C,AAAC,GACQ,EAAqB,QACf,GAEJ,EAAK,YAAc,EAAK,YAAY,KAAK,EAAI,EAE5D,EACA,KAAK,eAAiB,EAAc,OAAS,CACjD,CAEmB,OAAO,EAAyC,CAC/D,GAAI,CAAC,KAAK,WAAY,CAClB,KAAM,CAAE,cAAe,KACjB,EAAY,CAAC,GAAG,CAAU,EAAE,OAAO,AAAC,GACjC,EAAqB,QACf,EACA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EAAY,CAAC,GAAGD,CAAU,EAAE,OAAQF,GACjCA,EAAqB,QACfP,EACAO,EAAqB,aAAa,MAAM,IACrCP,EACJ,CAAEO,EAAqB,aAAa,MAAM,EAE7CA,EAAK,YAAcA,EAAK,YAAY,KAAK,EAAI,EACvD,EACD,KAAK,eAAiBG,EAAU,OAAS,CAC7C,CACA,MAAM,OAAOF,CAAiB,CAClC,CAEmB,aACfA,EACI,CACJ,MAAM,aAAaA,CAAiB,EACpC,KAAK,eAAe,KAAK,IAAM,CAC3B,KAAK,uBAAuB,CAChC,CAAC,CACL,CACJ,CAvGJ,OA+DiBP,EAAAH,EAHFa,EAAA,CADNhB,EAAS,CAAE,KAAM,QAAS,UAAW,EAAM,CAAC,GAxB3CO,EAyBK,8BAGES,EAAA,CADRf,EAAmBI,EAAU,EAAI,GA3BhCE,EA4BO,UAAAD,EAAA,GAyCNC,CACX",
6
+ "names": ["property", "queryAssignedNodes", "MutationController", "assignedNodesList", "constructor", "slotName", "_a", "SlotTextObservingElement", "args", "mutationsList", "mutation", "assignedNodes", "node", "changedProperties", "childNodes", "textNodes", "__decorateClass"]
7
7
  }
@@ -1,3 +1,4 @@
1
+ "use strict";
1
2
  function testUserAgent(re) {
2
3
  return typeof window !== "undefined" && window.navigator != null ? re.test(window.navigator.userAgent) : false;
3
4
  }
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["platform.ts"],
4
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,uBAAuB,IAAqB;AACxC,SAAO,OAAO,WAAW,eAAe,OAAO,aAAa,OACtD,GAAG,KAAK,OAAO,UAAU,SAAS,IAClC;AACV;AAEA,sBAAsB,IAAqB;AACvC,SAAO,OAAO,WAAW,eAAe,OAAO,aAAa,OACtD,GAAG,KAAK,OAAO,UAAU,QAAQ,IACjC;AACV;AAGO,wBAA0B;AAC7B,SAAO,aAAa,MAAM;AAC9B;AAEO,2BAA6B;AAChC,SAAO,aAAa,SAAS;AACjC;AAEO,yBAA2B;AAC9B,SACI,aAAa,OAAO,KAEnB,MAAM,KAAK,UAAU,iBAAiB;AAE/C;AAEO,wBAA0B;AAC7B,SAAO,SAAS,KAAK,OAAO;AAChC;AAGO,gCAAkC;AACrC,SAAO,MAAM,KAAK,MAAM;AAC5B;AAGO,2BAA6B;AAChC,SAAO,cAAc,aAAa,KAAK,CAAC,SAAS;AACrD;AAGO,2BAA6B;AAChC,SAAO,cAAc,QAAQ;AACjC;AAEO,4BAA8B;AACjC,SAAO,cAAc,SAAS;AAClC;",
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;",
6
6
  "names": []
7
7
  }
package/src/platform.js CHANGED
@@ -1,2 +1,2 @@
1
- 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 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/)}
2
2
  //# sourceMappingURL=platform.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["platform.ts"],
4
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,WAAuB,EAAqB,CACxC,MAAO,OAAO,SAAW,aAAe,OAAO,WAAa,KACtD,EAAG,KAAK,OAAO,UAAU,SAAS,EAClC,EACV,CAEA,WAAsB,EAAqB,CACvC,MAAO,OAAO,SAAW,aAAe,OAAO,WAAa,KACtD,EAAG,KAAK,OAAO,UAAU,QAAQ,EACjC,EACV,CAGO,uBAA0B,CAC7B,MAAO,GAAa,MAAM,CAC9B,CAEO,0BAA6B,CAChC,MAAO,GAAa,SAAS,CACjC,CAEO,wBAA2B,CAC9B,MACI,GAAa,OAAO,GAEnB,MAAM,GAAK,UAAU,eAAiB,CAE/C,CAEO,uBAA0B,CAC7B,MAAO,UAAS,GAAK,OAAO,CAChC,CAGO,+BAAkC,CACrC,MAAO,OAAM,GAAK,MAAM,CAC5B,CAGO,0BAA6B,CAChC,MAAO,GAAc,aAAa,GAAK,CAAC,SAAS,CACrD,CAGO,0BAA6B,CAChC,MAAO,GAAc,QAAQ,CACjC,CAEO,2BAA8B,CACjC,MAAO,GAAc,SAAS,CAClC",
6
- "names": []
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",
6
+ "names": ["testUserAgent", "re", "testPlatform"]
7
7
  }
@@ -1,3 +1,4 @@
1
+ "use strict";
1
2
  function restoreChildren(placeholderItems, srcElements, cleanupCallbacks = []) {
2
3
  for (let index = 0; index < srcElements.length; ++index) {
3
4
  const srcElement = srcElements[index];
@@ -29,7 +30,9 @@ export const reparentChildren = (srcElements, destination, {
29
30
  }
30
31
  const placeholderItems = new Array(length);
31
32
  const cleanupCallbacks = new Array(length);
32
- const placeholderTemplate = document.createComment("placeholder for reparented element");
33
+ const placeholderTemplate = document.createComment(
34
+ "placeholder for reparented element"
35
+ );
33
36
  do {
34
37
  const srcElement = srcElements[index];
35
38
  if (prepareCallback) {
@@ -44,7 +47,11 @@ export const reparentChildren = (srcElements, destination, {
44
47
  index += step;
45
48
  } while (--length > 0);
46
49
  return function() {
47
- return restoreChildren(placeholderItems, srcElements, cleanupCallbacks);
50
+ return restoreChildren(
51
+ placeholderItems,
52
+ srcElements,
53
+ cleanupCallbacks
54
+ );
48
55
  };
49
56
  };
50
57
  //# sourceMappingURL=reparent-children.dev.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["reparent-children.ts"],
4
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*/\nfunction restoreChildren<T extends Element>(\n placeholderItems: Comment[],\n srcElements: T[],\n cleanupCallbacks: ((el: T) => void)[] = []\n): T[] {\n for (let index = 0; index < srcElements.length; ++index) {\n const srcElement = srcElements[index];\n const placeholderItem = placeholderItems[index];\n const parentElement =\n placeholderItem.parentElement || placeholderItem.getRootNode();\n if (cleanupCallbacks[index]) {\n cleanupCallbacks[index](srcElement);\n }\n if (parentElement && parentElement !== placeholderItem) {\n parentElement.replaceChild(srcElement, placeholderItem);\n }\n delete placeholderItems[index];\n }\n return srcElements;\n}\n\nexport const reparentChildren = <T extends Element>(\n srcElements: T[],\n destination: Element,\n {\n position,\n prepareCallback,\n }: {\n position: InsertPosition;\n prepareCallback?: (el: T) => ((el: T) => void) | void;\n } = { position: 'beforeend' }\n): (() => T[]) => {\n let { length } = srcElements;\n if (length === 0) {\n return () => srcElements;\n }\n\n let step = 1;\n let index = 0;\n\n if (position === 'afterbegin' || position === 'afterend') {\n step = -1;\n index = length - 1;\n }\n\n const placeholderItems = new Array<Comment>(length);\n const cleanupCallbacks = new Array<(el: T) => void>(length);\n const placeholderTemplate: Comment = document.createComment(\n 'placeholder for reparented element'\n );\n\n do {\n const srcElement = srcElements[index];\n if (prepareCallback) {\n cleanupCallbacks[index] = prepareCallback(srcElement) as (\n el: T\n ) => void;\n }\n placeholderItems[index] = placeholderTemplate.cloneNode() as Comment;\n\n const parentElement =\n srcElement.parentElement || srcElement.getRootNode();\n if (parentElement && parentElement !== srcElement) {\n parentElement.replaceChild(placeholderItems[index], srcElement);\n }\n destination.insertAdjacentElement(position, srcElement);\n\n index += step;\n } while (--length > 0);\n\n return function (): T[] {\n return restoreChildren<T>(\n placeholderItems,\n srcElements,\n cleanupCallbacks\n );\n };\n};\n"],
5
- "mappings": "AAWA,yBACI,kBACA,aACA,m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,IACJ;AAAA,EACJ;AACJ;",
6
6
  "names": []
7
7
  }
@@ -1,2 +1,2 @@
1
- function T(o,i,l=[]){for(let e=0;e<i.length;++e){const n=i[e],r=o[e],t=r.parentElement||r.getRootNode();l[e]&&l[e](n),t&&t!==r&&t.replaceChild(n,r),delete o[e]}return i}export const reparentChildren=(o,i,{position:l,prepareCallback:e}={position:"beforeend"})=>{let{length:n}=o;if(n===0)return()=>o;let r=1,t=0;(l==="afterbegin"||l==="afterend")&&(r=-1,t=n-1);const a=new Array(n),c=new Array(n),p=document.createComment("placeholder for reparented element");do{const d=o[t];e&&(c[t]=e(d)),a[t]=p.cloneNode();const m=d.parentElement||d.getRootNode();m&&m!==d&&m.replaceChild(a[t],d),i.insertAdjacentElement(l,d),t+=r}while(--n>0);return function(){return T(a,o,c)}};
1
+ "use strict";function T(o,i,l=[]){for(let e=0;e<i.length;++e){const n=i[e],r=o[e],t=r.parentElement||r.getRootNode();l[e]&&l[e](n),t&&t!==r&&t.replaceChild(n,r),delete o[e]}return i}export const reparentChildren=(o,i,{position:l,prepareCallback:e}={position:"beforeend"})=>{let{length:n}=o;if(n===0)return()=>o;let r=1,t=0;(l==="afterbegin"||l==="afterend")&&(r=-1,t=n-1);const a=new Array(n),c=new Array(n),p=document.createComment("placeholder for reparented element");do{const d=o[t];e&&(c[t]=e(d)),a[t]=p.cloneNode();const m=d.parentElement||d.getRootNode();m&&m!==d&&m.replaceChild(a[t],d),i.insertAdjacentElement(l,d),t+=r}while(--n>0);return function(){return T(a,o,c)}};
2
2
  //# sourceMappingURL=reparent-children.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["reparent-children.ts"],
4
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*/\nfunction restoreChildren<T extends Element>(\n placeholderItems: Comment[],\n srcElements: T[],\n cleanupCallbacks: ((el: T) => void)[] = []\n): T[] {\n for (let index = 0; index < srcElements.length; ++index) {\n const srcElement = srcElements[index];\n const placeholderItem = placeholderItems[index];\n const parentElement =\n placeholderItem.parentElement || placeholderItem.getRootNode();\n if (cleanupCallbacks[index]) {\n cleanupCallbacks[index](srcElement);\n }\n if (parentElement && parentElement !== placeholderItem) {\n parentElement.replaceChild(srcElement, placeholderItem);\n }\n delete placeholderItems[index];\n }\n return srcElements;\n}\n\nexport const reparentChildren = <T extends Element>(\n srcElements: T[],\n destination: Element,\n {\n position,\n prepareCallback,\n }: {\n position: InsertPosition;\n prepareCallback?: (el: T) => ((el: T) => void) | void;\n } = { position: 'beforeend' }\n): (() => T[]) => {\n let { length } = srcElements;\n if (length === 0) {\n return () => srcElements;\n }\n\n let step = 1;\n let index = 0;\n\n if (position === 'afterbegin' || position === 'afterend') {\n step = -1;\n index = length - 1;\n }\n\n const placeholderItems = new Array<Comment>(length);\n const cleanupCallbacks = new Array<(el: T) => void>(length);\n const placeholderTemplate: Comment = document.createComment(\n 'placeholder for reparented element'\n );\n\n do {\n const srcElement = srcElements[index];\n if (prepareCallback) {\n cleanupCallbacks[index] = prepareCallback(srcElement) as (\n el: T\n ) => void;\n }\n placeholderItems[index] = placeholderTemplate.cloneNode() as Comment;\n\n const parentElement =\n srcElement.parentElement || srcElement.getRootNode();\n if (parentElement && parentElement !== srcElement) {\n parentElement.replaceChild(placeholderItems[index], srcElement);\n }\n destination.insertAdjacentElement(position, srcElement);\n\n index += step;\n } while (--length > 0);\n\n return function (): T[] {\n return restoreChildren<T>(\n placeholderItems,\n srcElements,\n cleanupCallbacks\n );\n };\n};\n"],
5
- "mappings": "AAWA,WACI,EACA,EACA,EAAwC,CAAC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GAAOC,CAAU,EAElCE,GAAiBA,IAAkBD,GACnCC,EAAc,aAAaF,EAAYC,CAAe,EAE1D,OAAOL,EAAiBG,EAC5B,CACA,OAAOF,CACX,CAEO,aAAM,iBAAmB,CAC5BA,EACAM,EACA,CACI,SAAAC,EACA,gBAAAC,CACJ,EAGI,CAAE,SAAU,WAAY,IACd,CACd,GAAI,CAAE,OAAAC,CAAO,EAAIT,EACjB,GAAIS,IAAW,EACX,MAAO,IAAMT,EAGjB,IAAIU,EAAO,EACPR,EAAQ,GAERK,IAAa,cAAgBA,IAAa,cAC1CG,EAAO,GACPR,EAAQO,EAAS,GAGrB,MAAMV,EAAmB,IAAI,MAAeU,CAAM,EAC5CR,EAAmB,IAAI,MAAuBQ,CAAM,EACpDE,EAA+B,SAAS,cAC1C,oCACJ,EAEA,EAAG,CACC,MAAMR,EAAaH,EAAYE,GAC3BM,IACAP,EAAiBC,GAASM,EAAgBL,CAAU,GAIxDJ,EAAiBG,GAASS,EAAoB,UAAU,EAExD,MAAMN,EACFF,EAAW,eAAiBA,EAAW,YAAY,EACnDE,GAAiBA,IAAkBF,GACnCE,EAAc,aAAaN,EAAiBG,GAAQC,CAAU,EAElEG,EAAY,sBAAsBC,EAAUJ,CAAU,EAEtDD,GAASQ,CACb,OAAS,EAAED,EAAS,GAEpB,OAAO,UAAiB,CACpB,OAAOX,EACHC,EACAC,EACAC,CACJ,CACJ,CACJ",
6
+ "names": ["restoreChildren", "placeholderItems", "srcElements", "cleanupCallbacks", "index", "srcElement", "placeholderItem", "parentElement", "destination", "position", "prepareCallback", "length", "step", "placeholderTemplate"]
7
7
  }
@@ -1,4 +1,25 @@
1
- import"@spectrum-web-components/shared/src/focusable.js";import{Focusable as o}from"@spectrum-web-components/shared/src/focusable.js";import{elementUpdated as c,expect as t,fixture as l,html as r}from"@open-wc/testing";describe("Focusable",()=>{it("enforces the presense of a `focusElement`",async()=>{customElements.define("focusable-test",class extends o{});try{const e=await l(r`
1
+ "use strict";
2
+ import "@spectrum-web-components/shared/src/focusable.js";
3
+ import { Focusable } from "@spectrum-web-components/shared/src/focusable.js";
4
+ import { elementUpdated, expect, fixture, html } from "@open-wc/testing";
5
+ describe("Focusable", () => {
6
+ it("enforces the presense of a `focusElement`", async () => {
7
+ customElements.define("focusable-test", class extends Focusable {
8
+ });
9
+ try {
10
+ const el = await fixture(
11
+ html`
2
12
  <focusable-test></focusable-test>
3
- `);await c(e);const s=e.focusElement;t(s).to.exist}catch(e){t(()=>{throw e}).to.throw("Must implement focusElement getter!")}})});
13
+ `
14
+ );
15
+ await elementUpdated(el);
16
+ const focusEl = el.focusElement;
17
+ expect(focusEl).to.exist;
18
+ } catch (error) {
19
+ expect(() => {
20
+ throw error;
21
+ }).to.throw("Must implement focusElement getter!");
22
+ }
23
+ });
24
+ });
4
25
  //# sourceMappingURL=focusable.test.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["focusable.test.ts"],
4
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\nimport '@spectrum-web-components/shared/src/focusable.js';\nimport { Focusable } from '@spectrum-web-components/shared/src/focusable.js';\nimport { elementUpdated, expect, fixture, html } from '@open-wc/testing';\n\ndescribe('Focusable', () => {\n it('enforces the presense of a `focusElement`', async () => {\n customElements.define('focusable-test', class extends Focusable {});\n try {\n const el = await fixture<Focusable>(\n html`\n <focusable-test></focusable-test>\n `\n );\n await elementUpdated(el);\n const focusEl = el.focusElement;\n expect(focusEl).to.exist;\n } catch (error) {\n expect(() => {\n throw error;\n }).to.throw('Must implement focusElement getter!');\n }\n });\n});\n"],
5
- "mappings": "AAYA,yDACA,6EACA,qFAEA,SAAS,YAAa,IAAM,CACxB,GAAG,4CAA6C,SAAY,CACxD,eAAe,OAAO,iBAAkB,aAAc,EAAU,CAAC,CAAC,EAClE,GAAI,CACA,KAAM,GAAK,KAAM,GACb;AAAA;AAAA,iBAGJ,EACA,KAAM,GAAe,CAAE,EACvB,KAAM,GAAU,EAAG,aACnB,EAAO,CAAO,EAAE,GAAG,KACvB,OAAS,EAAP,CACE,EAAO,IAAM,CACT,KAAM,EACV,CAAC,EAAE,GAAG,MAAM,qCAAqC,CACrD,CACJ,CAAC,CACL,CAAC",
5
+ "mappings": ";AAYA,OAAO;AACP,SAAS,iBAAiB;AAC1B,SAAS,gBAAgB,QAAQ,SAAS,YAAY;AAEtD,SAAS,aAAa,MAAM;AACxB,KAAG,6CAA6C,YAAY;AACxD,mBAAe,OAAO,kBAAkB,cAAc,UAAU;AAAA,IAAC,CAAC;AAClE,QAAI;AACA,YAAM,KAAK,MAAM;AAAA,QACb;AAAA;AAAA;AAAA,MAGJ;AACA,YAAM,eAAe,EAAE;AACvB,YAAM,UAAU,GAAG;AACnB,aAAO,OAAO,EAAE,GAAG;AAAA,IACvB,SAAS,OAAP;AACE,aAAO,MAAM;AACT,cAAM;AAAA,MACV,CAAC,EAAE,GAAG,MAAM,qCAAqC;AAAA,IACrD;AAAA,EACJ,CAAC;AACL,CAAC;",
6
6
  "names": []
7
7
  }
@@ -1,6 +1,30 @@
1
- import{ObserveSlotPresence as n}from"@spectrum-web-components/shared/src/observe-slot-presence.js";import{LitElement as o}from"@spectrum-web-components/base";import{elementUpdated as t,expect as s,fixture as l,html as r}from"@open-wc/testing";class a extends n(o,'[slot="test-slot"]'){render(){return r`
1
+ "use strict";
2
+ import { ObserveSlotPresence } from "@spectrum-web-components/shared/src/observe-slot-presence.js";
3
+ import { LitElement } from "@spectrum-web-components/base";
4
+ import { elementUpdated, expect, fixture, html } from "@open-wc/testing";
5
+ class ObserverTest extends ObserveSlotPresence(
6
+ LitElement,
7
+ '[slot="test-slot"]'
8
+ ) {
9
+ render() {
10
+ return html`
2
11
  Test Element
3
- `}}customElements.define("observe-presence-test",a),describe("ObserveSlotPresence",()=>{it("does no management when slot unavailable",async()=>{const e=await l(r`
12
+ `;
13
+ }
14
+ }
15
+ customElements.define("observe-presence-test", ObserverTest);
16
+ describe("ObserveSlotPresence", () => {
17
+ it("does no management when slot unavailable", async () => {
18
+ const el = await fixture(
19
+ html`
4
20
  <observe-presence-test></observe-presence-test>
5
- `);await t(e),s(e.slotContentIsPresent).to.be.false,e.innerHTML='<div slot="test-slot"></div>',await t(e),s(e.slotContentIsPresent).to.be.true})});
21
+ `
22
+ );
23
+ await elementUpdated(el);
24
+ expect(el.slotContentIsPresent).to.be.false;
25
+ el.innerHTML = '<div slot="test-slot"></div>';
26
+ await elementUpdated(el);
27
+ expect(el.slotContentIsPresent).to.be.true;
28
+ });
29
+ });
6
30
  //# sourceMappingURL=observe-slot-presence.test.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["observe-slot-presence.test.ts"],
4
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\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\nimport { ObserveSlotPresence } from '@spectrum-web-components/shared/src/observe-slot-presence.js';\nimport { LitElement, TemplateResult } from '@spectrum-web-components/base';\nimport { elementUpdated, expect, fixture, html } from '@open-wc/testing';\n\nclass ObserverTest extends ObserveSlotPresence(\n LitElement,\n '[slot=\"test-slot\"]'\n) {\n protected override render(): TemplateResult {\n return html`\n Test Element\n `;\n }\n}\n\ncustomElements.define('observe-presence-test', ObserverTest);\n\ndescribe('ObserveSlotPresence', () => {\n it('does no management when slot unavailable', async () => {\n const el = await fixture<ObserverTest>(\n html`\n <observe-presence-test></observe-presence-test>\n `\n );\n await elementUpdated(el);\n\n expect(el.slotContentIsPresent).to.be.false;\n\n el.innerHTML = '<div slot=\"test-slot\"></div>';\n await elementUpdated(el);\n\n expect(el.slotContentIsPresent).to.be.true;\n });\n});\n"],
5
- "mappings": "AAWA,mGACA,2DACA,qFAEA,MAAM,SAAqB,GACvB,EACA,oBACJ,CAAE,CACqB,QAAyB,CACxC,MAAO;AAAA;AAAA,SAGX,CACJ,CAEA,eAAe,OAAO,wBAAyB,CAAY,EAE3D,SAAS,sBAAuB,IAAM,CAClC,GAAG,2CAA4C,SAAY,CACvD,KAAM,GAAK,KAAM,GACb;AAAA;AAAA,aAGJ,EACA,KAAM,GAAe,CAAE,EAEvB,EAAO,EAAG,oBAAoB,EAAE,GAAG,GAAG,MAEtC,EAAG,UAAY,+BACf,KAAM,GAAe,CAAE,EAEvB,EAAO,EAAG,oBAAoB,EAAE,GAAG,GAAG,IAC1C,CAAC,CACL,CAAC",
5
+ "mappings": ";AAWA,SAAS,2BAA2B;AACpC,SAAS,kBAAkC;AAC3C,SAAS,gBAAgB,QAAQ,SAAS,YAAY;AAEtD,MAAM,qBAAqB;AAAA,EACvB;AAAA,EACA;AACJ,EAAE;AAAA,EACqB,SAAyB;AACxC,WAAO;AAAA;AAAA;AAAA,EAGX;AACJ;AAEA,eAAe,OAAO,yBAAyB,YAAY;AAE3D,SAAS,uBAAuB,MAAM;AAClC,KAAG,4CAA4C,YAAY;AACvD,UAAM,KAAK,MAAM;AAAA,MACb;AAAA;AAAA;AAAA,IAGJ;AACA,UAAM,eAAe,EAAE;AAEvB,WAAO,GAAG,oBAAoB,EAAE,GAAG,GAAG;AAEtC,OAAG,YAAY;AACf,UAAM,eAAe,EAAE;AAEvB,WAAO,GAAG,oBAAoB,EAAE,GAAG,GAAG;AAAA,EAC1C,CAAC;AACL,CAAC;",
6
6
  "names": []
7
7
  }
@@ -1,6 +1,27 @@
1
- import{ObserveSlotText as r}from"@spectrum-web-components/shared/src/observe-slot-text.js";import{LitElement as l}from"@spectrum-web-components/base";import{elementUpdated as t,expect as s,fixture as a,html as o}from"@open-wc/testing";class n extends r(l){render(){return o`
1
+ "use strict";
2
+ import { ObserveSlotText } from "@spectrum-web-components/shared/src/observe-slot-text.js";
3
+ import { LitElement } from "@spectrum-web-components/base";
4
+ import { elementUpdated, expect, fixture, html } from "@open-wc/testing";
5
+ class ObserverTest extends ObserveSlotText(LitElement) {
6
+ render() {
7
+ return html`
2
8
  <slot @slotchange=${this.manageTextObservedSlot}></slot>
3
- `}}customElements.define("observe-slot-test",n),describe("ObserveSlotText",()=>{it("does no management when slot unavailable",async()=>{const e=await a(o`
9
+ `;
10
+ }
11
+ }
12
+ customElements.define("observe-slot-test", ObserverTest);
13
+ describe("ObserveSlotText", () => {
14
+ it("does no management when slot unavailable", async () => {
15
+ const el = await fixture(
16
+ html`
4
17
  <observe-slot-test></observe-slot-test>
5
- `);await t(e),s(e.slotHasContent).to.be.false,e.textContent="hi, i'm some text",await t(e),s(e.slotHasContent).to.be.true})});
18
+ `
19
+ );
20
+ await elementUpdated(el);
21
+ expect(el.slotHasContent).to.be.false;
22
+ el.textContent = `hi, i'm some text`;
23
+ await elementUpdated(el);
24
+ expect(el.slotHasContent).to.be.true;
25
+ });
26
+ });
6
27
  //# sourceMappingURL=observe-slot-text.test.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["observe-slot-text.test.ts"],
4
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\nimport { ObserveSlotText } from '@spectrum-web-components/shared/src/observe-slot-text.js';\nimport { LitElement, TemplateResult } from '@spectrum-web-components/base';\nimport { elementUpdated, expect, fixture, html } from '@open-wc/testing';\n\nclass ObserverTest extends ObserveSlotText(LitElement) {\n protected override render(): TemplateResult {\n return html`\n <slot @slotchange=${this.manageTextObservedSlot}></slot>\n `;\n }\n}\n\ncustomElements.define('observe-slot-test', ObserverTest);\n\ndescribe('ObserveSlotText', () => {\n it('does no management when slot unavailable', async () => {\n const el = await fixture<ObserverTest>(\n html`\n <observe-slot-test></observe-slot-test>\n `\n );\n await elementUpdated(el);\n\n expect(el.slotHasContent).to.be.false;\n\n el.textContent = `hi, i'm some text`;\n\n await elementUpdated(el);\n\n expect(el.slotHasContent).to.be.true;\n });\n});\n"],
5
- "mappings": "AAYA,2FACA,2DACA,qFAEA,MAAM,SAAqB,GAAgB,CAAU,CAAE,CAChC,QAAyB,CACxC,MAAO;AAAA,gCACiB,KAAK;AAAA,SAEjC,CACJ,CAEA,eAAe,OAAO,oBAAqB,CAAY,EAEvD,SAAS,kBAAmB,IAAM,CAC9B,GAAG,2CAA4C,SAAY,CACvD,KAAM,GAAK,KAAM,GACb;AAAA;AAAA,aAGJ,EACA,KAAM,GAAe,CAAE,EAEvB,EAAO,EAAG,cAAc,EAAE,GAAG,GAAG,MAEhC,EAAG,YAAc,oBAEjB,KAAM,GAAe,CAAE,EAEvB,EAAO,EAAG,cAAc,EAAE,GAAG,GAAG,IACpC,CAAC,CACL,CAAC",
5
+ "mappings": ";AAYA,SAAS,uBAAuB;AAChC,SAAS,kBAAkC;AAC3C,SAAS,gBAAgB,QAAQ,SAAS,YAAY;AAEtD,MAAM,qBAAqB,gBAAgB,UAAU,EAAE;AAAA,EAChC,SAAyB;AACxC,WAAO;AAAA,gCACiB,KAAK;AAAA;AAAA,EAEjC;AACJ;AAEA,eAAe,OAAO,qBAAqB,YAAY;AAEvD,SAAS,mBAAmB,MAAM;AAC9B,KAAG,4CAA4C,YAAY;AACvD,UAAM,KAAK,MAAM;AAAA,MACb;AAAA;AAAA;AAAA,IAGJ;AACA,UAAM,eAAe,EAAE;AAEvB,WAAO,GAAG,cAAc,EAAE,GAAG,GAAG;AAEhC,OAAG,cAAc;AAEjB,UAAM,eAAe,EAAE;AAEvB,WAAO,GAAG,cAAc,EAAE,GAAG,GAAG;AAAA,EACpC,CAAC;AACL,CAAC;",
6
6
  "names": []
7
7
  }