frontile 0.18.6 → 0.18.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/declarations/-private/icons.d.ts +4 -0
- package/declarations/-private/icons.d.ts.map +1 -1
- package/declarations/components/collections/dropdown/dropdown.d.ts +50 -53
- package/declarations/components/collections/dropdown/dropdown.d.ts.map +1 -1
- package/declarations/components/collections/listbox/item.d.ts +52 -1
- package/declarations/components/collections/listbox/item.d.ts.map +1 -1
- package/declarations/components/forms/select/select.d.ts +17 -0
- package/declarations/components/forms/select/select.d.ts.map +1 -1
- package/declarations/components/layout/app-layout-state.d.ts +32 -0
- package/declarations/components/layout/app-layout-state.d.ts.map +1 -0
- package/declarations/components/layout/app-layout.d.ts +954 -0
- package/declarations/components/layout/app-layout.d.ts.map +1 -0
- package/declarations/components/layout/aside-toggle.d.ts +55 -0
- package/declarations/components/layout/aside-toggle.d.ts.map +1 -0
- package/declarations/components/layout/aside.d.ts +761 -0
- package/declarations/components/layout/aside.d.ts.map +1 -0
- package/declarations/components/layout/bottom-nav-more.d.ts +123 -0
- package/declarations/components/layout/bottom-nav-more.d.ts.map +1 -0
- package/declarations/components/layout/bottom-nav.d.ts +60 -0
- package/declarations/components/layout/bottom-nav.d.ts.map +1 -0
- package/declarations/components/layout/context.d.ts +134 -0
- package/declarations/components/layout/context.d.ts.map +1 -0
- package/declarations/components/layout/index.d.ts +14 -0
- package/declarations/components/layout/index.d.ts.map +1 -0
- package/declarations/components/layout/main.d.ts +28 -0
- package/declarations/components/layout/main.d.ts.map +1 -0
- package/declarations/components/layout/menu-toggle.d.ts +58 -0
- package/declarations/components/layout/menu-toggle.d.ts.map +1 -0
- package/declarations/components/layout/nav-context.d.ts +45 -0
- package/declarations/components/layout/nav-context.d.ts.map +1 -0
- package/declarations/components/layout/nav-folder.d.ts +216 -0
- package/declarations/components/layout/nav-folder.d.ts.map +1 -0
- package/declarations/components/layout/nav-item.d.ts +220 -0
- package/declarations/components/layout/nav-item.d.ts.map +1 -0
- package/declarations/components/layout/nav-link.d.ts +67 -0
- package/declarations/components/layout/nav-link.d.ts.map +1 -0
- package/declarations/components/layout/navbar.d.ts +27 -0
- package/declarations/components/layout/navbar.d.ts.map +1 -0
- package/declarations/components/layout/page-header.d.ts +40 -0
- package/declarations/components/layout/page-header.d.ts.map +1 -0
- package/declarations/components/layout/sidebar-group.d.ts +41 -0
- package/declarations/components/layout/sidebar-group.d.ts.map +1 -0
- package/declarations/components/layout/sidebar-toggle.d.ts +71 -0
- package/declarations/components/layout/sidebar-toggle.d.ts.map +1 -0
- package/declarations/components/layout/sidebar.d.ts +904 -0
- package/declarations/components/layout/sidebar.d.ts.map +1 -0
- package/declarations/components/navigation/index.d.ts +1 -0
- package/declarations/components/navigation/index.d.ts.map +1 -1
- package/declarations/components/navigation/stepper/collapse-menu.d.ts +42 -0
- package/declarations/components/navigation/stepper/collapse-menu.d.ts.map +1 -0
- package/declarations/components/navigation/stepper/list.d.ts +24 -0
- package/declarations/components/navigation/stepper/list.d.ts.map +1 -0
- package/declarations/components/navigation/stepper/panel.d.ts +42 -0
- package/declarations/components/navigation/stepper/panel.d.ts.map +1 -0
- package/declarations/components/navigation/stepper/step.d.ts +123 -0
- package/declarations/components/navigation/stepper/step.d.ts.map +1 -0
- package/declarations/components/navigation/stepper/stepper.d.ts +947 -0
- package/declarations/components/navigation/stepper/stepper.d.ts.map +1 -0
- package/declarations/components/navigation/stepper.d.ts +6 -0
- package/declarations/components/navigation/stepper.d.ts.map +1 -0
- package/declarations/components/navigation/tab-nav/item.d.ts +2 -2
- package/declarations/components/navigation/tab-nav/item.d.ts.map +1 -1
- package/declarations/components/overlays/portal.d.ts.map +1 -1
- package/declarations/components/utilities/collapsible.d.ts +19 -2
- package/declarations/components/utilities/collapsible.d.ts.map +1 -1
- package/declarations/index.d.ts +1 -0
- package/declarations/index.d.ts.map +1 -1
- package/declarations/layout.d.ts +2 -0
- package/declarations/layout.d.ts.map +1 -0
- package/declarations/utils/breakpoint.d.ts +16 -0
- package/declarations/utils/breakpoint.d.ts.map +1 -0
- package/declarations/utils/document-listener.d.ts +6 -0
- package/declarations/utils/document-listener.d.ts.map +1 -0
- package/declarations/utils/listManager.d.ts +7 -1
- package/declarations/utils/listManager.d.ts.map +1 -1
- package/declarations/utils/route-active.d.ts +34 -0
- package/declarations/utils/route-active.d.ts.map +1 -0
- package/declarations/utils/selection-indicator.d.ts +7 -4
- package/declarations/utils/selection-indicator.d.ts.map +1 -1
- package/dist/components/collections/calendar/header.js +1 -1
- package/dist/components/collections/dropdown/dropdown.js +172 -48
- package/dist/components/collections/dropdown/dropdown.js.map +1 -1
- package/dist/components/collections/listbox/item.js +36 -2
- package/dist/components/collections/listbox/item.js.map +1 -1
- package/dist/components/collections/table/column-visibility.js +1 -1
- package/dist/components/collections/table/sort-button.js +1 -1
- package/dist/components/disclosure/accordion/item.js +1 -1
- package/dist/components/forms/autocomplete.js +1 -1
- package/dist/components/forms/date-picker/end-content.js +1 -1
- package/dist/components/forms/native-select.js +1 -1
- package/dist/components/forms/select/end-content.js +1 -1
- package/dist/components/forms/select/select.js +2 -1
- package/dist/components/forms/select/select.js.map +1 -1
- package/dist/components/layout/app-layout-state.js +64 -0
- package/dist/components/layout/app-layout-state.js.map +1 -0
- package/dist/components/layout/app-layout.js +416 -0
- package/dist/components/layout/app-layout.js.map +1 -0
- package/dist/components/layout/aside-toggle.js +55 -0
- package/dist/components/layout/aside-toggle.js.map +1 -0
- package/dist/components/layout/aside.js +100 -0
- package/dist/components/layout/aside.js.map +1 -0
- package/dist/components/layout/bottom-nav-more.js +150 -0
- package/dist/components/layout/bottom-nav-more.js.map +1 -0
- package/dist/components/layout/bottom-nav.js +65 -0
- package/dist/components/layout/bottom-nav.js.map +1 -0
- package/dist/components/layout/context.js +89 -0
- package/dist/components/layout/context.js.map +1 -0
- package/dist/components/layout/index.js +14 -0
- package/dist/components/layout/index.js.map +1 -0
- package/dist/components/layout/main.js +34 -0
- package/dist/components/layout/main.js.map +1 -0
- package/dist/components/layout/menu-toggle.js +61 -0
- package/dist/components/layout/menu-toggle.js.map +1 -0
- package/dist/components/layout/nav-context.js +85 -0
- package/dist/components/layout/nav-context.js.map +1 -0
- package/dist/components/layout/nav-folder.js +271 -0
- package/dist/components/layout/nav-folder.js.map +1 -0
- package/dist/components/layout/nav-item.js +192 -0
- package/dist/components/layout/nav-item.js.map +1 -0
- package/dist/components/layout/nav-link.js +58 -0
- package/dist/components/layout/nav-link.js.map +1 -0
- package/dist/components/layout/navbar.js +30 -0
- package/dist/components/layout/navbar.js.map +1 -0
- package/dist/components/layout/page-header.js +45 -0
- package/dist/components/layout/page-header.js.map +1 -0
- package/dist/components/layout/sidebar-group.js +41 -0
- package/dist/components/layout/sidebar-group.js.map +1 -0
- package/dist/components/layout/sidebar-toggle.js +82 -0
- package/dist/components/layout/sidebar-toggle.js.map +1 -0
- package/dist/components/layout/sidebar.js +249 -0
- package/dist/components/layout/sidebar.js.map +1 -0
- package/dist/components/navigation/breadcrumbs/separator.js +1 -1
- package/dist/components/navigation/index.js +4 -0
- package/dist/components/navigation/index.js.map +1 -1
- package/dist/components/navigation/pagination/pagination.js +1 -1
- package/dist/components/navigation/stepper/collapse-menu.js +128 -0
- package/dist/components/navigation/stepper/collapse-menu.js.map +1 -0
- package/dist/components/navigation/stepper/list.js +17 -0
- package/dist/components/navigation/stepper/list.js.map +1 -0
- package/dist/components/navigation/stepper/panel.js +26 -0
- package/dist/components/navigation/stepper/panel.js.map +1 -0
- package/dist/components/navigation/stepper/step.js +130 -0
- package/dist/components/navigation/stepper/step.js.map +1 -0
- package/dist/components/navigation/stepper/stepper.js +475 -0
- package/dist/components/navigation/stepper/stepper.js.map +1 -0
- package/dist/components/navigation/stepper.js +5 -0
- package/dist/components/navigation/stepper.js.map +1 -0
- package/dist/components/navigation/tab-nav/item.js +6 -40
- package/dist/components/navigation/tab-nav/item.js.map +1 -1
- package/dist/components/notifications/index.js +1 -1
- package/dist/components/notifications/notification-card.js +2 -2
- package/dist/components/notifications/notifications-container.js +1 -1
- package/dist/components/overlays/portal.js +11 -2
- package/dist/components/overlays/portal.js.map +1 -1
- package/dist/components/status/alert.js +1 -1
- package/dist/components/utilities/collapsible.js +33 -5
- package/dist/components/utilities/collapsible.js.map +1 -1
- package/dist/{icons-DZ61nCzv.js → icons-55dthVFk.js} +14 -2
- package/dist/{icons-DZ61nCzv.js.map → icons-55dthVFk.js.map} +1 -1
- package/dist/index.js +18 -1
- package/dist/index.js.map +1 -1
- package/dist/layout.js +14 -0
- package/dist/layout.js.map +1 -0
- package/dist/navigation.js +4 -0
- package/dist/navigation.js.map +1 -1
- package/dist/{notification-card-dz-eE6z9.js → notification-card-BPfDo-Gf.js} +2 -2
- package/dist/{notification-card-dz-eE6z9.js.map → notification-card-BPfDo-Gf.js.map} +1 -1
- package/dist/notifications.js +1 -1
- package/dist/utils/breakpoint.js +56 -0
- package/dist/utils/breakpoint.js.map +1 -0
- package/dist/utils/document-listener.js +10 -0
- package/dist/utils/document-listener.js.map +1 -0
- package/dist/utils/listManager.js +12 -2
- package/dist/utils/listManager.js.map +1 -1
- package/dist/utils/route-active.js +70 -0
- package/dist/utils/route-active.js.map +1 -0
- package/dist/utils/selection-indicator.js +25 -5
- package/dist/utils/selection-indicator.js.map +1 -1
- package/package.json +7 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"route-active.js","sources":["../../src/utils/route-active.ts"],"sourcesContent":["import type RouterService from '@ember/routing/router-service';\n\nexport interface RouteActiveArgs {\n /** The route name. Without it nothing is derived from the router. */\n route?: string;\n /** A single dynamic segment for `route`. */\n model?: unknown;\n /** Dynamic segments for `route`. Wins over `model`. */\n models?: unknown[];\n /** Query params for `route`. */\n query?: Record<string, unknown>;\n /** Explicit override. Always wins over anything derived from the router. */\n isActive?: boolean;\n}\n\n/**\n * Normalizes the dynamic segments and query params given to a route link.\n */\nexport function normalizeRouteArgs(\n args: Pick<RouteActiveArgs, 'model' | 'models' | 'query'>\n): { models: unknown[]; query: Record<string, unknown> } {\n return {\n // `!= null` (not truthiness) so a legitimate falsy dynamic segment --\n // `model={{0}}` or `model=\"\"` -- is not silently dropped.\n models: args.models ?? (args.model != null ? [args.model] : []),\n // `LinkTo`'s `@query` throws when given `undefined` rather than treating it\n // as \"no query params\" -- so this must default to an empty object.\n query: args.query ?? {}\n };\n}\n\n/**\n * Whether a route link is active. An explicit `isActive` wins; without a\n * `route` the answer is `false`; otherwise the router decides.\n */\nexport function isRouteActive(\n router: RouterService,\n args: RouteActiveArgs\n): boolean {\n if (args.isActive !== undefined) {\n return args.isActive;\n }\n if (!args.route) {\n return false;\n }\n\n // Redundant belt-and-braces: `RouterService#isActive` already entangles\n // itself with `currentURL`'s tag internally (see\n // `consumeTag(tagFor(this._router, 'currentURL'))` in ember-source's\n // `router-service.js`), so a caller recomputes on every transition even\n // without the read below. Kept anyway as a documented, version-independent\n // guarantee -- and covered by the transition test in\n // `tab-nav-routing-test.gts` -- in case that internal entanglement is ever\n // dropped.\n void router.currentURL;\n\n const { models, query } = normalizeRouteArgs(args);\n\n try {\n return router.isActive(args.route, ...models, {\n queryParams: query\n } as never);\n } catch {\n // `isActive` throws for a route that is not currently reachable -- an\n // unentered engine, or a dynamic segment whose model is not loaded. Not\n // being reachable is not being active.\n return false;\n }\n}\n\n/**\n * `isRouteActive` for a router that is resolved lazily. `getRouter` runs only\n * when the router is actually needed -- `route` given and `isActive` not -- so\n * a link that never routes never touches `service:router`. Shared by\n * `NavLink` and the handle `NavItem` registers with a folder, so both always\n * agree on what is active.\n */\nexport function isLinkActive(\n args: RouteActiveArgs,\n getRouter: () => RouterService\n): boolean {\n if (args.isActive !== undefined) {\n return args.isActive;\n }\n if (!args.route) {\n return false;\n }\n\n return isRouteActive(getRouter(), args);\n}\n"],"names":["normalizeRouteArgs","args","models","model","query","isRouteActive","router","isActive","undefined","route","currentURL","queryParams","isLinkActive","getRouter"],"mappings":"AAeA;AACA;AACA;AACO,SAASA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AI,CAAC;AACzC;;"}
|
|
@@ -25,6 +25,14 @@ class SelectionIndicator {
|
|
|
25
25
|
#resize = deferredWork('@frontile/utils:selection-indicator:resize');
|
|
26
26
|
#isReady = false;
|
|
27
27
|
|
|
28
|
+
// How many live claims the current target holds. A modifier whose
|
|
29
|
+
// definition changes -- its owner's context was rebuilt, say -- is
|
|
30
|
+
// reinstalled rather than updated, and Glimmer installs the new instance
|
|
31
|
+
// before destroying the old one. The same element is then claimed twice and
|
|
32
|
+
// released once, and that one release must not take the target away from
|
|
33
|
+
// the claim that is still live.
|
|
34
|
+
#claims = 0;
|
|
35
|
+
|
|
28
36
|
// Whether a real measurement has ever landed. Only the very first one is
|
|
29
37
|
// forced-layout-sensitive (see `setupContainer`); once it has happened, a
|
|
30
38
|
// click that moves the selection is no longer racing an ancestor's own
|
|
@@ -80,7 +88,12 @@ class SelectionIndicator {
|
|
|
80
88
|
* indicator immediately rather than a frame later.
|
|
81
89
|
*/
|
|
82
90
|
claim(element) {
|
|
83
|
-
this.#target
|
|
91
|
+
if (this.#target === element) {
|
|
92
|
+
this.#claims += 1;
|
|
93
|
+
} else {
|
|
94
|
+
this.#target = element;
|
|
95
|
+
this.#claims = 1;
|
|
96
|
+
}
|
|
84
97
|
this.#observer?.observe(element);
|
|
85
98
|
if (this.#hasMeasuredOnce) {
|
|
86
99
|
this.#measure();
|
|
@@ -88,15 +101,22 @@ class SelectionIndicator {
|
|
|
88
101
|
}
|
|
89
102
|
|
|
90
103
|
/**
|
|
91
|
-
* Releases `element` if it is still the target
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
* target.
|
|
104
|
+
* Releases one claim on `element` if it is still the target, and gives the
|
|
105
|
+
* target up once no claim on it is left. When selection moves backwards,
|
|
106
|
+
* the incoming item's setup runs before the outgoing item's teardown, and
|
|
107
|
+
* without the target guard that teardown would wipe the new target. When a
|
|
108
|
+
* modifier is reinstalled on the same element, its new claim lands before
|
|
109
|
+
* the old one's release, and without the count that release would wipe the
|
|
110
|
+
* live claim.
|
|
95
111
|
*/
|
|
96
112
|
release(element) {
|
|
97
113
|
if (this.#target !== element) {
|
|
98
114
|
return;
|
|
99
115
|
}
|
|
116
|
+
this.#claims -= 1;
|
|
117
|
+
if (this.#claims > 0) {
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
100
120
|
this.#observer?.unobserve(element);
|
|
101
121
|
this.#target = undefined;
|
|
102
122
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selection-indicator.js","sources":["../../src/utils/selection-indicator.ts"],"sourcesContent":["import { modifier } from 'ember-modifier';\nimport { deferredWork } from './deferred-work';\n\nconst READY_ATTRIBUTE = 'data-fr-si-ready';\n\n/**\n * Measures whichever element is currently selected and publishes its geometry\n * on the container as CSS custom properties. It never paints anything: the\n * theme decides whether that geometry becomes a full pill or a bar pinned to\n * one edge, which is what lets one primitive serve a segmented control and\n * tabs alike.\n *\n * Offsets are physical (`offsetLeft` / `offsetTop`), not logical, and that is\n * deliberate. The browser has already laid the items out for the container's\n * direction, so a physical offset fed to `translate` is correct in both LTR\n * and RTL. Reaching for `inset-inline-start` here would flip an already\n * flipped value.\n */\nclass SelectionIndicator {\n #container?: HTMLElement;\n #target?: HTMLElement;\n #observer?: ResizeObserver;\n #ready = deferredWork('@frontile/utils:selection-indicator:ready');\n #remeasure = deferredWork('@frontile/utils:selection-indicator:remeasure');\n #resize = deferredWork('@frontile/utils:selection-indicator:resize');\n #isReady = false;\n\n // Whether a real measurement has ever landed. Only the very first one is\n // forced-layout-sensitive (see `setupContainer`); once it has happened, a\n // click that moves the selection is no longer racing an ancestor's own\n // mount-time transition, so there is no reason to defer those.\n #hasMeasuredOnce = false;\n\n /**\n * Modifier to place on the container element. Observes its size and, once\n * a target is selected, publishes that target's geometry as CSS custom\n * properties on this element.\n */\n setupContainer = modifier((element: HTMLElement) => {\n this.#container = element;\n // Coalesced to one measurement per frame: the container and the target are\n // both observed, and resizing the container usually resizes the target too,\n // so a single layout change delivers two entries. Measuring reads layout\n // and then writes four custom properties, and a window drag fires this\n // continuously.\n this.#observer = new ResizeObserver(() =>\n this.#resize.schedule(() => this.#measure())\n );\n this.#observer.observe(element);\n\n if (this.#target) {\n this.#observer.observe(this.#target);\n }\n\n // Before the first real measurement, this call is happening during the\n // control's own initial mount -- the same render pass that can be\n // mounting an ancestor overlay's enter transition. Forcing layout here\n // lands at an arbitrary point in `ember-css-transitions`' own\n // reflow-then-swap sequence for that transition, which is enough to make\n // the browser skip it entirely. `ResizeObserver.observe()` above already\n // guarantees an initial, asynchronous notification for `element` (and for\n // the target, if already claimed), so leaving it to that -- deferred\n // through `#resize` like any other resize -- gets the same measurement\n // without the synchronous reflow. Once a first measurement has actually\n // landed, later remounts of this same container are no longer racing\n // anything, so measure immediately as before.\n if (this.#hasMeasuredOnce) {\n this.#measure();\n }\n\n return (): void => {\n this.#shutDown();\n };\n });\n\n /**\n * Claims `element` as the measured target. Exposed alongside `setupTarget`\n * so a consumer composing its own modifier -- a navigation bar that also has\n * to write `aria-current` -- can delegate here rather than reimplement the\n * handover rules below.\n *\n * Measures synchronously once a first measurement has already landed --\n * see `setupContainer` -- so a click that moves the selection updates the\n * indicator immediately rather than a frame later.\n */\n claim(element: HTMLElement): void {\n this.#target = element;\n this.#observer?.observe(element);\n if (this.#hasMeasuredOnce) {\n this.#measure();\n }\n }\n\n /**\n * Releases `element` if it is still the target. When selection moves\n * backwards, the incoming item's setup runs before the outgoing item's\n * teardown, and without this guard that teardown would wipe the new\n * target.\n */\n release(element: HTMLElement): void {\n if (this.#target !== element) {\n return;\n }\n this.#observer?.unobserve(element);\n this.#target = undefined;\n\n // Do not re-measure synchronously. When selection moves forwards the\n // order is reversed -- ember-modifier tears down before re-running\n // setup, and Glimmer revalidates in tree order -- so the outgoing\n // teardown lands first and the incoming target is still moments away\n // in this same render. Measuring now would strip the ready attribute,\n // and the theme gates both opacity and the transition on it, so the\n // indicator would blink out and jump to its new position instead of\n // sliding. Defer instead, and only fall through to the not-ready path\n // if nothing has claimed the target by then.\n this.#scheduleRemeasure();\n }\n\n /**\n * Modifier to place on each candidate target element, passing whether it\n * is currently selected as the sole positional argument. Only the\n * currently-selected target's geometry is measured and published.\n */\n setupTarget = modifier((element: HTMLElement, [isSelected]: [boolean]) => {\n if (isSelected) {\n this.claim(element);\n }\n\n return (): void => {\n this.release(element);\n };\n });\n\n /**\n * Recomputes and republishes the current target's geometry. Called\n * automatically on setup, selection change, and container/target resize;\n * exposed for callers that need to force a recomputation.\n */\n #measure = (): void => {\n const container = this.#container;\n if (!container) {\n return;\n }\n\n const target = this.#target;\n if (!target) {\n this.#markNotReady();\n return;\n }\n\n const width = target.offsetWidth;\n const height = target.offsetHeight;\n\n // A control inside a hidden ancestor -- a closed drawer, an inactive tab\n // panel -- measures zero. Publishing that would collapse the indicator and,\n // worse, mark it ready, so the first real measurement once it is shown\n // would animate in from the container origin. Stay un-ready instead; the\n // ResizeObserver fires when it becomes visible.\n if (width === 0 && height === 0) {\n this.#markNotReady();\n return;\n }\n\n container.style.setProperty('--fr-si-x', `${target.offsetLeft}px`);\n container.style.setProperty('--fr-si-y', `${target.offsetTop}px`);\n container.style.setProperty('--fr-si-width', `${width}px`);\n container.style.setProperty('--fr-si-height', `${height}px`);\n\n this.#hasMeasuredOnce = true;\n\n if (!this.#isReady) {\n this.#isReady = true;\n this.#scheduleReady(container);\n }\n };\n\n /**\n * Everything the container modifier's destructor undoes. The target is not\n * reset here: it belongs to `setupTarget`, whose own destructor clears it.\n */\n #shutDown(): void {\n this.#observer?.disconnect();\n this.#observer = undefined;\n this.#ready.cancel();\n this.#remeasure.cancel();\n this.#resize.cancel();\n this.#container = undefined;\n this.#isReady = false;\n }\n\n #markNotReady(): void {\n this.#ready.cancel();\n this.#isReady = false;\n this.#container?.removeAttribute(READY_ATTRIBUTE);\n }\n\n // The ready flag is set a frame after the first real measurement so the\n // theme can hold transitions off until the indicator is already in place.\n #scheduleReady(container: HTMLElement): void {\n this.#ready.schedule(() => container.setAttribute(READY_ATTRIBUTE, ''));\n }\n\n // Re-measures once the current render has settled, so a target being handed\n // from one element to another is never observed mid-handover.\n #scheduleRemeasure(): void {\n this.#remeasure.schedule(() => {\n // A new target claimed the slot in the meantime and measured itself.\n if (this.#target) {\n return;\n }\n this.#measure();\n }, 'microtask');\n }\n}\n\n/**\n * Creates a selection indicator.\n *\n * Mirrors the shape of `ref` and `toggleState`: the class stays internal and\n * the public surface is this lowercase factory, since this is a utility rather\n * than a component.\n */\nfunction selectionIndicator(): SelectionIndicator {\n return new SelectionIndicator();\n}\n\nexport { selectionIndicator, READY_ATTRIBUTE };\nexport type { SelectionIndicator };\n"],"names":["READY_ATTRIBUTE","SelectionIndicator","deferredWork","setupContainer","modifier","element","ResizeObserver","schedule","observe","claim","release","unobserve","undefined","setupTarget","isSelected","#measure","container","target","width","offsetWidth","height","offsetHeight","style","setProperty","offsetLeft","offsetTop","#shutDown","disconnect","cancel","#markNotReady","removeAttribute","#scheduleReady","setAttribute","#scheduleRemeasure","selectionIndicator"],"mappings":";;;AAGA,MAAMA,eAAe,GAAG;;AAExB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,kBAAkB,CAAC;AACvB,EAAA,UAAU;AACV,EAAA,OAAO;AACP,EAAA,SAAS;AACT,EAAA,MAAM,GAAGC,YAAY,CAAC,2CAA2C,CAAC;AAClE,EAAA,UAAU,GAAGA,YAAY,CAAC,+CAA+C,CAAC;AAC1E,EAAA,OAAO,GAAGA,YAAY,CAAC,4CAA4C,CAAC;EACpE,QAAQ,GAAG,KAAK;;AAEhB;AACA;AACA;AACA;EACA,gBAAgB,GAAG,KAAK;;AAExB;AACF;AACA;AACA;AACA;AACEC,EAAAA,cAAc,GAAGC,QAAQ,CAAEC,OAAoB,IAAK;AAClD,IAAA,IAAI,CAAC,UAAU,GAAGA,OAAO;AACzB;AACA;AACA;AACA;AACA;IACA,IAAI,CAAC,SAAS,GAAG,IAAIC,c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BAAkBA,GAAuB;EAChD,OAAO,IAAIjC,kBAAkB,EAAE;AACjC;;"}
|
|
1
|
+
{"version":3,"file":"selection-indicator.js","sources":["../../src/utils/selection-indicator.ts"],"sourcesContent":["import { modifier } from 'ember-modifier';\nimport { deferredWork } from './deferred-work';\n\nconst READY_ATTRIBUTE = 'data-fr-si-ready';\n\n/**\n * Measures whichever element is currently selected and publishes its geometry\n * on the container as CSS custom properties. It never paints anything: the\n * theme decides whether that geometry becomes a full pill or a bar pinned to\n * one edge, which is what lets one primitive serve a segmented control and\n * tabs alike.\n *\n * Offsets are physical (`offsetLeft` / `offsetTop`), not logical, and that is\n * deliberate. The browser has already laid the items out for the container's\n * direction, so a physical offset fed to `translate` is correct in both LTR\n * and RTL. Reaching for `inset-inline-start` here would flip an already\n * flipped value.\n */\nclass SelectionIndicator {\n #container?: HTMLElement;\n #target?: HTMLElement;\n #observer?: ResizeObserver;\n #ready = deferredWork('@frontile/utils:selection-indicator:ready');\n #remeasure = deferredWork('@frontile/utils:selection-indicator:remeasure');\n #resize = deferredWork('@frontile/utils:selection-indicator:resize');\n #isReady = false;\n\n // How many live claims the current target holds. A modifier whose\n // definition changes -- its owner's context was rebuilt, say -- is\n // reinstalled rather than updated, and Glimmer installs the new instance\n // before destroying the old one. The same element is then claimed twice and\n // released once, and that one release must not take the target away from\n // the claim that is still live.\n #claims = 0;\n\n // Whether a real measurement has ever landed. Only the very first one is\n // forced-layout-sensitive (see `setupContainer`); once it has happened, a\n // click that moves the selection is no longer racing an ancestor's own\n // mount-time transition, so there is no reason to defer those.\n #hasMeasuredOnce = false;\n\n /**\n * Modifier to place on the container element. Observes its size and, once\n * a target is selected, publishes that target's geometry as CSS custom\n * properties on this element.\n */\n setupContainer = modifier((element: HTMLElement) => {\n this.#container = element;\n // Coalesced to one measurement per frame: the container and the target are\n // both observed, and resizing the container usually resizes the target too,\n // so a single layout change delivers two entries. Measuring reads layout\n // and then writes four custom properties, and a window drag fires this\n // continuously.\n this.#observer = new ResizeObserver(() =>\n this.#resize.schedule(() => this.#measure())\n );\n this.#observer.observe(element);\n\n if (this.#target) {\n this.#observer.observe(this.#target);\n }\n\n // Before the first real measurement, this call is happening during the\n // control's own initial mount -- the same render pass that can be\n // mounting an ancestor overlay's enter transition. Forcing layout here\n // lands at an arbitrary point in `ember-css-transitions`' own\n // reflow-then-swap sequence for that transition, which is enough to make\n // the browser skip it entirely. `ResizeObserver.observe()` above already\n // guarantees an initial, asynchronous notification for `element` (and for\n // the target, if already claimed), so leaving it to that -- deferred\n // through `#resize` like any other resize -- gets the same measurement\n // without the synchronous reflow. Once a first measurement has actually\n // landed, later remounts of this same container are no longer racing\n // anything, so measure immediately as before.\n if (this.#hasMeasuredOnce) {\n this.#measure();\n }\n\n return (): void => {\n this.#shutDown();\n };\n });\n\n /**\n * Claims `element` as the measured target. Exposed alongside `setupTarget`\n * so a consumer composing its own modifier -- a navigation bar that also has\n * to write `aria-current` -- can delegate here rather than reimplement the\n * handover rules below.\n *\n * Measures synchronously once a first measurement has already landed --\n * see `setupContainer` -- so a click that moves the selection updates the\n * indicator immediately rather than a frame later.\n */\n claim(element: HTMLElement): void {\n if (this.#target === element) {\n this.#claims += 1;\n } else {\n this.#target = element;\n this.#claims = 1;\n }\n this.#observer?.observe(element);\n if (this.#hasMeasuredOnce) {\n this.#measure();\n }\n }\n\n /**\n * Releases one claim on `element` if it is still the target, and gives the\n * target up once no claim on it is left. When selection moves backwards,\n * the incoming item's setup runs before the outgoing item's teardown, and\n * without the target guard that teardown would wipe the new target. When a\n * modifier is reinstalled on the same element, its new claim lands before\n * the old one's release, and without the count that release would wipe the\n * live claim.\n */\n release(element: HTMLElement): void {\n if (this.#target !== element) {\n return;\n }\n this.#claims -= 1;\n if (this.#claims > 0) {\n return;\n }\n this.#observer?.unobserve(element);\n this.#target = undefined;\n\n // Do not re-measure synchronously. When selection moves forwards the\n // order is reversed -- ember-modifier tears down before re-running\n // setup, and Glimmer revalidates in tree order -- so the outgoing\n // teardown lands first and the incoming target is still moments away\n // in this same render. Measuring now would strip the ready attribute,\n // and the theme gates both opacity and the transition on it, so the\n // indicator would blink out and jump to its new position instead of\n // sliding. Defer instead, and only fall through to the not-ready path\n // if nothing has claimed the target by then.\n this.#scheduleRemeasure();\n }\n\n /**\n * Modifier to place on each candidate target element, passing whether it\n * is currently selected as the sole positional argument. Only the\n * currently-selected target's geometry is measured and published.\n */\n setupTarget = modifier((element: HTMLElement, [isSelected]: [boolean]) => {\n if (isSelected) {\n this.claim(element);\n }\n\n return (): void => {\n this.release(element);\n };\n });\n\n /**\n * Recomputes and republishes the current target's geometry. Called\n * automatically on setup, selection change, and container/target resize;\n * exposed for callers that need to force a recomputation.\n */\n #measure = (): void => {\n const container = this.#container;\n if (!container) {\n return;\n }\n\n const target = this.#target;\n if (!target) {\n this.#markNotReady();\n return;\n }\n\n const width = target.offsetWidth;\n const height = target.offsetHeight;\n\n // A control inside a hidden ancestor -- a closed drawer, an inactive tab\n // panel -- measures zero. Publishing that would collapse the indicator and,\n // worse, mark it ready, so the first real measurement once it is shown\n // would animate in from the container origin. Stay un-ready instead; the\n // ResizeObserver fires when it becomes visible.\n if (width === 0 && height === 0) {\n this.#markNotReady();\n return;\n }\n\n container.style.setProperty('--fr-si-x', `${target.offsetLeft}px`);\n container.style.setProperty('--fr-si-y', `${target.offsetTop}px`);\n container.style.setProperty('--fr-si-width', `${width}px`);\n container.style.setProperty('--fr-si-height', `${height}px`);\n\n this.#hasMeasuredOnce = true;\n\n if (!this.#isReady) {\n this.#isReady = true;\n this.#scheduleReady(container);\n }\n };\n\n /**\n * Everything the container modifier's destructor undoes. The target is not\n * reset here: it belongs to `setupTarget`, whose own destructor clears it.\n */\n #shutDown(): void {\n this.#observer?.disconnect();\n this.#observer = undefined;\n this.#ready.cancel();\n this.#remeasure.cancel();\n this.#resize.cancel();\n this.#container = undefined;\n this.#isReady = false;\n }\n\n #markNotReady(): void {\n this.#ready.cancel();\n this.#isReady = false;\n this.#container?.removeAttribute(READY_ATTRIBUTE);\n }\n\n // The ready flag is set a frame after the first real measurement so the\n // theme can hold transitions off until the indicator is already in place.\n #scheduleReady(container: HTMLElement): void {\n this.#ready.schedule(() => container.setAttribute(READY_ATTRIBUTE, ''));\n }\n\n // Re-measures once the current render has settled, so a target being handed\n // from one element to another is never observed mid-handover.\n #scheduleRemeasure(): void {\n this.#remeasure.schedule(() => {\n // A new target claimed the slot in the meantime and measured itself.\n if (this.#target) {\n return;\n }\n this.#measure();\n }, 'microtask');\n }\n}\n\n/**\n * Creates a selection indicator.\n *\n * Mirrors the shape of `ref` and `toggleState`: the class stays internal and\n * the public surface is this lowercase factory, since this is a utility rather\n * than a component.\n */\nfunction selectionIndicator(): SelectionIndicator {\n return new SelectionIndicator();\n}\n\nexport { selectionIndicator, READY_ATTRIBUTE };\nexport type { SelectionIndicator };\n"],"names":["READY_ATTRIBUTE","SelectionIndicator","deferredWork","setupContainer","modifier","element","ResizeObserver","schedule","observe","claim","release","unobserve","undefined","setupTarget","isSelected","#measure","container","target","width","offsetWidth","height","offsetHeight","style","setProperty","offsetLeft","offsetTop","#shutDown","disconnect","cancel","#markNotReady","removeAttribute","#scheduleReady","setAttribute","#scheduleRemeasure","selectionIndicator"],"mappings":";;;AAGA,MAAMA,eAAe,GAAG;;AAExB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,kBAAkB,CAAC;AACvB,EAAA,UAAU;AACV,EAAA,OAAO;AACP,EAAA,SAAS;AACT,EAAA,MAAM,GAAGC,YAAY,CAAC,2CAA2C,CAAC;AAClE,EAAA,UAAU,GAAGA,YAAY,CAAC,+CAA+C,CAAC;AAC1E,EAAA,OAAO,GAAGA,YAAY,CAAC,4CAA4C,CAAC;EACpE,QAAQ,GAAG,KAAK;;AAEhB;AACA;AACA;AACA;AACA;AACA;EACA,OAAO,GAAG,CAAC;;AAEX;AACA;AACA;AACA;EACA,gBAAgB,GAAG,KAAK;;AAExB;AACF;AACA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nD,EAAA;;AAEA;AACA;EACA,cAAc+B,CAACf,SAAsB,EAAQ;AAC3C,IAAA,IAAI,CAAC,MAAM,CAACT,QAAQ,CAAC,MAAMS,SAAS,CAACgB,YAAY,CAAChC,eAAe,EAAE,EAAE,CAAC,CAAC;AACzE,EAAA;;AAEA;AACA;EACA,kBAAkBiC,GAAS;AACzB,IAAA,IAAI,CAAC,UAAU,CAAC1B,QAAQ,CAAC,MAAM;AAC7B;AACA,MAAA,IAAI,IAAI,CAAC,OAAO,EAAE;AAChB,QAAA;AACF,MAAA;AACA,MAAA,IAAI,CAAC,QAAQ,EAAE;IACjB,CAAC,EAAE,WAAW,CAAC;AACjB,EAAA;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS2B,kBAAkBA,GAAuB;EAChD,OAAO,IAAIjC,kBAAkB,EAAE;AACjC;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "frontile",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.7",
|
|
4
4
|
"description": "Component Library for Ember Octane apps",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ember-addon",
|
|
@@ -46,6 +46,10 @@
|
|
|
46
46
|
"types": "./declarations/navigation.d.ts",
|
|
47
47
|
"default": "./dist/navigation.js"
|
|
48
48
|
},
|
|
49
|
+
"./layout": {
|
|
50
|
+
"types": "./declarations/layout.d.ts",
|
|
51
|
+
"default": "./dist/layout.js"
|
|
52
|
+
},
|
|
49
53
|
"./disclosure": {
|
|
50
54
|
"types": "./declarations/disclosure.d.ts",
|
|
51
55
|
"default": "./dist/disclosure.js"
|
|
@@ -94,7 +98,7 @@
|
|
|
94
98
|
"@embroider/addon-shim": "^1.10.3",
|
|
95
99
|
"@embroider/macros": "^1.21.1",
|
|
96
100
|
"@floating-ui/dom": "^1.8.0",
|
|
97
|
-
"@frontile/theme": "^0.18.
|
|
101
|
+
"@frontile/theme": "^0.18.7",
|
|
98
102
|
"@glint/template": "^1.9.0",
|
|
99
103
|
"@universal-ember/table": "^4.0.0",
|
|
100
104
|
"date-fns": "^4.4.0",
|
|
@@ -152,5 +156,5 @@
|
|
|
152
156
|
"./services/notifications.js": "./dist/_app_/services/notifications.js"
|
|
153
157
|
}
|
|
154
158
|
},
|
|
155
|
-
"gitHead": "
|
|
159
|
+
"gitHead": "52f863c615e105f8124a80abd19ae813ee16a673"
|
|
156
160
|
}
|