ember-primitives 0.26.2 → 0.27.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.
@@ -0,0 +1,5 @@
1
+ /**
2
+ * @internal
3
+ */
4
+ export declare const PRIMITIVES: unique symbol;
5
+ //# sourceMappingURL=-private.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"-private.d.ts","sourceRoot":"","sources":["../src/-private.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,UAAU,eAAyC,CAAC"}
@@ -20,5 +20,4 @@ export { Toggle } from "./components/toggle";
20
20
  export { ToggleGroup } from "./components/toggle-group";
21
21
  export { Zoetrope } from './components/zoetrope.ts';
22
22
  export * from './helpers.ts';
23
- export type { default as SetupService } from './services/ember-primitives/setup.ts';
24
23
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,YAAY,EACV,iCAAiC,EACjC,gCAAgC,EAChC,8BAA8B,EAC9B,iCAAiC,GAClC,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,IAAI,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AACrE,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,0CAA0C,CAAC;AACzE,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,cAAc,cAAc,CAAC;AAC7B,YAAY,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,sCAAsC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,YAAY,EACV,iCAAiC,EACjC,gCAAgC,EAChC,8BAA8B,EAC9B,iCAAiC,GAClC,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,IAAI,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AACrE,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,0CAA0C,CAAC;AACzE,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,cAAc,cAAc,CAAC"}
@@ -0,0 +1,24 @@
1
+ export declare function setupTabster(
2
+ /**
3
+ * A destroyable object.
4
+ * This is needed so that when the app (or tests) or unmounted or ending,
5
+ * the tabster instance can be disposed of.
6
+ */
7
+ context: object, { tabster, setTabsterRoot, }?: {
8
+ /**
9
+ * Let this setup function initalize tabster.
10
+ * https://tabster.io/docs/core
11
+ *
12
+ * This should be done only once per application as we don't want
13
+ * focus managers fighting with each other.
14
+ *
15
+ * Defaults to `true`,
16
+ *
17
+ * Will fallback to an existing tabster instance automatically if `getTabster` returns a value.
18
+ *
19
+ * If `false` is explicitly passed here, you'll also be in charge of teardown.
20
+ */
21
+ tabster?: boolean;
22
+ setTabsterRoot?: boolean;
23
+ }): Promise<void>;
24
+ //# sourceMappingURL=tabster.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tabster.d.ts","sourceRoot":"","sources":["../src/tabster.ts"],"names":[],"mappings":"AAEA,wBAAsB,YAAY;AAChC;;;;GAIG;AACH,OAAO,EAAE,MAAM,EACf,EACE,OAAO,EACP,cAAc,GACf,GAAE;IACD;;;;;;;;;;;;OAYG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,cAAc,CAAC,EAAE,OAAO,CAAC;CACrB,iBA0BP"}
@@ -1,7 +1,4 @@
1
- import type Owner from '@ember/owner';
2
- /**
3
- * Sets up all support utilities for primitive components.
4
- * Including the tabster root.
5
- */
6
- export declare function setup(owner: Owner): void;
1
+ export declare function setupTabster(hooks: {
2
+ beforeEach: (callback: () => void | Promise<void>) => unknown;
3
+ }): void;
7
4
  //# sourceMappingURL=a11y.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"a11y.d.ts","sourceRoot":"","sources":["../../src/test-support/a11y.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAEtC;;;GAGG;AACH,wBAAgB,KAAK,CAAC,KAAK,EAAE,KAAK,QAQjC"}
1
+ {"version":3,"file":"a11y.d.ts","sourceRoot":"","sources":["../../src/test-support/a11y.ts"],"names":[],"mappings":"AAgBA,wBAAgB,YAAY,CAAC,KAAK,EAAE;IAClC,UAAU,EAAE,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,OAAO,CAAC;CAC/D,QAWA"}
@@ -1,3 +1,4 @@
1
+ export { setupTabster } from './a11y.ts';
1
2
  export { fillOTP } from './otp.ts';
2
3
  export { getRouter, setupRouting } from './routing.ts';
3
4
  export { ZoetropeHelper } from './zoetrope.ts';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/test-support/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACnC,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/test-support/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACnC,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @internal
3
+ */
4
+ const PRIMITIVES = Symbol.for('ember-primitives-globals');
5
+
6
+ export { PRIMITIVES };
7
+ //# sourceMappingURL=-private.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"-private.js","sources":["../src/-private.ts"],"sourcesContent":["/**\n * @internal\n */\nexport const PRIMITIVES = Symbol.for('ember-primitives-globals');\n"],"names":["PRIMITIVES","Symbol","for"],"mappings":"AAAA;AACA;AACA;AACO,MAAMA,UAAU,GAAGC,MAAM,CAACC,GAAG,CAAC,0BAA0B;;;;"}
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 { 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 { 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 { Zoetrope } from './components/zoetrope.ts';\nexport * from './helpers.ts';\nexport type { default as SetupService } from './services/ember-primitives/setup.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,CAAA;AAC3C"}
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 { 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 { 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 { 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,CAAA;AAC3C"}
@@ -0,0 +1,38 @@
1
+ import { registerDestructor } from '@ember/destroyable';
2
+
3
+ async function setupTabster(
4
+ /**
5
+ * A destroyable object.
6
+ * This is needed so that when the app (or tests) or unmounted or ending,
7
+ * the tabster instance can be disposed of.
8
+ */
9
+ context, {
10
+ tabster,
11
+ setTabsterRoot
12
+ } = {}) {
13
+ const {
14
+ createTabster,
15
+ getDeloser,
16
+ getMover,
17
+ getTabster,
18
+ disposeTabster
19
+ } = await import('tabster');
20
+ tabster ??= true;
21
+ setTabsterRoot ??= true;
22
+ if (!tabster) {
23
+ return;
24
+ }
25
+ let existing = getTabster(window);
26
+ let primitivesTabster = existing ?? createTabster(window);
27
+ getMover(primitivesTabster);
28
+ getDeloser(primitivesTabster);
29
+ if (setTabsterRoot) {
30
+ document.body.setAttribute('data-tabster', '{ "root": {} }');
31
+ }
32
+ registerDestructor(context, () => {
33
+ disposeTabster(primitivesTabster);
34
+ });
35
+ }
36
+
37
+ export { setupTabster };
38
+ //# sourceMappingURL=tabster.js.map
@@ -0,0 +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 let existing = getTabster(window);\n let 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,cAAAA;AAiBF,CAAC,GAAG,EAAE,EACN;EACA,MAAM;IAAEC,aAAa;IAAEC,UAAU;IAAEC,QAAQ;IAAEC,UAAU;AAAEC,IAAAA,cAAAA;AAAe,GAAC,GAAG,MAAM,OAChF,SACF,CAAC,CAAA;AAEDN,EAAAA,OAAO,KAAK,IAAI,CAAA;AAChBC,EAAAA,cAAc,KAAK,IAAI,CAAA;EAEvB,IAAI,CAACD,OAAO,EAAE;AACZ,IAAA,OAAA;AACF,GAAA;AAEA,EAAA,IAAIO,QAAQ,GAAGF,UAAU,CAACG,MAAM,CAAC,CAAA;AACjC,EAAA,IAAIC,iBAAiB,GAAGF,QAAQ,IAAIL,aAAa,CAACM,MAAM,CAAC,CAAA;EAEzDJ,QAAQ,CAACK,iBAAiB,CAAC,CAAA;EAC3BN,UAAU,CAACM,iBAAiB,CAAC,CAAA;AAE7B,EAAA,IAAIR,cAAc,EAAE;IAClBS,QAAQ,CAACC,IAAI,CAACC,YAAY,CAAC,cAAc,EAAE,gBAAgB,CAAC,CAAA;AAC9D,GAAA;EAEAC,kBAAkB,CAACd,OAAO,EAAE,MAAM;IAChCO,cAAc,CAACG,iBAAiB,CAAC,CAAA;AACnC,GAAC,CAAC,CAAA;AACJ;;;;"}
@@ -1,17 +1,23 @@
1
1
  import { assert } from '@ember/debug';
2
+ import { setupTabster as setupTabster$1 } from '../tabster.js';
2
3
 
3
4
  /**
4
5
  * Sets up all support utilities for primitive components.
5
6
  * Including the tabster root.
6
7
  */
7
- function setup(owner) {
8
- let service = owner.lookup('service:ember-primitives/setup');
9
- assert('Could not find the ember-primitives service', service);
10
- service.setup({
8
+ async function setup(owner) {
9
+ setupTabster$1(owner, {
11
10
  setTabsterRoot: false
12
11
  });
13
12
  document.querySelector('#ember-testing')?.setAttribute('data-tabster', '{ "root": {} }');
14
13
  }
14
+ function setupTabster(hooks) {
15
+ hooks.beforeEach(function () {
16
+ let owner = this.owner;
17
+ assert(`Test does not have an owner, be sure to use setupRenderingTest, setupTest, or setupApplicationTest (from ember-qunit (or similar))`, owner);
18
+ setup(this.owner);
19
+ });
20
+ }
15
21
 
16
- export { setup };
22
+ export { setupTabster };
17
23
  //# sourceMappingURL=a11y.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"a11y.js","sources":["../../src/test-support/a11y.ts"],"sourcesContent":["import { assert } from '@ember/debug';\n\nimport type SetupService from '../services/ember-primitives/setup.ts';\nimport type Owner from '@ember/owner';\n\n/**\n * Sets up all support utilities for primitive components.\n * Including the tabster root.\n */\nexport function setup(owner: Owner) {\n let service = owner.lookup('service:ember-primitives/setup');\n\n assert('Could not find the ember-primitives service', service);\n\n (service as SetupService).setup({ setTabsterRoot: false });\n\n document.querySelector('#ember-testing')?.setAttribute('data-tabster', '{ \"root\": {} }');\n}\n"],"names":["setup","owner","service","lookup","assert","setTabsterRoot","document","querySelector","setAttribute"],"mappings":";;AAKA;AACA;AACA;AACA;AACO,SAASA,KAAKA,CAACC,KAAY,EAAE;AAClC,EAAA,IAAIC,OAAO,GAAGD,KAAK,CAACE,MAAM,CAAC,gCAAgC,CAAC,CAAA;AAE5DC,EAAAA,MAAM,CAAC,6CAA6C,EAAEF,OAAO,CAAC,CAAA;EAE7DA,OAAO,CAAkBF,KAAK,CAAC;AAAEK,IAAAA,cAAc,EAAE,KAAA;AAAM,GAAC,CAAC,CAAA;EAE1DC,QAAQ,CAACC,aAAa,CAAC,gBAAgB,CAAC,EAAEC,YAAY,CAAC,cAAc,EAAE,gBAAgB,CAAC,CAAA;AAC1F;;;;"}
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 _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(function (this: { owner: object }) {\n let 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 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;EACjCC,cAAa,CAACD,KAAK,EAAE;AAAEE,IAAAA,cAAc,EAAE,KAAA;AAAM,GAAC,CAAC,CAAA;EAE/CC,QAAQ,CAACC,aAAa,CAAC,gBAAgB,CAAC,EAAEC,YAAY,CAAC,cAAc,EAAE,gBAAgB,CAAC,CAAA;AAC1F,CAAA;AAEO,SAASC,YAAYA,CAACC,KAE5B,EAAE;EACDA,KAAK,CAACC,UAAU,CAAC,YAAmC;AAClD,IAAA,IAAIR,KAAK,GAAG,IAAI,CAACA,KAAK,CAAA;AAEtBS,IAAAA,MAAM,CACJ,CAAA,kIAAA,CAAoI,EACpIT,KACF,CAAC,CAAA;AAEDD,IAAAA,KAAK,CAAC,IAAI,CAACC,KAAc,CAAC,CAAA;AAC5B,GAAC,CAAC,CAAA;AACJ;;;;"}
@@ -1,3 +1,4 @@
1
+ export { setupTabster } from './a11y.js';
1
2
  export { fillOTP } from './otp.js';
2
3
  export { getRouter, setupRouting } from './routing.js';
3
4
  export { ZoetropeHelper } from './zoetrope.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ember-primitives",
3
- "version": "0.26.2",
3
+ "version": "0.27.0",
4
4
  "description": "Making apps easier to build",
5
5
  "sideEffects": [
6
6
  "*.css"
@@ -86,9 +86,7 @@
86
86
  "version": 2,
87
87
  "type": "addon",
88
88
  "main": "addon-main.cjs",
89
- "app-js": {
90
- "./services/ember-primitives/setup.js": "./dist/_app_/services/ember-primitives/setup.js"
91
- }
89
+ "app-js": {}
92
90
  },
93
91
  "exports": {
94
92
  ".": {
@@ -1,27 +0,0 @@
1
- import Service from '@ember/service';
2
- /**
3
- * @internal
4
- */
5
- export declare const PRIMITIVES: unique symbol;
6
- export default class EmberPrimitivesSetup extends Service {
7
- #private;
8
- /**
9
- * Sets up required features for accessibility.
10
- */
11
- setup: ({ tabster, setTabsterRoot, }?: {
12
- /**
13
- * Let this setup function initalize tabster.
14
- * https://tabster.io/docs/core
15
- *
16
- * This should be done only once per application as we don't want
17
- * focus managers fighting with each other.
18
- *
19
- * Defaults to `true`,
20
- *
21
- * Will fallback to an existing tabster instance automatically if `getTabster` returns a value.
22
- */
23
- tabster?: boolean;
24
- setTabsterRoot?: boolean;
25
- }) => void;
26
- }
27
- //# sourceMappingURL=setup.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../../src/services/ember-primitives/setup.ts"],"names":[],"mappings":"AACA,OAAO,OAAO,MAAM,gBAAgB,CAAC;AAIrC;;GAEG;AACH,eAAO,MAAM,UAAU,eAAyC,CAAC;AAEjE,MAAM,CAAC,OAAO,OAAO,oBAAqB,SAAQ,OAAO;;IACvD;;OAEG;IACH,KAAK,kCAGF;QACD;;;;;;;;;;WAUG;QACH,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,cAAc,CAAC,EAAE,OAAO,CAAC;KAC1B,UAeC;CAMH"}
@@ -1 +0,0 @@
1
- export { default } from "ember-primitives/services/ember-primitives/setup";
@@ -1,36 +0,0 @@
1
- import Service from '@ember/service';
2
- import { getTabster, createTabster, getMover, getDeloser } from 'tabster';
3
-
4
- /* eslint-disable @typescript-eslint/no-explicit-any */
5
-
6
- /**
7
- * @internal
8
- */
9
- const PRIMITIVES = Symbol.for('ember-primitives-globals');
10
- class EmberPrimitivesSetup extends Service {
11
- /**
12
- * Sets up required features for accessibility.
13
- */
14
- setup = ({
15
- tabster,
16
- setTabsterRoot
17
- } = {}) => {
18
- tabster ??= true;
19
- setTabsterRoot ??= true;
20
- if (!tabster) {
21
- return;
22
- }
23
- let existing = getTabster(window);
24
- this.#setupTabster(existing ?? createTabster(window));
25
- if (setTabsterRoot) {
26
- document.body.setAttribute('data-tabster', '{ "root": {} }');
27
- }
28
- };
29
- #setupTabster = tabster => {
30
- getMover(tabster);
31
- getDeloser(tabster);
32
- };
33
- }
34
-
35
- export { PRIMITIVES, EmberPrimitivesSetup as default };
36
- //# sourceMappingURL=setup.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"setup.js","sources":["../../../src/services/ember-primitives/setup.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport Service from '@ember/service';\n\nimport { createTabster, getDeloser, getMover, getTabster } from 'tabster';\n\n/**\n * @internal\n */\nexport const PRIMITIVES = Symbol.for('ember-primitives-globals');\n\nexport default class EmberPrimitivesSetup extends Service {\n /**\n * Sets up required features for accessibility.\n */\n setup = ({\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 tabster?: boolean;\n setTabsterRoot?: boolean;\n } = {}) => {\n tabster ??= true;\n setTabsterRoot ??= true;\n\n if (!tabster) {\n return;\n }\n\n let existing = getTabster(window);\n\n this.#setupTabster(existing ?? createTabster(window));\n\n if (setTabsterRoot) {\n document.body.setAttribute('data-tabster', '{ \"root\": {} }');\n }\n };\n\n #setupTabster = (tabster: ReturnType<typeof createTabster>) => {\n getMover(tabster);\n getDeloser(tabster);\n };\n}\n"],"names":["PRIMITIVES","Symbol","for","EmberPrimitivesSetup","Service","setup","tabster","setTabsterRoot","existing","getTabster","window","createTabster","document","body","setAttribute","getMover","getDeloser"],"mappings":";;;AAAA;;AAKA;AACA;AACA;AACO,MAAMA,UAAU,GAAGC,MAAM,CAACC,GAAG,CAAC,0BAA0B,EAAC;AAEjD,MAAMC,oBAAoB,SAASC,OAAO,CAAC;AACxD;AACF;AACA;AACEC,EAAAA,KAAK,GAAGA,CAAC;IACPC,OAAO;AACPC,IAAAA,cAAAA;GAeD,GAAG,EAAE,KAAK;AACTD,IAAAA,OAAO,KAAK,IAAI,CAAA;AAChBC,IAAAA,cAAc,KAAK,IAAI,CAAA;IAEvB,IAAI,CAACD,OAAO,EAAE;AACZ,MAAA,OAAA;AACF,KAAA;AAEA,IAAA,IAAIE,QAAQ,GAAGC,UAAU,CAACC,MAAM,CAAC,CAAA;IAEjC,IAAI,CAAC,aAAa,CAACF,QAAQ,IAAIG,aAAa,CAACD,MAAM,CAAC,CAAC,CAAA;AAErD,IAAA,IAAIH,cAAc,EAAE;MAClBK,QAAQ,CAACC,IAAI,CAACC,YAAY,CAAC,cAAc,EAAE,gBAAgB,CAAC,CAAA;AAC9D,KAAA;GACD,CAAA;EAED,aAAa,GAAIR,OAAyC,IAAK;IAC7DS,QAAQ,CAACT,OAAO,CAAC,CAAA;IACjBU,UAAU,CAACV,OAAO,CAAC,CAAA;GACpB,CAAA;AACH;;;;"}