ember-container-query 4.0.0-alpha.1 → 4.0.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/applyDecoratedDescriptor-fa858ac4.js.map +1 -1
- package/dist/components/container-query.d.ts +1 -1
- package/dist/components/container-query.d.ts.map +1 -1
- package/dist/components/container-query.js +1 -0
- package/dist/components/container-query.js.map +1 -1
- package/dist/helpers/aspect-ratio.d.ts +1 -1
- package/dist/helpers/height.d.ts +1 -1
- package/dist/helpers/width.d.ts +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/modifiers/container-query.d.ts +3 -1
- package/dist/modifiers/container-query.js.map +1 -1
- package/dist/template-registry.d.ts +5 -5
- package/package.json +35 -25
- /package/{addon-main.js → addon-main.cjs} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"applyDecoratedDescriptor-fa858ac4.js","sources":["../../node_modules/@babel/runtime/helpers/esm/initializerDefineProperty.js","../../node_modules/@babel/runtime/helpers/esm/typeof.js","../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js","../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","../../node_modules/@babel/runtime/helpers/esm/defineProperty.js","../../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,
|
|
1
|
+
{"version":3,"file":"applyDecoratedDescriptor-fa858ac4.js","sources":["../../node_modules/@babel/runtime/helpers/esm/initializerDefineProperty.js","../../node_modules/@babel/runtime/helpers/esm/typeof.js","../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js","../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","../../node_modules/@babel/runtime/helpers/esm/defineProperty.js","../../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,UAA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AAO,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]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Component from '@glimmer/component';
|
|
2
|
-
import { Dimensions, Features, IndexSignatureParameter, QueryResults } from "../modifiers/container-query";
|
|
2
|
+
import { Dimensions, Features, IndexSignatureParameter, QueryResults } from "../modifiers/container-query.js";
|
|
3
3
|
interface ContainerQueryComponentSignature<T extends IndexSignatureParameter> {
|
|
4
4
|
Args: {
|
|
5
5
|
dataAttributePrefix?: string;
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
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,gCAAgC,CAAC,CAAC,SAAS,uBAAuB;IAC1E,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,gCAAgC,CAAC,CAAC,CAAC,CAAC;IAC7C,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"}
|
|
@@ -14,6 +14,7 @@ let ContainerQueryComponent = (_class = class ContainerQueryComponent extends Co
|
|
|
14
14
|
super(...args);
|
|
15
15
|
_initializerDefineProperty(this, "dimensions", _descriptor, this);
|
|
16
16
|
_initializerDefineProperty(this, "queryResults", _descriptor2, this);
|
|
17
|
+
// The dynamic tag is restricted to be immutable
|
|
17
18
|
_defineProperty(this, "tagName", this.args.tagName ?? 'div');
|
|
18
19
|
}
|
|
19
20
|
updateState({
|
|
@@ -1 +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 <Tag\\n class=\\\"container-query\\\"\\n data-test-container-query\\n {{container-query\\n dataAttributePrefix=@dataAttributePrefix\\n debounce=@debounce\\n features=@features\\n onQuery=this.updateState\\n }}\\n ...attributes\\n >\\n {{yield\\n (hash\\n dimensions=this.dimensions\\n features=this.queryResults\\n )\\n }}\\n </Tag>\\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 ContainerQueryComponentSignature<T extends IndexSignatureParameter> {\n Args: {\n dataAttributePrefix?: string;\n debounce?: number;\n features?: Features<T>;\n tagName?: string;\n };\n Blocks: {\n default: [\n {\n dimensions?: Dimensions;\n features?: QueryResults<T>;\n }\n ];\n };\n Element: HTMLElement;\n}\n\nexport default class ContainerQueryComponent<\n T extends IndexSignatureParameter\n> extends Component<ContainerQueryComponentSignature<T>> {\n @tracked dimensions?: Dimensions;\n @tracked queryResults?: QueryResults<T>;\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<T>;\n }): void {\n this.dimensions = dimensions;\n this.queryResults = queryResults;\n }\n}\n"],"names":["precompileTemplate","ContainerQueryComponent","Component","args","tagName","updateState","dimensions","queryResults","tracked","action"],"mappings":";;;;;;;;AACA,eAAeA,kBAAkB,CAAC,+fAA+f,CAAC;;;
|
|
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 <Tag\\n class=\\\"container-query\\\"\\n data-test-container-query\\n {{container-query\\n dataAttributePrefix=@dataAttributePrefix\\n debounce=@debounce\\n features=@features\\n onQuery=this.updateState\\n }}\\n ...attributes\\n >\\n {{yield\\n (hash\\n dimensions=this.dimensions\\n features=this.queryResults\\n )\\n }}\\n </Tag>\\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 ContainerQueryComponentSignature<T extends IndexSignatureParameter> {\n Args: {\n dataAttributePrefix?: string;\n debounce?: number;\n features?: Features<T>;\n tagName?: string;\n };\n Blocks: {\n default: [\n {\n dimensions?: Dimensions;\n features?: QueryResults<T>;\n }\n ];\n };\n Element: HTMLElement;\n}\n\nexport default class ContainerQueryComponent<\n T extends IndexSignatureParameter\n> extends Component<ContainerQueryComponentSignature<T>> {\n @tracked dimensions?: Dimensions;\n @tracked queryResults?: QueryResults<T>;\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<T>;\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,+fAA+f,CAAC;;;AC8B7gBC,IAAAA,uBAAuB,IAAAC,MAAA,GAA7B,MAAMD,uBAAuB,SAElCE,SAAS,CAAsC;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;AAIvD;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;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="ember__component" />
|
|
2
|
-
import { Metadata } from "../modifiers/container-query";
|
|
2
|
+
import { Metadata } from "../modifiers/container-query.js";
|
|
3
3
|
declare const AspectRatioHelper: import("@ember/component/helper").FunctionBasedHelper<{
|
|
4
4
|
Args: {
|
|
5
5
|
Positional: [];
|
package/dist/helpers/height.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="ember__component" />
|
|
2
|
-
import { Metadata } from "../modifiers/container-query";
|
|
2
|
+
import { Metadata } from "../modifiers/container-query.js";
|
|
3
3
|
declare const HeightHelper: import("@ember/component/helper").FunctionBasedHelper<{
|
|
4
4
|
Args: {
|
|
5
5
|
Positional: [];
|
package/dist/helpers/width.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="ember__component" />
|
|
2
|
-
import { Metadata } from "../modifiers/container-query";
|
|
2
|
+
import { Metadata } from "../modifiers/container-query.js";
|
|
3
3
|
declare const WidthHelper: import("@ember/component/helper").FunctionBasedHelper<{
|
|
4
4
|
Args: {
|
|
5
5
|
Positional: [];
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { default as ContainerQuery } from "./components/container-query";
|
|
2
|
-
export { default as aspectRatio } from "./helpers/aspect-ratio";
|
|
3
|
-
export { default as height } from "./helpers/height";
|
|
4
|
-
export { default as width } from "./helpers/width";
|
|
5
|
-
export { default as containerQuery } from "./modifiers/container-query";
|
|
1
|
+
export { default as ContainerQuery } from "./components/container-query.js";
|
|
2
|
+
export { default as aspectRatio } from "./helpers/aspect-ratio.js";
|
|
3
|
+
export { default as height } from "./helpers/height.js";
|
|
4
|
+
export { default as width } from "./helpers/width.js";
|
|
5
|
+
export { default as containerQuery } from "./modifiers/container-query.js";
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/// <reference types="ember__owner" />
|
|
2
|
+
import Owner from '@ember/owner';
|
|
1
3
|
import Modifier from 'ember-modifier';
|
|
2
4
|
import { ArgsFor, NamedArgs, PositionalArgs } from "ember-modifier";
|
|
3
5
|
type IndexSignatureParameter = string | number | symbol;
|
|
@@ -38,7 +40,7 @@ declare class ContainerQueryModifier<T extends IndexSignatureParameter> extends
|
|
|
38
40
|
get dataAttributePrefix(): string;
|
|
39
41
|
get debounce(): number;
|
|
40
42
|
get features(): Features<T>;
|
|
41
|
-
constructor(owner:
|
|
43
|
+
constructor(owner: Owner, args: ArgsFor<ContainerQueryModifierSignature<T>>);
|
|
42
44
|
modify(element: Element, _positional: PositionalArgs<ContainerQueryModifierSignature<T>>, named: NamedArgs<ContainerQueryModifierSignature<T>>): void;
|
|
43
45
|
private onResize;
|
|
44
46
|
private registerResizeObserver;
|
|
@@ -1 +1 @@
|
|
|
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 { 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<T> = [keyof T, T[keyof T]];\ntype ObjectEntries<T> = Array<ObjectEntry<T>>;\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<T extends IndexSignatureParameter> = Record<T, Metadata>;\n\ntype QueryResults<T extends IndexSignatureParameter> = Record<T, boolean>;\n\ninterface ContainerQueryModifierSignature<T extends IndexSignatureParameter> {\n Args: {\n Named: {\n dataAttributePrefix?: string;\n debounce?: number;\n features?: Features<T>;\n onQuery?: ({\n dimensions,\n queryResults,\n }: {\n dimensions: Dimensions;\n queryResults: QueryResults<T>;\n }) => void;\n };\n Positional: [];\n };\n Element: Element;\n}\n\nexport default class ContainerQueryModifier<\n T extends IndexSignatureParameter\n> extends Modifier<ContainerQueryModifierSignature<T>> {\n @service private declare readonly resizeObserver;\n\n dimensions!: Dimensions;\n queryResults!: QueryResults<T>;\n\n private _dataAttributes: Array<string> = [];\n private _element?: Element;\n private _named!: NamedArgs<ContainerQueryModifierSignature<T>>;\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<T> {\n return this._named.features ?? ({} as Features<T>);\n }\n\n constructor(
|
|
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<T> = [keyof T, T[keyof T]];\ntype ObjectEntries<T> = Array<ObjectEntry<T>>;\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<T extends IndexSignatureParameter> = Record<T, Metadata>;\n\ntype QueryResults<T extends IndexSignatureParameter> = Record<T, boolean>;\n\ninterface ContainerQueryModifierSignature<T extends IndexSignatureParameter> {\n Args: {\n Named: {\n dataAttributePrefix?: string;\n debounce?: number;\n features?: Features<T>;\n onQuery?: ({\n dimensions,\n queryResults,\n }: {\n dimensions: Dimensions;\n queryResults: QueryResults<T>;\n }) => void;\n };\n Positional: [];\n };\n Element: Element;\n}\n\nexport default class ContainerQueryModifier<\n T extends IndexSignatureParameter\n> extends Modifier<ContainerQueryModifierSignature<T>> {\n @service private declare readonly resizeObserver;\n\n dimensions!: Dimensions;\n queryResults!: QueryResults<T>;\n\n private _dataAttributes: Array<string> = [];\n private _element?: Element;\n private _named!: NamedArgs<ContainerQueryModifierSignature<T>>;\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<T> {\n return this._named.features ?? ({} as Features<T>);\n }\n\n constructor(owner: Owner, args: ArgsFor<ContainerQueryModifierSignature<T>>) {\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<ContainerQueryModifierSignature<T>>,\n named: NamedArgs<ContainerQueryModifierSignature<T>>\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<T>;\n\n for (const [featureName, metadata] of Object.entries(\n this.features\n ) as ObjectEntries<Features<T>>) {\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<QueryResults<T>>) {\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,EAAA,KAAA,CAAA,CAAA,CAAA;IAAAA,eAAA,CAAA,IAAA,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A,CAAAA,MAAM,GAAAtB,MAAA,CAAAuB,wBAAA,CAAAhE,MAAA,CAAAyD,SAAA,EAAA,UAAA,CAAA,EAAAzD,MAAA,CAAAyD,SAAA,IAAAzD,MAAA;;;;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import ContainerQueryComponent from "./components/container-query";
|
|
2
|
-
import AspectRatioHelper from "./helpers/aspect-ratio";
|
|
3
|
-
import HeightHelper from "./helpers/height";
|
|
4
|
-
import WidthHelper from "./helpers/width";
|
|
5
|
-
import ContainerQueryModifier from "./modifiers/container-query";
|
|
1
|
+
import ContainerQueryComponent from "./components/container-query.js";
|
|
2
|
+
import AspectRatioHelper from "./helpers/aspect-ratio.js";
|
|
3
|
+
import HeightHelper from "./helpers/height.js";
|
|
4
|
+
import WidthHelper from "./helpers/width.js";
|
|
5
|
+
import ContainerQueryModifier from "./modifiers/container-query.js";
|
|
6
6
|
interface EmberContainerQueryRegistry {
|
|
7
7
|
ContainerQuery: typeof ContainerQueryComponent;
|
|
8
8
|
'aspect-ratio': typeof AspectRatioHelper;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ember-container-query",
|
|
3
|
-
"version": "4.0.0-alpha.
|
|
3
|
+
"version": "4.0.0-alpha.3",
|
|
4
4
|
"description": "Container queries using Ember modifiers",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"container-queries",
|
|
@@ -21,15 +21,25 @@
|
|
|
21
21
|
"author": "Isaac J. Lee",
|
|
22
22
|
"exports": {
|
|
23
23
|
".": "./dist/index.js",
|
|
24
|
-
"./*":
|
|
25
|
-
|
|
24
|
+
"./*": {
|
|
25
|
+
"types": "./dist/*.d.ts",
|
|
26
|
+
"default": "./dist/*.js"
|
|
27
|
+
},
|
|
28
|
+
"./addon-main.js": "./addon-main.cjs"
|
|
29
|
+
},
|
|
30
|
+
"typesVersions": {
|
|
31
|
+
"*": {
|
|
32
|
+
"*": [
|
|
33
|
+
"dist/*"
|
|
34
|
+
]
|
|
35
|
+
}
|
|
26
36
|
},
|
|
27
37
|
"directories": {
|
|
28
38
|
"doc": "doc",
|
|
29
39
|
"test": "tests"
|
|
30
40
|
},
|
|
31
41
|
"files": [
|
|
32
|
-
"addon-main.
|
|
42
|
+
"addon-main.cjs",
|
|
33
43
|
"dist"
|
|
34
44
|
],
|
|
35
45
|
"scripts": {
|
|
@@ -38,8 +48,8 @@
|
|
|
38
48
|
"lint:fix": "concurrently \"npm:lint:*:fix\" --names \"fix:\"",
|
|
39
49
|
"lint:hbs": "ember-template-lint .",
|
|
40
50
|
"lint:hbs:fix": "ember-template-lint . --fix",
|
|
41
|
-
"lint:js": "eslint . --cache
|
|
42
|
-
"lint:js:fix": "eslint . --
|
|
51
|
+
"lint:js": "eslint . --cache",
|
|
52
|
+
"lint:js:fix": "eslint . --fix",
|
|
43
53
|
"lint:types": "glint",
|
|
44
54
|
"prepack": "rollup --config",
|
|
45
55
|
"start": "rollup --config --watch",
|
|
@@ -48,37 +58,37 @@
|
|
|
48
58
|
"dependencies": {
|
|
49
59
|
"@embroider/addon-shim": "^1.8.4",
|
|
50
60
|
"ember-element-helper": "^0.6.1",
|
|
51
|
-
"ember-modifier": "^3.2.7",
|
|
61
|
+
"ember-modifier": "^3.2.7 || ^4.0.0",
|
|
52
62
|
"ember-resize-observer-service": "^1.1.0",
|
|
53
63
|
"ember-test-selectors": "^6.0.0"
|
|
54
64
|
},
|
|
55
65
|
"devDependencies": {
|
|
56
|
-
"@babel/core": "^7.
|
|
66
|
+
"@babel/core": "^7.21.0",
|
|
57
67
|
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
|
58
|
-
"@babel/plugin-proposal-decorators": "^7.
|
|
59
|
-
"@babel/preset-typescript": "^7.
|
|
68
|
+
"@babel/plugin-proposal-decorators": "^7.21.0",
|
|
69
|
+
"@babel/preset-typescript": "^7.21.0",
|
|
60
70
|
"@embroider/addon-dev": "^3.0.0",
|
|
61
|
-
"@gavant/glint-template-types": "^0.3.
|
|
62
|
-
"@glint/core": "^v1.0.0-beta.
|
|
63
|
-
"@glint/environment-ember-loose": "^v1.0.0-beta.
|
|
64
|
-
"@glint/template": "^v1.0.0-beta.
|
|
71
|
+
"@gavant/glint-template-types": "^0.3.2",
|
|
72
|
+
"@glint/core": "^v1.0.0-beta.3",
|
|
73
|
+
"@glint/environment-ember-loose": "^v1.0.0-beta.3",
|
|
74
|
+
"@glint/template": "^v1.0.0-beta.3",
|
|
65
75
|
"@tsconfig/ember": "^2.0.0",
|
|
66
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
67
|
-
"@typescript-eslint/parser": "^5.
|
|
68
|
-
"ember-template-lint": "^5.
|
|
76
|
+
"@typescript-eslint/eslint-plugin": "^5.54.0",
|
|
77
|
+
"@typescript-eslint/parser": "^5.54.0",
|
|
78
|
+
"ember-template-lint": "^5.6.0",
|
|
69
79
|
"ember-template-lint-plugin-prettier": "^4.1.0",
|
|
70
|
-
"eslint": "^8.
|
|
80
|
+
"eslint": "^8.35.0",
|
|
71
81
|
"eslint-config-prettier": "^8.6.0",
|
|
72
|
-
"eslint-plugin-ember": "^11.4.
|
|
82
|
+
"eslint-plugin-ember": "^11.4.7",
|
|
73
83
|
"eslint-plugin-n": "^15.6.1",
|
|
74
84
|
"eslint-plugin-prettier": "^4.2.1",
|
|
75
|
-
"eslint-plugin-simple-import-sort": "^
|
|
85
|
+
"eslint-plugin-simple-import-sort": "^10.0.0",
|
|
76
86
|
"eslint-plugin-typescript-sort-keys": "^2.1.0",
|
|
77
|
-
"prettier": "^2.8.
|
|
78
|
-
"rollup": "^3.
|
|
87
|
+
"prettier": "^2.8.4",
|
|
88
|
+
"rollup": "^3.18.0",
|
|
79
89
|
"rollup-plugin-copy": "^3.4.0",
|
|
80
|
-
"rollup-plugin-ts": "^3.
|
|
81
|
-
"typescript": "^4.9.
|
|
90
|
+
"rollup-plugin-ts": "^3.2.0",
|
|
91
|
+
"typescript": "^4.9.5"
|
|
82
92
|
},
|
|
83
93
|
"engines": {
|
|
84
94
|
"node": "14.* || 16.* || >= 18"
|
|
@@ -94,7 +104,7 @@
|
|
|
94
104
|
"./helpers/width.js": "./dist/_app_/helpers/width.js",
|
|
95
105
|
"./modifiers/container-query.js": "./dist/_app_/modifiers/container-query.js"
|
|
96
106
|
},
|
|
97
|
-
"main": "addon-main.
|
|
107
|
+
"main": "addon-main.cjs",
|
|
98
108
|
"type": "addon",
|
|
99
109
|
"version": 2
|
|
100
110
|
}
|
|
File without changes
|