ember-container-query 4.0.0-alpha.3 → 4.0.0-alpha.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -330,7 +330,7 @@ Let's look at the code that created the video demo above.
330
330
 
331
331
  You can see that the album page uses 2 `<ContainerQuery>` components. Rest assured, they act independently of each other. When you pair `<ContainerQuery>` with some CSS, you can create layouts beyond the dreams of others! 🙌
332
332
 
333
- For more examples, I encourage you to check out the code for my demo app. It is located under [`test-app/app`](https://github.com/ijlee2/ember-container-query/tree/main/test-app/app) folder and is structured like a typical Ember app.
333
+ For more examples, I encourage you to check out the code for my demo app. It is located under the [`docs-app`](https://github.com/ijlee2/ember-container-query/tree/main/docs-app) folder and is structured like a typical Ember app.
334
334
 
335
335
 
336
336
  Compatibility
@@ -6,7 +6,7 @@ import { action } from '@ember/object';
6
6
  import Component from '@glimmer/component';
7
7
  import { tracked } from '@glimmer/tracking';
8
8
 
9
- var TEMPLATE = 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}}");
9
+ var TEMPLATE = 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 {{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}}");
10
10
 
11
11
  var _class, _descriptor, _descriptor2;
12
12
  let ContainerQueryComponent = (_class = class ContainerQueryComponent extends Component {
@@ -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","_class","Component","constructor","args","_initializerDefineProperty","_descriptor","_descriptor2","_defineProperty","tagName","updateState","dimensions","queryResults","_applyDecoratedDescriptor","prototype","tracked","configurable","enumerable","writable","initializer","action","Object","getOwnPropertyDescriptor","setComponentTemplate","TEMPLATE"],"m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AA,CAAAa,SAAA,IAAAb,MAAA,EAAA;AATmCsB,oBAAA,CAAAC,QAAA,EAAAxB,uBAAA,CAAA;;;;"}
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 {{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","t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AAC,wBAAA,CAAArB,MAAA,CAAAa,SAAA,EAAA,aAAA,CAAA,EAAAb,MAAA,CAAAa,SAAA,IAAAb,MAAA,EAAA;AATmCsB,oBAAA,CAAAC,QAAA,EAAAxB,uBAAA,CAAA;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ember-container-query",
3
- "version": "4.0.0-alpha.3",
3
+ "version": "4.0.0-alpha.5",
4
4
  "description": "Container queries using Ember modifiers",
5
5
  "keywords": [
6
6
  "container-queries",
@@ -59,8 +59,7 @@
59
59
  "@embroider/addon-shim": "^1.8.4",
60
60
  "ember-element-helper": "^0.6.1",
61
61
  "ember-modifier": "^3.2.7 || ^4.0.0",
62
- "ember-resize-observer-service": "^1.1.0",
63
- "ember-test-selectors": "^6.0.0"
62
+ "ember-resize-observer-service": "^1.1.0"
64
63
  },
65
64
  "devDependencies": {
66
65
  "@babel/core": "^7.21.0",
@@ -73,12 +72,12 @@
73
72
  "@glint/environment-ember-loose": "^v1.0.0-beta.3",
74
73
  "@glint/template": "^v1.0.0-beta.3",
75
74
  "@tsconfig/ember": "^2.0.0",
76
- "@typescript-eslint/eslint-plugin": "^5.54.0",
77
- "@typescript-eslint/parser": "^5.54.0",
75
+ "@typescript-eslint/eslint-plugin": "^5.54.1",
76
+ "@typescript-eslint/parser": "^5.54.1",
78
77
  "ember-template-lint": "^5.6.0",
79
78
  "ember-template-lint-plugin-prettier": "^4.1.0",
80
79
  "eslint": "^8.35.0",
81
- "eslint-config-prettier": "^8.6.0",
80
+ "eslint-config-prettier": "^8.7.0",
82
81
  "eslint-plugin-ember": "^11.4.7",
83
82
  "eslint-plugin-n": "^15.6.1",
84
83
  "eslint-plugin-prettier": "^4.2.1",