ember-primitives 0.40.0 → 0.41.0

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 (294) hide show
  1. package/README.md +91 -0
  2. package/declarations/-private.d.ts +1 -0
  3. package/declarations/-private.d.ts.map +1 -0
  4. package/declarations/color-scheme.d.ts +1 -0
  5. package/declarations/color-scheme.d.ts.map +1 -0
  6. package/declarations/components/-private/typed-elements.d.ts +1 -0
  7. package/declarations/components/-private/typed-elements.d.ts.map +1 -0
  8. package/declarations/components/-private/utils.d.ts +1 -0
  9. package/declarations/components/-private/utils.d.ts.map +1 -0
  10. package/declarations/components/accordion/content.d.ts +1 -0
  11. package/declarations/components/accordion/content.d.ts.map +1 -0
  12. package/declarations/components/accordion/header.d.ts +1 -0
  13. package/declarations/components/accordion/header.d.ts.map +1 -0
  14. package/declarations/components/accordion/item.d.ts +1 -0
  15. package/declarations/components/accordion/item.d.ts.map +1 -0
  16. package/declarations/components/accordion/public.d.ts +1 -0
  17. package/declarations/components/accordion/public.d.ts.map +1 -0
  18. package/declarations/components/accordion/trigger.d.ts +1 -0
  19. package/declarations/components/accordion/trigger.d.ts.map +1 -0
  20. package/declarations/components/accordion.d.ts +1 -0
  21. package/declarations/components/accordion.d.ts.map +1 -0
  22. package/declarations/components/avatar.d.ts +1 -0
  23. package/declarations/components/avatar.d.ts.map +1 -0
  24. package/declarations/components/dialog.d.ts +1 -0
  25. package/declarations/components/dialog.d.ts.map +1 -0
  26. package/declarations/components/external-link.d.ts +1 -0
  27. package/declarations/components/external-link.d.ts.map +1 -0
  28. package/declarations/components/form.d.ts +1 -0
  29. package/declarations/components/form.d.ts.map +1 -0
  30. package/declarations/components/keys.d.ts +1 -0
  31. package/declarations/components/keys.d.ts.map +1 -0
  32. package/declarations/components/layout/hero.d.ts +1 -0
  33. package/declarations/components/layout/hero.d.ts.map +1 -0
  34. package/declarations/components/layout/sticky-footer.d.ts +1 -0
  35. package/declarations/components/layout/sticky-footer.d.ts.map +1 -0
  36. package/declarations/components/link.d.ts +1 -0
  37. package/declarations/components/link.d.ts.map +1 -0
  38. package/declarations/components/menu.d.ts +1 -0
  39. package/declarations/components/menu.d.ts.map +1 -0
  40. package/declarations/components/one-time-password/buttons.d.ts +1 -0
  41. package/declarations/components/one-time-password/buttons.d.ts.map +1 -0
  42. package/declarations/components/one-time-password/index.d.ts +1 -0
  43. package/declarations/components/one-time-password/index.d.ts.map +1 -0
  44. package/declarations/components/one-time-password/input.d.ts +1 -0
  45. package/declarations/components/one-time-password/input.d.ts.map +1 -0
  46. package/declarations/components/one-time-password/otp.d.ts +1 -0
  47. package/declarations/components/one-time-password/otp.d.ts.map +1 -0
  48. package/declarations/components/one-time-password/utils.d.ts +1 -0
  49. package/declarations/components/one-time-password/utils.d.ts.map +1 -0
  50. package/declarations/components/popover.d.ts +1 -0
  51. package/declarations/components/popover.d.ts.map +1 -0
  52. package/declarations/components/portal-targets.d.ts +1 -0
  53. package/declarations/components/portal-targets.d.ts.map +1 -0
  54. package/declarations/components/portal.d.ts +1 -0
  55. package/declarations/components/portal.d.ts.map +1 -0
  56. package/declarations/components/progress.d.ts +1 -0
  57. package/declarations/components/progress.d.ts.map +1 -0
  58. package/declarations/components/rating/index.d.ts +1 -0
  59. package/declarations/components/rating/index.d.ts.map +1 -0
  60. package/declarations/components/rating/public-types.d.ts +1 -0
  61. package/declarations/components/rating/public-types.d.ts.map +1 -0
  62. package/declarations/components/rating/range.d.ts +1 -0
  63. package/declarations/components/rating/range.d.ts.map +1 -0
  64. package/declarations/components/rating/stars.d.ts +1 -0
  65. package/declarations/components/rating/stars.d.ts.map +1 -0
  66. package/declarations/components/rating/state.d.ts +1 -0
  67. package/declarations/components/rating/state.d.ts.map +1 -0
  68. package/declarations/components/rating/utils.d.ts +1 -0
  69. package/declarations/components/rating/utils.d.ts.map +1 -0
  70. package/declarations/components/rating.d.ts +1 -0
  71. package/declarations/components/rating.d.ts.map +1 -0
  72. package/declarations/components/scroller.d.ts +1 -0
  73. package/declarations/components/scroller.d.ts.map +1 -0
  74. package/declarations/components/shadowed.d.ts +1 -0
  75. package/declarations/components/shadowed.d.ts.map +1 -0
  76. package/declarations/components/switch.d.ts +1 -0
  77. package/declarations/components/switch.d.ts.map +1 -0
  78. package/declarations/components/tabs.d.ts +233 -0
  79. package/declarations/components/tabs.d.ts.map +1 -0
  80. package/declarations/components/toggle-group.d.ts +1 -0
  81. package/declarations/components/toggle-group.d.ts.map +1 -0
  82. package/declarations/components/toggle.d.ts +1 -0
  83. package/declarations/components/toggle.d.ts.map +1 -0
  84. package/declarations/components/violations.css.d.ts +2 -0
  85. package/declarations/components/violations.css.d.ts.map +1 -0
  86. package/declarations/components/visually-hidden.d.ts +1 -0
  87. package/declarations/components/visually-hidden.d.ts.map +1 -0
  88. package/declarations/components/zoetrope/index.d.ts +1 -0
  89. package/declarations/components/zoetrope/index.d.ts.map +1 -0
  90. package/declarations/components/zoetrope/types.d.ts +1 -0
  91. package/declarations/components/zoetrope/types.d.ts.map +1 -0
  92. package/declarations/components/zoetrope.d.ts +1 -0
  93. package/declarations/components/zoetrope.d.ts.map +1 -0
  94. package/declarations/dom-context.d.ts +1 -0
  95. package/declarations/dom-context.d.ts.map +1 -0
  96. package/declarations/floating-ui/component.d.ts +1 -0
  97. package/declarations/floating-ui/component.d.ts.map +1 -0
  98. package/declarations/floating-ui/middleware.d.ts +1 -0
  99. package/declarations/floating-ui/middleware.d.ts.map +1 -0
  100. package/declarations/floating-ui/modifier.d.ts +1 -0
  101. package/declarations/floating-ui/modifier.d.ts.map +1 -0
  102. package/declarations/floating-ui.d.ts +1 -0
  103. package/declarations/floating-ui.d.ts.map +1 -0
  104. package/declarations/head.d.ts +1 -0
  105. package/declarations/head.d.ts.map +1 -0
  106. package/declarations/helpers/body-class.d.ts +1 -0
  107. package/declarations/helpers/body-class.d.ts.map +1 -0
  108. package/declarations/helpers/link.d.ts +1 -0
  109. package/declarations/helpers/link.d.ts.map +1 -0
  110. package/declarations/helpers/service.d.ts +1 -0
  111. package/declarations/helpers/service.d.ts.map +1 -0
  112. package/declarations/helpers.d.ts +1 -0
  113. package/declarations/helpers.d.ts.map +1 -0
  114. package/declarations/iframe.d.ts +1 -0
  115. package/declarations/iframe.d.ts.map +1 -0
  116. package/declarations/index.d.ts +1 -0
  117. package/declarations/index.d.ts.map +1 -0
  118. package/declarations/load.d.ts +1 -0
  119. package/declarations/load.d.ts.map +1 -0
  120. package/declarations/narrowing.d.ts +1 -0
  121. package/declarations/narrowing.d.ts.map +1 -0
  122. package/declarations/on-resize.d.ts +1 -0
  123. package/declarations/on-resize.d.ts.map +1 -0
  124. package/declarations/proper-links.d.ts +1 -0
  125. package/declarations/proper-links.d.ts.map +1 -0
  126. package/declarations/qp.d.ts +1 -0
  127. package/declarations/qp.d.ts.map +1 -0
  128. package/declarations/store.d.ts +1 -0
  129. package/declarations/store.d.ts.map +1 -0
  130. package/declarations/styles.css.d.ts +1 -0
  131. package/declarations/styles.css.d.ts.map +1 -0
  132. package/declarations/tabster.d.ts +1 -0
  133. package/declarations/tabster.d.ts.map +1 -0
  134. package/declarations/template-registry.d.ts +1 -0
  135. package/declarations/template-registry.d.ts.map +1 -0
  136. package/declarations/test-support/a11y.d.ts +1 -0
  137. package/declarations/test-support/a11y.d.ts.map +1 -0
  138. package/declarations/test-support/index.d.ts +1 -0
  139. package/declarations/test-support/index.d.ts.map +1 -0
  140. package/declarations/test-support/otp.d.ts +1 -0
  141. package/declarations/test-support/otp.d.ts.map +1 -0
  142. package/declarations/test-support/rating.d.ts +1 -0
  143. package/declarations/test-support/rating.d.ts.map +1 -0
  144. package/declarations/test-support/routing.d.ts +1 -0
  145. package/declarations/test-support/routing.d.ts.map +1 -0
  146. package/declarations/test-support/zoetrope.d.ts +1 -0
  147. package/declarations/test-support/zoetrope.d.ts.map +1 -0
  148. package/declarations/type-utils.d.ts +1 -0
  149. package/declarations/type-utils.d.ts.map +1 -0
  150. package/declarations/utils.d.ts +1 -0
  151. package/declarations/utils.d.ts.map +1 -0
  152. package/dist/-private.js +1 -0
  153. package/dist/-private.js.map +1 -1
  154. package/dist/color-scheme.js +1 -0
  155. package/dist/color-scheme.js.map +1 -1
  156. package/dist/components/-private/typed-elements.js +1 -0
  157. package/dist/components/-private/typed-elements.js.map +1 -1
  158. package/dist/components/-private/utils.js +1 -0
  159. package/dist/components/-private/utils.js.map +1 -1
  160. package/dist/components/accordion/content.js +2 -1
  161. package/dist/components/accordion/content.js.map +1 -1
  162. package/dist/components/accordion/header.js +2 -1
  163. package/dist/components/accordion/header.js.map +1 -1
  164. package/dist/components/accordion/item.js +2 -1
  165. package/dist/components/accordion/item.js.map +1 -1
  166. package/dist/components/accordion/trigger.js +2 -1
  167. package/dist/components/accordion/trigger.js.map +1 -1
  168. package/dist/components/accordion.js +2 -1
  169. package/dist/components/accordion.js.map +1 -1
  170. package/dist/components/avatar.js +1 -0
  171. package/dist/components/avatar.js.map +1 -1
  172. package/dist/components/dialog.js +1 -0
  173. package/dist/components/dialog.js.map +1 -1
  174. package/dist/components/external-link.js +1 -0
  175. package/dist/components/external-link.js.map +1 -1
  176. package/dist/components/form.js +1 -0
  177. package/dist/components/form.js.map +1 -1
  178. package/dist/components/keys.js +1 -0
  179. package/dist/components/keys.js.map +1 -1
  180. package/dist/components/layout/hero.js +3 -1
  181. package/dist/components/layout/hero.js.map +1 -1
  182. package/dist/components/layout/sticky-footer.js +3 -1
  183. package/dist/components/layout/sticky-footer.js.map +1 -1
  184. package/dist/components/link.js +1 -0
  185. package/dist/components/link.js.map +1 -1
  186. package/dist/components/menu.js +1 -0
  187. package/dist/components/menu.js.map +1 -1
  188. package/dist/components/one-time-password/buttons.js +1 -0
  189. package/dist/components/one-time-password/buttons.js.map +1 -1
  190. package/dist/components/one-time-password/index.js +1 -0
  191. package/dist/components/one-time-password/index.js.map +1 -1
  192. package/dist/components/one-time-password/input.js +1 -0
  193. package/dist/components/one-time-password/input.js.map +1 -1
  194. package/dist/components/one-time-password/otp.js +1 -0
  195. package/dist/components/one-time-password/otp.js.map +1 -1
  196. package/dist/components/one-time-password/utils.js +1 -0
  197. package/dist/components/one-time-password/utils.js.map +1 -1
  198. package/dist/components/popover.js +1 -0
  199. package/dist/components/popover.js.map +1 -1
  200. package/dist/components/portal-targets.js +1 -0
  201. package/dist/components/portal-targets.js.map +1 -1
  202. package/dist/components/portal.js +1 -0
  203. package/dist/components/portal.js.map +1 -1
  204. package/dist/components/progress.js +1 -0
  205. package/dist/components/progress.js.map +1 -1
  206. package/dist/components/rating/index.js +1 -0
  207. package/dist/components/rating/index.js.map +1 -1
  208. package/dist/components/rating/range.js +1 -0
  209. package/dist/components/rating/range.js.map +1 -1
  210. package/dist/components/rating/stars.js +1 -0
  211. package/dist/components/rating/stars.js.map +1 -1
  212. package/dist/components/rating/state.js +1 -0
  213. package/dist/components/rating/state.js.map +1 -1
  214. package/dist/components/rating/utils.js +1 -0
  215. package/dist/components/rating/utils.js.map +1 -1
  216. package/dist/components/rating.js +1 -0
  217. package/dist/components/scroller.js +1 -0
  218. package/dist/components/scroller.js.map +1 -1
  219. package/dist/components/shadowed.js +1 -0
  220. package/dist/components/shadowed.js.map +1 -1
  221. package/dist/components/switch.js +1 -0
  222. package/dist/components/switch.js.map +1 -1
  223. package/dist/components/tabs.js +218 -0
  224. package/dist/components/tabs.js.map +1 -0
  225. package/dist/components/toggle-group.js +1 -0
  226. package/dist/components/toggle-group.js.map +1 -1
  227. package/dist/components/toggle.js +1 -0
  228. package/dist/components/toggle.js.map +1 -1
  229. package/dist/components/violations.css.js +3 -0
  230. package/dist/components/violations.css.js.map +1 -0
  231. package/dist/components/visually-hidden.js +2 -1
  232. package/dist/components/visually-hidden.js.map +1 -1
  233. package/dist/components/zoetrope/index.js +3 -1
  234. package/dist/components/zoetrope/index.js.map +1 -1
  235. package/dist/components/zoetrope.js +1 -0
  236. package/dist/dom-context.js +2 -1
  237. package/dist/dom-context.js.map +1 -1
  238. package/dist/floating-ui/component.js +1 -0
  239. package/dist/floating-ui/component.js.map +1 -1
  240. package/dist/floating-ui/middleware.js +1 -0
  241. package/dist/floating-ui/middleware.js.map +1 -1
  242. package/dist/floating-ui/modifier.js +1 -0
  243. package/dist/floating-ui/modifier.js.map +1 -1
  244. package/dist/floating-ui.js +1 -0
  245. package/dist/floating-ui.js.map +1 -1
  246. package/dist/head.js +1 -0
  247. package/dist/head.js.map +1 -1
  248. package/dist/helpers/body-class.js +1 -0
  249. package/dist/helpers/body-class.js.map +1 -1
  250. package/dist/helpers/link.js +1 -0
  251. package/dist/helpers/link.js.map +1 -1
  252. package/dist/helpers/service.js +1 -0
  253. package/dist/helpers/service.js.map +1 -1
  254. package/dist/helpers.js +1 -0
  255. package/dist/helpers.js.map +1 -1
  256. package/dist/iframe.js +1 -0
  257. package/dist/iframe.js.map +1 -1
  258. package/dist/index.js +1 -0
  259. package/dist/index.js.map +1 -1
  260. package/dist/{item-D6pwWzMs.js → item-CwIzoqlC.js} +2 -1
  261. package/dist/item-CwIzoqlC.js.map +1 -0
  262. package/dist/load.js +1 -0
  263. package/dist/load.js.map +1 -1
  264. package/dist/narrowing.js +1 -0
  265. package/dist/narrowing.js.map +1 -1
  266. package/dist/on-resize.js +1 -0
  267. package/dist/on-resize.js.map +1 -1
  268. package/dist/proper-links.js +1 -0
  269. package/dist/proper-links.js.map +1 -1
  270. package/dist/qp.js +1 -0
  271. package/dist/qp.js.map +1 -1
  272. package/dist/store.js +1 -0
  273. package/dist/store.js.map +1 -1
  274. package/dist/styles.css.js +2 -1
  275. package/dist/tabster.js +1 -0
  276. package/dist/tabster.js.map +1 -1
  277. package/dist/test-support/a11y.js +1 -0
  278. package/dist/test-support/a11y.js.map +1 -1
  279. package/dist/test-support/index.js +1 -0
  280. package/dist/test-support/index.js.map +1 -1
  281. package/dist/test-support/otp.js +1 -0
  282. package/dist/test-support/otp.js.map +1 -1
  283. package/dist/test-support/rating.js +1 -0
  284. package/dist/test-support/rating.js.map +1 -1
  285. package/dist/test-support/routing.js +1 -0
  286. package/dist/test-support/routing.js.map +1 -1
  287. package/dist/test-support/zoetrope.js +1 -0
  288. package/dist/test-support/zoetrope.js.map +1 -1
  289. package/dist/utils.js +1 -0
  290. package/dist/utils.js.map +1 -1
  291. package/dist/visually-hidden-CGP1FSjt.js +3 -0
  292. package/dist/visually-hidden-CGP1FSjt.js.map +1 -0
  293. package/package.json +23 -25
  294. package/dist/item-D6pwWzMs.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"dom-context.js","sources":["../src/dom-context.gts"],"sourcesContent":["import Component from \"@glimmer/component\";\nimport { cached, tracked } from \"@glimmer/tracking\";\nimport { assert } from \"@ember/debug\";\n\nimport { createStore } from \"ember-primitives/store\";\n\nimport type { Newable } from \"./type-utils\";\nimport type Owner from \"@ember/owner\";\n\n/**\n * IMPLEMENTATION NOTE:\n * we don't use https://github.com/webcomponents-cg/community-protocols/blob/main/proposals/context.md\n * because it is not inherently reactive.\n *\n * Its *event* based, which opts you out of fine-grained reactivity.\n * We want minimal effort fine-grained reactivity.\n *\n * This Technique follows the DOM tree, and is synchronous,\n * allowing correct fine-grained signals-based reactivity.\n *\n * We *could* do less work to find Providers,\n * but only if we forgoe DOM-tree scoping.\n * We must traverse the DOM hierarchy to validate that we aren't accessing providers from different subtrees.\n */\nconst LOOKUP = new WeakMap<Element, [unknown, () => unknown]>();\n\nexport class Provide<Data extends object> extends Component<{\n Args: {\n /**\n * What data do you want to provide to the DOM subtree?\n *\n * If this is a function or class, it will be instantiated and given an\n * owner + destroyable linkage via `createStore`\n */\n data: Data | (() => Data) | Newable<Data>;\n\n /**\n * Optionally, you may use string-based keys to reference the data in the Provide.\n *\n * This is not recommended though, because when using a class or other object-like structure,\n * the type in the `<Consume>` component can be derived from that class or object-like structure.\n * With string keys, the `<Consume>` type will be unknown.\n */\n key?: string;\n };\n Blocks: {\n /**\n * The content that this component will _provide_ data to the entire hierarchy.\n */\n default: [];\n };\n}> {\n get data() {\n assert(`@data is missing in <Provide>. Please pass @data.`, \"data\" in this.args);\n\n /**\n * This covers both classes and functions\n */\n if (typeof this.args.data === \"function\") {\n return createStore<Data>(this, this.args.data);\n }\n\n /**\n * Non-instantiable value\n */\n return this.args.data;\n }\n\n element: HTMLDivElement;\n\n constructor(\n owner: Owner,\n args: {\n data: Data | (() => Data) | Newable<Data>;\n key?: string;\n },\n ) {\n super(owner, args);\n\n const element = document.createElement(\"div\");\n\n element.style.display = \"contents\";\n\n const key = this.args.key ?? this.args.data;\n\n LOOKUP.set(element, [key, () => this.data]);\n this.element = element;\n }\n\n <template>\n {{this.element}}\n\n {{#in-element this.element}}\n {{yield}}\n {{/in-element}}\n </template>\n}\n\nfunction findForKey<Data>(startElement: Element, key: string | object): undefined | (() => Data) {\n let parent: Element | null = startElement;\n\n while ((parent = parent.parentElement)) {\n const maybe = LOOKUP.get(parent);\n\n if (!maybe) {\n continue;\n }\n\n if (maybe[0] === key) {\n return maybe[1] as () => Data;\n }\n }\n}\n\ntype DataForKey<Key> = Key extends string\n ? unknown\n : Key extends Newable<infer T>\n ? T\n : Key extends () => infer T\n ? T\n : Key;\n\nexport class Consume<Key extends object | string> extends Component<{\n Args: {\n key: Key;\n };\n Blocks: {\n default: [\n context: {\n data: DataForKey<Key>;\n },\n ];\n };\n}> {\n // SAFETY: We do a runtime assert in the getter below.\n @tracked getData!: () => DataForKey<Key>;\n\n element: HTMLDivElement;\n\n constructor(owner: Owner, args: { key: Key }) {\n super(owner, args);\n\n this.element = document.createElement(\"div\");\n this.element.style.display = \"contents\";\n }\n\n @cached\n get context() {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const self = this;\n\n return {\n get data(): DataForKey<Key> {\n const getData = findForKey<Key>(self.element, self.args.key);\n\n assert(\n `Could not find provided context in <Consume>. Please assure that there is a corresponding <Provide> component before using this <Consume> component`,\n getData,\n );\n\n // SAFETY: return type handled by getter's signature\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return getData() as any;\n },\n };\n }\n\n <template>\n {{this.element}}\n\n {{#in-element this.element}}\n {{yield this.context}}\n {{/in-element}}\n </template>\n}\n"],"names":["LOOKUP","WeakMap","Provide","Component","data","assert","args","createStore","element","constructor","owner","document","createElement","style","display","key","set","setComponentTemplate","precompileTemplate","strictMode","findForKey","startElement","parent","parentElement","maybe","get","Consume","tracked","i","void 0","context","self","getData","n","prototype","cached"],"mappings":";;;;;;;;AAwBA,MAAMA,MAAA,GAAS,IAAIC,SAAwC;AAEpD,MAAMC,OAAA,SAAqCC,SAAA;EA0BhD,IAAIC,IAAAA,GAAO;IACTC,MAAA,CAAO,mDAAmD,EAAE,MAAA,IAAU,IAAI,CAACC,IAAI,CAAA;AAE/E;;;IAGA,IAAI,OAAO,IAAI,CAACA,IAAI,CAACF,IAAI,KAAK,UAAA,EAAY;MACxC,OAAOG,WAAA,CAAkB,IAAI,EAAE,IAAI,CAACD,IAAI,CAACF,IAAI,CAAA;AAC/C,IAAA;AAEA;;AAEC;AACD,IAAA,OAAO,IAAI,CAACE,IAAI,CAACF,IAAI;AACvB,EAAA;EAEAI,OAAA;AAEAC,EAAAA,WAAAA,CACEC,KAAY,EACZJ,IAGC,EACD;AACA,IAAA,KAAK,CAACI,KAAA,EAAOJ,IAAA,CAAA;AAEb,IAAA,MAAME,OAAA,GAAUG,QAAA,CAASC,aAAa,CAAC,KAAA,CAAA;AAEvCJ,IAAAA,OAAA,CAAQK,KAAK,CAACC,OAAO,GAAG,UAAA;AAExB,IAAA,MAAMC,GAAA,GAAM,IAAI,CAACT,IAAI,CAACS,GAAG,IAAI,IAAI,CAACT,IAAI,CAACF,IAAI;AAE3CJ,IAAAA,MAAA,CAAOgB,GAAG,CAACR,OAAA,EAAS,CAACO,GAAA,EAAK,MAAM,IAAI,CAACX,IAAI,CAAC,CAAA;IAC1C,IAAI,CAACI,OAAO,GAAGA,OAAA;AACjB,EAAA;AAEA,EAAA;IAAAS,oBAAA,CAAAC,kBAAA,CAAA,sGAAA,EAMA;MAAAC,UAAA,EAAA;KAAU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AAA,EAAA,SAAA,EAAA,CAnBCC,MAAA,CAAA,CAAA;AAAA;AAqBD,EAAA;IAAAlB,oBAAA,CAAAC,kBAAA,CAAA,mHAAA,EAMA;MAAAC,UAAA,EAAA;KAAU,CAAA,EAAV,IAAW,CAAA;AAAD;AACZ;;;;"}
1
+ {"version":3,"file":"dom-context.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,3 +1,4 @@
1
+
1
2
  import Component from '@glimmer/component';
2
3
  import { tracked } from '@glimmer/tracking';
3
4
  import { hash } from '@ember/helper';
@@ -1 +1 @@
1
- {"version":3,"file":"component.js","sources":["../../src/floating-ui/component.gts"],"sourcesContent":["import Component from \"@glimmer/component\";\nimport { tracked } from \"@glimmer/tracking\";\nimport { hash } from \"@ember/helper\";\n\nimport { modifier as eModifier } from \"ember-modifier\";\n\nimport { anchorTo } from \"./modifier.ts\";\n\nimport type { Signature as ModifierSignature } from \"./modifier.ts\";\nimport type { MiddlewareState } from \"@floating-ui/dom\";\nimport type { ModifierLike } from \"@glint/template\";\n\ntype ModifierArgs = ModifierSignature[\"Args\"][\"Named\"];\n\ninterface ReferenceSignature {\n Element: HTMLElement | SVGElement;\n}\n\nexport interface Signature {\n Args: {\n /**\n * Additional middleware to pass to FloatingUI.\n *\n * See: [The middleware docs](https://floating-ui.com/docs/middleware)\n */\n middleware?: ModifierArgs[\"middleware\"];\n /**\n * Where to place the floating element relative to its reference element.\n * The default is 'bottom'.\n *\n * See: [The placement docs](https://floating-ui.com/docs/computePosition#placement)\n */\n placement?: ModifierArgs[\"placement\"];\n /**\n * This is the type of CSS position property to use.\n * By default this is 'fixed', but can also be 'absolute'.\n *\n * See: [The strategy docs](https://floating-ui.com/docs/computePosition#strategy)\n */\n strategy?: ModifierArgs[\"strategy\"];\n /**\n * Options to pass to the [flip middleware](https://floating-ui.com/docs/flip)\n */\n flipOptions?: ModifierArgs[\"flipOptions\"];\n /**\n * Options to pass to the [hide middleware](https://floating-ui.com/docs/hide)\n */\n hideOptions?: ModifierArgs[\"hideOptions\"];\n /**\n * Options to pass to the [shift middleware](https://floating-ui.com/docs/shift)\n */\n shiftOptions?: ModifierArgs[\"shiftOptions\"];\n /**\n * Options to pass to the [offset middleware](https://floating-ui.com/docs/offset)\n */\n offsetOptions?: ModifierArgs[\"offsetOptions\"];\n };\n Blocks: {\n default: [\n /**\n * A modifier to apply to the _reference_ element.\n * This is what the floating element will use to anchor to.\n *\n * Example\n * ```gjs\n * import { FloatingUI } from 'ember-primitives/floating-ui';\n *\n * <template>\n * <FloatingUI as |reference floating|>\n * <button {{reference}}> ... </button>\n * ...\n * </FloatingUI>\n * </template>\n * ```\n */\n reference: ModifierLike<ReferenceSignature>,\n /**\n * A modifier to apply to the _floating_ element.\n * This is what will anchor to the reference element.\n *\n * Example\n * ```gjs\n * import { FloatingUI } from 'ember-primitives/floating-ui';\n *\n * <template>\n * <FloatingUI as |reference floating|>\n * <button {{reference}}> ... </button>\n * <menu {{floating}}> ... </menu>\n * </FloatingUI>\n * </template>\n * ```\n */\n floating:\n | undefined\n | ModifierLike<{\n Element: HTMLElement;\n Args: {\n Named: ModifierArgs;\n };\n }>,\n /**\n * Special utilities for advanced usage\n */\n util: {\n /**\n * If you want to have a single modifier with custom behavior\n * on your reference element, you may use this `setReference`\n * function to set the reference, rather than having multiple modifiers\n * on that element.\n */\n setReference: (element: HTMLElement | SVGElement) => void;\n /**\n * Metadata exposed from floating-ui.\n * Gives you x, y position, among other things.\n */\n data?: MiddlewareState;\n },\n ];\n };\n}\n\nconst ref = eModifier<{\n Element: HTMLElement | SVGElement;\n Args: {\n Positional: [setRef: (element: HTMLElement | SVGElement) => void];\n };\n}>((element: HTMLElement | SVGElement, positional) => {\n const fn = positional[0];\n\n fn(element);\n});\n\n/**\n * A component that provides no DOM and yields two modifiers for creating\n * creating floating uis, such as menus, popovers, tooltips, etc.\n * This component currently uses [Floating UI](https://floating-ui.com/)\n * but will be switching to [CSS Anchor Positioning](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_anchor_positioning) when that lands.\n *\n * Example usage:\n * ```gjs\n * import { FloatingUI } from 'ember-primitives/floating-ui';\n *\n * <template>\n * <FloatingUI as |reference floating|>\n * <button {{reference}}> ... </button>\n * <menu {{floating}}> ... </menu>\n * </FloatingUI>\n * </template>\n * ```\n */\nexport class FloatingUI extends Component<Signature> {\n @tracked reference?: HTMLElement | SVGElement = undefined;\n @tracked data?: MiddlewareState = undefined;\n\n setData: ModifierArgs[\"setData\"] = (data) => (this.data = data);\n\n setReference = (element: HTMLElement | SVGElement) => {\n this.reference = element;\n };\n\n <template>\n {{#let\n (modifier\n anchorTo\n flipOptions=@flipOptions\n hideOptions=@hideOptions\n middleware=@middleware\n offsetOptions=@offsetOptions\n placement=@placement\n shiftOptions=@shiftOptions\n strategy=@strategy\n setData=this.setData\n )\n as |prewiredAnchorTo|\n }}\n {{#let (if this.reference (modifier prewiredAnchorTo this.reference)) as |floating|}}\n {{! @glint-nocheck -- Excessively deep, possibly infinite }}\n {{yield\n (modifier ref this.setReference)\n floating\n (hash setReference=this.setReference data=this.data)\n }}\n {{/let}}\n {{/let}}\n </template>\n}\n"],"names":["ref","eModifier","element","positional","fn","FloatingUI","Component","g","prototype","tracked","undefined","i","void 0","setData","data","setReference","reference","setComponentTemplate","precompileTemplate","strictMode","scope","anchorTo","hash"],"mappings":";;;;;;;;;AAyHA,MAAMA,GAAA,GAAMC,QAAA,CAKT,CAACC,OAAuB,EAAYC,UAAA,KAAA;AACrC,EAAA,MAAMC,EAAA,GAAKD,UAAU,CAAC,CAAA,CAAE;EAExBC,EAAA,CAAGF,OAAA,CAAA;AACL,CAAA,CAAA;AAEA;;;;;;;;;;;;;;;;;;AAkBO,MAAMG,UAAA,SAAmBC,SAAA,CAAU;AAAA,EAAA;IAAAC,CAAA,CAAA,IAAA,CAAAC,SAAA,EAAA,WAAA,EAAA,CACvCC,OAAA,CAAA,EAAA,YAAA;AAAA,MAAA,OAA+CC,SAAA;AAAA,IAAA,CAAA,CAAA;AAAA;AAAA,EAAA,UAAA,IAAAC,CAAA,CAAA,IAAA,EAAA,WAAA,CAAA,EAAAC,MAAA;AAAA,EAAA;IAAAL,CAAA,CAAA,IAAA,CAAAC,SAAA,EAAA,MAAA,EAAA,CAC/CC,OAAA,CAAA,EAAA,YAAA;AAAA,MAAA,OAAiCC,SAAA;AAAA,IAAA,CAAA,CAAA;AAAA;AAAA,EAAA,KAAA,IAAAC,CAAA,CAAA,IAAA,EAAA,MAAA,CAAA,EAAAC,MAAA;AAElCC,EAAAA,OAAA,GAAoCC,IAAA,IAAU,IAAI,CAACA,IAAI,GAAGA,IAAI;EAE9DC,YAAA,GAAgBb,OAAuB,IAAA;IACrC,IAAI,CAACc,SAAS,GAAGd,OAAA;EACnB,CAAA;AAEA,EAAA;IAAAe,oBAAA,CAAAC,kBAAA,CAAA,mjBAAA,EAwBA;MAAAC,UAAA,EAAA,IAAA;AAAAC,MAAAA,KAAA,EAAAA,OAAA;QAAAC,QAAA;QAAArB,GAAA;AAAAsB,QAAAA;AAAA,OAAA;KAAU,CAAA,EAAV,IAAW,CAAA;AAAD;AACZ;;;;"}
1
+ {"version":3,"file":"component.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,3 +1,4 @@
1
+
1
2
  function exposeMetadata() {
2
3
  return {
3
4
  name: 'metadata',
@@ -1 +1 @@
1
- {"version":3,"file":"middleware.js","sources":["../../src/floating-ui/middleware.ts"],"sourcesContent":["import type { Middleware } from '@floating-ui/dom';\n\nexport function exposeMetadata(): Middleware {\n return {\n name: 'metadata',\n fn: (data) => {\n // https://floating-ui.com/docs/middleware#always-return-an-object\n return {\n data,\n };\n },\n };\n}\n"],"names":["exposeMetadata","name","fn","data"],"mappings":"AAEO,SAASA,cAAcA,GAAe;EAC3C,OAAO;AACLC,IAAAA,IAAI,EAAE,UAAU;IAChBC,EAAE,EAAGC,IAAI,IAAK;AACZ;MACA,OAAO;AACLA,QAAAA;OACD;AACH,IAAA;GACD;AACH;;;;"}
1
+ {"version":3,"file":"middleware.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,3 +1,4 @@
1
+
1
2
  import { assert } from '@ember/debug';
2
3
  import { autoUpdate, computePosition, offset, flip, shift, hide } from '@floating-ui/dom';
3
4
  import { modifier } from 'ember-modifier';
@@ -1 +1 @@
1
- {"version":3,"file":"modifier.js","sources":["../../src/floating-ui/modifier.ts"],"sourcesContent":["import { assert } from '@ember/debug';\n\nimport { autoUpdate, computePosition, flip, hide, offset, shift } from '@floating-ui/dom';\nimport { modifier as eModifier } from 'ember-modifier';\n\nimport { exposeMetadata } from './middleware.ts';\n\nimport type {\n FlipOptions,\n HideOptions,\n Middleware,\n OffsetOptions,\n Placement,\n ShiftOptions,\n Strategy,\n} from '@floating-ui/dom';\n\nexport interface Signature {\n /**\n *\n */\n Element: HTMLElement;\n Args: {\n Positional: [\n /**\n * What do use as the reference element.\n * Can be a selector or element instance.\n *\n * Example:\n * ```gjs\n * import { anchorTo } from 'ember-primitives/floating-ui';\n *\n * <template>\n * <div id=\"reference\">...</div>\n * <div {{anchorTo \"#reference\"}}> ... </div>\n * </template>\n * ```\n */\n referenceElement: string | HTMLElement | SVGElement,\n ];\n Named: {\n /**\n * This is the type of CSS position property to use.\n * By default this is 'fixed', but can also be 'absolute'.\n *\n * See: [The strategy docs](https://floating-ui.com/docs/computePosition#strategy)\n */\n strategy?: Strategy;\n /**\n * Options to pass to the [offset middleware](https://floating-ui.com/docs/offset)\n */\n offsetOptions?: OffsetOptions;\n /**\n * Where to place the floating element relative to its reference element.\n * The default is 'bottom'.\n *\n * See: [The placement docs](https://floating-ui.com/docs/computePosition#placement)\n */\n placement?: Placement;\n /**\n * Options to pass to the [flip middleware](https://floating-ui.com/docs/flip)\n */\n flipOptions?: FlipOptions;\n /**\n * Options to pass to the [shift middleware](https://floating-ui.com/docs/shift)\n */\n shiftOptions?: ShiftOptions;\n /**\n * Options to pass to the [hide middleware](https://floating-ui.com/docs/hide)\n */\n hideOptions?: HideOptions;\n /**\n * Additional middleware to pass to FloatingUI.\n *\n * See: [The middleware docs](https://floating-ui.com/docs/middleware)\n */\n middleware?: Middleware[];\n /**\n * A callback for when data changes about the position / placement / etc\n * of the floating element.\n */\n setData?: Middleware['fn'];\n };\n };\n}\n\n/**\n * A modifier to apply to the _floating_ element.\n * This is what will anchor to the reference element.\n *\n * Example\n * ```gjs\n * import { anchorTo } from 'ember-primitives/floating-ui';\n *\n * <template>\n * <button id=\"my-button\"> ... </button>\n * <menu {{anchorTo \"#my-button\"}}> ... </menu>\n * </template>\n * ```\n */\nexport const anchorTo = eModifier<Signature>(\n (\n floatingElement,\n [_referenceElement],\n {\n strategy = 'fixed',\n offsetOptions = 0,\n placement = 'bottom',\n flipOptions,\n shiftOptions,\n middleware = [],\n setData,\n }\n ) => {\n const referenceElement: null | HTMLElement | SVGElement =\n typeof _referenceElement === 'string'\n ? document.querySelector(_referenceElement)\n : _referenceElement;\n\n assert(\n 'no reference element defined',\n referenceElement instanceof HTMLElement || referenceElement instanceof SVGElement\n );\n\n assert(\n 'no floating element defined',\n floatingElement instanceof HTMLElement || _referenceElement instanceof SVGElement\n );\n\n assert(\n 'reference and floating elements cannot be the same element',\n floatingElement !== _referenceElement\n );\n\n assert('@middleware must be an array of one or more objects', Array.isArray(middleware));\n\n Object.assign(floatingElement.style, {\n position: strategy,\n top: '0',\n left: '0',\n });\n\n const update = async () => {\n const { middlewareData, x, y } = await computePosition(referenceElement, floatingElement, {\n middleware: [\n offset(offsetOptions),\n flip(flipOptions),\n shift(shiftOptions),\n ...middleware,\n hide({ strategy: 'referenceHidden' }),\n hide({ strategy: 'escaped' }),\n exposeMetadata(),\n ],\n placement,\n strategy,\n });\n\n const referenceHidden = middlewareData.hide?.referenceHidden;\n\n Object.assign(floatingElement.style, {\n top: `${y}px`,\n left: `${x}px`,\n margin: 0,\n visibility: referenceHidden ? 'hidden' : 'visible',\n });\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n void setData?.(middlewareData['metadata']);\n };\n\n void update();\n\n // eslint-disable-next-line @typescript-eslint/no-misused-promises\n const cleanup = autoUpdate(referenceElement, floatingElement, update);\n\n /**\n * in the function-modifier manager, teardown of the previous modifier\n * occurs before setup of the next\n * https://github.com/ember-modifier/ember-modifier/blob/main/ember-modifier/src/-private/function-based/modifier-manager.ts#L58\n */\n return cleanup;\n }\n);\n"],"names":["anchorTo","eModifier","floatingElement","_referenceElement","strategy","offsetOptions","placement","flipOptions","shiftOptions","middleware","setData","referenceElement","document","querySelector","assert","HTMLElement","SVGElement","Array","isArray","Object","assign","style","position","top","left","update","middlewareData","x","y","computePosition","offset","flip","shift","hide","exposeMetadata","referenceHidden","margin","visibility","cleanup","autoUpdate"],"mappings":";;;;;AAsFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMA,QAAQ,GAAGC,QAAS,CAC/B,CACEC,eAAe,EACf,CAACC,iBAAiB,CAAC,EACnB;AACEC,EAAAA,QAAQ,GAAG,OAAO;AAClBC,EAAAA,aAAa,GAAG,CAAC;AACjBC,EAAAA,SAAS,GAAG,QAAQ;EACpBC,WAAW;EACXC,YAAY;AACZC,EAAAA,UAAU,GAAG,EAAE;AACfC,EAAAA;AACF,CAAC,KACE;AACH,EAAA,MAAMC,gBAAiD,GACrD,OAAOR,iBAAiB,KAAK,QAAQ,GACjCS,QAAQ,CAACC,aAAa,CAACV,iBAAiB,CAAC,GACzCA,iBAAiB;EAEvBW,MAAM,CACJ,8BAA8B,EAC9BH,gBAAgB,YAAYI,WAAW,IAAIJ,gBAAgB,YAAYK,UACzE,CAAC;EAEDF,MAAM,CACJ,6BAA6B,EAC7BZ,eAAe,YAAYa,WAAW,IAAIZ,iBAAiB,YAAYa,UACzE,CAAC;AAEDF,EAAAA,MAAM,CACJ,4DAA4D,EAC5DZ,eAAe,KAAKC,iBACtB,CAAC;EAEDW,MAAM,CAAC,qDAAqD,EAAEG,KAAK,CA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B,MAAM,CAAC;;AAErE;AACJ;AACA;AACA;AACA;AACI,EAAA,OAAOa,OAAO;AAChB,CACF;;;;"}
1
+ {"version":3,"file":"modifier.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,3 +1,4 @@
1
+
1
2
  export { FloatingUI } from './floating-ui/component.js';
2
3
  export { anchorTo } from './floating-ui/modifier.js';
3
4
  //# sourceMappingURL=floating-ui.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"floating-ui.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
1
+ {"version":3,"file":"floating-ui.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
package/dist/head.js CHANGED
@@ -1,3 +1,4 @@
1
+
1
2
  import { precompileTemplate } from '@ember/template-compilation';
2
3
  import { setComponentTemplate } from '@ember/component';
3
4
  import templateOnly from '@ember/component/template-only';
package/dist/head.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"head.js","sources":["../src/head.gts"],"sourcesContent":["import type { TOC } from \"@ember/component/template-only\";\n\nexport interface Signature {\n Blocks: {\n /**\n * Content to render in to the `<head>` element\n */\n default: [];\n };\n}\n\nfunction getHead() {\n return document.head;\n}\n\n/**\n * Utility component to place elements in the document `<head>`\n *\n * When this component is unrendered, its contents will be removed as well.\n *\n * @example\n * ```js\n * import { InHead } from 'ember-primitives/head';\n *\n * <template>\n * {{#if @useBootstrap}}\n * <script src=\"https://cdn.jsdelivr.net/npm/bootstrap@5.3.7/dist/js/bootstrap.bundle.min.js\"></script>\n * <link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.3.7/dist/css/bootstrap.min.css\">\n * {{/if}}\n * </template>\n * ```\n */\nexport const InHead: TOC<Signature> = <template>\n {{#in-element (getHead) insertBefore=null}}\n {{yield}}\n {{/in-element}}\n</template>;\n"],"names":["getHead","document","head","InHead","setComponentTemplate","precompileTemplate","strictMode","scope","templateOnly"],"mappings":";;;;AAWA,SAASA,OAAAA,GAAA;EACP,OAAOC,SAASC,IAAI;AACtB;AAEA;;;;;;;;;;;;;;;;AAgBC;MACYC,MAAY,GAAAC,oBAAA,CAAaC,kBAAA,CAAA,qFAAA,EAItC;EAAAC,UAAA,EAAA,IAAA;AAAAC,EAAAA,KAAA,EAAAA,OAAA;AAAAP,IAAAA;AAAA,GAAA;AAAU,CAAA,CAAA,EAAAQ,YAAA,EAAA;;;;"}
1
+ {"version":3,"file":"head.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,3 +1,4 @@
1
+
1
2
  import Helper from '@ember/component/helper';
2
3
  import { buildWaiter } from '@ember/test-waiters';
3
4
 
@@ -1 +1 @@
1
- {"version":3,"file":"body-class.js","sources":["../../src/helpers/body-class.ts"],"sourcesContent":["/**\n * Initial inspo:\n * - https://github.com/ef4/ember-set-body-class/blob/master/addon/services/body-class.js\n * - https://github.com/ef4/ember-set-body-class/blob/master/addon/helpers/set-body-class.js\n */\nimport Helper from '@ember/component/helper';\nimport { buildWaiter } from '@ember/test-waiters';\n\nconst waiter = buildWaiter('ember-primitives:body-class:raf');\n\nlet id = 0;\nconst registrations = new Map<number, string[]>();\nlet previousRegistrations: string[] = [];\n\nfunction classNames(): string[] {\n const allNames = new Set<string>();\n\n for (const classNames of registrations.values()) {\n for (const className of classNames) {\n allNames.add(className);\n }\n }\n\n return [...allNames];\n}\n\nlet frame: number;\nlet waiterToken: unknown;\n\nfunction queueUpdate() {\n waiterToken ||= waiter.beginAsync();\n\n cancelAnimationFrame(frame);\n frame = requestAnimationFrame(() => {\n updateBodyClass();\n waiter.endAsync(waiterToken);\n waiterToken = undefined;\n });\n}\n\n/**\n * This should only add/remove classes that we tried to maintain via the body-class helper.\n *\n * Folks can set classes in their html and we don't want to mess with those\n */\nfunction updateBodyClass() {\n const toAdd = classNames();\n\n for (const name of previousRegistrations) {\n document.body.classList.remove(name);\n }\n\n for (const name of toAdd) {\n document.body.classList.add(name);\n }\n\n previousRegistrations = toAdd;\n}\n\nexport interface Signature {\n Args: {\n Positional: [\n /**\n * a space-delimited list of classes to apply when this helper is called.\n *\n * When the helper is removed from rendering, the clasess will be removed as well.\n */\n classes: string,\n ];\n };\n /**\n * This helper returns nothing, as it is a side-effect that mutates and manages external state.\n */\n Return: undefined;\n}\n\nexport default class BodyClass extends Helper<Signature> {\n localId = id++;\n\n compute([classes]: [string]): undefined {\n const classNames = classes ? classes.split(/\\s+/) : [];\n\n registrations.set(this.localId, classNames);\n\n queueUpdate();\n }\n\n willDestroy() {\n registrations.delete(this.localId);\n queueUpdate();\n }\n}\n\nexport const bodyClass = BodyClass;\n"],"names":["waiter","buildWaiter","id","registrations","Map","previousRegistrations","classNames","allNames","Set","values","className","add","frame","waiterToken","queueUpdate","beginAsync","cancelAnimationFrame","requestAnimationFrame","updateBodyClass","endAsync","undefined","toAdd","name","document","body","classList","remove","BodyClass","Helper","localId","compute","classes","split","set","willDestroy","delete","bodyClass"],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;AAIA,MAAMA,MAAM,GAAGC,WAAW,CAAC,iCAAiC,CAAC;AAE7D,IAAIC,EAAE,GAAG,CAAC;AACV,MAAMC,aAAa,GAAG,IAAIC,GAAG,EAAoB;AACjD,IAAIC,qBAA+B,GAAG,EAAE;AAExC,SAASC,UAAUA,GAAa;AAC9B,EAAA,MAAMC,QAAQ,GAAG,IAAIC,GAAG,EAAU;EAElC,KAAK,MAAMF,UAAU,IAAIH,aAAa,CAACM,MAAM,EAAE,EAAE;AAC/C,IAAA,KAAK,MAAMC,SAAS,IAAIJ,UAAU,EAAE;AAClCC,MAAAA,QAAQ,CAACI,GAAG,CAACD,SAAS,CAAC;AACzB,IAAA;AACF,EAAA;EAEA,OAAO,CAAC,GAAGH,QAAQ,CAAC;AACtB;AAEA,IAAIK,KAAa;AACjB,IAAIC,WAAoB;AAExB,SAASC,WAAWA,GAAG;AACrBD,EAAAA,WAAW,KAAKb,MAAM,CAACe,UAAU,EAAE;EAEnCC,oBAAoB,CAACJ,KAAK,CAAC;EAC3BA,KAAK,GAAGK,qBAAqB,CAAC,MAAM;AAClCC,IAAAA,eAAe,EAAE;AACjBlB,IAAAA,MAAM,CAACmB,QAAQ,CAACN,WAAW,CAAC;AAC5BA,IAAAA,WAAW,GAAGO,SAAS;AACzB,EAAA,CAAC,CAAC;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA,SAASF,eAAeA,GAAG;AACzB,EAAA,MAAMG,KAAK,GAAGf,UAAU,EAAE;AAE1B,EAAA,KAAK,MAAMgB,IAAI,IAAIjB,qBAAqB,EAAE;IACxCkB,QAAQ,CAACC,IAAI,CAACC,SAAS,CAACC,MAAM,CAACJ,IAAI,CAAC;AACtC,EAAA;AAEA,EAAA,KAAK,MAAMA,IAAI,IAAID,KAAK,EAAE;IACxBE,QAAQ,CAACC,IAAI,CAACC,SAAS,CAACd,GAAG,CAACW,IAAI,CAAC;AACnC,EAAA;AAEAjB,EAAAA,qBAAqB,GAAGgB,KAAK;AAC/B;AAmBe,MAAMM,SAAS,SAASC,MAAM,CAAY;EACvDC,OAAO,GAAG3B,EAAE,EAAE;AAEd4B,EAAAA,OAAOA,CAAC,CAACC,OAAO,CAAW,EAAa;IACtC,MAAMzB,UAAU,GAAGyB,OAAO,GAAGA,OAAO,CAACC,KAAK,CAAC,KAAK,CAAC,GAAG,EAAE;IAEtD7B,aAAa,CAAC8B,GAAG,CAAC,IAAI,CAACJ,OAAO,EAAEvB,UAAU,CAAC;AAE3CQ,IAAAA,WAAW,EAAE;AACf,EAAA;AAEAoB,EAAAA,WAAWA,GAAG;AACZ/B,IAAAA,aAAa,CAACgC,MAAM,CAAC,IAAI,CAACN,OAAO,CAAC;AAClCf,IAAAA,WAAW,EAAE;AACf,EAAA;AACF;AAEO,MAAMsB,SAAS,GAAGT;;;;"}
1
+ {"version":3,"file":"body-class.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,3 +1,4 @@
1
+
1
2
  import Helper from '@ember/component/helper';
2
3
  import { assert } from '@ember/debug';
3
4
  import { service } from '@ember/service';
@@ -1 +1 @@
1
- {"version":3,"file":"link.js","sources":["../../src/helpers/link.ts"],"sourcesContent":["import Helper from '@ember/component/helper';\nimport { assert } from '@ember/debug';\nimport { service } from '@ember/service';\n\nimport { handle } from '../proper-links.ts';\n\nimport type RouterService from '@ember/routing/router-service';\n\nexport interface Signature {\n Args: {\n Positional: [href: string];\n Named: {\n includeActiveQueryParams?: boolean | string[];\n activeOnSubPaths?: boolean;\n };\n };\n Return: {\n isExternal: boolean;\n isActive: boolean;\n handleClick: (event: MouseEvent) => void;\n };\n}\n\nexport default class Link extends Helper<Signature> {\n @service declare router: RouterService;\n\n compute(\n [href]: [href: string],\n {\n includeActiveQueryParams = false,\n activeOnSubPaths = false,\n }: { includeActiveQueryParams?: boolean | string[]; activeOnSubPaths?: boolean }\n ) {\n assert('href was not passed in', href);\n\n const router = this.router;\n const handleClick = (event: MouseEvent) => {\n assert('[BUG]', event.target instanceof HTMLAnchorElement);\n\n handle(router, event.target, [], event);\n };\n\n return {\n isExternal: isExternal(href),\n get isActive() {\n return isActive(router, href, includeActiveQueryParams, activeOnSubPaths);\n },\n handleClick,\n };\n }\n}\n\nexport const link = Link;\n\nexport function isExternal(href: string) {\n if (!href) return false;\n if (href.startsWith('#')) return false;\n if (href.startsWith('/')) return false;\n\n return location.origin !== new URL(href).origin;\n}\n\nexport function isActive(\n router: RouterService,\n href: string,\n includeQueryParams?: boolean | string[],\n activeOnSubPaths?: boolean\n) {\n if (!includeQueryParams) {\n /**\n * is Active doesn't understand `href`, so we have to convert to RouteInfo-esque\n */\n const info = router.recognize(href);\n\n if (info) {\n const dynamicSegments = getParams(info);\n const routeName = activeOnSubPaths ? info.name.replace(/\\.index$/, '') : info.name;\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n return router.isActive(routeName, ...dynamicSegments);\n }\n\n return false;\n }\n\n const url = new URL(href, location.origin);\n const hrefQueryParams = new URLSearchParams(url.searchParams);\n const hrefPath = url.pathname;\n\n const currentPath = router.currentURL?.split('?')[0];\n\n if (!currentPath) return false;\n\n if (activeOnSubPaths ? !currentPath.startsWith(hrefPath) : hrefPath !== currentPath) return false;\n\n const currentQueryParams = router.currentRoute?.queryParams;\n\n if (!currentQueryParams) return false;\n\n if (includeQueryParams === true) {\n return Object.entries(currentQueryParams).every(([key, value]) => {\n return hrefQueryParams.get(key) === value;\n });\n }\n\n return includeQueryParams.every((key) => {\n return hrefQueryParams.get(key) === currentQueryParams[key];\n });\n}\n\ntype RouteInfo = ReturnType<RouterService['recognize']>;\n\nexport function getParams(currentRouteInfo: RouteInfo) {\n let params: Record<string, unknown>[] = [];\n\n while (currentRouteInfo?.parent) {\n const currentParams = currentRouteInfo.params;\n\n params = currentParams ? [currentParams, ...params] : params;\n currentRouteInfo = currentRouteInfo.parent;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return params.map(Object.values).flat();\n}\n"],"names":["Link","Helper","g","prototype","service","i","void 0","compute","href","includeActiveQueryParams","activeOnSubPaths","assert","router","handleClick","event","target","HTMLAnchorElement","handle","isExternal","isActive","link","startsWith","location","origin","URL","includeQueryParams","info","recognize","dynamicSegments","getParams","routeName","name","replace","url","hrefQueryParams","URLSearchParams","searchParams","hrefPath","pathname","currentPath","currentURL","split","currentQueryParams","currentRoute","queryParams","Object","entries","every","key","value","get","currentRouteInfo","params","parent","currentParams","map","values","flat"],"mappings":";;;;;;AAuBe,MAAMA,IAAI,SAASC,MAAM,CAAY;AAAA,EAAA;IAAAC,CAAA,CAAA,IAAA,CAAAC,SAAA,EAAA,QAAA,EAAA,CACjDC,OAAO,CAAA,CAAA;AAAA;AAAA,EAAA,OAAA,IAAAC,CAAA,CAAA,IAAA,EAAA,QAAA,CAAA,EAAAC,MAAA;AAERC,EAAAA,OAAOA,CACL,CAACC,IAAI,CAAiB,EACtB;AACEC,IAAAA,wBAAwB,GAAG,KAAK;AAChCC,IAAAA,gBAAgB,GAAG;AAC0D,GAAC,EAChF;AACAC,IAAAA,M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AACJ;AAIO,SAASnB,SAASA,CAACsB,gBAA2B,EAAE;EACrD,IAAIC,MAAiC,GAAG,EAAE;EAE1C,OAAOD,gBAAgB,EAAEE,MAAM,EAAE;AAC/B,IAAA,MAAMC,aAAa,GAAGH,gBAAgB,CAACC,MAAM;IAE7CA,MAAM,GAAGE,aAAa,GAAG,CAACA,aAAa,EAAE,GAAGF,MAAM,CAAC,GAAGA,MAAM;IAC5DD,gBAAgB,GAAGA,gBAAgB,CAACE,MAAM;AAC5C,EAAA;;AAEA;EACA,OAAOD,MAAM,CAACG,GAAG,CAACV,MAAM,CAACW,MAAM,CAAC,CAACC,IAAI,EAAE;AACzC;;;;"}
1
+ {"version":3,"file":"link.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,3 +1,4 @@
1
+
1
2
  import Helper from '@ember/component/helper';
2
3
  import { assert } from '@ember/debug';
3
4
  import { getOwner } from '@ember/owner';
@@ -1 +1 @@
1
- {"version":3,"file":"service.js","sources":["../../src/helpers/service.ts"],"sourcesContent":["import Helper from '@ember/component/helper';\nimport { assert } from '@ember/debug';\nimport { getOwner } from '@ember/owner';\n\nimport type { Registry } from '@ember/service';\nimport type Service from '@ember/service';\n\nexport interface Signature<Key extends keyof Registry> {\n Args: {\n Positional: [Key];\n };\n Return: Registry[Key] & Service;\n}\n\nexport default class GetService<Key extends keyof Registry> extends Helper<Signature<Key>> {\n compute(positional: [Key]): Registry[Key] & Service {\n const owner = getOwner(this);\n\n assert(`Could not get owner.`, owner);\n\n return owner.lookup(`service:${positional[0]}`) as Registry[Key] & Service;\n }\n}\n\nexport const service = GetService;\n"],"names":["GetService","Helper","compute","positional","owner","getOwner","assert","lookup","service"],"mappings":";;;;AAce,MAAMA,UAAU,SAAqCC,MAAM,CAAiB;EACzFC,OAAOA,CAACC,UAAiB,EAA2B;AAClD,IAAA,MAAMC,KAAK,GAAGC,QAAQ,CAAC,IAAI,CAAC;AAE5BC,IAAAA,MAAM,CAAC,CAAA,oBAAA,CAAsB,EAAEF,KAAK,CAAC;IAErC,OAAOA,KAAK,CAACG,MAAM,CAAC,CAAA,QAAA,EAAWJ,UAAU,CAAC,CAAC,CAAC,CAAA,CAAE,CAAC;AACjD,EAAA;AACF;AAEO,MAAMK,OAAO,GAAGR;;;;"}
1
+ {"version":3,"file":"service.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
package/dist/helpers.js CHANGED
@@ -1,3 +1,4 @@
1
+
1
2
  export { link } from './helpers/link.js';
2
3
  export { service } from './helpers/service.js';
3
4
  //# sourceMappingURL=helpers.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
1
+ {"version":3,"file":"helpers.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
package/dist/iframe.js CHANGED
@@ -1,3 +1,4 @@
1
+
1
2
  /**
2
3
  * Returns true if the current frame is within an iframe.
3
4
  *
@@ -1 +1 @@
1
- {"version":3,"file":"iframe.js","sources":["../src/iframe.ts"],"sourcesContent":["/**\n * Returns true if the current frame is within an iframe.\n *\n * ```gjs\n * import { inIframe } from 'ember-primitives/iframe';\n *\n * <template>\n * {{#if (inFrame)}}\n * only show content in an iframe\n * {{/if}}\n * </template>\n * ```\n */\nexport const inIframe = () => window.self !== window.top;\n\n/**\n * Returns true if the current frame is not within an iframe.\n *\n * ```gjs\n * import { notInIframe } from 'ember-primitives/iframe';\n *\n * <template>\n * {{#if (notInIframe)}}\n * only show content when not in an iframe\n * This is also the default if your site/app\n * does not use iframes\n * {{/if}}\n * </template>\n * ```\n */\nexport const notInIframe = () => !inIframe();\n"],"names":["inIframe","window","self","top","notInIframe"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMA,QAAQ,GAAGA,MAAMC,MAAM,CAACC,IAAI,KAAKD,MAAM,CAACE;;AAErD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,WAAW,GAAGA,MAAM,CAACJ,QAAQ;;;;"}
1
+ {"version":3,"file":"iframe.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
package/dist/index.js CHANGED
@@ -1,3 +1,4 @@
1
+
1
2
  import { macroCondition, isDevelopingApp, importSync } from '@embroider/macros';
2
3
  export { Accordion } from './components/accordion.js';
3
4
  export { Avatar } from './components/avatar.js';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["/**\n * DANGER: this is a *barrel file*\n *\n * It forces the whole library to be loaded and all dependencies.\n *\n * If you have a small app, you probably don't want to import from here -- instead import from each sub-path.\n */\nimport { importSync, isDevelopingApp, macroCondition } from '@embroider/macros';\n\nif (macroCondition(isDevelopingApp())) {\n importSync('./components/violations.css');\n}\n\nexport { Accordion } from './components/accordion.gts';\nexport type {\n AccordionContentExternalSignature,\n AccordionHeaderExternalSignature,\n AccordionItemExternalSignature,\n AccordionTriggerExternalSignature,\n} from './components/accordion/public.ts';\nexport { Avatar } from './components/avatar.gts';\nexport { Dialog, Dialog as Modal } from './components/dialog.gts';\nexport { ExternalLink } from './components/external-link.gts';\nexport { Form } from './components/form.gts';\nexport { Key, KeyCombo } from './components/keys.gts';\nexport { StickyFooter } from './components/layout/sticky-footer.gts';\nexport { Link } from './components/link.gts';\nexport { Menu } from './components/menu.gts';\nexport { OTP, OTPInput } from './components/one-time-password/index.gts';\nexport { Popover } from './components/popover.gts';\nexport { Portal } from './components/portal.gts';\nexport { PortalTargets } from './components/portal-targets.gts';\nexport { TARGETS as PORTALS } from './components/portal-targets.gts';\nexport { Progress } from './components/progress.gts';\nexport { Rating } from './components/rating.gts';\nexport { Scroller } from './components/scroller.gts';\nexport { Shadowed } from './components/shadowed.gts';\nexport { Switch } from './components/switch.gts';\nexport { Toggle } from './components/toggle.gts';\nexport { ToggleGroup } from './components/toggle-group.gts';\nexport { VisuallyHidden } from './components/visually-hidden.gts';\nexport { Zoetrope } from './components/zoetrope.ts';\nexport * from './helpers.ts';\n"],"names":["macroCondition","isDevelopingApp","importSync"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA,IAAIA,cAAc,CAACC,eAAe,EAAE,CAAC,EAAE;EACrCC,UAAU,CAAC,6BAA6B,CAAC;AAC3C"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,3 +1,4 @@
1
+
1
2
  import Component from '@glimmer/component';
2
3
  import { hash } from '@ember/helper';
3
4
  import { on } from '@ember/modifier';
@@ -64,4 +65,4 @@ class AccordionItem extends Component {
64
65
  }
65
66
 
66
67
  export { AccordionItem as A, AccordionContent as a, AccordionTrigger as b, AccordionHeader as c, getDataState as g };
67
- //# sourceMappingURL=item-D6pwWzMs.js.map
68
+ //# sourceMappingURL=item-CwIzoqlC.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"item-CwIzoqlC.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
package/dist/load.js CHANGED
@@ -1,3 +1,4 @@
1
+
1
2
  import { setComponentTemplate } from '@ember/component';
2
3
  import templateOnly from '@ember/component/template-only';
3
4
  import { precompileTemplate } from '@ember/template-compilation';
package/dist/load.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"load.js","sources":["../src/load.gts"],"sourcesContent":["import { setComponentTemplate } from \"@ember/component\";\nimport templateOnly from \"@ember/component/template-only\";\n// Have to use these until min ember version is like 6.3 or something\nimport { precompileTemplate } from \"@ember/template-compilation\";\n\nimport { getPromiseState } from \"reactiveweb/get-promise-state\";\n\nimport type { ComponentLike } from \"@glint/template\";\n\ninterface LoadSignature<\n Expected = {\n Args: any;\n },\n> {\n Blocks: {\n loading: [];\n error: [\n {\n original: unknown;\n reason: string;\n },\n ];\n success?: [component: ComponentLike<Expected>];\n };\n}\n\n/**\n * Loads a value / promise / function providing state for the lifetime of that value / promise / function.\n *\n * Can be used for manual bundle splitting via await importing components.\n *\n * @example\n * ```gjs\n * import { load } from 'ember-primitives/load';\n *\n * const Loader = load(() => import('./routes/sub-route.gts'));\n *\n * <template>\n * <Loader>\n * <:loading> ... loading ... </:loading>\n * <:error as |error|> ... error! {{error.reason}} </:error>\n * <:success as |component|> <component /> </:success>\n * </Loader>\n * </template>\n * ```\n */\nexport function load<ExpectedSignature, Value>(\n fn: Value | Promise<Value> | (() => Promise<Value>) | (() => Value),\n): ComponentLike<LoadSignature<ExpectedSignature>> {\n return setComponentTemplate(\n precompileTemplate(\n `{{#let (getPromiseState fn) as |state|}}\n {{#if state.isLoading}}\n {{yield to=\"loading\"}}\n {{else if state.error}}\n {{yield state.error to=\"error\"}}\n {{else if state.resolved}}\n {{#if (has-block \"success\")}}\n {{yield state.resolved to=\"success\"}}\n {{else}}\n <state.component />\n {{/if}}\n {{/if}}\n{{/let}}`,\n {\n strictMode: true,\n /**\n * The old setComponentTemplate + precompileTemplate combo\n * does not allow defining things in this scope object,\n * we _have_ to use the shorthand.\n */\n scope: () => ({ fn, getPromiseState }),\n },\n ),\n templateOnly(),\n ) as ComponentLike<LoadSignature<ExpectedSignature>>;\n}\n"],"names":["load","fn","setComponentTemplate","precompileTemplate","strictMode","scope","getPromiseState","templateOnly"],"mappings":";;;;;AA0BA;;;;;;;;;;;;;;;;;;;AAmBC;AACM,SAASA,IAAAA,CACdC,EAAmE,EACtC;EAC7B,OAAOC,oBAAA,CACLC,wXAcE;AACEC,IAAAA,UAAA,EAAY,IAAA;AACZ;;;;;AAKAC,IAAAA,KAAA,EAAAA,OAAA;MAAAJ,EAAA;AAAAK,MAAAA;AAAA,KAAA;AACF,GAAA,CAAA,EAEFC,YAAA,EAAA,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"load.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
package/dist/narrowing.js CHANGED
@@ -1,3 +1,4 @@
1
+
1
2
  function isString(x) {
2
3
  return typeof x === 'string';
3
4
  }
@@ -1 +1 @@
1
- {"version":3,"file":"narrowing.js","sources":["../src/narrowing.ts"],"sourcesContent":["export function isString(x: unknown): x is string {\n return typeof x === 'string';\n}\n\nexport function isElement(x: unknown): x is Element {\n return x instanceof Element;\n}\n"],"names":["isString","x","isElement","Element"],"mappings":"AAAO,SAASA,QAAQA,CAACC,CAAU,EAAe;EAChD,OAAO,OAAOA,CAAC,KAAK,QAAQ;AAC9B;AAEO,SAASC,SAASA,CAACD,CAAU,EAAgB;EAClD,OAAOA,CAAC,YAAYE,OAAO;AAC7B;;;;"}
1
+ {"version":3,"file":"narrowing.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
package/dist/on-resize.js CHANGED
@@ -1,3 +1,4 @@
1
+
1
2
  import { assert } from '@ember/debug';
2
3
  import { registerDestructor } from '@ember/destroyable';
3
4
  import Modifier from 'ember-modifier';
@@ -1 +1 @@
1
- {"version":3,"file":"on-resize.js","sources":["../src/on-resize.ts"],"sourcesContent":["import { assert } from '@ember/debug';\nimport { registerDestructor } from '@ember/destroyable';\n\nimport Modifier, { type ArgsFor } from 'ember-modifier';\n\nimport type Owner from '@ember/owner';\n\nexport interface Signature {\n /**\n * Any element that is resizable can have onResize attached\n */\n Element: Element;\n Args: {\n Positional: [\n /**\n * The ResizeObserver callback will only receive\n * one entry per resize event.\n *\n * See: [ResizeObserverEntry](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserverEntry)\n */\n callback: (entry: ResizeObserverEntry) => void,\n ];\n };\n}\n\nclass OnResize extends Modifier<Signature> {\n #callback: ((entry: ResizeObserverEntry) => void) | null = null;\n #element: Element | null = null;\n\n #resizeObserver: ResizeObserverManager = new ResizeObserverManager();\n\n constructor(owner: Owner, args: ArgsFor<Signature>) {\n super(owner, args);\n\n registerDestructor(this, () => {\n if (this.#element && this.#callback) {\n this.#resizeObserver.unobserve(this.#element, this.#callback);\n }\n });\n }\n\n modify(element: Element, [callback]: [callback: (entry: ResizeObserverEntry) => void]) {\n assert(\n `{{onResize}}: callback must be a function, but was ${callback as unknown as string}`,\n typeof callback === 'function'\n );\n\n if (this.#element && this.#callback) {\n this.#resizeObserver.unobserve(this.#element, this.#callback);\n }\n\n this.#resizeObserver.observe(element, callback);\n\n this.#callback = callback;\n this.#element = element;\n }\n}\n\nexport const onResize = OnResize;\n\nconst errorMessages = [\n 'ResizeObserver loop limit exceeded',\n 'ResizeObserver loop completed with undelivered notifications.',\n];\n\nclass ResizeObserverManager {\n #callbacks = new WeakMap<Element, Set<(entry: ResizeObserverEntry) => unknown>>();\n\n #handleResize = (entries: ResizeObserverEntry[]) => {\n for (const entry of entries) {\n const callbacks = this.#callbacks.get(entry.target);\n\n if (callbacks) {\n for (const callback of callbacks) {\n callback(entry);\n }\n }\n }\n };\n #observer = new ResizeObserver(this.#handleResize);\n\n constructor() {\n ignoreROError();\n\n registerDestructor(this, () => {\n this.#observer?.disconnect();\n });\n }\n\n /**\n * Initiate the observing of the `element` or add an additional `callback`\n * if the `element` is already observed.\n *\n * @param {object} element\n * @param {function} callback The `callback` is called whenever the size of\n * the `element` changes. It is called with `ResizeObserverEntry` object\n * for the particular `element`.\n */\n observe(element: Element, callback: (entry: ResizeObserverEntry) => unknown) {\n const callbacks = this.#callbacks.get(element);\n\n if (callbacks) {\n callbacks.add(callback);\n } else {\n this.#callbacks.set(element, new Set([callback]));\n this.#observer.observe(element);\n }\n }\n\n /**\n * End the observing of the `element` or just remove the provided `callback`.\n *\n * It will unobserve the `element` if the `callback` is not provided\n * or there are no more callbacks left for this `element`.\n *\n * @param {object} element\n * @param {function?} callback - The `callback` to remove from the listeners\n * of the `element` size changes.\n */\n unobserve(element: Element, callback: (entry: ResizeObserverEntry) => unknown) {\n const callbacks = this.#callbacks.get(element);\n\n if (!callbacks) {\n return;\n }\n\n callbacks.delete(callback);\n\n if (!callback || !callbacks.size) {\n this.#callbacks.delete(element);\n this.#observer.unobserve(element);\n }\n }\n}\n\n/**\n * Ignores \"ResizeObserver loop limit exceeded\" error in Ember tests.\n *\n * This \"error\" is safe to ignore as it is just a warning message,\n * telling that the \"looping\" observation will be skipped in the current frame,\n * and will be delivered in the next one.\n *\n * For some reason, it is fired as an `error` event at `window` failing Ember\n * tests and exploding Sentry with errors that must be ignored.\n */\nexport default function ignoreROError() {\n if (typeof window.onerror !== 'function') {\n return;\n }\n\n const onError = window.onerror;\n\n window.onerror = (...args) => {\n const [message] = args;\n\n if (typeof message === 'string') {\n if (errorMessages.includes(message)) return true;\n }\n\n onError(...args);\n };\n}\n"],"names":["OnResize","Modifier","ResizeObserverManager","constructor","owner","args","registerDestructor","unobserve","modify","element","callback","assert","observe","onResize","errorMessages","WeakMap","entries","entry","callbacks","get","target","ResizeObserver","ignoreROError","disconnect","add","set","Set","delete","size","window","onerror","onError","message","includes"],"mappings":";;;;AAyBA,MAAMA,QAAQ,SAASC,QAAQ,CAAY;EACzC,SAAS,GAAkD,IAAI;EAC/D,QAAQ,GAAmB,IAAI;AAE/B,EAAA,eAAe,GAA0B,IAAIC,qBAAqB,EAAE;AAEpEC,EAAAA,WAAWA,CAACC,KAAY,EAAEC,IAAwB,EAAE;AAClD,IAAA,KAAK,CAACD,KAAK,EAAEC,IAAI,CAAC;IAElBC,kBAAkB,CAAC,IAAI,EAAE,MAAM;MAC7B,IAAI,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,SAAS,EAAE;AACnC,QAAA,IAAI,CAAC,eAAe,CAACC,SAAS,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,SAAS,CAAC;AAC/D,MAAA;AACF,IAAA,CAAC,CAAC;AACJ,EAAA;AAEAC,EAAAA,MAAMA,CAACC,OAAgB,EAAE,CAACC,QAAQ,CAAmD,EAAE;IACrFC,MAAM,CACJ,sDAAsDD,QAAQ,CAAA,CAAuB,EACrF,OAAOA,QAAQ,KAAK,UACtB,CAAC;IAED,IAAI,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,SAAS,EAAE;AACnC,MAAA,IAAI,CA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,OAAO,CAAC,GAAG1B,IAAI,CAAC;EAClB,CAAC;AACH;;;;"}
1
+ {"version":3,"file":"on-resize.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,3 +1,4 @@
1
+
1
2
  import { assert } from '@ember/debug';
2
3
  import { registerDestructor } from '@ember/destroyable';
3
4
  import { getOwner } from '@ember/owner';
@@ -1 +1 @@
1
- {"version":3,"file":"proper-links.js","sources":["../src/proper-links.ts"],"sourcesContent":["import { assert } from '@ember/debug';\nimport { registerDestructor } from '@ember/destroyable';\nimport { getOwner } from '@ember/owner';\n\nimport { getAnchor, shouldHandle } from 'should-handle-link';\n\nimport type { Newable } from './type-utils.ts';\nimport type EmberRouter from '@ember/routing/router';\nimport type RouterService from '@ember/routing/router-service';\n\nexport { shouldHandle } from 'should-handle-link';\n\nexport interface Options {\n ignore?: string[];\n}\n\nexport function properLinks(\n options: Options\n): <Instance extends object, Klass = { new (...args: any[]): Instance }>(klass: Klass) => Klass;\n\nexport function properLinks<Instance extends object, Klass = { new (...args: any[]): Instance }>(\n klass: Klass\n): Klass;\n/**\n * @internal\n */\nexport function properLinks<Instance extends object, Klass = { new (...args: any[]): Instance }>(\n options: Options,\n klass: Klass\n): Klass;\n\nexport function properLinks<Instance extends object, Klass = { new (...args: any[]): Instance }>(\n ...args: [Options] | [Klass] | [Options, Klass]\n): Klass | ((klass: Klass) => Klass) {\n let options: Options = {};\n\n let klass: undefined | Klass = undefined;\n\n if (args.length === 2) {\n options = args[0];\n klass = args[1];\n } else if (args.length === 1) {\n if (typeof args[0] === 'object') {\n // TODO: how to get first arg type correct?\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n return (klass: Klass) => properLinks(args[0] as any, klass);\n } else {\n klass = args[0];\n }\n }\n\n const ignore = options.ignore || [];\n\n assert(`klass was not defined. possibile incorrect arity given to properLinks`, klass);\n\n return class RouterWithProperLinks extends (klass as unknown as Newable<EmberRouter>) {\n // SAFETY: we literally do not care about the args' type here,\n // because we just call super\n constructor(...args: any[]) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n super(...args);\n\n setup(this, ignore);\n }\n } as unknown as Klass;\n}\n\n/**\n * Setup proper links without a decorator.\n * This function only requires that a framework object with an owner is passed.\n */\nexport function setup(parent: object, ignore?: string[]) {\n const handler = (event: MouseEvent) => {\n /**\n * event.target may not be an anchor,\n * it may be a span, svg, img, or any number of elements nested in <a>...</a>\n */\n const interactive = getAnchor(event);\n\n if (!interactive) return;\n\n const owner = getOwner(parent);\n\n assert('owner is not present', owner);\n\n const routerService = owner.lookup('service:router');\n\n handle(routerService, interactive, ignore ?? [], event);\n };\n\n document.body.addEventListener('click', handler, false);\n\n registerDestructor(parent, () => document.body.removeEventListener('click', handler));\n}\n\nexport function handle(\n router: RouterService,\n element: HTMLAnchorElement,\n ignore: string[],\n event: MouseEvent\n) {\n if (!shouldHandle(location.href, element, event, ignore)) {\n return;\n }\n\n const url = new URL(element.href);\n\n const fullHref = `${url.pathname}${url.search}${url.hash}`;\n\n const rootURL = router.rootURL;\n\n let withoutRootURL = fullHref.slice(rootURL.length);\n\n // re-add the \"root\" sigil\n // we removed it when we chopped off the rootURL,\n // because the rootURL often has this attached to it as well\n if (!withoutRootURL.startsWith('/')) {\n withoutRootURL = `/${withoutRootURL}`;\n }\n\n try {\n const routeInfo = router.recognize(fullHref);\n\n if (routeInfo) {\n event.preventDefault();\n event.stopImmediatePropagation();\n event.stopPropagation();\n\n router.transitionTo(withoutRootURL);\n\n return false;\n }\n } catch (e) {\n if (e instanceof Error && e.name === 'UnrecognizedURLError') {\n return;\n }\n\n throw e;\n }\n}\n"],"names":["properLinks","args","options","klass","undefined","length","ignore","assert","RouterWithProperLinks","constructor","setup","parent","handler","event","interactive","getAnchor","owner","getOwner","routerService","lookup","handle","document","body","addEventListener","registerDestructor","removeEventListener","router","element","shouldHandle","location","href","url","URL","fullHref","pathname","search","hash","rootURL","withoutRootURL","slice","startsWith","routeInfo","recognize","preventDefault","stopImmediatePropagation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AAS,GAAGf,MAAM,CAACgB,SAAS,CAACT,QAAQ,CAAC;AAE5C,IAAA,IAAIQ,SAAS,EAAE;MACb5B,KAAK,CAAC8B,cAAc,EAAE;MACtB9B,KAAK,CAAC+B,wBAAwB,EAAE;MAChC/B,KAAK,CAACgC,eAAe,EAAE;AAEvBnB,MAAAA,MAAM,CAACoB,YAAY,CAACR,cAAc,CAAC;AAEnC,MAAA,OAAO,KAAK;AACd,IAAA;EACF,CAAC,CAAC,OAAOS,CAAC,EAAE;IACV,IAAIA,CAAC,YAAYC,KAAK,IAAID,CAAC,CAACE,IAAI,KAAK,sBAAsB,EAAE;AAC3D,MAAA;AACF,IAAA;AAEA,IAAA,MAAMF,CAAC;AACT,EAAA;AACF;;;;"}
1
+ {"version":3,"file":"proper-links.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
package/dist/qp.js CHANGED
@@ -1,3 +1,4 @@
1
+
1
2
  import Helper from '@ember/component/helper';
2
3
  import { assert } from '@ember/debug';
3
4
  import { service } from '@ember/service';
package/dist/qp.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"qp.js","sources":["../src/qp.ts"],"sourcesContent":["import Helper from '@ember/component/helper';\nimport { assert } from '@ember/debug';\nimport { service } from '@ember/service';\n\nimport type RouterService from '@ember/routing/router-service';\n\ninterface Signature {\n Args: {\n Positional: [string];\n };\n Return: string | undefined;\n}\n\n/**\n * Grabs a query-param off the current route from the router service.\n *\n * ```gjs\n * import { qp } from 'ember-primitives/qp';\n *\n * <template>\n * {{qp \"query-param\"}}\n * </template>\n * ```\n */\nexport class qp extends Helper<Signature> {\n @service declare router: RouterService;\n\n compute([name]: [string]): string | undefined {\n assert('A queryParam name is required', name);\n\n return this.router.currentRoute?.queryParams?.[name] as string | undefined;\n }\n}\n\n/**\n * Returns a string for use as an `href` on `<a>` tags, updated with the passed query param\n *\n * ```gjs\n * import { withQP } from 'ember-primitives/qp';\n *\n * <template>\n * <a href={{withQP \"foo\" \"2\"}}>\n * ...\n * </a>\n * </template>\n * ```\n */\nexport class withQP extends Helper<{ Args: { Positional: [string, string] }; Return: string }> {\n @service declare router: RouterService;\n\n compute([qpName, nextValue]: [string, string]) {\n const existing = this.router.currentURL;\n\n assert('A queryParam name is required', qpName);\n assert('There is no currentURL', existing);\n\n const url = new URL(existing, location.origin);\n\n url.searchParams.set(qpName, nextValue);\n\n return url.href;\n }\n}\n\n/**\n * Cast a query-param string value to a boolean\n *\n * ```gjs\n * import { castToBoolean, qp } from 'ember-primitives/qp';\n *\n * <template>\n * {{#if (castToBoolean (qp 'the-qp'))}}\n * ...\n * {{/if}}\n * </template>\n * ```\n *\n * The following values are considered \"false\"\n * - undefined\n * - \"\"\n * - \"0\"\n * - false\n * - \"f\"\n * - \"off\"\n * - \"no\"\n * - \"null\"\n * - \"undefined\"\n *\n * All other values are considered truthy\n */\nexport function castToBoolean(x: string | undefined) {\n if (!x) return false;\n\n const isFalsey =\n x === '0' ||\n x === 'false' ||\n x === 'f' ||\n x === 'null' ||\n x === 'off' ||\n x === 'undefined' ||\n x === 'no';\n\n if (isFalsey) return false;\n\n // All other values are considered truthy\n return true;\n}\n"],"names":["qp","Helper","g","prototype","service","i","void 0","compute","name","assert","router","currentRoute","queryParams","withQP","qpName","nextValue","existing","currentURL","url","URL","location","origin","searchParams","set","href","castToBoolean","x","isFalsey"],"mappings":";;;;;AAaA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMA,EAAE,SAASC,MAAM,CAAY;AAAA,EAAA;IAAAC,CAAA,CAAA,IAAA,CAAAC,SAAA,EAAA,QAAA,EAAA,CACvCC,OAAO,CAAA,CAAA;AAAA;AAAA,EAAA,OAAA,IAAAC,CAAA,CAAA,IAAA,EAAA,QAAA,CAAA,EAAAC,MAAA;AAERC,EAAAA,OAAOA,CAAC,CAACC,IAAI,CAAW,EAAsB;AAC5CC,IAAAA,MAAM,CAAC,+BAA+B,EAAED,IAAI,CAAC;IAE7C,OAAO,IAAI,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AE,OAAO,KAAK;;AAE1B;AACA,EAAA,OAAO,IAAI;AACb;;;;"}
1
+ {"version":3,"file":"qp.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
package/dist/store.js CHANGED
@@ -1,3 +1,4 @@
1
+
1
2
  import { link } from 'reactiveweb/link';
2
3
  import { isNewable } from './utils.js';
3
4
 
package/dist/store.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"store.js","sources":["../src/store.ts"],"sourcesContent":["import { link } from 'reactiveweb/link';\n\nimport { isNewable } from './utils.ts';\n\nimport type { Newable } from './type-utils.ts';\n\n/**\n * context => { class => instance }\n */\nconst contextCache = new WeakMap<object, Map<object, object>>();\n\n/**\n * Creates a singleton for the given context and links the lifetime of the created class to the passed context\n *\n * Note that this function is _not_ lazy. Calling `createStore` will create an instance of the passed class.\n * When combined with a getter though, creation becomes lazy.\n *\n * In this example, `MyState` is created once per instance of the component.\n * repeat accesses to `this.foo` return a stable reference _as if_ `@cached` were used.\n * ```js\n * class MyState {}\n *\n * class Demo extends Component {\n * // this is a stable reference\n * get foo() {\n * return createStore(this, MyState);\n * }\n *\n * // or\n * bar = createStore(this, MyState);\n *\n * // or\n * three = createStore(this, () => new MyState(1, 2));\n * }\n * ```\n *\n * If arguments need to be configured during construction, the second argument may also be a function\n * ```js\n * class MyState {}\n *\n * class Demo extends Component {\n * // this is a stable reference\n * get foo() {\n * return createStore(this, MyState);\n * }\n * }\n * ```\n */\nexport function createStore<Instance extends object>(\n context: object,\n theClass: Newable<Instance> | (() => Instance)\n): Instance {\n let cache = contextCache.get(context);\n\n if (!cache) {\n cache = new Map();\n contextCache.set(context, cache);\n }\n\n let existing = cache.get(theClass);\n\n if (!existing) {\n const instance = isNewable(theClass) ? new theClass() : theClass();\n\n link(instance, context);\n\n cache.set(theClass, instance);\n existing = instance;\n }\n\n return existing as Instance;\n}\n"],"names":["contextCache","WeakMap","createStore","context","theClass","cache","get","Map","set","existing","instance","isNewable","link"],"mappings":";;;AAMA;AACA;AACA;AACA,MAAMA,YAAY,GAAG,IAAIC,OAAO,EAA+B;;AAE/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,WAAWA,CACzBC,OAAe,EACfC,QAA8C,EACpC;AACV,EAAA,IAAIC,KAAK,GAAGL,YAAY,CAACM,GAAG,CAACH,OAAO,CAAC;EAErC,IAAI,CAACE,KAAK,EAAE;AACVA,IAAAA,KAAK,GAAG,IAAIE,GAAG,EAAE;AACjBP,IAAAA,YAAY,CAACQ,GAAG,CAACL,OAAO,EAAEE,KAAK,CAAC;AAClC,EAAA;AAEA,EAAA,IAAII,QAAQ,GAAGJ,KAAK,CAACC,GAAG,CAACF,QAAQ,CAAC;EAElC,IAAI,CAACK,QAAQ,EAAE;AACb,IAAA,MAAMC,QAAQ,GAAGC,SAAS,CAACP,QAAQ,CAAC,GAAG,IAAIA,QAAQ,EAAE,GAAGA,QAAQ,EAAE;AAElEQ,IAAAA,IAAI,CAACF,QAAQ,EAAEP,OAAO,CAAC;AAEvBE,IAAAA,KAAK,CAACG,GAAG,CAACJ,QAAQ,EAAEM,QAAQ,CAAC;AAC7BD,IAAAA,QAAQ,GAAGC,QAAQ;AACrB,EAAA;AAEA,EAAA,OAAOD,QAAQ;AACjB;;;;"}
1
+ {"version":3,"file":"store.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,2 +1,3 @@
1
- import './components/visually-hidden.css';
1
+
2
+ import './visually-hidden-CGP1FSjt.js';
2
3
  //# sourceMappingURL=styles.css.js.map
package/dist/tabster.js CHANGED
@@ -1,3 +1,4 @@
1
+
1
2
  import { registerDestructor } from '@ember/destroyable';
2
3
 
3
4
  async function setupTabster(
@@ -1 +1 @@
1
- {"version":3,"file":"tabster.js","sources":["../src/tabster.ts"],"sourcesContent":["import { registerDestructor } from '@ember/destroyable';\n\nexport async function setupTabster(\n /**\n * A destroyable object.\n * This is needed so that when the app (or tests) or unmounted or ending,\n * the tabster instance can be disposed of.\n */\n context: object,\n {\n tabster,\n setTabsterRoot,\n }: {\n /**\n * Let this setup function initalize tabster.\n * https://tabster.io/docs/core\n *\n * This should be done only once per application as we don't want\n * focus managers fighting with each other.\n *\n * Defaults to `true`,\n *\n * Will fallback to an existing tabster instance automatically if `getTabster` returns a value.\n *\n * If `false` is explicitly passed here, you'll also be in charge of teardown.\n */\n tabster?: boolean;\n setTabsterRoot?: boolean;\n } = {}\n) {\n const { createTabster, getDeloser, getMover, getTabster, disposeTabster } = await import(\n 'tabster'\n );\n\n tabster ??= true;\n setTabsterRoot ??= true;\n\n if (!tabster) {\n return;\n }\n\n const existing = getTabster(window);\n const primitivesTabster = existing ?? createTabster(window);\n\n getMover(primitivesTabster);\n getDeloser(primitivesTabster);\n\n if (setTabsterRoot) {\n document.body.setAttribute('data-tabster', '{ \"root\": {} }');\n }\n\n registerDestructor(context, () => {\n disposeTabster(primitivesTabster);\n });\n}\n"],"names":["setupTabster","context","tabster","setTabsterRoot","createTabster","getDeloser","getMover","getTabster","disposeTabster","existing","window","primitivesTabster","document","body","setAttribute","registerDestructor"],"mappings":";;AAEO,eAAeA,YAAYA;AAChC;AACF;AACA;AACA;AACA;AACEC,OAAe,EACf;EACEC,OAAO;AACPC,EAAAA;AAiBF,CAAC,GAAG,EAAE,EACN;EACA,MAAM;IAAEC,aAAa;IAAEC,UAAU;IAAEC,QAAQ;IAAEC,UAAU;AAAEC,IAAAA;AAAe,GAAC,GAAG,MAAM,OAChF,SACF,CAAC;AAEDN,EAAAA,OAAO,KAAK,IAAI;AAChBC,EAAAA,cAAc,KAAK,IAAI;EAEvB,IAAI,CAACD,OAAO,EAAE;AACZ,IAAA;AACF,EAAA;AAEA,EAAA,MAAMO,QAAQ,GAAGF,UAAU,CAACG,MAAM,CAAC;AACnC,EAAA,MAAMC,iBAAiB,GAAGF,QAAQ,IAAIL,aAAa,CAACM,MAAM,CAAC;EAE3DJ,QAAQ,CAACK,iBAAiB,CAAC;EAC3BN,UAAU,CAACM,iBAAiB,CAAC;AAE7B,EAAA,IAAIR,cAAc,EAAE;IAClBS,QAAQ,CAACC,IAAI,CAACC,YAAY,CAAC,cAAc,EAAE,gBAAgB,CAAC;AAC9D,EAAA;EAEAC,kBAAkB,CAACd,OAAO,EAAE,MAAM;IAChCO,cAAc,CAACG,iBAAiB,CAAC;AACnC,EAAA,CAAC,CAAC;AACJ;;;;"}
1
+ {"version":3,"file":"tabster.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,3 +1,4 @@
1
+
1
2
  import { assert } from '@ember/debug';
2
3
  import { setupTabster as setupTabster$1 } from '../tabster.js';
3
4
 
@@ -1 +1 @@
1
- {"version":3,"file":"a11y.js","sources":["../../src/test-support/a11y.ts"],"sourcesContent":["import { assert } from '@ember/debug';\n\nimport { setupTabster as _setupTabster } from '../tabster.ts';\n\nimport type Owner from '@ember/owner';\n\n/**\n * Sets up all support utilities for primitive components.\n * Including the tabster root.\n */\nasync function setup(owner: Owner) {\n await _setupTabster(owner, { setTabsterRoot: false });\n\n document.querySelector('#ember-testing')?.setAttribute('data-tabster', '{ \"root\": {} }');\n}\n\nexport function setupTabster(hooks: {\n beforeEach: (callback: () => void | Promise<void>) => unknown;\n}) {\n hooks.beforeEach(async function (this: { owner: object }) {\n const owner = this.owner;\n\n assert(\n `Test does not have an owner, be sure to use setupRenderingTest, setupTest, or setupApplicationTest (from ember-qunit (or similar))`,\n owner\n );\n\n await setup(this.owner as Owner);\n });\n}\n"],"names":["setup","owner","_setupTabster","setTabsterRoot","document","querySelector","setAttribute","setupTabster","hooks","beforeEach","assert"],"mappings":";;;AAMA;AACA;AACA;AACA;AACA,eAAeA,KAAKA,CAACC,KAAY,EAAE;EACjC,MAAMC,cAAa,CAACD,KAAK,EAAE;AAAEE,IAAAA,cAAc,EAAE;AAAM,GAAC,CAAC;EAErDC,QAAQ,CAACC,aAAa,CAAC,gBAAgB,CAAC,EAAEC,YAAY,CAAC,cAAc,EAAE,gBAAgB,CAAC;AAC1F;AAEO,SAASC,YAAYA,CAACC,KAE5B,EAAE;EACDA,KAAK,CAACC,UAAU,CAAC,kBAAyC;AACxD,IAAA,MAAMR,KAAK,GAAG,IAAI,CAACA,KAAK;AAExBS,IAAAA,MAAM,CACJ,CAAA,kIAAA,CAAoI,EACpIT,KACF,CAAC;AAED,IAAA,MAAMD,KAAK,CAAC,IAAI,CAACC,KAAc,CAAC;AAClC,EAAA,CAAC,CAAC;AACJ;;;;"}
1
+ {"version":3,"file":"a11y.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,3 +1,4 @@
1
+
1
2
  export { setupTabster } from './a11y.js';
2
3
  export { fillOTP } from './otp.js';
3
4
  export { rating } from './rating.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,3 +1,4 @@
1
+
1
2
  import { assert } from '@ember/debug';
2
3
  import { find, fillIn, settled } from '@ember/test-helpers';
3
4
 
@@ -1 +1 @@
1
- {"version":3,"file":"otp.js","sources":["../../src/test-support/otp.ts"],"sourcesContent":["import { assert } from '@ember/debug';\nimport { fillIn, find, settled } from '@ember/test-helpers';\n\n/**\n * @param {string} code the code to fill the input(s) with.\n * @param {string} [ selector ] if there are multiple OTP components on a page, this can be used to select one of them.\n */\nexport async function fillOTP(code: string, selector?: string) {\n const ancestor = selector ? find(selector) : document;\n\n assert(\n `Could not find ancestor element, does your selector match an existing element?`,\n ancestor\n );\n\n const fieldset =\n ancestor instanceof HTMLFieldSetElement ? ancestor : ancestor.querySelector('fieldset');\n\n assert(\n `Could not find containing fieldset element (this holds the OTP Input fields). Was the OTP component rendered?`,\n fieldset\n );\n\n const inputs = fieldset.querySelectorAll('input');\n\n assert(\n `code cannot be longer than the available inputs. code is of length ${code.length} but there are ${inputs.length}`,\n code.length <= inputs.length\n );\n\n const chars = code.split('');\n\n assert(`OTP Input for index 0 is missing!`, inputs[0]);\n assert(`Character at index 0 is missing`, chars[0]);\n\n for (let i = 0; i < chars.length; i++) {\n const input = inputs[i];\n const char = chars[i];\n\n assert(`Input at index ${i} is missing`, input);\n assert(`Character at index ${i} is missing`, char);\n\n input.value = char;\n }\n\n await fillIn(inputs[0], chars[0]);\n\n // Account for out-of-settled-system delay due to RAF debounce.\n await new Promise((resolve) => requestAnimationFrame(resolve));\n await settled();\n}\n"],"names":["fillOTP","code","selector","ancestor","find","document","assert","fieldset","HTMLFieldSetElement","querySelector","inputs","querySelectorAll","length","chars","split","i","input","char","value","fillIn","Promise","resolve","requestAnimationFrame","settled"],"mappings":";;;AAGA;AACA;AACA;AACA;AACO,eAAeA,OAAOA,CAACC,IAAY,EAAEC,QAAiB,EAAE;EAC7D,MAAMC,QAAQ,GAAGD,QAAQ,GAAGE,IAAI,CAACF,QAAQ,CAAC,GAAGG,QAAQ;AAErDC,EAAAA,MAAM,CACJ,CAAA,8EAAA,CAAgF,EAChFH,QACF,CAAC;AAED,EAAA,MAAMI,QAAQ,GACZJ,QAAQ,YAAYK,mBAAmB,GAAGL,QAAQ,GAAGA,QAAQ,CAACM,aAAa,CAAC,UAAU,CAAC;AAEzFH,EAAAA,MAAM,CACJ,CAAA,6GAAA,CAA+G,EAC/GC,QACF,CAAC;AAED,EAAA,MAAMG,MAAM,GAAGH,QAAQ,CAACI,gBAAgB,CAAC,OAAO,CAAC;AAEjDL,EAAAA,MAAM,CACJ,CAAA,mEAAA,EAAsEL,IAAI,CAACW,MAAM,CAAA,eAAA,EAAkBF,MAAM,CAACE,MAAM,CAAA,CAAE,EAClHX,IAAI,CAACW,MAAM,IAAIF,MAAM,CAACE,MACxB,CAAC;AAED,EAAA,MAAMC,KAAK,GAAGZ,IAAI,CAACa,KAAK,CAAC,EAAE,CAAC;AAE5BR,EAAAA,MAAM,CAAC,CAAA,iCAAA,CAAmC,EAAEI,MAAM,CAAC,CAAC,CAAC,CAAC;AACtDJ,EAAAA,MAAM,CAAC,CAAA,+BAAA,CAAiC,EAAEO,KAAK,CAAC,CAAC,CAAC,CAAC;AAEnD,EAAA,KAAK,IAAIE,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGF,KAAK,CAACD,MAAM,EAAEG,CAAC,EAAE,EAAE;AACrC,IAAA,MAAMC,KAAK,GAAGN,MAAM,CAACK,CAAC,CAAC;AACvB,IAAA,MAAME,IAAI,GAAGJ,KAAK,CAACE,CAAC,CAAC;AAErBT,IAAAA,MAAM,CAAC,CAAA,eAAA,EAAkBS,CAAC,CAAA,WAAA,CAAa,EAAEC,KAAK,CAAC;AAC/CV,IAAAA,MAAM,CAAC,CAAA,mBAAA,EAAsBS,CAAC,CAAA,WAAA,CAAa,EAAEE,IAAI,CAAC;IAElDD,KAAK,CAACE,KAAK,GAAGD,IAAI;AACpB,EAAA;EAEA,MAAME,MAAM,CAACT,MAAM,CAAC,CAAC,CAAC,EAAEG,KAAK,CAAC,CAAC,CAAC,CAAC;;AAEjC;EACA,MAAM,IAAIO,OAAO,CAAEC,OAAO,IAAKC,qBAAqB,CAACD,OAAO,CAAC,CAAC;EAC9D,MAAME,OAAO,EAAE;AACjB;;;;"}
1
+ {"version":3,"file":"otp.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,3 +1,4 @@
1
+
1
2
  import { assert } from '@ember/debug';
2
3
  import { find, findAll, click, fillIn } from '@ember/test-helpers';
3
4
 
@@ -1 +1 @@
1
- {"version":3,"file":"rating.js","sources":["../../src/test-support/rating.ts"],"sourcesContent":["import { assert } from '@ember/debug';\nimport { click, fillIn, find, findAll } from '@ember/test-helpers';\n\nconst selectors = {\n root: '.ember-primitives__rating',\n item: '.ember-primitives__rating__item',\n label: '.ember-primitives__rating__label',\n\n rootData: {\n total: '[data-total]',\n value: '[data-value]',\n },\n\n itemData: {\n number: '[data-number]',\n readonly: '[data-readonly]',\n selected: '[data-selected]',\n itemPercent: '[data-percent-selected]',\n },\n};\n\nconst stars = {\n selected: '★',\n unselected: '☆',\n};\n\n/**\n * Test utility for interacting with the\n * Rating component.\n *\n * Simulates user behavior and provides high level functions so you don't need to worry about the DOM.\n *\n * Actual elements are not exposed, as the elements are private API.\n * Even as you build a design system, the DOM should not be exposed to your consumers.\n */\nexport function rating(selector?: string) {\n const root = `${selector ?? ''}${selectors.root}`;\n\n return new RatingPageObject(root);\n}\n\nclass RatingPageObject {\n #root: string;\n\n constructor(root: string) {\n this.#root = root;\n }\n\n get #rootElement() {\n const element = find(this.#root);\n\n assert(\n `Could not find the root element for the <Rating> component. Used the selector \\`${this.#root}\\`. Was it rendered?`,\n element\n );\n\n return element;\n }\n\n get #labelElement() {\n const element = find(`${this.#root} ${selectors.label}`);\n\n assert(`Could not find the label for the <Rating> component. Was it rendered?`, element);\n\n return element;\n }\n\n get label() {\n return this.#labelElement.textContent?.replaceAll(/\\s+/g, ' ').trim();\n }\n\n get #starElements() {\n const elements = findAll(`${this.#root} ${selectors.item}`);\n\n assert(\n `There are no stars/items. Is the <Rating> component misconfigured?`,\n elements.length > 0\n );\n\n return elements as HTMLElement[];\n }\n\n get stars() {\n const elements = this.#starElements;\n\n return elements\n .map((x) => (x.hasAttribute('data-selected') ? stars.selected : stars.unselected))\n .join(' ');\n }\n\n get starTexts() {\n const elements = this.#starElements;\n\n return elements.map((x) => x.querySelector('[aria-hidden]')?.textContent?.trim()).join(' ');\n }\n\n get value() {\n const value = this.#rootElement.getAttribute(`data-value`);\n\n assert(`data-value attribute is missing on element '${this.#root}'`, value);\n\n const number = parseFloat(value);\n\n return number;\n }\n\n get isReadonly() {\n return this.#starElements.every((x) => x.hasAttribute('data-readonly'));\n }\n\n async select(stars: number) {\n const root = this.#rootElement;\n\n const star = root.querySelector(`[data-number=\"${stars}\"] input`);\n\n if (star) {\n await click(star);\n\n return;\n }\n\n /**\n * When we don't have an input, we require an input --\n * which is also the only way we can choose non-integer values.\n *\n * Should be able to be a number input or range input.\n */\n const input = root.querySelector('input[type=\"number\"], input[type=\"range\"]');\n\n if (input) {\n await fillIn(input, `${stars}`);\n\n return;\n }\n\n const available = [...root.querySelectorAll('[data-number]')].map((x) =>\n x.getAttribute('data-number')\n );\n\n assert(\n `Could not find item/star in <Rating> with value '${stars}' (or a number or range input with the same \"name\" value). Is the number (${stars}) correct and in-range for this component? The found available values are ${available.join(', ')}.`\n );\n }\n}\n"],"names":["selectors","root","item","label","stars","selected","unselected","rating","selector","RatingPageObject","constructor","#rootElement","element","find","assert","#labelElement","textContent","replaceAll","trim","#starElements","elements","findAll","length","map","x","hasAttribute","join","starTexts","querySelector","value","getAttribute","number","parseFloat","isReadonly","every","select","star","click","input","fillIn","available","querySelectorAll"],"mappings":";;;AAGA,MAAMA,SAAS,GAAG;AAChBC,EAAAA,IAAI,EAAE,2BAA2B;AACjCC,EAAAA,IAAI,EAAE,iCAAiC;AACvCC,EAAAA,KAAK,EAAE,kCAaT,CAAC;AAED,MAAMC,KAAK,GAAG;AACZC,EAAAA,QAAQ,EAAE,GAAG;AACbC,EAAAA,UAAU,EAAE;AACd,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,MAAMA,CAACC,QAAiB,EAAE;EACxC,MAAMP,IAAI,GAAG,CAAA,EAAGO,QAAQ,IAAI,EAAE,CAAA,EAAGR,SAAS,CAACC,IAAI,CAAA,CAAE;AAEjD,EAAA,OAAO,IAAIQ,gBAAgB,CAACR,IAAI,CAAC;AACnC;AAEA,MAAMQ,gBAAgB,CAAC;AACrB,EAAA,KAAK;EAELC,WAAWA,CAACT,IAAY,EAAE;AACxB,IAAA,IAAI,CAAC,KAAK,GAAGA,IAAI;AACnB,EAAA;EAEA,IAAI,YAAYU,GAAG;IACjB,MAAMC,OAAO,GAAGC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC;IAEh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V,KAAK,CAAA,0EAAA,EAA6EA,KAAK,CAAA,0EAAA,EAA6EoC,SAAS,CAACd,IAAI,CAAC,IAAI,CAAC,GAC9O,CAAC;AACH,EAAA;AACF;;;;"}
1
+ {"version":3,"file":"rating.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,3 +1,4 @@
1
+
1
2
  import { assert } from '@ember/debug';
2
3
  import Router from '@ember/routing/router';
3
4
  import { properLinks } from '../proper-links.js';
@@ -1 +1 @@
1
- {"version":3,"file":"routing.js","sources":["../../src/test-support/routing.ts"],"sourcesContent":["import { assert } from '@ember/debug';\nimport Router from '@ember/routing/router';\n\nimport { properLinks } from '../proper-links.ts';\n\nimport type Owner from '@ember/owner';\nimport type { DSLCallback } from '@ember/routing/lib/dsl';\nimport type RouterService from '@ember/routing/router-service';\n\n/**\n * Allows setting up routes in tests without the need to scaffold routes in the actual app,\n * allowing for iterating on many different routing scenario / configurations rapidly.\n *\n * Example:\n * ```js\n * import { setupRouting } from 'ember-primitives/test-support';\n *\n * ...\n *\n * test('my test', async function (assert) {\n * setupRouting(this.owner, function () {\n * this.route('foo');\n * this.route('bar', function () {\n * this.route('a');\n * this.route('b');\n * })\n * });\n *\n * await visit('/bar/b');\n * });\n * ```\n *\n */\nexport function setupRouting(owner: Owner, map: DSLCallback, options?: { rootURL: string }) {\n if (options?.rootURL) {\n assert('rootURL must begin with a forward slash (\"/\")', options?.rootURL?.startsWith('/'));\n }\n\n @properLinks\n class TestRouter extends Router {\n rootURL = options?.rootURL ?? '/';\n }\n\n TestRouter.map(map);\n\n owner.register('router:main', TestRouter);\n\n // eslint-disable-next-line ember/no-private-routing-service\n const iKnowWhatIMDoing = owner.lookup('router:main');\n\n // We need a public testing API for this sort of stuff\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n (iKnowWhatIMDoing as any).setupRouter();\n}\n\nexport function getRouter(owner: Owner): RouterService {\n return owner.lookup('service:router');\n}\n"],"names":["setupRouting","owner","map","options","rootURL","assert","startsWith","TestRouter","c","Router","properLinks","register","iKnowWhatIMDoing","lookup","setupRouter","getRouter"],"mappings":";;;;;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,YAAYA,CAACC,KAAY,EAAEC,GAAgB,EAAEC,OAA6B,EAAE;EAC1F,IAAIA,OAAO,EAAEC,OAAO,EAAE;IACpBC,MAAM,CAAC,+CAA+C,EAAEF,OAAO,EAAEC,OAAO,EAAEE,UAAU,CAAC,GAAG,CAAC,CAAC;AAC5F,EAAA;AAAC,EAAA,MAGKC,UAAU,GAAAC,CAAA,OAAVD,UAAU,SAASE,MAAM,CAAC;AAC9BL,IAAAA,OAAO,GAAGD,OAAO,EAAEC,OAAO,IAAI,GAAG;AACnC,GAAC,GAHAM,WAAW,CAAA,CAAA;AAKZH,EAAAA,UAAU,CAACL,GAAG,CAACA,GAAG,CAAC;AAEnBD,EAAAA,KAAK,CAACU,QAAQ,CAAC,aAAa,EAAEJ,UAAU,CAAC;;AAEzC;AACA,EAAA,MAAMK,gBAAgB,GAAGX,KAAK,CAACY,MAAM,CAAC,aAAa,CAAC;;AAEpD;;AAEA;EACCD,gBAAgB,CAASE,WAAW,EAAE;AACzC;AAEO,SAASC,SAASA,CAACd,KAAY,EAAiB;AACrD,EAAA,OAAOA,KAAK,CAACY,MAAM,CAAC,gBAAgB,CAAC;AACvC;;;;"}
1
+ {"version":3,"file":"routing.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,3 +1,4 @@
1
+
1
2
  import { click } from '@ember/test-helpers';
2
3
 
3
4
  /* eslint-disable @typescript-eslint/no-non-null-assertion */
@@ -1 +1 @@
1
- {"version":3,"file":"zoetrope.js","sources":["../../src/test-support/zoetrope.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-non-null-assertion */\nimport { click } from '@ember/test-helpers';\n\nexport class ZoetropeHelper {\n parentSelector = '.ember-primitives__zoetrope';\n\n constructor(parentSelector?: string) {\n if (parentSelector) {\n this.parentSelector = parentSelector;\n }\n }\n\n async scrollLeft() {\n await click(`${this.parentSelector} .ember-primitives__zoetrope__controls button:first-child`);\n }\n\n async scrollRight() {\n await click(`${this.parentSelector} .ember-primitives__zoetrope__controls button:last-child`);\n }\n\n visibleItems() {\n const zoetropeContent = document.querySelectorAll(\n `${this.parentSelector} .ember-primitives__zoetrope__scroller > *`\n );\n\n let firstVisibleItemIndex = -1;\n let lastVisibleItemIndex = -1;\n\n for (let i = 0; i < zoetropeContent.length; i++) {\n const item = zoetropeContent[i]!;\n const rect = item.getBoundingClientRect();\n const parentRect = item.parentElement!.getBoundingClientRect();\n\n if (rect.right >= parentRect?.left && rect.left <= parentRect?.right) {\n if (firstVisibleItemIndex === -1) {\n firstVisibleItemIndex = i;\n }\n\n lastVisibleItemIndex = i;\n } else if (firstVisibleItemIndex !== -1) {\n break;\n }\n }\n\n return Array.from(zoetropeContent).slice(firstVisibleItemIndex, lastVisibleItemIndex + 1);\n }\n\n visibleItemCount() {\n return this.visibleItems().length;\n }\n}\n"],"names":["ZoetropeHelper","parentSelector","constructor","scrollLeft","click","scrollRight","visibleItems","zoetropeContent","document","querySelectorAll","firstVisibleItemIndex","lastVisibleItemIndex","i","length","item","rect","getBoundingClientRect","parentRect","parentElement","right","left","Array","from","slice","visibleItemCount"],"mappings":";;AAAA;AAGO,MAAMA,cAAc,CAAC;AAC1BC,EAAAA,cAAc,GAAG,6BAA6B;EAE9CC,WAAWA,CAACD,cAAuB,EAAE;AACnC,IAAA,IAAIA,cAAc,EAAE;MAClB,IAAI,CAACA,cAAc,GAAGA,cAAc;AACtC,IAAA;AACF,EAAA;EAEA,MAAME,UAAUA,GAAG;AACjB,IAAA,MAAMC,KAAK,CAAC,CAAA,EAAG,IAAI,CAACH,cAAc,2DAA2D,CAAC;AAChG,EAAA;EAEA,MAAMI,WAAWA,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
package/dist/utils.js CHANGED
@@ -1,3 +1,4 @@
1
+
1
2
  // this is copy pasted from https://github.com/emberjs/ember.js/blob/60d2e0cddb353aea0d6e36a72fda971010d92355/packages/%40ember/-internals/glimmer/lib/helpers/unique-id.ts
2
3
  // Unfortunately due to https://github.com/emberjs/ember.js/issues/20165 we cannot use the built-in version in template tags
3
4
  function uniqueId() {
package/dist/utils.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sources":["../src/utils.ts"],"sourcesContent":["// this is copy pasted from https://github.com/emberjs/ember.js/blob/60d2e0cddb353aea0d6e36a72fda971010d92355/packages/%40ember/-internals/glimmer/lib/helpers/unique-id.ts\n// Unfortunately due to https://github.com/emberjs/ember.js/issues/20165 we cannot use the built-in version in template tags\nexport function uniqueId(): string {\n // @ts-expect-error this one-liner abuses weird JavaScript semantics that\n // TypeScript (legitimately) doesn't like, but they're nonetheless valid and\n // specced.\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-call, @typescript-eslint/restrict-plus-operands, @typescript-eslint/no-unsafe-member-access\n return ([3e7] + -1e3 + -4e3 + -2e3 + -1e11).replace(/[0-3]/g, (a) =>\n ((a * 4) ^ ((Math.random() * 16) >> (a & 2))).toString(16)\n );\n}\n\nexport function isNewable(x: any): x is new (...args: unknown[]) => NonNullable<object> {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return x.prototype?.constructor === x;\n}\n"],"names":["uniqueId","replace","a","Math","random","toString","isNewable","x","prototype","constructor"],"mappings":"AAAA;AACA;AACO,SAASA,QAAQA,GAAW;AACjC;AACA;AACA;AACA;EACA,OAAO,CAAC,CAAC,GAAG,CAAC,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,EAAEC,OAAO,CAAC,QAAQ,EAAGC,CAAC,IAC9D,CAAEA,CAAC,GAAG,CAAC,GAAMC,IAAI,CAACC,MAAM,EAAE,GAAG,EAAE,KAAMF,CAAC,GAAG,CAAC,CAAE,EAAEG,QAAQ,CAAC,EAAE,CAC3D,CAAC;AACH;AAEO,SAASC,SAASA,CAACC,CAAM,EAAwD;AACtF;AACA,EAAA,OAAOA,CAAC,CAACC,SAAS,EAAEC,WAAW,KAAKF,CAAC;AACvC;;;;"}
1
+ {"version":3,"file":"utils.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ import "./components/visually-hidden.css"
2
+ ;
3
+ //# sourceMappingURL=visually-hidden-CGP1FSjt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"visually-hidden-CGP1FSjt.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}