@warp-drive/ember 5.6.0-alpha.3 → 5.6.0-alpha.5

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/dist/index.js CHANGED
@@ -7,11 +7,6 @@ export { getPromiseState, getRequestState } from '@ember-data/store/-private';
7
7
  import { EnableHydration } from '@warp-drive/core-types/request';
8
8
  import { precompileTemplate } from '@ember/template-compilation';
9
9
  import { setComponentTemplate } from '@ember/component';
10
-
11
- /**
12
- * @module @warp-drive/ember
13
- */
14
-
15
10
  const and = (x, y) => Boolean(x && y);
16
11
  /**
17
12
  * The `<Throw />` component is used to throw an error in a template.
@@ -159,11 +154,6 @@ function initializeDeferredDecorator(target, prop) {
159
154
  });
160
155
  }
161
156
  }
162
-
163
- /**
164
- * @module @warp-drive/ember
165
- */
166
-
167
157
  function notNull(x) {
168
158
  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {
169
159
  if (!test) {
@@ -478,41 +468,32 @@ class Request extends Component {
478
468
  *
479
469
  * @internal
480
470
  */
481
- unavailableStart;
482
- intervalStart;
483
- nextInterval;
484
- invalidated;
485
- isUpdating;
471
+
486
472
  /**
487
473
  * The event listener for network status changes,
488
474
  * cached to use the reference for removal.
489
475
  *
490
476
  * @internal
491
477
  */
492
- onlineChanged;
493
478
  /**
494
479
  * The event listener for visibility status changes,
495
480
  * cached to use the reference for removal.
496
481
  *
497
482
  * @internal
498
483
  */
499
- backgroundChanged;
500
484
  /**
501
485
  * The last request passed as an arg to the component,
502
486
  * cached for comparison.
503
487
  *
504
488
  * @internal
505
489
  */
506
- _originalRequest;
507
490
  /**
508
491
  * The last query passed as an arg to the component,
509
492
  * cached for comparison.
510
493
  *
511
494
  * @internal
512
495
  */
513
- _originalQuery;
514
- _subscription;
515
- _subscribedTo;
496
+
516
497
  constructor(owner, args) {
517
498
  super(owner, args);
518
499
  this._subscribedTo = null;
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../src/-private/await.gts","../../../node_modules/.pnpm/decorat_bfe8edbefc8aced6f61ce140cd72ecf2/node_modules/decorator-transforms/dist/runtime-BPCpkOf1.js","../src/-private/request.gts"],"sourcesContent":["/**\n * @module @warp-drive/ember\n */\nimport type Owner from '@ember/owner';\nimport Component from '@glimmer/component';\n\nimport type { Awaitable } from '@ember-data/request';\nimport { getPromiseState } from '@ember-data/store/-private';\n\nexport const and = (x: unknown, y: unknown) => Boolean(x && y);\ninterface ThrowSignature<E = Error | string | object> {\n Args: {\n error: E;\n };\n}\n\n/**\n * The `<Throw />` component is used to throw an error in a template.\n *\n * That's all it does. So don't use it unless the application should\n * throw an error if it reaches this point in the template.\n *\n * ```hbs\n * <Throw @error={{anError}} />\n * ```\n *\n * @class <Throw />\n * @public\n */\nexport class Throw<T> extends Component<ThrowSignature<T>> {\n constructor(owner: Owner, args: ThrowSignature<T>['Args']) {\n super(owner, args);\n // this error is opaque (user supplied) so we don't validate it\n // as an Error instance.\n // eslint-disable-next-line @typescript-eslint/no-throw-literal\n throw this.args.error;\n }\n <template></template>\n}\n\ninterface AwaitSignature<T, E = Error | string | object> {\n Args: {\n promise: Promise<T> | Awaitable<T, E>;\n };\n Blocks: {\n pending: [];\n error: [error: E];\n success: [value: T];\n };\n}\n\n/**\n * The <Await /> component allow you to utilize reactive control flow\n * for asynchronous states in your application.\n *\n * Await is ideal for handling \"boundaries\", outside which some state is\n * still allowed to be unresolved and within which it MUST be resolved.\n *\n * ```gjs\n * import { Await } from '@warp-drive/ember';\n *\n * <template>\n * <Await @promise={{@request}}>\n * <:pending>\n * <Spinner />\n * </:pending>\n *\n * <:error as |error|>\n * <ErrorForm @error={{error}} />\n * </:error>\n *\n * <:success as |result|>\n * <h1>{{result.title}}</h1>\n * </:success>\n * </Await>\n * </template>\n * ```\n *\n * The <Await /> component requires that error states are properly handled.\n *\n * If no error block is provided and the promise rejects, the error will\n * be thrown.\n *\n * @class <Await />\n * @public\n */\nexport class Await<T, E> extends Component<AwaitSignature<T, E>> {\n get state() {\n return getPromiseState<T, E>(this.args.promise);\n }\n\n get error() {\n return this.state.error as E;\n }\n\n get result() {\n return this.state.result as T;\n }\n\n <template>\n {{#if this.state.isPending}}\n {{yield to=\"pending\"}}\n {{else if (and this.state.isError (has-block \"error\"))}}\n {{yield this.error to=\"error\"}}\n {{else if this.state.isSuccess}}\n {{yield this.result to=\"success\"}}\n {{else}}\n <Throw @error={{this.error}} />\n {{/if}}\n </template>\n}\n","const deferred = /* @__PURE__ */ new WeakMap();\nfunction deferDecorator(proto, prop, desc) {\n let map = deferred.get(proto);\n if (!map) {\n map = /* @__PURE__ */ new Map();\n deferred.set(proto, map);\n }\n map.set(prop, desc);\n}\nfunction findDeferredDecorator(target, prop) {\n var _a;\n let cursor = target.prototype;\n while (cursor) {\n let desc = (_a = deferred.get(cursor)) == null ? void 0 : _a.get(prop);\n if (desc) {\n return desc;\n }\n cursor = cursor.prototype;\n }\n}\nfunction decorateFieldV1(target, prop, decorators, initializer) {\n return decorateFieldV2(target.prototype, prop, decorators, initializer);\n}\nfunction decorateFieldV2(prototype, prop, decorators, initializer) {\n let desc = {\n configurable: true,\n enumerable: true,\n writable: true,\n initializer: null\n };\n if (initializer) {\n desc.initializer = initializer;\n }\n for (let decorator of decorators) {\n desc = decorator(prototype, prop, desc) || desc;\n }\n if (desc.initializer === void 0) {\n Object.defineProperty(prototype, prop, desc);\n } else {\n deferDecorator(prototype, prop, desc);\n }\n}\nfunction decorateMethodV1({ prototype }, prop, decorators) {\n return decorateMethodV2(prototype, prop, decorators);\n}\nfunction decorateMethodV2(prototype, prop, decorators) {\n const origDesc = Object.getOwnPropertyDescriptor(prototype, prop);\n let desc = { ...origDesc };\n for (let decorator of decorators) {\n desc = decorator(prototype, prop, desc) || desc;\n }\n if (desc.initializer !== void 0) {\n desc.value = desc.initializer ? desc.initializer.call(prototype) : void 0;\n desc.initializer = void 0;\n }\n Object.defineProperty(prototype, prop, desc);\n}\nfunction initializeDeferredDecorator(target, prop) {\n let desc = findDeferredDecorator(target.constructor, prop);\n if (desc) {\n Object.defineProperty(target, prop, {\n enumerable: desc.enumerable,\n configurable: desc.configurable,\n writable: desc.writable,\n value: desc.initializer ? desc.initializer.call(target) : void 0\n });\n }\n}\nfunction decorateClass(target, decorators) {\n return decorators.reduce(\n (accum, decorator) => decorator(accum) || accum,\n target\n );\n}\nfunction decoratePOJO(pojo, decorated) {\n for (let [type, prop, decorators] of decorated) {\n if (type === \"field\") {\n decoratePojoField(pojo, prop, decorators);\n } else {\n decorateMethodV2(pojo, prop, decorators);\n }\n }\n return pojo;\n}\nfunction decoratePojoField(pojo, prop, decorators) {\n let desc = {\n configurable: true,\n enumerable: true,\n writable: true,\n initializer: () => {\n var _a;\n return (_a = Object.getOwnPropertyDescriptor(pojo, prop)) == null ? void 0 : _a.value;\n }\n };\n for (let decorator of decorators) {\n desc = decorator(pojo, prop, desc) || desc;\n }\n if (desc.initializer) {\n desc.value = desc.initializer.call(pojo);\n delete desc.initializer;\n }\n Object.defineProperty(pojo, prop, desc);\n}\nconst runtime = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({\n __proto__: null,\n c: decorateClass,\n f: decorateFieldV1,\n g: decorateFieldV2,\n i: initializeDeferredDecorator,\n m: decorateMethodV1,\n n: decorateMethodV2,\n p: decoratePOJO\n}, Symbol.toStringTag, { value: \"Module\" }));\nexport {\n decorateFieldV2 as a,\n decorateMethodV1 as b,\n decorateMethodV2 as c,\n decorateFieldV1 as d,\n decorateClass as e,\n decoratePOJO as f,\n initializeDeferredDecorator as i,\n runtime as r\n};\n//# sourceMappingURL=runtime-BPCpkOf1.js.map\n","/**\n * @module @warp-drive/ember\n */\nimport type Owner from '@ember/owner';\nimport { service } from '@ember/service';\nimport Component from '@glimmer/component';\nimport { cached, tracked } from '@glimmer/tracking';\n\nimport { importSync, macroCondition, moduleExists } from '@embroider/macros';\n\nimport type { Future, StructuredErrorDocument } from '@ember-data/request';\nimport type { StoreRequestInput } from '@ember-data/store';\nimport type Store from '@ember-data/store';\nimport type { RequestLoadingState, RequestState } from '@ember-data/store/-private';\nimport { getRequestState } from '@ember-data/store/-private';\nimport { assert } from '@warp-drive/build-config/macros';\nimport type { StableDocumentIdentifier } from '@warp-drive/core-types/identifier.js';\nimport { EnableHydration, withBrand, type RequestInfo } from '@warp-drive/core-types/request';\n\nimport { and, Throw } from './await.gts';\n\nfunction notNull(x: null): never;\nfunction notNull<T>(x: T): Exclude<T, null>;\nfunction notNull<T>(x: T | null) {\n assert('Expected a non-null value, but got null', x !== null);\n return x;\n}\n\nconst not = (x: unknown) => !x;\n// default to 30 seconds unavailable before we refresh\nconst DEFAULT_DEADLINE = 30_000;\nconst IdleBlockMissingError = new Error(\n 'No idle block provided for <Request> component, and no query or request was provided.'\n);\n\nlet consume = service;\nif (macroCondition(moduleExists('ember-provide-consume-context'))) {\n const { consume: contextConsume } = importSync('ember-provide-consume-context') as { consume: typeof service };\n consume = contextConsume;\n}\n\nfunction isNeverString(val: never): string {\n return val;\n}\n\ntype AutorefreshBehaviorType = 'online' | 'interval' | 'invalid';\ntype AutorefreshBehaviorCombos =\n | boolean\n | AutorefreshBehaviorType\n | `${AutorefreshBehaviorType},${AutorefreshBehaviorType}`\n | `${AutorefreshBehaviorType},${AutorefreshBehaviorType},${AutorefreshBehaviorType}`;\n\ntype ContentFeatures<RT> = {\n isOnline: boolean;\n isHidden: boolean;\n isRefreshing: boolean;\n refresh: () => Promise<void>;\n reload: () => Promise<void>;\n abort?: () => void;\n latestRequest?: Future<RT>;\n};\n\ninterface RequestSignature<RT, T, E> {\n Args: {\n /**\n * The request to monitor. This should be a `Future` instance returned\n * by either the `store.request` or `store.requestManager.request` methods.\n *\n * @typedoc\n */\n request?: Future<RT>;\n\n /**\n * A query to use for the request. This should be an object that can be\n * passed to `store.request`. Use this in place of `@request` if you would\n * like the component to also initiate the request.\n *\n * @typedoc\n */\n query?: StoreRequestInput<RT, T>;\n\n /**\n * The store instance to use for making requests. If contexts are available,\n * the component will default to using the `store` on the context.\n *\n * This is required if the store is not available via context or should be\n * different from the store provided via context.\n *\n * @typedoc\n */\n store?: Store;\n\n /**\n * The autorefresh behavior for the request. This can be a boolean, or any\n * combination of the following values: `'online'`, `'interval'`, `'invalid'`.\n *\n * - `'online'`: Refresh the request when the browser comes back online\n * - `'interval'`: Refresh the request at a specified interval\n * - `'invalid'`: Refresh the request when the store emits an invalidation\n *\n * If `true`, this is equivalent to `'online,invalid'`.\n *\n * Defaults to `false`.\n *\n * @typedoc\n */\n autorefresh?: AutorefreshBehaviorCombos;\n\n /**\n * The number of milliseconds to wait before refreshing the request when the\n * browser comes back online or the network becomes available.\n *\n * This also controls the interval at which the request will be refreshed if\n * the `interval` autorefresh type is enabled.\n *\n * Defaults to `30_000` (30 seconds).\n *\n * @typedoc\n */\n autorefreshThreshold?: number;\n\n /**\n * The behavior of the request initiated by autorefresh. This can be one of\n * the following values:\n *\n * - `'refresh'`: Refresh the request in the background\n * - `'reload'`: Force a reload of the request\n * - `'policy'` (**default**): Let the store's configured CachePolicy decide whether to\n * reload, refresh, or do nothing.\n *\n * Defaults to `'policy'`.\n *\n * @typedoc\n */\n autorefreshBehavior?: 'refresh' | 'reload' | 'policy';\n };\n Blocks: {\n /**\n * The block to render when the component is idle and waiting to be given a request.\n *\n * @typedoc\n */\n idle: [];\n\n /**\n * The block to render when the request is loading.\n *\n * @typedoc\n */\n loading: [state: RequestLoadingState];\n\n /**\n * The block to render when the request was cancelled.\n *\n * @typedoc\n */\n cancelled: [\n error: StructuredErrorDocument<E>,\n features: { isOnline: boolean; isHidden: boolean; retry: () => Promise<void> },\n ];\n\n /**\n * The block to render when the request failed. If this block is not provided,\n * the error will be rethrown.\n *\n * Thus it is required to provide an error block and proper error handling if\n * you do not want the error to crash the application.\n *\n * @typedoc\n */\n error: [\n error: StructuredErrorDocument<E>,\n features: { isOnline: boolean; isHidden: boolean; retry: () => Promise<void> },\n ];\n\n /**\n * The block to render when the request succeeded.\n *\n * @typedoc\n */\n content: [value: RT, features: ContentFeatures<RT>];\n always: [state: RequestState<RT, T, StructuredErrorDocument<E>>];\n };\n}\n\n/**\n * The `<Request />` component is a powerful tool for managing data fetching and\n * state in your Ember application. It provides a declarative approach to reactive\n * control-flow for managing requests and state in your application.\n *\n * The `<Request />` component is ideal for handling \"boundaries\", outside which some\n * state is still allowed to be unresolved and within which it MUST be resolved.\n *\n * ## Request States\n *\n * `<Request />` has five states, only one of which will be active and rendered at a time.\n *\n * - `idle`: The component is waiting to be given a request to monitor\n * - `loading`: The request is in progress\n * - `error`: The request failed\n * - `content`: The request succeeded\n * - `cancelled`: The request was cancelled\n *\n * Additionally, the `content` state has a `refresh` method that can be used to\n * refresh the request in the background, which is available as a sub-state of\n * the `content` state.\n *\n * As with the `<Await />` component, if no error block is provided and the request\n * rejects, the error will be thrown. Cancellation errors are swallowed instead of\n * rethrown if no error block or cancellation block is present.\n *\n * ```gts\n * import { Request } from '@warp-drive/ember';\n *\n * <template>\n * <Request @request={{@request}}>\n * <:loading as |state|>\n * <Spinner @percentDone={{state.completedRatio}} />\n * <button {{on \"click\" state.abort}}>Cancel</button>\n * </:loading>\n *\n * <:error as |error state|>\n * <ErrorForm @error={{error}} />\n * <button {{on \"click\" state.retry}}>Retry</button>\n * </:error>\n *\n * <:content as |data state|>\n * <h1>{{data.title}}</h1>\n * {{#if state.isBackgroundReloading}}\n * <SmallSpinner />\n * <button {{on \"click\" state.abort}}>Cancel</button>\n * {{else}}\n * <button {{on \"click\" state.refresh}}>Refresh</button>\n * {{/if}}\n * </:content>\n *\n * <:cancelled as |error state|>\n * <h2>The Request was cancelled</h2>\n * <button {{on \"click\" state.retry}}>Retry</button>\n * </:cancelled>\n *\n * <:idle>\n * <button {{on \"click\" @kickOffRequest}}>Load Preview?</button>\n * </:idle>\n *\n * </Request>\n * </template>\n * ```\n *\n * ## Streaming Data\n *\n * The loading state exposes the download `ReadableStream` instance for consumption\n *\n * ```gjs\n * import { Request } from '@warp-drive/ember';\n *\n * <template>\n * <Request @request={{@request}}>\n * <:loading as |state|>\n * <Video @stream={{state.stream}} />\n * </:loading>\n *\n * <:error as |error|>\n * <ErrorForm @error={{error}} />\n * </:error>\n * </Request>\n * </template>\n * ```\n *\n * ## Retry\n *\n * Cancelled and error'd requests may be retried by calling the `retry` method.\n *\n * Retry will restart the state progression, using the loading, error, cancelled,\n * and content blocks as appropriate.\n *\n * ## Reloading\n *\n * The `reload` method will force the request to be fully re-executed, bypassing\n * cache and restarting the state progression through the loading, error, and\n * content blocks as appropriate.\n *\n * Background reload (refresh) is a special substate of the content state that\n * allows you to refresh the request in the background. This is useful for when\n * you want to update the data in the background without blocking the UI.\n *\n * Reload and refresh are available as methods on the `content` state.\n *\n * ```gjs\n * import { Request } from '@warp-drive/ember';\n *\n * <template>\n * <Request @request={{@request}}>\n * <:content as |data state|>\n * <h1>{{data.title}}</h1>\n * {{#if state.isBackgroundReloading}}\n * <SmallSpinner />\n * <button {{on \"click\" state.abort}}>Cancel</button>\n * {{/if}}\n *\n * <button {{on \"click\" state.refresh}}>Refresh</button>\n * <button {{on \"click\" state.reload}}>Reload</button>\n * </:content>\n * </Request>\n * </template>\n * ```\n *\n * ## Advanced Reloading\n *\n * We can nest our usage of `<Request />` to handle more advanced\n * reloading scenarios.\n *\n * ```gjs\n * import { Request } from '@warp-drive/ember';\n *\n * <template>\n * <Request @request={{@request}}>\n * <:cancelled>\n * <h2>The Request Cancelled</h2>\n * </:cancelled>\n *\n * <:error as |error|>\n * <ErrorForm @error={{error}} />\n * </:error>\n *\n * <:content as |result state|>\n * <Request @request={{state.latestRequest}}>\n * <!-- Handle Background Request -->\n * </Request>\n *\n * <h1>{{result.title}}</h1>\n *\n * <button {{on \"click\" state.refresh}}>Refresh</button>\n * </:content>\n * </Request>\n * </template>\n * ```\n *\n * ## Autorefresh\n *\n * `<Request />` supports automatic refresh and reload under certain conditions.\n *\n * - `online`: This occurs when a browser window or tab comes back to the foreground\n * after being backgrounded or when the network reports as being online after\n * having been offline.\n * - `interval`: This occurs when a specified amount of time has passed.\n * - `invalid`: This occurs when the store emits a notification that the request\n * has become invalid.\n *\n * You can specify when autorefresh should occur by setting the `autorefresh` arg\n * to `true` or a comma-separated list of the above values.\n *\n * A value of `true` is equivalent to `'online,invalid'`.\n *\n * By default, an autorefresh will only occur if the browser was backgrounded or\n * offline for more than 30s before coming back available. This amount of time can\n * be tweaked by setting the number of milliseconds via `@autorefreshThreshold`.\n *\n * This arg also controls the interval at which the request will be refreshed\n * if the `interval` autorefresh type is enabled.\n *\n * Finally, the behavior of the request initiated by autorefresh can be adjusted\n * by setting the `autorefreshBehavior` arg to `'refresh'`, `'reload'`, or `'policy'`.\n *\n * - `'refresh'`: Refresh the request in the background\n * - `'reload'`: Force a reload of the request\n * - `'policy'` (**default**): Let the store's configured CachePolicy decide whether to\n * reload, refresh, or do nothing.\n *\n * More advanced refresh and reload behaviors can be created by passing the reload and\n * refresh actions into another component. For instance, refresh could be set up on a\n * timer or on a websocket subscription.\n *\n *\n * ```gjs\n * import { Request } from '@warp-drive/ember';\n *\n * <template>\n * <Request @request={{@request}}>\n * <:content as |result state|>\n * <h1>{{result.title}}</h1>\n *\n * <Interval @period={{30_000}} @fn={{state.refresh}} />\n * <Subscribe @channel={{@someValue}} @fn={{state.refresh}} />\n * </:content>\n * </Request>\n * </template>\n * ```\n *\n * If a matching request is refreshed or reloaded by any other component,\n * the `Request` component will react accordingly.\n *\n * ## Deduping\n *\n * The store dedupes requests by identity. If a request is made for the same identity\n * from multiple `<Request />` components, even if the request is not referentially the\n * same, only one actual request will be made.\n *\n *\n * @class <Request />\n * @public\n */\nexport class Request<RT, T, E> extends Component<RequestSignature<RT, T, E>> {\n /**\n * The store instance to use for making requests. If contexts are available, this\n * will be the `store` on the context, else it will be the store service.\n *\n * @internal\n */\n @consume('store') declare _store: Store;\n\n /**\n * Whether the browser reports that the network is online.\n *\n * @internal\n */\n @tracked isOnline = true;\n\n /**\n * Whether the browser reports that the tab is hidden.\n *\n * @internal\n */\n @tracked isHidden = true;\n\n /**\n * Whether the component is currently refreshing the request.\n *\n * @internal\n */\n @tracked isRefreshing = false;\n\n /**\n * The most recent blocking request that was made, typically\n * the result of a reload.\n *\n * This will never be the original request passed as an arg to\n * the component.\n *\n * @internal\n */\n @tracked _localRequest: Future<RT> | undefined;\n\n /**\n * The most recent request that was made, typically due to either a\n * reload or a refresh.\n *\n * This will never be the original request passed as an arg to\n * the component.\n *\n * @internal\n */\n @tracked _latestRequest: Future<RT> | undefined;\n\n /**\n * The time at which the network was reported as offline.\n *\n * @internal\n */\n declare unavailableStart: number | null;\n declare intervalStart: number | null;\n declare nextInterval: number | null;\n declare invalidated: boolean;\n declare isUpdating: boolean;\n\n /**\n * The event listener for network status changes,\n * cached to use the reference for removal.\n *\n * @internal\n */\n declare onlineChanged: (event: Event) => void;\n\n /**\n * The event listener for visibility status changes,\n * cached to use the reference for removal.\n *\n * @internal\n */\n declare backgroundChanged: (event: Event) => void;\n\n /**\n * The last request passed as an arg to the component,\n * cached for comparison.\n *\n * @internal\n */\n declare _originalRequest: Future<RT> | undefined;\n\n /**\n * The last query passed as an arg to the component,\n * cached for comparison.\n *\n * @internal\n */\n declare _originalQuery: StoreRequestInput<RT, T> | undefined;\n\n declare _subscription: object | null;\n declare _subscribedTo: object | null;\n\n constructor(owner: Owner, args: RequestSignature<RT, T, E>['Args']) {\n super(owner, args);\n this._subscribedTo = null;\n this._subscription = null;\n this.intervalStart = null;\n this.invalidated = false;\n this.nextInterval = null;\n\n this.installListeners();\n void this.beginPolling();\n }\n\n async beginPolling() {\n // await the initial request\n try {\n await this.request;\n } catch {\n // ignore errors here, we just want to wait for the request to finish\n } finally {\n if (!this.isDestroyed) {\n void this.scheduleInterval();\n }\n }\n }\n\n @cached\n get isIdle() {\n const { request, query } = this.args;\n\n return Boolean(!request && !query);\n }\n\n @cached\n get autorefreshTypes(): Set<AutorefreshBehaviorType> {\n const { autorefresh } = this.args;\n let types: AutorefreshBehaviorType[];\n\n if (autorefresh === true) {\n types = ['online', 'invalid'];\n } else if (typeof autorefresh === 'string') {\n types = autorefresh.split(',') as AutorefreshBehaviorType[];\n } else {\n types = [];\n }\n\n return new Set(types);\n }\n\n // we only run this function on component creation\n // and when an update is triggered, so it does not\n // react to changes in the autorefreshThreshold\n // or autorefresh args.\n //\n // if we need to react to those changes, we can\n // use a modifier or internal component or some\n // such to trigger a re-run of this function.\n async scheduleInterval() {\n const { autorefreshThreshold } = this.args;\n const hasValidThreshold = typeof autorefreshThreshold === 'number' && autorefreshThreshold > 0;\n if (\n // dont schedule in SSR\n typeof window === 'undefined' ||\n // dont schedule without a threshold\n !hasValidThreshold ||\n // dont schedule if we weren't told to\n !this.autorefreshTypes.has('interval') ||\n // dont schedule if we're already scheduled\n this.intervalStart !== null\n ) {\n return;\n }\n\n // if we have a current request, wait for it to finish\n // before scheduling the next one\n if (this._latestRequest) {\n try {\n await this._latestRequest;\n } catch {\n // ignore errors here, we just want to wait for the request to finish\n }\n\n if (this.isDestroyed) {\n return;\n }\n }\n\n // setup the next interval\n this.intervalStart = Date.now();\n this.nextInterval = setTimeout(() => {\n this.maybeUpdate();\n }, autorefreshThreshold) as unknown as number;\n }\n\n clearInterval() {\n if (this.nextInterval) {\n clearTimeout(this.nextInterval);\n this.intervalStart = null;\n }\n }\n\n updateSubscriptions() {\n if (this.isIdle) {\n return;\n }\n const requestId = this._request.lid;\n\n // if we're already subscribed to this request, we don't need to do anything\n if (this._subscribedTo === requestId) {\n return;\n }\n\n // if we're subscribed to a different request, we need to unsubscribe\n this.removeSubscriptions();\n\n // if we have a request, we need to subscribe to it\n if (requestId) {\n this._subscribedTo = requestId;\n this._subscription = this.store.notifications.subscribe(\n requestId,\n (_id: StableDocumentIdentifier, op: 'invalidated' | 'state' | 'added' | 'updated' | 'removed') => {\n // ignore subscription events that occur while our own component's request\n // is ocurring\n if (this.isUpdating) {\n return;\n }\n switch (op) {\n case 'invalidated': {\n // if we're subscribed to invalidations, we need to update\n if (this.autorefreshTypes.has('invalid')) {\n this.invalidated = true;\n this.maybeUpdate();\n }\n break;\n }\n case 'state': {\n const latest = this.store.requestManager._deduped.get(requestId);\n const priority = latest?.priority;\n const state = this.reqState;\n if (!priority) {\n // if there is no priority, we have completed whatever request\n // was occurring and so we are no longer refreshing (if we were)\n this.isRefreshing = false;\n } else if (priority.blocking && !state.isLoading) {\n // if we are blocking, there is an active request for this identity\n // that MUST be fulfilled from network (not cache).\n // Thus this is not \"refreshing\" because we should clear out and\n // block on this request.\n //\n // we receive state notifications when either a request initiates\n // or completes.\n //\n // In the completes case: we may receive the state notification\n // slightly before the request is finalized because the NotificationManager\n // may sync flush it (and thus deliver it before the microtask completes)\n //\n // In the initiates case: we aren't supposed to receive one unless there\n // is no other request in flight for this identity.\n //\n // However, there is a race condition here where the completed\n // notification can trigger an update that generates a new request\n // thus giving us an initiated notification before the older request\n // finalizes.\n //\n // When this occurs, if the triggered update happens to have caused\n // a new request to be made for the same identity AND that request\n // is the one passed into this component as the @request arg, then\n // getRequestState will return the state of the new request.\n // We can detect this by checking if the request state is \"loading\"\n // as outside of this case we would have a completed request.\n //\n // That is the reason for the `&& !state.isLoading` check above.\n\n // TODO should we just treat this as refreshing?\n this.isRefreshing = false;\n this.maybeUpdate('policy', true);\n } else {\n this.isRefreshing = true;\n }\n }\n }\n }\n );\n }\n }\n\n removeSubscriptions() {\n if (this._subscription) {\n this.store.notifications.unsubscribe(this._subscription);\n this._subscribedTo = null;\n this._subscription = null;\n }\n }\n\n /**\n * Install the event listeners for network and visibility changes.\n * This is only done in browser environments with a global `window`.\n *\n * @internal\n */\n installListeners() {\n if (typeof window === 'undefined') {\n return;\n }\n\n this.isOnline = window.navigator.onLine;\n this.unavailableStart = this.isOnline ? null : Date.now();\n this.isHidden = document.visibilityState === 'hidden';\n\n this.onlineChanged = (event: Event) => {\n this.isOnline = event.type === 'online';\n if (event.type === 'offline' && this.unavailableStart === null) {\n this.unavailableStart = Date.now();\n }\n this.maybeUpdate();\n };\n this.backgroundChanged = () => {\n const isHidden = document.visibilityState === 'hidden';\n this.isHidden = isHidden;\n\n if (isHidden && this.unavailableStart === null) {\n this.unavailableStart = Date.now();\n }\n\n this.maybeUpdate();\n };\n\n window.addEventListener('online', this.onlineChanged, { passive: true, capture: true });\n window.addEventListener('offline', this.onlineChanged, { passive: true, capture: true });\n document.addEventListener('visibilitychange', this.backgroundChanged, { passive: true, capture: true });\n }\n\n /**\n * If the network is online and the tab is visible, either reload or refresh the request\n * based on the component's configuration and the requested update mode.\n *\n * Valid modes are:\n *\n * - `'reload'`: Force a reload of the request.\n * - `'refresh'`: Refresh the request in the background.\n * - `'policy'`: Make the request, letting the store's configured CachePolicy decide whether to reload, refresh, or do nothing.\n * - `undefined`: Make the request using the component's autorefreshBehavior setting if the autorefreshThreshold has passed.\n *\n * @internal\n */\n maybeUpdate(mode?: 'reload' | 'refresh' | 'policy' | 'invalidated', silent?: boolean): void {\n if (this.isIdle) {\n return;\n }\n const canAttempt = Boolean(this.isOnline && !this.isHidden && (mode || this.autorefreshTypes.size));\n\n if (!canAttempt) {\n if (!silent && mode && mode !== 'invalidated') {\n throw new Error(`Reload not available: the network is not online or the tab is hidden`);\n }\n\n return;\n }\n\n const { autorefreshTypes } = this;\n let shouldAttempt = this.invalidated || Boolean(mode);\n\n if (!shouldAttempt && autorefreshTypes.has('online')) {\n const { unavailableStart } = this;\n const { autorefreshThreshold } = this.args;\n const deadline = typeof autorefreshThreshold === 'number' ? autorefreshThreshold : DEFAULT_DEADLINE;\n shouldAttempt = Boolean(unavailableStart && Date.now() - unavailableStart > deadline);\n }\n\n if (!shouldAttempt && autorefreshTypes.has('interval')) {\n const { intervalStart } = this;\n const { autorefreshThreshold } = this.args;\n\n if (intervalStart && typeof autorefreshThreshold === 'number' && autorefreshThreshold > 0) {\n shouldAttempt = Boolean(Date.now() - intervalStart >= autorefreshThreshold);\n }\n }\n\n this.unavailableStart = null;\n this.invalidated = false;\n\n if (shouldAttempt) {\n this.clearInterval();\n const request = Object.assign({}, this.reqState.request as unknown as RequestInfo<RT, T>);\n const realMode = mode === 'invalidated' ? null : mode;\n const val = realMode ?? this.args.autorefreshBehavior ?? 'policy';\n switch (val) {\n case 'reload':\n request.cacheOptions = Object.assign({}, request.cacheOptions, { reload: true });\n break;\n case 'refresh':\n request.cacheOptions = Object.assign({}, request.cacheOptions, { backgroundReload: true });\n break;\n case 'policy':\n break;\n default:\n throw new Error(\n `Invalid ${mode ? 'update mode' : '@autorefreshBehavior'} for <Request />: ${isNeverString(val)}`\n );\n }\n\n const wasStoreRequest = request[EnableHydration] === true;\n assert(\n `Cannot supply a different store via context than was used to create the request`,\n !request.store || request.store === this.store\n );\n\n this.isUpdating = true;\n this._latestRequest = wasStoreRequest ? this.store.request(request) : this.store.requestManager.request(request);\n\n if (val !== 'refresh') {\n this._localRequest = this._latestRequest;\n }\n\n void this.scheduleInterval();\n void this._latestRequest.finally(() => {\n this.isUpdating = false;\n });\n } else {\n // TODO probably want this\n // void this.scheduleInterval();\n }\n }\n\n /**\n * Retry the request, reloading it from the server.\n *\n * @internal\n */\n retry = async () => {\n this.maybeUpdate('reload');\n await this._localRequest;\n };\n\n /**\n * Refresh the request, updating it in the background.\n *\n * @internal\n */\n refresh = async () => {\n this.maybeUpdate('refresh');\n await this._latestRequest;\n };\n\n @cached\n get errorFeatures() {\n return {\n isHidden: this.isHidden,\n isOnline: this.isOnline,\n retry: this.retry,\n };\n }\n\n @cached\n get contentFeatures() {\n const feat: ContentFeatures<RT> = {\n isHidden: this.isHidden,\n isOnline: this.isOnline,\n reload: this.retry,\n refresh: this.refresh,\n isRefreshing: this.isRefreshing,\n latestRequest: this._latestRequest,\n };\n\n if (feat.isRefreshing) {\n feat.abort = () => {\n this._latestRequest?.abort();\n };\n }\n\n return feat;\n }\n\n willDestroy() {\n this.removeSubscriptions();\n\n if (typeof window === 'undefined') {\n return;\n }\n\n this.clearInterval();\n\n window.removeEventListener('online', this.onlineChanged, { passive: true, capture: true } as unknown as boolean);\n window.removeEventListener('offline', this.onlineChanged, { passive: true, capture: true } as unknown as boolean);\n document.removeEventListener('visibilitychange', this.backgroundChanged, {\n passive: true,\n capture: true,\n } as unknown as boolean);\n }\n\n @cached\n get _request(): Future<RT> {\n const { request, query } = this.args;\n assert(`Cannot use both @request and @query args with the <Request> component`, !request || !query);\n const { _localRequest, _originalRequest, _originalQuery } = this;\n const isOriginalRequest = request === _originalRequest && query === _originalQuery;\n\n if (_localRequest && isOriginalRequest) {\n return _localRequest;\n }\n\n // update state checks for the next time\n this._originalQuery = query;\n this._originalRequest = request;\n\n if (request) {\n return request;\n }\n assert(`You must provide either @request or an @query arg with the <Request> component`, query);\n return this.store.request(query);\n }\n\n @cached\n get request(): Future<RT> {\n const request = this._request;\n this.updateSubscriptions();\n return request;\n }\n\n get store(): Store {\n const store = this.args.store || this._store;\n assert(\n moduleExists('ember-provide-consume-context')\n ? `No store was provided to the <Request> component. Either provide a store via the @store arg or via the context API provided by ember-provide-consume-context.`\n : `No store was provided to the <Request> component. Either provide a store via the @store arg or by registering a store service.`,\n store\n );\n return store;\n }\n\n get reqState() {\n return getRequestState<RT, T, E>(this.request);\n }\n\n get result() {\n return this.reqState.result as RT;\n }\n\n <template>\n {{#if (and this.isIdle (has-block \"idle\"))}}\n {{yield to=\"idle\"}}\n {{else if this.isIdle}}\n <Throw @error={{IdleBlockMissingError}} />\n {{else if this.reqState.isLoading}}\n {{yield this.reqState.loadingState to=\"loading\"}}\n {{else if (and this.reqState.isCancelled (has-block \"cancelled\"))}}\n {{yield (notNull this.reqState.error) this.errorFeatures to=\"cancelled\"}}\n {{else if (and this.reqState.isError (has-block \"error\"))}}\n {{yield (notNull this.reqState.error) this.errorFeatures to=\"error\"}}\n {{else if this.reqState.isSuccess}}\n {{yield this.result this.contentFeatures to=\"content\"}}\n {{else if (not this.reqState.isCancelled)}}\n <Throw @error={{(notNull this.reqState.error)}} />\n {{/if}}\n {{yield this.reqState to=\"always\"}}\n </template>\n}\n"],"names":["and","x","y","Boolean","Throw","Component","constructor","owner","args","error","setComponentTemplate","precompileTemplate","strictMode","Await","state","getPromiseState","promise","result","scope","deferred","WeakMap","deferDecorator","proto","prop","desc","map","get","Map","set","findDeferredDecorator","target","_a","cursor","prototype","decorateFieldV2","decorators","initializer","configurable","enumerable","writable","decorator","Object","defineProperty","decorateMethodV2","origDesc","getOwnPropertyDescriptor","value","call","initializeDeferredDecorator","notNull","macroCondition","getGlobalConfig","WarpDrive","env","DEBUG","test","Error","not","DEFAULT_DEADLINE","IdleBlockMissingError","consume","service","moduleExists","contextConsume","importSync","isNeverString","val","Request","g","i","void 0","tracked","unavailableStart","intervalStart","nextInterval","invalidated","isUpdating","onlineChanged","backgroundChanged","_originalRequest","_originalQuery","_subscription","_subscribedTo","installListeners","beginPolling","request","isDestroyed","scheduleInterval","isIdle","query","n","cached","autorefreshTypes","autorefresh","types","split","Set","autorefreshThreshold","hasValidThreshold","window","has","_latestRequest","Date","now","setTimeout","maybeUpdate","clearInterval","clearTimeout","updateSubscriptions","requestId","_request","lid","removeSubscriptions","store","notifications","subscribe","_id","op","latest","requestManager","_deduped","priority","reqState","isRefreshing","blocking","isLoading","unsubscribe","isOnline","navigator","onLine","isHidden","document","visibilityState","event","type","addEventListener","passive","capture","mode","silent","canAttempt","size","shouldAttempt","deadline","assign","realMode","autorefreshBehavior","cacheOptions","reload","backgroundReload","wasStoreRequest","EnableHydration","_localRequest","finally","retry","refresh","errorFeatures","contentFeatures","feat","latestRequest","abort","willDestroy","removeEventListener","isOriginalRequest","_store","getRequestState"],"mappings":";;;;;;;;;;AAAA;;AAEC;;AAOM,MAAMA,GAAM,GAAAA,CAACC,CAAU,EAAEC,CAAU,KAAKC,OAAQ,CAAAF,CAAA,IAAKC,CAAG,CAAA;AAO/D;;;;;;;;;;;;AAYC;AACM,MAAME,KAAM,SAAWC,UAAyB;AACrDC,EAAAA,WAAAA,CAAYC,KAAY,EAAEC,IAA+B,EAAE;AACzD,IAA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AAA,EAAA;AAEF,IAAA,OAAOA,KAAA;AACT;EAEA,IAAIS,QAAWA,GAAA;AACb,IAAA,OAAO2C,gBAA0B,IAAI,CAAChF,OAAO,CAAA;AAC/C;EAEA,IAAIpE,MAASA,GAAA;AACX,IAAA,OAAO,IAAI,CAACyG,QAAQ,CAACzG,MAAM;AAC7B;AAEA,EAAA;IAAAP,oBAAA,CAAAC,kBAAA,CAiBA,u0BAAA,EAAA;MAAAC,UAAA,EAAA,IAAA;AAAAM,MAAAA,KAAA,EAAAA,OAAA;QAAAlB,GAAA;QAAAI,KAAA;QAAAuD,qBAAA;QAAAV,OAAA;AAAAQ,QAAAA;AAAA,OAAA;KAAU,CAAA,EAAV,IAAW,CAAA;AAAD;AACZ;;;;","x_google_ignoreList":[1]}
1
+ {"version":3,"file":"index.js","sources":["../src/-private/await.gts","../../../node_modules/.pnpm/decorat_e726cea2fd4487945e014da78f788773/node_modules/decorator-transforms/dist/runtime-BPCpkOf1.js","../src/-private/request.gts"],"sourcesContent":["import type Owner from '@ember/owner';\nimport Component from '@glimmer/component';\n\nimport type { Awaitable } from '@ember-data/request';\nimport { getPromiseState } from '@ember-data/store/-private';\n\nexport const and = (x: unknown, y: unknown) => Boolean(x && y);\ninterface ThrowSignature<E = Error | string | object> {\n Args: {\n error: E;\n };\n}\n\n/**\n * The `<Throw />` component is used to throw an error in a template.\n *\n * That's all it does. So don't use it unless the application should\n * throw an error if it reaches this point in the template.\n *\n * ```hbs\n * <Throw @error={{anError}} />\n * ```\n *\n * @class <Throw />\n * @public\n */\nexport class Throw<T> extends Component<ThrowSignature<T>> {\n constructor(owner: Owner, args: ThrowSignature<T>['Args']) {\n super(owner, args);\n // this error is opaque (user supplied) so we don't validate it\n // as an Error instance.\n // eslint-disable-next-line @typescript-eslint/no-throw-literal\n throw this.args.error;\n }\n <template></template>\n}\n\ninterface AwaitSignature<T, E = Error | string | object> {\n Args: {\n promise: Promise<T> | Awaitable<T, E>;\n };\n Blocks: {\n pending: [];\n error: [error: E];\n success: [value: T];\n };\n}\n\n/**\n * The <Await /> component allow you to utilize reactive control flow\n * for asynchronous states in your application.\n *\n * Await is ideal for handling \"boundaries\", outside which some state is\n * still allowed to be unresolved and within which it MUST be resolved.\n *\n * ```gjs\n * import { Await } from '@warp-drive/ember';\n *\n * <template>\n * <Await @promise={{@request}}>\n * <:pending>\n * <Spinner />\n * </:pending>\n *\n * <:error as |error|>\n * <ErrorForm @error={{error}} />\n * </:error>\n *\n * <:success as |result|>\n * <h1>{{result.title}}</h1>\n * </:success>\n * </Await>\n * </template>\n * ```\n *\n * The <Await /> component requires that error states are properly handled.\n *\n * If no error block is provided and the promise rejects, the error will\n * be thrown.\n *\n * @class <Await />\n * @public\n */\nexport class Await<T, E> extends Component<AwaitSignature<T, E>> {\n get state() {\n return getPromiseState<T, E>(this.args.promise);\n }\n\n get error() {\n return this.state.error as E;\n }\n\n get result() {\n return this.state.result as T;\n }\n\n <template>\n {{#if this.state.isPending}}\n {{yield to=\"pending\"}}\n {{else if (and this.state.isError (has-block \"error\"))}}\n {{yield this.error to=\"error\"}}\n {{else if this.state.isSuccess}}\n {{yield this.result to=\"success\"}}\n {{else}}\n <Throw @error={{this.error}} />\n {{/if}}\n </template>\n}\n","const deferred = /* @__PURE__ */ new WeakMap();\nfunction deferDecorator(proto, prop, desc) {\n let map = deferred.get(proto);\n if (!map) {\n map = /* @__PURE__ */ new Map();\n deferred.set(proto, map);\n }\n map.set(prop, desc);\n}\nfunction findDeferredDecorator(target, prop) {\n var _a;\n let cursor = target.prototype;\n while (cursor) {\n let desc = (_a = deferred.get(cursor)) == null ? void 0 : _a.get(prop);\n if (desc) {\n return desc;\n }\n cursor = cursor.prototype;\n }\n}\nfunction decorateFieldV1(target, prop, decorators, initializer) {\n return decorateFieldV2(target.prototype, prop, decorators, initializer);\n}\nfunction decorateFieldV2(prototype, prop, decorators, initializer) {\n let desc = {\n configurable: true,\n enumerable: true,\n writable: true,\n initializer: null\n };\n if (initializer) {\n desc.initializer = initializer;\n }\n for (let decorator of decorators) {\n desc = decorator(prototype, prop, desc) || desc;\n }\n if (desc.initializer === void 0) {\n Object.defineProperty(prototype, prop, desc);\n } else {\n deferDecorator(prototype, prop, desc);\n }\n}\nfunction decorateMethodV1({ prototype }, prop, decorators) {\n return decorateMethodV2(prototype, prop, decorators);\n}\nfunction decorateMethodV2(prototype, prop, decorators) {\n const origDesc = Object.getOwnPropertyDescriptor(prototype, prop);\n let desc = { ...origDesc };\n for (let decorator of decorators) {\n desc = decorator(prototype, prop, desc) || desc;\n }\n if (desc.initializer !== void 0) {\n desc.value = desc.initializer ? desc.initializer.call(prototype) : void 0;\n desc.initializer = void 0;\n }\n Object.defineProperty(prototype, prop, desc);\n}\nfunction initializeDeferredDecorator(target, prop) {\n let desc = findDeferredDecorator(target.constructor, prop);\n if (desc) {\n Object.defineProperty(target, prop, {\n enumerable: desc.enumerable,\n configurable: desc.configurable,\n writable: desc.writable,\n value: desc.initializer ? desc.initializer.call(target) : void 0\n });\n }\n}\nfunction decorateClass(target, decorators) {\n return decorators.reduce(\n (accum, decorator) => decorator(accum) || accum,\n target\n );\n}\nfunction decoratePOJO(pojo, decorated) {\n for (let [type, prop, decorators] of decorated) {\n if (type === \"field\") {\n decoratePojoField(pojo, prop, decorators);\n } else {\n decorateMethodV2(pojo, prop, decorators);\n }\n }\n return pojo;\n}\nfunction decoratePojoField(pojo, prop, decorators) {\n let desc = {\n configurable: true,\n enumerable: true,\n writable: true,\n initializer: () => {\n var _a;\n return (_a = Object.getOwnPropertyDescriptor(pojo, prop)) == null ? void 0 : _a.value;\n }\n };\n for (let decorator of decorators) {\n desc = decorator(pojo, prop, desc) || desc;\n }\n if (desc.initializer) {\n desc.value = desc.initializer.call(pojo);\n delete desc.initializer;\n }\n Object.defineProperty(pojo, prop, desc);\n}\nconst runtime = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({\n __proto__: null,\n c: decorateClass,\n f: decorateFieldV1,\n g: decorateFieldV2,\n i: initializeDeferredDecorator,\n m: decorateMethodV1,\n n: decorateMethodV2,\n p: decoratePOJO\n}, Symbol.toStringTag, { value: \"Module\" }));\nexport {\n decorateFieldV2 as a,\n decorateMethodV1 as b,\n decorateMethodV2 as c,\n decorateFieldV1 as d,\n decorateClass as e,\n decoratePOJO as f,\n initializeDeferredDecorator as i,\n runtime as r\n};\n//# sourceMappingURL=runtime-BPCpkOf1.js.map\n","import type Owner from '@ember/owner';\nimport { service } from '@ember/service';\nimport Component from '@glimmer/component';\nimport { cached, tracked } from '@glimmer/tracking';\n\nimport { importSync, macroCondition, moduleExists } from '@embroider/macros';\n\nimport type { Future, StructuredErrorDocument } from '@ember-data/request';\nimport type { StoreRequestInput } from '@ember-data/store';\nimport type Store from '@ember-data/store';\nimport type { RequestLoadingState, RequestState } from '@ember-data/store/-private';\nimport { getRequestState } from '@ember-data/store/-private';\nimport { assert } from '@warp-drive/build-config/macros';\nimport type { StableDocumentIdentifier } from '@warp-drive/core-types/identifier.js';\nimport { EnableHydration, type RequestInfo } from '@warp-drive/core-types/request';\n\nimport { and, Throw } from './await.gts';\n\nfunction notNull(x: null): never;\nfunction notNull<T>(x: T): Exclude<T, null>;\nfunction notNull<T>(x: T | null) {\n assert('Expected a non-null value, but got null', x !== null);\n return x;\n}\n\nconst not = (x: unknown) => !x;\n// default to 30 seconds unavailable before we refresh\nconst DEFAULT_DEADLINE = 30_000;\nconst IdleBlockMissingError = new Error(\n 'No idle block provided for <Request> component, and no query or request was provided.'\n);\n\nlet consume = service;\nif (macroCondition(moduleExists('ember-provide-consume-context'))) {\n const { consume: contextConsume } = importSync('ember-provide-consume-context') as { consume: typeof service };\n consume = contextConsume;\n}\n\nfunction isNeverString(val: never): string {\n return val;\n}\n\ntype AutorefreshBehaviorType = 'online' | 'interval' | 'invalid';\ntype AutorefreshBehaviorCombos =\n | boolean\n | AutorefreshBehaviorType\n | `${AutorefreshBehaviorType},${AutorefreshBehaviorType}`\n | `${AutorefreshBehaviorType},${AutorefreshBehaviorType},${AutorefreshBehaviorType}`;\n\ntype ContentFeatures<RT> = {\n isOnline: boolean;\n isHidden: boolean;\n isRefreshing: boolean;\n refresh: () => Promise<void>;\n reload: () => Promise<void>;\n abort?: () => void;\n latestRequest?: Future<RT>;\n};\n\ninterface RequestSignature<RT, T, E> {\n Args: {\n /**\n * The request to monitor. This should be a `Future` instance returned\n * by either the `store.request` or `store.requestManager.request` methods.\n *\n */\n request?: Future<RT>;\n\n /**\n * A query to use for the request. This should be an object that can be\n * passed to `store.request`. Use this in place of `@request` if you would\n * like the component to also initiate the request.\n *\n */\n query?: StoreRequestInput<RT, T>;\n\n /**\n * The store instance to use for making requests. If contexts are available,\n * the component will default to using the `store` on the context.\n *\n * This is required if the store is not available via context or should be\n * different from the store provided via context.\n *\n */\n store?: Store;\n\n /**\n * The autorefresh behavior for the request. This can be a boolean, or any\n * combination of the following values: `'online'`, `'interval'`, `'invalid'`.\n *\n * - `'online'`: Refresh the request when the browser comes back online\n * - `'interval'`: Refresh the request at a specified interval\n * - `'invalid'`: Refresh the request when the store emits an invalidation\n *\n * If `true`, this is equivalent to `'online,invalid'`.\n *\n * Defaults to `false`.\n *\n */\n autorefresh?: AutorefreshBehaviorCombos;\n\n /**\n * The number of milliseconds to wait before refreshing the request when the\n * browser comes back online or the network becomes available.\n *\n * This also controls the interval at which the request will be refreshed if\n * the `interval` autorefresh type is enabled.\n *\n * Defaults to `30_000` (30 seconds).\n *\n */\n autorefreshThreshold?: number;\n\n /**\n * The behavior of the request initiated by autorefresh. This can be one of\n * the following values:\n *\n * - `'refresh'`: Refresh the request in the background\n * - `'reload'`: Force a reload of the request\n * - `'policy'` (**default**): Let the store's configured CachePolicy decide whether to\n * reload, refresh, or do nothing.\n *\n * Defaults to `'policy'`.\n *\n */\n autorefreshBehavior?: 'refresh' | 'reload' | 'policy';\n };\n Blocks: {\n /**\n * The block to render when the component is idle and waiting to be given a request.\n *\n */\n idle: [];\n\n /**\n * The block to render when the request is loading.\n *\n */\n loading: [state: RequestLoadingState];\n\n /**\n * The block to render when the request was cancelled.\n *\n */\n cancelled: [\n error: StructuredErrorDocument<E>,\n features: { isOnline: boolean; isHidden: boolean; retry: () => Promise<void> },\n ];\n\n /**\n * The block to render when the request failed. If this block is not provided,\n * the error will be rethrown.\n *\n * Thus it is required to provide an error block and proper error handling if\n * you do not want the error to crash the application.\n *\n */\n error: [\n error: StructuredErrorDocument<E>,\n features: { isOnline: boolean; isHidden: boolean; retry: () => Promise<void> },\n ];\n\n /**\n * The block to render when the request succeeded.\n *\n */\n content: [value: RT, features: ContentFeatures<RT>];\n always: [state: RequestState<RT, T, StructuredErrorDocument<E>>];\n };\n}\n\n/**\n * The `<Request />` component is a powerful tool for managing data fetching and\n * state in your Ember application. It provides a declarative approach to reactive\n * control-flow for managing requests and state in your application.\n *\n * The `<Request />` component is ideal for handling \"boundaries\", outside which some\n * state is still allowed to be unresolved and within which it MUST be resolved.\n *\n * ## Request States\n *\n * `<Request />` has five states, only one of which will be active and rendered at a time.\n *\n * - `idle`: The component is waiting to be given a request to monitor\n * - `loading`: The request is in progress\n * - `error`: The request failed\n * - `content`: The request succeeded\n * - `cancelled`: The request was cancelled\n *\n * Additionally, the `content` state has a `refresh` method that can be used to\n * refresh the request in the background, which is available as a sub-state of\n * the `content` state.\n *\n * As with the `<Await />` component, if no error block is provided and the request\n * rejects, the error will be thrown. Cancellation errors are swallowed instead of\n * rethrown if no error block or cancellation block is present.\n *\n * ```gts\n * import { Request } from '@warp-drive/ember';\n *\n * <template>\n * <Request @request={{@request}}>\n * <:loading as |state|>\n * <Spinner @percentDone={{state.completedRatio}} />\n * <button {{on \"click\" state.abort}}>Cancel</button>\n * </:loading>\n *\n * <:error as |error state|>\n * <ErrorForm @error={{error}} />\n * <button {{on \"click\" state.retry}}>Retry</button>\n * </:error>\n *\n * <:content as |data state|>\n * <h1>{{data.title}}</h1>\n * {{#if state.isBackgroundReloading}}\n * <SmallSpinner />\n * <button {{on \"click\" state.abort}}>Cancel</button>\n * {{else}}\n * <button {{on \"click\" state.refresh}}>Refresh</button>\n * {{/if}}\n * </:content>\n *\n * <:cancelled as |error state|>\n * <h2>The Request was cancelled</h2>\n * <button {{on \"click\" state.retry}}>Retry</button>\n * </:cancelled>\n *\n * <:idle>\n * <button {{on \"click\" @kickOffRequest}}>Load Preview?</button>\n * </:idle>\n *\n * </Request>\n * </template>\n * ```\n *\n * ## Streaming Data\n *\n * The loading state exposes the download `ReadableStream` instance for consumption\n *\n * ```gjs\n * import { Request } from '@warp-drive/ember';\n *\n * <template>\n * <Request @request={{@request}}>\n * <:loading as |state|>\n * <Video @stream={{state.stream}} />\n * </:loading>\n *\n * <:error as |error|>\n * <ErrorForm @error={{error}} />\n * </:error>\n * </Request>\n * </template>\n * ```\n *\n * ## Retry\n *\n * Cancelled and error'd requests may be retried by calling the `retry` method.\n *\n * Retry will restart the state progression, using the loading, error, cancelled,\n * and content blocks as appropriate.\n *\n * ## Reloading\n *\n * The `reload` method will force the request to be fully re-executed, bypassing\n * cache and restarting the state progression through the loading, error, and\n * content blocks as appropriate.\n *\n * Background reload (refresh) is a special substate of the content state that\n * allows you to refresh the request in the background. This is useful for when\n * you want to update the data in the background without blocking the UI.\n *\n * Reload and refresh are available as methods on the `content` state.\n *\n * ```gjs\n * import { Request } from '@warp-drive/ember';\n *\n * <template>\n * <Request @request={{@request}}>\n * <:content as |data state|>\n * <h1>{{data.title}}</h1>\n * {{#if state.isBackgroundReloading}}\n * <SmallSpinner />\n * <button {{on \"click\" state.abort}}>Cancel</button>\n * {{/if}}\n *\n * <button {{on \"click\" state.refresh}}>Refresh</button>\n * <button {{on \"click\" state.reload}}>Reload</button>\n * </:content>\n * </Request>\n * </template>\n * ```\n *\n * ## Advanced Reloading\n *\n * We can nest our usage of `<Request />` to handle more advanced\n * reloading scenarios.\n *\n * ```gjs\n * import { Request } from '@warp-drive/ember';\n *\n * <template>\n * <Request @request={{@request}}>\n * <:cancelled>\n * <h2>The Request Cancelled</h2>\n * </:cancelled>\n *\n * <:error as |error|>\n * <ErrorForm @error={{error}} />\n * </:error>\n *\n * <:content as |result state|>\n * <Request @request={{state.latestRequest}}>\n * <!-- Handle Background Request -->\n * </Request>\n *\n * <h1>{{result.title}}</h1>\n *\n * <button {{on \"click\" state.refresh}}>Refresh</button>\n * </:content>\n * </Request>\n * </template>\n * ```\n *\n * ## Autorefresh\n *\n * `<Request />` supports automatic refresh and reload under certain conditions.\n *\n * - `online`: This occurs when a browser window or tab comes back to the foreground\n * after being backgrounded or when the network reports as being online after\n * having been offline.\n * - `interval`: This occurs when a specified amount of time has passed.\n * - `invalid`: This occurs when the store emits a notification that the request\n * has become invalid.\n *\n * You can specify when autorefresh should occur by setting the `autorefresh` arg\n * to `true` or a comma-separated list of the above values.\n *\n * A value of `true` is equivalent to `'online,invalid'`.\n *\n * By default, an autorefresh will only occur if the browser was backgrounded or\n * offline for more than 30s before coming back available. This amount of time can\n * be tweaked by setting the number of milliseconds via `@autorefreshThreshold`.\n *\n * This arg also controls the interval at which the request will be refreshed\n * if the `interval` autorefresh type is enabled.\n *\n * Finally, the behavior of the request initiated by autorefresh can be adjusted\n * by setting the `autorefreshBehavior` arg to `'refresh'`, `'reload'`, or `'policy'`.\n *\n * - `'refresh'`: Refresh the request in the background\n * - `'reload'`: Force a reload of the request\n * - `'policy'` (**default**): Let the store's configured CachePolicy decide whether to\n * reload, refresh, or do nothing.\n *\n * More advanced refresh and reload behaviors can be created by passing the reload and\n * refresh actions into another component. For instance, refresh could be set up on a\n * timer or on a websocket subscription.\n *\n *\n * ```gjs\n * import { Request } from '@warp-drive/ember';\n *\n * <template>\n * <Request @request={{@request}}>\n * <:content as |result state|>\n * <h1>{{result.title}}</h1>\n *\n * <Interval @period={{30_000}} @fn={{state.refresh}} />\n * <Subscribe @channel={{@someValue}} @fn={{state.refresh}} />\n * </:content>\n * </Request>\n * </template>\n * ```\n *\n * If a matching request is refreshed or reloaded by any other component,\n * the `Request` component will react accordingly.\n *\n * ## Deduping\n *\n * The store dedupes requests by identity. If a request is made for the same identity\n * from multiple `<Request />` components, even if the request is not referentially the\n * same, only one actual request will be made.\n *\n *\n * @class <Request />\n * @public\n */\nexport class Request<RT, T, E> extends Component<RequestSignature<RT, T, E>> {\n /**\n * The store instance to use for making requests. If contexts are available, this\n * will be the `store` on the context, else it will be the store service.\n *\n * @internal\n */\n @consume('store') declare _store: Store;\n\n /**\n * Whether the browser reports that the network is online.\n *\n * @internal\n */\n @tracked isOnline = true;\n\n /**\n * Whether the browser reports that the tab is hidden.\n *\n * @internal\n */\n @tracked isHidden = true;\n\n /**\n * Whether the component is currently refreshing the request.\n *\n * @internal\n */\n @tracked isRefreshing = false;\n\n /**\n * The most recent blocking request that was made, typically\n * the result of a reload.\n *\n * This will never be the original request passed as an arg to\n * the component.\n *\n * @internal\n */\n @tracked _localRequest: Future<RT> | undefined;\n\n /**\n * The most recent request that was made, typically due to either a\n * reload or a refresh.\n *\n * This will never be the original request passed as an arg to\n * the component.\n *\n * @internal\n */\n @tracked _latestRequest: Future<RT> | undefined;\n\n /**\n * The time at which the network was reported as offline.\n *\n * @internal\n */\n declare unavailableStart: number | null;\n declare intervalStart: number | null;\n declare nextInterval: number | null;\n declare invalidated: boolean;\n declare isUpdating: boolean;\n\n /**\n * The event listener for network status changes,\n * cached to use the reference for removal.\n *\n * @internal\n */\n declare onlineChanged: (event: Event) => void;\n\n /**\n * The event listener for visibility status changes,\n * cached to use the reference for removal.\n *\n * @internal\n */\n declare backgroundChanged: (event: Event) => void;\n\n /**\n * The last request passed as an arg to the component,\n * cached for comparison.\n *\n * @internal\n */\n declare _originalRequest: Future<RT> | undefined;\n\n /**\n * The last query passed as an arg to the component,\n * cached for comparison.\n *\n * @internal\n */\n declare _originalQuery: StoreRequestInput<RT, T> | undefined;\n\n declare _subscription: object | null;\n declare _subscribedTo: object | null;\n\n constructor(owner: Owner, args: RequestSignature<RT, T, E>['Args']) {\n super(owner, args);\n this._subscribedTo = null;\n this._subscription = null;\n this.intervalStart = null;\n this.invalidated = false;\n this.nextInterval = null;\n\n this.installListeners();\n void this.beginPolling();\n }\n\n async beginPolling() {\n // await the initial request\n try {\n await this.request;\n } catch {\n // ignore errors here, we just want to wait for the request to finish\n } finally {\n if (!this.isDestroyed) {\n void this.scheduleInterval();\n }\n }\n }\n\n @cached\n get isIdle() {\n const { request, query } = this.args;\n\n return Boolean(!request && !query);\n }\n\n @cached\n get autorefreshTypes(): Set<AutorefreshBehaviorType> {\n const { autorefresh } = this.args;\n let types: AutorefreshBehaviorType[];\n\n if (autorefresh === true) {\n types = ['online', 'invalid'];\n } else if (typeof autorefresh === 'string') {\n types = autorefresh.split(',') as AutorefreshBehaviorType[];\n } else {\n types = [];\n }\n\n return new Set(types);\n }\n\n // we only run this function on component creation\n // and when an update is triggered, so it does not\n // react to changes in the autorefreshThreshold\n // or autorefresh args.\n //\n // if we need to react to those changes, we can\n // use a modifier or internal component or some\n // such to trigger a re-run of this function.\n async scheduleInterval() {\n const { autorefreshThreshold } = this.args;\n const hasValidThreshold = typeof autorefreshThreshold === 'number' && autorefreshThreshold > 0;\n if (\n // dont schedule in SSR\n typeof window === 'undefined' ||\n // dont schedule without a threshold\n !hasValidThreshold ||\n // dont schedule if we weren't told to\n !this.autorefreshTypes.has('interval') ||\n // dont schedule if we're already scheduled\n this.intervalStart !== null\n ) {\n return;\n }\n\n // if we have a current request, wait for it to finish\n // before scheduling the next one\n if (this._latestRequest) {\n try {\n await this._latestRequest;\n } catch {\n // ignore errors here, we just want to wait for the request to finish\n }\n\n if (this.isDestroyed) {\n return;\n }\n }\n\n // setup the next interval\n this.intervalStart = Date.now();\n this.nextInterval = setTimeout(() => {\n this.maybeUpdate();\n }, autorefreshThreshold) as unknown as number;\n }\n\n clearInterval() {\n if (this.nextInterval) {\n clearTimeout(this.nextInterval);\n this.intervalStart = null;\n }\n }\n\n updateSubscriptions() {\n if (this.isIdle) {\n return;\n }\n const requestId = this._request.lid;\n\n // if we're already subscribed to this request, we don't need to do anything\n if (this._subscribedTo === requestId) {\n return;\n }\n\n // if we're subscribed to a different request, we need to unsubscribe\n this.removeSubscriptions();\n\n // if we have a request, we need to subscribe to it\n if (requestId) {\n this._subscribedTo = requestId;\n this._subscription = this.store.notifications.subscribe(\n requestId,\n (_id: StableDocumentIdentifier, op: 'invalidated' | 'state' | 'added' | 'updated' | 'removed') => {\n // ignore subscription events that occur while our own component's request\n // is ocurring\n if (this.isUpdating) {\n return;\n }\n switch (op) {\n case 'invalidated': {\n // if we're subscribed to invalidations, we need to update\n if (this.autorefreshTypes.has('invalid')) {\n this.invalidated = true;\n this.maybeUpdate();\n }\n break;\n }\n case 'state': {\n const latest = this.store.requestManager._deduped.get(requestId);\n const priority = latest?.priority;\n const state = this.reqState;\n if (!priority) {\n // if there is no priority, we have completed whatever request\n // was occurring and so we are no longer refreshing (if we were)\n this.isRefreshing = false;\n } else if (priority.blocking && !state.isLoading) {\n // if we are blocking, there is an active request for this identity\n // that MUST be fulfilled from network (not cache).\n // Thus this is not \"refreshing\" because we should clear out and\n // block on this request.\n //\n // we receive state notifications when either a request initiates\n // or completes.\n //\n // In the completes case: we may receive the state notification\n // slightly before the request is finalized because the NotificationManager\n // may sync flush it (and thus deliver it before the microtask completes)\n //\n // In the initiates case: we aren't supposed to receive one unless there\n // is no other request in flight for this identity.\n //\n // However, there is a race condition here where the completed\n // notification can trigger an update that generates a new request\n // thus giving us an initiated notification before the older request\n // finalizes.\n //\n // When this occurs, if the triggered update happens to have caused\n // a new request to be made for the same identity AND that request\n // is the one passed into this component as the @request arg, then\n // getRequestState will return the state of the new request.\n // We can detect this by checking if the request state is \"loading\"\n // as outside of this case we would have a completed request.\n //\n // That is the reason for the `&& !state.isLoading` check above.\n\n // TODO should we just treat this as refreshing?\n this.isRefreshing = false;\n this.maybeUpdate('policy', true);\n } else {\n this.isRefreshing = true;\n }\n }\n }\n }\n );\n }\n }\n\n removeSubscriptions() {\n if (this._subscription) {\n this.store.notifications.unsubscribe(this._subscription);\n this._subscribedTo = null;\n this._subscription = null;\n }\n }\n\n /**\n * Install the event listeners for network and visibility changes.\n * This is only done in browser environments with a global `window`.\n *\n * @internal\n */\n installListeners() {\n if (typeof window === 'undefined') {\n return;\n }\n\n this.isOnline = window.navigator.onLine;\n this.unavailableStart = this.isOnline ? null : Date.now();\n this.isHidden = document.visibilityState === 'hidden';\n\n this.onlineChanged = (event: Event) => {\n this.isOnline = event.type === 'online';\n if (event.type === 'offline' && this.unavailableStart === null) {\n this.unavailableStart = Date.now();\n }\n this.maybeUpdate();\n };\n this.backgroundChanged = () => {\n const isHidden = document.visibilityState === 'hidden';\n this.isHidden = isHidden;\n\n if (isHidden && this.unavailableStart === null) {\n this.unavailableStart = Date.now();\n }\n\n this.maybeUpdate();\n };\n\n window.addEventListener('online', this.onlineChanged, { passive: true, capture: true });\n window.addEventListener('offline', this.onlineChanged, { passive: true, capture: true });\n document.addEventListener('visibilitychange', this.backgroundChanged, { passive: true, capture: true });\n }\n\n /**\n * If the network is online and the tab is visible, either reload or refresh the request\n * based on the component's configuration and the requested update mode.\n *\n * Valid modes are:\n *\n * - `'reload'`: Force a reload of the request.\n * - `'refresh'`: Refresh the request in the background.\n * - `'policy'`: Make the request, letting the store's configured CachePolicy decide whether to reload, refresh, or do nothing.\n * - `undefined`: Make the request using the component's autorefreshBehavior setting if the autorefreshThreshold has passed.\n *\n * @internal\n */\n maybeUpdate(mode?: 'reload' | 'refresh' | 'policy' | 'invalidated', silent?: boolean): void {\n if (this.isIdle) {\n return;\n }\n const canAttempt = Boolean(this.isOnline && !this.isHidden && (mode || this.autorefreshTypes.size));\n\n if (!canAttempt) {\n if (!silent && mode && mode !== 'invalidated') {\n throw new Error(`Reload not available: the network is not online or the tab is hidden`);\n }\n\n return;\n }\n\n const { autorefreshTypes } = this;\n let shouldAttempt = this.invalidated || Boolean(mode);\n\n if (!shouldAttempt && autorefreshTypes.has('online')) {\n const { unavailableStart } = this;\n const { autorefreshThreshold } = this.args;\n const deadline = typeof autorefreshThreshold === 'number' ? autorefreshThreshold : DEFAULT_DEADLINE;\n shouldAttempt = Boolean(unavailableStart && Date.now() - unavailableStart > deadline);\n }\n\n if (!shouldAttempt && autorefreshTypes.has('interval')) {\n const { intervalStart } = this;\n const { autorefreshThreshold } = this.args;\n\n if (intervalStart && typeof autorefreshThreshold === 'number' && autorefreshThreshold > 0) {\n shouldAttempt = Boolean(Date.now() - intervalStart >= autorefreshThreshold);\n }\n }\n\n this.unavailableStart = null;\n this.invalidated = false;\n\n if (shouldAttempt) {\n this.clearInterval();\n const request = Object.assign({}, this.reqState.request as unknown as RequestInfo<RT, T>);\n const realMode = mode === 'invalidated' ? null : mode;\n const val = realMode ?? this.args.autorefreshBehavior ?? 'policy';\n switch (val) {\n case 'reload':\n request.cacheOptions = Object.assign({}, request.cacheOptions, { reload: true });\n break;\n case 'refresh':\n request.cacheOptions = Object.assign({}, request.cacheOptions, { backgroundReload: true });\n break;\n case 'policy':\n break;\n default:\n throw new Error(\n `Invalid ${mode ? 'update mode' : '@autorefreshBehavior'} for <Request />: ${isNeverString(val)}`\n );\n }\n\n const wasStoreRequest = request[EnableHydration] === true;\n assert(\n `Cannot supply a different store via context than was used to create the request`,\n !request.store || request.store === this.store\n );\n\n this.isUpdating = true;\n this._latestRequest = wasStoreRequest ? this.store.request(request) : this.store.requestManager.request(request);\n\n if (val !== 'refresh') {\n this._localRequest = this._latestRequest;\n }\n\n void this.scheduleInterval();\n void this._latestRequest.finally(() => {\n this.isUpdating = false;\n });\n } else {\n // TODO probably want this\n // void this.scheduleInterval();\n }\n }\n\n /**\n * Retry the request, reloading it from the server.\n *\n * @internal\n */\n retry = async () => {\n this.maybeUpdate('reload');\n await this._localRequest;\n };\n\n /**\n * Refresh the request, updating it in the background.\n *\n * @internal\n */\n refresh = async () => {\n this.maybeUpdate('refresh');\n await this._latestRequest;\n };\n\n @cached\n get errorFeatures() {\n return {\n isHidden: this.isHidden,\n isOnline: this.isOnline,\n retry: this.retry,\n };\n }\n\n @cached\n get contentFeatures() {\n const feat: ContentFeatures<RT> = {\n isHidden: this.isHidden,\n isOnline: this.isOnline,\n reload: this.retry,\n refresh: this.refresh,\n isRefreshing: this.isRefreshing,\n latestRequest: this._latestRequest,\n };\n\n if (feat.isRefreshing) {\n feat.abort = () => {\n this._latestRequest?.abort();\n };\n }\n\n return feat;\n }\n\n willDestroy() {\n this.removeSubscriptions();\n\n if (typeof window === 'undefined') {\n return;\n }\n\n this.clearInterval();\n\n window.removeEventListener('online', this.onlineChanged, { passive: true, capture: true } as unknown as boolean);\n window.removeEventListener('offline', this.onlineChanged, { passive: true, capture: true } as unknown as boolean);\n document.removeEventListener('visibilitychange', this.backgroundChanged, {\n passive: true,\n capture: true,\n } as unknown as boolean);\n }\n\n @cached\n get _request(): Future<RT> {\n const { request, query } = this.args;\n assert(`Cannot use both @request and @query args with the <Request> component`, !request || !query);\n const { _localRequest, _originalRequest, _originalQuery } = this;\n const isOriginalRequest = request === _originalRequest && query === _originalQuery;\n\n if (_localRequest && isOriginalRequest) {\n return _localRequest;\n }\n\n // update state checks for the next time\n this._originalQuery = query;\n this._originalRequest = request;\n\n if (request) {\n return request;\n }\n assert(`You must provide either @request or an @query arg with the <Request> component`, query);\n return this.store.request(query);\n }\n\n @cached\n get request(): Future<RT> {\n const request = this._request;\n this.updateSubscriptions();\n return request;\n }\n\n get store(): Store {\n const store = this.args.store || this._store;\n assert(\n moduleExists('ember-provide-consume-context')\n ? `No store was provided to the <Request> component. Either provide a store via the @store arg or via the context API provided by ember-provide-consume-context.`\n : `No store was provided to the <Request> component. Either provide a store via the @store arg or by registering a store service.`,\n store\n );\n return store;\n }\n\n get reqState() {\n return getRequestState<RT, T, E>(this.request);\n }\n\n get result() {\n return this.reqState.result as RT;\n }\n\n <template>\n {{#if (and this.isIdle (has-block \"idle\"))}}\n {{yield to=\"idle\"}}\n {{else if this.isIdle}}\n <Throw @error={{IdleBlockMissingError}} />\n {{else if this.reqState.isLoading}}\n {{yield this.reqState.loadingState to=\"loading\"}}\n {{else if (and this.reqState.isCancelled (has-block \"cancelled\"))}}\n {{yield (notNull this.reqState.error) this.errorFeatures to=\"cancelled\"}}\n {{else if (and this.reqState.isError (has-block \"error\"))}}\n {{yield (notNull this.reqState.error) this.errorFeatures to=\"error\"}}\n {{else if this.reqState.isSuccess}}\n {{yield this.result this.contentFeatures to=\"content\"}}\n {{else if (not this.reqState.isCancelled)}}\n <Throw @error={{(notNull this.reqState.error)}} />\n {{/if}}\n {{yield this.reqState to=\"always\"}}\n </template>\n}\n"],"names":["and","x","y","Boolean","Throw","Component","constructor","owner","args","error","setComponentTemplate","precompileTemplate","strictMode","Await","state","getPromiseState","promise","result","scope","deferred","WeakMap","deferDecorator","proto","prop","desc","map","get","Map","set","findDeferredDecorator","target","_a","cursor","prototype","decorateFieldV2","decorators","initializer","configurable","enumerable","writable","decorator","Object","defineProperty","decorateMethodV2","origDesc","getOwnPropertyDescriptor","value","call","initializeDeferredDecorator","notNull","macroCondition","getGlobalConfig","WarpDrive","env","DEBUG","test","Error","not","DEFAULT_DEADLINE","IdleBlockMissingError","consume","service","moduleExists","contextConsume","importSync","isNeverString","val","Request","g","i","void 0","tracked","_subscribedTo","_subscription","intervalStart","invalidated","nextInterval","installListeners","beginPolling","request","isDestroyed","scheduleInterval","isIdle","query","n","cached","autorefreshTypes","autorefresh","types","split","Set","autorefreshThreshold","hasValidThreshold","window","has","_latestRequest","Date","now","setTimeout","maybeUpdate","clearInterval","clearTimeout","updateSubscriptions","requestId","_request","lid","removeSubscriptions","store","notifications","subscribe","_id","op","isUpdating","latest","requestManager","_deduped","priority","reqState","isRefreshing","blocking","isLoading","unsubscribe","isOnline","navigator","onLine","unavailableStart","isHidden","document","visibilityState","onlineChanged","event","type","backgroundChanged","addEventListener","passive","capture","mode","silent","canAttempt","size","shouldAttempt","deadline","assign","realMode","autorefreshBehavior","cacheOptions","reload","backgroundReload","wasStoreRequest","EnableHydration","_localRequest","finally","retry","refresh","errorFeatures","contentFeatures","feat","latestRequest","abort","willDestroy","removeEventListener","_originalRequest","_originalQuery","isOriginalRequest","_store","getRequestState"],"mappings":";;;;;;;;;;AAMO,MAAMA,GAAM,GAAAA,CAACC,CAAU,EAAEC,CAAU,KAAKC,OAAQ,CAAAF,CAAA,IAAKC,CAAG,CAAA;AAO/D;;;;;;;;;;;;AAYC;AACM,MAAME,KAAM,SAAWC,UAAyB;AACrDC,EAAAA,WAAAA,CAAYC,KAAY,EAAEC,IAA+B,EAAE;AACzD,IAAA,KAAK,CAACD,KAAO,EAAAC,IAAA,CAAA;AACb;AACA;AACA;AACA,IAAA,MAAM,IAAI,CAACA,IAAI,CAACC,KAAK;AACvB;AACA,EAAA;IAAAC,oBAAA,CAAAC,kBAAA,CAAU,EAAA,EAAA;MAAAC,UAAA,EAAA;KAAU,CAAA,EAAV,IAAW,CAAA;AAAD;AACtB;AAaA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCC;AACM,MAAMC,KAAA,SAAoBR,SAAA,CAA4B;EAC3D,IAAIS,KAAQA,GAAA;AACV,IAAA,OAAOC,gBAAsB,IAAI,CAACP,IAAI,CAACQ,OAAO,CAAA;AAChD;EAEA,IAAIP,KAAQA,GAAA;AACV,IAAA,OAAO,IAAI,CAACK,KAAK,CAACL,KAAK;AACzB;EAEA,IAAIQ,MAASA,GAAA;AACX,IAAA,OAAO,IAAI,CAACH,KAAK,CAACG,MAAM;AAC1B;AAEA,EAAA;IAAAP,oBAAA,CAAAC,kBAAA,CAUA,qUAAA,EAAA;MAAAC,UAAA,EAAA,IAAA;AAAAM,MAAAA,KAAA,EAAAA,OAAA;QAAAlB,GAAA;AAAAI,QAAAA;AAAA,OAAA;KAAU,CAAA,EAAV,IAAW,CAAA;AAAD;AACZ;;ACpFA,MAAMe,QAAA,sBAGEC,OAAA,EAAA;AAER,SAASC,eACPC,KAAA,EACAC,IAAA,EACAC,IAAA,EACM;AACF,EAAA,IAAAC,GAAA,GAAMN,QAAA,CAASO,GAAA,CAAI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YAAA,CAAa,mCACT,CAA+J,6JAAA,CAAA,GAC/J,CAAgI,8HAAA,CAAA,CAAA;AAAA;AAAA,KAAA,EACpI6C,KAAA,CAAA,GAAA,EAAA;AAEF,IAAA,OAAOA,KAAA;AACT;EAEA,IAAIU,QAAWA,GAAA;AACb,IAAA,OAAOgD,gBAA0B,IAAI,CAACtF,OAAO,CAAA;AAC/C;EAEA,IAAI9D,MAASA,GAAA;AACX,IAAA,OAAO,IAAI,CAACoG,QAAQ,CAACpG,MAAM;AAC7B;AAEA,EAAA;IAAAP,oBAAA,CAAAC,kBAAA,CAiBA,u0BAAA,EAAA;MAAAC,UAAA,EAAA,IAAA;AAAAM,MAAAA,KAAA,EAAAA,OAAA;QAAAlB,GAAA;QAAAI,KAAA;QAAAuD,qBAAA;QAAAV,OAAA;AAAAQ,QAAAA;AAAA,OAAA;KAAU,CAAA,EAAV,IAAW,CAAA;AAAD;AACZ;;;;","x_google_ignoreList":[1]}
package/dist/install.js CHANGED
@@ -1,7 +1,6 @@
1
- import '@ember-data/store/-private';
2
1
  import { tagForProperty } from '@ember/-internals/metal';
3
- import { createCache, track, updateTag, consumeTag, getValue, dirtyTag } from '@glimmer/validator';
4
2
  import { _backburner } from '@ember/runloop';
3
+ import { createCache, track, updateTag, consumeTag, getValue, dirtyTag } from '@glimmer/validator';
5
4
  import { setupSignals } from '@ember-data/store/configure';
6
5
  import { macroCondition, getGlobalConfig } from '@embroider/macros';
7
6
  const emberDirtyTag = dirtyTag;
@@ -1 +1 @@
1
- {"version":3,"file":"install.js","sources":["../src/install.ts"],"sourcesContent":["import { SignalHooks } from '@ember-data/store/-private';\nimport { tagForProperty } from '@ember/-internals/metal';\nimport { consumeTag, createCache, dirtyTag, getValue, track, updateTag, type UpdatableTag } from '@glimmer/validator';\n\nimport { _backburner } from '@ember/runloop';\n// import { createCache, getValue } from '@glimmer/tracking/primitives/cache';\nimport { DEPRECATE_COMPUTED_CHAINS } from '@warp-drive/build-config/deprecations';\nimport { setupSignals } from '@ember-data/store/configure';\n\ntype Tag = ReturnType<typeof tagForProperty>;\nconst emberDirtyTag = dirtyTag as unknown as (tag: Tag) => void;\n\nexport function buildSignalConfig(options: {\n wellknown: {\n Array: symbol | string;\n };\n}) {\n const ARRAY_SIGNAL = options.wellknown.Array;\n\n return {\n createSignal(obj: object, key: string | symbol) {\n if (DEPRECATE_COMPUTED_CHAINS) {\n if (key === ARRAY_SIGNAL) {\n return [tagForProperty(obj, key), tagForProperty(obj, 'length'), tagForProperty(obj, '[]')] as const;\n }\n }\n return tagForProperty(obj, key);\n },\n consumeSignal(signal: Tag | [Tag, Tag, Tag]) {\n if (DEPRECATE_COMPUTED_CHAINS) {\n if (Array.isArray(signal)) {\n consumeTag(signal[0]);\n consumeTag(signal[1]);\n consumeTag(signal[2]);\n return;\n }\n }\n\n consumeTag(signal as Tag);\n },\n notifySignal(signal: Tag | [Tag, Tag, Tag]) {\n if (DEPRECATE_COMPUTED_CHAINS) {\n if (Array.isArray(signal)) {\n emberDirtyTag(signal[0]);\n emberDirtyTag(signal[1]);\n emberDirtyTag(signal[2]);\n return;\n }\n }\n emberDirtyTag(signal as Tag);\n },\n createMemo: <F>(object: object, key: string | symbol, fn: () => F): (() => F) => {\n if (DEPRECATE_COMPUTED_CHAINS) {\n const propertyTag = tagForProperty(object, key) as UpdatableTag;\n const memo = createCache(fn);\n let ret: F | undefined;\n const wrappedFn = () => {\n ret = getValue(memo) as F;\n };\n return () => {\n const tag = track(wrappedFn);\n updateTag(propertyTag, tag);\n consumeTag(tag);\n return ret!;\n };\n } else {\n const memo = createCache(fn);\n return () => getValue(memo) as F;\n }\n },\n willSyncFlushWatchers: () => {\n //@ts-expect-error\n return !!_backburner.currentInstance && _backburner._autorun !== true;\n },\n } satisfies SignalHooks<Tag | [Tag, Tag, Tag]>;\n}\n\nsetupSignals(buildSignalConfig);\n"],"names":["emberDirtyTag","dirtyTag","buildSignalConfig","options","ARRAY_SIGNAL","wellknown","Array","createSignal","obj","key","macroCondition","getGlobalConfig","WarpDrive","deprecations","DEPRECATE_COMPUTED_CHAINS","tagForProperty","consumeSignal","signal","isArray","consumeTag","notifySignal","createMemo","object","fn","propertyTag","memo","createCache","ret","wrappedFn","getValue","tag","track","updateTag","willSyncFlushWatchers","_backburner","currentInstance","_autorun","setupSignals"],"mappings":";;;;;;;AAUA,MAAMA,aAAa,GAAGC,QAAyC;AAExD,SAASC,iBAAiBA,CAACC,OAIjC,EAAE;AACD,EAAA,MAAMC,YAAY,GAAGD,OAAO,CAACE,SAAS,CAACC,KAAK;EAE5C,OAAO;AACLC,IAAAA,YAAYA,CAACC,GAAW,EAAEC,GAAoB,EAAE;MAC9C,IAAAC,cAAA,CAAAC,eAAA,EAAA,CAAAC,SAAA,CAAAC,YAAA,CAAAC,yBAAA,CAA+B,EAAA;QAC7B,IAAIL,GAAG,KAAKL,YAAY,EAAE;UACxB,OAAO,CAACW,cAAc,CAACP,GAAG,EAAEC,GAAG,CAAC,EAAEM,cAAc,CAACP,GAAG,EAAE,QAAQ,CAAC,EAAEO,cAAc,CAACP,GAAG,EAAE,IAAI,CAAC,CAAC;AAC7F;AACF;AACA,MAAA,OAAOO,cAAc,CAACP,GAAG,EAAEC,GAAG,CAAC;KAChC;IACDO,aAAaA,CAACC,MAA6B,EAAE;MAC3C,IAAAP,cAAA,CAAAC,eAAA,EAAA,CAAAC,SAAA,CAAAC,YAAA,CAAAC,yBAAA,CAA+B,EAAA;AAC7B,QAAA,IAAIR,KAAK,CAACY,OAAO,CAACD,MAAM,CAAC,EAAE;AACzBE,UAAAA,UAAU,CAACF,MAAM,CAAC,CAAC,CAAC,CAAC;AACrBE,UAAAA,UAAU,CAACF,MAAM,CAAC,CAAC,CAAC,CAAC;AACrBE,UAAAA,UAAU,CAACF,MAAM,CAAC,CAAC,CAAC,CAAC;AACrB,UAAA;AACF;AACF;MAEAE,UAAU,CAACF,MAAa,CAAC;KAC1B;IACDG,YAAYA,CAACH,MAA6B,EAAE;MAC1C,IAAAP,cA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K,IAAI;AACvE;GACD;AACH;AAEAC,YAAY,CAACnC,iBAAiB,CAAC;;;;"}
1
+ {"version":3,"file":"install.js","sources":["../src/install.ts"],"sourcesContent":["import { tagForProperty } from '@ember/-internals/metal';\nimport { _backburner } from '@ember/runloop';\nimport { consumeTag, createCache, dirtyTag, getValue, track, type UpdatableTag, updateTag } from '@glimmer/validator';\n\nimport type { SignalHooks } from '@ember-data/store/-private';\nimport { setupSignals } from '@ember-data/store/configure';\n// import { createCache, getValue } from '@glimmer/tracking/primitives/cache';\nimport { DEPRECATE_COMPUTED_CHAINS } from '@warp-drive/build-config/deprecations';\n\ntype Tag = ReturnType<typeof tagForProperty>;\nconst emberDirtyTag = dirtyTag as unknown as (tag: Tag) => void;\n\nexport function buildSignalConfig(options: {\n wellknown: {\n Array: symbol | string;\n };\n}) {\n const ARRAY_SIGNAL = options.wellknown.Array;\n\n return {\n createSignal(obj: object, key: string | symbol) {\n if (DEPRECATE_COMPUTED_CHAINS) {\n if (key === ARRAY_SIGNAL) {\n return [tagForProperty(obj, key), tagForProperty(obj, 'length'), tagForProperty(obj, '[]')] as const;\n }\n }\n return tagForProperty(obj, key);\n },\n consumeSignal(signal: Tag | [Tag, Tag, Tag]) {\n if (DEPRECATE_COMPUTED_CHAINS) {\n if (Array.isArray(signal)) {\n consumeTag(signal[0]);\n consumeTag(signal[1]);\n consumeTag(signal[2]);\n return;\n }\n }\n\n consumeTag(signal as Tag);\n },\n notifySignal(signal: Tag | [Tag, Tag, Tag]) {\n if (DEPRECATE_COMPUTED_CHAINS) {\n if (Array.isArray(signal)) {\n emberDirtyTag(signal[0]);\n emberDirtyTag(signal[1]);\n emberDirtyTag(signal[2]);\n return;\n }\n }\n emberDirtyTag(signal as Tag);\n },\n createMemo: <F>(object: object, key: string | symbol, fn: () => F): (() => F) => {\n if (DEPRECATE_COMPUTED_CHAINS) {\n const propertyTag = tagForProperty(object, key) as UpdatableTag;\n const memo = createCache(fn);\n let ret: F | undefined;\n const wrappedFn = () => {\n ret = getValue(memo) as F;\n };\n return () => {\n const tag = track(wrappedFn);\n updateTag(propertyTag, tag);\n consumeTag(tag);\n return ret!;\n };\n } else {\n const memo = createCache(fn);\n return () => getValue(memo) as F;\n }\n },\n willSyncFlushWatchers: () => {\n //@ts-expect-error\n return !!_backburner.currentInstance && _backburner._autorun !== true;\n },\n } satisfies SignalHooks<Tag | [Tag, Tag, Tag]>;\n}\n\nsetupSignals(buildSignalConfig);\n"],"names":["emberDirtyTag","dirtyTag","buildSignalConfig","options","ARRAY_SIGNAL","wellknown","Array","createSignal","obj","key","macroCondition","getGlobalConfig","WarpDrive","deprecations","DEPRECATE_COMPUTED_CHAINS","tagForProperty","consumeSignal","signal","isArray","consumeTag","notifySignal","createMemo","object","fn","propertyTag","memo","createCache","ret","wrappedFn","getValue","tag","track","updateTag","willSyncFlushWatchers","_backburner","currentInstance","_autorun","setupSignals"],"mappings":";;;;;;AAUA,MAAMA,aAAa,GAAGC,QAAyC;AAExD,SAASC,iBAAiBA,CAACC,OAIjC,EAAE;AACD,EAAA,MAAMC,YAAY,GAAGD,OAAO,CAACE,SAAS,CAACC,KAAK;EAE5C,OAAO;AACLC,IAAAA,YAAYA,CAACC,GAAW,EAAEC,GAAoB,EAAE;MAC9C,IAAAC,cAAA,CAAAC,eAAA,EAAA,CAAAC,SAAA,CAAAC,YAAA,CAAAC,yBAAA,CAA+B,EAAA;QAC7B,IAAIL,GAAG,KAAKL,YAAY,EAAE;UACxB,OAAO,CAACW,cAAc,CAACP,GAAG,EAAEC,GAAG,CAAC,EAAEM,cAAc,CAACP,GAAG,EAAE,QAAQ,CAAC,EAAEO,cAAc,CAACP,GAAG,EAAE,IAAI,CAAC,CAAC;AAC7F;AACF;AACA,MAAA,OAAOO,cAAc,CAACP,GAAG,EAAEC,GAAG,CAAC;KAChC;IACDO,aAAaA,CAACC,MAA6B,EAAE;MAC3C,IAAAP,cAAA,CAAAC,eAAA,EAAA,CAAAC,SAAA,CAAAC,YAAA,CAAAC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,CAAC;AAC5BI,UAAAA,SAAS,CAACR,WAAW,EAAEM,GAAG,CAAC;UAC3BX,UAAU,CAACW,GAAG,CAAC;AACf,UAAA,OAAOH,GAAG;SACX;AACH,OAAC,MAAM;AACL,QAAA,MAAMF,IAAI,GAAGC,WAAW,CAACH,EAAE,CAAC;AAC5B,QAAA,OAAO,MAAMM,QAAQ,CAACJ,IAAI,CAAM;AAClC;KACD;IACDQ,qBAAqB,EAAEA,MAAM;AAC3B;MACA,OAAO,CAAC,CAACC,WAAW,CAACC,eAAe,IAAID,WAAW,CAACE,QAAQ,KAAK,IAAI;AACvE;GACD;AACH;AAEAC,YAAY,CAACnC,iBAAiB,CAAC;;;;"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@warp-drive/ember",
3
3
  "description": "Data bindings and utilities for Ember applications using WarpDrive",
4
- "version": "5.6.0-alpha.3",
4
+ "version": "5.6.0-alpha.5",
5
5
  "license": "MIT",
6
6
  "author": "Chris Thoburn <runspired@users.noreply.github.com>",
7
7
  "repository": {
@@ -35,15 +35,15 @@
35
35
  },
36
36
  "peerDependencies": {
37
37
  "@ember/test-waiters": "^3.1.0 || ^4.0.0",
38
- "@ember-data/store": "5.6.0-alpha.3",
39
- "@ember-data/request": "5.6.0-alpha.3",
40
- "@ember-data/request-utils": "5.6.0-alpha.3",
41
- "@warp-drive/core-types": "5.6.0-alpha.3",
38
+ "@ember-data/store": "5.6.0-alpha.5",
39
+ "@ember-data/request": "5.6.0-alpha.5",
40
+ "@ember-data/request-utils": "5.6.0-alpha.5",
41
+ "@warp-drive/core-types": "5.6.0-alpha.5",
42
42
  "ember-provide-consume-context": "^0.7.0"
43
43
  },
44
44
  "dependencies": {
45
45
  "@embroider/macros": "^1.16.12",
46
- "@warp-drive/build-config": "5.6.0-alpha.3"
46
+ "@warp-drive/build-config": "5.6.0-alpha.5"
47
47
  },
48
48
  "peerDependenciesMeta": {
49
49
  "ember-provide-consume-context": {
@@ -58,19 +58,19 @@
58
58
  "@babel/runtime": "^7.27.0",
59
59
  "@glimmer/component": "^2.0.0",
60
60
  "@glimmer/validator": "^0.94.8",
61
- "@glint/core": "1.5.2",
62
- "@glint/environment-ember-loose": "1.5.2",
63
- "@glint/environment-ember-template-imports": "1.5.2",
64
- "@glint/template": "1.5.2",
61
+ "@glint/core": "unstable",
62
+ "@glint/environment-ember-loose": "unstable",
63
+ "@glint/environment-ember-template-imports": "unstable",
64
+ "@glint/template": "unstable",
65
65
  "decorator-transforms": "^2.3.0",
66
66
  "@embroider/addon-dev": "^7.1.3",
67
- "@ember-data/request": "5.6.0-alpha.3",
68
- "@ember-data/request-utils": "5.6.0-alpha.3",
69
- "@ember-data/store": "5.6.0-alpha.3",
67
+ "@ember-data/request": "5.6.0-alpha.5",
68
+ "@ember-data/request-utils": "5.6.0-alpha.5",
69
+ "@ember-data/store": "5.6.0-alpha.5",
70
70
  "@ember/test-helpers": "5.2.0",
71
71
  "@ember/test-waiters": "^4.1.0",
72
- "@warp-drive/core-types": "5.6.0-alpha.3",
73
- "@warp-drive/internal-config": "5.6.0-alpha.3",
72
+ "@warp-drive/core-types": "5.6.0-alpha.5",
73
+ "@warp-drive/internal-config": "5.6.0-alpha.5",
74
74
  "babel-plugin-ember-template-compilation": "^2.4.1",
75
75
  "ember-template-imports": "^4.3.0",
76
76
  "ember-source": "~6.3.0",
@@ -79,9 +79,6 @@
79
79
  "vite": "^5.4.15",
80
80
  "ember-provide-consume-context": "^0.7.0"
81
81
  },
82
- "engines": {
83
- "node": ">= 18.20.8"
84
- },
85
82
  "volta": {
86
83
  "extends": "../../package.json"
87
84
  },
@@ -101,7 +98,6 @@
101
98
  }
102
99
  },
103
100
  "scripts": {
104
- "build:glint": "glint && glint --build",
105
101
  "build:pkg": "vite build;",
106
102
  "sync": "echo \"syncing\"",
107
103
  "_temporarily_deactivated_lint": "eslint . --quiet --cache --cache-strategy=content",
@@ -1,7 +1,4 @@
1
- declare module '@warp-drive/ember/-private/await' {
2
- /**
3
- * @module @warp-drive/ember
4
- */
1
+ declare module '@warp-drive/ember/-private/await.gts' {
5
2
  import type Owner from '@ember/owner';
6
3
  import Component from '@glimmer/component';
7
4
  import type { Awaitable } from '@ember-data/request';
@@ -79,4 +76,4 @@ declare module '@warp-drive/ember/-private/await' {
79
76
  }
80
77
  export {};
81
78
  }
82
- //# sourceMappingURL=await.d.ts.map
79
+ //# sourceMappingURL=await.gts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"await.gts.d.ts","sourceRoot":"","sources":["../../src/-private/await.gts"],"names":[],"mappings":"AAAA,OA4GO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAE3C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAGrD,eAAO,MAAM,GAAG,GAAI,GAAG,OAAO,EAAE,GAAG,OAAO,YAAoB,CAAC;AAC/D,UAAU,cAAc,CAAC,CAAC,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM;IAClD,IAAI,EAAE;QACJ,KAAK,EAAE,CAAC,CAAC;KACV,CAAC;CACH;AAED;;;;;;;;;;;;GAYG;AACH,qBAAa,KAAK,CAAC,CAAC,CAAE,SAAQ,SAAS,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;gBAC5C,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;CAU1D;AAED,UAAU,cAAc,CAAC,CAAC,EAAE,CAAC,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM;IACrD,IAAI,EAAE;QACJ,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;KACvC,CAAC;IACF,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;QACZ,KAAK,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;QAClB,OAAO,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;KACrB,CAAC;CACH;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,qBAAa,KAAK,CAAC,CAAC,EAAE,CAAC,CAAE,SAAQ,SAAS,CAAC,cAAc,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAC9D,IAAI,KAAK,sEAER;IAED,IAAI,KAAK,IACoB,CAAC,CAC7B;IAED,IAAI,MAAM,IACoB,CAAC,CAC9B;CAyBF"}
@@ -1,7 +1,4 @@
1
- declare module '@warp-drive/ember/-private/request' {
2
- /**
3
- * @module @warp-drive/ember
4
- */
1
+ declare module '@warp-drive/ember/-private/request.gts' {
5
2
  import type Owner from '@ember/owner';
6
3
  import Component from '@glimmer/component';
7
4
  import type { Future, StructuredErrorDocument } from '@ember-data/request';
@@ -25,7 +22,6 @@ declare module '@warp-drive/ember/-private/request' {
25
22
  * The request to monitor. This should be a `Future` instance returned
26
23
  * by either the `store.request` or `store.requestManager.request` methods.
27
24
  *
28
- * @typedoc
29
25
  */
30
26
  request?: Future<RT>;
31
27
  /**
@@ -33,7 +29,6 @@ declare module '@warp-drive/ember/-private/request' {
33
29
  * passed to `store.request`. Use this in place of `@request` if you would
34
30
  * like the component to also initiate the request.
35
31
  *
36
- * @typedoc
37
32
  */
38
33
  query?: StoreRequestInput<RT, T>;
39
34
  /**
@@ -43,7 +38,6 @@ declare module '@warp-drive/ember/-private/request' {
43
38
  * This is required if the store is not available via context or should be
44
39
  * different from the store provided via context.
45
40
  *
46
- * @typedoc
47
41
  */
48
42
  store?: Store;
49
43
  /**
@@ -58,7 +52,6 @@ declare module '@warp-drive/ember/-private/request' {
58
52
  *
59
53
  * Defaults to `false`.
60
54
  *
61
- * @typedoc
62
55
  */
63
56
  autorefresh?: AutorefreshBehaviorCombos;
64
57
  /**
@@ -70,7 +63,6 @@ declare module '@warp-drive/ember/-private/request' {
70
63
  *
71
64
  * Defaults to `30_000` (30 seconds).
72
65
  *
73
- * @typedoc
74
66
  */
75
67
  autorefreshThreshold?: number;
76
68
  /**
@@ -84,7 +76,6 @@ declare module '@warp-drive/ember/-private/request' {
84
76
  *
85
77
  * Defaults to `'policy'`.
86
78
  *
87
- * @typedoc
88
79
  */
89
80
  autorefreshBehavior?: 'refresh' | 'reload' | 'policy';
90
81
  };
@@ -92,19 +83,16 @@ declare module '@warp-drive/ember/-private/request' {
92
83
  /**
93
84
  * The block to render when the component is idle and waiting to be given a request.
94
85
  *
95
- * @typedoc
96
86
  */
97
87
  idle: [];
98
88
  /**
99
89
  * The block to render when the request is loading.
100
90
  *
101
- * @typedoc
102
91
  */
103
92
  loading: [state: RequestLoadingState];
104
93
  /**
105
94
  * The block to render when the request was cancelled.
106
95
  *
107
- * @typedoc
108
96
  */
109
97
  cancelled: [
110
98
  error: StructuredErrorDocument<E>,
@@ -121,7 +109,6 @@ declare module '@warp-drive/ember/-private/request' {
121
109
  * Thus it is required to provide an error block and proper error handling if
122
110
  * you do not want the error to crash the application.
123
111
  *
124
- * @typedoc
125
112
  */
126
113
  error: [
127
114
  error: StructuredErrorDocument<E>,
@@ -134,7 +121,6 @@ declare module '@warp-drive/ember/-private/request' {
134
121
  /**
135
122
  * The block to render when the request succeeded.
136
123
  *
137
- * @typedoc
138
124
  */
139
125
  content: [value: RT, features: ContentFeatures<RT>];
140
126
  always: [state: RequestState<RT, T, StructuredErrorDocument<E>>];
@@ -499,4 +485,4 @@ declare module '@warp-drive/ember/-private/request' {
499
485
  }
500
486
  export {};
501
487
  }
502
- //# sourceMappingURL=request.d.ts.map
488
+ //# sourceMappingURL=request.gts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request.gts.d.ts","sourceRoot":"","sources":["../../src/-private/request.gts"],"names":[],"mappings":"AAAA,OA86BO,KAAK,KAAK,MAAM,cAAc,CAAC;AAEtC,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAK3C,OAAO,KAAK,EAAE,MAAM,EAAE,uBAAuB,EAAE,MAA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;IAqFnB,mBAAmB;IAQnB;;;;;OAKG;IACH,gBAAgB;IAgChB;;;;;;;;;;;;OAYG;IACH,WAAW,CAAC,IAAI,CAAC,EAAE,QAAQ,GAAG,SAAS,GAAG,QAAQ,GAAG,aAAa,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,IAAI;IA+E3F;;;;OAIG;IACH,KAAK,sBAGH;IAEF;;;;OAIG;IACH,OAAO,sBAGL;IAEF,IACI,aAAa;;;;MAMhB;IAED,IACI,eAAe,wBAiBlB;IAED,WAAW;IAiBX,IACI,QAAQ,IAAI,MAAM,CAAC,EAAE,CAAC,CAmBzB;IAED,IACI,OAAO,IAAI,MAAM,CAAC,EAAE,CAAC,CAIxB;IAED,IAAI,KAAK,IAAI,KAAK,CASjB;IAED,IAAI,QAAQ,8DAEX;IAED,IAAI,MAAM,IACuB,EAAE,CAClC;CA+CF"}
@@ -1,6 +1,6 @@
1
1
  /// <reference path="./install.d.ts" />
2
- /// <reference path="./-private/request.d.ts" />
3
- /// <reference path="./-private/await.d.ts" />
2
+ /// <reference path="./-private/await.gts.d.ts" />
3
+ /// <reference path="./-private/request.gts.d.ts" />
4
4
  declare module '@warp-drive/ember' {
5
5
  /**
6
6
  * <h3 align="center">⚛️ Data utilities for using <em style="color: lightgreen">Warp</em><strong style="color: magenta">Drive</strong> with 🐹 <em style="color: orange">Ember</em><em style="color: lightblue">.js</em></h3>
@@ -45,8 +45,7 @@ declare module '@warp-drive/ember' {
45
45
  * <WarpDriveAwait @promise={{this.getTheData}}></WarpDriveAwait>
46
46
  * ```
47
47
  *
48
- * @module @warp-drive/ember
49
- * @main @warp-drive/ember
48
+ * @module
50
49
  */
51
50
  export { Request } from './-private/request';
52
51
  export { Await, Throw } from './-private/await';
@@ -120,10 +119,7 @@ declare module '@warp-drive/ember' {
120
119
  * ```
121
120
  *
122
121
  * If looking to use in a template, consider also the `<Await />` component.
123
- *
124
- * @method getPromiseState
125
- * @for @warp-drive/ember
126
- * @static
122
+
127
123
  * @public
128
124
  * @param {Promise<T> | Awaitable<T, E>} promise
129
125
  * @return {PromiseState<T, E>}
@@ -216,9 +212,6 @@ declare module '@warp-drive/ember' {
216
212
  * which offers a numbe of additional capabilities for requests *beyond* what
217
213
  * `RequestState` provides.
218
214
  *
219
- * @method getRequestState
220
- * @for @warp-drive/ember
221
- * @static
222
215
  * @public
223
216
  * @param future
224
217
  * @return {RequestState}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAEpD;;;;;;;;;;;;;;;;;;;GAmBG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAE7D;;;;;;;GAOG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDG;AACH,OAAO,EAAE,eAAe,EAAE,KAAK,mBAAmB,EAAE,MAAM,4BAA4B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAEpD;;;;;;;;;;;;;;;;;;;GAmBG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAE7D;;;;;;;GAOG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AACH,OAAO,EAAE,eAAe,EAAE,KAAK,mBAAmB,EAAE,MAAM,4BAA4B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../src/install.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAQzD,KAAK,GAAG,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAG7C,wBAAgB,iBAAiB,CAAC,OAAO,EAAE;IACzC,SAAS,EAAE;QACT,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;KACxB,CAAC;CACH;sBAIqB,MAAM,OAAO,MAAM,GAAG,MAAM;0BAQxB,GAAG,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;yBAYtB,GAAG,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;iBAW7B,CAAC,UAAU,MAAM,OAAO,MAAM,GAAG,MAAM,MAAM,MAAM,CAAC,KAAG,CAAC,MAAM,CAAC,CAAC;;EAwBhF"}
1
+ {"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../src/install.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AASzD,KAAK,GAAG,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAG7C,wBAAgB,iBAAiB,CAAC,OAAO,EAAE;IACzC,SAAS,EAAE;QACT,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;KACxB,CAAC;CACH;sBAIqB,MAAM,OAAO,MAAM,GAAG,MAAM;0BAQxB,GAAG,GAAG,CAAC,GAAG,EAAE,GA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