From f070fa08555d5436bd770f2878ea7d06e3ece088 Mon Sep 17 00:00:00 2001 From: ijlee2 Date: Wed, 5 Jul 2023 10:25:01 +0200 Subject: [PATCH 01/12] chore: Temporarily committed dist --- .gitignore | 2 +- ember-container-query/.gitignore | 2 +- .../dist/_app_/components/container-query.js | 1 + .../dist/_app_/helpers/aspect-ratio.js | 1 + .../dist/_app_/helpers/height.js | 1 + .../dist/_app_/helpers/width.js | 1 + .../dist/_app_/modifiers/container-query.js | 1 + .../dist/applyDecoratedDescriptor-fa858ac4.js | 77 +++++++++++++ .../applyDecoratedDescriptor-fa858ac4.js.map | 1 + .../dist/components/container-query.css | 4 + .../dist/components/container-query.d.ts | 30 +++++ .../dist/components/container-query.d.ts.map | 1 + .../dist/components/container-query.js | 41 +++++++ .../dist/components/container-query.js.map | 1 + .../dist/helpers/aspect-ratio.d.ts | 13 +++ .../dist/helpers/aspect-ratio.js | 15 +++ .../dist/helpers/aspect-ratio.js.map | 1 + .../dist/helpers/height.d.ts | 13 +++ ember-container-query/dist/helpers/height.js | 15 +++ .../dist/helpers/height.js.map | 1 + ember-container-query/dist/helpers/width.d.ts | 13 +++ ember-container-query/dist/helpers/width.js | 15 +++ .../dist/helpers/width.js.map | 1 + ember-container-query/dist/index.d.ts | 6 + ember-container-query/dist/index.js | 6 + ember-container-query/dist/index.js.map | 1 + .../dist/modifiers/container-query.d.ts | 53 +++++++++ .../dist/modifiers/container-query.js | 106 ++++++++++++++++++ .../dist/modifiers/container-query.js.map | 1 + .../dist/template-registry.d.ts | 13 +++ .../dist/template-registry.js | 2 + .../dist/template-registry.js.map | 1 + 32 files changed, 438 insertions(+), 2 deletions(-) create mode 100644 ember-container-query/dist/_app_/components/container-query.js create mode 100644 ember-container-query/dist/_app_/helpers/aspect-ratio.js create mode 100644 ember-container-query/dist/_app_/helpers/height.js create mode 100644 ember-container-query/dist/_app_/helpers/width.js create mode 100644 ember-container-query/dist/_app_/modifiers/container-query.js create mode 100644 ember-container-query/dist/applyDecoratedDescriptor-fa858ac4.js create mode 100644 ember-container-query/dist/applyDecoratedDescriptor-fa858ac4.js.map create mode 100644 ember-container-query/dist/components/container-query.css create mode 100644 ember-container-query/dist/components/container-query.d.ts create mode 100644 ember-container-query/dist/components/container-query.d.ts.map create mode 100644 ember-container-query/dist/components/container-query.js create mode 100644 ember-container-query/dist/components/container-query.js.map create mode 100644 ember-container-query/dist/helpers/aspect-ratio.d.ts create mode 100644 ember-container-query/dist/helpers/aspect-ratio.js create mode 100644 ember-container-query/dist/helpers/aspect-ratio.js.map create mode 100644 ember-container-query/dist/helpers/height.d.ts create mode 100644 ember-container-query/dist/helpers/height.js create mode 100644 ember-container-query/dist/helpers/height.js.map create mode 100644 ember-container-query/dist/helpers/width.d.ts create mode 100644 ember-container-query/dist/helpers/width.js create mode 100644 ember-container-query/dist/helpers/width.js.map create mode 100644 ember-container-query/dist/index.d.ts create mode 100644 ember-container-query/dist/index.js create mode 100644 ember-container-query/dist/index.js.map create mode 100644 ember-container-query/dist/modifiers/container-query.d.ts create mode 100644 ember-container-query/dist/modifiers/container-query.js create mode 100644 ember-container-query/dist/modifiers/container-query.js.map create mode 100644 ember-container-query/dist/template-registry.d.ts create mode 100644 ember-container-query/dist/template-registry.js create mode 100644 ember-container-query/dist/template-registry.js.map diff --git a/.gitignore b/.gitignore index 404ebadb..f9203b0e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ # compiled output -dist/ +# dist/ tmp/ # dependencies diff --git a/ember-container-query/.gitignore b/ember-container-query/.gitignore index 887e2ec0..24d55b6f 100644 --- a/ember-container-query/.gitignore +++ b/ember-container-query/.gitignore @@ -1,5 +1,5 @@ # compiled output -/dist/ +# /dist/ # dependencies /node_modules/ diff --git a/ember-container-query/dist/_app_/components/container-query.js b/ember-container-query/dist/_app_/components/container-query.js new file mode 100644 index 00000000..c22cf946 --- /dev/null +++ b/ember-container-query/dist/_app_/components/container-query.js @@ -0,0 +1 @@ +export { default } from "ember-container-query/components/container-query"; diff --git a/ember-container-query/dist/_app_/helpers/aspect-ratio.js b/ember-container-query/dist/_app_/helpers/aspect-ratio.js new file mode 100644 index 00000000..21411240 --- /dev/null +++ b/ember-container-query/dist/_app_/helpers/aspect-ratio.js @@ -0,0 +1 @@ +export { default } from "ember-container-query/helpers/aspect-ratio"; diff --git a/ember-container-query/dist/_app_/helpers/height.js b/ember-container-query/dist/_app_/helpers/height.js new file mode 100644 index 00000000..0dbfde3a --- /dev/null +++ b/ember-container-query/dist/_app_/helpers/height.js @@ -0,0 +1 @@ +export { default } from "ember-container-query/helpers/height"; diff --git a/ember-container-query/dist/_app_/helpers/width.js b/ember-container-query/dist/_app_/helpers/width.js new file mode 100644 index 00000000..5a4345cc --- /dev/null +++ b/ember-container-query/dist/_app_/helpers/width.js @@ -0,0 +1 @@ +export { default } from "ember-container-query/helpers/width"; diff --git a/ember-container-query/dist/_app_/modifiers/container-query.js b/ember-container-query/dist/_app_/modifiers/container-query.js new file mode 100644 index 00000000..fa8326ac --- /dev/null +++ b/ember-container-query/dist/_app_/modifiers/container-query.js @@ -0,0 +1 @@ +export { default } from "ember-container-query/modifiers/container-query"; diff --git a/ember-container-query/dist/applyDecoratedDescriptor-fa858ac4.js b/ember-container-query/dist/applyDecoratedDescriptor-fa858ac4.js new file mode 100644 index 00000000..ca2f7957 --- /dev/null +++ b/ember-container-query/dist/applyDecoratedDescriptor-fa858ac4.js @@ -0,0 +1,77 @@ +function _initializerDefineProperty(target, property, descriptor, context) { + if (!descriptor) return; + Object.defineProperty(target, property, { + enumerable: descriptor.enumerable, + configurable: descriptor.configurable, + writable: descriptor.writable, + value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 + }); +} + +function _typeof(obj) { + "@babel/helpers - typeof"; + + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { + return typeof obj; + } : function (obj) { + return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }, _typeof(obj); +} + +function _toPrimitive(input, hint) { + if (_typeof(input) !== "object" || input === null) return input; + var prim = input[Symbol.toPrimitive]; + if (prim !== undefined) { + var res = prim.call(input, hint || "default"); + if (_typeof(res) !== "object") return res; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return (hint === "string" ? String : Number)(input); +} + +function _toPropertyKey(arg) { + var key = _toPrimitive(arg, "string"); + return _typeof(key) === "symbol" ? key : String(key); +} + +function _defineProperty(obj, key, value) { + key = _toPropertyKey(key); + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + return obj; +} + +function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { + var desc = {}; + Object.keys(descriptor).forEach(function (key) { + desc[key] = descriptor[key]; + }); + desc.enumerable = !!desc.enumerable; + desc.configurable = !!desc.configurable; + if ('value' in desc || desc.initializer) { + desc.writable = true; + } + desc = decorators.slice().reverse().reduce(function (desc, decorator) { + return decorator(target, property, desc) || desc; + }, desc); + if (context && desc.initializer !== void 0) { + desc.value = desc.initializer ? desc.initializer.call(context) : void 0; + desc.initializer = undefined; + } + if (desc.initializer === void 0) { + Object.defineProperty(target, property, desc); + desc = null; + } + return desc; +} + +export { _applyDecoratedDescriptor as _, _initializerDefineProperty as a, _defineProperty as b }; +//# sourceMappingURL=applyDecoratedDescriptor-fa858ac4.js.map diff --git a/ember-container-query/dist/applyDecoratedDescriptor-fa858ac4.js.map b/ember-container-query/dist/applyDecoratedDescriptor-fa858ac4.js.map new file mode 100644 index 00000000..d35c27e0 --- /dev/null +++ b/ember-container-query/dist/applyDecoratedDescriptor-fa858ac4.js.map @@ -0,0 +1 @@ +{"version":3,"file":"applyDecoratedDescriptor-fa858ac4.js","sources":["../../node_modules/.pnpm/@babel+runtime@7.22.5/node_modules/@babel/runtime/helpers/esm/initializerDefineProperty.js","../../node_modules/.pnpm/@babel+runtime@7.22.5/node_modules/@babel/runtime/helpers/esm/typeof.js","../../node_modules/.pnpm/@babel+runtime@7.22.5/node_modules/@babel/runtime/helpers/esm/toPrimitive.js","../../node_modules/.pnpm/@babel+runtime@7.22.5/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","../../node_modules/.pnpm/@babel+runtime@7.22.5/node_modules/@babel/runtime/helpers/esm/defineProperty.js","../../node_modules/.pnpm/@babel+runtime@7.22.5/node_modules/@babel/runtime/helpers/esm/applyDecoratedDescriptor.js"],"sourcesContent":["export default function _initializerDefineProperty(target, property, descriptor, context) {\n if (!descriptor) return;\n Object.defineProperty(target, property, {\n enumerable: descriptor.enumerable,\n configurable: descriptor.configurable,\n writable: descriptor.writable,\n value: descriptor.initializer ? descriptor.initializer.call(context) : void 0\n });\n}","export default function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, _typeof(obj);\n}","import _typeof from \"./typeof.js\";\nexport default function _toPrimitive(input, hint) {\n if (_typeof(input) !== \"object\" || input === null) return input;\n var prim = input[Symbol.toPrimitive];\n if (prim !== undefined) {\n var res = prim.call(input, hint || \"default\");\n if (_typeof(res) !== \"object\") return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (hint === \"string\" ? String : Number)(input);\n}","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nexport default function _toPropertyKey(arg) {\n var key = toPrimitive(arg, \"string\");\n return _typeof(key) === \"symbol\" ? key : String(key);\n}","import toPropertyKey from \"./toPropertyKey.js\";\nexport default function _defineProperty(obj, key, value) {\n key = toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}","export default function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {\n var desc = {};\n Object.keys(descriptor).forEach(function (key) {\n desc[key] = descriptor[key];\n });\n desc.enumerable = !!desc.enumerable;\n desc.configurable = !!desc.configurable;\n if ('value' in desc || desc.initializer) {\n desc.writable = true;\n }\n desc = decorators.slice().reverse().reduce(function (desc, decorator) {\n return decorator(target, property, desc) || desc;\n }, desc);\n if (context && desc.initializer !== void 0) {\n desc.value = desc.initializer ? desc.initializer.call(context) : void 0;\n desc.initializer = undefined;\n }\n if (desc.initializer === void 0) {\n Object.defineProperty(target, property, desc);\n desc = null;\n }\n return desc;\n}"],"names":["_initializerDefineProperty","target","property","descriptor","context","Object","defineProperty","enumerable","configurable","writable","value","initializer","call","_typeof","obj","Symbol","iterator","constructor","prototype","_toPrimitive","input","hint","prim","toPrimitive","undefined","res","TypeError","String","Number","_toPropertyKey","arg","key","_defineProperty","toPropertyKey","_applyDecoratedDescriptor","decorators","desc","keys","forEach","slice","reverse","reduce","decorator"],"mappings":"AAAe,SAASA,0BAA0BA,CAACC,MAAM,EAAEC,QAAQ,EAAEC,UAAU,EAAEC,OAAO,EAAE;EACxF,IAAI,CAACD,UAAU,EAAE,OAAA;AACjBE,EAAAA,MAAM,CAACC,cAAc,CAACL,MAAM,EAAEC,QAAQ,EAAE;IACtCK,UAAU,EAAEJ,UAAU,CAACI,UAAU;IACjCC,YAAY,EAAEL,UAAU,CAACK,YAAY;IACrCC,QAAQ,EAAEN,UAAU,CAACM,QAAQ;AAC7BC,IAAAA,KAAK,EAAEP,UAAU,CAACQ,WAAW,GAAGR,UAAU,CAACQ,WAAW,CAACC,IAAI,CAACR,OAAO,CAAC,GAAG,KAAK,CAAA;AAC9E,GAAC,CAAC,CAAA;AACJ;;ACRe,SAASS,OAAOA,CAACC,GAAG,EAAE;EACnC,yBAAyB,CAAA;;AAEzB,EAAA,OAAOD,OAAO,GAAG,UAAU,IAAI,OAAOE,MAAM,IAAI,QAAQ,IAAI,OAAOA,MAAM,CAACC,QAAQ,GAAG,UAAUF,GAAG,EAAE;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,CAAA;GACjD,EAAEA,IAAI,CAAC,CAAA;EACR,IAAIhC,OAAO,IAAIgC,IAAI,CAACzB,WAAW,KAAK,KAAK,CAAC,EAAE;AAC1CyB,IAAAA,IAAI,CAAC1B,KAAK,GAAG0B,IAAI,CAACzB,WAAW,GAAGyB,IAAI,CAACzB,WAAW,CAACC,IAAI,CAACR,OAAO,CAAC,GAAG,KAAK,CAAC,CAAA;IACvEgC,IAAI,CAACzB,WAAW,GAAGa,SAAS,CAAA;AAC9B,GAAA;AACA,EAAA,IAAIY,IAAI,CAACzB,WAAW,KAAK,KAAK,CAAC,EAAE;IAC/BN,MAAM,CAACC,cAAc,CAACL,MAAM,EAAEC,QAAQ,EAAEkC,IAAI,CAAC,CAAA;AAC7CA,IAAAA,IAAI,GAAG,IAAI,CAAA;AACb,GAAA;AACA,EAAA,OAAOA,IAAI,CAAA;AACb;;;;","x_google_ignoreList":[0,1,2,3,4,5]} \ No newline at end of file diff --git a/ember-container-query/dist/components/container-query.css b/ember-container-query/dist/components/container-query.css new file mode 100644 index 00000000..414bd961 --- /dev/null +++ b/ember-container-query/dist/components/container-query.css @@ -0,0 +1,4 @@ +.container-query { + height: 100%; + width: 100%; +} \ No newline at end of file diff --git a/ember-container-query/dist/components/container-query.d.ts b/ember-container-query/dist/components/container-query.d.ts new file mode 100644 index 00000000..9bc4f9b3 --- /dev/null +++ b/ember-container-query/dist/components/container-query.d.ts @@ -0,0 +1,30 @@ +import Component from '@glimmer/component'; +import { Dimensions, Features, IndexSignatureParameter, QueryResults } from "../modifiers/container-query.js"; +interface ContainerQuerySignature { + Args: { + dataAttributePrefix?: string; + debounce?: number; + features?: Features; + tagName?: string; + }; + Blocks: { + default: [ + { + dimensions?: Dimensions; + features?: QueryResults; + } + ]; + }; + Element: HTMLElement; +} +declare class ContainerQueryComponent extends Component> { + dimensions?: Dimensions; + queryResults?: QueryResults; + tagName: string; + updateState({ dimensions, queryResults, }: { + dimensions: Dimensions; + queryResults: QueryResults; + }): void; +} +export { ContainerQueryComponent as default }; +//# sourceMappingURL=components/container-query.d.ts.map \ No newline at end of file diff --git a/ember-container-query/dist/components/container-query.d.ts.map b/ember-container-query/dist/components/container-query.d.ts.map new file mode 100644 index 00000000..efea0db4 --- /dev/null +++ b/ember-container-query/dist/components/container-query.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"components/container-query.d.ts","sourceRoot":"","sources":["../src/components/container-query.ts"],"names":[],"mappings":"AAGA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAG3C,OAAO,+DAKN,wCAAqC;AAEtC,UAAU,uBAAuB,CAAC,CAAC,SAAS,uBAAuB;IACjE,IAAI,EAAE;QACJ,mBAAmB,CAAC,EAAE,MAAM,CAAC;QAC7B,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,QAAQ,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC;QACvB,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;IACF,MAAM,EAAE;QACN,OAAO,EAAE;YACP;gBACE,UAAU,CAAC,EAAE,UAAU,CAAC;gBACxB,QAAQ,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC;aAC5B;SACF,CAAC;KACH,CAAC;IACF,OAAO,EAAE,WAAW,CAAC;CACtB;AAED,cAAqB,uBAAuB,CAC1C,CAAC,SAAS,uBAAuB,CACjC,SAAQ,SAAS,CAAC,uBAAuB,CAAC,CAAC,CAAC,CAAC;IACpC,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,YAAY,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC;IAGxC,OAAO,SAA8B;IAE7B,WAAW,CAAC,EAClB,UAAU,EACV,YAAY,GACb,EAAE;QACD,UAAU,EAAE,UAAU,CAAC;QACvB,YAAY,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC;KAC/B,GAAG,IAAI;CAIT"} \ No newline at end of file diff --git a/ember-container-query/dist/components/container-query.js b/ember-container-query/dist/components/container-query.js new file mode 100644 index 00000000..80b58dfd --- /dev/null +++ b/ember-container-query/dist/components/container-query.js @@ -0,0 +1,41 @@ +import { _ as _applyDecoratedDescriptor, a as _initializerDefineProperty, b as _defineProperty } from '../applyDecoratedDescriptor-fa858ac4.js'; +import { setComponentTemplate } from '@ember/component'; +import { precompileTemplate } from '@ember/template-compilation'; +import './container-query.css'; +import { action } from '@ember/object'; +import Component from '@glimmer/component'; +import { tracked } from '@glimmer/tracking'; + +var TEMPLATE = precompileTemplate("{{! @glint-ignore: ember-element-helper needs to provide Glint signature }}\n{{#let (element this.tagName) as |Tag|}}\n \n {{yield\n (hash\n dimensions=this.dimensions\n features=this.queryResults\n )\n }}\n \n{{/let}}"); + +var _class, _descriptor, _descriptor2; +let ContainerQueryComponent = (_class = class ContainerQueryComponent extends Component { + constructor(...args) { + super(...args); + _initializerDefineProperty(this, "dimensions", _descriptor, this); + _initializerDefineProperty(this, "queryResults", _descriptor2, this); + // The dynamic tag is restricted to be immutable + _defineProperty(this, "tagName", this.args.tagName ?? 'div'); + } + updateState({ + dimensions, + queryResults + }) { + this.dimensions = dimensions; + this.queryResults = queryResults; + } +}, (_descriptor = _applyDecoratedDescriptor(_class.prototype, "dimensions", [tracked], { + configurable: true, + enumerable: true, + writable: true, + initializer: null +}), _descriptor2 = _applyDecoratedDescriptor(_class.prototype, "queryResults", [tracked], { + configurable: true, + enumerable: true, + writable: true, + initializer: null +}), _applyDecoratedDescriptor(_class.prototype, "updateState", [action], Object.getOwnPropertyDescriptor(_class.prototype, "updateState"), _class.prototype)), _class); +setComponentTemplate(TEMPLATE, ContainerQueryComponent); + +export { ContainerQueryComponent as default }; +//# sourceMappingURL=container-query.js.map diff --git a/ember-container-query/dist/components/container-query.js.map b/ember-container-query/dist/components/container-query.js.map new file mode 100644 index 00000000..9a2a7cfb --- /dev/null +++ b/ember-container-query/dist/components/container-query.js.map @@ -0,0 +1 @@ +{"version":3,"file":"container-query.js","sources":["../../src/components/container-query.hbs.js","../../src/components/container-query.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{! @glint-ignore: ember-element-helper needs to provide Glint signature }}\\n{{#let (element this.tagName) as |Tag|}}\\n \\n {{yield\\n (hash\\n dimensions=this.dimensions\\n features=this.queryResults\\n )\\n }}\\n \\n{{/let}}\")","import './container-query.css';\n\nimport { action } from '@ember/object';\nimport Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\n\nimport type {\n Dimensions,\n Features,\n IndexSignatureParameter,\n QueryResults,\n} from '../modifiers/container-query';\n\ninterface ContainerQuerySignature {\n Args: {\n dataAttributePrefix?: string;\n debounce?: number;\n features?: Features;\n tagName?: string;\n };\n Blocks: {\n default: [\n {\n dimensions?: Dimensions;\n features?: QueryResults;\n },\n ];\n };\n Element: HTMLElement;\n}\n\nexport default class ContainerQueryComponent<\n T extends IndexSignatureParameter,\n> extends Component> {\n @tracked dimensions?: Dimensions;\n @tracked queryResults?: QueryResults;\n\n // The dynamic tag is restricted to be immutable\n tagName = this.args.tagName ?? 'div';\n\n @action updateState({\n dimensions,\n queryResults,\n }: {\n dimensions: Dimensions;\n queryResults: QueryResults;\n }): void {\n this.dimensions = dimensions;\n this.queryResults = queryResults;\n }\n}\n"],"names":["precompileTemplate","ContainerQueryComponent","_class","Component","constructor","args","_initializerDefineProperty","_descriptor","_descriptor2","_defineProperty","tagName","updateState","dimensions","queryResults","_applyDecoratedDescriptor","prototype","tracked","configurable","enumerable","writable","initializer","action","Object","getOwnPropertyDescriptor","setComponentTemplate","TEMPLATE"],"mappings":";;;;;;;;AACA,eAAeA,kBAAkB,CAAC,geAAge,CAAC;;;AC8B9eC,IAAAA,uBAAuB,IAAAC,MAAA,GAA7B,MAAMD,uBAAuB,SAElCE,SAAS,CAA6B;AAAAC,EAAAA,WAAAA,CAAA,GAAAC,IAAA,EAAA;AAAA,IAAA,KAAA,CAAA,GAAAA,IAAA,CAAA,CAAA;AAAAC,IAAAA,0BAAA,qBAAAC,WAAA,EAAA,IAAA,CAAA,CAAA;AAAAD,IAAAA,0BAAA,uBAAAE,YAAA,EAAA,IAAA,CAAA,CAAA;AAI9C;AAAAC,IAAAA,eAAA,kBACU,IAAI,CAACJ,IAAI,CAACK,OAAO,IAAI,KAAK,CAAA,CAAA;AAAA,GAAA;AAE5BC,EAAAA,WAAWA,CAAC;IAClBC,UAAU;AACVC,IAAAA,YAAAA;AAIF,GAAC,EAAQ;IACP,IAAI,CAACD,UAAU,GAAGA,UAAU,CAAA;IAC5B,IAAI,CAACC,YAAY,GAAGA,YAAY,CAAA;AAClC,GAAA;AACF,CAAC,GAAAN,WAAA,GAAAO,yBAAA,CAAAZ,MAAA,CAAAa,SAAA,EAAA,YAAA,EAAA,CAhBEC,OAAO,CAAA,EAAA;EAAAC,YAAA,EAAA,IAAA;EAAAC,UAAA,EAAA,IAAA;EAAAC,QAAA,EAAA,IAAA;EAAAC,WAAA,EAAA,IAAA;AAAA,CAAAZ,CAAAA,EAAAA,YAAA,GAAAM,yBAAA,CAAAZ,MAAA,CAAAa,SAAA,mBACPC,OAAO,CAAA,EAAA;EAAAC,YAAA,EAAA,IAAA;EAAAC,UAAA,EAAA,IAAA;EAAAC,QAAA,EAAA,IAAA;EAAAC,WAAA,EAAA,IAAA;AAAA,CAAAN,CAAAA,EAAAA,yBAAA,CAAAZ,MAAA,CAAAa,SAAA,EAKPM,aAAAA,EAAAA,CAAAA,MAAM,GAAAC,MAAA,CAAAC,wBAAA,CAAArB,MAAA,CAAAa,SAAA,EAAA,aAAA,CAAA,EAAAb,MAAA,CAAAa,SAAA,IAAAb,MAAA,EAAA;AATmCsB,oBAAA,CAAAC,QAAA,EAAAxB,uBAAA,CAAA;;;;"} \ No newline at end of file diff --git a/ember-container-query/dist/helpers/aspect-ratio.d.ts b/ember-container-query/dist/helpers/aspect-ratio.d.ts new file mode 100644 index 00000000..c62794c4 --- /dev/null +++ b/ember-container-query/dist/helpers/aspect-ratio.d.ts @@ -0,0 +1,13 @@ +/// +import { Metadata } from "../modifiers/container-query.js"; +declare const AspectRatioHelper: import("@ember/component/helper").FunctionBasedHelper<{ + Args: { + Positional: []; + Named: { + max?: number | undefined; + min?: number | undefined; + }; + }; + Return: Metadata; +}>; +export { AspectRatioHelper as default }; diff --git a/ember-container-query/dist/helpers/aspect-ratio.js b/ember-container-query/dist/helpers/aspect-ratio.js new file mode 100644 index 00000000..89bfd590 --- /dev/null +++ b/ember-container-query/dist/helpers/aspect-ratio.js @@ -0,0 +1,15 @@ +import { helper } from '@ember/component/helper'; + +const AspectRatioHelper = helper((_positional, named) => { + const dimension = 'aspectRatio'; + const max = named.max ?? Infinity; + const min = named.min ?? 0; + return { + dimension, + max, + min + }; +}); + +export { AspectRatioHelper as default }; +//# sourceMappingURL=aspect-ratio.js.map diff --git a/ember-container-query/dist/helpers/aspect-ratio.js.map b/ember-container-query/dist/helpers/aspect-ratio.js.map new file mode 100644 index 00000000..4511f318 --- /dev/null +++ b/ember-container-query/dist/helpers/aspect-ratio.js.map @@ -0,0 +1 @@ +{"version":3,"file":"aspect-ratio.js","sources":["../../src/helpers/aspect-ratio.ts"],"sourcesContent":["import { helper } from '@ember/component/helper';\n\nimport type { Metadata } from '../modifiers/container-query';\n\ninterface AspectRatioHelperSignature {\n Args: {\n Named: {\n max?: number;\n min?: number;\n };\n Positional: [];\n };\n Return: Metadata;\n}\n\nconst AspectRatioHelper = helper(\n (_positional, named) => {\n const dimension = 'aspectRatio';\n const max = named.max ?? Infinity;\n const min = named.min ?? 0;\n\n return { dimension, max, min };\n },\n);\n\nexport default AspectRatioHelper;\n"],"names":["AspectRatioHelper","helper","_positional","named","dimension","max","Infinity","min"],"mappings":";;AAeMA,MAAAA,iBAAiB,GAAGC,MAAM,CAC9B,CAACC,WAAW,EAAEC,KAAK,KAAK;EACtB,MAAMC,SAAS,GAAG,aAAa,CAAA;AAC/B,EAAA,MAAMC,GAAG,GAAGF,KAAK,CAACE,GAAG,IAAIC,QAAQ,CAAA;AACjC,EAAA,MAAMC,GAAG,GAAGJ,KAAK,CAACI,GAAG,IAAI,CAAC,CAAA;EAE1B,OAAO;IAAEH,SAAS;IAAEC,GAAG;AAAEE,IAAAA,GAAAA;GAAK,CAAA;AAChC,CACF;;;;"} \ No newline at end of file diff --git a/ember-container-query/dist/helpers/height.d.ts b/ember-container-query/dist/helpers/height.d.ts new file mode 100644 index 00000000..1fbcac33 --- /dev/null +++ b/ember-container-query/dist/helpers/height.d.ts @@ -0,0 +1,13 @@ +/// +import { Metadata } from "../modifiers/container-query.js"; +declare const HeightHelper: import("@ember/component/helper").FunctionBasedHelper<{ + Args: { + Positional: []; + Named: { + max?: number | undefined; + min?: number | undefined; + }; + }; + Return: Metadata; +}>; +export { HeightHelper as default }; diff --git a/ember-container-query/dist/helpers/height.js b/ember-container-query/dist/helpers/height.js new file mode 100644 index 00000000..fc02b40b --- /dev/null +++ b/ember-container-query/dist/helpers/height.js @@ -0,0 +1,15 @@ +import { helper } from '@ember/component/helper'; + +const HeightHelper = helper((_positional, named) => { + const dimension = 'height'; + const max = named.max ?? Infinity; + const min = named.min ?? 0; + return { + dimension, + max, + min + }; +}); + +export { HeightHelper as default }; +//# sourceMappingURL=height.js.map diff --git a/ember-container-query/dist/helpers/height.js.map b/ember-container-query/dist/helpers/height.js.map new file mode 100644 index 00000000..f7a9122f --- /dev/null +++ b/ember-container-query/dist/helpers/height.js.map @@ -0,0 +1 @@ +{"version":3,"file":"height.js","sources":["../../src/helpers/height.ts"],"sourcesContent":["import { helper } from '@ember/component/helper';\n\nimport type { Metadata } from '../modifiers/container-query';\n\ninterface HeightHelperSignature {\n Args: {\n Named: {\n max?: number;\n min?: number;\n };\n Positional: [];\n };\n Return: Metadata;\n}\n\nconst HeightHelper = helper((_positional, named) => {\n const dimension = 'height';\n const max = named.max ?? Infinity;\n const min = named.min ?? 0;\n\n return { dimension, max, min };\n});\n\nexport default HeightHelper;\n"],"names":["HeightHelper","helper","_positional","named","dimension","max","Infinity","min"],"mappings":";;AAeMA,MAAAA,YAAY,GAAGC,MAAM,CAAwB,CAACC,WAAW,EAAEC,KAAK,KAAK;EACzE,MAAMC,SAAS,GAAG,QAAQ,CAAA;AAC1B,EAAA,MAAMC,GAAG,GAAGF,KAAK,CAACE,GAAG,IAAIC,QAAQ,CAAA;AACjC,EAAA,MAAMC,GAAG,GAAGJ,KAAK,CAACI,GAAG,IAAI,CAAC,CAAA;EAE1B,OAAO;IAAEH,SAAS;IAAEC,GAAG;AAAEE,IAAAA,GAAAA;GAAK,CAAA;AAChC,CAAC;;;;"} \ No newline at end of file diff --git a/ember-container-query/dist/helpers/width.d.ts b/ember-container-query/dist/helpers/width.d.ts new file mode 100644 index 00000000..056f464c --- /dev/null +++ b/ember-container-query/dist/helpers/width.d.ts @@ -0,0 +1,13 @@ +/// +import { Metadata } from "../modifiers/container-query.js"; +declare const WidthHelper: import("@ember/component/helper").FunctionBasedHelper<{ + Args: { + Positional: []; + Named: { + max?: number | undefined; + min?: number | undefined; + }; + }; + Return: Metadata; +}>; +export { WidthHelper as default }; diff --git a/ember-container-query/dist/helpers/width.js b/ember-container-query/dist/helpers/width.js new file mode 100644 index 00000000..9dda73ab --- /dev/null +++ b/ember-container-query/dist/helpers/width.js @@ -0,0 +1,15 @@ +import { helper } from '@ember/component/helper'; + +const WidthHelper = helper((_positional, named) => { + const dimension = 'width'; + const max = named.max ?? Infinity; + const min = named.min ?? 0; + return { + dimension, + max, + min + }; +}); + +export { WidthHelper as default }; +//# sourceMappingURL=width.js.map diff --git a/ember-container-query/dist/helpers/width.js.map b/ember-container-query/dist/helpers/width.js.map new file mode 100644 index 00000000..faa1ab05 --- /dev/null +++ b/ember-container-query/dist/helpers/width.js.map @@ -0,0 +1 @@ +{"version":3,"file":"width.js","sources":["../../src/helpers/width.ts"],"sourcesContent":["import { helper } from '@ember/component/helper';\n\nimport type { Metadata } from '../modifiers/container-query';\n\ninterface WidthHelperSignature {\n Args: {\n Named: {\n max?: number;\n min?: number;\n };\n Positional: [];\n };\n Return: Metadata;\n}\n\nconst WidthHelper = helper((_positional, named) => {\n const dimension = 'width';\n const max = named.max ?? Infinity;\n const min = named.min ?? 0;\n\n return { dimension, max, min };\n});\n\nexport default WidthHelper;\n"],"names":["WidthHelper","helper","_positional","named","dimension","max","Infinity","min"],"mappings":";;AAeMA,MAAAA,WAAW,GAAGC,MAAM,CAAuB,CAACC,WAAW,EAAEC,KAAK,KAAK;EACvE,MAAMC,SAAS,GAAG,OAAO,CAAA;AACzB,EAAA,MAAMC,GAAG,GAAGF,KAAK,CAACE,GAAG,IAAIC,QAAQ,CAAA;AACjC,EAAA,MAAMC,GAAG,GAAGJ,KAAK,CAACI,GAAG,IAAI,CAAC,CAAA;EAE1B,OAAO;IAAEH,SAAS;IAAEC,GAAG;AAAEE,IAAAA,GAAAA;GAAK,CAAA;AAChC,CAAC;;;;"} \ No newline at end of file diff --git a/ember-container-query/dist/index.d.ts b/ember-container-query/dist/index.d.ts new file mode 100644 index 00000000..e7f9f261 --- /dev/null +++ b/ember-container-query/dist/index.d.ts @@ -0,0 +1,6 @@ +export { default as ContainerQuery } from "./components/container-query.js"; +export { default as aspectRatio } from "./helpers/aspect-ratio.js"; +export { default as height } from "./helpers/height.js"; +export { default as width } from "./helpers/width.js"; +export type { Dimensions, Features, IndexSignatureParameter, Metadata, QueryResults } from "./modifiers/container-query.js"; +export { default as containerQuery } from "./modifiers/container-query.js"; diff --git a/ember-container-query/dist/index.js b/ember-container-query/dist/index.js new file mode 100644 index 00000000..7e866d53 --- /dev/null +++ b/ember-container-query/dist/index.js @@ -0,0 +1,6 @@ +export { default as ContainerQuery } from './components/container-query.js'; +export { default as aspectRatio } from './helpers/aspect-ratio.js'; +export { default as height } from './helpers/height.js'; +export { default as width } from './helpers/width.js'; +export { default as containerQuery } from './modifiers/container-query.js'; +//# sourceMappingURL=index.js.map diff --git a/ember-container-query/dist/index.js.map b/ember-container-query/dist/index.js.map new file mode 100644 index 00000000..7f6f6265 --- /dev/null +++ b/ember-container-query/dist/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"} \ No newline at end of file diff --git a/ember-container-query/dist/modifiers/container-query.d.ts b/ember-container-query/dist/modifiers/container-query.d.ts new file mode 100644 index 00000000..4ba2d507 --- /dev/null +++ b/ember-container-query/dist/modifiers/container-query.d.ts @@ -0,0 +1,53 @@ +/// +import Owner from '@ember/owner'; +import Modifier from 'ember-modifier'; +import { ArgsFor, NamedArgs, PositionalArgs } from "ember-modifier"; +type IndexSignatureParameter = string | number | symbol; +type Dimensions = { + aspectRatio: number; + height: number; + width: number; +}; +type Metadata = { + dimension: keyof Dimensions; + max: number; + min: number; +}; +type Features = Record; +type QueryResults = Record; +interface ContainerQueryModifierSignature { + Args: { + Named: { + dataAttributePrefix?: string; + debounce?: number; + features?: Features; + onQuery?: ({ dimensions, queryResults, }: { + dimensions: Dimensions; + queryResults: QueryResults; + }) => void; + }; + Positional: []; + }; + Element: Element; +} +declare class ContainerQueryModifier extends Modifier> { + private readonly resizeObserver; + dimensions: Dimensions; + queryResults: QueryResults; + private _dataAttributes; + private _element?; + private _named; + get dataAttributePrefix(): string; + get debounce(): number; + get features(): Features; + constructor(owner: Owner, args: ArgsFor>); + modify(element: Element, _positional: PositionalArgs>, named: NamedArgs>): void; + private onResize; + private registerResizeObserver; + private queryContainer; + private measureDimensions; + private evaluateQueries; + private resetDataAttributes; + private setDataAttributes; +} +export { ContainerQueryModifier as default, Dimensions, Features, IndexSignatureParameter, Metadata, QueryResults }; diff --git a/ember-container-query/dist/modifiers/container-query.js b/ember-container-query/dist/modifiers/container-query.js new file mode 100644 index 00000000..2e16a47e --- /dev/null +++ b/ember-container-query/dist/modifiers/container-query.js @@ -0,0 +1,106 @@ +import { _ as _applyDecoratedDescriptor, a as _initializerDefineProperty, b as _defineProperty } from '../applyDecoratedDescriptor-fa858ac4.js'; +import { registerDestructor } from '@ember/destroyable'; +import { action } from '@ember/object'; +import { debounce } from '@ember/runloop'; +import { inject } from '@ember/service'; +import Modifier from 'ember-modifier'; + +var _class, _descriptor; +let ContainerQueryModifier = (_class = class ContainerQueryModifier extends Modifier { + get dataAttributePrefix() { + return this._named.dataAttributePrefix ?? 'container-query'; + } + get debounce() { + return this._named.debounce ?? 0; + } + get features() { + return this._named.features ?? {}; + } + constructor(owner, args) { + super(owner, args); + _initializerDefineProperty(this, "resizeObserver", _descriptor, this); + _defineProperty(this, "dimensions", void 0); + _defineProperty(this, "queryResults", void 0); + _defineProperty(this, "_dataAttributes", []); + _defineProperty(this, "_element", void 0); + _defineProperty(this, "_named", void 0); + registerDestructor(this, () => { + this.resizeObserver.unobserve(this._element, this.onResize); + }); + } + modify(element, _positional, named) { + this._named = named; + this.registerResizeObserver(element); + this.queryContainer(element); + } + onResize(resizeObserverEntry) { + const element = resizeObserverEntry.target; + if (this.debounce > 0) { + debounce(this, this.queryContainer, element, this.debounce); + return; + } + this.queryContainer(element); + } + registerResizeObserver(element) { + this.resizeObserver.unobserve(this._element, this.onResize); + this._element = element; + this.resizeObserver.observe(this._element, this.onResize); + } + queryContainer(element) { + this.measureDimensions(element); + this.evaluateQueries(); + this.resetDataAttributes(element); + this.setDataAttributes(element); + this._named.onQuery?.({ + dimensions: this.dimensions, + queryResults: this.queryResults + }); + } + measureDimensions(element) { + const height = element.clientHeight; + const width = element.clientWidth; + this.dimensions = { + aspectRatio: width / height, + height, + width + }; + } + evaluateQueries() { + const queryResults = {}; + for (const [featureName, metadata] of Object.entries(this.features)) { + const { + dimension, + min, + max + } = metadata; + const value = this.dimensions[dimension]; + queryResults[featureName] = min <= value && value < max; + } + this.queryResults = queryResults; + } + resetDataAttributes(element) { + this._dataAttributes.forEach(dataAttribute => { + element.removeAttribute(dataAttribute); + }); + this._dataAttributes = []; + } + setDataAttributes(element) { + const prefix = this.dataAttributePrefix; + for (const [featureName, meetsFeature] of Object.entries(this.queryResults)) { + if (!meetsFeature) { + continue; + } + const dataAttribute = prefix ? `data-${prefix}-${String(featureName)}` : `data-${String(featureName)}`; + element.setAttribute(dataAttribute, ''); + this._dataAttributes.push(dataAttribute); + } + } +}, (_descriptor = _applyDecoratedDescriptor(_class.prototype, "resizeObserver", [inject], { + configurable: true, + enumerable: true, + writable: true, + initializer: null +}), _applyDecoratedDescriptor(_class.prototype, "onResize", [action], Object.getOwnPropertyDescriptor(_class.prototype, "onResize"), _class.prototype)), _class); + +export { ContainerQueryModifier as default }; +//# sourceMappingURL=container-query.js.map diff --git a/ember-container-query/dist/modifiers/container-query.js.map b/ember-container-query/dist/modifiers/container-query.js.map new file mode 100644 index 00000000..ed2bbfa6 --- /dev/null +++ b/ember-container-query/dist/modifiers/container-query.js.map @@ -0,0 +1 @@ +{"version":3,"file":"container-query.js","sources":["../../src/modifiers/container-query.ts"],"sourcesContent":["import { registerDestructor } from '@ember/destroyable';\nimport { action } from '@ember/object';\nimport type Owner from '@ember/owner';\nimport { debounce as _debounce } from '@ember/runloop';\nimport { inject as service } from '@ember/service';\nimport Modifier, { ArgsFor, NamedArgs, PositionalArgs } from 'ember-modifier';\n\ntype IndexSignatureParameter = string | number | symbol;\ntype ObjectEntry = [keyof T, T[keyof T]];\ntype ObjectEntries = ObjectEntry[];\n\ntype Dimensions = {\n aspectRatio: number;\n height: number;\n width: number;\n};\n\ntype Metadata = {\n dimension: keyof Dimensions;\n max: number;\n min: number;\n};\n\ntype Features = Record;\n\ntype QueryResults = Record;\n\ninterface ContainerQueryModifierSignature {\n Args: {\n Named: {\n dataAttributePrefix?: string;\n debounce?: number;\n features?: Features;\n onQuery?: ({\n dimensions,\n queryResults,\n }: {\n dimensions: Dimensions;\n queryResults: QueryResults;\n }) => void;\n };\n Positional: [];\n };\n Element: Element;\n}\n\nexport default class ContainerQueryModifier<\n T extends IndexSignatureParameter,\n> extends Modifier> {\n @service private declare readonly resizeObserver;\n\n dimensions!: Dimensions;\n queryResults!: QueryResults;\n\n private _dataAttributes: string[] = [];\n private _element?: Element;\n private _named!: NamedArgs>;\n\n get dataAttributePrefix(): string {\n return this._named.dataAttributePrefix ?? 'container-query';\n }\n\n get debounce(): number {\n return this._named.debounce ?? 0;\n }\n\n get features(): Features {\n return this._named.features ?? ({} as Features);\n }\n\n constructor(owner: Owner, args: ArgsFor>) {\n super(owner, args);\n\n registerDestructor(this, () => {\n this.resizeObserver.unobserve(this._element, this.onResize);\n });\n }\n\n modify(\n element: Element,\n _positional: PositionalArgs>,\n named: NamedArgs>,\n ): void {\n this._named = named;\n\n this.registerResizeObserver(element);\n this.queryContainer(element);\n }\n\n @action private onResize(resizeObserverEntry: ResizeObserverEntry): void {\n const element = resizeObserverEntry.target;\n\n if (this.debounce > 0) {\n _debounce(this, this.queryContainer, element, this.debounce);\n return;\n }\n\n this.queryContainer(element);\n }\n\n private registerResizeObserver(element: Element): void {\n this.resizeObserver.unobserve(this._element, this.onResize);\n\n this._element = element;\n this.resizeObserver.observe(this._element, this.onResize);\n }\n\n private queryContainer(element: Element): void {\n this.measureDimensions(element);\n this.evaluateQueries();\n this.resetDataAttributes(element);\n this.setDataAttributes(element);\n\n this._named.onQuery?.({\n dimensions: this.dimensions,\n queryResults: this.queryResults,\n });\n }\n\n private measureDimensions(element: Element): void {\n const height = element.clientHeight;\n const width = element.clientWidth;\n\n this.dimensions = {\n aspectRatio: width / height,\n height,\n width,\n };\n }\n\n private evaluateQueries(): void {\n const queryResults = {} as QueryResults;\n\n for (const [featureName, metadata] of Object.entries(\n this.features,\n ) as ObjectEntries>) {\n const { dimension, min, max } = metadata;\n const value = this.dimensions[dimension];\n\n queryResults[featureName] = min <= value && value < max;\n }\n\n this.queryResults = queryResults;\n }\n\n private resetDataAttributes(element: Element): void {\n this._dataAttributes.forEach((dataAttribute) => {\n element.removeAttribute(dataAttribute);\n });\n\n this._dataAttributes = [];\n }\n\n private setDataAttributes(element: Element): void {\n const prefix = this.dataAttributePrefix;\n\n for (const [featureName, meetsFeature] of Object.entries(\n this.queryResults,\n ) as ObjectEntries>) {\n if (!meetsFeature) {\n continue;\n }\n\n const dataAttribute = prefix\n ? `data-${prefix}-${String(featureName)}`\n : `data-${String(featureName)}`;\n\n element.setAttribute(dataAttribute, '');\n\n this._dataAttributes.push(dataAttribute);\n }\n }\n}\n\nexport {\n Dimensions,\n Features,\n IndexSignatureParameter,\n Metadata,\n QueryResults,\n};\n"],"names":["ContainerQueryModifier","_class","Modifier","dataAttributePrefix","_named","debounce","features","constructor","owner","args","_initializerDefineProperty","_descriptor","_defineProperty","registerDestructor","resizeObserver","unobserve","_element","onResize","modify","element","_positional","named","registerResizeObserver","queryContainer","resizeObserverEntry","target","_debounce","observe","measureDimensions","evaluateQueries","resetDataAttributes","setDataAttributes","onQuery","dimensions","queryResults","height","clientHeight","width","clientWidth","aspectRatio","featureName","metadata","Object","entries","dimension","min","max","value","_dataAttributes","forEach","dataAttribute","removeAttribute","prefix","meetsFeature","String","setAttribute","push","_applyDecoratedDescriptor","prototype","service","configurable","enumerable","writable","initializer","action","getOwnPropertyDescriptor"],"mappings":";;;;;;;;AA8CqBA,IAAAA,sBAAsB,IAAAC,MAAA,GAA5B,MAAMD,sBAAsB,SAEjCE,QAAQ,CAAqC;EAUrD,IAAIC,mBAAmBA,GAAW;AAChC,IAAA,OAAO,IAAI,CAACC,MAAM,CAACD,mBAAmB,IAAI,iBAAiB,CAAA;AAC7D,GAAA;EAEA,IAAIE,QAAQA,GAAW;AACrB,IAAA,OAAO,IAAI,CAACD,MAAM,CAACC,QAAQ,IAAI,CAAC,CAAA;AAClC,GAAA;EAEA,IAAIC,QAAQA,GAAgB;AAC1B,IAAA,OAAO,IAAI,CAACF,MAAM,CAACE,QAAQ,IAAK,EAAkB,CAAA;AACpD,GAAA;AAEAC,EAAAA,WAAWA,CAACC,KAAY,EAAEC,IAAiD,EAAE;AAC3E,IAAA,KAAK,CAACD,KAAK,EAAEC,IAAI,CAAC,CAAA;AAACC,IAAAA,0BAAA,yBAAAC,WAAA,EAAA,IAAA,CAAA,CAAA;IAAAC,eAAA,CAAA,IAAA,EAAA,YAAA,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A,CAAAxD,MAAA,CAAAyD,SAAA,EAwCPM,UAAAA,EAAAA,CAAAA,MAAM,GAAAtB,MAAA,CAAAuB,wBAAA,CAAAhE,MAAA,CAAAyD,SAAA,EAAA,UAAA,CAAA,EAAAzD,MAAA,CAAAyD,SAAA,IAAAzD,MAAA;;;;"} \ No newline at end of file diff --git a/ember-container-query/dist/template-registry.d.ts b/ember-container-query/dist/template-registry.d.ts new file mode 100644 index 00000000..463d59f0 --- /dev/null +++ b/ember-container-query/dist/template-registry.d.ts @@ -0,0 +1,13 @@ +import ContainerQueryComponent from "./components/container-query.js"; +import AspectRatioHelper from "./helpers/aspect-ratio.js"; +import HeightHelper from "./helpers/height.js"; +import WidthHelper from "./helpers/width.js"; +import ContainerQueryModifier from "./modifiers/container-query.js"; +interface EmberContainerQueryRegistry { + ContainerQuery: typeof ContainerQueryComponent; + 'aspect-ratio': typeof AspectRatioHelper; + 'container-query': typeof ContainerQueryModifier; + height: typeof HeightHelper; + width: typeof WidthHelper; +} +export { EmberContainerQueryRegistry as default }; diff --git a/ember-container-query/dist/template-registry.js b/ember-container-query/dist/template-registry.js new file mode 100644 index 00000000..aa971dac --- /dev/null +++ b/ember-container-query/dist/template-registry.js @@ -0,0 +1,2 @@ + +//# sourceMappingURL=template-registry.js.map diff --git a/ember-container-query/dist/template-registry.js.map b/ember-container-query/dist/template-registry.js.map new file mode 100644 index 00000000..54e644e4 --- /dev/null +++ b/ember-container-query/dist/template-registry.js.map @@ -0,0 +1 @@ +{"version":3,"file":"template-registry.js","sources":[],"sourcesContent":[],"names":[],"mappings":""} \ No newline at end of file From f97ce34df3cf1b2368d89f991c980d60abfe4f3f Mon Sep 17 00:00:00 2001 From: ijlee2 Date: Wed, 5 Jul 2023 10:44:21 +0200 Subject: [PATCH 02/12] chore: Removed rollup-plugin-ts --- ember-container-query/.eslintignore | 1 + ember-container-query/.gitignore | 1 + .../_rollupPluginBabelHelpers-e795903d.js | 63 +++++ .../_rollupPluginBabelHelpers-e795903d.js.map | 1 + ember-container-query/package.json | 21 +- ember-container-query/rollup.config.mjs | 25 +- ember-container-query/tsconfig.json | 3 + package.json | 5 - patches/rollup-plugin-ts@3.2.0.patch | 42 ---- pnpm-lock.yaml | 222 ++++++------------ 10 files changed, 171 insertions(+), 213 deletions(-) create mode 100644 ember-container-query/dist/_rollupPluginBabelHelpers-e795903d.js create mode 100644 ember-container-query/dist/_rollupPluginBabelHelpers-e795903d.js.map delete mode 100644 patches/rollup-plugin-ts@3.2.0.patch diff --git a/ember-container-query/.eslintignore b/ember-container-query/.eslintignore index caf5de49..c8060733 100644 --- a/ember-container-query/.eslintignore +++ b/ember-container-query/.eslintignore @@ -2,6 +2,7 @@ /blueprints/*/files/ # compiled output +/declarations/ /dist/ # misc diff --git a/ember-container-query/.gitignore b/ember-container-query/.gitignore index 24d55b6f..e53f11c3 100644 --- a/ember-container-query/.gitignore +++ b/ember-container-query/.gitignore @@ -1,4 +1,5 @@ # compiled output +# /declarations/ # /dist/ # dependencies diff --git a/ember-container-query/dist/_rollupPluginBabelHelpers-e795903d.js b/ember-container-query/dist/_rollupPluginBabelHelpers-e795903d.js new file mode 100644 index 00000000..294da195 --- /dev/null +++ b/ember-container-query/dist/_rollupPluginBabelHelpers-e795903d.js @@ -0,0 +1,63 @@ +function _defineProperty(obj, key, value) { + key = _toPropertyKey(key); + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + return obj; +} +function _toPrimitive(input, hint) { + if (typeof input !== "object" || input === null) return input; + var prim = input[Symbol.toPrimitive]; + if (prim !== undefined) { + var res = prim.call(input, hint || "default"); + if (typeof res !== "object") return res; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return (hint === "string" ? String : Number)(input); +} +function _toPropertyKey(arg) { + var key = _toPrimitive(arg, "string"); + return typeof key === "symbol" ? key : String(key); +} +function _initializerDefineProperty(target, property, descriptor, context) { + if (!descriptor) return; + Object.defineProperty(target, property, { + enumerable: descriptor.enumerable, + configurable: descriptor.configurable, + writable: descriptor.writable, + value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 + }); +} +function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { + var desc = {}; + Object.keys(descriptor).forEach(function (key) { + desc[key] = descriptor[key]; + }); + desc.enumerable = !!desc.enumerable; + desc.configurable = !!desc.configurable; + if ('value' in desc || desc.initializer) { + desc.writable = true; + } + desc = decorators.slice().reverse().reduce(function (desc, decorator) { + return decorator(target, property, desc) || desc; + }, desc); + if (context && desc.initializer !== void 0) { + desc.value = desc.initializer ? desc.initializer.call(context) : void 0; + desc.initializer = undefined; + } + if (desc.initializer === void 0) { + Object.defineProperty(target, property, desc); + desc = null; + } + return desc; +} + +export { _applyDecoratedDescriptor as _, _initializerDefineProperty as a, _defineProperty as b }; +//# sourceMappingURL=_rollupPluginBabelHelpers-e795903d.js.map diff --git a/ember-container-query/dist/_rollupPluginBabelHelpers-e795903d.js.map b/ember-container-query/dist/_rollupPluginBabelHelpers-e795903d.js.map new file mode 100644 index 00000000..c6dc0ea0 --- /dev/null +++ b/ember-container-query/dist/_rollupPluginBabelHelpers-e795903d.js.map @@ -0,0 +1 @@ +{"version":3,"file":"_rollupPluginBabelHelpers-e795903d.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/ember-container-query/package.json b/ember-container-query/package.json index ce17e87b..b996c6b1 100644 --- a/ember-container-query/package.json +++ b/ember-container-query/package.json @@ -21,9 +21,12 @@ "license": "MIT", "author": "Isaac J. Lee", "exports": { - ".": "./dist/index.js", + ".": { + "types": "./declarations/index.d.ts", + "default": "./dist/index.js" + }, "./*": { - "types": "./dist/*.d.ts", + "types": "./declarations/*.d.ts", "default": "./dist/*.js" }, "./addon-main.js": "./addon-main.cjs" @@ -31,7 +34,7 @@ "typesVersions": { "*": { "*": [ - "dist/*" + "declarations/*" ] } }, @@ -41,10 +44,13 @@ }, "files": [ "addon-main.cjs", + "declarations", "dist" ], "scripts": { - "build": "rollup --config", + "build": "concurrently \"npm:build:*\" --names \"build:\"", + "build:js": "rollup --config", + "build:types": "glint --build", "lint": "concurrently \"npm:lint:*(!fix)\" --names \"lint:\"", "lint:fix": "concurrently \"npm:lint:*:fix\" --names \"fix:\"", "lint:hbs": "ember-template-lint .", @@ -53,7 +59,9 @@ "lint:js:fix": "eslint . --fix", "lint:types": "glint", "prepack": "rollup --config", - "start": "rollup --config --watch", + "start": "concurrently \"npm:start:*\" --names \"start:\"", + "start:js": "rollup --config --watch --no-watch.clearScreen", + "start:types": "glint --build --watch", "test": "echo 'A v2 addon does not have tests, run tests in test-app'" }, "dependencies": { @@ -75,6 +83,8 @@ "@glint/core": "^1.0.2", "@glint/environment-ember-loose": "^1.0.2", "@glint/template": "^1.0.2", + "@rollup/plugin-babel": "^6.0.3", + "@rollup/plugin-node-resolve": "^15.1.0", "@tsconfig/ember": "^2.0.0", "@types/ember__component": "^4.0.14", "@types/ember__destroyable": "^4.0.2", @@ -97,7 +107,6 @@ "prettier": "^2.8.8", "rollup": "^3.25.1", "rollup-plugin-copy": "^3.4.0", - "rollup-plugin-ts": "^3.2.0", "typescript": "^5.1.3" }, "engines": { diff --git a/ember-container-query/rollup.config.mjs b/ember-container-query/rollup.config.mjs index e5b79890..c126dd18 100644 --- a/ember-container-query/rollup.config.mjs +++ b/ember-container-query/rollup.config.mjs @@ -1,12 +1,16 @@ import { Addon } from '@embroider/addon-dev/rollup'; +import { babel } from '@rollup/plugin-babel'; +import { nodeResolve } from '@rollup/plugin-node-resolve'; import copy from 'rollup-plugin-copy'; -import typescript from 'rollup-plugin-ts'; const addon = new Addon({ srcDir: 'src', destDir: 'dist', }); +// Add extensions here, such as ts, gjs, etc that you may import +const extensions = ['.hbs', '.js', '.ts']; + export default { // This provides defaults that work well alongside `publicEntrypoints` below. // You can augment this if you need to. @@ -41,11 +45,20 @@ export default { // package names. addon.dependencies(), - // compile TypeScript to latest JavaScript, including Babel transpilation - typescript({ - transpiler: 'babel', - browserslist: false, - transpileOnly: false, + // This babel config should *not* apply presets or compile away ES modules. + // It exists only to provide development niceties for you, like automatic + // template colocation. + // + // By default, this will load the actual babel config from the file + // babel.config.json. + babel({ + babelHelpers: 'bundled', + extensions, + }), + + // Allows rollup to resolve imports of files with the specified extensions + nodeResolve({ + extensions, }), // Ensure that standalone .hbs files are properly integrated as Javascript. diff --git a/ember-container-query/tsconfig.json b/ember-container-query/tsconfig.json index 7c5cc086..368fd372 100644 --- a/ember-container-query/tsconfig.json +++ b/ember-container-query/tsconfig.json @@ -1,6 +1,9 @@ { "extends": "@tsconfig/ember/tsconfig.json", "compilerOptions": { + "declarationDir": "declarations", + "emitDeclarationOnly": true, + "noEmit": false, "skipLibCheck": true }, "include": [ diff --git a/package.json b/package.json index a99ed4ed..92f93ab3 100644 --- a/package.json +++ b/package.json @@ -39,10 +39,5 @@ "enhance: documentation": "Documentation", "user feedback": "User Feedback" } - }, - "pnpm": { - "patchedDependencies": { - "rollup-plugin-ts@3.2.0": "patches/rollup-plugin-ts@3.2.0.patch" - } } } diff --git a/patches/rollup-plugin-ts@3.2.0.patch b/patches/rollup-plugin-ts@3.2.0.patch deleted file mode 100644 index ebde99e6..00000000 --- a/patches/rollup-plugin-ts@3.2.0.patch +++ /dev/null @@ -1,42 +0,0 @@ -diff --git a/dist/cjs/index.cjs b/dist/cjs/index.cjs -index df729920a3917c3d6b6ee6c464129a2d80c6686f..f60c9ee1c237e5f6c65f13fea8f2c2d00103bb06 100644 ---- a/dist/cjs/index.cjs -+++ b/dist/cjs/index.cjs -@@ -8651,16 +8651,6 @@ function getDefaultBabelOptions({ browserslist, transpilerOptions }) { - ]) - ], - plugins: [ -- // If preset-env will be included, shipped proposals will be included already. If not, apply them here -- ...(includePresetEnv -- ? [] -- : [ -- resolveModule("@babel/plugin-proposal-object-rest-spread"), -- resolveModule("@babel/plugin-proposal-async-generator-functions"), -- resolveModule("@babel/plugin-proposal-optional-catch-binding"), -- resolveModule("@babel/plugin-proposal-unicode-property-regex"), -- resolveModule("@babel/plugin-proposal-json-strings") -- ]), - // Force the use of helpers (e.g. the runtime). But *don't* apply polyfills. - [ - resolveModule("@babel/plugin-transform-runtime"), -diff --git a/dist/esm/index.js b/dist/esm/index.js -index 5a415c123b26ac92639cbff17e549b385b8b3566..9f7ce09c794257f7acafb7af866a2acb9375ae83 100644 ---- a/dist/esm/index.js -+++ b/dist/esm/index.js -@@ -8649,16 +8649,6 @@ function getDefaultBabelOptions({ browserslist, transpilerOptions }) { - ]) - ], - plugins: [ -- // If preset-env will be included, shipped proposals will be included already. If not, apply them here -- ...(includePresetEnv -- ? [] -- : [ -- resolveModule("@babel/plugin-proposal-object-rest-spread"), -- resolveModule("@babel/plugin-proposal-async-generator-functions"), -- resolveModule("@babel/plugin-proposal-optional-catch-binding"), -- resolveModule("@babel/plugin-proposal-unicode-property-regex"), -- resolveModule("@babel/plugin-proposal-json-strings") -- ]), - // Force the use of helpers (e.g. the runtime). But *don't* apply polyfills. - [ - resolveModule("@babel/plugin-transform-runtime"), \ No newline at end of file diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1a68634c..a4459e37 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,10 +1,5 @@ lockfileVersion: '6.0' -patchedDependencies: - rollup-plugin-ts@3.2.0: - hash: 2wypkbvk5crxf6sx473jzveoxq - path: patches/rollup-plugin-ts@3.2.0.patch - importers: .: @@ -298,6 +293,12 @@ importers: '@glint/template': specifier: ^1.0.2 version: 1.0.2 + '@rollup/plugin-babel': + specifier: ^6.0.3 + version: 6.0.3(@babel/core@7.22.5)(rollup@3.25.1) + '@rollup/plugin-node-resolve': + specifier: ^15.1.0 + version: 15.1.0(rollup@3.25.1) '@tsconfig/ember': specifier: ^2.0.0 version: 2.0.0 @@ -364,9 +365,6 @@ importers: rollup-plugin-copy: specifier: ^3.4.0 version: 3.4.0 - rollup-plugin-ts: - specifier: ^3.2.0 - version: 3.2.0(patch_hash=2wypkbvk5crxf6sx473jzveoxq)(@babel/core@7.22.5)(@babel/preset-typescript@7.22.5)(@babel/runtime@7.22.5)(rollup@3.25.1)(typescript@5.1.3) typescript: specifier: ^5.1.3 version: 5.1.3 @@ -3696,10 +3694,6 @@ packages: upath: 2.0.1 dev: true - /@mdn/browser-compat-data@5.2.54: - resolution: {integrity: sha512-8/W1qTWw/lCf6E01n/Be65LGza/WrDON7ii9F/fKc4EdZad+K1xJWvfYhDSoPpkMCAw0eLIyAB0Z5emQFBVclw==} - dev: true - /@nodelib/fs.scandir@2.1.5: resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} engines: {node: '>= 8'} @@ -3923,6 +3917,43 @@ packages: dev: true optional: true + /@rollup/plugin-babel@6.0.3(@babel/core@7.22.5)(rollup@3.25.1): + resolution: {integrity: sha512-fKImZKppa1A/gX73eg4JGo+8kQr/q1HBQaCGKECZ0v4YBBv3lFqi14+7xyApECzvkLTHCifx+7ntcrvtBIRcpg==} + engines: {node: '>=14.0.0'} + peerDependencies: + '@babel/core': ^7.0.0 + '@types/babel__core': ^7.1.9 + rollup: ^1.20.0||^2.0.0||^3.0.0 + peerDependenciesMeta: + '@types/babel__core': + optional: true + rollup: + optional: true + dependencies: + '@babel/core': 7.22.5 + '@babel/helper-module-imports': 7.22.5 + '@rollup/pluginutils': 5.0.2(rollup@3.25.1) + rollup: 3.25.1 + dev: true + + /@rollup/plugin-node-resolve@15.1.0(rollup@3.25.1): + resolution: {integrity: sha512-xeZHCgsiZ9pzYVgAo9580eCGqwh/XCEUM9q6iQfGNocjgkufHAqC3exA+45URvhiYV8sBF9RlBai650eNs7AsA==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^2.78.0||^3.0.0 + peerDependenciesMeta: + rollup: + optional: true + dependencies: + '@rollup/pluginutils': 5.0.2(rollup@3.25.1) + '@types/resolve': 1.20.2 + deepmerge: 4.3.1 + is-builtin-module: 3.2.1 + is-module: 1.0.0 + resolve: 1.22.2 + rollup: 3.25.1 + dev: true + /@rollup/pluginutils@4.2.1: resolution: {integrity: sha512-iKnFXr7NkdZAIHiIWE+BX5ULi/ucVFYWD6TbAV+rZctiRTY2PL6tsIKhoIOaoskiWAkgu+VsbXgUVDNLHf+InQ==} engines: {node: '>= 8.0.0'} @@ -4300,10 +4331,6 @@ packages: resolution: {integrity: sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==} dev: true - /@types/node@17.0.45: - resolution: {integrity: sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw==} - dev: true - /@types/node@20.3.1: resolution: {integrity: sha512-EhcH/wvidPy1WeML3TtYFGR83UzjxeWRen9V402T8aUGYsCHOmfoisV3ZSg03gAFIbLq8TnWOJ0f4cALtnSEUg==} @@ -4311,10 +4338,6 @@ packages: resolution: {integrity: sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==} dev: true - /@types/object-path@0.11.1: - resolution: {integrity: sha512-219LSCO9HPcoXcRTC6DbCs0FRhZgBnEMzf16RRqkT40WbkKx3mOeQuz3e2XqbfhOz/AHfbru0kzB1n1RCAsIIg==} - dev: true - /@types/q@1.5.5: resolution: {integrity: sha512-L28j2FcJfSZOnL1WBjDYp2vUHCeIFlyYI/53EwD/rKUBQ7MtUUfbQWiyKJGpcnv4/WgrhWsFKrcPstcAt/J0tQ==} dev: true @@ -4331,6 +4354,10 @@ packages: resolution: {integrity: sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw==} dev: true + /@types/resolve@1.20.2: + resolution: {integrity: sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==} + dev: true + /@types/responselike@1.0.0: resolution: {integrity: sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA==} dependencies: @@ -4373,10 +4400,6 @@ packages: /@types/symlink-or-copy@1.2.0: resolution: {integrity: sha512-Lja2xYuuf2B3knEsga8ShbOdsfNOtzT73GyJmZyY7eGl2+ajOqrs8yM5ze0fsSoYwvA6bw7/Qr7OZ7PEEmYwWg==} - /@types/ua-parser-js@0.7.36: - resolution: {integrity: sha512-N1rW+njavs70y2cApeIw1vLMYXRwfBy+7trgavGuuTfOd7j1Yh7QTRc/yqsPl6ncokt72ZXuxEU0PiCp9bSwNQ==} - dev: true - /@types/yargs-parser@21.0.0: resolution: {integrity: sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==} dev: true @@ -4691,11 +4714,6 @@ packages: '@webassemblyjs/ast': 1.11.6 '@xtuc/long': 4.2.2 - /@wessberg/stringutil@1.0.19: - resolution: {integrity: sha512-9AZHVXWlpN8Cn9k5BC/O0Dzb9E9xfEMXzYrNunwvkUTvuK7xgQPVRZpLo+jWCOZ5r8oBa8NIrHuPEu1hzbb6bg==} - engines: {node: '>=8.0.0'} - dev: true - /@xmldom/xmldom@0.8.7: resolution: {integrity: sha512-sI1Ly2cODlWStkINzqGrZ8K6n+MTSbAeQnAipGyL+KZCXuHaRlj2gyyy8B/9MvsFFqN7XHryQnB2QwhzvJXovg==} engines: {node: '>=10.0.0'} @@ -4847,11 +4865,6 @@ packages: resolution: {integrity: sha512-S2Hw0TtNkMJhIabBwIojKL9YHO5T0n5eNqWJ7Lrlel/zDbftQpxpapi8tZs3X1HWa+u+QeydGmzzNU0m09+Rcg==} engines: {node: '>=0.4.2'} - /ansi-colors@4.1.3: - resolution: {integrity: sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==} - engines: {node: '>=6'} - dev: true - /ansi-escapes@3.2.0: resolution: {integrity: sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==} engines: {node: '>=4'} @@ -6345,22 +6358,6 @@ packages: resolution: {integrity: sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==} dev: true - /browserslist-generator@2.0.3: - resolution: {integrity: sha512-3j8ogwvlBpOEDR3f5n1H2n5BWXqHPWi/Xm8EC1DPJy5BWl4WkSFisatBygH/L9AEmg0MtOfcR1QnMuM9XL28jA==} - engines: {node: '>=16.15.1', npm: '>=7.0.0', pnpm: '>=3.2.0', yarn: '>=1.13'} - dependencies: - '@mdn/browser-compat-data': 5.2.54 - '@types/object-path': 0.11.1 - '@types/semver': 7.5.0 - '@types/ua-parser-js': 0.7.36 - browserslist: 4.21.5 - caniuse-lite: 1.0.30001502 - isbot: 3.6.10 - object-path: 0.11.8 - semver: 7.5.3 - ua-parser-js: 1.0.35 - dev: true - /browserslist@3.2.8: resolution: {integrity: sha512-WHVocJYavUwVgVViC0ORikPHQquXwVh939TaelZ4WDqpWgTX/FsGhl/+P4qBUAGcRvtOgDgC+xftNWWp2RUTAQ==} hasBin: true @@ -6420,6 +6417,11 @@ packages: ieee754: 1.2.1 dev: true + /builtin-modules@3.3.0: + resolution: {integrity: sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==} + engines: {node: '>=6'} + dev: true + /builtins@5.0.1: resolution: {integrity: sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==} dependencies: @@ -6856,16 +6858,6 @@ packages: /commondir@1.0.1: resolution: {integrity: sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==} - /compatfactory@2.0.9(typescript@5.1.3): - resolution: {integrity: sha512-fvO+AWcmbO7P1S+A3mwm3IGr74eHMeq5ZLhNhyNQc9mVDNHT4oe0Gg0ksdIFFNXLK7k7Z/TYcLAUSQdRgh1bsA==} - engines: {node: '>=14.9.0'} - peerDependencies: - typescript: '>=3.x || >= 4.x' - dependencies: - helpertypes: 0.0.19 - typescript: 5.1.3 - dev: true - /component-emitter@1.3.0: resolution: {integrity: sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==} dev: true @@ -7229,13 +7221,6 @@ packages: shebang-command: 2.0.0 which: 2.0.2 - /crosspath@2.0.0: - resolution: {integrity: sha512-ju88BYCQ2uvjO2bR+SsgLSTwTSctU+6Vp2ePbKPgSCZyy4MWZxYsT738DlKVRE5utUjobjPRm1MkTYKJxCmpTA==} - engines: {node: '>=14.9.0'} - dependencies: - '@types/node': 17.0.45 - dev: true - /crypto-random-string@2.0.0: resolution: {integrity: sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==} engines: {node: '>=8'} @@ -7543,6 +7528,11 @@ packages: resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} dev: true + /deepmerge@4.3.1: + resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==} + engines: {node: '>=0.10.0'} + dev: true + /defaults@1.0.4: resolution: {integrity: sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==} dependencies: @@ -10332,11 +10322,6 @@ packages: dependencies: rsvp: 3.2.1 - /helpertypes@0.0.19: - resolution: {integrity: sha512-J00e55zffgi3yVnUp0UdbMztNkr2PnizEkOe9URNohnrNhW5X0QpegkuLpOmFQInpi93Nb8MCjQRHAiCDF42NQ==} - engines: {node: '>=10.0.0'} - dev: true - /highlight.js@10.7.3: resolution: {integrity: sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==} dev: true @@ -10694,6 +10679,13 @@ packages: resolution: {integrity: sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==} dev: true + /is-builtin-module@3.2.1: + resolution: {integrity: sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A==} + engines: {node: '>=6'} + dependencies: + builtin-modules: 3.3.0 + dev: true + /is-callable@1.2.7: resolution: {integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==} engines: {node: '>= 0.4'} @@ -10807,6 +10799,10 @@ packages: '@babel/runtime': 7.22.5 dev: true + /is-module@1.0.0: + resolution: {integrity: sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==} + dev: true + /is-negative-zero@2.0.2: resolution: {integrity: sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==} engines: {node: '>= 0.4'} @@ -10970,11 +10966,6 @@ packages: engines: {node: '>= 14.0.0'} dev: true - /isbot@3.6.10: - resolution: {integrity: sha512-+I+2998oyP4oW9+OTQD8TS1r9P6wv10yejukj+Ksj3+UR5pUhsZN3f8W7ysq0p1qxpOVNbl5mCuv0bCaF8y5iQ==} - engines: {node: '>=12'} - dev: true - /isexe@2.0.0: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} @@ -11547,13 +11538,6 @@ packages: dependencies: sourcemap-codec: 1.4.8 - /magic-string@0.27.0: - resolution: {integrity: sha512-8UnnX2PeRAPZuN12svgR9j7M1uWMovg/CEnIwIG0LFkXSJJe4PdfUGiTGl8V9bsBHFUtfVINcSyYxd7q+kx9fA==} - engines: {node: '>=12'} - dependencies: - '@jridgewell/sourcemap-codec': 1.4.15 - dev: true - /magic-string@0.30.0: resolution: {integrity: sha512-LA+31JYDJLs82r2ScLrlz1GjSgu66ZV518eyWT+S8VhyQn/JL0u9MeBOvQMGYiPk1DBiSN9DDMOcXvigJZaViQ==} engines: {node: '>=12'} @@ -12238,11 +12222,6 @@ packages: resolution: {integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==} engines: {node: '>= 0.4'} - /object-path@0.11.8: - resolution: {integrity: sha512-YJjNZrlXJFM42wTBn6zgOJVar9KFJvzx6sTWDte8sWZF//cnjl0BxHNpfZx+ZffXX63A9q0b1zsFiBX4g4X5KA==} - engines: {node: '>= 10.12.0'} - dev: true - /object-visit@1.0.1: resolution: {integrity: sha512-GBaMwwAVK9qbQN3Scdo0OyvgPW7l3lnaVMj84uTOZlswkX0KpF6fyDBJhtTthf7pymztoN36/KEr1DyhF96zEA==} engines: {node: '>=0.10.0'} @@ -13362,53 +13341,6 @@ packages: del: 5.1.0 dev: true - /rollup-plugin-ts@3.2.0(patch_hash=2wypkbvk5crxf6sx473jzveoxq)(@babel/core@7.22.5)(@babel/preset-typescript@7.22.5)(@babel/runtime@7.22.5)(rollup@3.25.1)(typescript@5.1.3): - resolution: {integrity: sha512-KkTLVifkUexEiAXS9VtSjDrjKr0TyusmNJpb2ZTAzI9VuPumSu4AktIaVNnwv70iUEitHwZtET7OAM+5n1u1tg==} - engines: {node: '>=14.9.0', npm: '>=7.0.0', pnpm: '>=3.2.0', yarn: '>=1.13'} - peerDependencies: - '@babel/core': '>=6.x || >=7.x' - '@babel/plugin-transform-runtime': '>=6.x || >=7.x' - '@babel/preset-env': '>=6.x || >=7.x' - '@babel/preset-typescript': '>=6.x || >=7.x' - '@babel/runtime': '>=6.x || >=7.x' - '@swc/core': '>=1.x' - '@swc/helpers': '>=0.2' - rollup: '>=1.x || >=2.x' - typescript: '>=3.2.x || >= 4.x' - peerDependenciesMeta: - '@babel/core': - optional: true - '@babel/plugin-transform-runtime': - optional: true - '@babel/preset-env': - optional: true - '@babel/preset-typescript': - optional: true - '@babel/runtime': - optional: true - '@swc/core': - optional: true - '@swc/helpers': - optional: true - dependencies: - '@babel/core': 7.22.5 - '@babel/preset-typescript': 7.22.5(@babel/core@7.22.5) - '@babel/runtime': 7.22.5 - '@rollup/pluginutils': 5.0.2(rollup@3.25.1) - '@wessberg/stringutil': 1.0.19 - ansi-colors: 4.1.3 - browserslist: 4.21.5 - browserslist-generator: 2.0.3 - compatfactory: 2.0.9(typescript@5.1.3) - crosspath: 2.0.0 - magic-string: 0.27.0 - rollup: 3.25.1 - ts-clone-node: 2.0.4(typescript@5.1.3) - tslib: 2.5.0 - typescript: 5.1.3 - dev: true - patched: true - /rollup@3.25.1: resolution: {integrity: sha512-tywOR+rwIt5m2ZAWSe5AIJcTat8vGlnPFAv15ycCrw33t6iFsXZ6mzHVFh2psSjxQPmI+xgzMZZizUAukBI4aQ==} engines: {node: '>=14.18.0', npm: '>=8.0.0'} @@ -14758,24 +14690,10 @@ packages: engines: {node: '>=8'} dev: true - /ts-clone-node@2.0.4(typescript@5.1.3): - resolution: {integrity: sha512-eG6FAgmQsenhIJOIFhUcO6yyYejBKZIKcI3y21jiQmIOrth5pD6GElyPAyeihbPSyBs3u/9PVNXy+5I7jGy8jA==} - engines: {node: '>=14.9.0'} - peerDependencies: - typescript: ^3.x || ^4.x - dependencies: - compatfactory: 2.0.9(typescript@5.1.3) - typescript: 5.1.3 - dev: true - /tslib@1.14.1: resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} dev: true - /tslib@2.5.0: - resolution: {integrity: sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==} - dev: true - /tslib@2.5.3: resolution: {integrity: sha512-mSxlJJwl3BMEQCUNnxXBU9jP4JBktcEGhURcPR6VQVlnP0FdDEsIaz0C35dXNGLyRfrATNofF0F5p2KPxQgB+w==} dev: true @@ -14874,10 +14792,6 @@ packages: hasBin: true dev: true - /ua-parser-js@1.0.35: - resolution: {integrity: sha512-fKnGuqmTBnIE+/KXSzCn4db8RTigUzw1AN0DmdU6hJovUTbYJKyqj+8Mt1c4VfRDnOVJnENmfYkIPZ946UrSAA==} - dev: true - /uc.micro@1.0.6: resolution: {integrity: sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==} dev: true From 01c9c64ce8bc01c57667a89aebe917a1bde39ece Mon Sep 17 00:00:00 2001 From: ijlee2 Date: Wed, 5 Jul 2023 10:45:35 +0200 Subject: [PATCH 03/12] chore: Temporarily committed declarations and dist --- .../components/container-query.d.ts | 9 ++- .../components/container-query.d.ts.map | 1 + .../helpers/aspect-ratio.d.ts | 6 +- .../helpers/aspect-ratio.d.ts.map | 1 + .../helpers/height.d.ts | 6 +- .../declarations/helpers/height.d.ts.map | 1 + .../{dist => declarations}/helpers/width.d.ts | 6 +- .../declarations/helpers/width.d.ts.map | 1 + ember-container-query/declarations/index.d.ts | 7 ++ .../declarations/index.d.ts.map | 1 + .../modifiers/container-query.d.ts | 11 ++- .../modifiers/container-query.d.ts.map | 1 + .../declarations/template-registry.d.ts | 13 ++++ .../declarations/template-registry.d.ts.map | 1 + .../dist/applyDecoratedDescriptor-fa858ac4.js | 77 ------------------- .../applyDecoratedDescriptor-fa858ac4.js.map | 1 - .../dist/components/container-query.d.ts.map | 1 - .../dist/components/container-query.js | 6 +- .../dist/components/container-query.js.map | 2 +- .../dist/container-query.hbs-1b00a8f0.js | 6 ++ .../dist/container-query.hbs-1b00a8f0.js.map | 1 + ember-container-query/dist/index.d.ts | 6 -- ember-container-query/dist/index.js | 2 +- .../dist/modifiers/container-query.js | 2 +- .../dist/template-registry.d.ts | 13 ---- 25 files changed, 58 insertions(+), 124 deletions(-) rename ember-container-query/{dist => declarations}/components/container-query.d.ts (66%) create mode 100644 ember-container-query/declarations/components/container-query.d.ts.map rename ember-container-query/{dist => declarations}/helpers/aspect-ratio.d.ts (65%) create mode 100644 ember-container-query/declarations/helpers/aspect-ratio.d.ts.map rename ember-container-query/{dist => declarations}/helpers/height.d.ts (66%) create mode 100644 ember-container-query/declarations/helpers/height.d.ts.map rename ember-container-query/{dist => declarations}/helpers/width.d.ts (67%) create mode 100644 ember-container-query/declarations/helpers/width.d.ts.map create mode 100644 ember-container-query/declarations/index.d.ts create mode 100644 ember-container-query/declarations/index.d.ts.map rename ember-container-query/{dist => declarations}/modifiers/container-query.d.ts (78%) create mode 100644 ember-container-query/declarations/modifiers/container-query.d.ts.map create mode 100644 ember-container-query/declarations/template-registry.d.ts create mode 100644 ember-container-query/declarations/template-registry.d.ts.map delete mode 100644 ember-container-query/dist/applyDecoratedDescriptor-fa858ac4.js delete mode 100644 ember-container-query/dist/applyDecoratedDescriptor-fa858ac4.js.map delete mode 100644 ember-container-query/dist/components/container-query.d.ts.map create mode 100644 ember-container-query/dist/container-query.hbs-1b00a8f0.js create mode 100644 ember-container-query/dist/container-query.hbs-1b00a8f0.js.map delete mode 100644 ember-container-query/dist/index.d.ts delete mode 100644 ember-container-query/dist/template-registry.d.ts diff --git a/ember-container-query/dist/components/container-query.d.ts b/ember-container-query/declarations/components/container-query.d.ts similarity index 66% rename from ember-container-query/dist/components/container-query.d.ts rename to ember-container-query/declarations/components/container-query.d.ts index 9bc4f9b3..65644d56 100644 --- a/ember-container-query/dist/components/container-query.d.ts +++ b/ember-container-query/declarations/components/container-query.d.ts @@ -1,5 +1,6 @@ +import './container-query.css'; import Component from '@glimmer/component'; -import { Dimensions, Features, IndexSignatureParameter, QueryResults } from "../modifiers/container-query.js"; +import type { Dimensions, Features, IndexSignatureParameter, QueryResults } from '../modifiers/container-query'; interface ContainerQuerySignature { Args: { dataAttributePrefix?: string; @@ -17,7 +18,7 @@ interface ContainerQuerySignature { }; Element: HTMLElement; } -declare class ContainerQueryComponent extends Component> { +export default class ContainerQueryComponent extends Component> { dimensions?: Dimensions; queryResults?: QueryResults; tagName: string; @@ -26,5 +27,5 @@ declare class ContainerQueryComponent extends queryResults: QueryResults; }): void; } -export { ContainerQueryComponent as default }; -//# sourceMappingURL=components/container-query.d.ts.map \ No newline at end of file +export {}; +//# sourceMappingURL=container-query.d.ts.map \ No newline at end of file diff --git a/ember-container-query/declarations/components/container-query.d.ts.map b/ember-container-query/declarations/components/container-query.d.ts.map new file mode 100644 index 00000000..3d7c7f6c --- /dev/null +++ b/ember-container-query/declarations/components/container-query.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"container-query.d.ts","sourceRoot":"","sources":["../../src/components/container-query.ts"],"names":[],"mappings":"AAAA,OAAO,uBAAuB,CAAC;AAG/B,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAG3C,OAAO,KAAK,EACV,UAAU,EACV,QAAQ,EACR,uBAAuB,EACvB,YAAY,EACb,MAAM,8BAA8B,CAAC;AAEtC,UAAU,uBAAuB,CAAC,CAAC,SAAS,uBAAuB;IACjE,IAAI,EAAE;QACJ,mBAAmB,CAAC,EAAE,MAAM,CAAC;QAC7B,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,QAAQ,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC;QACvB,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;IACF,MAAM,EAAE;QACN,OAAO,EAAE;YACP;gBACE,UAAU,CAAC,EAAE,UAAU,CAAC;gBACxB,QAAQ,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC;aAC5B;SACF,CAAC;KACH,CAAC;IACF,OAAO,EAAE,WAAW,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,OAAO,uBAAuB,CAC1C,CAAC,SAAS,uBAAuB,CACjC,SAAQ,SAAS,CAAC,uBAAuB,CAAC,CAAC,CAAC,CAAC;IACpC,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,YAAY,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC;IAGxC,OAAO,SAA8B;IAE7B,WAAW,CAAC,EAClB,UAAU,EACV,YAAY,GACb,EAAE;QACD,UAAU,EAAE,UAAU,CAAC;QACvB,YAAY,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC;KAC/B,GAAG,IAAI;CAgCT"} \ No newline at end of file diff --git a/ember-container-query/dist/helpers/aspect-ratio.d.ts b/ember-container-query/declarations/helpers/aspect-ratio.d.ts similarity index 65% rename from ember-container-query/dist/helpers/aspect-ratio.d.ts rename to ember-container-query/declarations/helpers/aspect-ratio.d.ts index c62794c4..0368fa77 100644 --- a/ember-container-query/dist/helpers/aspect-ratio.d.ts +++ b/ember-container-query/declarations/helpers/aspect-ratio.d.ts @@ -1,5 +1,4 @@ -/// -import { Metadata } from "../modifiers/container-query.js"; +import type { Metadata } from '../modifiers/container-query'; declare const AspectRatioHelper: import("@ember/component/helper").FunctionBasedHelper<{ Args: { Positional: []; @@ -10,4 +9,5 @@ declare const AspectRatioHelper: import("@ember/component/helper").FunctionBased }; Return: Metadata; }>; -export { AspectRatioHelper as default }; +export default AspectRatioHelper; +//# sourceMappingURL=aspect-ratio.d.ts.map \ No newline at end of file diff --git a/ember-container-query/declarations/helpers/aspect-ratio.d.ts.map b/ember-container-query/declarations/helpers/aspect-ratio.d.ts.map new file mode 100644 index 00000000..76abbc13 --- /dev/null +++ b/ember-container-query/declarations/helpers/aspect-ratio.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"aspect-ratio.d.ts","sourceRoot":"","sources":["../../src/helpers/aspect-ratio.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAa7D,QAAA,MAAM,iBAAiB;;;;;;;;;EAQtB,CAAC;AAEF,eAAe,iBAAiB,CAAC"} \ No newline at end of file diff --git a/ember-container-query/dist/helpers/height.d.ts b/ember-container-query/declarations/helpers/height.d.ts similarity index 66% rename from ember-container-query/dist/helpers/height.d.ts rename to ember-container-query/declarations/helpers/height.d.ts index 1fbcac33..613365b6 100644 --- a/ember-container-query/dist/helpers/height.d.ts +++ b/ember-container-query/declarations/helpers/height.d.ts @@ -1,5 +1,4 @@ -/// -import { Metadata } from "../modifiers/container-query.js"; +import type { Metadata } from '../modifiers/container-query'; declare const HeightHelper: import("@ember/component/helper").FunctionBasedHelper<{ Args: { Positional: []; @@ -10,4 +9,5 @@ declare const HeightHelper: import("@ember/component/helper").FunctionBasedHelpe }; Return: Metadata; }>; -export { HeightHelper as default }; +export default HeightHelper; +//# sourceMappingURL=height.d.ts.map \ No newline at end of file diff --git a/ember-container-query/declarations/helpers/height.d.ts.map b/ember-container-query/declarations/helpers/height.d.ts.map new file mode 100644 index 00000000..dfbcfb25 --- /dev/null +++ b/ember-container-query/declarations/helpers/height.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"height.d.ts","sourceRoot":"","sources":["../../src/helpers/height.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAa7D,QAAA,MAAM,YAAY;;;;;;;;;EAMhB,CAAC;AAEH,eAAe,YAAY,CAAC"} \ No newline at end of file diff --git a/ember-container-query/dist/helpers/width.d.ts b/ember-container-query/declarations/helpers/width.d.ts similarity index 67% rename from ember-container-query/dist/helpers/width.d.ts rename to ember-container-query/declarations/helpers/width.d.ts index 056f464c..40cdddf9 100644 --- a/ember-container-query/dist/helpers/width.d.ts +++ b/ember-container-query/declarations/helpers/width.d.ts @@ -1,5 +1,4 @@ -/// -import { Metadata } from "../modifiers/container-query.js"; +import type { Metadata } from '../modifiers/container-query'; declare const WidthHelper: import("@ember/component/helper").FunctionBasedHelper<{ Args: { Positional: []; @@ -10,4 +9,5 @@ declare const WidthHelper: import("@ember/component/helper").FunctionBasedHelper }; Return: Metadata; }>; -export { WidthHelper as default }; +export default WidthHelper; +//# sourceMappingURL=width.d.ts.map \ No newline at end of file diff --git a/ember-container-query/declarations/helpers/width.d.ts.map b/ember-container-query/declarations/helpers/width.d.ts.map new file mode 100644 index 00000000..6696660b --- /dev/null +++ b/ember-container-query/declarations/helpers/width.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"width.d.ts","sourceRoot":"","sources":["../../src/helpers/width.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAa7D,QAAA,MAAM,WAAW;;;;;;;;;EAMf,CAAC;AAEH,eAAe,WAAW,CAAC"} \ No newline at end of file diff --git a/ember-container-query/declarations/index.d.ts b/ember-container-query/declarations/index.d.ts new file mode 100644 index 00000000..c705ba98 --- /dev/null +++ b/ember-container-query/declarations/index.d.ts @@ -0,0 +1,7 @@ +export { default as ContainerQuery } from './components/container-query'; +export { default as aspectRatio } from './helpers/aspect-ratio'; +export { default as height } from './helpers/height'; +export { default as width } from './helpers/width'; +export type { Dimensions, Features, IndexSignatureParameter, Metadata, QueryResults, } from './modifiers/container-query'; +export { default as containerQuery } from './modifiers/container-query'; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/ember-container-query/declarations/index.d.ts.map b/ember-container-query/declarations/index.d.ts.map new file mode 100644 index 00000000..d0306719 --- /dev/null +++ b/ember-container-query/declarations/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,8BAA8B,CAAC;AACzE,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACnD,YAAY,EACV,UAAU,EACV,QAAQ,EACR,uBAAuB,EACvB,QAAQ,EACR,YAAY,GACb,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,6BAA6B,CAAC"} \ No newline at end of file diff --git a/ember-container-query/dist/modifiers/container-query.d.ts b/ember-container-query/declarations/modifiers/container-query.d.ts similarity index 78% rename from ember-container-query/dist/modifiers/container-query.d.ts rename to ember-container-query/declarations/modifiers/container-query.d.ts index 4ba2d507..79b91430 100644 --- a/ember-container-query/dist/modifiers/container-query.d.ts +++ b/ember-container-query/declarations/modifiers/container-query.d.ts @@ -1,7 +1,5 @@ -/// -import Owner from '@ember/owner'; -import Modifier from 'ember-modifier'; -import { ArgsFor, NamedArgs, PositionalArgs } from "ember-modifier"; +import type Owner from '@ember/owner'; +import Modifier, { ArgsFor, NamedArgs, PositionalArgs } from 'ember-modifier'; type IndexSignatureParameter = string | number | symbol; type Dimensions = { aspectRatio: number; @@ -30,7 +28,7 @@ interface ContainerQueryModifierSignature { }; Element: Element; } -declare class ContainerQueryModifier extends Modifier> { +export default class ContainerQueryModifier extends Modifier> { private readonly resizeObserver; dimensions: Dimensions; queryResults: QueryResults; @@ -50,4 +48,5 @@ declare class ContainerQueryModifier extends private resetDataAttributes; private setDataAttributes; } -export { ContainerQueryModifier as default, Dimensions, Features, IndexSignatureParameter, Metadata, QueryResults }; +export { Dimensions, Features, IndexSignatureParameter, Metadata, QueryResults, }; +//# sourceMappingURL=container-query.d.ts.map \ No newline at end of file diff --git a/ember-container-query/declarations/modifiers/container-query.d.ts.map b/ember-container-query/declarations/modifiers/container-query.d.ts.map new file mode 100644 index 00000000..2d19e572 --- /dev/null +++ b/ember-container-query/declarations/modifiers/container-query.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"container-query.d.ts","sourceRoot":"","sources":["../../src/modifiers/container-query.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAGtC,OAAO,QAAQ,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAE9E,KAAK,uBAAuB,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;AAIxD,KAAK,UAAU,GAAG;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,KAAK,QAAQ,GAAG;IACd,SAAS,EAAE,MAAM,UAAU,CAAC;IAC5B,GAAG,EAAE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C,+BAA+B,CAAC,CAAC,CAAC,CAAC;IAQ3E,MAAM,CACJ,OAAO,EAAE,OAAO,EAChB,WAAW,EAAE,cAAc,CAAC,+BAA+B,CAAC,CAAC,CAAC,CAAC,EAC/D,KAAK,EAAE,SAAS,CAAC,+BAA+B,CAAC,CAAC,CAAC,CAAC,GACnD,IAAI;IAOC,OAAO,CAAC,QAAQ;IAWxB,OAAO,CAAC,sBAAsB;IAO9B,OAAO,CAAC,cAAc;IAYtB,OAAO,CAAC,iBAAiB;IAWzB,OAAO,CAAC,eAAe;IAevB,OAAO,CAAC,mBAAmB;IAQ3B,OAAO,CAAC,iBAAiB;CAmB1B;AAED,OAAO,EACL,UAAU,EACV,QAAQ,EACR,uBAAuB,EACvB,QAAQ,EACR,YAAY,GACb,CAAC"} \ No newline at end of file diff --git a/ember-container-query/declarations/template-registry.d.ts b/ember-container-query/declarations/template-registry.d.ts new file mode 100644 index 00000000..798e3c43 --- /dev/null +++ b/ember-container-query/declarations/template-registry.d.ts @@ -0,0 +1,13 @@ +import type ContainerQueryComponent from './components/container-query'; +import type AspectRatioHelper from './helpers/aspect-ratio'; +import type HeightHelper from './helpers/height'; +import type WidthHelper from './helpers/width'; +import type ContainerQueryModifier from './modifiers/container-query'; +export default interface EmberContainerQueryRegistry { + ContainerQuery: typeof ContainerQueryComponent; + 'aspect-ratio': typeof AspectRatioHelper; + 'container-query': typeof ContainerQueryModifier; + height: typeof HeightHelper; + width: typeof WidthHelper; +} +//# sourceMappingURL=template-registry.d.ts.map \ No newline at end of file diff --git a/ember-container-query/declarations/template-registry.d.ts.map b/ember-container-query/declarations/template-registry.d.ts.map new file mode 100644 index 00000000..524d5425 --- /dev/null +++ b/ember-container-query/declarations/template-registry.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"template-registry.d.ts","sourceRoot":"","sources":["../src/template-registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,uBAAuB,MAAM,8BAA8B,CAAC;AACxE,OAAO,KAAK,iBAAiB,MAAM,wBAAwB,CAAC;AAC5D,OAAO,KAAK,YAAY,MAAM,kBAAkB,CAAC;AACjD,OAAO,KAAK,WAAW,MAAM,iBAAiB,CAAC;AAC/C,OAAO,KAAK,sBAAsB,MAAM,6BAA6B,CAAC;AAEtE,MAAM,CAAC,OAAO,WAAW,2BAA2B;IAClD,cAAc,EAAE,OAAO,uBAAuB,CAAC;IAC/C,cAAc,EAAE,OAAO,iBAAiB,CAAC;IACzC,iBAAiB,EAAE,OAAO,sBAAsB,CAAC;IACjD,MAAM,EAAE,OAAO,YAAY,CAAC;IAC5B,KAAK,EAAE,OAAO,WAAW,CAAC;CAC3B"} \ No newline at end of file diff --git a/ember-container-query/dist/applyDecoratedDescriptor-fa858ac4.js b/ember-container-query/dist/applyDecoratedDescriptor-fa858ac4.js deleted file mode 100644 index ca2f7957..00000000 --- a/ember-container-query/dist/applyDecoratedDescriptor-fa858ac4.js +++ /dev/null @@ -1,77 +0,0 @@ -function _initializerDefineProperty(target, property, descriptor, context) { - if (!descriptor) return; - Object.defineProperty(target, property, { - enumerable: descriptor.enumerable, - configurable: descriptor.configurable, - writable: descriptor.writable, - value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 - }); -} - -function _typeof(obj) { - "@babel/helpers - typeof"; - - return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { - return typeof obj; - } : function (obj) { - return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; - }, _typeof(obj); -} - -function _toPrimitive(input, hint) { - if (_typeof(input) !== "object" || input === null) return input; - var prim = input[Symbol.toPrimitive]; - if (prim !== undefined) { - var res = prim.call(input, hint || "default"); - if (_typeof(res) !== "object") return res; - throw new TypeError("@@toPrimitive must return a primitive value."); - } - return (hint === "string" ? String : Number)(input); -} - -function _toPropertyKey(arg) { - var key = _toPrimitive(arg, "string"); - return _typeof(key) === "symbol" ? key : String(key); -} - -function _defineProperty(obj, key, value) { - key = _toPropertyKey(key); - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { - var desc = {}; - Object.keys(descriptor).forEach(function (key) { - desc[key] = descriptor[key]; - }); - desc.enumerable = !!desc.enumerable; - desc.configurable = !!desc.configurable; - if ('value' in desc || desc.initializer) { - desc.writable = true; - } - desc = decorators.slice().reverse().reduce(function (desc, decorator) { - return decorator(target, property, desc) || desc; - }, desc); - if (context && desc.initializer !== void 0) { - desc.value = desc.initializer ? desc.initializer.call(context) : void 0; - desc.initializer = undefined; - } - if (desc.initializer === void 0) { - Object.defineProperty(target, property, desc); - desc = null; - } - return desc; -} - -export { _applyDecoratedDescriptor as _, _initializerDefineProperty as a, _defineProperty as b }; -//# sourceMappingURL=applyDecoratedDescriptor-fa858ac4.js.map diff --git a/ember-container-query/dist/applyDecoratedDescriptor-fa858ac4.js.map b/ember-container-query/dist/applyDecoratedDescriptor-fa858ac4.js.map deleted file mode 100644 index d35c27e0..00000000 --- a/ember-container-query/dist/applyDecoratedDescriptor-fa858ac4.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"applyDecoratedDescriptor-fa858ac4.js","sources":["../../node_modules/.pnpm/@babel+runtime@7.22.5/node_modules/@babel/runtime/helpers/esm/initializerDefineProperty.js","../../node_modules/.pnpm/@babel+runtime@7.22.5/node_modules/@babel/runtime/helpers/esm/typeof.js","../../node_modules/.pnpm/@babel+runtime@7.22.5/node_modules/@babel/runtime/helpers/esm/toPrimitive.js","../../node_modules/.pnpm/@babel+runtime@7.22.5/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","../../node_modules/.pnpm/@babel+runtime@7.22.5/node_modules/@babel/runtime/helpers/esm/defineProperty.js","../../node_modules/.pnpm/@babel+runtime@7.22.5/node_modules/@babel/runtime/helpers/esm/applyDecoratedDescriptor.js"],"sourcesContent":["export default function _initializerDefineProperty(target, property, descriptor, context) {\n if (!descriptor) return;\n Object.defineProperty(target, property, {\n enumerable: descriptor.enumerable,\n configurable: descriptor.configurable,\n writable: descriptor.writable,\n value: descriptor.initializer ? descriptor.initializer.call(context) : void 0\n });\n}","export default function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, _typeof(obj);\n}","import _typeof from \"./typeof.js\";\nexport default function _toPrimitive(input, hint) {\n if (_typeof(input) !== \"object\" || input === null) return input;\n var prim = input[Symbol.toPrimitive];\n if (prim !== undefined) {\n var res = prim.call(input, hint || \"default\");\n if (_typeof(res) !== \"object\") return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (hint === \"string\" ? String : Number)(input);\n}","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nexport default function _toPropertyKey(arg) {\n var key = toPrimitive(arg, \"string\");\n return _typeof(key) === \"symbol\" ? key : String(key);\n}","import toPropertyKey from \"./toPropertyKey.js\";\nexport default function _defineProperty(obj, key, value) {\n key = toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}","export default function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {\n var desc = {};\n Object.keys(descriptor).forEach(function (key) {\n desc[key] = descriptor[key];\n });\n desc.enumerable = !!desc.enumerable;\n desc.configurable = !!desc.configurable;\n if ('value' in desc || desc.initializer) {\n desc.writable = true;\n }\n desc = decorators.slice().reverse().reduce(function (desc, decorator) {\n return decorator(target, property, desc) || desc;\n }, desc);\n if (context && desc.initializer !== void 0) {\n desc.value = desc.initializer ? desc.initializer.call(context) : void 0;\n desc.initializer = undefined;\n }\n if (desc.initializer === void 0) {\n Object.defineProperty(target, property, desc);\n desc = null;\n }\n return desc;\n}"],"names":["_initializerDefineProperty","target","property","descriptor","context","Object","defineProperty","enumerable","configurable","writable","value","initializer","call","_typeof","obj","Symbol","iterator","constructor","prototype","_toPrimitive","input","hint","prim","toPrimitive","undefined","res","TypeError","String","Number","_toPropertyKey","arg","key","_defineProperty","toPropertyKey","_applyDecoratedDescriptor","decorators","desc","keys","forEach","slice","reverse","reduce","decorator"],"mappings":"AAAe,SAASA,0BAA0BA,CAACC,MAAM,EAAEC,QAAQ,EAAEC,UAAU,EAAEC,OAAO,EAAE;EACxF,IAAI,CAACD,UAAU,EAAE,OAAA;AACjBE,EAAAA,MAAM,CAACC,cAAc,CAACL,MAAM,EAAEC,QAAQ,EAAE;IACtCK,UAAU,EAAEJ,UAAU,CAACI,UAAU;IACjCC,YAAY,EAAEL,UAAU,CAACK,YAAY;IACrCC,QAAQ,EAAEN,UAAU,CAACM,QAAQ;AAC7BC,IAAAA,KAAK,EAAEP,UAAU,CAACQ,WAAW,GAAGR,UAAU,CAACQ,WAAW,CAACC,IAAI,CAACR,OAAO,CAAC,GAAG,KAAK,CAAA;AAC9E,GAAC,CAAC,CAAA;AACJ;;ACRe,SAASS,OAAOA,CAACC,GAAG,EAAE;EACnC,yBAAyB,CAAA;;AAEzB,EAAA,OAAOD,OAAO,GAAG,UAAU,IAAI,OAAOE,MAAM,IAAI,QAAQ,IAAI,OAAOA,MAAM,CAACC,QAAQ,GAAG,UAAUF,GAAG,EAAE;AAClG,IAAA,OAAO,OAAOA,GAAG,CAAA;GAClB,GAAG,UAAUA,GAAG,EAAE;IACjB,OAAOA,GAAG,IAAI,UAAU,IAAI,OAAOC,MAAM,IAAID,GAAG,CAACG,WAAW,KAAKF,MAAM,IAAID,GAAG,KAAKC,MAAM,CAACG,SAAS,GAAG,QAAQ,GAAG,OAAOJ,GAAG,CAAA;AAC7H,GAAC,EAAED,OAAO,CAACC,GAAG,CAAC,CAAA;AACjB;;AC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AAS,CAAA;AAC9B,GAAA;AACA,EAAA,IAAIY,IAAI,CAACzB,WAAW,KAAK,KAAK,CAAC,EAAE;IAC/BN,MAAM,CAACC,cAAc,CAACL,MAAM,EAAEC,QAAQ,EAAEkC,IAAI,CAAC,CAAA;AAC7CA,IAAAA,IAAI,GAAG,IAAI,CAAA;AACb,GAAA;AACA,EAAA,OAAOA,IAAI,CAAA;AACb;;;;","x_google_ignoreList":[0,1,2,3,4,5]} \ No newline at end of file diff --git a/ember-container-query/dist/components/container-query.d.ts.map b/ember-container-query/dist/components/container-query.d.ts.map deleted file mode 100644 index efea0db4..00000000 --- a/ember-container-query/dist/components/container-query.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"components/container-query.d.ts","sourceRoot":"","sources":["../src/components/container-query.ts"],"names":[],"mappings":"AAGA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAG3C,OAAO,+DAKN,wCAAqC;AAEtC,UAAU,uBAAuB,CAAC,CAAC,SAAS,uBAAuB;IACjE,IAAI,EAAE;QACJ,mBAAmB,CAAC,EAAE,MAAM,CAAC;QAC7B,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,QAAQ,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC;QACvB,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;IACF,MAAM,EAAE;QACN,OAAO,EAAE;YACP;gBACE,UAAU,CAAC,EAAE,UAAU,CAAC;gBACxB,QAAQ,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC;aAC5B;SACF,CAAC;KACH,CAAC;IACF,OAAO,EAAE,WAAW,CAAC;CACtB;AAED,cAAqB,uBAAuB,CAC1C,CAAC,SAAS,uBAAuB,CACjC,SAAQ,SAAS,CAAC,uBAAuB,CAAC,CAAC,CAAC,CAAC;IACpC,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,YAAY,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC;IAGxC,OAAO,SAA8B;IAE7B,WAAW,CAAC,EAClB,UAAU,EACV,YAAY,GACb,EAAE;QACD,UAAU,EAAE,UAAU,CAAC;QACvB,YAAY,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC;KAC/B,GAAG,IAAI;CAIT"} \ No newline at end of file diff --git a/ember-container-query/dist/components/container-query.js b/ember-container-query/dist/components/container-query.js index 80b58dfd..bd4c5d1a 100644 --- a/ember-container-query/dist/components/container-query.js +++ b/ember-container-query/dist/components/container-query.js @@ -1,13 +1,11 @@ -import { _ as _applyDecoratedDescriptor, a as _initializerDefineProperty, b as _defineProperty } from '../applyDecoratedDescriptor-fa858ac4.js'; +import { _ as _applyDecoratedDescriptor, a as _initializerDefineProperty, b as _defineProperty } from '../_rollupPluginBabelHelpers-e795903d.js'; import { setComponentTemplate } from '@ember/component'; -import { precompileTemplate } from '@ember/template-compilation'; +import { T as TEMPLATE } from '../container-query.hbs-1b00a8f0.js'; import './container-query.css'; import { action } from '@ember/object'; import Component from '@glimmer/component'; import { tracked } from '@glimmer/tracking'; -var TEMPLATE = precompileTemplate("{{! @glint-ignore: ember-element-helper needs to provide Glint signature }}\n{{#let (element this.tagName) as |Tag|}}\n \n {{yield\n (hash\n dimensions=this.dimensions\n features=this.queryResults\n )\n }}\n \n{{/let}}"); - var _class, _descriptor, _descriptor2; let ContainerQueryComponent = (_class = class ContainerQueryComponent extends Component { constructor(...args) { diff --git a/ember-container-query/dist/components/container-query.js.map b/ember-container-query/dist/components/container-query.js.map index 9a2a7cfb..42d6a749 100644 --- a/ember-container-query/dist/components/container-query.js.map +++ b/ember-container-query/dist/components/container-query.js.map @@ -1 +1 @@ -{"version":3,"file":"container-query.js","sources":["../../src/components/container-query.hbs.js","../../src/components/container-query.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{! @glint-ignore: ember-element-helper needs to provide Glint signature }}\\n{{#let (element this.tagName) as |Tag|}}\\n \\n {{yield\\n (hash\\n dimensions=this.dimensions\\n features=this.queryResults\\n )\\n }}\\n \\n{{/let}}\")","import './container-query.css';\n\nimport { action } from '@ember/object';\nimport Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\n\nimport type {\n Dimensions,\n Features,\n IndexSignatureParameter,\n QueryResults,\n} from '../modifiers/container-query';\n\ninterface ContainerQuerySignature {\n Args: {\n dataAttributePrefix?: string;\n debounce?: number;\n features?: Features;\n tagName?: string;\n };\n Blocks: {\n default: [\n {\n dimensions?: Dimensions;\n features?: QueryResults;\n },\n ];\n };\n Element: HTMLElement;\n}\n\nexport default class ContainerQueryComponent<\n T extends IndexSignatureParameter,\n> extends Component> {\n @tracked dimensions?: Dimensions;\n @tracked queryResults?: QueryResults;\n\n // The dynamic tag is restricted to be immutable\n tagName = this.args.tagName ?? 'div';\n\n @action updateState({\n dimensions,\n queryResults,\n }: {\n dimensions: Dimensions;\n queryResults: QueryResults;\n }): void {\n this.dimensions = dimensions;\n this.queryResults = queryResults;\n }\n}\n"],"names":["precompileTemplate","ContainerQueryComponent","_class","Component","constructor","args","_initializerDefineProperty","_descriptor","_descriptor2","_defineProperty","tagName","updateState","dimensions","queryResults","_applyDecoratedDescriptor","prototype","tracked","configurable","enumerable","writable","initializer","action","Object","getOwnPropertyDescriptor","setComponentTemplate","TEMPLATE"],"mappings":";;;;;;;;AACA,eAAeA,kBAAkB,CAAC,geAAge,CAAC;;;AC8B9eC,IAAAA,uBAAuB,IAAAC,MAAA,GAA7B,MAAMD,uBAAuB,SAElCE,SAAS,CAA6B;AAAAC,EAAAA,WAAAA,CAAA,GAAAC,IAAA,EAAA;AAAA,IAAA,KAAA,CAAA,GAAAA,IAAA,CAAA,CAAA;AAAAC,IAAAA,0BAAA,qBAAAC,WAAA,EAAA,IAAA,CAAA,CAAA;AAAAD,IAAAA,0BAAA,uBAAAE,YAAA,EAAA,IAAA,CAAA,CAAA;AAI9C;AAAAC,IAAAA,eAAA,kBACU,IAAI,CAACJ,IAAI,CAACK,OAAO,IAAI,KAAK,CAAA,CAAA;AAAA,GAAA;AAE5BC,EAAAA,WAAWA,CAAC;IAClBC,UAAU;AACVC,IAAAA,YAAAA;AAIF,GAAC,EAAQ;IACP,IAAI,CAACD,UAAU,GAAGA,UAAU,CAAA;IAC5B,IAAI,CAACC,YAAY,GAAGA,YAAY,CAAA;AAClC,GAAA;AACF,CAAC,GAAAN,WAAA,GAAAO,yBAAA,CAAAZ,MAAA,CAAAa,SAAA,EAAA,YAAA,EAAA,CAhBEC,OAAO,CAAA,EAAA;EAAAC,YAAA,EAAA,IAAA;EAAAC,UAAA,EAAA,IAAA;EAAAC,QAAA,EAAA,IAAA;EAAAC,WAAA,EAAA,IAAA;AAAA,CAAAZ,CAAAA,EAAAA,YAAA,GAAAM,yBAAA,CAAAZ,MAAA,CAAAa,SAAA,mBACPC,OAAO,CAAA,EAAA;EAAAC,YAAA,EAAA,IAAA;EAAAC,UAAA,EAAA,IAAA;EAAAC,QAAA,EAAA,IAAA;EAAAC,WAAA,EAAA,IAAA;AAAA,CAAAN,CAAAA,EAAAA,yBAAA,CAAAZ,MAAA,CAAAa,SAAA,EAKPM,aAAAA,EAAAA,CAAAA,MAAM,GAAAC,MAAA,CAAAC,wBAAA,CAAArB,MAAA,CAAAa,SAAA,EAAA,aAAA,CAAA,EAAAb,MAAA,CAAAa,SAAA,IAAAb,MAAA,EAAA;AATmCsB,oBAAA,CAAAC,QAAA,EAAAxB,uBAAA,CAAA;;;;"} \ No newline at end of file +{"version":3,"file":"container-query.js","sources":["../../src/components/container-query.ts"],"sourcesContent":["import './container-query.css';\n\nimport { action } from '@ember/object';\nimport Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\n\nimport type {\n Dimensions,\n Features,\n IndexSignatureParameter,\n QueryResults,\n} from '../modifiers/container-query';\n\ninterface ContainerQuerySignature {\n Args: {\n dataAttributePrefix?: string;\n debounce?: number;\n features?: Features;\n tagName?: string;\n };\n Blocks: {\n default: [\n {\n dimensions?: Dimensions;\n features?: QueryResults;\n },\n ];\n };\n Element: HTMLElement;\n}\n\nexport default class ContainerQueryComponent<\n T extends IndexSignatureParameter,\n> extends Component> {\n @tracked dimensions?: Dimensions;\n @tracked queryResults?: QueryResults;\n\n // The dynamic tag is restricted to be immutable\n tagName = this.args.tagName ?? 'div';\n\n @action updateState({\n dimensions,\n queryResults,\n }: {\n dimensions: Dimensions;\n queryResults: QueryResults;\n }): void {\n this.dimensions = dimensions;\n this.queryResults = queryResults;\n }\n}\n"],"names":["ContainerQueryComponent","_class","Component","constructor","args","_initializerDefineProperty","_descriptor","_descriptor2","_defineProperty","tagName","updateState","dimensions","queryResults","_applyDecoratedDescriptor","prototype","tracked","configurable","enumerable","writable","initializer","action","Object","getOwnPropertyDescriptor","setComponentTemplate","TEMPLATE"],"mappings":";;;;;;;;;AA+BqBA,IAAAA,uBAAuB,IAAAC,MAAA,GAA7B,MAAMD,uBAAuB,SAElCE,SAAS,CAA6B;AAAAC,EAAAA,WAAAA,CAAA,GAAAC,IAAA,EAAA;AAAA,IAAA,KAAA,CAAA,GAAAA,IAAA,CAAA,CAAA;AAAAC,IAAAA,0BAAA,qBAAAC,WAAA,EAAA,IAAA,CAAA,CAAA;AAAAD,IAAAA,0BAAA,uBAAAE,YAAA,EAAA,IAAA,CAAA,CAAA;AAI9C;AAAAC,IAAAA,eAAA,kBACU,IAAI,CAACJ,IAAI,CAACK,OAAO,IAAI,KAAK,CAAA,CAAA;AAAA,GAAA;AAE5BC,EAAAA,WAAWA,CAAC;IAClBC,UAAU;AACVC,IAAAA,YAAAA;AAIF,GAAC,EAAQ;IACP,IAAI,CAACD,UAAU,GAAGA,UAAU,CAAA;IAC5B,IAAI,CAACC,YAAY,GAAGA,YAAY,CAAA;AAClC,GAAA;AACF,CAAC,GAAAN,WAAA,GAAAO,yBAAA,CAAAZ,MAAA,CAAAa,SAAA,EAAA,YAAA,EAAA,CAhBEC,OAAO,CAAA,EAAA;EAAAC,YAAA,EAAA,IAAA;EAAAC,UAAA,EAAA,IAAA;EAAAC,QAAA,EAAA,IAAA;EAAAC,WAAA,EAAA,IAAA;AAAA,CAAAZ,CAAAA,EAAAA,YAAA,GAAAM,yBAAA,CAAAZ,MAAA,CAAAa,SAAA,mBACPC,OAAO,CAAA,EAAA;EAAAC,YAAA,EAAA,IAAA;EAAAC,UAAA,EAAA,IAAA;EAAAC,QAAA,EAAA,IAAA;EAAAC,WAAA,EAAA,IAAA;AAAA,CAAAN,CAAAA,EAAAA,yBAAA,CAAAZ,MAAA,CAAAa,SAAA,EAKPM,aAAAA,EAAAA,CAAAA,MAAM,GAAAC,MAAA,CAAAC,wBAAA,CAAArB,MAAA,CAAAa,SAAA,EAAA,aAAA,CAAA,EAAAb,MAAA,CAAAa,SAAA,IAAAb,MAAA,EAAA;AATmCsB,oBAAA,CAAAC,QAAA,EAAAxB,uBAAA,CAAA;;;;"} \ No newline at end of file diff --git a/ember-container-query/dist/container-query.hbs-1b00a8f0.js b/ember-container-query/dist/container-query.hbs-1b00a8f0.js new file mode 100644 index 00000000..29b05cbf --- /dev/null +++ b/ember-container-query/dist/container-query.hbs-1b00a8f0.js @@ -0,0 +1,6 @@ +import { precompileTemplate } from '@ember/template-compilation'; + +var TEMPLATE = precompileTemplate("{{! @glint-ignore: ember-element-helper needs to provide Glint signature }}\n{{#let (element this.tagName) as |Tag|}}\n \n {{yield\n (hash\n dimensions=this.dimensions\n features=this.queryResults\n )\n }}\n \n{{/let}}"); + +export { TEMPLATE as T }; +//# sourceMappingURL=container-query.hbs-1b00a8f0.js.map diff --git a/ember-container-query/dist/container-query.hbs-1b00a8f0.js.map b/ember-container-query/dist/container-query.hbs-1b00a8f0.js.map new file mode 100644 index 00000000..e168a1d4 --- /dev/null +++ b/ember-container-query/dist/container-query.hbs-1b00a8f0.js.map @@ -0,0 +1 @@ +{"version":3,"file":"container-query.hbs-1b00a8f0.js","sources":["../src/components/container-query.hbs.js"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{! @glint-ignore: ember-element-helper needs to provide Glint signature }}\\n{{#let (element this.tagName) as |Tag|}}\\n \\n {{yield\\n (hash\\n dimensions=this.dimensions\\n features=this.queryResults\\n )\\n }}\\n \\n{{/let}}\")"],"names":["precompileTemplate"],"mappings":";;AACA,eAAeA,kBAAkB,CAAC,geAAge,CAAC;;;;"} \ No newline at end of file diff --git a/ember-container-query/dist/index.d.ts b/ember-container-query/dist/index.d.ts deleted file mode 100644 index e7f9f261..00000000 --- a/ember-container-query/dist/index.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export { default as ContainerQuery } from "./components/container-query.js"; -export { default as aspectRatio } from "./helpers/aspect-ratio.js"; -export { default as height } from "./helpers/height.js"; -export { default as width } from "./helpers/width.js"; -export type { Dimensions, Features, IndexSignatureParameter, Metadata, QueryResults } from "./modifiers/container-query.js"; -export { default as containerQuery } from "./modifiers/container-query.js"; diff --git a/ember-container-query/dist/index.js b/ember-container-query/dist/index.js index 7e866d53..d2d46ffd 100644 --- a/ember-container-query/dist/index.js +++ b/ember-container-query/dist/index.js @@ -1,4 +1,4 @@ -export { default as ContainerQuery } from './components/container-query.js'; +export { T as ContainerQuery } from './container-query.hbs-1b00a8f0.js'; export { default as aspectRatio } from './helpers/aspect-ratio.js'; export { default as height } from './helpers/height.js'; export { default as width } from './helpers/width.js'; diff --git a/ember-container-query/dist/modifiers/container-query.js b/ember-container-query/dist/modifiers/container-query.js index 2e16a47e..f0065e69 100644 --- a/ember-container-query/dist/modifiers/container-query.js +++ b/ember-container-query/dist/modifiers/container-query.js @@ -1,4 +1,4 @@ -import { _ as _applyDecoratedDescriptor, a as _initializerDefineProperty, b as _defineProperty } from '../applyDecoratedDescriptor-fa858ac4.js'; +import { _ as _applyDecoratedDescriptor, a as _initializerDefineProperty, b as _defineProperty } from '../_rollupPluginBabelHelpers-e795903d.js'; import { registerDestructor } from '@ember/destroyable'; import { action } from '@ember/object'; import { debounce } from '@ember/runloop'; diff --git a/ember-container-query/dist/template-registry.d.ts b/ember-container-query/dist/template-registry.d.ts deleted file mode 100644 index 463d59f0..00000000 --- a/ember-container-query/dist/template-registry.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import ContainerQueryComponent from "./components/container-query.js"; -import AspectRatioHelper from "./helpers/aspect-ratio.js"; -import HeightHelper from "./helpers/height.js"; -import WidthHelper from "./helpers/width.js"; -import ContainerQueryModifier from "./modifiers/container-query.js"; -interface EmberContainerQueryRegistry { - ContainerQuery: typeof ContainerQueryComponent; - 'aspect-ratio': typeof AspectRatioHelper; - 'container-query': typeof ContainerQueryModifier; - height: typeof HeightHelper; - width: typeof WidthHelper; -} -export { EmberContainerQueryRegistry as default }; From 72edb9b87879787130ac52f90aacfed81c932d7b Mon Sep 17 00:00:00 2001 From: ijlee2 Date: Wed, 5 Jul 2023 10:56:51 +0200 Subject: [PATCH 04/12] bugfix: Removed .hbs from extensions --- ember-container-query/rollup.config.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ember-container-query/rollup.config.mjs b/ember-container-query/rollup.config.mjs index c126dd18..a5102ac3 100644 --- a/ember-container-query/rollup.config.mjs +++ b/ember-container-query/rollup.config.mjs @@ -9,7 +9,7 @@ const addon = new Addon({ }); // Add extensions here, such as ts, gjs, etc that you may import -const extensions = ['.hbs', '.js', '.ts']; +const extensions = ['.js', '.ts']; export default { // This provides defaults that work well alongside `publicEntrypoints` below. From accf460938642355c44a2d419766f9b834caf04b Mon Sep 17 00:00:00 2001 From: ijlee2 Date: Wed, 5 Jul 2023 10:57:08 +0200 Subject: [PATCH 05/12] chore: Committed dist --- ember-container-query/dist/components/container-query.js | 4 +++- .../dist/components/container-query.js.map | 2 +- ember-container-query/dist/container-query.hbs-1b00a8f0.js | 6 ------ .../dist/container-query.hbs-1b00a8f0.js.map | 1 - ember-container-query/dist/index.js | 2 +- 5 files changed, 5 insertions(+), 10 deletions(-) delete mode 100644 ember-container-query/dist/container-query.hbs-1b00a8f0.js delete mode 100644 ember-container-query/dist/container-query.hbs-1b00a8f0.js.map diff --git a/ember-container-query/dist/components/container-query.js b/ember-container-query/dist/components/container-query.js index bd4c5d1a..6227dee8 100644 --- a/ember-container-query/dist/components/container-query.js +++ b/ember-container-query/dist/components/container-query.js @@ -1,11 +1,13 @@ import { _ as _applyDecoratedDescriptor, a as _initializerDefineProperty, b as _defineProperty } from '../_rollupPluginBabelHelpers-e795903d.js'; import { setComponentTemplate } from '@ember/component'; -import { T as TEMPLATE } from '../container-query.hbs-1b00a8f0.js'; +import { precompileTemplate } from '@ember/template-compilation'; import './container-query.css'; import { action } from '@ember/object'; import Component from '@glimmer/component'; import { tracked } from '@glimmer/tracking'; +var TEMPLATE = precompileTemplate("{{! @glint-ignore: ember-element-helper needs to provide Glint signature }}\n{{#let (element this.tagName) as |Tag|}}\n \n {{yield\n (hash\n dimensions=this.dimensions\n features=this.queryResults\n )\n }}\n \n{{/let}}"); + var _class, _descriptor, _descriptor2; let ContainerQueryComponent = (_class = class ContainerQueryComponent extends Component { constructor(...args) { diff --git a/ember-container-query/dist/components/container-query.js.map b/ember-container-query/dist/components/container-query.js.map index 42d6a749..9a2a7cfb 100644 --- a/ember-container-query/dist/components/container-query.js.map +++ b/ember-container-query/dist/components/container-query.js.map @@ -1 +1 @@ -{"version":3,"file":"container-query.js","sources":["../../src/components/container-query.ts"],"sourcesContent":["import './container-query.css';\n\nimport { action } from '@ember/object';\nimport Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\n\nimport type {\n Dimensions,\n Features,\n IndexSignatureParameter,\n QueryResults,\n} from '../modifiers/container-query';\n\ninterface ContainerQuerySignature {\n Args: {\n dataAttributePrefix?: string;\n debounce?: number;\n features?: Features;\n tagName?: string;\n };\n Blocks: {\n default: [\n {\n dimensions?: Dimensions;\n features?: QueryResults;\n },\n ];\n };\n Element: HTMLElement;\n}\n\nexport default class ContainerQueryComponent<\n T extends IndexSignatureParameter,\n> extends Component> {\n @tracked dimensions?: Dimensions;\n @tracked queryResults?: QueryResults;\n\n // The dynamic tag is restricted to be immutable\n tagName = this.args.tagName ?? 'div';\n\n @action updateState({\n dimensions,\n queryResults,\n }: {\n dimensions: Dimensions;\n queryResults: QueryResults;\n }): void {\n this.dimensions = dimensions;\n this.queryResults = queryResults;\n }\n}\n"],"names":["ContainerQueryComponent","_class","Component","constructor","args","_initializerDefineProperty","_descriptor","_descriptor2","_defineProperty","tagName","updateState","dimensions","queryResults","_applyDecoratedDescriptor","prototype","tracked","configurable","enumerable","writable","initializer","action","Object","getOwnPropertyDescriptor","setComponentTemplate","TEMPLATE"],"mappings":";;;;;;;;;AA+BqBA,IAAAA,uBAAuB,IAAAC,MAAA,GAA7B,MAAMD,uBAAuB,SAElCE,SAAS,CAA6B;AAAAC,EAAAA,WAAAA,CAAA,GAAAC,IAAA,EAAA;AAAA,IAAA,KAAA,CAAA,GAAAA,IAAA,CAAA,CAAA;AAAAC,IAAAA,0BAAA,qBAAAC,WAAA,EAAA,IAAA,CAAA,CAAA;AAAAD,IAAAA,0BAAA,uBAAAE,YAAA,EAAA,IAAA,CAAA,CAAA;AAI9C;AAAAC,IAAAA,eAAA,kBACU,IAAI,CAACJ,IAAI,CAACK,OAAO,IAAI,KAAK,CAAA,CAAA;AAAA,GAAA;AAE5BC,EAAAA,WAAWA,CAAC;IAClBC,UAAU;AACVC,IAAAA,YAAAA;AAIF,GAAC,EAAQ;IACP,IAAI,CAACD,UAAU,GAAGA,UAAU,CAAA;IAC5B,IAAI,CAACC,YAAY,GAAGA,YAAY,CAAA;AAClC,GAAA;AACF,CAAC,GAAAN,WAAA,GAAAO,yBAAA,CAAAZ,MAAA,CAAAa,SAAA,EAAA,YAAA,EAAA,CAhBEC,OAAO,CAAA,EAAA;EAAAC,YAAA,EAAA,IAAA;EAAAC,UAAA,EAAA,IAAA;EAAAC,QAAA,EAAA,IAAA;EAAAC,WAAA,EAAA,IAAA;AAAA,CAAAZ,CAAAA,EAAAA,YAAA,GAAAM,yBAAA,CAAAZ,MAAA,CAAAa,SAAA,mBACPC,OAAO,CAAA,EAAA;EAAAC,YAAA,EAAA,IAAA;EAAAC,UAAA,EAAA,IAAA;EAAAC,QAAA,EAAA,IAAA;EAAAC,WAAA,EAAA,IAAA;AAAA,CAAAN,CAAAA,EAAAA,yBAAA,CAAAZ,MAAA,CAAAa,SAAA,EAKPM,aAAAA,EAAAA,CAAAA,MAAM,GAAAC,MAAA,CAAAC,wBAAA,CAAArB,MAAA,CAAAa,SAAA,EAAA,aAAA,CAAA,EAAAb,MAAA,CAAAa,SAAA,IAAAb,MAAA,EAAA;AATmCsB,oBAAA,CAAAC,QAAA,EAAAxB,uBAAA,CAAA;;;;"} \ No newline at end of file +{"version":3,"file":"container-query.js","sources":["../../src/components/container-query.hbs.js","../../src/components/container-query.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{! @glint-ignore: ember-element-helper needs to provide Glint signature }}\\n{{#let (element this.tagName) as |Tag|}}\\n \\n {{yield\\n (hash\\n dimensions=this.dimensions\\n features=this.queryResults\\n )\\n }}\\n \\n{{/let}}\")","import './container-query.css';\n\nimport { action } from '@ember/object';\nimport Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\n\nimport type {\n Dimensions,\n Features,\n IndexSignatureParameter,\n QueryResults,\n} from '../modifiers/container-query';\n\ninterface ContainerQuerySignature {\n Args: {\n dataAttributePrefix?: string;\n debounce?: number;\n features?: Features;\n tagName?: string;\n };\n Blocks: {\n default: [\n {\n dimensions?: Dimensions;\n features?: QueryResults;\n },\n ];\n };\n Element: HTMLElement;\n}\n\nexport default class ContainerQueryComponent<\n T extends IndexSignatureParameter,\n> extends Component> {\n @tracked dimensions?: Dimensions;\n @tracked queryResults?: QueryResults;\n\n // The dynamic tag is restricted to be immutable\n tagName = this.args.tagName ?? 'div';\n\n @action updateState({\n dimensions,\n queryResults,\n }: {\n dimensions: Dimensions;\n queryResults: QueryResults;\n }): void {\n this.dimensions = dimensions;\n this.queryResults = queryResults;\n }\n}\n"],"names":["precompileTemplate","ContainerQueryComponent","_class","Component","constructor","args","_initializerDefineProperty","_descriptor","_descriptor2","_defineProperty","tagName","updateState","dimensions","queryResults","_applyDecoratedDescriptor","prototype","tracked","configurable","enumerable","writable","initializer","action","Object","getOwnPropertyDescriptor","setComponentTemplate","TEMPLATE"],"mappings":";;;;;;;;AACA,eAAeA,kBAAkB,CAAC,geAAge,CAAC;;;AC8B9eC,IAAAA,uBAAuB,IAAAC,MAAA,GAA7B,MAAMD,uBAAuB,SAElCE,SAAS,CAA6B;AAAAC,EAAAA,WAAAA,CAAA,GAAAC,IAAA,EAAA;AAAA,IAAA,KAAA,CAAA,GAAAA,IAAA,CAAA,CAAA;AAAAC,IAAAA,0BAAA,qBAAAC,WAAA,EAAA,IAAA,CAAA,CAAA;AAAAD,IAAAA,0BAAA,uBAAAE,YAAA,EAAA,IAAA,CAAA,CAAA;AAI9C;AAAAC,IAAAA,eAAA,kBACU,IAAI,CAACJ,IAAI,CAACK,OAAO,IAAI,KAAK,CAAA,CAAA;AAAA,GAAA;AAE5BC,EAAAA,WAAWA,CAAC;IAClBC,UAAU;AACVC,IAAAA,YAAAA;AAIF,GAAC,EAAQ;IACP,IAAI,CAACD,UAAU,GAAGA,UAAU,CAAA;IAC5B,IAAI,CAACC,YAAY,GAAGA,YAAY,CAAA;AAClC,GAAA;AACF,CAAC,GAAAN,WAAA,GAAAO,yBAAA,CAAAZ,MAAA,CAAAa,SAAA,EAAA,YAAA,EAAA,CAhBEC,OAAO,CAAA,EAAA;EAAAC,YAAA,EAAA,IAAA;EAAAC,UAAA,EAAA,IAAA;EAAAC,QAAA,EAAA,IAAA;EAAAC,WAAA,EAAA,IAAA;AAAA,CAAAZ,CAAAA,EAAAA,YAAA,GAAAM,yBAAA,CAAAZ,MAAA,CAAAa,SAAA,mBACPC,OAAO,CAAA,EAAA;EAAAC,YAAA,EAAA,IAAA;EAAAC,UAAA,EAAA,IAAA;EAAAC,QAAA,EAAA,IAAA;EAAAC,WAAA,EAAA,IAAA;AAAA,CAAAN,CAAAA,EAAAA,yBAAA,CAAAZ,MAAA,CAAAa,SAAA,EAKPM,aAAAA,EAAAA,CAAAA,MAAM,GAAAC,MAAA,CAAAC,wBAAA,CAAArB,MAAA,CAAAa,SAAA,EAAA,aAAA,CAAA,EAAAb,MAAA,CAAAa,SAAA,IAAAb,MAAA,EAAA;AATmCsB,oBAAA,CAAAC,QAAA,EAAAxB,uBAAA,CAAA;;;;"} \ No newline at end of file diff --git a/ember-container-query/dist/container-query.hbs-1b00a8f0.js b/ember-container-query/dist/container-query.hbs-1b00a8f0.js deleted file mode 100644 index 29b05cbf..00000000 --- a/ember-container-query/dist/container-query.hbs-1b00a8f0.js +++ /dev/null @@ -1,6 +0,0 @@ -import { precompileTemplate } from '@ember/template-compilation'; - -var TEMPLATE = precompileTemplate("{{! @glint-ignore: ember-element-helper needs to provide Glint signature }}\n{{#let (element this.tagName) as |Tag|}}\n \n {{yield\n (hash\n dimensions=this.dimensions\n features=this.queryResults\n )\n }}\n \n{{/let}}"); - -export { TEMPLATE as T }; -//# sourceMappingURL=container-query.hbs-1b00a8f0.js.map diff --git a/ember-container-query/dist/container-query.hbs-1b00a8f0.js.map b/ember-container-query/dist/container-query.hbs-1b00a8f0.js.map deleted file mode 100644 index e168a1d4..00000000 --- a/ember-container-query/dist/container-query.hbs-1b00a8f0.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"container-query.hbs-1b00a8f0.js","sources":["../src/components/container-query.hbs.js"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{! @glint-ignore: ember-element-helper needs to provide Glint signature }}\\n{{#let (element this.tagName) as |Tag|}}\\n \\n {{yield\\n (hash\\n dimensions=this.dimensions\\n features=this.queryResults\\n )\\n }}\\n \\n{{/let}}\")"],"names":["precompileTemplate"],"mappings":";;AACA,eAAeA,kBAAkB,CAAC,geAAge,CAAC;;;;"} \ No newline at end of file diff --git a/ember-container-query/dist/index.js b/ember-container-query/dist/index.js index d2d46ffd..7e866d53 100644 --- a/ember-container-query/dist/index.js +++ b/ember-container-query/dist/index.js @@ -1,4 +1,4 @@ -export { T as ContainerQuery } from './container-query.hbs-1b00a8f0.js'; +export { default as ContainerQuery } from './components/container-query.js'; export { default as aspectRatio } from './helpers/aspect-ratio.js'; export { default as height } from './helpers/height.js'; export { default as width } from './helpers/width.js'; From 9a1d91428415750edc73589221a49d1f979257e5 Mon Sep 17 00:00:00 2001 From: ijlee2 Date: Wed, 5 Jul 2023 11:05:30 +0200 Subject: [PATCH 06/12] chore: Reverted committing declarations and dist --- .gitignore | 2 +- ember-container-query/.gitignore | 4 +- .../components/container-query.d.ts | 31 ----- .../components/container-query.d.ts.map | 1 - .../declarations/helpers/aspect-ratio.d.ts | 13 --- .../helpers/aspect-ratio.d.ts.map | 1 - .../declarations/helpers/height.d.ts | 13 --- .../declarations/helpers/height.d.ts.map | 1 - .../declarations/helpers/width.d.ts | 13 --- .../declarations/helpers/width.d.ts.map | 1 - ember-container-query/declarations/index.d.ts | 7 -- .../declarations/index.d.ts.map | 1 - .../modifiers/container-query.d.ts | 52 --------- .../modifiers/container-query.d.ts.map | 1 - .../declarations/template-registry.d.ts | 13 --- .../declarations/template-registry.d.ts.map | 1 - .../dist/_app_/components/container-query.js | 1 - .../dist/_app_/helpers/aspect-ratio.js | 1 - .../dist/_app_/helpers/height.js | 1 - .../dist/_app_/helpers/width.js | 1 - .../dist/_app_/modifiers/container-query.js | 1 - .../_rollupPluginBabelHelpers-e795903d.js | 63 ----------- .../_rollupPluginBabelHelpers-e795903d.js.map | 1 - .../dist/components/container-query.css | 4 - .../dist/components/container-query.js | 41 ------- .../dist/components/container-query.js.map | 1 - .../dist/helpers/aspect-ratio.js | 15 --- .../dist/helpers/aspect-ratio.js.map | 1 - ember-container-query/dist/helpers/height.js | 15 --- .../dist/helpers/height.js.map | 1 - ember-container-query/dist/helpers/width.js | 15 --- .../dist/helpers/width.js.map | 1 - ember-container-query/dist/index.js | 6 - ember-container-query/dist/index.js.map | 1 - .../dist/modifiers/container-query.js | 106 ------------------ .../dist/modifiers/container-query.js.map | 1 - .../dist/template-registry.js | 2 - .../dist/template-registry.js.map | 1 - 38 files changed, 3 insertions(+), 432 deletions(-) delete mode 100644 ember-container-query/declarations/components/container-query.d.ts delete mode 100644 ember-container-query/declarations/components/container-query.d.ts.map delete mode 100644 ember-container-query/declarations/helpers/aspect-ratio.d.ts delete mode 100644 ember-container-query/declarations/helpers/aspect-ratio.d.ts.map delete mode 100644 ember-container-query/declarations/helpers/height.d.ts delete mode 100644 ember-container-query/declarations/helpers/height.d.ts.map delete mode 100644 ember-container-query/declarations/helpers/width.d.ts delete mode 100644 ember-container-query/declarations/helpers/width.d.ts.map delete mode 100644 ember-container-query/declarations/index.d.ts delete mode 100644 ember-container-query/declarations/index.d.ts.map delete mode 100644 ember-container-query/declarations/modifiers/container-query.d.ts delete mode 100644 ember-container-query/declarations/modifiers/container-query.d.ts.map delete mode 100644 ember-container-query/declarations/template-registry.d.ts delete mode 100644 ember-container-query/declarations/template-registry.d.ts.map delete mode 100644 ember-container-query/dist/_app_/components/container-query.js delete mode 100644 ember-container-query/dist/_app_/helpers/aspect-ratio.js delete mode 100644 ember-container-query/dist/_app_/helpers/height.js delete mode 100644 ember-container-query/dist/_app_/helpers/width.js delete mode 100644 ember-container-query/dist/_app_/modifiers/container-query.js delete mode 100644 ember-container-query/dist/_rollupPluginBabelHelpers-e795903d.js delete mode 100644 ember-container-query/dist/_rollupPluginBabelHelpers-e795903d.js.map delete mode 100644 ember-container-query/dist/components/container-query.css delete mode 100644 ember-container-query/dist/components/container-query.js delete mode 100644 ember-container-query/dist/components/container-query.js.map delete mode 100644 ember-container-query/dist/helpers/aspect-ratio.js delete mode 100644 ember-container-query/dist/helpers/aspect-ratio.js.map delete mode 100644 ember-container-query/dist/helpers/height.js delete mode 100644 ember-container-query/dist/helpers/height.js.map delete mode 100644 ember-container-query/dist/helpers/width.js delete mode 100644 ember-container-query/dist/helpers/width.js.map delete mode 100644 ember-container-query/dist/index.js delete mode 100644 ember-container-query/dist/index.js.map delete mode 100644 ember-container-query/dist/modifiers/container-query.js delete mode 100644 ember-container-query/dist/modifiers/container-query.js.map delete mode 100644 ember-container-query/dist/template-registry.js delete mode 100644 ember-container-query/dist/template-registry.js.map diff --git a/.gitignore b/.gitignore index f9203b0e..404ebadb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ # compiled output -# dist/ +dist/ tmp/ # dependencies diff --git a/ember-container-query/.gitignore b/ember-container-query/.gitignore index e53f11c3..7a7b10ca 100644 --- a/ember-container-query/.gitignore +++ b/ember-container-query/.gitignore @@ -1,6 +1,6 @@ # compiled output -# /declarations/ -# /dist/ +/declarations/ +/dist/ # dependencies /node_modules/ diff --git a/ember-container-query/declarations/components/container-query.d.ts b/ember-container-query/declarations/components/container-query.d.ts deleted file mode 100644 index 65644d56..00000000 --- a/ember-container-query/declarations/components/container-query.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -import './container-query.css'; -import Component from '@glimmer/component'; -import type { Dimensions, Features, IndexSignatureParameter, QueryResults } from '../modifiers/container-query'; -interface ContainerQuerySignature { - Args: { - dataAttributePrefix?: string; - debounce?: number; - features?: Features; - tagName?: string; - }; - Blocks: { - default: [ - { - dimensions?: Dimensions; - features?: QueryResults; - } - ]; - }; - Element: HTMLElement; -} -export default class ContainerQueryComponent extends Component> { - dimensions?: Dimensions; - queryResults?: QueryResults; - tagName: string; - updateState({ dimensions, queryResults, }: { - dimensions: Dimensions; - queryResults: QueryResults; - }): void; -} -export {}; -//# sourceMappingURL=container-query.d.ts.map \ No newline at end of file diff --git a/ember-container-query/declarations/components/container-query.d.ts.map b/ember-container-query/declarations/components/container-query.d.ts.map deleted file mode 100644 index 3d7c7f6c..00000000 --- a/ember-container-query/declarations/components/container-query.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"container-query.d.ts","sourceRoot":"","sources":["../../src/components/container-query.ts"],"names":[],"mappings":"AAAA,OAAO,uBAAuB,CAAC;AAG/B,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAG3C,OAAO,KAAK,EACV,UAAU,EACV,QAAQ,EACR,uBAAuB,EACvB,YAAY,EACb,MAAM,8BAA8B,CAAC;AAEtC,UAAU,uBAAuB,CAAC,CAAC,SAAS,uBAAuB;IACjE,IAAI,EAAE;QACJ,mBAAmB,CAAC,EAAE,MAAM,CAAC;QAC7B,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,QAAQ,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC;QACvB,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;IACF,MAAM,EAAE;QACN,OAAO,EAAE;YACP;gBACE,UAAU,CAAC,EAAE,UAAU,CAAC;gBACxB,QAAQ,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC;aAC5B;SACF,CAAC;KACH,CAAC;IACF,OAAO,EAAE,WAAW,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,OAAO,uBAAuB,CAC1C,CAAC,SAAS,uBAAuB,CACjC,SAAQ,SAAS,CAAC,uBAAuB,CAAC,CAAC,CAAC,CAAC;IACpC,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,YAAY,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC;IAGxC,OAAO,SAA8B;IAE7B,WAAW,CAAC,EAClB,UAAU,EACV,YAAY,GACb,EAAE;QACD,UAAU,EAAE,UAAU,CAAC;QACvB,YAAY,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC;KAC/B,GAAG,IAAI;CAgCT"} \ No newline at end of file diff --git a/ember-container-query/declarations/helpers/aspect-ratio.d.ts b/ember-container-query/declarations/helpers/aspect-ratio.d.ts deleted file mode 100644 index 0368fa77..00000000 --- a/ember-container-query/declarations/helpers/aspect-ratio.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import type { Metadata } from '../modifiers/container-query'; -declare const AspectRatioHelper: import("@ember/component/helper").FunctionBasedHelper<{ - Args: { - Positional: []; - Named: { - max?: number | undefined; - min?: number | undefined; - }; - }; - Return: Metadata; -}>; -export default AspectRatioHelper; -//# sourceMappingURL=aspect-ratio.d.ts.map \ No newline at end of file diff --git a/ember-container-query/declarations/helpers/aspect-ratio.d.ts.map b/ember-container-query/declarations/helpers/aspect-ratio.d.ts.map deleted file mode 100644 index 76abbc13..00000000 --- a/ember-container-query/declarations/helpers/aspect-ratio.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"aspect-ratio.d.ts","sourceRoot":"","sources":["../../src/helpers/aspect-ratio.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAa7D,QAAA,MAAM,iBAAiB;;;;;;;;;EAQtB,CAAC;AAEF,eAAe,iBAAiB,CAAC"} \ No newline at end of file diff --git a/ember-container-query/declarations/helpers/height.d.ts b/ember-container-query/declarations/helpers/height.d.ts deleted file mode 100644 index 613365b6..00000000 --- a/ember-container-query/declarations/helpers/height.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import type { Metadata } from '../modifiers/container-query'; -declare const HeightHelper: import("@ember/component/helper").FunctionBasedHelper<{ - Args: { - Positional: []; - Named: { - max?: number | undefined; - min?: number | undefined; - }; - }; - Return: Metadata; -}>; -export default HeightHelper; -//# sourceMappingURL=height.d.ts.map \ No newline at end of file diff --git a/ember-container-query/declarations/helpers/height.d.ts.map b/ember-container-query/declarations/helpers/height.d.ts.map deleted file mode 100644 index dfbcfb25..00000000 --- a/ember-container-query/declarations/helpers/height.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"height.d.ts","sourceRoot":"","sources":["../../src/helpers/height.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAa7D,QAAA,MAAM,YAAY;;;;;;;;;EAMhB,CAAC;AAEH,eAAe,YAAY,CAAC"} \ No newline at end of file diff --git a/ember-container-query/declarations/helpers/width.d.ts b/ember-container-query/declarations/helpers/width.d.ts deleted file mode 100644 index 40cdddf9..00000000 --- a/ember-container-query/declarations/helpers/width.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import type { Metadata } from '../modifiers/container-query'; -declare const WidthHelper: import("@ember/component/helper").FunctionBasedHelper<{ - Args: { - Positional: []; - Named: { - max?: number | undefined; - min?: number | undefined; - }; - }; - Return: Metadata; -}>; -export default WidthHelper; -//# sourceMappingURL=width.d.ts.map \ No newline at end of file diff --git a/ember-container-query/declarations/helpers/width.d.ts.map b/ember-container-query/declarations/helpers/width.d.ts.map deleted file mode 100644 index 6696660b..00000000 --- a/ember-container-query/declarations/helpers/width.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"width.d.ts","sourceRoot":"","sources":["../../src/helpers/width.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAa7D,QAAA,MAAM,WAAW;;;;;;;;;EAMf,CAAC;AAEH,eAAe,WAAW,CAAC"} \ No newline at end of file diff --git a/ember-container-query/declarations/index.d.ts b/ember-container-query/declarations/index.d.ts deleted file mode 100644 index c705ba98..00000000 --- a/ember-container-query/declarations/index.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export { default as ContainerQuery } from './components/container-query'; -export { default as aspectRatio } from './helpers/aspect-ratio'; -export { default as height } from './helpers/height'; -export { default as width } from './helpers/width'; -export type { Dimensions, Features, IndexSignatureParameter, Metadata, QueryResults, } from './modifiers/container-query'; -export { default as containerQuery } from './modifiers/container-query'; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/ember-container-query/declarations/index.d.ts.map b/ember-container-query/declarations/index.d.ts.map deleted file mode 100644 index d0306719..00000000 --- a/ember-container-query/declarations/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,8BAA8B,CAAC;AACzE,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACnD,YAAY,EACV,UAAU,EACV,QAAQ,EACR,uBAAuB,EACvB,QAAQ,EACR,YAAY,GACb,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,6BAA6B,CAAC"} \ No newline at end of file diff --git a/ember-container-query/declarations/modifiers/container-query.d.ts b/ember-container-query/declarations/modifiers/container-query.d.ts deleted file mode 100644 index 79b91430..00000000 --- a/ember-container-query/declarations/modifiers/container-query.d.ts +++ /dev/null @@ -1,52 +0,0 @@ -import type Owner from '@ember/owner'; -import Modifier, { ArgsFor, NamedArgs, PositionalArgs } from 'ember-modifier'; -type IndexSignatureParameter = string | number | symbol; -type Dimensions = { - aspectRatio: number; - height: number; - width: number; -}; -type Metadata = { - dimension: keyof Dimensions; - max: number; - min: number; -}; -type Features = Record; -type QueryResults = Record; -interface ContainerQueryModifierSignature { - Args: { - Named: { - dataAttributePrefix?: string; - debounce?: number; - features?: Features; - onQuery?: ({ dimensions, queryResults, }: { - dimensions: Dimensions; - queryResults: QueryResults; - }) => void; - }; - Positional: []; - }; - Element: Element; -} -export default class ContainerQueryModifier extends Modifier> { - private readonly resizeObserver; - dimensions: Dimensions; - queryResults: QueryResults; - private _dataAttributes; - private _element?; - private _named; - get dataAttributePrefix(): string; - get debounce(): number; - get features(): Features; - constructor(owner: Owner, args: ArgsFor>); - modify(element: Element, _positional: PositionalArgs>, named: NamedArgs>): void; - private onResize; - private registerResizeObserver; - private queryContainer; - private measureDimensions; - private evaluateQueries; - private resetDataAttributes; - private setDataAttributes; -} -export { Dimensions, Features, IndexSignatureParameter, Metadata, QueryResults, }; -//# sourceMappingURL=container-query.d.ts.map \ No newline at end of file diff --git a/ember-container-query/declarations/modifiers/container-query.d.ts.map b/ember-container-query/declarations/modifiers/container-query.d.ts.map deleted file mode 100644 index 2d19e572..00000000 --- a/ember-container-query/declarations/modifiers/container-query.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"container-query.d.ts","sourceRoot":"","sources":["../../src/modifiers/container-query.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAGtC,OAAO,QAAQ,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAE9E,KAAK,uBAAuB,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;AAIxD,KAAK,UAAU,GAAG;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,KAAK,QAAQ,GAAG;IACd,SAAS,EAAE,MAAM,UAAU,CAAC;IAC5B,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,KAAK,QAAQ,CAAC,CAAC,SAAS,uBAAuB,IAAI,MAAM,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC;AAEvE,KAAK,YAAY,CAAC,CAAC,SAAS,uBAAuB,IAAI,MAAM,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;AAE1E,UAAU,+BAA+B,CAAC,CAAC,SAAS,uBAAuB;IACzE,IAAI,EAAE;QACJ,KAAK,EAAE;YACL,mBAAmB,CAAC,EAAE,MAAM,CAAC;YAC7B,QAAQ,CAAC,EAAE,MAAM,CAAC;YAClB,QAAQ,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC;YACvB,OAAO,CAAC,EAAE,CAAC,EACT,UAAU,EACV,YAAY,GACb,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declarations/template-registry.d.ts b/ember-container-query/declarations/template-registry.d.ts deleted file mode 100644 index 798e3c43..00000000 --- a/ember-container-query/declarations/template-registry.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import type ContainerQueryComponent from './components/container-query'; -import type AspectRatioHelper from './helpers/aspect-ratio'; -import type HeightHelper from './helpers/height'; -import type WidthHelper from './helpers/width'; -import type ContainerQueryModifier from './modifiers/container-query'; -export default interface EmberContainerQueryRegistry { - ContainerQuery: typeof ContainerQueryComponent; - 'aspect-ratio': typeof AspectRatioHelper; - 'container-query': typeof ContainerQueryModifier; - height: typeof HeightHelper; - width: typeof WidthHelper; -} -//# sourceMappingURL=template-registry.d.ts.map \ No newline at end of file diff --git a/ember-container-query/declarations/template-registry.d.ts.map b/ember-container-query/declarations/template-registry.d.ts.map deleted file mode 100644 index 524d5425..00000000 --- a/ember-container-query/declarations/template-registry.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"template-registry.d.ts","sourceRoot":"","sources":["../src/template-registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,uBAAuB,MAAM,8BAA8B,CAAC;AACxE,OAAO,KAAK,iBAAiB,MAAM,wBAAwB,CAAC;AAC5D,OAAO,KAAK,YAAY,MAAM,kBAAkB,CAAC;AACjD,OAAO,KAAK,WAAW,MAAM,iBAAiB,CAAC;AAC/C,OAAO,KAAK,sBAAsB,MAAM,6BAA6B,CAAC;AAEtE,MAAM,CAAC,OAAO,WAAW,2BAA2B;IAClD,cAAc,EAAE,OAAO,uBAAuB,CAAC;IAC/C,cAAc,EAAE,OAAO,iBAAiB,CAAC;IACzC,iBAAiB,EAAE,OAAO,sBAAsB,CAAC;IACjD,MAAM,EAAE,OAAO,YAAY,CAAC;IAC5B,KAAK,EAAE,OAAO,WAAW,CAAC;CAC3B"} \ No newline at end of file diff --git a/ember-container-query/dist/_app_/components/container-query.js b/ember-container-query/dist/_app_/components/container-query.js deleted file mode 100644 index c22cf946..00000000 --- a/ember-container-query/dist/_app_/components/container-query.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from "ember-container-query/components/container-query"; diff --git a/ember-container-query/dist/_app_/helpers/aspect-ratio.js b/ember-container-query/dist/_app_/helpers/aspect-ratio.js deleted file mode 100644 index 21411240..00000000 --- a/ember-container-query/dist/_app_/helpers/aspect-ratio.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from "ember-container-query/helpers/aspect-ratio"; diff --git a/ember-container-query/dist/_app_/helpers/height.js b/ember-container-query/dist/_app_/helpers/height.js deleted file mode 100644 index 0dbfde3a..00000000 --- a/ember-container-query/dist/_app_/helpers/height.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from "ember-container-query/helpers/height"; diff --git a/ember-container-query/dist/_app_/helpers/width.js b/ember-container-query/dist/_app_/helpers/width.js deleted file mode 100644 index 5a4345cc..00000000 --- a/ember-container-query/dist/_app_/helpers/width.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from "ember-container-query/helpers/width"; diff --git a/ember-container-query/dist/_app_/modifiers/container-query.js b/ember-container-query/dist/_app_/modifiers/container-query.js deleted file mode 100644 index fa8326ac..00000000 --- a/ember-container-query/dist/_app_/modifiers/container-query.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from "ember-container-query/modifiers/container-query"; diff --git a/ember-container-query/dist/_rollupPluginBabelHelpers-e795903d.js b/ember-container-query/dist/_rollupPluginBabelHelpers-e795903d.js deleted file mode 100644 index 294da195..00000000 --- a/ember-container-query/dist/_rollupPluginBabelHelpers-e795903d.js +++ /dev/null @@ -1,63 +0,0 @@ -function _defineProperty(obj, key, value) { - key = _toPropertyKey(key); - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} -function _toPrimitive(input, hint) { - if (typeof input !== "object" || input === null) return input; - var prim = input[Symbol.toPrimitive]; - if (prim !== undefined) { - var res = prim.call(input, hint || "default"); - if (typeof res !== "object") return res; - throw new TypeError("@@toPrimitive must return a primitive value."); - } - return (hint === "string" ? String : Number)(input); -} -function _toPropertyKey(arg) { - var key = _toPrimitive(arg, "string"); - return typeof key === "symbol" ? key : String(key); -} -function _initializerDefineProperty(target, property, descriptor, context) { - if (!descriptor) return; - Object.defineProperty(target, property, { - enumerable: descriptor.enumerable, - configurable: descriptor.configurable, - writable: descriptor.writable, - value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 - }); -} -function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { - var desc = {}; - Object.keys(descriptor).forEach(function (key) { - desc[key] = descriptor[key]; - }); - desc.enumerable = !!desc.enumerable; - desc.configurable = !!desc.configurable; - if ('value' in desc || desc.initializer) { - desc.writable = true; - } - desc = decorators.slice().reverse().reduce(function (desc, decorator) { - return decorator(target, property, desc) || desc; - }, desc); - if (context && desc.initializer !== void 0) { - desc.value = desc.initializer ? desc.initializer.call(context) : void 0; - desc.initializer = undefined; - } - if (desc.initializer === void 0) { - Object.defineProperty(target, property, desc); - desc = null; - } - return desc; -} - -export { _applyDecoratedDescriptor as _, _initializerDefineProperty as a, _defineProperty as b }; -//# sourceMappingURL=_rollupPluginBabelHelpers-e795903d.js.map diff --git a/ember-container-query/dist/_rollupPluginBabelHelpers-e795903d.js.map b/ember-container-query/dist/_rollupPluginBabelHelpers-e795903d.js.map deleted file mode 100644 index c6dc0ea0..00000000 --- a/ember-container-query/dist/_rollupPluginBabelHelpers-e795903d.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"_rollupPluginBabelHelpers-e795903d.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/ember-container-query/dist/components/container-query.css b/ember-container-query/dist/components/container-query.css deleted file mode 100644 index 414bd961..00000000 --- a/ember-container-query/dist/components/container-query.css +++ /dev/null @@ -1,4 +0,0 @@ -.container-query { - height: 100%; - width: 100%; -} \ No newline at end of file diff --git a/ember-container-query/dist/components/container-query.js b/ember-container-query/dist/components/container-query.js deleted file mode 100644 index 6227dee8..00000000 --- a/ember-container-query/dist/components/container-query.js +++ /dev/null @@ -1,41 +0,0 @@ -import { _ as _applyDecoratedDescriptor, a as _initializerDefineProperty, b as _defineProperty } from '../_rollupPluginBabelHelpers-e795903d.js'; -import { setComponentTemplate } from '@ember/component'; -import { precompileTemplate } from '@ember/template-compilation'; -import './container-query.css'; -import { action } from '@ember/object'; -import Component from '@glimmer/component'; -import { tracked } from '@glimmer/tracking'; - -var TEMPLATE = precompileTemplate("{{! @glint-ignore: ember-element-helper needs to provide Glint signature }}\n{{#let (element this.tagName) as |Tag|}}\n \n {{yield\n (hash\n dimensions=this.dimensions\n features=this.queryResults\n )\n }}\n \n{{/let}}"); - -var _class, _descriptor, _descriptor2; -let ContainerQueryComponent = (_class = class ContainerQueryComponent extends Component { - constructor(...args) { - super(...args); - _initializerDefineProperty(this, "dimensions", _descriptor, this); - _initializerDefineProperty(this, "queryResults", _descriptor2, this); - // The dynamic tag is restricted to be immutable - _defineProperty(this, "tagName", this.args.tagName ?? 'div'); - } - updateState({ - dimensions, - queryResults - }) { - this.dimensions = dimensions; - this.queryResults = queryResults; - } -}, (_descriptor = _applyDecoratedDescriptor(_class.prototype, "dimensions", [tracked], { - configurable: true, - enumerable: true, - writable: true, - initializer: null -}), _descriptor2 = _applyDecoratedDescriptor(_class.prototype, "queryResults", [tracked], { - configurable: true, - enumerable: true, - writable: true, - initializer: null -}), _applyDecoratedDescriptor(_class.prototype, "updateState", [action], Object.getOwnPropertyDescriptor(_class.prototype, "updateState"), _class.prototype)), _class); -setComponentTemplate(TEMPLATE, ContainerQueryComponent); - -export { ContainerQueryComponent as default }; -//# sourceMappingURL=container-query.js.map diff --git a/ember-container-query/dist/components/container-query.js.map b/ember-container-query/dist/components/container-query.js.map deleted file mode 100644 index 9a2a7cfb..00000000 --- a/ember-container-query/dist/components/container-query.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"container-query.js","sources":["../../src/components/container-query.hbs.js","../../src/components/container-query.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{! @glint-ignore: ember-element-helper needs to provide Glint signature }}\\n{{#let (element this.tagName) as |Tag|}}\\n \\n {{yield\\n (hash\\n dimensions=this.dimensions\\n features=this.queryResults\\n )\\n }}\\n \\n{{/let}}\")","import './container-query.css';\n\nimport { action } from '@ember/object';\nimport Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\n\nimport type {\n Dimensions,\n Features,\n IndexSignatureParameter,\n QueryResults,\n} from '../modifiers/container-query';\n\ninterface ContainerQuerySignature {\n Args: {\n dataAttributePrefix?: string;\n debounce?: number;\n features?: Features;\n tagName?: string;\n };\n Blocks: {\n default: [\n {\n dimensions?: Dimensions;\n features?: QueryResults;\n },\n ];\n };\n Element: HTMLElement;\n}\n\nexport default class ContainerQueryComponent<\n T extends IndexSignatureParameter,\n> extends Component> {\n @tracked dimensions?: Dimensions;\n @tracked queryResults?: QueryResults;\n\n // The dynamic tag is restricted to be immutable\n tagName = this.args.tagName ?? 'div';\n\n @action updateState({\n dimensions,\n queryResults,\n }: {\n dimensions: Dimensions;\n queryResults: QueryResults;\n }): void {\n this.dimensions = dimensions;\n this.queryResults = queryResults;\n }\n}\n"],"names":["precompileTemplate","ContainerQueryComponent","_class","Component","constructor","args","_initializerDefineProperty","_descriptor","_descriptor2","_defineProperty","tagName","updateState","dimensions","queryResults","_applyDecoratedDescriptor","prototype","tracked","configurable","enumerable","writable","initializer","action","Object","getOwnPropertyDescriptor","setComponentTemplate","TEMPLATE"],"mappings":";;;;;;;;AACA,eAAeA,kBAAkB,CAAC,geAAge,CAAC;;;AC8B9eC,IAAAA,uBAAuB,IAAAC,MAAA,GAA7B,MAAMD,uBAAuB,SAElCE,SAAS,CAA6B;AAAAC,EAAAA,WAAAA,CAAA,GAAAC,IAAA,EAAA;AAAA,IAAA,KAAA,CAAA,GAAAA,IAAA,CAAA,CAAA;AAAAC,IAAAA,0BAAA,qBAAAC,WAAA,EAAA,IAAA,CAAA,CAAA;AAAAD,IAAAA,0BAAA,uBAAAE,YAAA,EAAA,IAAA,CAAA,CAAA;AAI9C;AAAAC,IAAAA,eAAA,kBACU,IAAI,CAACJ,IAAI,CAACK,OAAO,IAAI,KAAK,CAAA,CAAA;AAAA,GAAA;AAE5BC,EAAAA,WAAWA,CAAC;IAClBC,UAAU;AACVC,IAAAA,YAAAA;AAIF,GAAC,EAAQ;IACP,IAAI,CAACD,UAAU,GAAGA,UAAU,CAAA;IAC5B,IAAI,CAACC,YAAY,GAAGA,YAAY,CAAA;AAClC,GAAA;AACF,CAAC,GAAAN,WAAA,GAAAO,yBAAA,CAAAZ,MAAA,CAAAa,SAAA,EAAA,YAAA,EAAA,CAhBEC,OAAO,CAAA,EAAA;EAAAC,YAAA,EAAA,IAAA;EAAAC,UAAA,EAAA,IAAA;EAAAC,QAAA,EAAA,IAAA;EAAAC,WAAA,EAAA,IAAA;AAAA,CAAAZ,CAAAA,EAAAA,YAAA,GAAAM,yBAAA,CAAAZ,MAAA,CAAAa,SAAA,mBACPC,OAAO,CAAA,EAAA;EAAAC,YAAA,EAAA,IAAA;EAAAC,UAAA,EAAA,IAAA;EAAAC,QAAA,EAAA,IAAA;EAAAC,WAAA,EAAA,IAAA;AAAA,CAAAN,CAAAA,EAAAA,yBAAA,CAAAZ,MAAA,CAAAa,SAAA,EAKPM,aAAAA,EAAAA,CAAAA,MAAM,GAAAC,MAAA,CAAAC,wBAAA,CAAArB,MAAA,CAAAa,SAAA,EAAA,aAAA,CAAA,EAAAb,MAAA,CAAAa,SAAA,IAAAb,MAAA,EAAA;AATmCsB,oBAAA,CAAAC,QAAA,EAAAxB,uBAAA,CAAA;;;;"} \ No newline at end of file diff --git a/ember-container-query/dist/helpers/aspect-ratio.js b/ember-container-query/dist/helpers/aspect-ratio.js deleted file mode 100644 index 89bfd590..00000000 --- a/ember-container-query/dist/helpers/aspect-ratio.js +++ /dev/null @@ -1,15 +0,0 @@ -import { helper } from '@ember/component/helper'; - -const AspectRatioHelper = helper((_positional, named) => { - const dimension = 'aspectRatio'; - const max = named.max ?? Infinity; - const min = named.min ?? 0; - return { - dimension, - max, - min - }; -}); - -export { AspectRatioHelper as default }; -//# sourceMappingURL=aspect-ratio.js.map diff --git a/ember-container-query/dist/helpers/aspect-ratio.js.map b/ember-container-query/dist/helpers/aspect-ratio.js.map deleted file mode 100644 index 4511f318..00000000 --- a/ember-container-query/dist/helpers/aspect-ratio.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"aspect-ratio.js","sources":["../../src/helpers/aspect-ratio.ts"],"sourcesContent":["import { helper } from '@ember/component/helper';\n\nimport type { Metadata } from '../modifiers/container-query';\n\ninterface AspectRatioHelperSignature {\n Args: {\n Named: {\n max?: number;\n min?: number;\n };\n Positional: [];\n };\n Return: Metadata;\n}\n\nconst AspectRatioHelper = helper(\n (_positional, named) => {\n const dimension = 'aspectRatio';\n const max = named.max ?? Infinity;\n const min = named.min ?? 0;\n\n return { dimension, max, min };\n },\n);\n\nexport default AspectRatioHelper;\n"],"names":["AspectRatioHelper","helper","_positional","named","dimension","max","Infinity","min"],"mappings":";;AAeMA,MAAAA,iBAAiB,GAAGC,MAAM,CAC9B,CAACC,WAAW,EAAEC,KAAK,KAAK;EACtB,MAAMC,SAAS,GAAG,aAAa,CAAA;AAC/B,EAAA,MAAMC,GAAG,GAAGF,KAAK,CAACE,GAAG,IAAIC,QAAQ,CAAA;AACjC,EAAA,MAAMC,GAAG,GAAGJ,KAAK,CAACI,GAAG,IAAI,CAAC,CAAA;EAE1B,OAAO;IAAEH,SAAS;IAAEC,GAAG;AAAEE,IAAAA,GAAAA;GAAK,CAAA;AAChC,CACF;;;;"} \ No newline at end of file diff --git a/ember-container-query/dist/helpers/height.js b/ember-container-query/dist/helpers/height.js deleted file mode 100644 index fc02b40b..00000000 --- a/ember-container-query/dist/helpers/height.js +++ /dev/null @@ -1,15 +0,0 @@ -import { helper } from '@ember/component/helper'; - -const HeightHelper = helper((_positional, named) => { - const dimension = 'height'; - const max = named.max ?? Infinity; - const min = named.min ?? 0; - return { - dimension, - max, - min - }; -}); - -export { HeightHelper as default }; -//# sourceMappingURL=height.js.map diff --git a/ember-container-query/dist/helpers/height.js.map b/ember-container-query/dist/helpers/height.js.map deleted file mode 100644 index f7a9122f..00000000 --- a/ember-container-query/dist/helpers/height.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"height.js","sources":["../../src/helpers/height.ts"],"sourcesContent":["import { helper } from '@ember/component/helper';\n\nimport type { Metadata } from '../modifiers/container-query';\n\ninterface HeightHelperSignature {\n Args: {\n Named: {\n max?: number;\n min?: number;\n };\n Positional: [];\n };\n Return: Metadata;\n}\n\nconst HeightHelper = helper((_positional, named) => {\n const dimension = 'height';\n const max = named.max ?? Infinity;\n const min = named.min ?? 0;\n\n return { dimension, max, min };\n});\n\nexport default HeightHelper;\n"],"names":["HeightHelper","helper","_positional","named","dimension","max","Infinity","min"],"mappings":";;AAeMA,MAAAA,YAAY,GAAGC,MAAM,CAAwB,CAACC,WAAW,EAAEC,KAAK,KAAK;EACzE,MAAMC,SAAS,GAAG,QAAQ,CAAA;AAC1B,EAAA,MAAMC,GAAG,GAAGF,KAAK,CAACE,GAAG,IAAIC,QAAQ,CAAA;AACjC,EAAA,MAAMC,GAAG,GAAGJ,KAAK,CAACI,GAAG,IAAI,CAAC,CAAA;EAE1B,OAAO;IAAEH,SAAS;IAAEC,GAAG;AAAEE,IAAAA,GAAAA;GAAK,CAAA;AAChC,CAAC;;;;"} \ No newline at end of file diff --git a/ember-container-query/dist/helpers/width.js b/ember-container-query/dist/helpers/width.js deleted file mode 100644 index 9dda73ab..00000000 --- a/ember-container-query/dist/helpers/width.js +++ /dev/null @@ -1,15 +0,0 @@ -import { helper } from '@ember/component/helper'; - -const WidthHelper = helper((_positional, named) => { - const dimension = 'width'; - const max = named.max ?? Infinity; - const min = named.min ?? 0; - return { - dimension, - max, - min - }; -}); - -export { WidthHelper as default }; -//# sourceMappingURL=width.js.map diff --git a/ember-container-query/dist/helpers/width.js.map b/ember-container-query/dist/helpers/width.js.map deleted file mode 100644 index faa1ab05..00000000 --- a/ember-container-query/dist/helpers/width.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"width.js","sources":["../../src/helpers/width.ts"],"sourcesContent":["import { helper } from '@ember/component/helper';\n\nimport type { Metadata } from '../modifiers/container-query';\n\ninterface WidthHelperSignature {\n Args: {\n Named: {\n max?: number;\n min?: number;\n };\n Positional: [];\n };\n Return: Metadata;\n}\n\nconst WidthHelper = helper((_positional, named) => {\n const dimension = 'width';\n const max = named.max ?? Infinity;\n const min = named.min ?? 0;\n\n return { dimension, max, min };\n});\n\nexport default WidthHelper;\n"],"names":["WidthHelper","helper","_positional","named","dimension","max","Infinity","min"],"mappings":";;AAeMA,MAAAA,WAAW,GAAGC,MAAM,CAAuB,CAACC,WAAW,EAAEC,KAAK,KAAK;EACvE,MAAMC,SAAS,GAAG,OAAO,CAAA;AACzB,EAAA,MAAMC,GAAG,GAAGF,KAAK,CAACE,GAAG,IAAIC,QAAQ,CAAA;AACjC,EAAA,MAAMC,GAAG,GAAGJ,KAAK,CAACI,GAAG,IAAI,CAAC,CAAA;EAE1B,OAAO;IAAEH,SAAS;IAAEC,GAAG;AAAEE,IAAAA,GAAAA;GAAK,CAAA;AAChC,CAAC;;;;"} \ No newline at end of file diff --git a/ember-container-query/dist/index.js b/ember-container-query/dist/index.js deleted file mode 100644 index 7e866d53..00000000 --- a/ember-container-query/dist/index.js +++ /dev/null @@ -1,6 +0,0 @@ -export { default as ContainerQuery } from './components/container-query.js'; -export { default as aspectRatio } from './helpers/aspect-ratio.js'; -export { default as height } from './helpers/height.js'; -export { default as width } from './helpers/width.js'; -export { default as containerQuery } from './modifiers/container-query.js'; -//# sourceMappingURL=index.js.map diff --git a/ember-container-query/dist/index.js.map b/ember-container-query/dist/index.js.map deleted file mode 100644 index 7f6f6265..00000000 --- a/ember-container-query/dist/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"} \ No newline at end of file diff --git a/ember-container-query/dist/modifiers/container-query.js b/ember-container-query/dist/modifiers/container-query.js deleted file mode 100644 index f0065e69..00000000 --- a/ember-container-query/dist/modifiers/container-query.js +++ /dev/null @@ -1,106 +0,0 @@ -import { _ as _applyDecoratedDescriptor, a as _initializerDefineProperty, b as _defineProperty } from '../_rollupPluginBabelHelpers-e795903d.js'; -import { registerDestructor } from '@ember/destroyable'; -import { action } from '@ember/object'; -import { debounce } from '@ember/runloop'; -import { inject } from '@ember/service'; -import Modifier from 'ember-modifier'; - -var _class, _descriptor; -let ContainerQueryModifier = (_class = class ContainerQueryModifier extends Modifier { - get dataAttributePrefix() { - return this._named.dataAttributePrefix ?? 'container-query'; - } - get debounce() { - return this._named.debounce ?? 0; - } - get features() { - return this._named.features ?? {}; - } - constructor(owner, args) { - super(owner, args); - _initializerDefineProperty(this, "resizeObserver", _descriptor, this); - _defineProperty(this, "dimensions", void 0); - _defineProperty(this, "queryResults", void 0); - _defineProperty(this, "_dataAttributes", []); - _defineProperty(this, "_element", void 0); - _defineProperty(this, "_named", void 0); - registerDestructor(this, () => { - this.resizeObserver.unobserve(this._element, this.onResize); - }); - } - modify(element, _positional, named) { - this._named = named; - this.registerResizeObserver(element); - this.queryContainer(element); - } - onResize(resizeObserverEntry) { - const element = resizeObserverEntry.target; - if (this.debounce > 0) { - debounce(this, this.queryContainer, element, this.debounce); - return; - } - this.queryContainer(element); - } - registerResizeObserver(element) { - this.resizeObserver.unobserve(this._element, this.onResize); - this._element = element; - this.resizeObserver.observe(this._element, this.onResize); - } - queryContainer(element) { - this.measureDimensions(element); - this.evaluateQueries(); - this.resetDataAttributes(element); - this.setDataAttributes(element); - this._named.onQuery?.({ - dimensions: this.dimensions, - queryResults: this.queryResults - }); - } - measureDimensions(element) { - const height = element.clientHeight; - const width = element.clientWidth; - this.dimensions = { - aspectRatio: width / height, - height, - width - }; - } - evaluateQueries() { - const queryResults = {}; - for (const [featureName, metadata] of Object.entries(this.features)) { - const { - dimension, - min, - max - } = metadata; - const value = this.dimensions[dimension]; - queryResults[featureName] = min <= value && value < max; - } - this.queryResults = queryResults; - } - resetDataAttributes(element) { - this._dataAttributes.forEach(dataAttribute => { - element.removeAttribute(dataAttribute); - }); - this._dataAttributes = []; - } - setDataAttributes(element) { - const prefix = this.dataAttributePrefix; - for (const [featureName, meetsFeature] of Object.entries(this.queryResults)) { - if (!meetsFeature) { - continue; - } - const dataAttribute = prefix ? `data-${prefix}-${String(featureName)}` : `data-${String(featureName)}`; - element.setAttribute(dataAttribute, ''); - this._dataAttributes.push(dataAttribute); - } - } -}, (_descriptor = _applyDecoratedDescriptor(_class.prototype, "resizeObserver", [inject], { - configurable: true, - enumerable: true, - writable: true, - initializer: null -}), _applyDecoratedDescriptor(_class.prototype, "onResize", [action], Object.getOwnPropertyDescriptor(_class.prototype, "onResize"), _class.prototype)), _class); - -export { ContainerQueryModifier as default }; -//# sourceMappingURL=container-query.js.map diff --git a/ember-container-query/dist/modifiers/container-query.js.map b/ember-container-query/dist/modifiers/container-query.js.map deleted file mode 100644 index ed2bbfa6..00000000 --- a/ember-container-query/dist/modifiers/container-query.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"container-query.js","sources":["../../src/modifiers/container-query.ts"],"sourcesContent":["import { registerDestructor } from '@ember/destroyable';\nimport { action } from '@ember/object';\nimport type Owner from '@ember/owner';\nimport { debounce as _debounce } from '@ember/runloop';\nimport { inject as service } from '@ember/service';\nimport Modifier, { ArgsFor, NamedArgs, PositionalArgs } from 'ember-modifier';\n\ntype IndexSignatureParameter = string | number | symbol;\ntype ObjectEntry = [keyof T, T[keyof T]];\ntype ObjectEntries = ObjectEntry[];\n\ntype Dimensions = {\n aspectRatio: number;\n height: number;\n width: number;\n};\n\ntype Metadata = {\n dimension: keyof Dimensions;\n max: number;\n min: number;\n};\n\ntype Features = Record;\n\ntype QueryResults = Record;\n\ninterface ContainerQueryModifierSignature {\n Args: {\n Named: {\n dataAttributePrefix?: string;\n debounce?: number;\n features?: Features;\n onQuery?: ({\n dimensions,\n queryResults,\n }: {\n dimensions: Dimensions;\n queryResults: QueryResults;\n }) => void;\n };\n Positional: [];\n };\n Element: Element;\n}\n\nexport default class ContainerQueryModifier<\n T extends IndexSignatureParameter,\n> extends Modifier> {\n @service private declare readonly resizeObserver;\n\n dimensions!: Dimensions;\n queryResults!: QueryResults;\n\n private _dataAttributes: string[] = [];\n private _element?: Element;\n private _named!: NamedArgs>;\n\n get dataAttributePrefix(): string {\n return this._named.dataAttributePrefix ?? 'container-query';\n }\n\n get debounce(): number {\n return this._named.debounce ?? 0;\n }\n\n get features(): Features {\n return this._named.features ?? ({} as Features);\n }\n\n constructor(owner: Owner, args: ArgsFor>) {\n super(owner, args);\n\n registerDestructor(this, () => {\n this.resizeObserver.unobserve(this._element, this.onResize);\n });\n }\n\n modify(\n element: Element,\n _positional: PositionalArgs>,\n named: NamedArgs>,\n ): void {\n this._named = named;\n\n this.registerResizeObserver(element);\n this.queryContainer(element);\n }\n\n @action private onResize(resizeObserverEntry: ResizeObserverEntry): void {\n const element = resizeObserverEntry.target;\n\n if (this.debounce > 0) {\n _debounce(this, this.queryContainer, element, this.debounce);\n return;\n }\n\n this.queryContainer(element);\n }\n\n private registerResizeObserver(element: Element): void {\n this.resizeObserver.unobserve(this._element, this.onResize);\n\n this._element = element;\n this.resizeObserver.observe(this._element, this.onResize);\n }\n\n private queryContainer(element: Element): void {\n this.measureDimensions(element);\n this.evaluateQueries();\n this.resetDataAttributes(element);\n this.setDataAttributes(element);\n\n this._named.onQuery?.({\n dimensions: this.dimensions,\n queryResults: this.queryResults,\n });\n }\n\n private measureDimensions(element: Element): void {\n const height = element.clientHeight;\n const width = element.clientWidth;\n\n this.dimensions = {\n aspectRatio: width / height,\n height,\n width,\n };\n }\n\n private evaluateQueries(): void {\n const queryResults = {} as QueryResults;\n\n for (const [featureName, metadata] of Object.entries(\n this.features,\n ) as ObjectEntries>) {\n const { dimension, min, max } = metadata;\n const value = this.dimensions[dimension];\n\n queryResults[featureName] = min <= value && value < max;\n }\n\n this.queryResults = queryResults;\n }\n\n private resetDataAttributes(element: Element): void {\n this._dataAttributes.forEach((dataAttribute) => {\n element.removeAttribute(dataAttribute);\n });\n\n this._dataAttributes = [];\n }\n\n private setDataAttributes(element: Element): void {\n const prefix = this.dataAttributePrefix;\n\n for (const [featureName, meetsFeature] of Object.entries(\n this.queryResults,\n ) as ObjectEntries>) {\n if (!meetsFeature) {\n continue;\n }\n\n const dataAttribute = prefix\n ? `data-${prefix}-${String(featureName)}`\n : `data-${String(featureName)}`;\n\n element.setAttribute(dataAttribute, '');\n\n this._dataAttributes.push(dataAttribute);\n }\n }\n}\n\nexport {\n Dimensions,\n Features,\n IndexSignatureParameter,\n Metadata,\n QueryResults,\n};\n"],"names":["ContainerQueryModifier","_class","Modifier","dataAttributePrefix","_named","debounce","features","constructor","owner","args","_initializerDefineProperty","_descriptor","_defineProperty","registerDestructor","resizeObserver","unobserve","_element","onResize","modify","element","_positional","named","registerResizeObserver","queryContainer","resizeObserverEntry","target","_debounce","observe","measureDimensions","evaluateQueries","resetDataAttributes","setDataAttributes","onQuery","dimensions","queryResults","height","clientHeight","width","clientWidth","aspectRatio","featureName","metadata","Object","entries","dimension","min","max","value","_dataAttributes","forEach","dataAttribute","removeAttribute","prefix","meetsFeature","String","setAttribute","push","_applyDecoratedDescriptor","prototype","service","configurable","enumerable","writable","initializer","action","getOwnPropertyDescriptor"],"mappings":";;;;;;;;AA8CqBA,IAAAA,sBAAsB,IAAAC,MAAA,GAA5B,MAAMD,sBAAsB,SAEjCE,QAAQ,CAAqC;EAUrD,IAAIC,mBAAmBA,GAAW;AAChC,IAAA,OAAO,IAAI,CAACC,MAAM,CAACD,mBAAmB,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MAAM,CAACd,WAAW,CAAE,CAAC,CAAA,CAAA;AAEjCrB,MAAAA,OAAO,CAACoC,YAAY,CAACL,aAAa,EAAE,EAAE,CAAC,CAAA;AAEvC,MAAA,IAAI,CAACF,eAAe,CAACQ,IAAI,CAACN,aAAa,CAAC,CAAA;AAC1C,KAAA;AACF,GAAA;AACF,CAAC,GAAAvC,WAAA,GAAA8C,yBAAA,CAAAxD,MAAA,CAAAyD,SAAA,EAAA,gBAAA,EAAA,CA3HEC,MAAO,CAAA,EAAA;EAAAC,YAAA,EAAA,IAAA;EAAAC,UAAA,EAAA,IAAA;EAAAC,QAAA,EAAA,IAAA;EAAAC,WAAA,EAAA,IAAA;AAAA,CAAAN,CAAAA,EAAAA,yBAAA,CAAAxD,MAAA,CAAAyD,SAAA,EAwCPM,UAAAA,EAAAA,CAAAA,MAAM,GAAAtB,MAAA,CAAAuB,wBAAA,CAAAhE,MAAA,CAAAyD,SAAA,EAAA,UAAA,CAAA,EAAAzD,MAAA,CAAAyD,SAAA,IAAAzD,MAAA;;;;"} \ No newline at end of file diff --git a/ember-container-query/dist/template-registry.js b/ember-container-query/dist/template-registry.js deleted file mode 100644 index aa971dac..00000000 --- a/ember-container-query/dist/template-registry.js +++ /dev/null @@ -1,2 +0,0 @@ - -//# sourceMappingURL=template-registry.js.map diff --git a/ember-container-query/dist/template-registry.js.map b/ember-container-query/dist/template-registry.js.map deleted file mode 100644 index 54e644e4..00000000 --- a/ember-container-query/dist/template-registry.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"template-registry.js","sources":[],"sourcesContent":[],"names":[],"mappings":""} \ No newline at end of file From ccc9fe01e741ad0ecb04e53f7efead163bbd2288 Mon Sep 17 00:00:00 2001 From: ijlee2 Date: Wed, 5 Jul 2023 17:50:35 +0200 Subject: [PATCH 07/12] bug: Use glint -d --- ember-container-query/package.json | 4 ++-- ember-container-query/tsconfig.json | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/ember-container-query/package.json b/ember-container-query/package.json index b996c6b1..a72be723 100644 --- a/ember-container-query/package.json +++ b/ember-container-query/package.json @@ -50,7 +50,7 @@ "scripts": { "build": "concurrently \"npm:build:*\" --names \"build:\"", "build:js": "rollup --config", - "build:types": "glint --build", + "build:types": "glint --declaration", "lint": "concurrently \"npm:lint:*(!fix)\" --names \"lint:\"", "lint:fix": "concurrently \"npm:lint:*:fix\" --names \"fix:\"", "lint:hbs": "ember-template-lint .", @@ -61,7 +61,7 @@ "prepack": "rollup --config", "start": "concurrently \"npm:start:*\" --names \"start:\"", "start:js": "rollup --config --watch --no-watch.clearScreen", - "start:types": "glint --build --watch", + "start:types": "glint --declaration --watch", "test": "echo 'A v2 addon does not have tests, run tests in test-app'" }, "dependencies": { diff --git a/ember-container-query/tsconfig.json b/ember-container-query/tsconfig.json index 368fd372..9471c288 100644 --- a/ember-container-query/tsconfig.json +++ b/ember-container-query/tsconfig.json @@ -2,8 +2,6 @@ "extends": "@tsconfig/ember/tsconfig.json", "compilerOptions": { "declarationDir": "declarations", - "emitDeclarationOnly": true, - "noEmit": false, "skipLibCheck": true }, "include": [ From 0ad720063f2c8b7580c05c67a359a562e271c5b3 Mon Sep 17 00:00:00 2001 From: ijlee2 Date: Wed, 5 Jul 2023 17:51:31 +0200 Subject: [PATCH 08/12] Revert "bug: Use glint -d" This reverts commit ccc9fe01e741ad0ecb04e53f7efead163bbd2288. --- ember-container-query/package.json | 4 ++-- ember-container-query/tsconfig.json | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ember-container-query/package.json b/ember-container-query/package.json index a72be723..b996c6b1 100644 --- a/ember-container-query/package.json +++ b/ember-container-query/package.json @@ -50,7 +50,7 @@ "scripts": { "build": "concurrently \"npm:build:*\" --names \"build:\"", "build:js": "rollup --config", - "build:types": "glint --declaration", + "build:types": "glint --build", "lint": "concurrently \"npm:lint:*(!fix)\" --names \"lint:\"", "lint:fix": "concurrently \"npm:lint:*:fix\" --names \"fix:\"", "lint:hbs": "ember-template-lint .", @@ -61,7 +61,7 @@ "prepack": "rollup --config", "start": "concurrently \"npm:start:*\" --names \"start:\"", "start:js": "rollup --config --watch --no-watch.clearScreen", - "start:types": "glint --declaration --watch", + "start:types": "glint --build --watch", "test": "echo 'A v2 addon does not have tests, run tests in test-app'" }, "dependencies": { diff --git a/ember-container-query/tsconfig.json b/ember-container-query/tsconfig.json index 9471c288..368fd372 100644 --- a/ember-container-query/tsconfig.json +++ b/ember-container-query/tsconfig.json @@ -2,6 +2,8 @@ "extends": "@tsconfig/ember/tsconfig.json", "compilerOptions": { "declarationDir": "declarations", + "emitDeclarationOnly": true, + "noEmit": false, "skipLibCheck": true }, "include": [ From ae9e11e2a1e52c05971c88b677f1dac79220ebbe Mon Sep 17 00:00:00 2001 From: ijlee2 Date: Wed, 5 Jul 2023 17:56:57 +0200 Subject: [PATCH 09/12] bugfix: Generalized scripts and TS configurations (works for both tsc and glint) --- ember-container-query/package.json | 4 ++-- ember-container-query/tsconfig.development.json | 15 +++++++++++++++ ember-container-query/tsconfig.json | 1 + 3 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 ember-container-query/tsconfig.development.json diff --git a/ember-container-query/package.json b/ember-container-query/package.json index b996c6b1..0ad5e0d2 100644 --- a/ember-container-query/package.json +++ b/ember-container-query/package.json @@ -57,11 +57,11 @@ "lint:hbs:fix": "ember-template-lint . --fix", "lint:js": "eslint . --cache", "lint:js:fix": "eslint . --fix", - "lint:types": "glint", + "lint:types": "glint --project tsconfig.development.json", "prepack": "rollup --config", "start": "concurrently \"npm:start:*\" --names \"start:\"", "start:js": "rollup --config --watch --no-watch.clearScreen", - "start:types": "glint --build --watch", + "start:types": "glint --declaration --watch", "test": "echo 'A v2 addon does not have tests, run tests in test-app'" }, "dependencies": { diff --git a/ember-container-query/tsconfig.development.json b/ember-container-query/tsconfig.development.json new file mode 100644 index 00000000..2e18d584 --- /dev/null +++ b/ember-container-query/tsconfig.development.json @@ -0,0 +1,15 @@ +{ + "extends": "@tsconfig/ember/tsconfig.json", + "compilerOptions": { + "declaration": true, + "declarationDir": "declarations", + "skipLibCheck": true + }, + "include": [ + "src/**/*", + "unpublished-development-types/**/*" + ], + "glint": { + "environment": "ember-loose" + } +} diff --git a/ember-container-query/tsconfig.json b/ember-container-query/tsconfig.json index 368fd372..717367db 100644 --- a/ember-container-query/tsconfig.json +++ b/ember-container-query/tsconfig.json @@ -1,6 +1,7 @@ { "extends": "@tsconfig/ember/tsconfig.json", "compilerOptions": { + "declaration": true, "declarationDir": "declarations", "emitDeclarationOnly": true, "noEmit": false, From 7c40eba7d175f14722d8b750ceb416bec9a778cd Mon Sep 17 00:00:00 2001 From: ijlee2 Date: Wed, 5 Jul 2023 19:25:48 +0200 Subject: [PATCH 10/12] Revert "bugfix: Generalized scripts and TS configurations (works for both tsc and glint)" This reverts commit ae9e11e2a1e52c05971c88b677f1dac79220ebbe. --- ember-container-query/package.json | 4 ++-- ember-container-query/tsconfig.development.json | 15 --------------- ember-container-query/tsconfig.json | 1 - 3 files changed, 2 insertions(+), 18 deletions(-) delete mode 100644 ember-container-query/tsconfig.development.json diff --git a/ember-container-query/package.json b/ember-container-query/package.json index 0ad5e0d2..b996c6b1 100644 --- a/ember-container-query/package.json +++ b/ember-container-query/package.json @@ -57,11 +57,11 @@ "lint:hbs:fix": "ember-template-lint . --fix", "lint:js": "eslint . --cache", "lint:js:fix": "eslint . --fix", - "lint:types": "glint --project tsconfig.development.json", + "lint:types": "glint", "prepack": "rollup --config", "start": "concurrently \"npm:start:*\" --names \"start:\"", "start:js": "rollup --config --watch --no-watch.clearScreen", - "start:types": "glint --declaration --watch", + "start:types": "glint --build --watch", "test": "echo 'A v2 addon does not have tests, run tests in test-app'" }, "dependencies": { diff --git a/ember-container-query/tsconfig.development.json b/ember-container-query/tsconfig.development.json deleted file mode 100644 index 2e18d584..00000000 --- a/ember-container-query/tsconfig.development.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "@tsconfig/ember/tsconfig.json", - "compilerOptions": { - "declaration": true, - "declarationDir": "declarations", - "skipLibCheck": true - }, - "include": [ - "src/**/*", - "unpublished-development-types/**/*" - ], - "glint": { - "environment": "ember-loose" - } -} diff --git a/ember-container-query/tsconfig.json b/ember-container-query/tsconfig.json index 717367db..368fd372 100644 --- a/ember-container-query/tsconfig.json +++ b/ember-container-query/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "@tsconfig/ember/tsconfig.json", "compilerOptions": { - "declaration": true, "declarationDir": "declarations", "emitDeclarationOnly": true, "noEmit": false, From ce05d01f796f51a6dc318160c336c8696e463e3d Mon Sep 17 00:00:00 2001 From: ijlee2 Date: Wed, 5 Jul 2023 19:25:56 +0200 Subject: [PATCH 11/12] Revert "Revert "bug: Use glint -d"" This reverts commit 0ad720063f2c8b7580c05c67a359a562e271c5b3. --- ember-container-query/package.json | 4 ++-- ember-container-query/tsconfig.json | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/ember-container-query/package.json b/ember-container-query/package.json index b996c6b1..a72be723 100644 --- a/ember-container-query/package.json +++ b/ember-container-query/package.json @@ -50,7 +50,7 @@ "scripts": { "build": "concurrently \"npm:build:*\" --names \"build:\"", "build:js": "rollup --config", - "build:types": "glint --build", + "build:types": "glint --declaration", "lint": "concurrently \"npm:lint:*(!fix)\" --names \"lint:\"", "lint:fix": "concurrently \"npm:lint:*:fix\" --names \"fix:\"", "lint:hbs": "ember-template-lint .", @@ -61,7 +61,7 @@ "prepack": "rollup --config", "start": "concurrently \"npm:start:*\" --names \"start:\"", "start:js": "rollup --config --watch --no-watch.clearScreen", - "start:types": "glint --build --watch", + "start:types": "glint --declaration --watch", "test": "echo 'A v2 addon does not have tests, run tests in test-app'" }, "dependencies": { diff --git a/ember-container-query/tsconfig.json b/ember-container-query/tsconfig.json index 368fd372..9471c288 100644 --- a/ember-container-query/tsconfig.json +++ b/ember-container-query/tsconfig.json @@ -2,8 +2,6 @@ "extends": "@tsconfig/ember/tsconfig.json", "compilerOptions": { "declarationDir": "declarations", - "emitDeclarationOnly": true, - "noEmit": false, "skipLibCheck": true }, "include": [ From 760c56405e4b5231fcb6fed3562edb304dfa0217 Mon Sep 17 00:00:00 2001 From: ijlee2 Date: Wed, 5 Jul 2023 19:32:58 +0200 Subject: [PATCH 12/12] bugfix: Removed @glint-ignore comment, which had caused TypeScript to error when noEmitOnError is set to true --- .../src/components/container-query.hbs | 1 - .../unpublished-development-types/index.d.ts | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/ember-container-query/src/components/container-query.hbs b/ember-container-query/src/components/container-query.hbs index 9ab5c33e..9858252f 100644 --- a/ember-container-query/src/components/container-query.hbs +++ b/ember-container-query/src/components/container-query.hbs @@ -1,4 +1,3 @@ -{{! @glint-ignore: ember-element-helper needs to provide Glint signature }} {{#let (element this.tagName) as |Tag|}} { + Args: { + Positional: [name: T]; + }; + Return: ComponentLike<{ + Blocks: { default: [] }; + Element: T extends keyof HTMLElementTagNameMap + ? HTMLElementTagNameMap[T] + : Element; + }>; +} + declare module '@glint/environment-ember-loose/registry' { export default interface Registry extends EmberContainerQueryRegistry { // Add any registry entries from other addons here that your addon itself uses (in non-strict mode templates) // See https://typed-ember.gitbook.io/glint/using-glint/ember/using-addons + element: HelperLike; } }