@ember-data/tracking 5.6.0-alpha.2 → 5.6.0-alpha.4

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
@@ -2,7 +2,84 @@ import { tagForProperty } from '@ember/-internals/metal';
2
2
  import { _backburner } from '@ember/runloop';
3
3
  import { createCache, track, updateTag, consumeTag, getValue, dirtyTag } from '@glimmer/validator';
4
4
  import { macroCondition, getGlobalConfig } from '@embroider/macros';
5
+
6
+ /**
7
+ * # ~~@ember-data/tracking~~ <Badge type="warning" text="deprecated v5.5" />
8
+ *
9
+ * Using ***Warp*Drive** with EmberJS requires configuring it to use Ember's reactivity system.
10
+ *
11
+ * ::: warning
12
+ * The use of the package **@ember-data/tracking** is now deprecated. It
13
+ * historically provided the bindings into Ember's reactivity system.
14
+ *
15
+ * This package is no longer needed as the configuration is now
16
+ * provided by the package [@warp-drive/ember](../../@warp-drive/ember).
17
+ * :::
18
+ *
19
+ * To resolve this deprecation, follow these steps:
20
+ *
21
+ * ## 1. Remove @ember-data/tracking
22
+ *
23
+ * - Remove `@ember-data/tracking` from package.json (if using `ember-data` this may not be present)
24
+ * - Remove type imports for `@ember-data/tracking` from tsconfig.json
25
+ * - If using `untracked`, change to using `untrack` from `@glimmer/validator`
26
+ *
27
+ * ## 2. Add @warp-drive/ember
28
+ *
29
+ * - Add `@warp-drive/ember` to package.json - the version to install should match the version of `ember-data` or `@ember-data/store`
30
+ * - Add `@warp-drive/ember` to tsconfig.json - the types import follows the same pattern (currently this means adding `@warp-drive/ember/unstable-preview-types` to the types array)
31
+ * - Add `import '@warp-drive/ember/install';` to the top of your `app.js` or `app.ts` file
32
+ *
33
+ * ## 3. Clear the deprecation
34
+ *
35
+ * Once the above steps are complete, the deprecation can be silenced and the automatic fallback
36
+ * registration of reactivity from `@ember-data/tracking` can be removed by updating your [WarpDrive
37
+ * build config](../../@warp-drive/build-config) in your `ember-cli-build` file.
38
+ *
39
+ * ```js [ember-cli-build.js]
40
+ * 'use strict';
41
+ * const EmberApp = require('ember-cli/lib/broccoli/ember-app');
42
+ * const { compatBuild } = require('@embroider/compat');
43
+ *
44
+ * module.exports = async function (defaults) {
45
+ * const { setConfig } = await import('@warp-drive/build-config'); // [!code focus]
46
+ * const { buildOnce } = await import('@embroider/vite');
47
+ * const app = new EmberApp(defaults, {});
48
+ *
49
+ * setConfig(app, __dirname, { // [!code focus:9]
50
+ * // this should be the most recent <major>.<minor> version for
51
+ * // which all deprecations have been fully resolved
52
+ * // and should be updated when that changes
53
+ * compatWith: '4.12'
54
+ * deprecations: {
55
+ * // ... list individual deprecations that have been resolved here
56
+ * DEPRECATE_TRACKING_PACKAGE: false // [!code highlight]
57
+ * }
58
+ * });
59
+ *
60
+ * return compatBuild(app, buildOnce);
61
+ * };
62
+ *```
63
+ *
64
+ * @deprecated in version 5.5.0
65
+ * @module
66
+ */
5
67
  const emberDirtyTag = dirtyTag;
68
+
69
+ /**
70
+ * <Badge type="warning" text="deprecated" />
71
+ *
72
+ * Creates a signal configuration object for WarpDrive that integrates with Ember's
73
+ * reactivity system. This will be automatically imported and registered by
74
+ * `@ember-data/store` if the deprecation has not been resolved.
75
+ *
76
+ * This function should not be called directly in your application code
77
+ * and this package is deprecated entirely, see the [package overview](../../)
78
+ * for more details.
79
+ *
80
+ * @deprecated
81
+ * @public
82
+ */
6
83
  function buildSignalConfig(options) {
7
84
  const ARRAY_SIGNAL = options.wellknown.Array;
8
85
  return {
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../src/index.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\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 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\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 };\n}\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"],"mappings":";;;;;AAQA,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;MACAE,UAAU,CAACF,MAAa,CAAC;KAC1B;IACDG,YAAYA,CAACH,MAA6B,EAAE;MAC1C,IAAAP,cAAA,CAAAC,eAAA,EAAA,CAAAC,SAAA,CAAAC,YAAA,CAAAC,yBAAA,CAA+B,EAAA;AAC7B,QAAA,IAAIR,KAAK,CAACY,O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type=\"warning\" text=\"deprecated v5.5\" />\n *\n * Using ***Warp*Drive** with EmberJS requires configuring it to use Ember's reactivity system.\n *\n * ::: warning\n * The use of the package **@ember-data/tracking** is now deprecated. It\n * historically provided the bindings into Ember's reactivity system.\n *\n * This package is no longer needed as the configuration is now\n * provided by the package [@warp-drive/ember](../../@warp-drive/ember).\n * :::\n *\n * To resolve this deprecation, follow these steps:\n *\n * ## 1. Remove @ember-data/tracking\n *\n * - Remove `@ember-data/tracking` from package.json (if using `ember-data` this may not be present)\n * - Remove type imports for `@ember-data/tracking` from tsconfig.json\n * - If using `untracked`, change to using `untrack` from `@glimmer/validator`\n *\n * ## 2. Add @warp-drive/ember\n *\n * - Add `@warp-drive/ember` to package.json - the version to install should match the version of `ember-data` or `@ember-data/store`\n * - Add `@warp-drive/ember` to tsconfig.json - the types import follows the same pattern (currently this means adding `@warp-drive/ember/unstable-preview-types` to the types array)\n * - Add `import '@warp-drive/ember/install';` to the top of your `app.js` or `app.ts` file\n *\n * ## 3. Clear the deprecation\n *\n * Once the above steps are complete, the deprecation can be silenced and the automatic fallback\n * registration of reactivity from `@ember-data/tracking` can be removed by updating your [WarpDrive\n * build config](../../@warp-drive/build-config) in your `ember-cli-build` file.\n *\n * ```js [ember-cli-build.js]\n * 'use strict';\n * const EmberApp = require('ember-cli/lib/broccoli/ember-app');\n * const { compatBuild } = require('@embroider/compat');\n *\n * module.exports = async function (defaults) {\n * const { setConfig } = await import('@warp-drive/build-config'); // [!code focus]\n * const { buildOnce } = await import('@embroider/vite');\n * const app = new EmberApp(defaults, {});\n *\n * setConfig(app, __dirname, { // [!code focus:9]\n * // this should be the most recent <major>.<minor> version for\n * // which all deprecations have been fully resolved\n * // and should be updated when that changes\n * compatWith: '4.12'\n * deprecations: {\n * // ... list individual deprecations that have been resolved here\n * DEPRECATE_TRACKING_PACKAGE: false // [!code highlight]\n * }\n * });\n *\n * return compatBuild(app, buildOnce);\n * };\n *```\n *\n * @deprecated in version 5.5.0\n * @module\n */\nimport { tagForProperty } from '@ember/-internals/metal';\nimport { _backburner } from '@ember/runloop';\nimport { consumeTag, createCache, dirtyTag, getValue, track, type UpdatableTag, updateTag } from '@glimmer/validator';\n\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\n/**\n * <Badge type=\"warning\" text=\"deprecated\" />\n *\n * Creates a signal configuration object for WarpDrive that integrates with Ember's\n * reactivity system. This will be automatically imported and registered by\n * `@ember-data/store` if the deprecation has not been resolved.\n *\n * This function should not be called directly in your application code\n * and this package is deprecated entirely, see the [package overview](../../)\n * for more details.\n *\n * @deprecated\n * @public\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 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\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 };\n}\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"],"mappings":";;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AASA,MAAMA,aAAa,GAAGC,QAAyC;;AAE/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,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,YA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,CAA+B,EAAA;AAC7B,QAAA,MAAMU,WAAW,GAAGT,cAAc,CAACO,MAAM,EAAEb,GAAG,CAAiB;AAC/D,QAAA,MAAMgB,IAAI,GAAGC,WAAW,CAACH,EAAE,CAAC;AAC5B,QAAA,IAAII,GAAkB;QACtB,MAAMC,SAAS,GAAGA,MAAM;AACtBD,UAAAA,GAAG,GAAGE,QAAQ,CAACJ,IAAI,CAAM;SAC1B;AACD,QAAA,OAAO,MAAM;AACX,UAAA,MAAMK,GAAG,GAAGC,KAAK,CAACH,SAAS,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;;;;"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ember-data/tracking",
3
3
  "description": "DEPRECATED - Use @warp-drive/ember",
4
- "version": "5.6.0-alpha.2",
4
+ "version": "5.6.0-alpha.4",
5
5
  "deprecated": "Use @warp-drive/ember",
6
6
  "private": false,
7
7
  "license": "MIT",
@@ -21,10 +21,10 @@
21
21
  },
22
22
  "dependencies": {
23
23
  "@embroider/macros": "^1.16.12",
24
- "@warp-drive/build-config": "5.6.0-alpha.2"
24
+ "@warp-drive/build-config": "5.6.0-alpha.4"
25
25
  },
26
26
  "peerDependencies": {
27
- "@warp-drive/core-types": "5.6.0-alpha.2"
27
+ "@warp-drive/core-types": "5.6.0-alpha.4"
28
28
  },
29
29
  "files": [
30
30
  "unstable-preview-types",
@@ -58,8 +58,8 @@
58
58
  "@babel/preset-typescript": "^7.27.0",
59
59
  "@glimmer/component": "^2.0.0",
60
60
  "@glimmer/validator": "^0.94.8",
61
- "@warp-drive/core-types": "5.6.0-alpha.2",
62
- "@warp-drive/internal-config": "5.6.0-alpha.2",
61
+ "@warp-drive/core-types": "5.6.0-alpha.4",
62
+ "@warp-drive/internal-config": "5.6.0-alpha.4",
63
63
  "ember-source": "~6.3.0",
64
64
  "typescript": "^5.8.3",
65
65
  "vite": "^5.4.15"
@@ -1,7 +1,82 @@
1
1
 
2
2
  declare module '@ember-data/tracking' {
3
+ /**
4
+ * # ~~@ember-data/tracking~~ <Badge type="warning" text="deprecated v5.5" />
5
+ *
6
+ * Using ***Warp*Drive** with EmberJS requires configuring it to use Ember's reactivity system.
7
+ *
8
+ * ::: warning
9
+ * The use of the package **@ember-data/tracking** is now deprecated. It
10
+ * historically provided the bindings into Ember's reactivity system.
11
+ *
12
+ * This package is no longer needed as the configuration is now
13
+ * provided by the package [@warp-drive/ember](../../@warp-drive/ember).
14
+ * :::
15
+ *
16
+ * To resolve this deprecation, follow these steps:
17
+ *
18
+ * ## 1. Remove @ember-data/tracking
19
+ *
20
+ * - Remove `@ember-data/tracking` from package.json (if using `ember-data` this may not be present)
21
+ * - Remove type imports for `@ember-data/tracking` from tsconfig.json
22
+ * - If using `untracked`, change to using `untrack` from `@glimmer/validator`
23
+ *
24
+ * ## 2. Add @warp-drive/ember
25
+ *
26
+ * - Add `@warp-drive/ember` to package.json - the version to install should match the version of `ember-data` or `@ember-data/store`
27
+ * - Add `@warp-drive/ember` to tsconfig.json - the types import follows the same pattern (currently this means adding `@warp-drive/ember/unstable-preview-types` to the types array)
28
+ * - Add `import '@warp-drive/ember/install';` to the top of your `app.js` or `app.ts` file
29
+ *
30
+ * ## 3. Clear the deprecation
31
+ *
32
+ * Once the above steps are complete, the deprecation can be silenced and the automatic fallback
33
+ * registration of reactivity from `@ember-data/tracking` can be removed by updating your [WarpDrive
34
+ * build config](../../@warp-drive/build-config) in your `ember-cli-build` file.
35
+ *
36
+ * ```js [ember-cli-build.js]
37
+ * 'use strict';
38
+ * const EmberApp = require('ember-cli/lib/broccoli/ember-app');
39
+ * const { compatBuild } = require('@embroider/compat');
40
+ *
41
+ * module.exports = async function (defaults) {
42
+ * const { setConfig } = await import('@warp-drive/build-config'); // [!code focus]
43
+ * const { buildOnce } = await import('@embroider/vite');
44
+ * const app = new EmberApp(defaults, {});
45
+ *
46
+ * setConfig(app, __dirname, { // [!code focus:9]
47
+ * // this should be the most recent <major>.<minor> version for
48
+ * // which all deprecations have been fully resolved
49
+ * // and should be updated when that changes
50
+ * compatWith: '4.12'
51
+ * deprecations: {
52
+ * // ... list individual deprecations that have been resolved here
53
+ * DEPRECATE_TRACKING_PACKAGE: false // [!code highlight]
54
+ * }
55
+ * });
56
+ *
57
+ * return compatBuild(app, buildOnce);
58
+ * };
59
+ *```
60
+ *
61
+ * @deprecated in version 5.5.0
62
+ * @module
63
+ */
3
64
  import { tagForProperty } from '@ember/-internals/metal';
4
65
  type Tag = ReturnType<typeof tagForProperty>;
66
+ /**
67
+ * <Badge type="warning" text="deprecated" />
68
+ *
69
+ * Creates a signal configuration object for WarpDrive that integrates with Ember's
70
+ * reactivity system. This will be automatically imported and registered by
71
+ * `@ember-data/store` if the deprecation has not been resolved.
72
+ *
73
+ * This function should not be called directly in your application code
74
+ * and this package is deprecated entirely, see the [package overview](../../)
75
+ * for more details.
76
+ *
77
+ * @deprecated
78
+ * @public
79
+ */
5
80
  export function buildSignalConfig(options: {
6
81
  wellknown: {
7
82
  Array: symbol | string;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAOzD,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;yBAWtB,GAAG,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;iBAY7B,CAAC,UAAU,MAAM,OAAO,MAAM,GAAG,MAAM,MAAM,MAAM,CAAC,KAAG,CAAC,MAAM,CAAC,CAAC;;EAwBhF"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DG;AACH,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAOzD,KAAK,GAAG,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAG7C;;;;;;;;;;;;;GAaG;AACH,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;yBAWtB,GAAG,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;iBAY7B,CAAC,UAAU,MAAM,OAAO,MAAM,GAAG,MAAM,MAAM,MAAM,CAAC,KAAG,CAAC,MAAM,CAAC,CAAC;;EAwBhF"}