├── types ├── dummy │ └── index.d.ts ├── global.d.ts ├── ember-resize-observer-modifier │ └── modifiers │ │ └── observe-resize.ts └── ember-modifier │ └── index.d.ts ├── tests ├── dummy │ ├── app │ │ ├── helpers │ │ │ ├── .gitkeep │ │ │ └── add.js │ │ ├── models │ │ │ └── .gitkeep │ │ ├── routes │ │ │ ├── .gitkeep │ │ │ └── album.js │ │ ├── components │ │ │ ├── .gitkeep │ │ │ ├── widgets │ │ │ │ ├── widget-1 │ │ │ │ │ ├── item │ │ │ │ │ │ ├── index.hbs │ │ │ │ │ │ └── index.css │ │ │ │ │ ├── index.hbs │ │ │ │ │ └── index.css │ │ │ │ ├── widget-2 │ │ │ │ │ ├── stacked-chart │ │ │ │ │ │ ├── index.hbs │ │ │ │ │ │ ├── index.css │ │ │ │ │ │ └── index.js │ │ │ │ │ ├── index.css │ │ │ │ │ ├── index.js │ │ │ │ │ ├── index.hbs │ │ │ │ │ └── captions │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ ├── index.css │ │ │ │ │ │ └── index.hbs │ │ │ │ ├── widget-3 │ │ │ │ │ ├── tour-schedule │ │ │ │ │ │ ├── responsive-image │ │ │ │ │ │ │ ├── index.css │ │ │ │ │ │ │ ├── index.hbs │ │ │ │ │ │ │ └── index.js │ │ │ │ │ │ ├── index.hbs │ │ │ │ │ │ └── index.css │ │ │ │ │ ├── index.css │ │ │ │ │ ├── index.js │ │ │ │ │ └── index.hbs │ │ │ │ ├── widget-4 │ │ │ │ │ ├── index.hbs │ │ │ │ │ ├── index.css │ │ │ │ │ └── memo │ │ │ │ │ │ ├── index.hbs │ │ │ │ │ │ ├── body │ │ │ │ │ │ ├── index.css │ │ │ │ │ │ └── index.hbs │ │ │ │ │ │ ├── header │ │ │ │ │ │ ├── index.hbs │ │ │ │ │ │ └── index.css │ │ │ │ │ │ ├── actions │ │ │ │ │ │ ├── index.hbs │ │ │ │ │ │ └── index.css │ │ │ │ │ │ └── index.css │ │ │ │ └── widget-5 │ │ │ │ │ ├── index.hbs │ │ │ │ │ └── index.css │ │ │ ├── tracks │ │ │ │ ├── index.css │ │ │ │ ├── table │ │ │ │ │ ├── index.css │ │ │ │ │ └── index.hbs │ │ │ │ ├── list │ │ │ │ │ ├── index.css │ │ │ │ │ ├── index.js │ │ │ │ │ └── index.hbs │ │ │ │ └── index.hbs │ │ │ └── navigation-menu │ │ │ │ ├── index.js │ │ │ │ ├── index.css │ │ │ │ └── index.hbs │ │ ├── controllers │ │ │ ├── .gitkeep │ │ │ └── application.js │ │ ├── styles │ │ │ ├── index.css │ │ │ ├── application.css │ │ │ ├── album.css │ │ │ ├── app.css │ │ │ ├── not-found.css │ │ │ └── dashboard.css │ │ ├── router.js │ │ ├── app.js │ │ ├── templates │ │ │ ├── not-found.hbs │ │ │ ├── dashboard.hbs │ │ │ ├── index.hbs │ │ │ ├── application.hbs │ │ │ └── album.hbs │ │ ├── index.html │ │ ├── data │ │ │ ├── album.js │ │ │ └── concert.js │ │ └── utils │ │ │ └── widgets │ │ │ ├── widget-3.js │ │ │ └── widget-2.js │ ├── public │ │ ├── robots.txt │ │ ├── assets │ │ │ └── favicon.png │ │ ├── images │ │ │ └── widgets │ │ │ │ ├── widget-4 │ │ │ │ └── avatar.jpg │ │ │ │ └── widget-3 │ │ │ │ ├── venue-wide@1x.jpg │ │ │ │ ├── venue-wide@2x.jpg │ │ │ │ ├── venue-wide@4x.jpg │ │ │ │ ├── venue-square@1x.jpg │ │ │ │ ├── venue-square@2x.jpg │ │ │ │ ├── venue-square@4x.jpg │ │ │ │ ├── venue-extra-wide@1x.jpg │ │ │ │ ├── venue-extra-wide@2x.jpg │ │ │ │ └── venue-extra-wide@4x.jpg │ │ └── material-design-icons │ │ │ ├── stop-24px.svg │ │ │ ├── arrow_forward_ios-24px.svg │ │ │ ├── arrow_back_ios-24px.svg │ │ │ ├── explicit-24px.svg │ │ │ ├── textsms-outlined-24px.svg │ │ │ ├── loop-24px.svg │ │ │ ├── favorite-outlined-24px.svg │ │ │ └── share-outlined-24px.svg │ └── config │ │ ├── optional-features.json │ │ ├── targets.js │ │ ├── ember-cli-update.json │ │ └── environment.js ├── helpers │ └── pause.ts ├── test-helper.ts └── index.html ├── .watchmanconfig ├── .release-it.json ├── .template-lintrc.js ├── app ├── components │ └── element-query.js ├── modifiers │ └── element-query.js └── templates │ └── components │ └── element-query.hbs ├── index.js ├── typedoc-theme ├── assets │ ├── css │ │ ├── elements │ │ │ ├── _images.sass │ │ │ ├── _footer.sass │ │ │ ├── _sources.sass │ │ │ ├── _hierarchy.sass │ │ │ ├── _member.sass │ │ │ ├── _comment.sass │ │ │ ├── _filter.sass │ │ │ ├── _search.sass │ │ │ ├── _panel.sass │ │ │ ├── _index.sass │ │ │ ├── _signatures.sass │ │ │ ├── _toolbar.sass │ │ │ └── _navigation.sass │ │ ├── _constants.sass │ │ ├── main.sass │ │ ├── _theme.scss │ │ ├── setup │ │ │ ├── _mixins.sass │ │ │ ├── _typography.sass │ │ │ ├── _animations.sass │ │ │ ├── _grid.sass │ │ │ └── _icons.scss │ │ └── layouts │ │ │ ├── _minimal.sass │ │ │ └── _default.sass │ ├── images │ │ ├── icons.png │ │ ├── icons.psd │ │ ├── icons@2x.png │ │ ├── widgets.png │ │ ├── widgets.psd │ │ └── widgets@2x.png │ └── js │ │ └── src │ │ ├── typedoc │ │ ├── utils │ │ │ ├── debounce.ts │ │ │ ├── trottle.ts │ │ │ └── pointer.ts │ │ ├── Component.ts │ │ ├── EventTarget.ts │ │ ├── Application.ts │ │ ├── components │ │ │ ├── Toggle.ts │ │ │ ├── MenuHighlight.ts │ │ │ └── Signature.ts │ │ └── services │ │ │ └── Viewport.ts │ │ └── bootstrap.ts ├── templates │ ├── index.hbs │ └── reflection.hbs ├── partials │ ├── toc.hbs │ ├── breadcrumb.hbs │ ├── member.signatures.hbs │ ├── member.reference.hbs │ ├── toc.root.hbs │ ├── hierarchy.hbs │ ├── analytics.hbs │ ├── typeParameters.hbs │ ├── members.hbs │ ├── members.group.hbs │ ├── comment.hbs │ ├── member.hbs │ ├── footer.hbs │ ├── member.sources.hbs │ ├── navigation.hbs │ ├── member.declaration.hbs │ ├── member.getterSetter.hbs │ ├── member.signature.title.hbs │ ├── typeAndParent.hbs │ ├── member.signature.body.hbs │ ├── index.hbs │ └── header.hbs └── layouts │ └── default.hbs ├── config ├── environment.js └── ember-try.js ├── jsconfig.json ├── typedoc.json ├── .ember-cli ├── .prettierignore ├── .eslintignore ├── .prettierrc.js ├── .editorconfig ├── .gitignore ├── addon ├── -private │ └── component.ts └── index.ts ├── ember-cli-build.js ├── testem.js ├── CONTRIBUTING.md ├── .npmignore ├── .lintstagedrc.js ├── LICENSE.md ├── tsconfig.json ├── tsconfig-node.json ├── .github └── workflows │ ├── github-pages.yml │ └── ci.yml ├── RELEASE.md └── CHANGELOG.md /types/dummy/index.d.ts: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/dummy/app/helpers/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/dummy/app/models/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/dummy/app/routes/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/dummy/app/components/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/dummy/app/controllers/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.watchmanconfig: -------------------------------------------------------------------------------- 1 | { 2 | "ignore_dirs": ["tmp", "dist"] 3 | } 4 | -------------------------------------------------------------------------------- /.release-it.json: -------------------------------------------------------------------------------- 1 | { 2 | "github": { 3 | "release": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /tests/dummy/public/robots.txt: -------------------------------------------------------------------------------- 1 | # http://www.robotstxt.org 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /.template-lintrc.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = { 4 | extends: 'octane', 5 | }; 6 | -------------------------------------------------------------------------------- /app/components/element-query.js: -------------------------------------------------------------------------------- 1 | export { default } from 'ember-element-query/-private/component'; 2 | -------------------------------------------------------------------------------- /app/modifiers/element-query.js: -------------------------------------------------------------------------------- 1 | export { default } from 'ember-element-query/-private/modifier'; 2 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = { 4 | name: require('./package').name, 5 | }; 6 | -------------------------------------------------------------------------------- /tests/dummy/app/components/widgets/widget-1/item/index.hbs: -------------------------------------------------------------------------------- 1 |
2 |

{{@label}}

3 |
-------------------------------------------------------------------------------- /typedoc-theme/assets/css/elements/_images.sass: -------------------------------------------------------------------------------- 1 | // fixes issue with images in readme 2 | img 3 | max-width: 100% 4 | -------------------------------------------------------------------------------- /tests/dummy/app/components/tracks/index.css: -------------------------------------------------------------------------------- 1 | .tracks { 2 | position: relative; 3 | width: 100%; 4 | height: 100%; 5 | } 6 | -------------------------------------------------------------------------------- /config/environment.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = function (/* environment, appConfig */) { 4 | return {}; 5 | }; 6 | -------------------------------------------------------------------------------- /tests/dummy/public/assets/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lolmaus/ember-element-query/HEAD/tests/dummy/public/assets/favicon.png -------------------------------------------------------------------------------- /typedoc-theme/assets/images/icons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lolmaus/ember-element-query/HEAD/typedoc-theme/assets/images/icons.png -------------------------------------------------------------------------------- /typedoc-theme/assets/images/icons.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lolmaus/ember-element-query/HEAD/typedoc-theme/assets/images/icons.psd -------------------------------------------------------------------------------- /typedoc-theme/templates/index.hbs: -------------------------------------------------------------------------------- 1 |
2 | {{#markdown}}{{{model.readme}}}{{/markdown}} 3 |
-------------------------------------------------------------------------------- /typedoc-theme/assets/images/icons@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lolmaus/ember-element-query/HEAD/typedoc-theme/assets/images/icons@2x.png -------------------------------------------------------------------------------- /typedoc-theme/assets/images/widgets.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lolmaus/ember-element-query/HEAD/typedoc-theme/assets/images/widgets.png -------------------------------------------------------------------------------- /typedoc-theme/assets/images/widgets.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lolmaus/ember-element-query/HEAD/typedoc-theme/assets/images/widgets.psd -------------------------------------------------------------------------------- /typedoc-theme/assets/images/widgets@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lolmaus/ember-element-query/HEAD/typedoc-theme/assets/images/widgets@2x.png -------------------------------------------------------------------------------- /jsconfig.json: -------------------------------------------------------------------------------- 1 | {"compilerOptions":{"target":"es6","experimentalDecorators":true},"exclude":["node_modules","bower_components","tmp","vendor",".git","dist"]} -------------------------------------------------------------------------------- /typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "entryPoints": ["addon/index.ts"], 3 | "excludeInternal": true, 4 | "out": "./dist/api", 5 | "theme": "./typedoc-theme" 6 | } 7 | -------------------------------------------------------------------------------- /tests/dummy/app/styles/index.css: -------------------------------------------------------------------------------- 1 | .container { 2 | padding: 1.5rem 1rem; 3 | } 4 | 5 | .list { 6 | list-style: disc outside; 7 | padding-left: 2em; 8 | } 9 | -------------------------------------------------------------------------------- /tests/dummy/public/images/widgets/widget-4/avatar.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lolmaus/ember-element-query/HEAD/tests/dummy/public/images/widgets/widget-4/avatar.jpg -------------------------------------------------------------------------------- /tests/dummy/public/images/widgets/widget-3/venue-wide@1x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lolmaus/ember-element-query/HEAD/tests/dummy/public/images/widgets/widget-3/venue-wide@1x.jpg -------------------------------------------------------------------------------- /tests/dummy/public/images/widgets/widget-3/venue-wide@2x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lolmaus/ember-element-query/HEAD/tests/dummy/public/images/widgets/widget-3/venue-wide@2x.jpg -------------------------------------------------------------------------------- /tests/dummy/public/images/widgets/widget-3/venue-wide@4x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lolmaus/ember-element-query/HEAD/tests/dummy/public/images/widgets/widget-3/venue-wide@4x.jpg -------------------------------------------------------------------------------- /tests/dummy/public/images/widgets/widget-3/venue-square@1x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lolmaus/ember-element-query/HEAD/tests/dummy/public/images/widgets/widget-3/venue-square@1x.jpg -------------------------------------------------------------------------------- /tests/dummy/public/images/widgets/widget-3/venue-square@2x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lolmaus/ember-element-query/HEAD/tests/dummy/public/images/widgets/widget-3/venue-square@2x.jpg -------------------------------------------------------------------------------- /tests/dummy/public/images/widgets/widget-3/venue-square@4x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lolmaus/ember-element-query/HEAD/tests/dummy/public/images/widgets/widget-3/venue-square@4x.jpg -------------------------------------------------------------------------------- /tests/dummy/public/images/widgets/widget-3/venue-extra-wide@1x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lolmaus/ember-element-query/HEAD/tests/dummy/public/images/widgets/widget-3/venue-extra-wide@1x.jpg -------------------------------------------------------------------------------- /tests/dummy/public/images/widgets/widget-3/venue-extra-wide@2x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lolmaus/ember-element-query/HEAD/tests/dummy/public/images/widgets/widget-3/venue-extra-wide@2x.jpg -------------------------------------------------------------------------------- /tests/dummy/public/images/widgets/widget-3/venue-extra-wide@4x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lolmaus/ember-element-query/HEAD/tests/dummy/public/images/widgets/widget-3/venue-extra-wide@4x.jpg -------------------------------------------------------------------------------- /tests/dummy/app/components/tracks/table/index.css: -------------------------------------------------------------------------------- 1 | .track-number { 2 | width: 2rem; 3 | } 4 | 5 | .track-is-explicit { 6 | width: 4rem; 7 | } 8 | 9 | .track-length { 10 | width: 4rem; 11 | } -------------------------------------------------------------------------------- /tests/dummy/app/helpers/add.js: -------------------------------------------------------------------------------- 1 | import { helper } from '@ember/component/helper'; 2 | 3 | export default helper(function add(params) { 4 | return params.reduce((accumulator, value) => accumulator + value, 0); 5 | }); 6 | -------------------------------------------------------------------------------- /tests/dummy/config/optional-features.json: -------------------------------------------------------------------------------- 1 | { 2 | "application-template-wrapper": false, 3 | "default-async-observers": true, 4 | "jquery-integration": false, 5 | "template-only-glimmer-components": true 6 | } 7 | -------------------------------------------------------------------------------- /tests/dummy/public/material-design-icons/stop-24px.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /tests/dummy/app/routes/album.js: -------------------------------------------------------------------------------- 1 | import Route from '@ember/routing/route'; 2 | import albumData from 'dummy/data/album'; 3 | 4 | export default class AlbumRoute extends Route { 5 | model() { 6 | return albumData; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /types/global.d.ts: -------------------------------------------------------------------------------- 1 | // Types for compiled templates 2 | declare module 'ember-element-query/templates/*' { 3 | import { TemplateFactory } from 'htmlbars-inline-precompile'; 4 | const tmpl: TemplateFactory; 5 | export default tmpl; 6 | } 7 | -------------------------------------------------------------------------------- /tests/dummy/public/material-design-icons/arrow_forward_ios-24px.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /tests/dummy/public/material-design-icons/arrow_back_ios-24px.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /typedoc-theme/assets/css/_constants.sass: -------------------------------------------------------------------------------- 1 | // Fonts 2 | // 3 | $FONT_FAMILY: 'Segoe UI', sans-serif 4 | $FONT_FAMILY_MONO: Menlo, Monaco, Consolas, 'Courier New', monospace 5 | 6 | $FONT_SIZE: 16px 7 | $FONT_SIZE_MONO: 14px 8 | 9 | $LINE_HEIGHT: 1.333em 10 | 11 | $TOOLBAR_HEIGHT: 40px 12 | -------------------------------------------------------------------------------- /types/ember-resize-observer-modifier/modifiers/observe-resize.ts: -------------------------------------------------------------------------------- 1 | declare module 'ember-resize-observer-modifier/modifiers/observe-resize' { 2 | // prettier-ignore 3 | export function observeResize( 4 | element: HTMLElement, 5 | [changeHandler]: [() => void] 6 | ): 7 | () => void; 8 | } 9 | -------------------------------------------------------------------------------- /tests/dummy/public/material-design-icons/explicit-24px.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /typedoc-theme/assets/js/src/typedoc/utils/debounce.ts: -------------------------------------------------------------------------------- 1 | export const debounce = (fn: Function, wait: number = 100) => { 2 | let timeout: ReturnType; 3 | return (...args: any[]) => { 4 | clearTimeout(timeout); 5 | timeout = setTimeout(() => fn(args), wait); 6 | }; 7 | }; 8 | -------------------------------------------------------------------------------- /tests/dummy/app/components/widgets/widget-1/item/index.css: -------------------------------------------------------------------------------- 1 | .container { 2 | background: linear-gradient(36deg, rgba(255, 224, 130, 0.4) 15%, rgba(255, 248, 225, 0.8) 90%); 3 | border-radius: 0.1875rem; 4 | height: calc(100% - 1.2rem); 5 | padding: 0.6rem; 6 | width: calc(100% - 1.2rem); 7 | word-break: break-word; 8 | } -------------------------------------------------------------------------------- /.ember-cli: -------------------------------------------------------------------------------- 1 | { 2 | /** 3 | Ember CLI sends analytics information by default. The data is completely 4 | anonymous, but there are times when you might want to disable this behavior. 5 | 6 | Setting `disableAnalytics` to true will prevent any data from being sent. 7 | */ 8 | "disableAnalytics": false 9 | } 10 | -------------------------------------------------------------------------------- /tests/helpers/pause.ts: -------------------------------------------------------------------------------- 1 | import { next as runNext } from '@ember/runloop'; 2 | 3 | export default function pause(ms = 100): Promise { 4 | return new Promise((resolve) => setTimeout(resolve, ms)); 5 | } 6 | 7 | export function next(): Promise { 8 | return new Promise((resolve) => runNext(null, resolve)); 9 | } 10 | -------------------------------------------------------------------------------- /tests/dummy/public/material-design-icons/textsms-outlined-24px.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /tests/dummy/app/components/widgets/widget-2/stacked-chart/index.hbs: -------------------------------------------------------------------------------- 1 |
10 | 11 | 12 |
13 | -------------------------------------------------------------------------------- /typedoc-theme/assets/js/src/typedoc/Component.ts: -------------------------------------------------------------------------------- 1 | export interface IComponentOptions { 2 | el: HTMLElement; 3 | } 4 | 5 | /** 6 | * TypeDoc component class. 7 | */ 8 | export class Component { 9 | protected el: HTMLElement; 10 | 11 | constructor(options: IComponentOptions) { 12 | this.el = options.el; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /typedoc-theme/partials/toc.hbs: -------------------------------------------------------------------------------- 1 |
  • 2 | {{{wbr title}}} 3 | {{#if children}} 4 |
      5 | {{#each children}} 6 | {{> toc}} 7 | {{/each}} 8 |
    9 | {{/if}} 10 |
  • 11 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | # unconventional js 2 | /blueprints/*/files/ 3 | /vendor/ 4 | 5 | # compiled output 6 | /dist/ 7 | /tmp/ 8 | 9 | # dependencies 10 | /bower_components/ 11 | /node_modules/ 12 | 13 | # misc 14 | /coverage/ 15 | !.* 16 | .eslintcache 17 | 18 | # ember-try 19 | /.node_modules.ember-try/ 20 | /bower.json.ember-try 21 | /package.json.ember-try 22 | -------------------------------------------------------------------------------- /typedoc-theme/assets/js/src/typedoc/utils/trottle.ts: -------------------------------------------------------------------------------- 1 | export const throttle = ( 2 | fn: (...args: A) => void, 3 | wait = 100 4 | ) => { 5 | let time = Date.now(); 6 | return (...args: A) => { 7 | if (time + wait - Date.now() < 0) { 8 | fn(...args); 9 | time = Date.now(); 10 | } 11 | }; 12 | }; 13 | -------------------------------------------------------------------------------- /tests/dummy/app/components/widgets/widget-3/tour-schedule/responsive-image/index.css: -------------------------------------------------------------------------------- 1 | .image-container { 2 | display: grid; 3 | height: 100%; 4 | width: 100%; 5 | position: absolute; 6 | } 7 | 8 | .image { 9 | position: absolute; 10 | top: 0; 11 | left: 0; 12 | border-radius: 0.25rem; 13 | height: 100%; 14 | object-fit: cover; 15 | width: 100%; 16 | } 17 | -------------------------------------------------------------------------------- /tests/dummy/config/targets.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = { 4 | browsers: [ 5 | 'last 2 Chrome versions', 6 | 'last 2 Firefox versions', 7 | 'last 2 Safari versions', 8 | // Latest versions of Microsoft Edge are built on top of Chromium. 9 | // However, not a significant number of users use the latest yet. 10 | 'Edge >= 18', 11 | ], 12 | }; 13 | -------------------------------------------------------------------------------- /tests/dummy/app/components/widgets/widget-2/stacked-chart/index.css: -------------------------------------------------------------------------------- 1 | .svg-container { 2 | background: linear-gradient(36deg, rgba(255, 224, 130, 0.4) 15%, rgba(255, 248, 225, 0.8) 90%); 3 | border-radius: 0.1875rem; 4 | height: 100%; 5 | overflow: hidden; 6 | position: relative; 7 | width: 100%; 8 | } 9 | 10 | .svg { 11 | left: 0; 12 | position: absolute; 13 | top: 0; 14 | } -------------------------------------------------------------------------------- /tests/dummy/app/components/navigation-menu/index.js: -------------------------------------------------------------------------------- 1 | import { inject as service } from '@ember/service'; 2 | import Component from '@glimmer/component'; 3 | 4 | export default class NavigationMenuComponent extends Component { 5 | @service router; 6 | 7 | get rootRoute() { 8 | const rootRoute = (this.router.currentURL || '').split('/')[1]; 9 | 10 | return rootRoute || 'index'; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /tests/dummy/app/components/widgets/widget-3/index.css: -------------------------------------------------------------------------------- 1 | .container { 2 | display: flex; 3 | flex-direction: column; 4 | height: 100%; 5 | } 6 | 7 | .header { 8 | display: flex; 9 | justify-content: space-between; 10 | } 11 | 12 | .actions { 13 | margin-top: 0.4rem; 14 | } 15 | 16 | .tour-schedule { 17 | display: flex; 18 | flex: 1; 19 | flex-direction: column; 20 | overflow: hidden; 21 | } -------------------------------------------------------------------------------- /tests/dummy/app/components/widgets/widget-4/index.hbs: -------------------------------------------------------------------------------- 1 |
    2 |
    3 |

    Widget 4

    4 |
    5 | 6 |
    7 | 8 |
    9 | 10 |
    11 | 12 | All memos 13 | 14 |
    15 |
    -------------------------------------------------------------------------------- /tests/dummy/app/router.js: -------------------------------------------------------------------------------- 1 | import EmberRouter from '@ember/routing/router'; 2 | import config from 'dummy/config/environment'; 3 | 4 | export default class Router extends EmberRouter { 5 | location = config.locationType; 6 | rootURL = config.rootURL; 7 | } 8 | 9 | Router.map(function () { 10 | this.route('album'); 11 | this.route('dashboard'); 12 | this.route('not-found', { path: '*' }); 13 | }); 14 | -------------------------------------------------------------------------------- /tests/dummy/public/material-design-icons/loop-24px.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | # unconventional js 2 | /blueprints/*/files/ 3 | /vendor/ 4 | 5 | # compiled output 6 | /dist/ 7 | /tmp/ 8 | 9 | # dependencies 10 | /bower_components/ 11 | 12 | # misc 13 | /coverage/ 14 | .eslintcache 15 | 16 | # ember-try 17 | /.node_modules.ember-try/ 18 | /bower.json.ember-try 19 | /package.json.ember-try 20 | 21 | # IDE 22 | /.idea/ 23 | /.history/ 24 | 25 | # Vendor assets 26 | /tests/dummy/ 27 | /typedoc-theme/ 28 | -------------------------------------------------------------------------------- /.prettierrc.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = { 4 | arrowParens: 'always', // It's convenient that you don't have to add them by hand when you need to add more args or a type 5 | singleQuote: true, // Enabled to align with EmberJS Prettier config 6 | printWidth: 100, // Per team's agreement 7 | trailingComma: 'es5', // Trailing commas makes editing easier, diffs cleaner. `es5` option aligns with EmberJS Prettier config 8 | }; 9 | -------------------------------------------------------------------------------- /tests/dummy/app/components/tracks/list/index.css: -------------------------------------------------------------------------------- 1 | .list { 2 | column-gap: 0.5rem; 3 | display: grid; 4 | grid-auto-flow: column; 5 | row-gap: 0.25rem; 6 | } 7 | 8 | .item { 9 | align-items: center; 10 | display: flex; 11 | min-height: 1.5rem; 12 | justify-content: space-between; 13 | word-break: break-word; 14 | } 15 | 16 | .icon-explicit { 17 | fill: rgba(247, 252, 251, 0.9); 18 | flex-shrink: 0; 19 | margin-left: 0.25rem; 20 | } -------------------------------------------------------------------------------- /tests/dummy/app/app.js: -------------------------------------------------------------------------------- 1 | import Application from '@ember/application'; 2 | import config from 'dummy/config/environment'; 3 | import Resolver from 'ember-resolver'; 4 | import loadInitializers from 'ember-load-initializers'; 5 | 6 | export default class App extends Application { 7 | modulePrefix = config.modulePrefix; 8 | podModulePrefix = config.podModulePrefix; 9 | Resolver = Resolver; 10 | } 11 | 12 | loadInitializers(App, config.modulePrefix); 13 | -------------------------------------------------------------------------------- /typedoc-theme/partials/breadcrumb.hbs: -------------------------------------------------------------------------------- 1 | {{#if parent}} 2 | {{#with parent}}{{> breadcrumb}}{{/with}} 3 |
  • 4 | {{#if url}} 5 | {{name}} 6 | {{else}} 7 | {{name}} 8 | {{/if}} 9 |
  • 10 | {{else}} 11 | {{#if url}} 12 |
  • 13 | {{ name }} 14 |
  • 15 | {{/if}} 16 | {{/if}} 17 | -------------------------------------------------------------------------------- /typedoc-theme/partials/member.signatures.hbs: -------------------------------------------------------------------------------- 1 |
      2 | {{#each signatures}} 3 |
    • {{#compact}}{{> member.signature.title }}{{/compact}}
    • 4 | {{/each}} 5 |
    6 | 7 |
      8 | {{#each signatures}} 9 |
    • 10 | {{> member.signature.body }} 11 |
    • 12 | {{/each}} 13 |
    14 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig helps developers define and maintain consistent 2 | # coding styles between different editors and IDEs 3 | # editorconfig.org 4 | 5 | root = true 6 | 7 | 8 | [*] 9 | end_of_line = lf 10 | charset = utf-8 11 | trim_trailing_whitespace = true 12 | insert_final_newline = true 13 | indent_style = space 14 | indent_size = 2 15 | max_line_length = 100 16 | 17 | [*.hbs] 18 | 19 | [*.{diff,md}] 20 | trim_trailing_whitespace = false 21 | -------------------------------------------------------------------------------- /typedoc-theme/partials/member.reference.hbs: -------------------------------------------------------------------------------- 1 | {{#with tryGetTargetReflectionDeep}} 2 | {{#ifCond ../name '===' name}} 3 | Re-exports {{name}} 4 | {{else if flags.isExported}} 5 | Renames and re-exports {{name}} 6 | {{else}} 7 | Renames and exports {{name}} 8 | {{/ifCond}} 9 | {{else}} 10 | Re-exports {{name}} 11 | {{/with}} 12 | -------------------------------------------------------------------------------- /tests/dummy/app/components/widgets/widget-3/index.js: -------------------------------------------------------------------------------- 1 | import Component from '@glimmer/component'; 2 | import { tracked } from '@glimmer/tracking'; 3 | import concertData from 'dummy/data/concert'; 4 | 5 | export default class WidgetsWidget3Component extends Component { 6 | @tracked concertData = {}; 7 | 8 | constructor() { 9 | super(...arguments); 10 | 11 | this.loadData(); 12 | } 13 | 14 | loadData() { 15 | this.concertData = concertData; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /app/templates/components/element-query.hbs: -------------------------------------------------------------------------------- 1 | {{#let (element (or @tagName "div")) as |Tag|}} 2 | 17 | {{yield this.eqInfo.attributesRecord this.eqInfo}} 18 | 19 | {{/let}} 20 | -------------------------------------------------------------------------------- /typedoc-theme/partials/toc.root.hbs: -------------------------------------------------------------------------------- 1 | {{#if isInPath}} 2 | 3 |
      4 | {{/if}} 5 |
    • 6 | {{{wbr title}}} 7 | {{#if children}} 8 |
        9 | {{#each children}} 10 | {{> toc}} 11 | {{/each}} 12 |
      13 | {{/if}} 14 |
    • 15 | {{#if isInPath}} 16 |
    17 |
      18 | {{/if}} 19 | -------------------------------------------------------------------------------- /typedoc-theme/partials/hierarchy.hbs: -------------------------------------------------------------------------------- 1 |
        2 | {{#each types}} 3 |
      • 4 | {{#if ../isTarget}} 5 | {{this}} 6 | {{else}} 7 | {{#compact}}{{> type}}{{/compact}} 8 | {{/if}} 9 | 10 | {{#if @last}} 11 | {{#with ../next}} 12 | {{> hierarchy}} 13 | {{/with}} 14 | {{/if}} 15 |
      • 16 | {{/each}} 17 |
      18 | -------------------------------------------------------------------------------- /tests/dummy/app/components/widgets/widget-3/index.hbs: -------------------------------------------------------------------------------- 1 |
      2 |
      3 |

      Widget 3

      4 | 5 | 10 |
      11 | 12 |
      16 | 19 |
      20 |
      -------------------------------------------------------------------------------- /tests/test-helper.ts: -------------------------------------------------------------------------------- 1 | // @ts-ignore Missing types 2 | import Application from 'dummy/app'; 3 | 4 | // @ts-ignore Missing type 5 | import config from 'dummy/config/environment'; 6 | import * as QUnit from 'qunit'; 7 | import { setApplication } from '@ember/test-helpers'; 8 | import { setup } from 'qunit-dom'; 9 | import { start } from 'ember-qunit'; 10 | 11 | // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access 12 | setApplication(Application.create(config.APP)); 13 | 14 | setup(QUnit.assert); 15 | 16 | start(); 17 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # compiled output 4 | /dist/ 5 | /tmp/ 6 | 7 | # dependencies 8 | /bower_components/ 9 | /node_modules/ 10 | 11 | # misc 12 | /.sass-cache 13 | /.eslintcache 14 | /connect.lock 15 | /coverage/ 16 | /libpeerconnection.log 17 | /npm-debug.log* 18 | /testem.log 19 | /yarn-error.log 20 | 21 | # ember-try 22 | /.node_modules.ember-try/ 23 | /bower.json.ember-try 24 | /package.json.ember-try 25 | 26 | # IDE 27 | /.idea/ 28 | /.history/ 29 | /.vscode/ 30 | -------------------------------------------------------------------------------- /addon/-private/component.ts: -------------------------------------------------------------------------------- 1 | import Component from '@glimmer/component'; 2 | import { tracked } from '@glimmer/tracking'; 3 | import { action } from '@ember/object'; 4 | import { Args, EQInfo } from 'ember-element-query'; 5 | 6 | /** @internal */ 7 | export default class ElementQuery extends Component { 8 | @tracked 9 | eqInfo?: EQInfo; 10 | 11 | @action 12 | onResize(eqInfo: EQInfo): void { 13 | this.eqInfo = eqInfo; 14 | 15 | if (this.args.onResize) { 16 | this.args.onResize(eqInfo); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /tests/dummy/public/material-design-icons/favorite-outlined-24px.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /tests/dummy/app/components/widgets/widget-3/tour-schedule/responsive-image/index.hbs: -------------------------------------------------------------------------------- 1 | {{#if @images}} 2 |
      8 |
      11 | {{#if this.src}} 12 | 19 | {{/if}} 20 |
      21 |
      22 | {{/if}} 23 | -------------------------------------------------------------------------------- /tests/dummy/app/components/widgets/widget-4/index.css: -------------------------------------------------------------------------------- 1 | .container { 2 | display: grid; 3 | grid-template-areas: 4 | "header" 5 | "memo-highlight" 6 | "actions"; 7 | grid-template-columns: 1fr; 8 | grid-template-rows: auto 1fr 2.5rem; 9 | height: 100%; 10 | } 11 | 12 | .header { 13 | grid-area: header; 14 | } 15 | 16 | .memo-highlight { 17 | grid-area: memo-highlight; 18 | overflow: hidden; 19 | } 20 | 21 | .actions { 22 | grid-area: actions; 23 | 24 | align-items: flex-end; 25 | display: flex; 26 | justify-content: flex-end; 27 | } -------------------------------------------------------------------------------- /tests/dummy/app/components/tracks/index.hbs: -------------------------------------------------------------------------------- 1 | 8 | {{#if (and EQ.from-wide EQ.from-tall)}} 9 | 12 | {{else}} 13 | 21 | {{/if}} 22 | 23 | -------------------------------------------------------------------------------- /tests/dummy/config/ember-cli-update.json: -------------------------------------------------------------------------------- 1 | { 2 | "schemaVersion": "1.0.0", 3 | "packages": [ 4 | { 5 | "name": "ember-cli", 6 | "version": "3.26.1", 7 | "blueprints": [ 8 | { 9 | "name": "addon", 10 | "outputRepo": "https://github.com/ember-cli/ember-addon-output", 11 | "codemodsSource": "ember-addon-codemods-manifest@1", 12 | "isBaseBlueprint": true, 13 | "options": [ 14 | "--yarn", 15 | "--no-welcome" 16 | ] 17 | } 18 | ] 19 | } 20 | ] 21 | } 22 | -------------------------------------------------------------------------------- /typedoc-theme/partials/analytics.hbs: -------------------------------------------------------------------------------- 1 | {{#if settings.gaID}} 2 | 11 | {{/if}} -------------------------------------------------------------------------------- /tests/dummy/app/components/widgets/widget-4/memo/index.hbs: -------------------------------------------------------------------------------- 1 |
      9 |
      10 | 12 |
      13 | 14 |
      15 | 17 |
      18 | 19 |
      20 | 22 |
      23 |
      24 | -------------------------------------------------------------------------------- /tests/dummy/app/components/navigation-menu/index.css: -------------------------------------------------------------------------------- 1 | .menu { 2 | display: flex; 3 | justify-content: space-between; 4 | flex-wrap: wrap; 5 | } 6 | 7 | .list { 8 | align-items: center; 9 | display: flex; 10 | } 11 | 12 | .item.active-route { 13 | background-color: rgba(255, 255, 255, 0.075); 14 | } 15 | 16 | .link { 17 | display: inline-block; 18 | font-size: 0.875rem; 19 | padding: 0.875rem 1rem; 20 | text-decoration: none; 21 | white-space: nowrap; 22 | } 23 | 24 | .link:hover { 25 | background-color: rgba(255, 255, 255, 0.075); 26 | transition: background-color 0.17s; 27 | } 28 | -------------------------------------------------------------------------------- /tests/dummy/app/components/widgets/widget-2/index.css: -------------------------------------------------------------------------------- 1 | .container { 2 | display: flex; 3 | flex-direction: column; 4 | height: 100%; 5 | } 6 | 7 | .visualization { 8 | display: flex; 9 | flex: 1; 10 | flex-direction: column; 11 | } 12 | 13 | .container[data-container-query-short] .captions { 14 | flex: 1; 15 | } 16 | 17 | .container[data-container-query-medium] .captions { 18 | height: 10%; 19 | margin-top: 0.6rem; 20 | min-height: 3rem; 21 | } 22 | 23 | .container[data-container-query-tall] .captions { 24 | height: 25%; 25 | margin-top: 0.6rem; 26 | max-height: 10rem; 27 | } 28 | -------------------------------------------------------------------------------- /typedoc-theme/assets/css/elements/_footer.sass: -------------------------------------------------------------------------------- 1 | footer 2 | border-top: 1px solid var(--color-panel-divider) 3 | background-color: var(--color-panel) 4 | 5 | &.with-border-bottom 6 | border-bottom: 1px solid var(--color-panel-divider) 7 | 8 | .tsd-legend-group 9 | font-size: 0 10 | 11 | .tsd-legend 12 | display: inline-block 13 | width: 25% 14 | padding: 0 15 | font-size: $FONT_SIZE 16 | list-style: none 17 | line-height: $LINE_HEIGHT 18 | vertical-align: top 19 | 20 | +size-xs-sm 21 | width: 50% 22 | -------------------------------------------------------------------------------- /typedoc-theme/partials/typeParameters.hbs: -------------------------------------------------------------------------------- 1 |
        2 | {{#each typeParameters}} 3 |
      • 4 |

        {{#compact}} 5 | {{name}} 6 | {{#if type}} 7 | 8 | {{#with type}}{{> type}}{{/with}} 9 | {{/if}} 10 | {{#if default}} 11 |  = {{#with default}}{{> type}}{{/with}} 12 | {{/if}} 13 | {{/compact}}

        14 | {{> comment}} 15 |
      • 16 | {{/each}} 17 |
      18 | -------------------------------------------------------------------------------- /tests/dummy/app/controllers/application.js: -------------------------------------------------------------------------------- 1 | import Controller from '@ember/controller'; 2 | import { action } from '@ember/object'; 3 | import styles from 'dummy/styles/application'; 4 | 5 | export default class ApplicationController extends Controller { 6 | @action allowFocusOutlineOnTab(element) { 7 | const className = styles['no-focus-outline']; 8 | 9 | element.addEventListener('click', () => { 10 | element.classList.add(className); 11 | }); 12 | 13 | element.addEventListener('keyup', (event) => { 14 | if (event.key === 'Tab') { 15 | element.classList.remove(className); 16 | } 17 | }); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /ember-cli-build.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const EmberAddon = require('ember-cli/lib/broccoli/ember-addon'); 4 | 5 | module.exports = function (defaults) { 6 | const app = new EmberAddon(defaults, { 7 | // Add options here 8 | }); 9 | 10 | /* 11 | This build file specifies the options for the dummy test app of this 12 | addon, located in `/tests/dummy` 13 | This build file does *not* influence how the addon or the app using it 14 | behave. You most likely want to be modifying `./index.js` or app's build file 15 | */ 16 | 17 | const { maybeEmbroider } = require('@embroider/test-setup'); 18 | return maybeEmbroider(app); 19 | }; 20 | -------------------------------------------------------------------------------- /tests/dummy/app/components/tracks/list/index.js: -------------------------------------------------------------------------------- 1 | import { action } from '@ember/object'; 2 | import Component from '@glimmer/component'; 3 | 4 | export default class TracksListComponent extends Component { 5 | get numColumns() { 6 | return this.args.numColumns ?? 1; 7 | } 8 | 9 | get numRows() { 10 | return Math.ceil(this.tracks.length / this.numColumns); 11 | } 12 | 13 | get tracks() { 14 | return this.args.tracks ?? []; 15 | } 16 | 17 | @action updateCssForRows(element) { 18 | element.style.gridTemplateColumns = `repeat(${this.numColumns}, minmax(0, 1fr))`; 19 | element.style.gridTemplateRows = `repeat(${this.numRows}, 1fr)`; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /tests/dummy/app/components/widgets/widget-5/index.hbs: -------------------------------------------------------------------------------- 1 |
      8 |
      12 |

      13 | What will you create with 14 |

      15 | 16 |

      17 | ember-container-query 18 |

      19 | 20 |

      21 | ? 22 |

      23 |
      24 |
      25 | -------------------------------------------------------------------------------- /testem.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = { 4 | test_page: 'tests/index.html?hidepassed', 5 | disable_watching: true, 6 | launch_in_ci: ['Chrome'], 7 | launch_in_dev: ['Chrome'], 8 | browser_start_timeout: 120, 9 | browser_args: { 10 | Chrome: { 11 | ci: [ 12 | // --no-sandbox is needed when running Chrome inside a container 13 | process.env.CI ? '--no-sandbox' : null, 14 | '--headless', 15 | '--disable-dev-shm-usage', 16 | '--disable-software-rasterizer', 17 | '--mute-audio', 18 | '--remote-debugging-port=0', 19 | '--window-size=1440,900', 20 | ].filter(Boolean), 21 | }, 22 | }, 23 | }; 24 | -------------------------------------------------------------------------------- /typedoc-theme/assets/css/main.sass: -------------------------------------------------------------------------------- 1 | @import constants 2 | @import theme 3 | 4 | @import vendors/normalize 5 | 6 | @import setup/mixins 7 | @import setup/grid 8 | @import setup/icons 9 | @import setup/animations 10 | @import setup/typography 11 | 12 | @import layouts/default 13 | @import layouts/minimal 14 | 15 | @import elements/comment 16 | @import elements/filter 17 | @import elements/footer 18 | @import elements/hierarchy 19 | @import elements/index 20 | @import elements/member 21 | @import elements/navigation 22 | @import elements/panel 23 | @import elements/search 24 | @import elements/signatures 25 | @import elements/sources 26 | @import elements/toolbar 27 | @import elements/images 28 | -------------------------------------------------------------------------------- /typedoc-theme/partials/members.hbs: -------------------------------------------------------------------------------- 1 | {{#if categories}} 2 | {{#each categories}} 3 | {{#unless allChildrenHaveOwnDocument}} 4 |
      5 |

      {{title}}

      6 | {{#each children}} 7 | {{#unless hasOwnDocument}} 8 | {{> member}} 9 | {{/unless}} 10 | {{/each}} 11 |
      12 | {{/unless}} 13 | {{/each}} 14 | {{else}} 15 | {{#each groups}} 16 | {{#unless allChildrenHaveOwnDocument}} 17 | {{> members.group}} 18 | {{/unless}} 19 | {{/each}} 20 | {{/if}} -------------------------------------------------------------------------------- /typedoc-theme/assets/css/elements/_sources.sass: -------------------------------------------------------------------------------- 1 | // Displays the source and inheritance information 2 | // 3 | // 9 | // 10 | .tsd-sources 11 | font-size: $FONT_SIZE_MONO 12 | color: var(--color-text-aside) 13 | margin: 0 0 1em 0 14 | 15 | a 16 | color: var(--color-text-aside) 17 | text-decoration: underline 18 | 19 | ul, p 20 | margin: 0 !important 21 | 22 | ul 23 | list-style: none 24 | padding: 0 25 | -------------------------------------------------------------------------------- /tests/dummy/app/components/widgets/widget-4/memo/body/index.css: -------------------------------------------------------------------------------- 1 | .body { 2 | background: linear-gradient(126deg, rgba(238, 255, 255, 0.5) 20%, rgba(248, 253, 255, 0.7) 80%); 3 | border-radius: 0.1875rem; 4 | height: 100%; 5 | } 6 | 7 | .message { 8 | overflow-y: auto; 9 | 10 | height: calc(100% - 1.5rem); 11 | padding: 0.75rem; 12 | width: calc(100% - 1.5rem); 13 | 14 | font-size: 0.8rem; 15 | line-height: 1.75; 16 | } 17 | 18 | .message a { 19 | color: #03a9f4; 20 | } 21 | 22 | 23 | :global(.memo)[at-narrow][at-short] .message { 24 | height: calc(100% - 1rem); 25 | padding: 0.5rem; 26 | width: calc(100% - 1rem); 27 | 28 | font-size: 0.75rem; 29 | line-height: 1.6; 30 | } 31 | -------------------------------------------------------------------------------- /tests/dummy/app/components/widgets/widget-2/index.js: -------------------------------------------------------------------------------- 1 | import Component from '@glimmer/component'; 2 | import { tracked } from '@glimmer/tracking'; 3 | import musicRevenue from 'dummy/data/music-revenue'; 4 | import { 5 | createDataForVisualization, 6 | createSummariesForCaptions, 7 | } from 'dummy/utils/widgets/widget-2'; 8 | 9 | export default class WidgetsWidget2Component extends Component { 10 | @tracked data = []; 11 | @tracked summaries = []; 12 | 13 | constructor() { 14 | super(...arguments); 15 | 16 | this.loadData(); 17 | } 18 | 19 | loadData() { 20 | this.data = createDataForVisualization(musicRevenue); 21 | this.summaries = createSummariesForCaptions(musicRevenue); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # How To Contribute 2 | 3 | ## Installation 4 | 5 | * `git clone ` 6 | * `cd ember-element-query` 7 | * `yarn install` 8 | 9 | ## Linting 10 | 11 | * `yarn lint` 12 | * `yarn lint:fix` 13 | 14 | ## Running tests 15 | 16 | * `ember test` – Runs the test suite on the current Ember version 17 | * `ember test --server` – Runs the test suite in "watch mode" 18 | * `ember try:each` – Runs the test suite against multiple Ember versions 19 | 20 | ## Running the dummy application 21 | 22 | * `ember serve` 23 | * Visit the dummy application at [http://localhost:4200](http://localhost:4200). 24 | 25 | For more information on using ember-cli, visit [https://ember-cli.com/](https://ember-cli.com/). 26 | -------------------------------------------------------------------------------- /tests/dummy/app/components/widgets/widget-2/index.hbs: -------------------------------------------------------------------------------- 1 | 8 |
      9 |

      Widget 2

      10 |
      11 | 12 | {{#unless CQ.features.short}} 13 |
      17 | 20 |
      21 | {{/unless}} 22 | 23 |
      27 | 30 |
      31 |
      32 | -------------------------------------------------------------------------------- /tests/dummy/public/material-design-icons/share-outlined-24px.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /typedoc-theme/partials/members.group.hbs: -------------------------------------------------------------------------------- 1 | {{#if categories}} 2 | {{#each categories}} 3 |
      4 |

      {{#if title}}{{title}} {{/if}}{{../title}}

      5 | {{#each children}} 6 | {{#unless hasOwnDocument}} 7 | {{> member}} 8 | {{/unless}} 9 | {{/each}} 10 |
      11 | {{/each}} 12 | {{else}} 13 |
      14 |

      {{title}}

      15 | {{#each children}} 16 | {{#unless hasOwnDocument}} 17 | {{> member}} 18 | {{/unless}} 19 | {{/each}} 20 |
      21 | {{/if}} -------------------------------------------------------------------------------- /typedoc-theme/assets/css/elements/_hierarchy.sass: -------------------------------------------------------------------------------- 1 | // Displays the type hierarchy 2 | // 3 | //
        4 | //
      • 5 | // Event 6 | // 15 | //
      • 16 | //
      17 | // 18 | .tsd-hierarchy 19 | list-style: square 20 | padding: 0 0 0 20px 21 | margin: 0 22 | 23 | .target 24 | font-weight: bold 25 | -------------------------------------------------------------------------------- /tests/dummy/app/components/widgets/widget-1/index.hbs: -------------------------------------------------------------------------------- 1 |
      8 |
      9 |

      Widget 1

      10 |
      11 | 12 |
      13 |
      14 | 17 |
      18 | 19 |
      20 | 23 |
      24 | 25 |
      26 | 29 |
      30 |
      31 |
      32 | -------------------------------------------------------------------------------- /tests/dummy/app/templates/not-found.hbs: -------------------------------------------------------------------------------- 1 | {{page-title "Page Not Found"}} 2 | 3 |
      4 |
      5 |

      404

      6 |
      7 | 8 |

      Feeling lost? Uncontained?

      9 |

      Don't worry. We all have our off days.

      10 | 11 |
      12 | 18 |
      19 |
      20 |
      21 | 22 | 25 |
      26 |
      27 |
      28 |
      -------------------------------------------------------------------------------- /tests/dummy/app/components/widgets/widget-4/memo/header/index.hbs: -------------------------------------------------------------------------------- 1 | {{#let 2 | (or @cqFeatures.small @cqFeatures.short) 3 | as |showMinimalLayout| 4 | }} 5 |
      9 | {{#unless showMinimalLayout}} 10 |
      11 | 18 |
      19 | {{/unless}} 20 | 21 |

      22 | Isaac Lee 23 |

      24 | 25 |
      26 | @ijlee2 · 38m 27 |
      28 |
      29 | {{/let}} 30 | -------------------------------------------------------------------------------- /tests/dummy/app/templates/dashboard.hbs: -------------------------------------------------------------------------------- 1 | {{page-title "Dashboard"}} 2 | 3 |
      4 |
      5 |

      Dashboard

      6 |
      7 | 8 |
      9 |
      10 | 11 |
      12 | 13 |
      14 | 15 |
      16 | 17 |
      18 | 19 |
      20 | 21 |
      22 | 23 |
      24 | 25 |
      26 | 27 |
      28 |
      29 |
      -------------------------------------------------------------------------------- /typedoc-theme/assets/css/_theme.scss: -------------------------------------------------------------------------------- 1 | // Default light theme 2 | :root { 3 | --color-background: #fdfdfd; 4 | --color-text: #222; 5 | --color-text-aside: #707070; 6 | --color-link: #4da6ff; 7 | 8 | --color-menu-divider: #eee; 9 | --color-menu-divider-focus: #000; 10 | --color-menu-label: #707070; 11 | 12 | --color-panel: #fff; 13 | --color-panel-divider: #eee; 14 | 15 | --color-comment-tag: #707070; 16 | --color-comment-tag-text: #fff; 17 | 18 | --color-code-background: rgba(#000, 0.04); 19 | 20 | --color-ts: #9600ff; 21 | --color-ts-interface: #647f1b; 22 | --color-ts-enum: #937210; 23 | --color-ts-class: #0672de; 24 | --color-ts-private: #707070; 25 | 26 | --color-toolbar: #fff; 27 | --color-toolbar-text: #333; 28 | } 29 | -------------------------------------------------------------------------------- /typedoc-theme/partials/comment.hbs: -------------------------------------------------------------------------------- 1 | {{#with comment}} 2 | {{#if hasVisibleComponent}} 3 |
      4 | {{#if shortText}} 5 |
      6 | {{#markdown}}{{{shortText}}}{{/markdown}} 7 |
      8 | {{/if}} 9 | {{#if text}} 10 | {{#markdown}}{{{text}}}{{/markdown}} 11 | {{/if}} 12 | {{#if tags}} 13 |
      14 | {{#each tags}} 15 |
      {{tagName}}
      16 |
      {{#markdown}}{{{text}}}{{/markdown}}
      17 | {{/each}} 18 |
      19 | {{/if}} 20 |
      21 | {{/if}} 22 | {{/with}} -------------------------------------------------------------------------------- /typedoc-theme/partials/member.hbs: -------------------------------------------------------------------------------- 1 |
      2 | 3 | {{#if name}} 4 |

      {{#each flags}}{{this}} {{/each}}{{{wbr name}}}

      5 | {{/if}} 6 | 7 | {{#if signatures}} 8 | {{> member.signatures}} 9 | {{else}}{{#if hasGetterOrSetter}} 10 | {{> member.getterSetter}} 11 | {{else}}{{#if isReference}} 12 | {{> member.reference}} 13 | {{else}} 14 | {{> member.declaration}} 15 | {{/if}}{{/if}}{{/if}} 16 | 17 | {{#each groups}} 18 | {{#each children}} 19 | {{#unless hasOwnDocument}} 20 | {{> member}} 21 | {{/unless}} 22 | {{/each}} 23 | {{/each}} 24 |
      25 | -------------------------------------------------------------------------------- /typedoc-theme/partials/footer.hbs: -------------------------------------------------------------------------------- 1 | 2 | 3 |
      4 |

      Legend

      5 |
      6 | {{#each legend}} 7 |
        8 | {{#each .}} 9 |
      • {{name}}
      • 10 | {{/each}} 11 |
      12 | {{/each}} 13 |
      14 |
      15 | 16 | 17 | {{#unless settings.hideGenerator}} 18 |
      19 |

      Generated using TypeDoc

      20 |
      21 | {{/unless}} -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | # compiled output 2 | /dist/ 3 | /tmp/ 4 | 5 | # dependencies 6 | /bower_components/ 7 | 8 | # Default boilerplate 9 | /.bowerrc 10 | /.editorconfig 11 | /.ember-cli 12 | /.env* 13 | /.eslintcache 14 | /.eslintignore 15 | /.eslintrc.js 16 | /.git/ 17 | /.gitignore 18 | /.prettierignore 19 | /.prettierrc.js 20 | /.template-lintrc.js 21 | /.travis.yml 22 | /.watchmanconfig 23 | /bower.json 24 | /config/ember-try.js 25 | /CONTRIBUTING.md 26 | /ember-cli-build.js 27 | /testem.js 28 | /tests/ 29 | /yarn.lock 30 | .gitkeep 31 | 32 | # ember-try 33 | /.node_modules.ember-try/ 34 | /bower.json.ember-try 35 | /package.json.ember-try 36 | 37 | # Custom boilerplate 38 | /.lintstagedrc.js 39 | /.prettierrc.js 40 | /jsconfig.json 41 | /tsconfig.json 42 | /tsconfig-node.json 43 | *.log 44 | 45 | # IDE 46 | /.idea/ 47 | /.vscode/ 48 | /.history/ 49 | -------------------------------------------------------------------------------- /typedoc-theme/partials/member.sources.hbs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/dummy/app/components/tracks/list/index.hbs: -------------------------------------------------------------------------------- 1 |
        8 | {{#each this.tracks as |track index|}} 9 |
      • 13 |
        14 | {{add index 1}}. 15 | 16 | {{track.name}} 17 | 18 |
        19 | 20 | {{#if track.isExplicit}} 21 | 25 | {{svg-jar "explicit-24px" local-class="icon-explicit"}} 26 | 27 | {{/if}} 28 |
      • 29 | {{/each}} 30 |
      -------------------------------------------------------------------------------- /tests/dummy/app/components/tracks/table/index.hbs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | {{#each @tracks as |track index|}} 13 | 14 | 17 | 20 | 23 | 26 | 27 | {{/each}} 28 | 29 |
      #TitleLengthExplicit
      15 | {{add index 1}} 16 | 18 | {{track.name}} 19 | 21 | {{track.length}} 22 | 24 | {{if track.isExplicit "Yes"}} 25 |
      -------------------------------------------------------------------------------- /typedoc-theme/assets/css/setup/_mixins.sass: -------------------------------------------------------------------------------- 1 | @mixin vendors($property, $value...) 2 | -webkit-#{$property}: $value 3 | -moz-#{$property}: $value 4 | -ms-#{$property}: $value 5 | -o-#{$property}: $value 6 | #{$property}: $value 7 | 8 | @mixin clearfix 9 | &:after 10 | visibility: hidden 11 | display: block 12 | content: "" 13 | clear: both 14 | height: 0 15 | 16 | @mixin retina 17 | @media (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 144dpi) 18 | & 19 | @content 20 | 21 | %prevent-children-margin 22 | > :first-child, 23 | > :first-child > :first-child, 24 | > :first-child > :first-child > :first-child 25 | margin-top: 0 26 | 27 | > :last-child, 28 | > :last-child > :last-child, 29 | > :last-child > :last-child > :last-child 30 | margin-bottom: 0 31 | -------------------------------------------------------------------------------- /.lintstagedrc.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = { 4 | // Run TSC on all the codebase. 5 | // Can't run TSC on individual files because we have two envs: Node and browser, 6 | // and TSC does not support providing a config and a path to a specific file at the same time. 7 | // Thus, two separate configs are used: one for Node, one for browser. 8 | // The function allows running the command globally, rather than once per each staged file. 9 | '{addon,addon-test-support,app,mirage,test-support,tests,types}/**/*.ts': () => 'yarn lint:ts -p tsconfig.json', 10 | '{*,.*,blueprints/*/*,config/**/*,lib/*/index,server/**/*}.{js,ts}': () => 'yarn lint:ts -p tsconfig-node.json', 11 | 12 | // Run ESLint, typescript-eslint and Prettier on staged files only 13 | '**/*.{js,ts}': ['yarn lint:eslint --fix'], 14 | 15 | // Template lint 16 | '**/*.hbs': ['yarn lint:hbs:fix'], 17 | }; 18 | -------------------------------------------------------------------------------- /tests/dummy/app/components/widgets/widget-4/memo/actions/index.hbs: -------------------------------------------------------------------------------- 1 |
      5 | 12 | 13 | 20 | 21 | 28 | 29 | 36 |
      37 | -------------------------------------------------------------------------------- /types/ember-modifier/index.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'ember-modifier' { 2 | export default class ClassBasedModifier { 3 | readonly args: Args; 4 | constructor(owner: unknown, args: Args); 5 | element: HTMLElement | null; 6 | didReceiveArguments(): void; 7 | didUpdateArguments(): void; 8 | didInstall(): void; 9 | willRemove(): void; 10 | willDestroy(): void; 11 | isDestroying: boolean; 12 | isDestroyed: boolean; 13 | } 14 | 15 | // https://github.com/ember-modifier/ember-modifier/blob/8e3bcd2c1e6cfd3669376c6e552fdff9b99a9670/addon/-private/interfaces.ts 16 | export interface ModifierArgs { 17 | /** Positional arguments to a modifier, `{{foo @bar this.baz}}` */ 18 | positional: unknown[]; 19 | /** Named arguments to a modifier, `{{foo bar=this.baz}}` */ 20 | named: Record; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /tests/dummy/app/components/widgets/widget-4/memo/body/index.hbs: -------------------------------------------------------------------------------- 1 |
      5 |
      6 |

      7 | Buffon’s needle is a classic Monte Carlo simulation that we can conduct in a classroom. 8 |

      9 |

      10 | We give the students, say 10 needles each, and have them drop the needles on a paper that we provide also. 11 |

      12 |

      13 | The paper is special, in that it has parallel lines that are separated by the length of a needle. 14 |

      15 |

      16 | Each student records how many needles intersect one of the lines, then we tally their numbers to arrive at a very special number. (Guess who?) 17 |

      18 |
      19 |
      20 | -------------------------------------------------------------------------------- /tests/dummy/app/templates/index.hbs: -------------------------------------------------------------------------------- 1 |
      2 |
      3 |

      ember-element-query demo

      4 |
      5 | 6 | 7 |

      Thanks for trying out ember-container-query.

      8 |

      To see what you can do with container queries, visit one of the examples and resize the window!

      9 | 10 |

      11 |

        12 |
      • Demo 1 "album"
      • 13 |
      • Demo 2 "dashboard"
      • 14 |
      15 |

      16 | 17 |
      18 |

      Credit

      19 | 20 |

      21 | This demo is borrowed from ember-container-query per @ijlee2's generous permission. 22 |

      23 |
      24 | -------------------------------------------------------------------------------- /typedoc-theme/assets/js/src/bootstrap.ts: -------------------------------------------------------------------------------- 1 | import { Application, registerComponent } from "./typedoc/Application"; 2 | import { MenuHighlight } from "./typedoc/components/MenuHighlight"; 3 | import { initSearch } from "./typedoc/components/Search"; 4 | import { Signature } from "./typedoc/components/Signature"; 5 | import { Toggle } from "./typedoc/components/Toggle"; 6 | import { Filter } from "./typedoc/components/Filter"; 7 | 8 | import "../../css/main.sass"; 9 | 10 | initSearch(); 11 | 12 | registerComponent(MenuHighlight, ".menu-highlight"); 13 | registerComponent(Signature, ".tsd-signatures"); 14 | registerComponent(Toggle, "a[data-toggle]"); 15 | 16 | if (Filter.isSupported()) { 17 | registerComponent(Filter, "#tsd-filter"); 18 | } else { 19 | document.documentElement.classList.add("no-filter"); 20 | } 21 | 22 | const app: Application = new Application(); 23 | 24 | Object.defineProperty(window, "app", { value: app }); 25 | -------------------------------------------------------------------------------- /typedoc-theme/assets/css/elements/_member.sass: -------------------------------------------------------------------------------- 1 | .tsd-flag 2 | display: inline-block 3 | padding: 1px 5px 4 | border-radius: 4px 5 | color: var(--color-comment-tag-text) 6 | background-color: var(--color-comment-tag) 7 | text-indent: 0 8 | font-size: $FONT_SIZE_MONO 9 | font-weight: normal 10 | 11 | .tsd-anchor 12 | position: absolute 13 | top: -100px 14 | 15 | .tsd-member 16 | position: relative 17 | 18 | .tsd-anchor + h3 19 | margin-top: 0 20 | margin-bottom: 0 21 | border-bottom: none 22 | 23 | a[data-tsd-kind] 24 | color: var(--color-ts) 25 | 26 | a[data-tsd-kind="Interface"] 27 | color: var(--color-ts-interface) 28 | 29 | a[data-tsd-kind="Enum"] 30 | color: var(--color-ts-enum) 31 | 32 | a[data-tsd-kind="Class"] 33 | color: var(--color-ts-class) 34 | 35 | a[data-tsd-kind="Private"] 36 | color: var(--color-ts-private) 37 | -------------------------------------------------------------------------------- /tests/dummy/app/components/widgets/widget-5/index.css: -------------------------------------------------------------------------------- 1 | .container { 2 | height: 100%; 3 | overflow: hidden; 4 | } 5 | 6 | .call-to-action { 7 | height: 100%; 8 | width: 100%; 9 | 10 | font-size: 0.8rem; 11 | line-height: 1.25; 12 | 13 | align-items: center; 14 | display: flex; 15 | flex-direction: column; 16 | justify-content: center; 17 | } 18 | 19 | .call-to-action p { 20 | margin: 0; 21 | } 22 | 23 | .call-to-action .highlight { 24 | font-family: monospace; 25 | } 26 | 27 | .call-to-action a { 28 | display: block; 29 | height: calc(100% - 2 * (0.2rem + 0.0625rem)); 30 | padding: 0.2rem 0.5rem; 31 | width: calc(100% - 2 * (0.5rem + 0.0625rem)); 32 | 33 | border: 0.0625rem solid white; 34 | text-decoration: none; 35 | } 36 | 37 | 38 | .container[at-tall] .call-to-action { 39 | font-size: 0.875rem; 40 | line-height: 1.75; 41 | } 42 | 43 | .container[at-narrow] .full-only, .container[at-short] .full-only { 44 | display: none; 45 | } 46 | -------------------------------------------------------------------------------- /tests/dummy/app/components/widgets/widget-3/tour-schedule/responsive-image/index.js: -------------------------------------------------------------------------------- 1 | import { action } from '@ember/object'; 2 | import Component from '@glimmer/component'; 3 | import { tracked } from '@glimmer/tracking'; 4 | import { findBestFittingImage } from 'dummy/utils/widgets/widget-3'; 5 | 6 | export default class WidgetsWidget3TourScheduleResponsiveImageComponent extends Component { 7 | @tracked src; 8 | 9 | @action setImageSource(eqInfo) { 10 | /* 11 | I added a guard just in case has yet to compute 12 | the container's width and height. We can check the aspect ratio 13 | to determine if all 3 dimensions are defined. 14 | 15 | In practice--at least, when I ran the app locally--all dimensions 16 | were defined by the time `setImageSource` was called. 17 | */ 18 | if (eqInfo?.ratio === undefined) { 19 | return; 20 | } 21 | 22 | this.src = findBestFittingImage(this.args.images, eqInfo); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /typedoc-theme/partials/navigation.hbs: -------------------------------------------------------------------------------- 1 | {{#if isVisible}} 2 | {{#if isLabel}} 3 |
    • 4 | {{{wbr title}}} 5 |
    • 6 | {{else}} 7 | {{#if isGlobals}} 8 |
    • 9 | {{{wbr title}}} 10 |
    • 11 | {{else}} 12 |
    • 13 | {{{wbr title}}} 14 | {{#if isInPath}} 15 | {{#if children}} 16 |
        17 | {{#each children}} 18 | {{> navigation}} 19 | {{/each}} 20 |
      21 | {{/if}} 22 | {{/if}} 23 |
    • 24 | {{/if}} 25 | {{/if}} 26 | {{/if}} 27 | -------------------------------------------------------------------------------- /tests/dummy/app/components/widgets/widget-1/index.css: -------------------------------------------------------------------------------- 1 | .container { 2 | display: flex; 3 | flex-direction: column; 4 | height: 100%; 5 | } 6 | 7 | .items { 8 | display: grid; 9 | grid-gap: 0.6rem; 10 | flex: 1; 11 | overflow: hidden; 12 | } 13 | 14 | .item-1 { 15 | grid-area: item-1; 16 | } 17 | 18 | .item-2 { 19 | grid-area: item-2; 20 | } 21 | 22 | .item-3 { 23 | grid-area: item-3; 24 | } 25 | 26 | .container[at-tall] .items { 27 | grid-template-areas: 28 | "item-1" 29 | "item-2" 30 | "item-3"; 31 | grid-template-columns: 1fr; 32 | grid-template-rows: repeat(3, 1fr); 33 | } 34 | 35 | .container[at-square] .items { 36 | grid-template-areas: 37 | "item-1 item-2" 38 | "item-3 item-3"; 39 | grid-template-columns: repeat(2, 1fr); 40 | grid-template-rows: repeat(2, 1fr); 41 | } 42 | 43 | .container[at-wide] .items { 44 | grid-template-areas: 45 | "item-1 item-2 item-3"; 46 | grid-template-columns: repeat(3, 1fr); 47 | grid-template-rows: 1fr; 48 | } 49 | -------------------------------------------------------------------------------- /tests/dummy/app/components/widgets/widget-4/memo/actions/index.css: -------------------------------------------------------------------------------- 1 | .actions { 2 | align-items: center; 3 | display: flex; 4 | justify-content: space-between; 5 | } 6 | 7 | .button { 8 | border: 0; 9 | border-radius: 50%; 10 | margin: 0; 11 | padding: 0; 12 | 13 | height: 2rem; 14 | width: 2rem; 15 | 16 | align-items: center; 17 | display: flex; 18 | justify-content: center; 19 | } 20 | 21 | .icon { 22 | fill: #03a9f4; 23 | height: 1.25rem; 24 | width: 1.25rem; 25 | } 26 | 27 | .icon-comment { 28 | transform: translate(0, 0) scale(-1, 1); 29 | } 30 | 31 | .icon-repost { 32 | transform: translate(0, 0) scale(-1, 1) rotate(90deg); 33 | } 34 | 35 | 36 | :global(.memo)[at-narrow][at-short] .button { 37 | height: 1.25rem; 38 | width: 1.25rem; 39 | } 40 | 41 | :global(.memo)[at-narrow][at-short] .button:hover { 42 | background: transparent; 43 | transition: none; 44 | } 45 | 46 | :global(.memo)[at-narrow][at-short] .icon { 47 | height: 0.875rem; 48 | width: 0.875rem; 49 | } 50 | -------------------------------------------------------------------------------- /tests/dummy/app/components/widgets/widget-3/tour-schedule/index.hbs: -------------------------------------------------------------------------------- 1 |
      10 |
      11 |
      12 | {{#if @concert.images}} 13 | 16 | 17 | {{else}} 18 |
      22 |
      23 | 24 | {{/if}} 25 |
      26 | 27 |
      28 | 31 |
      32 | 33 | 38 |
      39 |
      40 | -------------------------------------------------------------------------------- /tests/dummy/app/templates/application.hbs: -------------------------------------------------------------------------------- 1 | {{page-title "Ember Container Query"}} 2 | 3 |
      7 |
      8 | 16 |
      17 | 18 |
      19 |
      20 | {{outlet}} 21 |
      22 |
      23 | 24 | 30 |
      31 | -------------------------------------------------------------------------------- /typedoc-theme/partials/member.declaration.hbs: -------------------------------------------------------------------------------- 1 |
      {{#compact}} 2 | {{{wbr name}}} 3 | {{#if typeParameters}} 4 | < 5 | {{#each typeParameters}} 6 | {{#if @index}}, {{/if}} 7 | {{name}} 8 | {{/each}} 9 | > 10 | {{/if}} 11 | {{#if isOptional}}?{{/if}}: {{#with type}}{{>type}}{{/with}} 12 | {{#if defaultValue}} 13 | 14 |  =  15 | {{defaultValue}} 16 | 17 | {{/if}} 18 | {{/compact}}
      19 | 20 | {{> member.sources}} 21 | 22 | {{> comment}} 23 | 24 | {{#if typeParameters}} 25 |

      Type parameters

      26 | {{> typeParameters}} 27 | {{/if}} 28 | 29 | {{#if type.declaration}} 30 |
      31 |

      Type declaration

      32 | {{#with type.declaration}} 33 | {{> parameter}} 34 | {{/with}} 35 |
      36 | {{/if}} 37 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2020 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 10 | -------------------------------------------------------------------------------- /tests/dummy/app/components/navigation-menu/index.hbs: -------------------------------------------------------------------------------- 1 | 41 | -------------------------------------------------------------------------------- /typedoc-theme/assets/css/setup/_typography.sass: -------------------------------------------------------------------------------- 1 | body 2 | background: var(--color-background) 3 | font-family: $FONT_FAMILY 4 | font-size: $FONT_SIZE 5 | color: var(--color-text) 6 | 7 | a 8 | color: var(--color-link) 9 | text-decoration: none 10 | 11 | &:hover 12 | text-decoration: underline 13 | 14 | code, pre 15 | font-family: $FONT_FAMILY_MONO 16 | padding: 0.2em 17 | margin: 0 18 | font-size: $FONT_SIZE_MONO 19 | background-color: var(--color-code-background) 20 | 21 | pre 22 | padding: 10px 23 | 24 | code 25 | padding: 0 26 | font-size: 100% 27 | background-color: transparent 28 | 29 | blockquote 30 | margin: 1em 0 31 | padding-left: 1em 32 | border-left: 4px solid gray 33 | 34 | .tsd-typography 35 | line-height: $LINE_HEIGHT 36 | 37 | ul 38 | list-style: square 39 | padding: 0 0 0 20px 40 | margin: 0 41 | 42 | h4, h5, h6 43 | font-size: 1em 44 | margin: 0 45 | 46 | h5, h6 47 | font-weight: normal 48 | 49 | p, ul, ol 50 | margin: 1em 0 51 | -------------------------------------------------------------------------------- /tests/dummy/app/components/widgets/widget-4/memo/index.css: -------------------------------------------------------------------------------- 1 | .container { 2 | height: calc(100% - 1.2rem); 3 | padding: 0.6rem; 4 | width: calc(100% - 1.2rem); 5 | 6 | background: linear-gradient(36deg, rgba(179, 229, 252, 0.55) 35%, rgba(230, 255, 255, 0.825) 80%); 7 | border-radius: 0.1875rem; 8 | color: #455a64; 9 | 10 | display: flex; 11 | flex-direction: column; 12 | } 13 | 14 | .header-container { 15 | margin-bottom: 0.75rem; 16 | } 17 | 18 | .body-container { 19 | flex: 1; 20 | overflow: hidden; 21 | } 22 | 23 | .actions-container { 24 | margin-top: 0.5rem; 25 | height: 1.75rem; 26 | padding: 0 0.5rem; 27 | } 28 | 29 | 30 | .container[at-short] { 31 | height: calc(100% - 1rem); 32 | padding: 0.5rem; 33 | width: calc(100% - 1rem); 34 | } 35 | 36 | .container[at-short] .header-container { 37 | margin-bottom: 0.5rem; 38 | } 39 | 40 | .container[at-short] .body-container { 41 | max-height: 9rem; 42 | } 43 | 44 | .container[at-narrow] .actions-container, 45 | .container[at-narrow] .actions-container { 46 | margin-top: 0.25rem; 47 | height: 1rem; 48 | padding: 0 0.25rem; 49 | } 50 | -------------------------------------------------------------------------------- /typedoc-theme/assets/css/layouts/_minimal.sass: -------------------------------------------------------------------------------- 1 | html.minimal 2 | .container 3 | margin: 0 4 | 5 | .container-main 6 | padding-top: 50px 7 | padding-bottom: 0 8 | 9 | .content-wrap 10 | padding-left: 300px 11 | 12 | .tsd-navigation 13 | position: fixed !important 14 | overflow: auto 15 | -webkit-overflow-scrolling: touch 16 | box-sizing: border-box 17 | z-index: 1 18 | left: 0 19 | top: 40px 20 | bottom: 0 21 | width: 300px 22 | padding: 20px 23 | margin: 0 24 | 25 | .tsd-member .tsd-member 26 | margin-left: 0 27 | 28 | .tsd-page-toolbar 29 | position: fixed 30 | z-index: 2 31 | 32 | #tsd-filter .tsd-filter-group 33 | right: 0 34 | transform: none 35 | 36 | footer 37 | background-color: transparent 38 | 39 | .container 40 | padding: 0 41 | 42 | .tsd-generator 43 | padding: 0 44 | 45 | +size-xs-sm 46 | .tsd-navigation 47 | display: none 48 | .content-wrap 49 | padding-left: 0 50 | -------------------------------------------------------------------------------- /typedoc-theme/assets/css/setup/_animations.sass: -------------------------------------------------------------------------------- 1 | @keyframes fade-in 2 | from 3 | opacity: 0 4 | to 5 | opacity: 1 6 | 7 | @keyframes fade-out 8 | from 9 | opacity: 1 10 | visibility: visible 11 | to 12 | opacity: 0 13 | 14 | @keyframes fade-in-delayed 15 | 0% 16 | opacity: 0 17 | 33% 18 | opacity: 0 19 | 100% 20 | opacity: 1 21 | 22 | @keyframes fade-out-delayed 23 | 0% 24 | opacity: 1 25 | visibility: visible 26 | 66% 27 | opacity: 0 28 | 100% 29 | opacity: 0 30 | 31 | @keyframes shift-to-left 32 | from 33 | transform: translate(0,0) 34 | to 35 | transform: translate(-25%,0) 36 | 37 | @keyframes unshift-to-left 38 | from 39 | transform: translate(-25%,0) 40 | to 41 | transform: translate(0,0) 42 | 43 | @keyframes pop-in-from-right 44 | from 45 | transform: translate(100%,0) 46 | to 47 | transform: translate(0,0) 48 | 49 | @keyframes pop-out-to-right 50 | from 51 | transform: translate(0,0) 52 | visibility: visible 53 | to 54 | transform: translate(100%,0) 55 | -------------------------------------------------------------------------------- /tests/dummy/app/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Ember Container Query 10 | 11 | {{content-for "head"}} 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | {{content-for "head-footer"}} 20 | 21 | 22 | {{content-for "body"}} 23 | 24 | 25 | 26 | 27 | {{content-for "body-footer"}} 28 | 29 | 30 | -------------------------------------------------------------------------------- /tests/dummy/app/components/widgets/widget-2/captions/index.js: -------------------------------------------------------------------------------- 1 | import { action } from '@ember/object'; 2 | import { htmlSafe } from '@ember/template'; 3 | import Component from '@glimmer/component'; 4 | import { tracked } from '@glimmer/tracking'; 5 | 6 | export default class WidgetsWidget2CaptionsComponent extends Component { 7 | @tracked summary; 8 | @tracked currentIndex; 9 | 10 | get styleForMarker() { 11 | if (!this.summary) { 12 | return htmlSafe(''); 13 | } 14 | 15 | return htmlSafe(`fill: ${this.summary.markerColor};`); 16 | } 17 | 18 | get summaries() { 19 | return this.args.summaries ?? []; 20 | } 21 | 22 | get canShowPreviousButton() { 23 | return this.currentIndex > 0; 24 | } 25 | 26 | get canShowNextButton() { 27 | return this.currentIndex < this.summaries.length - 1; 28 | } 29 | 30 | @action showSummary() { 31 | this.summary = this.summaries[0]; 32 | this.currentIndex = 0; 33 | } 34 | 35 | @action showNextSummary(increment = 1) { 36 | const numSummaries = this.summaries.length; 37 | const nextIndex = (this.currentIndex + increment + numSummaries) % numSummaries; 38 | 39 | this.summary = this.summaries[nextIndex]; 40 | this.currentIndex = nextIndex; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /tests/dummy/app/components/widgets/widget-4/memo/header/index.css: -------------------------------------------------------------------------------- 1 | .header { 2 | display: grid; 3 | grid-gap: 0.25rem 0; 4 | grid-template-areas: 5 | "avatar-container name" 6 | "avatar-container metadata"; 7 | grid-template-columns: auto 1fr; 8 | grid-template-rows: auto auto; 9 | } 10 | 11 | .avatar-container { 12 | grid-area: avatar-container; 13 | margin-right: 0.5rem; 14 | 15 | display: grid; 16 | height: 2rem; 17 | width: 2rem; 18 | } 19 | 20 | .avatar { 21 | border-radius: 50%; 22 | height: 100%; 23 | object-fit: cover; 24 | width: 100%; 25 | } 26 | 27 | .name { 28 | grid-area: name; 29 | 30 | font-size: 0.875rem; 31 | font-weight: 700; 32 | margin: 0; 33 | } 34 | 35 | .metadata { 36 | grid-area: metadata; 37 | 38 | font-size: 0.8rem; 39 | } 40 | 41 | .handle { 42 | color: #03a9f4; 43 | text-decoration: none; 44 | } 45 | 46 | 47 | :global(.memo)[at-wide][at-short] .header { 48 | grid-gap: 0 0.6rem; 49 | grid-template-areas: 50 | "name metadata"; 51 | grid-template-columns: 1fr auto; 52 | grid-template-rows: 1fr; 53 | } 54 | 55 | :global(.memo)[at-narrow][at-short] .name { 56 | font-size: 0.8rem; 57 | } 58 | 59 | :global(.memo)[at-narrow][at-short] .metadata { 60 | font-size: 0.75rem; 61 | } 62 | -------------------------------------------------------------------------------- /typedoc-theme/assets/css/setup/_grid.sass: -------------------------------------------------------------------------------- 1 | =size-xs 2 | @media (max-width: 640px) 3 | & 4 | @content 5 | 6 | =size-sm 7 | @media (min-width: 641px) and (max-width: 900px) 8 | & 9 | @content 10 | 11 | =size-md 12 | @media (min-width: 901px) and (max-width: 1024px) 13 | & 14 | @content 15 | 16 | =size-lg 17 | @media (min-width: 1025px) 18 | & 19 | @content 20 | 21 | =size-xs-sm 22 | @media (max-width: 900px) 23 | & 24 | @content 25 | 26 | =size-md-lg 27 | @media (min-width: 901px) 28 | & 29 | @content 30 | 31 | .container 32 | max-width: 1200px 33 | margin: 0 auto 34 | padding: 0 40px 35 | 36 | +size-xs 37 | padding: 0 20px 38 | 39 | .container-main 40 | padding-bottom: 200px 41 | 42 | .row 43 | +clearfix 44 | display: flex 45 | position: relative 46 | margin: 0 -10px 47 | 48 | .col 49 | @extend %prevent-children-margin 50 | box-sizing: border-box 51 | float: left 52 | padding: 0 10px 53 | 54 | @for $width from 1 to 12 55 | .col-#{$width} 56 | @extend .col 57 | width: $width / 12 * 100% 58 | 59 | .offset-#{$width} 60 | margin-left: $width / 12 * 100% 61 | -------------------------------------------------------------------------------- /typedoc-theme/partials/member.getterSetter.hbs: -------------------------------------------------------------------------------- 1 |
        2 | {{#if getSignature}} 3 | {{#with getSignature}} 4 |
      • {{#compact}} 5 | get  6 | {{../name}} 7 | {{> member.signature.title hideName=true }} 8 | {{/compact}}
      • 9 | {{/with}} 10 | {{/if}} 11 | {{#if setSignature}} 12 | {{#with setSignature}} 13 |
      • {{#compact}} 14 | set  15 | {{../name}} 16 | {{> member.signature.title hideName=true }} 17 | {{/compact}}
      • 18 | {{/with}} 19 | {{/if}} 20 |
      21 | 22 |
        23 | {{#if getSignature}} 24 | {{#with getSignature}} 25 |
      • 26 | {{> member.signature.body }} 27 |
      • 28 | {{/with}} 29 | {{/if}} 30 | {{#if setSignature}} 31 | {{#with setSignature}} 32 |
      • 33 | {{> member.signature.body }} 34 |
      • 35 | {{/with}} 36 | {{/if}} 37 |
      38 | -------------------------------------------------------------------------------- /tests/dummy/app/styles/application.css: -------------------------------------------------------------------------------- 1 | .application { 2 | display: grid; 3 | grid-template-areas: 4 | ". header ." 5 | "main main main" 6 | ". footer ."; 7 | grid-template-columns: 1fr minmax(auto, 75rem) 1fr; 8 | grid-template-rows: auto 1fr auto; 9 | height: 100%; 10 | overflow: hidden; 11 | width: 100vw; 12 | } 13 | 14 | .application.no-focus-outline *:focus { 15 | outline: 0; 16 | } 17 | 18 | .header { 19 | grid-area: header; 20 | min-height: 2.75rem; 21 | overflow-x: auto; 22 | } 23 | 24 | .main { 25 | background-color: rgba(255, 255, 255, 0.045); 26 | border-bottom: 0.0625rem solid rgba(211, 211, 211, 0.15); 27 | border-top: 0.0625rem solid rgba(211, 211, 211, 0.15); 28 | grid-area: main; 29 | 30 | display: flex; 31 | flex: 1; 32 | justify-content: center; 33 | overflow-y: hidden; 34 | } 35 | 36 | .center { 37 | display: flex; 38 | flex-direction: column; 39 | max-width: 75rem; 40 | overflow-y: auto; 41 | width: 100%; 42 | } 43 | 44 | .footer { 45 | align-items: center; 46 | display: flex; 47 | grid-area: footer; 48 | justify-content: center; 49 | min-height: 2.375rem; 50 | } 51 | 52 | .copyright { 53 | color: rgba(128, 191, 255, 0.9); 54 | font-size: 0.75rem; 55 | padding: 0.75rem 0; 56 | } 57 | 58 | .copyright .link { 59 | color: rgba(128, 191, 255, 0.9); 60 | } -------------------------------------------------------------------------------- /typedoc-theme/assets/js/src/typedoc/EventTarget.ts: -------------------------------------------------------------------------------- 1 | export interface IEventListener { 2 | (evt: CustomEvent): void; 3 | } 4 | 5 | /** 6 | * TypeDoc event target class. 7 | */ 8 | export class EventTarget { 9 | private listeners: Record[]> = {}; 10 | 11 | public addEventListener(type: string, callback: IEventListener) { 12 | if (!(type in this.listeners)) { 13 | this.listeners[type] = []; 14 | } 15 | this.listeners[type].push(callback); 16 | } 17 | 18 | public removeEventListener(type: string, callback: IEventListener) { 19 | if (!(type in this.listeners)) { 20 | return; 21 | } 22 | const stack = this.listeners[type]; 23 | for (let i = 0, l = stack.length; i < l; i++) { 24 | if (stack[i] === callback) { 25 | stack.splice(i, 1); 26 | return; 27 | } 28 | } 29 | } 30 | 31 | public dispatchEvent(event: CustomEvent) { 32 | if (!(event.type in this.listeners)) { 33 | return true; 34 | } 35 | const stack = this.listeners[event.type].slice(); 36 | 37 | for (let i = 0, l = stack.length; i < l; i++) { 38 | stack[i].call(this, event); 39 | } 40 | return !event.defaultPrevented; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /tests/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Dummy Tests 7 | 8 | 9 | 10 | {{content-for "head"}} 11 | {{content-for "test-head"}} 12 | 13 | 14 | 15 | 16 | 17 | {{content-for "head-footer"}} 18 | {{content-for "test-head-footer"}} 19 | 20 | 21 | {{content-for "body"}} 22 | {{content-for "test-body"}} 23 | 24 |
      25 |
      26 |
      27 |
      28 |
      29 |
      30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | {{content-for "body-footer"}} 38 | {{content-for "test-body-footer"}} 39 | 40 | 41 | -------------------------------------------------------------------------------- /typedoc-theme/partials/member.signature.title.hbs: -------------------------------------------------------------------------------- 1 | {{#unless hideName}} 2 | {{{wbr name}}} 3 | {{else}} {{! This ugliness goes away when we stop naming constructor signatures "new X"}} 4 | {{#ifCond kindString "===" "Constructor signature"}} 5 | {{#if flags.isAbstract}} 6 | abstract 7 | {{/if}} 8 | new 9 | {{/ifCond}} 10 | {{/unless}} 11 | {{#if typeParameters}} 12 | < 13 | {{#each typeParameters}} 14 | {{#if @index}}, {{/if}} 15 | {{name}} 16 | {{/each}} 17 | > 18 | {{/if}} 19 | ( 20 | {{#each parameters}} 21 | {{#if @index}}, {{/if}} 22 | {{#if flags.isRest}}...{{/if}} 23 | {{name}} 24 | 25 | {{#if flags.isOptional}}?{{/if}} 26 | {{#if defaultValue}}?{{/if}} 27 | :  28 | 29 | {{#with type}}{{>type}}{{/with}} 30 | {{/each}} 31 | ) 32 | {{#if type}} 33 | {{#if arrowStyle}} 34 | => 35 | {{else}} 36 | : 37 | {{/if}} 38 | {{#with type}} 39 | {{>type}} 40 | {{/with}} 41 | {{/if}} 42 | -------------------------------------------------------------------------------- /typedoc-theme/assets/js/src/typedoc/Application.ts: -------------------------------------------------------------------------------- 1 | import { IComponentOptions } from "./Component"; 2 | 3 | /** 4 | * Component definition. 5 | */ 6 | export interface IComponent { 7 | constructor: new (options: IComponentOptions) => unknown; 8 | selector: string; 9 | } 10 | 11 | /** 12 | * List of all known components. 13 | */ 14 | const components: IComponent[] = []; 15 | 16 | /** 17 | * Register a new component. 18 | */ 19 | export function registerComponent( 20 | constructor: IComponent["constructor"], 21 | selector: string 22 | ) { 23 | components.push({ 24 | selector: selector, 25 | constructor: constructor, 26 | }); 27 | } 28 | 29 | /** 30 | * TypeDoc application class. 31 | */ 32 | export class Application { 33 | /** 34 | * Create a new Application instance. 35 | */ 36 | constructor() { 37 | this.createComponents(document.body); 38 | } 39 | 40 | /** 41 | * Create all components beneath the given jQuery element. 42 | */ 43 | public createComponents(context: HTMLElement) { 44 | components.forEach((c) => { 45 | context.querySelectorAll(c.selector).forEach((el) => { 46 | if (!el.dataset.hasInstance) { 47 | new c.constructor({ el: el }); 48 | el.dataset.hasInstance = String(true); 49 | } 50 | }); 51 | }); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /tests/dummy/app/data/album.js: -------------------------------------------------------------------------------- 1 | export default { 2 | name: 'How to Be a Human Being', 3 | publicationDate: '2016', 4 | totalLengthInMinutes: 43, 5 | band: { 6 | name: 'Glass Animals', 7 | }, 8 | tracks: [ 9 | { 10 | name: 'Life Itself', 11 | length: '4:41', 12 | isExplicit: false, 13 | }, 14 | { 15 | name: 'Youth', 16 | length: '3:51', 17 | isExplicit: false, 18 | }, 19 | { 20 | name: 'Season 2 Episode 3', 21 | length: '4:04', 22 | isExplicit: false, 23 | }, 24 | { 25 | name: 'Pork Soda', 26 | length: '4:14', 27 | isExplicit: true, 28 | }, 29 | { 30 | name: "Mama's Gun", 31 | length: '4:27', 32 | isExplicit: false, 33 | }, 34 | { 35 | name: 'Cane Shuga', 36 | length: '3:17', 37 | isExplicit: false, 38 | }, 39 | { 40 | name: '[Premade Sandwiches]', 41 | length: '0:36', 42 | isExplicit: true, 43 | }, 44 | { 45 | name: 'The Other Side of Paradise', 46 | length: '5:21', 47 | isExplicit: true, 48 | }, 49 | { 50 | name: 'Take a Slice', 51 | length: '3:50', 52 | isExplicit: true, 53 | }, 54 | { 55 | name: 'Poplar St', 56 | length: '4:23', 57 | isExplicit: false, 58 | }, 59 | { 60 | name: 'Agnes', 61 | length: '4:32', 62 | isExplicit: true, 63 | }, 64 | ], 65 | }; 66 | -------------------------------------------------------------------------------- /tests/dummy/app/styles/album.css: -------------------------------------------------------------------------------- 1 | .album-page { 2 | position: relative; 3 | width: 100%; 4 | height: 100%; 5 | } 6 | 7 | .container { 8 | display: grid; 9 | grid-template-areas: 10 | "album-header" 11 | "album-tracks" 12 | "track-lyrics"; 13 | grid-template-columns: 1fr; 14 | grid-template-rows: auto 1fr 0; 15 | height: calc(100% - 3rem); 16 | padding: 1.5rem 1rem; 17 | } 18 | 19 | .album-header { 20 | grid-area: album-header; 21 | } 22 | 23 | .album-tracks { 24 | grid-area: album-tracks; 25 | margin-top: 1rem; 26 | margin-bottom: 2rem; 27 | } 28 | 29 | .track-lyrics { 30 | display: none; 31 | grid-area: track-lyrics; 32 | overflow-y: auto; 33 | padding-right: 1rem; 34 | } 35 | 36 | .album-page[from-wide][from-tall] .track-lyrics { 37 | display: block; 38 | } 39 | 40 | .track-lyrics .heading-2 { 41 | font-size: 1.25rem; 42 | font-weight: 700; 43 | margin-bottom: 0.75rem; 44 | } 45 | 46 | .track-lyrics .heading-3 { 47 | color: goldenrod; 48 | } 49 | 50 | .track-lyrics .lyrics { 51 | font-size: 0.8rem; 52 | line-height: 1.75; 53 | } 54 | 55 | 56 | .album-page[from-wide][from-tall] .container { 57 | grid-column-gap: 2rem; 58 | grid-template-areas: 59 | "album-header track-lyrics" 60 | "album-tracks track-lyrics"; 61 | grid-template-columns: 1fr 18rem; 62 | grid-template-rows: auto 1fr; 63 | overflow-y: hidden; 64 | } 65 | 66 | 67 | .album-page[from-wide][from-tall] .album-tracks { 68 | margin-bottom: 0; 69 | overflow-y: auto; 70 | } 71 | -------------------------------------------------------------------------------- /tests/dummy/config/environment.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = function (environment) { 4 | const ENV = { 5 | modulePrefix: 'dummy', 6 | environment, 7 | rootURL: '/', 8 | locationType: 'hash', 9 | EmberENV: { 10 | FEATURES: { 11 | // Here you can enable experimental features on an ember canary build 12 | // e.g. EMBER_NATIVE_DECORATOR_SUPPORT: true 13 | }, 14 | EXTEND_PROTOTYPES: { 15 | // Prevent Ember Data from overriding Date.parse. 16 | Date: false, 17 | }, 18 | }, 19 | 20 | APP: { 21 | // Here you can pass flags/options to your application instance 22 | // when it is created 23 | }, 24 | }; 25 | 26 | if (environment === 'development') { 27 | // ENV.APP.LOG_RESOLVER = true; 28 | // ENV.APP.LOG_ACTIVE_GENERATION = true; 29 | // ENV.APP.LOG_TRANSITIONS = true; 30 | // ENV.APP.LOG_TRANSITIONS_INTERNAL = true; 31 | // ENV.APP.LOG_VIEW_LOOKUPS = true; 32 | } 33 | 34 | if (environment === 'test') { 35 | // Testem prefers this... 36 | ENV.locationType = 'none'; 37 | 38 | // keep test console output quieter 39 | ENV.APP.LOG_ACTIVE_GENERATION = false; 40 | ENV.APP.LOG_VIEW_LOOKUPS = false; 41 | 42 | ENV.APP.rootElement = '#ember-testing'; 43 | ENV.APP.autoboot = false; 44 | } 45 | 46 | if (environment === 'production') { 47 | // here you can enable a production-specific feature 48 | ENV.rootURL = '/ember-element-query/'; 49 | } 50 | 51 | return ENV; 52 | }; 53 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es2017", 4 | "allowJs": true, 5 | "moduleResolution": "node", 6 | "allowSyntheticDefaultImports": true, 7 | "noImplicitAny": true, 8 | "noImplicitThis": true, 9 | "alwaysStrict": true, 10 | "strictNullChecks": true, 11 | "strictPropertyInitialization": true, 12 | "noFallthroughCasesInSwitch": true, 13 | "noUnusedLocals": true, 14 | "noUnusedParameters": true, 15 | "noImplicitReturns": true, 16 | "noEmitOnError": false, 17 | "noEmit": true, 18 | "inlineSourceMap": true, 19 | "inlineSources": true, 20 | "baseUrl": ".", 21 | "module": "es6", 22 | "experimentalDecorators": true, 23 | "paths": { 24 | "dummy/tests/*": [ 25 | "tests/*" 26 | ], 27 | "dummy/*": [ 28 | "tests/dummy/app/*", 29 | "app/*" 30 | ], 31 | "ember-element-query": [ 32 | "addon" 33 | ], 34 | "ember-element-query/*": [ 35 | "addon/*" 36 | ], 37 | "ember-element-query/test-support": [ 38 | "addon-test-support" 39 | ], 40 | "ember-element-query/test-support/*": [ 41 | "addon-test-support/*" 42 | ], 43 | "*": [ 44 | "types/*" 45 | ] 46 | } 47 | }, 48 | "include": [ 49 | "addon/**/*", 50 | "addon-test-support/**/*", 51 | "app/**/*", 52 | "test-support/**/*", 53 | "tests/**/*", 54 | "types/**/*" 55 | ], 56 | "exclude": [ 57 | "tests/dummy/config/**" 58 | ] 59 | } 60 | -------------------------------------------------------------------------------- /typedoc-theme/assets/css/elements/_comment.sass: -------------------------------------------------------------------------------- 1 | // Displays all regular comment tags 2 | // 3 | //
      4 | //
      see
      5 | //

      Dispatcher.EVENT_BEGIN

      6 | //
      see
      7 | //

      Dispatcher.EVENT_BEGIN_RESOLVE

      8 | //
      see
      9 | //

      Dispatcher.EVENT_END_RESOLVE

      10 | //
      11 | // 12 | dl.tsd-comment-tags 13 | overflow: hidden 14 | 15 | dt 16 | float: left 17 | padding: 1px 5px 18 | margin: 0 10px 0 0 19 | border-radius: 4px 20 | border: 1px solid var(--color-comment-tag) 21 | color: var(--color-comment-tag) 22 | font-size: 0.8em 23 | font-weight: normal 24 | 25 | dd 26 | margin: 0 0 10px 0 27 | 28 | &:before, &:after 29 | display: table 30 | content: " " 31 | pre, &:after 32 | clear: both 33 | 34 | p 35 | margin: 0 36 | 37 | // Special formatting for the main reflection on each page. 38 | // 39 | //
      40 | //
      41 | //

      The default TypeDoc main application class.

      42 | //

      This class holds the two main components of TypeDoc, the Dispatcher and the Renderer.

      43 | //
      44 | //
      45 | // 46 | .tsd-panel.tsd-comment .lead 47 | font-size: 1.1em 48 | line-height: $LINE_HEIGHT 49 | margin-bottom: 2em 50 | 51 | &:last-child 52 | margin-bottom: 0 53 | -------------------------------------------------------------------------------- /tests/dummy/app/styles/app.css: -------------------------------------------------------------------------------- 1 | html { 2 | font-size: 16px; 3 | height: 100%; 4 | } 5 | 6 | body { 7 | background-color: #020e1c; 8 | color: rgba(247, 252, 251, 0.9); 9 | font-family: "Raleway", sans-serif; 10 | font-weight: 400; 11 | height: 100%; 12 | letter-spacing: 0.03125rem; 13 | margin: 0; 14 | } 15 | 16 | * { 17 | margin: 0; 18 | padding: 0; 19 | } 20 | 21 | h1 { 22 | font-size: 2.25em; 23 | font-weight: 700; 24 | margin-bottom: 1.5rem; 25 | } 26 | 27 | h2 { 28 | font-size: 1.5rem; 29 | font-weight: 700; 30 | margin-bottom: 1rem; 31 | } 32 | 33 | h3 { 34 | font-size: 1.25rem; 35 | font-weight: 700; 36 | margin-bottom: 0.75rem; 37 | } 38 | 39 | a { 40 | color: rgba(245, 255, 250, 0.88); 41 | } 42 | 43 | button { 44 | background: transparent; 45 | border: 0.0625rem solid rgba(247, 252, 251, 0.5); 46 | border-radius: 0.15rem; 47 | color: rgba(247, 252, 251, 0.9); 48 | font-family: "Raleway", sans-serif; 49 | font-size: 0.875rem; 50 | padding: 0.25rem 0.5rem; 51 | } 52 | 53 | button:hover { 54 | background-color: rgba(255, 255, 255, 0.225); 55 | cursor: pointer; 56 | transition: background-color 0.17s; 57 | } 58 | 59 | p { 60 | margin-bottom: 0.75rem; 61 | } 62 | 63 | table { 64 | border-collapse: collapse; 65 | width: 100%; 66 | } 67 | 68 | th, td { 69 | border: 0.0625rem solid rgba(112, 128, 144, 1); 70 | padding: 0.25rem 0.5rem; 71 | } 72 | 73 | ul { 74 | list-style-type: none; 75 | } 76 | 77 | :global(#ember-testing-container) { 78 | background-color: #020e1c !important; 79 | border: 0.0625rem solid rgba(211, 211, 211, 0.15) !important; 80 | overflow: visible !important; 81 | } -------------------------------------------------------------------------------- /tsconfig-node.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es2017", 4 | "allowJs": true, 5 | "moduleResolution": "node", 6 | "allowSyntheticDefaultImports": true, 7 | "noImplicitAny": true, 8 | "noImplicitThis": true, 9 | "alwaysStrict": true, 10 | "strictNullChecks": true, 11 | "strictPropertyInitialization": true, 12 | "noFallthroughCasesInSwitch": true, 13 | "noUnusedLocals": true, 14 | "noUnusedParameters": true, 15 | "noImplicitReturns": true, 16 | "noEmitOnError": false, 17 | "noEmit": true, 18 | "inlineSourceMap": true, 19 | "inlineSources": true, 20 | "baseUrl": ".", 21 | "module": "es6", 22 | "experimentalDecorators": true, 23 | "paths": { 24 | "dummy/tests/*": [ 25 | "tests/*" 26 | ], 27 | "dummy/*": [ 28 | "tests/dummy/app/*", 29 | "app/*" 30 | ], 31 | "ember-element-query": [ 32 | "addon" 33 | ], 34 | "ember-element-query/*": [ 35 | "addon/*" 36 | ], 37 | "ember-element-query/test-support": [ 38 | "addon-test-support" 39 | ], 40 | "ember-element-query/test-support/*": [ 41 | "addon-test-support/*" 42 | ], 43 | "*": [ 44 | "types/*" 45 | ] 46 | } 47 | }, 48 | "include": [ 49 | ".ember-cli.js", 50 | ".eslintrc.js", 51 | ".lintstagedrc.js", 52 | ".template-lintrc.js", 53 | "ember-cli-build.js", 54 | "index.js", 55 | "testem.js", 56 | "blueprints/*/index.js", 57 | "config/**/*.js", 58 | "lib/*/index.js", 59 | "server/**/*.js", 60 | "tests/dummy/config/**/*.js" 61 | ] 62 | } 63 | -------------------------------------------------------------------------------- /typedoc-theme/assets/css/elements/_filter.sass: -------------------------------------------------------------------------------- 1 | // Classes set on the body to control the visible state of the filtered elements 2 | // 3 | .toggle-protected .tsd-is-private 4 | display: none 5 | 6 | .toggle-public .tsd-is-private, 7 | .toggle-public .tsd-is-protected, 8 | .toggle-public .tsd-is-private-protected 9 | display: none 10 | 11 | .toggle-inherited .tsd-is-inherited 12 | display: none 13 | 14 | .toggle-externals .tsd-is-external 15 | display: none 16 | 17 | // Filter Buttons in the toolbar 18 | // 19 | #tsd-filter 20 | position: relative 21 | display: inline-block 22 | height: $TOOLBAR_HEIGHT 23 | vertical-align: bottom 24 | 25 | .no-filter & 26 | display: none 27 | 28 | .tsd-filter-group 29 | display: inline-block 30 | height: $TOOLBAR_HEIGHT 31 | vertical-align: bottom 32 | white-space: nowrap 33 | 34 | input 35 | display: none 36 | 37 | +size-xs-sm 38 | .tsd-filter-group 39 | display: block 40 | position: absolute 41 | top: $TOOLBAR_HEIGHT 42 | right: 20px 43 | height: auto 44 | background-color: var(--color-panel) 45 | visibility: hidden 46 | transform: translate(50%,0) 47 | box-shadow: 0 0 4px rgba(#000, 0.25) 48 | 49 | .has-options & 50 | visibility: visible 51 | 52 | .to-has-options & 53 | animation: fade-in 0.2s 54 | 55 | .from-has-options & 56 | animation: fade-out 0.2s 57 | 58 | label, 59 | .tsd-select 60 | display: block 61 | padding-right: 20px 62 | -------------------------------------------------------------------------------- /tests/dummy/app/utils/widgets/widget-3.js: -------------------------------------------------------------------------------- 1 | /* 2 | This recommendation system makes 3 assumptions: 3 | 4 | - Users prefer images whose aspect ratio is close to the container's. 5 | - Users prefer images whose height and width are larger than the container's. 6 | - If all images are smaller than the container, users want the image that is 7 | the largest of all. In other words, that image's height and width match the 8 | container's the closest. 9 | */ 10 | export function findBestFittingImage(images, eqInfo) { 11 | if (images.length === 0) { 12 | return; 13 | } 14 | 15 | const { aspectRatio: ratio, height, width } = eqInfo; 16 | 17 | const imagesRanked = images 18 | .map((image) => { 19 | const { url, metadata } = image; 20 | 21 | const imageHeight = metadata.height; 22 | const imageWidth = metadata.width; 23 | const imageAspectRatio = imageWidth / imageHeight; 24 | 25 | const arMetric = Math.abs(imageAspectRatio - ratio); 26 | const hwMetric = ((imageHeight - height) ** 3 + (imageWidth - width) ** 3) ** (1 / 3); 27 | const hwTiebreaker = ((imageHeight - height) ** 2 + (imageWidth - width) ** 2) ** (1 / 2); 28 | 29 | return { 30 | url, 31 | arMetric, 32 | hwMetric: Number.isNaN(hwMetric) ? Infinity : hwMetric, 33 | hwTiebreaker, 34 | }; 35 | }) 36 | .sort((a, b) => { 37 | if (a.arMetric > b.arMetric) return 1; 38 | if (a.arMetric < b.arMetric) return -1; 39 | 40 | if (a.hwMetric > b.hwMetric) return 1; 41 | if (a.hwMetric < b.hwMetric) return -1; 42 | 43 | return a.hwTiebreaker - b.hwTiebreaker; 44 | }); 45 | 46 | return imagesRanked[0].url; 47 | } 48 | -------------------------------------------------------------------------------- /typedoc-theme/layouts/default.hbs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | {{#ifCond model.name '==' project.name}}{{project.name}}{{else}}{{model.name}} | {{project.name}}{{/ifCond}} 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | {{> header}} 16 | 17 |
      18 |
      19 |
      20 | {{{contents}}} 21 |
      22 | 39 |
      40 |
      41 | 42 | {{> footer}} 43 | 44 |
      45 | 46 | 47 | {{> analytics}} 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /typedoc-theme/partials/typeAndParent.hbs: -------------------------------------------------------------------------------- 1 | {{#compact}} 2 | {{#if this}} 3 | {{#if elementType}} 4 | {{#with elementType}} 5 | {{> typeAndParent}} 6 | {{/with}} 7 | [] 8 | {{else}} 9 | {{#if reflection}} 10 | {{#ifSignature reflection}} 11 | {{#if reflection.parent.parent.url}} 12 | {{reflection.parent.parent.name}} 13 | {{else}} 14 | {{reflection.parent.parent.name}} 15 | {{/if}} 16 | . 17 | {{#if reflection.parent.url}} 18 | {{reflection.parent.name}} 19 | {{else}} 20 | {{reflection.parent.name}} 21 | {{/if}} 22 | {{else}} 23 | {{#if reflection.parent.url}} 24 | {{reflection.parent.name}} 25 | {{else}} 26 | {{reflection.parent.name}} 27 | {{/if}} 28 | . 29 | {{#if reflection.url}} 30 | {{reflection.name}} 31 | {{else}} 32 | {{reflection.name}} 33 | {{/if}} 34 | {{/ifSignature}} 35 | {{else}} 36 | {{this}} 37 | {{/if}} 38 | {{/if}} 39 | {{else}} 40 | void 41 | {{/if}} 42 | {{/compact}} -------------------------------------------------------------------------------- /tests/dummy/app/data/concert.js: -------------------------------------------------------------------------------- 1 | export default { 2 | name: 'ACL Live', 3 | date: 'Jun 01', 4 | location: { 5 | city: 'Austin', 6 | state: 'TX', 7 | }, 8 | images: [ 9 | { 10 | url: '/images/widgets/widget-3/venue-extra-wide@1x.jpg', 11 | metadata: { 12 | height: 150, 13 | width: 540, 14 | }, 15 | }, 16 | { 17 | url: '/images/widgets/widget-3/venue-extra-wide@2x.jpg', 18 | metadata: { 19 | height: 300, 20 | width: 1080, 21 | }, 22 | }, 23 | { 24 | url: '/images/widgets/widget-3/venue-extra-wide@4x.jpg', 25 | metadata: { 26 | height: 600, 27 | width: 2160, 28 | }, 29 | }, 30 | { 31 | url: '/images/widgets/widget-3/venue-square@1x.jpg', 32 | metadata: { 33 | height: 150, 34 | width: 150, 35 | }, 36 | }, 37 | { 38 | url: '/images/widgets/widget-3/venue-square@2x.jpg', 39 | metadata: { 40 | height: 300, 41 | width: 300, 42 | }, 43 | }, 44 | { 45 | url: '/images/widgets/widget-3/venue-square@4x.jpg', 46 | metadata: { 47 | height: 600, 48 | width: 600, 49 | }, 50 | }, 51 | { 52 | url: '/images/widgets/widget-3/venue-wide@1x.jpg', 53 | metadata: { 54 | height: 150, 55 | width: 300, 56 | }, 57 | }, 58 | { 59 | url: '/images/widgets/widget-3/venue-wide@2x.jpg', 60 | metadata: { 61 | height: 300, 62 | width: 600, 63 | }, 64 | }, 65 | { 66 | url: '/images/widgets/widget-3/venue-wide@4x.jpg', 67 | metadata: { 68 | height: 600, 69 | width: 1200, 70 | }, 71 | }, 72 | ], 73 | }; 74 | -------------------------------------------------------------------------------- /tests/dummy/app/styles/not-found.css: -------------------------------------------------------------------------------- 1 | .container { 2 | display: flex; 3 | flex-direction: column; 4 | height: calc(100% - 3rem); 5 | padding: 1.5rem 1rem; 6 | } 7 | 8 | .animation { 9 | flex: 1; 10 | margin: 2rem 0 1.5rem 0.75rem; 11 | } 12 | 13 | .metaphor { 14 | height: 4.5rem; 15 | width: 15rem; 16 | 17 | display: grid; 18 | grid-template-columns: repeat(10, 1fr); 19 | grid-template-rows: repeat(3, 1fr); 20 | } 21 | 22 | .mental-block { 23 | grid-column: 1; 24 | grid-row: 1; 25 | 26 | background-color: goldenrod; 27 | border-radius: 0.125rem; 28 | height: 1.5rem; 29 | width: 1.5rem; 30 | 31 | animation-duration: 2s; 32 | animation-iteration-count: infinite; 33 | animation-name: extend-right; 34 | } 35 | 36 | .the-next-idea { 37 | grid-column: 6 / 11; 38 | grid-row: 1 / 4; 39 | 40 | border: 0.0625rem solid white;; 41 | border-radius: 0.1875rem; 42 | height: calc(4.5rem - 2 * (0.2rem + 0.0625rem)); 43 | width: calc(100% - 2 * (0.5rem + 0.0625rem)); 44 | padding: 0.2rem 0.5rem; 45 | 46 | font-family: monospace; 47 | font-size: 0.875rem; 48 | line-height: 1.25; 49 | 50 | display: flex; 51 | align-items: center; 52 | } 53 | 54 | @keyframes extend-right { 55 | from { width: 1.5rem; } 56 | to { width: 10rem; } 57 | } 58 | 59 | 60 | .metaphor.small-layout { 61 | margin-left: 0; 62 | height: 12.5rem; 63 | width: 12.5rem; 64 | } 65 | 66 | .metaphor.small-layout .mental-block { 67 | height: 1.25rem; 68 | width: 1.25rem; 69 | 70 | animation-name: extend-right-variation-1; 71 | } 72 | 73 | .metaphor.small-layout .the-next-idea { 74 | height: calc(3.75rem - 2 * (0.2rem + 0.0625rem)); 75 | padding: 0.2rem 0.3rem; 76 | } 77 | 78 | @keyframes extend-right-variation-1 { 79 | from { width: 1.5rem; } 80 | to { width: 8rem; } 81 | } -------------------------------------------------------------------------------- /typedoc-theme/partials/member.signature.body.hbs: -------------------------------------------------------------------------------- 1 | {{#unless hideSources}} 2 | {{> member.sources}} 3 | {{/unless}} 4 | 5 | {{> comment}} 6 | 7 | {{#if typeParameters}} 8 |

      Type parameters

      9 | {{> typeParameters}} 10 | {{/if}} 11 | 12 | {{#if parameters}} 13 |

      Parameters

      14 |
        15 | {{#each parameters}} 16 |
      • 17 |
        {{#compact}} 18 | {{#each flags}} 19 | {{this}}  20 | {{/each}} 21 | {{#if flags.isRest}}...{{/if}} 22 | {{name}}:  23 | {{#with type}}{{>type}}{{/with}} 24 | {{#if defaultValue}} 25 | 26 |  =  27 | {{defaultValue}} 28 | 29 | {{/if}} 30 | {{/compact}}
        31 | 32 | {{> comment}} 33 | 34 | {{#if type.declaration}} 35 | {{#with type.declaration}} 36 | {{> parameter}} 37 | {{/with}} 38 | {{/if}} 39 |
      • 40 | {{/each}} 41 |
      42 | {{/if}} 43 | 44 | {{#if type}} 45 |

      Returns {{#compact}}{{#with type}}{{>type}}{{/with}}{{/compact}}

      46 | 47 | {{#if comment.returns}} 48 | {{#markdown}}{{{comment.returns}}}{{/markdown}} 49 | {{/if}} 50 | 51 | {{#if type.declaration}} 52 | {{#with type.declaration}} 53 | {{> parameter}} 54 | {{/with}} 55 | {{/if}} 56 | {{/if}} 57 | -------------------------------------------------------------------------------- /.github/workflows/github-pages.yml: -------------------------------------------------------------------------------- 1 | name: Deployment to GitHub Pages 2 | 3 | on: 4 | push: 5 | branches: 6 | - gen-4 7 | pull_request: 8 | 9 | env: 10 | NODE_VERSION: 14 11 | 12 | jobs: 13 | deploy: 14 | name: Deploy API docs 15 | runs-on: ubuntu-latest 16 | timeout-minutes: 7 17 | # Only run on pushes to gen-4 branch that aren't from the cron workflow 18 | if: github.event_name == 'push' && github.ref == 'refs/heads/gen-4' && contains(github.ref, 'cron') != true 19 | 20 | steps: 21 | - name: Check out a copy of the repo 22 | uses: actions/checkout@v2 23 | 24 | - name: Use Node.js ${{ env.NODE_VERSION }} 25 | uses: actions/setup-node@v2 26 | with: 27 | node-version: ${{ env.NODE_VERSION }} 28 | 29 | # - name: Get Yarn cache path 30 | # id: yarn-cache-dir-path 31 | # run: echo "::set-output name=dir::$(yarn cache dir)" 32 | 33 | # - name: Cache Yarn cache and node_modules 34 | # id: cache-dependencies 35 | # uses: actions/cache@v2 36 | # with: 37 | # path: | 38 | # ${{ steps.yarn-cache-dir-path.outputs.dir }} 39 | # node_modules 40 | # key: ${{ runner.os }}-${{ env.NODE_VERSION }}-${{ hashFiles('**/yarn.lock') }} 41 | # restore-keys: ${{ runner.os }}-${{ env.NODE_VERSION }}- 42 | 43 | - name: Log yarn version 44 | run: yarn --version 45 | 46 | - name: Install dependencies 47 | run: yarn install 48 | # if: steps.cache-dependencies.outputs.cache-hit != 'true' 49 | 50 | - name: Build demo 51 | run: yarn build 52 | 53 | - name: Build API docs 54 | run: yarn typedoc 55 | 56 | - name: Deploy 57 | uses: peaceiris/actions-gh-pages@v3 58 | with: 59 | github_token: ${{ secrets.GITHUB_TOKEN }} 60 | publish_dir: ./dist 61 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | 3 | on: 4 | push: 5 | branches: 6 | - gen-4 7 | tags: 8 | - '*' 9 | pull_request: 10 | schedule: 11 | - cron: '0 4 * * 5' # Fridays at 4am 12 | 13 | jobs: 14 | test: 15 | name: Tests 16 | runs-on: ubuntu-latest 17 | 18 | steps: 19 | - name: Checkout code 20 | uses: actions/checkout@v2 21 | - name: Setup node.js 22 | uses: actions/setup-node@v1 23 | with: 24 | node-version: 12 25 | - name: Install dependencies 26 | uses: bahmutov/npm-install@v1 27 | - name: Lint 28 | run: yarn lint 29 | - name: Test 30 | run: yarn test:ember 31 | 32 | test-no-lock: 33 | name: Floating Dependencies 34 | runs-on: ubuntu-latest 35 | needs: 36 | - test 37 | steps: 38 | - name: Checkout code 39 | uses: actions/checkout@v2 40 | - name: Setup node.js 41 | uses: actions/setup-node@v1 42 | with: 43 | node-version: 12 44 | - name: Install dependencies 45 | uses: bahmutov/npm-install@v1 46 | with: 47 | useLockFile: false 48 | - name: Test 49 | run: yarn test:ember 50 | 51 | test-try: 52 | name: Additional Tests 53 | runs-on: ubuntu-latest 54 | needs: 55 | - test 56 | strategy: 57 | matrix: 58 | scenario: 59 | - ember-lts-3.16 60 | - ember-lts-3.20 61 | - ember-release 62 | # - ember-beta 63 | # - ember-canary 64 | - ember-default-with-jquery 65 | - ember-classic 66 | steps: 67 | - name: Checkout code 68 | uses: actions/checkout@v2 69 | - name: Setup node.js 70 | uses: actions/setup-node@v1 71 | with: 72 | node-version: 12 73 | - name: Install dependencies 74 | uses: bahmutov/npm-install@v1 75 | - name: Test 76 | run: yarn ember try:one ${{ matrix.scenario }} 77 | -------------------------------------------------------------------------------- /tests/dummy/app/components/widgets/widget-3/tour-schedule/index.css: -------------------------------------------------------------------------------- 1 | .container { 2 | height: 100%; 3 | padding: 0 0.5rem; 4 | width: calc(100% - 1rem); 5 | 6 | display: grid; 7 | grid-template-areas: 8 | "splash" 9 | "."; 10 | grid-template-columns: 1fr; 11 | grid-template-rows: 1fr 0; 12 | } 13 | 14 | .splash { 15 | height: 100%; 16 | grid-area: splash; 17 | width: 100%; 18 | overflow: hidden; 19 | 20 | position: relative; 21 | } 22 | 23 | /* Splash image */ 24 | .splash-image-container { 25 | height: 100%; 26 | width: 100%; 27 | } 28 | 29 | .placeholder-image { 30 | background: linear-gradient(36deg, rgba(255, 224, 130, 0.4) 15%, rgba(255, 248, 225, 0.8) 90%); 31 | border-radius: 0.25rem; 32 | height: 100%; 33 | width: 100%; 34 | } 35 | 36 | /* Concert date */ 37 | .concert-date-container { 38 | position: absolute; 39 | left: 0; 40 | top: 0; 41 | 42 | height: calc(100% - 0.5rem); 43 | padding: 0.25rem 0.5rem; 44 | width: calc(100% - 1rem); 45 | } 46 | 47 | .concert-date { 48 | font-size: 1.25rem; 49 | font-weight: 700; 50 | } 51 | 52 | /* Venue name */ 53 | .venue-name-container { 54 | position: absolute; 55 | left: 0; 56 | top: 0; 57 | 58 | height: 100%; 59 | width: 100%; 60 | 61 | display: flex; 62 | align-items: center; 63 | justify-content: center; 64 | } 65 | 66 | .concert-link { 67 | display: block; 68 | height: 100%; 69 | width: 100%; 70 | 71 | font-size: 4rem; 72 | font-style: italic; 73 | font-weight: 700; 74 | letter-spacing: 0.25rem; 75 | text-decoration: none; 76 | text-transform: uppercase; 77 | } 78 | 79 | .venue-name { 80 | align-items: center; 81 | display: flex; 82 | height: 100%; 83 | justify-content: center; 84 | width: 100%; 85 | } 86 | 87 | 88 | .container[at-small] { 89 | padding: 0 0.25rem; 90 | width: calc(100% - 0.5rem); 91 | } 92 | 93 | .container[at-small] .concert-date { 94 | font-size: 1rem; 95 | font-weight: 400; 96 | } 97 | 98 | .container[at-small] .venue-name { 99 | font-size: 2.25rem; 100 | letter-spacing: 0.125rem; 101 | } 102 | -------------------------------------------------------------------------------- /config/ember-try.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const getChannelURL = require('ember-source-channel-url'); 4 | const { embroiderSafe, embroiderOptimized } = require('@embroider/test-setup'); 5 | 6 | module.exports = async function () { 7 | return { 8 | useYarn: true, 9 | scenarios: [ 10 | { 11 | name: 'ember-lts-3.16', 12 | npm: { 13 | devDependencies: { 14 | 'ember-source': '~3.16.0', 15 | }, 16 | }, 17 | }, 18 | { 19 | name: 'ember-lts-3.20', 20 | npm: { 21 | devDependencies: { 22 | 'ember-source': '~3.20.5', 23 | }, 24 | }, 25 | }, 26 | { 27 | name: 'ember-release', 28 | npm: { 29 | devDependencies: { 30 | 'ember-source': await getChannelURL('release'), 31 | }, 32 | }, 33 | }, 34 | { 35 | name: 'ember-beta', 36 | npm: { 37 | devDependencies: { 38 | 'ember-source': await getChannelURL('beta'), 39 | }, 40 | }, 41 | }, 42 | { 43 | name: 'ember-canary', 44 | npm: { 45 | devDependencies: { 46 | 'ember-source': await getChannelURL('canary'), 47 | }, 48 | }, 49 | }, 50 | { 51 | name: 'ember-default-with-jquery', 52 | env: { 53 | EMBER_OPTIONAL_FEATURES: JSON.stringify({ 54 | 'jquery-integration': true, 55 | }), 56 | }, 57 | npm: { 58 | devDependencies: { 59 | '@ember/jquery': '^1.1.0', 60 | }, 61 | }, 62 | }, 63 | { 64 | name: 'ember-classic', 65 | env: { 66 | EMBER_OPTIONAL_FEATURES: JSON.stringify({ 67 | 'application-template-wrapper': true, 68 | 'default-async-observers': false, 69 | 'template-only-glimmer-components': false, 70 | }), 71 | }, 72 | npm: { 73 | ember: { 74 | edition: 'classic', 75 | }, 76 | }, 77 | }, 78 | embroiderSafe(), 79 | embroiderOptimized(), 80 | ], 81 | }; 82 | }; 83 | -------------------------------------------------------------------------------- /typedoc-theme/assets/css/elements/_search.sass: -------------------------------------------------------------------------------- 1 | #tsd-search 2 | transition: background-color 0.2s 3 | 4 | .title 5 | position: relative 6 | z-index: 2 7 | 8 | .field 9 | position: absolute 10 | left: 0 11 | top: 0 12 | right: 40px 13 | height: 40px 14 | 15 | input 16 | box-sizing: border-box 17 | position: relative 18 | top: -50px 19 | z-index: 1 20 | width: 100% 21 | padding: 0 10px 22 | opacity: 0 23 | outline: 0 24 | border: 0 25 | background: transparent 26 | color: var(--color-text) 27 | 28 | label 29 | position: absolute 30 | overflow: hidden 31 | right: -40px 32 | 33 | .field input, 34 | .title 35 | transition: opacity 0.2s 36 | 37 | .results 38 | position: absolute 39 | visibility: hidden 40 | top: 40px 41 | width: 100% 42 | margin: 0 43 | padding: 0 44 | list-style: none 45 | box-shadow: 0 0 4px rgba(#000, 0.25) 46 | 47 | li 48 | padding: 0 10px 49 | background-color: var(--color-background) 50 | 51 | li:nth-child(even) 52 | background-color: var(--color-panel) 53 | 54 | li.state 55 | display: none 56 | 57 | li.current, 58 | li:hover 59 | background-color: var(--color-panel-divider) 60 | 61 | a 62 | display: block 63 | 64 | &:before 65 | top: 10px 66 | 67 | span.parent 68 | color: var(--color-text-aside) 69 | font-weight: normal 70 | 71 | &.has-focus 72 | background-color: var(--color-panel-divider) 73 | 74 | .field input 75 | top: 0 76 | opacity: 1 77 | 78 | .title 79 | z-index: 0 80 | opacity: 0 81 | 82 | .results 83 | visibility: visible 84 | 85 | &.loading .results li.state.loading 86 | display: block 87 | 88 | &.failure .results li.state.failure 89 | display: block 90 | -------------------------------------------------------------------------------- /typedoc-theme/assets/css/elements/_panel.sass: -------------------------------------------------------------------------------- 1 | // Displays a panel, an organisation unit in TypeDoc used to group single entities 2 | // like a method or a variable. 3 | // 4 | //
      5 | //

      Eirmod tempor invidunt

      6 | //

      Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat.

      7 | //
      8 | // 9 | .tsd-panel 10 | @extend %prevent-children-margin 11 | margin: 20px 0 12 | padding: 20px 13 | background-color: var(--color-panel) 14 | box-shadow: 0 0 4px rgba(#000, 0.25) 15 | 16 | &:empty 17 | display: none 18 | 19 | > h1, > h2, > h3 20 | margin: 1.5em -20px 10px -20px 21 | padding: 0 20px 10px 20px 22 | border-bottom: 1px solid var(--color-panel-divider) 23 | 24 | &.tsd-before-signature 25 | margin-bottom: 0 26 | border-bottom: 0 27 | 28 | table 29 | display: block 30 | width: 100% 31 | overflow: auto 32 | margin-top: 10px 33 | word-break: normal 34 | word-break: keep-all 35 | 36 | th 37 | font-weight: bold 38 | 39 | th, td 40 | padding: 6px 13px 41 | border: 1px solid #ddd 42 | 43 | tr 44 | background-color: #fff 45 | border-top: 1px solid #ccc 46 | 47 | &:nth-child(2n) 48 | background-color: #f8f8f8 49 | 50 | // Holds a series of panels with an optional heading. 51 | // 52 | //
      53 | //

      Consetetur sadipscing elitr

      54 | //
      55 | //

      Eirmod tempor invidunt

      56 | //

      Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat.

      57 | //
      58 | //
      59 | //

      Eirmod tempor invidunt

      60 | //

      Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat.

      61 | //
      62 | //
      63 | // 64 | .tsd-panel-group 65 | margin: 60px 0 66 | 67 | > h1, > h2, > h3 68 | padding-left: 20px 69 | padding-right: 20px 70 | -------------------------------------------------------------------------------- /RELEASE.md: -------------------------------------------------------------------------------- 1 | # Release Process 2 | 3 | Releases are mostly automated using 4 | [release-it](https://github.com/release-it/release-it/) and 5 | [lerna-changelog](https://github.com/lerna/lerna-changelog/). 6 | 7 | ## Preparation 8 | 9 | Since the majority of the actual release process is automated, the primary 10 | remaining task prior to releasing is confirming that all pull requests that 11 | have been merged since the last release have been labeled with the appropriate 12 | `lerna-changelog` labels and the titles have been updated to ensure they 13 | represent something that would make sense to our users. Some great information 14 | on why this is important can be found at 15 | [keepachangelog.com](https://keepachangelog.com/en/1.0.0/), but the overall 16 | guiding principle here is that changelogs are for humans, not machines. 17 | 18 | When reviewing merged PR's the labels to be used are: 19 | 20 | * breaking - Used when the PR is considered a breaking change. 21 | * enhancement - Used when the PR adds a new feature or enhancement. 22 | * bug - Used when the PR fixes a bug included in a previous release. 23 | * documentation - Used when the PR adds or updates documentation. 24 | * internal - Used for internal changes that still require a mention in the 25 | changelog/release notes. 26 | 27 | ## Release 28 | 29 | Once the prep work is completed, the actual release is straight forward: 30 | 31 | * First, ensure that you have installed your projects dependencies: 32 | 33 | ```sh 34 | yarn install 35 | ``` 36 | 37 | * Second, ensure that you have obtained a 38 | [GitHub personal access token][generate-token] with the `repo` scope (no 39 | other permissions are needed). Make sure the token is available as the 40 | `GITHUB_AUTH` environment variable. 41 | 42 | For instance: 43 | 44 | ```bash 45 | export GITHUB_AUTH=abc123def456 46 | ``` 47 | 48 | [generate-token]: https://github.com/settings/tokens/new?scopes=repo&description=GITHUB_AUTH+env+variable 49 | 50 | * And last (but not least 😁) do your release. 51 | 52 | ```sh 53 | npx release-it 54 | ``` 55 | 56 | [release-it](https://github.com/release-it/release-it/) manages the actual 57 | release process. It will prompt you to to choose the version number after which 58 | you will have the chance to hand tweak the changelog to be used (for the 59 | `CHANGELOG.md` and GitHub release), then `release-it` continues on to tagging, 60 | pushing the tag and commits, etc. 61 | -------------------------------------------------------------------------------- /typedoc-theme/partials/index.hbs: -------------------------------------------------------------------------------- 1 | {{#if categories}} 2 |
      3 |

      Index

      4 |
      5 |
      6 | {{#each categories}} 7 |
      8 |

      {{title}}

      9 | 14 |
      15 | {{/each}} 16 |
      17 |
      18 |
      19 | {{else}} 20 | {{#if groups}} 21 |
      22 |

      Index

      23 |
      24 |
      25 | {{#each groups}} 26 |
      27 | {{#if categories}} 28 | {{#each categories}} 29 |

      {{#if title}}{{title}} {{/if}}{{../title}}

      30 | 35 | {{/each}} 36 | {{else}} 37 |

      {{title}}

      38 | 43 | {{/if}} 44 |
      45 | {{/each}} 46 |
      47 |
      48 |
      49 | {{/if}} 50 | {{/if}} 51 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## v4.1.1 (2022-03-29) 2 | 3 | #### :bug: Bug Fix 4 | * [#48](https://github.com/lolmaus/ember-element-query/pull/48) Make ember-auto-import a dependency instead of devDependency ([@lolmaus](https://github.com/lolmaus)) 5 | 6 | #### Committers: 2 7 | - Alberto Cantú Gómez ([@betocantu93](https://github.com/betocantu93)) 8 | - Andrey Mikhaylov (lolmaus) ([@lolmaus](https://github.com/lolmaus)) 9 | 10 | 11 | ## v4.1.0 (2022-03-29) 12 | 13 | #### :bug: Bug Fix 14 | * [#45](https://github.com/lolmaus/ember-element-query/pull/45) Fix jumps of unstyled content and test freezes, credit to @simonihmig, Closes [#44](https://github.com/lolmaus/ember-element-query/issues/44) ([@lolmaus](https://github.com/lolmaus)) 15 | 16 | #### Committers: 1 17 | - Andrey Mikhaylov (lolmaus) ([@lolmaus](https://github.com/lolmaus)) 18 | 19 | 20 | ## v4.0.3 (2021-08-24) 21 | 22 | #### :bug: Bug Fix 23 | * [#36](https://github.com/lolmaus/ember-element-query/pull/36) Wait for initial element query attributes in tests, Closes [#35](https://github.com/lolmaus/ember-element-query/issues/35) ([@lolmaus](https://github.com/lolmaus)) 24 | 25 | #### Committers: 1 26 | - Andrey Mikhaylov (lolmaus) ([@lolmaus](https://github.com/lolmaus)) 27 | 28 | 29 | ## v4.0.2 (2021-08-12) 30 | 31 | #### :memo: Documentation 32 | * [#33](https://github.com/lolmaus/ember-element-query/pull/33) [docs] ember-container-query does not use ResizeObserver ([@lolmaus](https://github.com/lolmaus)) 33 | 34 | #### :house: Internal 35 | * [#34](https://github.com/lolmaus/ember-element-query/pull/34) Switch to ember-on-resize-modifier ([@lolmaus](https://github.com/lolmaus)) 36 | 37 | #### Committers: 1 38 | - Andrey Mikhaylov (lolmaus) ([@lolmaus](https://github.com/lolmaus)) 39 | 40 | ## v4.0.1 (2021-08-07) 41 | 42 | #### :memo: Documentation 43 | * [#31](https://github.com/lolmaus/ember-element-query/pull/31) Filled out the changelog ([@lolmaus](https://github.com/lolmaus)) 44 | * [#30](https://github.com/lolmaus/ember-element-query/pull/30) Fill out package.json ([@lolmaus](https://github.com/lolmaus)) 45 | 46 | #### Committers: 1 47 | - Andrey Mikhaylov (lolmaus) ([@lolmaus](https://github.com/lolmaus)) 48 | 49 | 50 | ## v4.0.0 (2021-08-07) 51 | 52 | First full-featured version of the second rewrite. 53 | 54 | 55 | ## v4.0.0-alpha.1 (2021-06-24) 56 | 57 | Complete rewrite! MVP. 58 | 59 | 60 | ## v2.0.0-alpha.0 - 2017-11-15 61 | 62 | Complete rewrite! 63 | 64 | 65 | 66 | ## v1.0.1 67 | 68 | ### Fixed 69 | - Removed stray `console.log`. 70 | 71 | 72 | 73 | ## v1.0.0 74 | 75 | Initial release. 76 | -------------------------------------------------------------------------------- /typedoc-theme/templates/reflection.hbs: -------------------------------------------------------------------------------- 1 | {{#with model}} 2 | {{#if hasComment}} 3 |
      4 | {{> comment}} 5 |
      6 | {{/if}} 7 | {{/with}} 8 | 9 | {{#if model.typeParameters}} 10 |
      11 |

      Type parameters

      12 | {{#with model}}{{> typeParameters}}{{/with}} 13 |
      14 | {{/if}} 15 | 16 | {{#if model.typeHierarchy}} 17 |
      18 |

      Hierarchy

      19 | {{#with model.typeHierarchy}}{{> hierarchy}}{{/with}} 20 |
      21 | {{/if}} 22 | 23 | {{#if model.implementedTypes}} 24 |
      25 |

      Implements

      26 |
        27 | {{#each model.implementedTypes}} 28 |
      • {{#compact}}{{> type}}{{/compact}}
      • 29 | {{/each}} 30 |
      31 |
      32 | {{/if}} 33 | 34 | {{#if model.implementedBy}} 35 |
      36 |

      Implemented by

      37 |
        38 | {{#each model.implementedBy}} 39 |
      • {{#compact}}{{> type}}{{/compact}}
      • 40 | {{/each}} 41 |
      42 |
      43 | {{/if}} 44 | 45 | {{#if model.signatures}} 46 |
      47 |

      Callable

      48 | {{#with model}}{{> member.signatures}}{{/with}} 49 |
      50 | {{/if}} 51 | 52 | {{#if model.indexSignature}} 53 |
      54 |

      Indexable

      55 |
      {{#compact}} 56 | [ 57 | {{#each model.indexSignature.parameters}} 58 | {{name}}: {{#with type}}{{>type}}{{/with}} 59 | {{/each}} 60 | ]:  61 | {{#with model.indexSignature.type}}{{>type}}{{/with}} 62 | {{/compact}}
      63 | 64 | {{#with model.indexSignature}} 65 | {{> comment}} 66 | {{/with}} 67 | 68 | {{#if model.indexSignature.type.declaration}} 69 | {{#with model.indexSignature.type.declaration}} 70 | {{> parameter}} 71 | {{/with}} 72 | {{/if}} 73 |
      74 | {{/if}} 75 | 76 | {{#with model}} 77 | {{> index}} 78 | {{> members}} 79 | {{/with}} 80 | -------------------------------------------------------------------------------- /typedoc-theme/assets/css/elements/_index.sass: -------------------------------------------------------------------------------- 1 | // Displays an index of grouped links. 2 | // 3 | //
      4 | //
      5 | //
      6 | //

      Constructor methods

      7 | // 10 | //
      11 | //
      12 | //

      Properties

      13 | // 19 | //
      20 | //
      21 | //
      22 | // 23 | .tsd-index-panel 24 | .tsd-index-content 25 | margin-bottom: -30px !important 26 | 27 | .tsd-index-section 28 | margin-bottom: 30px !important 29 | 30 | h3 31 | @extend h4 32 | margin: 0 -20px 10px -20px 33 | padding: 0 20px 10px 20px 34 | border-bottom: 1px solid var(--color-panel-divider) 35 | 36 | ul.tsd-index-list 37 | +vendors(column-count, 3) 38 | +vendors(column-gap, 20px) 39 | padding: 0 40 | list-style: none 41 | line-height: $LINE_HEIGHT 42 | 43 | +size-xs-sm 44 | +vendors(column-count, 1) 45 | 46 | +size-md 47 | +vendors(column-count, 2) 48 | 49 | li 50 | +vendors(page-break-inside, avoid) 51 | 52 | a, 53 | .tsd-parent-kind-module a 54 | color: var(--color-ts) 55 | 56 | .tsd-parent-kind-interface a 57 | color: var(--color-ts-interface) 58 | 59 | .tsd-parent-kind-enum a 60 | color: var(--color-ts-enum) 61 | 62 | .tsd-parent-kind-class a 63 | color: var(--color-ts-class) 64 | 65 | .tsd-kind-module a 66 | color: var(--color-ts) 67 | 68 | .tsd-kind-interface a 69 | color: var(--color-ts-interface) 70 | 71 | .tsd-kind-enum a 72 | color: var(--color-ts-enum) 73 | 74 | .tsd-kind-class a 75 | color: var(--color-ts-class) 76 | 77 | .tsd-is-private a 78 | color: var(--color-ts-private) 79 | -------------------------------------------------------------------------------- /typedoc-theme/assets/js/src/typedoc/components/Toggle.ts: -------------------------------------------------------------------------------- 1 | import { Component, IComponentOptions } from "../Component"; 2 | import { hasPointerMoved, pointerDown, pointerUp } from "../utils/pointer"; 3 | 4 | export class Toggle extends Component { 5 | active?: boolean; 6 | 7 | className: string; 8 | 9 | constructor(options: IComponentOptions) { 10 | super(options); 11 | 12 | this.className = this.el.dataset.toggle || ""; 13 | this.el.addEventListener(pointerUp, (e) => this.onPointerUp(e)); 14 | this.el.addEventListener("click", (e) => e.preventDefault()); 15 | document.addEventListener(pointerDown, (e) => 16 | this.onDocumentPointerDown(e) 17 | ); 18 | document.addEventListener(pointerUp, (e) => 19 | this.onDocumentPointerUp(e) 20 | ); 21 | } 22 | 23 | setActive(value: boolean) { 24 | if (this.active == value) return; 25 | this.active = value; 26 | 27 | document.documentElement.classList.toggle( 28 | "has-" + this.className, 29 | value 30 | ); 31 | this.el.classList.toggle("active", value); 32 | 33 | const transition = 34 | (this.active ? "to-has-" : "from-has-") + this.className; 35 | document.documentElement.classList.add(transition); 36 | setTimeout( 37 | () => document.documentElement.classList.remove(transition), 38 | 500 39 | ); 40 | } 41 | 42 | onPointerUp(event: Event) { 43 | if (hasPointerMoved) return; 44 | this.setActive(true); 45 | event.preventDefault(); 46 | } 47 | 48 | onDocumentPointerDown(e: Event) { 49 | if (this.active) { 50 | if ( 51 | (e.target as HTMLElement).closest( 52 | ".col-menu, .tsd-filter-group" 53 | ) 54 | ) { 55 | return; 56 | } 57 | 58 | this.setActive(false); 59 | } 60 | } 61 | 62 | onDocumentPointerUp(e: Event) { 63 | if (hasPointerMoved) return; 64 | if (this.active) { 65 | if ((e.target as HTMLElement).closest(".col-menu")) { 66 | const link = (e.target as HTMLElement).closest("a"); 67 | if (link) { 68 | let href = window.location.href; 69 | if (href.indexOf("#") != -1) { 70 | href = href.substr(0, href.indexOf("#")); 71 | } 72 | if (link.href.substr(0, href.length) == href) { 73 | setTimeout(() => this.setActive(false), 250); 74 | } 75 | } 76 | } 77 | } 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /typedoc-theme/assets/js/src/typedoc/utils/pointer.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Simple point interface. 3 | */ 4 | export interface Point { 5 | x: number; 6 | y: number; 7 | } 8 | 9 | /** 10 | * Event name of the pointer down event. 11 | */ 12 | export let pointerDown: string = "mousedown"; 13 | 14 | /** 15 | * Event name of the pointer move event. 16 | */ 17 | export let pointerMove: string = "mousemove"; 18 | 19 | /** 20 | * Event name of the pointer up event. 21 | */ 22 | export let pointerUp: string = "mouseup"; 23 | 24 | /** 25 | * Position the pointer was pressed at. 26 | */ 27 | export const pointerDownPosition: Point = { x: 0, y: 0 }; 28 | 29 | /** 30 | * Should the next click on the document be supressed? 31 | */ 32 | export let preventNextClick: boolean = false; 33 | 34 | /** 35 | * Is the pointer down? 36 | */ 37 | export let isPointerDown: boolean = false; 38 | 39 | /** 40 | * Is the pointer a touch point? 41 | */ 42 | export let isPointerTouch: boolean = false; 43 | 44 | /** 45 | * Did the pointer move since the last down event? 46 | */ 47 | export let hasPointerMoved: boolean = false; 48 | 49 | /** 50 | * Is the user agent a mobile agent? 51 | */ 52 | export const isMobile: boolean = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test( 53 | navigator.userAgent 54 | ); 55 | document.documentElement.classList.add(isMobile ? "is-mobile" : "not-mobile"); 56 | 57 | if (isMobile && "ontouchstart" in document.documentElement) { 58 | isPointerTouch = true; 59 | pointerDown = "touchstart"; 60 | pointerMove = "touchmove"; 61 | pointerUp = "touchend"; 62 | } 63 | 64 | document.addEventListener(pointerDown, (e) => { 65 | isPointerDown = true; 66 | hasPointerMoved = false; 67 | const t = 68 | pointerDown == "touchstart" 69 | ? (e as TouchEvent).targetTouches[0] 70 | : (e as MouseEvent); 71 | pointerDownPosition.y = t.pageY || 0; 72 | pointerDownPosition.x = t.pageX || 0; 73 | }); 74 | 75 | document.addEventListener(pointerMove, (e) => { 76 | if (!isPointerDown) return; 77 | if (!hasPointerMoved) { 78 | const t = 79 | pointerDown == "touchstart" 80 | ? (e as TouchEvent).targetTouches[0] 81 | : (e as MouseEvent); 82 | const x = pointerDownPosition.x - (t.pageX || 0); 83 | const y = pointerDownPosition.y - (t.pageY || 0); 84 | hasPointerMoved = Math.sqrt(x * x + y * y) > 10; 85 | } 86 | }); 87 | 88 | document.addEventListener(pointerUp, () => { 89 | isPointerDown = false; 90 | }); 91 | 92 | document.addEventListener("click", (e) => { 93 | if (preventNextClick) { 94 | e.preventDefault(); 95 | e.stopImmediatePropagation(); 96 | preventNextClick = false; 97 | } 98 | }); 99 | -------------------------------------------------------------------------------- /tests/dummy/app/components/widgets/widget-2/captions/index.css: -------------------------------------------------------------------------------- 1 | .container { 2 | display: grid; 3 | grid-gap: 1rem 2.5rem; 4 | grid-template-areas: 5 | "summary summary" 6 | "previous-button next-button"; 7 | grid-template-columns: 1fr 1fr; 8 | grid-template-rows: 1fr auto; 9 | height: 100%; 10 | overflow: hidden; 11 | width: 100%; 12 | } 13 | 14 | .summary { 15 | color: #455a64; 16 | display: grid; 17 | font-size: 0.875rem; 18 | grid-area: summary; 19 | grid-template-areas: 20 | "music-format" 21 | "annual-revenue" 22 | "relevant-years"; 23 | grid-template-columns: 1fr; 24 | grid-template-rows: repeat(3, auto); 25 | overflow-y: auto; 26 | } 27 | 28 | .music-format { 29 | color: rgba(247, 252, 251, 0.9); 30 | font-size: 1rem; 31 | display: flex; 32 | grid-area: music-format; 33 | margin-bottom: 0.5rem; 34 | word-break: break-word; 35 | } 36 | 37 | .marker { 38 | align-items: center; 39 | background-color: rgba(247, 252, 251, 0.9); 40 | border-radius: 0.5rem; 41 | display: flex; 42 | height: 1em; 43 | justify-content: center; 44 | margin-right: 0.25rem; 45 | padding: 0.125rem; 46 | width: 1rem; 47 | } 48 | 49 | .annual-revenue { 50 | font-size: 0.8rem; 51 | grid-area: annual-revenue; 52 | } 53 | 54 | .relevant-years { 55 | font-size: 0.8rem; 56 | grid-area: relevant-years; 57 | } 58 | 59 | .highlight { 60 | color: rgba(247, 252, 251, 0.9); 61 | } 62 | 63 | .previous-button, 64 | .next-button { 65 | align-items: center; 66 | display: flex; 67 | justify-content: center; 68 | height: 2rem; 69 | margin: 0.25rem; 70 | } 71 | 72 | .previous-button { 73 | grid-area: previous-button; 74 | } 75 | 76 | .next-button { 77 | grid-area: next-button; 78 | } 79 | 80 | .icon { 81 | fill: rgba(247, 252, 251, 0.9); 82 | } 83 | 84 | 85 | .container.flat { 86 | column-gap: 1rem; 87 | grid-template-areas: 88 | "previous-button summary next-button"; 89 | grid-template-columns: 2.5rem 1fr 2.5rem; 90 | grid-template-rows: minmax(3rem, 1fr); 91 | } 92 | 93 | .container.flat .summary.horizontal-layout { 94 | grid-gap: 0.5rem; 95 | grid-template-areas: 96 | "music-format annual-revenue relevant-years"; 97 | grid-template-columns: 40% 1fr 1fr; 98 | grid-template-rows: 1fr; 99 | } 100 | 101 | .container.flat .annual-revenue, 102 | .container.flat .relevant-years { 103 | display: flex; 104 | flex-direction: column; 105 | } 106 | 107 | .container.flat .previous-button, 108 | .container.flat .next-button { 109 | background: linear-gradient(36deg, #7cb342 16%, #4b830d 84%); 110 | border: 0; 111 | } 112 | 113 | .music-format.small-font-size { 114 | font-size: 0.875rem; 115 | margin: 0; 116 | } -------------------------------------------------------------------------------- /tests/dummy/app/styles/dashboard.css: -------------------------------------------------------------------------------- 1 | .container { 2 | display: flex; 3 | flex-direction: column; 4 | height: calc(100% - 3rem); 5 | padding: 1.5rem 1rem; 6 | } 7 | 8 | .widgets { 9 | display: grid; 10 | flex: 1; 11 | grid-gap: 1rem; 12 | grid-template-areas: 13 | "widget-1" 14 | "widget-2" 15 | "widget-3" 16 | "widget-4" 17 | "widget-5"; 18 | grid-template-columns: 1fr; 19 | grid-template-rows: repeat(4, minmax(12rem, 75%)) 5rem; 20 | margin-bottom: 1.5rem; 21 | } 22 | 23 | .widget-1, .widget-2, .widget-3, .widget-4, .widget-5 { 24 | border-radius: 0.125rem; 25 | overflow: hidden; 26 | padding: 0.75rem; 27 | } 28 | 29 | .widget-1 { 30 | background: linear-gradient(126deg, #e91e63 16%, #ff6090 84%); 31 | grid-area: widget-1; 32 | } 33 | 34 | .widget-2 { 35 | background: linear-gradient(126deg, #7cb342 16%, #aee571 84%); 36 | grid-area: widget-2; 37 | } 38 | 39 | .widget-3 { 40 | background: linear-gradient(126deg, #ffa000 16%, #ffd149 84%); 41 | grid-area: widget-3; 42 | } 43 | 44 | .widget-4 { 45 | background: linear-gradient(126deg, #03a9f4 16%, #67daff 84%); 46 | grid-area: widget-4; 47 | } 48 | 49 | .widget-5 { 50 | background: linear-gradient(126deg, #9c27b0 16%, #d05ce3 84%); 51 | grid-area: widget-5; 52 | } 53 | 54 | 55 | @media screen and (max-width: 30rem) { 56 | @media (min-height: 40rem) { 57 | .widgets { 58 | grid-template-rows: repeat(4, 75%) 5rem; 59 | margin-bottom: 0; 60 | overflow-y: auto; 61 | } 62 | } 63 | } 64 | 65 | 66 | @media screen and (min-width: 30rem) and (max-width: 60rem) { 67 | .widgets { 68 | grid-template-areas: 69 | "widget-1 widget-2" 70 | "widget-4 widget-2" 71 | "widget-4 widget-3" 72 | "widget-5 widget-3"; 73 | grid-template-columns: 2fr 5fr; 74 | grid-template-rows: 15rem 5rem 10rem 5rem; 75 | } 76 | 77 | @media (min-height: 40rem) { 78 | .container { 79 | height: calc(100% - 3rem); 80 | } 81 | 82 | .widgets { 83 | grid-template-rows: 3fr 1fr 2fr 5rem; 84 | overflow-y: hidden; 85 | margin-bottom: 0; 86 | } 87 | } 88 | } 89 | 90 | 91 | @media screen and (min-width: 60rem) { 92 | .widgets { 93 | grid-template-areas: 94 | "widget-1 widget-2 widget-4" 95 | "widget-3 widget-3 widget-4" 96 | "widget-3 widget-3 widget-5"; 97 | grid-template-columns: minmax(25%, 15rem) minmax(50%, 15rem) auto; 98 | grid-template-rows: 24rem 6rem 10rem; 99 | } 100 | 101 | @media (min-height: 40rem) { 102 | .container { 103 | height: calc(100% - 3rem); 104 | } 105 | 106 | .widgets { 107 | grid-template-rows: 4fr 1fr 10rem; 108 | overflow-y: hidden; 109 | margin-bottom: 0; 110 | } 111 | } 112 | } -------------------------------------------------------------------------------- /tests/dummy/app/components/widgets/widget-2/captions/index.hbs: -------------------------------------------------------------------------------- 1 | 6 |
      11 | {{#if this.summary}} 12 |
      13 |

      17 | 22 | 23 | {{this.summary.musicFormat}} 24 |

      25 | 26 |
      30 | {{#if (or EQ.at-tall EQ.at-large)}} 31 | Annual revenue: 32 | {{/if}} 33 | 34 | {{this.summary.averageRevenue}} 35 | 36 |
      37 | 38 |
      42 | {{#if (or EQ.at-tall EQ.at-large)}} 43 | Relevant years: 44 | {{/if}} 45 | 46 | {{this.summary.relevantYears.min}} - {{this.summary.relevantYears.max}} 47 | 48 |
      49 |
      50 | 51 | {{#if this.canShowPreviousButton}} 52 | 67 | {{/if}} 68 | 69 | {{#if this.canShowNextButton}} 70 | 85 | {{/if}} 86 | {{/if}} 87 |
      88 |
      89 | -------------------------------------------------------------------------------- /typedoc-theme/assets/css/layouts/_default.sass: -------------------------------------------------------------------------------- 1 | html.default 2 | +size-md 3 | .col-content 4 | width: 72% 5 | 6 | .col-menu 7 | width: 28% 8 | 9 | .tsd-navigation 10 | padding-left: 10px 11 | 12 | +size-xs-sm 13 | .col-content 14 | float: none 15 | width: 100% 16 | 17 | .col-menu 18 | position: fixed !important 19 | overflow: auto 20 | -webkit-overflow-scrolling: touch 21 | z-index: 1024 22 | top: 0 !important 23 | bottom: 0 !important 24 | left: auto !important 25 | right: 0 !important 26 | width: 100% 27 | padding: 20px 20px 0 0 28 | max-width: 450px 29 | visibility: hidden 30 | background-color: var(--color-panel) 31 | transform: translate(100%,0) 32 | 33 | > *:last-child 34 | padding-bottom: 20px 35 | 36 | .overlay 37 | content: '' 38 | display: block 39 | position: fixed 40 | z-index: 1023 41 | top: 0 42 | left: 0 43 | right: 0 44 | bottom: 0 45 | background-color: rgba(#000, 0.75) 46 | visibility: hidden 47 | 48 | &.to-has-menu 49 | .overlay 50 | animation: fade-in 0.4s 51 | 52 | header, 53 | footer, 54 | .col-content 55 | animation: shift-to-left 0.4s 56 | 57 | .col-menu 58 | animation: pop-in-from-right 0.4s 59 | 60 | &.from-has-menu 61 | .overlay 62 | animation: fade-out 0.4s 63 | 64 | header, 65 | footer, 66 | .col-content 67 | animation: unshift-to-left 0.4s 68 | 69 | .col-menu 70 | animation: pop-out-to-right 0.4s 71 | 72 | &.has-menu 73 | body 74 | overflow: hidden 75 | 76 | .overlay 77 | visibility: visible 78 | 79 | header, 80 | footer, 81 | .col-content 82 | transform: translate(-25%, 0) 83 | 84 | .col-menu 85 | visibility: visible 86 | transform: translate(0,0) 87 | 88 | .tsd-page-title 89 | padding: 70px 0 20px 0 90 | margin: 0 0 40px 0 91 | background: var(--color-panel) 92 | box-shadow: 0 0 5px rgba(#000, 0.35) 93 | 94 | h1 95 | margin: 0 96 | 97 | .tsd-breadcrumb 98 | margin: 0 99 | padding: 0 100 | color: var(--color-text-aside) 101 | 102 | a 103 | color: var(--color-text-aside) 104 | text-decoration: none 105 | 106 | &:hover 107 | text-decoration: underline 108 | 109 | li 110 | display: inline 111 | 112 | &:after 113 | content: ' / ' 114 | -------------------------------------------------------------------------------- /tests/dummy/app/templates/album.hbs: -------------------------------------------------------------------------------- 1 | {{page-title "Album"}} 2 | 3 | 10 |
      11 |
      12 |

      {{@model.name}}

      13 | 14 |
      15 | by {{@model.band.name}} 16 |
      17 | 18 |
      19 | {{@model.publicationDate}} · {{@model.tracks.length}} songs 20 | {{#if @model.tracks}} 21 | · {{@model.totalLengthInMinutes}} minutes 22 | {{/if}} 23 |
      24 |
      25 | 26 |
      27 | 30 |
      31 | 32 |
      37 |

      Lyrics

      38 | 39 |
      40 |

      Verse 1

      41 |

      Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

      42 |

      Feugiat in ante metus dictum at. Donec ac odio tempor orci dapibus. Turpis in eu mi bibendum.

      43 |

      Aliquet nibh praesent tristique magna sit amet. Risus ultricies tristique nulla aliquet enim tortor.

      44 |
      45 | 46 |
      47 |

      Chorus

      48 |

      Aliquet eget sit amet tellus cras adipiscing. ♫

      49 |

      Diam vel quam elementum pulvinar etiam non quam lacus suspendisse.

      50 |
      51 | 52 |
      53 |

      Verse 2

      54 |

      Arcu dui vivamus arcu felis bibendum ut tristique. Est pellentesque elit ullamcorper dignissim cras.

      55 |

      In mollis nunc sed id semper risus in hendrerit. Sit amet aliquam id diam maecenas ultricies.

      56 |

      Massa sed elementum tempus egestas sed. At ultrices mi tempus imperdiet nulla malesuada.

      57 |
      58 | 59 |
      60 |

      Chorus

      61 |

      Aliquet eget sit amet tellus cras adipiscing. ♫

      62 |

      Mi ipsum faucibus vitae aliquet nec ullamcorper. Purus viverra accumsan in nisl.

      63 |
      64 | 65 |
      66 |

      Bridge

      67 |

      Maecenas sed enim ut sem viverra aliquet.

      68 |

      Vitae suscipit tellus mauris a diam maecenas sed.

      69 |

      At erat pellentesque adipiscing commodo elit at imperdiet.

      70 |
      71 | 72 |
      73 |

      Chorus

      74 |

      Aliquet eget sit amet tellus cras adipiscing. ♫

      75 |

      Imperdiet proin fermentum leo vel orci porta non pulvinar neque. Vulputate odio ut enim blandit.

      76 |
      77 | 78 |
      79 |

      Outro

      80 |

      Aliquet lectus proin nibh nisl condimentum.

      81 |

      Ut aliquam purus sit amet luctus venenatis lectus magna.

      82 |
      83 |
      84 |
      85 |
      86 | -------------------------------------------------------------------------------- /typedoc-theme/assets/js/src/typedoc/services/Viewport.ts: -------------------------------------------------------------------------------- 1 | import { EventTarget } from "../EventTarget"; 2 | import { throttle } from "../utils/trottle"; 3 | 4 | /** 5 | * A global service that monitors the window size and scroll position. 6 | */ 7 | export class Viewport extends EventTarget { 8 | public static readonly instance = new Viewport(); 9 | 10 | /** 11 | * The current scroll position. 12 | */ 13 | scrollTop: number = 0; 14 | 15 | /** 16 | * The previous scrollTop. 17 | */ 18 | lastY: number = 0; 19 | 20 | /** 21 | * The width of the window. 22 | */ 23 | width: number = 0; 24 | 25 | /** 26 | * The height of the window. 27 | */ 28 | height: number = 0; 29 | 30 | /** 31 | * The toolbar (contains the search input). 32 | */ 33 | toolbar: HTMLDivElement; 34 | 35 | /** 36 | * Boolean indicating whether the toolbar is shown. 37 | */ 38 | showToolbar: boolean = true; 39 | 40 | /** 41 | * The sticky side nav that contains members of the current page. 42 | */ 43 | secondaryNav: HTMLElement; 44 | 45 | /** 46 | * Create new Viewport instance. 47 | */ 48 | constructor() { 49 | super(); 50 | 51 | this.toolbar = ( 52 | document.querySelector(".tsd-page-toolbar") 53 | ); 54 | this.secondaryNav = ( 55 | document.querySelector(".tsd-navigation.secondary") 56 | ); 57 | 58 | window.addEventListener( 59 | "scroll", 60 | throttle(() => this.onScroll(), 10) 61 | ); 62 | window.addEventListener( 63 | "resize", 64 | throttle(() => this.onResize(), 10) 65 | ); 66 | 67 | this.onResize(); 68 | this.onScroll(); 69 | } 70 | 71 | /** 72 | * Trigger a resize event. 73 | */ 74 | triggerResize() { 75 | const event = new CustomEvent("resize", { 76 | detail: { 77 | width: this.width, 78 | height: this.height, 79 | }, 80 | }); 81 | 82 | this.dispatchEvent(event); 83 | } 84 | 85 | /** 86 | * Triggered when the size of the window has changed. 87 | */ 88 | onResize() { 89 | this.width = window.innerWidth || 0; 90 | this.height = window.innerHeight || 0; 91 | 92 | const event = new CustomEvent("resize", { 93 | detail: { 94 | width: this.width, 95 | height: this.height, 96 | }, 97 | }); 98 | 99 | this.dispatchEvent(event); 100 | } 101 | 102 | /** 103 | * Triggered when the user scrolled the viewport. 104 | */ 105 | onScroll() { 106 | this.scrollTop = window.scrollY || 0; 107 | 108 | const event = new CustomEvent("scroll", { 109 | detail: { 110 | scrollTop: this.scrollTop, 111 | }, 112 | }); 113 | 114 | this.dispatchEvent(event); 115 | this.hideShowToolbar(); 116 | } 117 | 118 | /** 119 | * Handle hiding/showing of the toolbar. 120 | */ 121 | hideShowToolbar() { 122 | const isShown = this.showToolbar; 123 | this.showToolbar = this.lastY >= this.scrollTop || this.scrollTop <= 0; 124 | if (isShown !== this.showToolbar) { 125 | this.toolbar.classList.toggle("tsd-page-toolbar--hide"); 126 | this.secondaryNav.classList.toggle("tsd-navigation--toolbar-hide"); 127 | } 128 | this.lastY = this.scrollTop; 129 | } 130 | } 131 | -------------------------------------------------------------------------------- /typedoc-theme/partials/header.hbs: -------------------------------------------------------------------------------- 1 |
      2 |
      3 |
      4 |
      5 | 28 | 29 | {{!-- 30 |
      31 |
      32 | Options 33 |
      34 |
      35 | All 36 |
        37 |
      • Public
      • 38 |
      • Public/Protected
      • 39 |
      • All
      • 40 |
      41 |
      42 | 43 | 44 | 45 | 46 | {{#unless settings.excludeExternals}} 47 | 48 | 49 | {{/unless}} 50 |
      51 |
      52 | 53 | Menu 54 |
      55 | --}} 56 |
      57 |
      58 |
      59 |
      60 |
      61 | {{#if model.parent}} {{! Don't show breadcrumbs on main project page, it is the root page. !}} 62 |
        63 | {{#with model}}{{> breadcrumb}}{{/with}} 64 |
      65 | {{/if}} 66 |

      {{#compact}} 67 | {{#ifCond model.kindString "!==" "Project" }} 68 | {{model.kindString}}  69 | {{/ifCond}} 70 | {{model.name}} 71 | {{#if model.typeParameters}} 72 | < 73 | {{#each model.typeParameters}} 74 | {{#if @index}}, {{/if}} 75 | {{name}} 76 | {{/each}} 77 | > 78 | {{/if}} 79 | {{/compact}}

      80 |
      81 |
      82 |
      83 | -------------------------------------------------------------------------------- /addon/index.ts: -------------------------------------------------------------------------------- 1 | import { ModifierArgs as ModifierArgsBase } from 'ember-modifier'; 2 | 3 | export { default as component } from './-private/component'; 4 | export { default as modifier } from './-private/modifier'; 5 | 6 | /** 7 | * Defines the direction for which HTML attributes are applied. 8 | */ 9 | export type Dimension = 'width' | 'height' | 'both'; 10 | 11 | /** 12 | * A format for defining sizes. Keys are size names and values are left breakpoints of each size. 13 | * 14 | * The first size *must* have a value of `0`. 15 | */ 16 | export type Sizes = Record; 17 | 18 | /** 19 | * A data structure passed as an argument to callbacks. 20 | */ 21 | export interface EQInfo { 22 | /** An element to which Element Query has been applied. */ 23 | element: HTMLElement; 24 | 25 | /** Current width of the element, in px. */ 26 | width: number; 27 | 28 | /** Current height of the element, in px. */ 29 | height: number; 30 | 31 | /** Current ratio of the element's width to height. */ 32 | ratio: number; 33 | 34 | /** Name of the current horizontal [[Sizes | size]] of the element. */ 35 | size?: string; 36 | 37 | /** Name of the current vertical [[Sizes | size]] of the element. */ 38 | sizeHeight?: string; 39 | 40 | /** Name of the current ratio [[Sizes | size]] of the element. */ 41 | sizeRatio?: string; 42 | 43 | /** Prefix used for HTML attributes. */ 44 | prefix?: string; 45 | 46 | /** Array of HTML attribute names which are currently applied. */ 47 | attributes: string[]; 48 | 49 | /** 50 | * Array of HTML attribute names which are currently applied where keys are attributes and values are all `true`. 51 | * 52 | * Mostly useful in templates. 53 | * */ 54 | attributesRecord: Record; 55 | } 56 | 57 | export interface ModifierArgs extends ModifierArgsBase { 58 | positional: []; 59 | named: Args; 60 | } 61 | 62 | /** 63 | * API of the `eq` modifier and the `EQ` component. 64 | */ 65 | export interface Args extends Record { 66 | /** Callback that will be called when the size of the element changes. It is not throttled. Accepts [[EQInfo]] as the first argument. */ 67 | onResize?: (eqInfo: EQInfo) => void; 68 | 69 | /** A definition of horizontal [[Sizes]]. When `true`, [[SIZES_DEFAULT]] is used (default). */ 70 | sizes?: Sizes | boolean | null; 71 | 72 | /** A definition of vertical [[Sizes]]. When `true`, [[SIZES_HEIGHT_DEFAULT]] is used. Defaults to `false`. */ 73 | sizesHeight?: Sizes | boolean; 74 | 75 | /** A definition of ratio [[Sizes]]. When `true`, [RATIOS_DEFAULT]] is used. Defaults to `false`. */ 76 | sizesRatio?: Sizes | boolean; 77 | 78 | /** Prefix to be used for HTML attributes. Defautls to `""`. */ 79 | prefix?: string; 80 | 81 | /** Use this to shut down the element query functionality for this element. */ 82 | isDisabled?: boolean; 83 | 84 | /** Debounce period */ 85 | debounce?: number; 86 | } 87 | 88 | /** 89 | * Default values of horizontal [[Sizes]]. 90 | */ 91 | // prettier-ignore 92 | export const SIZES_DEFAULT: Sizes = { 93 | xxs: 0, 94 | xs: 200, 95 | s: 400, 96 | m: 600, 97 | l: 800, 98 | xl: 1000, 99 | xxl: 1200, 100 | xxxl: 1400, 101 | }; 102 | 103 | /** 104 | * Default values of vertical [[Sizes]]. 105 | */ 106 | // prettier-ignore 107 | export const SIZES_HEIGHT_DEFAULT: Sizes = { 108 | 'xxs-height': 0, 109 | 'xs-height': 200, 110 | 's-height': 400, 111 | 'm-height': 600, 112 | 'l-height': 800, 113 | 'xl-height': 1000, 114 | 'xxl-height': 1200, 115 | 'xxxl-height': 1400, 116 | }; 117 | 118 | /** 119 | * Default value of ratios. 120 | */ 121 | // prettier-ignore 122 | export const SIZES_RATIO_DEFAULT: Sizes = { 123 | 'very-tall': 0, 124 | 'tall': 0.5, 125 | 'squarish': 0.8, 126 | 'wide': 1.2, 127 | 'very-wide': 1.5, 128 | }; 129 | -------------------------------------------------------------------------------- /typedoc-theme/assets/js/src/typedoc/components/MenuHighlight.ts: -------------------------------------------------------------------------------- 1 | import { Component, IComponentOptions } from "../Component"; 2 | import { Viewport } from "../services/Viewport"; 3 | 4 | /** 5 | * Stored element and position data of a single anchor. 6 | */ 7 | interface IAnchorInfo { 8 | /** 9 | * The anchor element. 10 | */ 11 | anchor: HTMLElement; 12 | 13 | /** 14 | * The link element in the navigation representing this anchor. 15 | */ 16 | link: HTMLElement; 17 | 18 | /** 19 | * The vertical offset of the anchor on the page. 20 | */ 21 | position: number; 22 | } 23 | 24 | /** 25 | * Manages the sticky state of the navigation and moves the highlight 26 | * to the current navigation item. 27 | */ 28 | export class MenuHighlight extends Component { 29 | /** 30 | * List of all discovered anchors. 31 | */ 32 | private anchors: IAnchorInfo[] = []; 33 | 34 | /** 35 | * Index of the currently highlighted anchor. 36 | */ 37 | private index: number = -1; 38 | 39 | /** 40 | * Create a new MenuHighlight instance. 41 | * 42 | * @param options Backbone view constructor options. 43 | */ 44 | constructor(options: IComponentOptions) { 45 | super(options); 46 | 47 | Viewport.instance.addEventListener("resize", () => this.onResize()); 48 | Viewport.instance.addEventListener<{ scrollTop: number }>( 49 | "scroll", 50 | (e) => this.onScroll(e) 51 | ); 52 | 53 | this.createAnchors(); 54 | } 55 | 56 | /** 57 | * Find all anchors on the current page. 58 | */ 59 | private createAnchors() { 60 | let base = window.location.href; 61 | if (base.indexOf("#") != -1) { 62 | base = base.substr(0, base.indexOf("#")); 63 | } 64 | 65 | this.el.querySelectorAll("a").forEach((el) => { 66 | const href = el.href; 67 | if (href.indexOf("#") == -1) return; 68 | if (href.substr(0, base.length) != base) return; 69 | 70 | const hash = href.substr(href.indexOf("#") + 1); 71 | const anchor = document.querySelector( 72 | "a.tsd-anchor[name=" + hash + "]" 73 | ); 74 | const link = el.parentNode; 75 | if (!anchor || !link) return; 76 | 77 | this.anchors.push({ 78 | link: link as HTMLElement, 79 | anchor: anchor, 80 | position: 0, 81 | }); 82 | }); 83 | 84 | this.onResize(); 85 | } 86 | 87 | /** 88 | * Triggered after the viewport was resized. 89 | */ 90 | private onResize() { 91 | let anchor: IAnchorInfo; 92 | for ( 93 | let index = 0, count = this.anchors.length; 94 | index < count; 95 | index++ 96 | ) { 97 | anchor = this.anchors[index]; 98 | const rect = anchor.anchor.getBoundingClientRect(); 99 | anchor.position = rect.top + document.body.scrollTop; 100 | } 101 | 102 | this.anchors.sort((a, b) => { 103 | return a.position - b.position; 104 | }); 105 | 106 | const event = new CustomEvent("scroll", { 107 | detail: { 108 | scrollTop: Viewport.instance.scrollTop, 109 | }, 110 | }); 111 | this.onScroll(event); 112 | } 113 | 114 | /** 115 | * Triggered after the viewport was scrolled. 116 | * 117 | * @param event The custom event with the current vertical scroll position. 118 | */ 119 | private onScroll(event: CustomEvent<{ scrollTop: number }>) { 120 | const scrollTop = event.detail.scrollTop + 5; 121 | const anchors = this.anchors; 122 | const count = anchors.length - 1; 123 | let index = this.index; 124 | 125 | while (index > -1 && anchors[index].position > scrollTop) { 126 | index -= 1; 127 | } 128 | 129 | while (index < count && anchors[index + 1].position < scrollTop) { 130 | index += 1; 131 | } 132 | 133 | if (this.index != index) { 134 | if (this.index > -1) 135 | this.anchors[this.index].link.classList.remove("focus"); 136 | this.index = index; 137 | if (this.index > -1) 138 | this.anchors[this.index].link.classList.add("focus"); 139 | } 140 | } 141 | } 142 | -------------------------------------------------------------------------------- /typedoc-theme/assets/css/elements/_signatures.sass: -------------------------------------------------------------------------------- 1 | // Wraps a function signature. 2 | // Changes its appearance when directly placed inside a `tsd-panel`. 3 | // Can be combined with class `tsd-kind-icon` to display an icon in front of the signature. 4 | // 5 | //
      6 | //
      7 | // getChildByName( 8 | // name: string 9 | // ): 10 | // DeclarationReflection 11 | //
      12 | //
      13 | // 14 | .tsd-signature 15 | margin: 0 0 1em 0 16 | padding: 10px 17 | border: 1px solid var(--color-panel-divider) 18 | font-family: $FONT_FAMILY_MONO 19 | font-size: $FONT_SIZE_MONO 20 | overflow-x: auto 21 | 22 | &.tsd-kind-icon 23 | padding-left: 30px 24 | 25 | &:before 26 | top: 10px 27 | left: 10px 28 | 29 | .tsd-panel > & 30 | margin-left: -20px 31 | margin-right: -20px 32 | border-width: 1px 0 33 | 34 | &.tsd-kind-icon 35 | padding-left: 40px 36 | 37 | &:before 38 | left: 20px 39 | 40 | .tsd-signature-symbol 41 | color: var(--color-text-aside) 42 | font-weight: normal 43 | 44 | .tsd-signature-type 45 | font-style: italic 46 | font-weight: normal 47 | 48 | // Displays a list of signatures. 49 | // Changes its appearance when directly placed inside a `tsd-panel`. 50 | // Made interactive by JavaScript at `typedoc.Signature`. 51 | // 52 | //
        53 | //
      • getChildByName(name: string): DeclarationReflection
      • 54 | //
      • getChildByName(names: Array<string>): DeclarationReflection
      • 55 | //
      56 | // 57 | .tsd-signatures 58 | padding: 0 59 | margin: 0 0 1em 0 60 | border: 1px solid var(--color-panel-divider) 61 | 62 | .tsd-signature 63 | margin: 0 64 | border-width: 1px 0 0 0 65 | transition: background-color 0.1s 66 | 67 | &:first-child 68 | border-top-width: 0 69 | 70 | &.current 71 | background-color: var(--color-panel-divider) 72 | 73 | &.active > .tsd-signature 74 | cursor: pointer 75 | 76 | .tsd-panel > & 77 | margin-left: -20px 78 | margin-right: -20px 79 | border-width: 1px 0 80 | 81 | .tsd-signature.tsd-kind-icon 82 | padding-left: 40px 83 | 84 | &:before 85 | left: 20px 86 | 87 | .tsd-panel > a.anchor + & 88 | border-top-width: 0 89 | margin-top: -20px 90 | 91 | // Holds the descriptions related to a list of signatures. 92 | // Made interactive by JavaScript at `typedoc.Signature`. 93 | // 94 | //
        95 | //
      • 96 | //

        Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat.

        97 | //
      • 98 | //
      • 99 | //

        Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat.

        100 | //
      • 101 | //
      102 | // 103 | ul.tsd-descriptions 104 | position: relative 105 | overflow: hidden 106 | padding: 0 107 | list-style: none 108 | 109 | > li 110 | @extend %prevent-children-margin 111 | 112 | &.active > .tsd-description 113 | display: none 114 | 115 | &.current 116 | display: block 117 | 118 | &.fade-in 119 | animation: fade-in-delayed 0.3s 120 | 121 | &.fade-out 122 | animation: fade-out-delayed 0.3s 123 | position: absolute 124 | display: block 125 | top: 0 126 | left: 0 127 | right: 0 128 | opacity: 0 129 | visibility: hidden 130 | 131 | h4 132 | font-size: $FONT_SIZE 133 | margin: 1em 0 0.5em 0 134 | 135 | ul.tsd-parameters, 136 | ul.tsd-type-parameters 137 | list-style: square 138 | margin: 0 139 | padding-left: 20px 140 | 141 | > li.tsd-parameter-signature 142 | list-style: none 143 | margin-left: -20px 144 | 145 | h5 146 | font-size: $FONT_SIZE 147 | margin: 1em 0 0.5em 0 148 | 149 | .tsd-comment 150 | margin-top: -0.5em 151 | -------------------------------------------------------------------------------- /tests/dummy/app/utils/widgets/widget-2.js: -------------------------------------------------------------------------------- 1 | export const COLOR_PALETTE = { 2 | '8 - Track': '#5B8DB8', 3 | CD: '#EE7423', 4 | 'CD Single': '#F59D3D', 5 | Cassette: '#7AAAD0', 6 | 'Cassette Single': '#9BC7E4', 7 | 'DVD Audio': '#9D7760', 8 | 'Download Album': '#7C4D79', 9 | 'Download Music Video': '#D5A5C4', 10 | 'Download Single': '#9B6A97', 11 | Kiosk: '#E1575A', 12 | 'LP/EP': '#2A5784', 13 | 'Limited Tier Paid Subscription': '#B4E0A7', 14 | 'Music Video (Physical)': '#F1CF63', 15 | 'On-Demand Streaming (Ad-Supported)': '#398949', 16 | 'Other Ad-Supported Streaming': '#61AA57', 17 | 'Other Digital': '#EFC9E6', 18 | 'Other Tapes': '#BADDF1', 19 | 'Paid Subscription': '#24693D', 20 | 'Ringtones & Ringbacks': '#BE89AC', 21 | SACD: '#FFC686', 22 | 'SoundExchange Distributions': '#7DC470', 23 | Synchronization: '#BBB1AC', 24 | 'Vinyl Single': '#43719F', 25 | }; 26 | 27 | export function formatRevenue(revenue) { 28 | const revenueInBillions = (revenue / 1e9).toFixed(2); 29 | 30 | if (revenueInBillions >= 1) { 31 | return `$${new Intl.NumberFormat().format(revenueInBillions)} billion`; 32 | } 33 | 34 | const revenueInMillions = (revenue / 1e6).toFixed(1); 35 | 36 | if (revenueInMillions >= 1) { 37 | return `$${new Intl.NumberFormat().format(revenueInMillions)} million`; 38 | } 39 | 40 | return `$${new Intl.NumberFormat().format(revenue.toFixed(0))}`; 41 | } 42 | 43 | /* 44 | Transform the raw data into something useful for visualization 45 | */ 46 | export function createDataForVisualization(rawData) { 47 | return rawData.map((datum) => { 48 | const musicFormat = datum.Format; 49 | const year = parseInt(datum.Year, 10); 50 | const revenue = parseInt(datum['Revenue (Inflation Adjusted)'], 10); 51 | 52 | return { musicFormat, year, revenue }; 53 | }); 54 | } 55 | 56 | /* 57 | Transform the raw data into something useful for captions 58 | */ 59 | export function createSummariesForCaptions(rawData) { 60 | const groupedData = groupDataByMusicFormat(rawData); 61 | const sanitizedData = sanitizeData(groupedData); 62 | const summaries = summarizeData(sanitizedData); 63 | 64 | return summaries; 65 | } 66 | 67 | function groupDataByMusicFormat(rawData) { 68 | return rawData.reduce((accumulator, datum) => { 69 | const musicFormat = datum.Format; 70 | const year = parseInt(datum.Year, 10); 71 | const revenue = parseInt(datum['Revenue (Inflation Adjusted)'], 10); 72 | const didMusicFormatExist = revenue !== 0; 73 | 74 | if (accumulator[musicFormat]) { 75 | accumulator[musicFormat].data.set(year, revenue); 76 | 77 | if (didMusicFormatExist) { 78 | accumulator[musicFormat].relevantYears = { 79 | min: Math.min(year, accumulator[musicFormat].relevantYears.min), 80 | max: Math.max(year, accumulator[musicFormat].relevantYears.max), 81 | }; 82 | } 83 | } else { 84 | accumulator[musicFormat] = { 85 | data: new Map([[year, revenue]]), 86 | relevantYears: { 87 | min: didMusicFormatExist ? year : Infinity, 88 | max: didMusicFormatExist ? year : -Infinity, 89 | }, 90 | }; 91 | } 92 | 93 | return accumulator; 94 | }, {}); 95 | } 96 | 97 | function sanitizeData(groupedData) { 98 | const output = {}; 99 | 100 | Object.keys(groupedData).forEach((musicFormat) => { 101 | const { data, relevantYears } = groupedData[musicFormat]; 102 | const relevantData = new Map(); 103 | 104 | // Remove data points outside of the relevant years 105 | for (let year = relevantYears.min; year <= relevantYears.max; year++) { 106 | const revenue = data.get(year); 107 | relevantData.set(year, revenue); 108 | } 109 | 110 | output[musicFormat] = { 111 | relevantData, 112 | relevantYears, 113 | }; 114 | }); 115 | 116 | return output; 117 | } 118 | 119 | function summarizeData(sanitizedData) { 120 | const summaries = []; 121 | 122 | Object.keys(sanitizedData) 123 | .sort() 124 | .forEach((musicFormat) => { 125 | const { relevantData, relevantYears } = sanitizedData[musicFormat]; 126 | const numRelevantYears = relevantYears.max - relevantYears.min + 1; 127 | 128 | const revenues = Array.from(relevantData.values()); 129 | const totalRevenue = revenues.reduce((accumulator, sum) => accumulator + sum, 0); 130 | const averageRevenue = totalRevenue / numRelevantYears; 131 | 132 | summaries.push({ 133 | musicFormat, 134 | markerColor: COLOR_PALETTE[musicFormat], 135 | averageRevenue: formatRevenue(averageRevenue), 136 | relevantYears, 137 | }); 138 | }); 139 | 140 | return summaries; 141 | } 142 | -------------------------------------------------------------------------------- /typedoc-theme/assets/css/elements/_toolbar.sass: -------------------------------------------------------------------------------- 1 | // Displays the toolbar at the top of the page. 2 | // 3 | //
      4 | //
      5 | //
      6 | //
      7 | // TypeDoc Documentation 8 | //
      9 | //
      10 | //
      11 | //
      12 | // 13 | .tsd-page-toolbar 14 | position: fixed 15 | z-index: 1 16 | top: 0 17 | left: 0 18 | width: 100% 19 | height: $TOOLBAR_HEIGHT 20 | color: var(--color-toolbar-text) 21 | background: var(--color-toolbar) 22 | border-bottom: 1px solid var(--color-panel-divider) 23 | transition: transform .3s linear 24 | 25 | a 26 | color: var(--color-toolbar-text) 27 | text-decoration: none 28 | 29 | &.title 30 | font-weight: bold 31 | 32 | &.title:hover 33 | text-decoration: underline 34 | 35 | .table-wrap 36 | display: table 37 | width: 100% 38 | height: $TOOLBAR_HEIGHT 39 | 40 | .table-cell 41 | display: table-cell 42 | position: relative 43 | white-space: nowrap 44 | line-height: $TOOLBAR_HEIGHT 45 | 46 | &:first-child 47 | width: 100% 48 | 49 | .tsd-page-toolbar--hide 50 | transform: translateY(-100%) 51 | 52 | %TSD_WIDGET_ICON 53 | &:before 54 | content: '' 55 | display: inline-block 56 | width: 40px 57 | height: 40px 58 | margin: 0 -8px 0 0 59 | background-image: url(../../images/widgets.png) 60 | background-repeat: no-repeat 61 | text-indent: -1024px 62 | vertical-align: bottom 63 | 64 | +retina 65 | background-image: url(../../images/widgets@2x.png) 66 | background-size: 320px 40px 67 | 68 | .tsd-widget 69 | @extend %TSD_WIDGET_ICON 70 | display: inline-block 71 | overflow: hidden 72 | opacity: 0.6 73 | height: $TOOLBAR_HEIGHT 74 | transition: opacity 0.1s, background-color 0.2s 75 | vertical-align: bottom 76 | cursor: pointer 77 | 78 | &:hover 79 | opacity: 0.8 80 | 81 | &.active 82 | opacity: 1 83 | background-color: var(--color-panel-divider) 84 | 85 | &.no-caption 86 | width: 40px 87 | 88 | &:before 89 | margin: 0 90 | 91 | &.search:before 92 | background-position: 0 0 93 | 94 | &.menu:before 95 | background-position: -40px 0 96 | 97 | &.options:before 98 | background-position: -80px 0 99 | 100 | &.options, 101 | &.menu 102 | display: none 103 | 104 | +size-xs-sm 105 | display: inline-block 106 | 107 | input[type=checkbox] + &:before 108 | background-position: -120px 0 109 | 110 | input[type=checkbox]:checked + &:before 111 | background-position: -160px 0 112 | 113 | .tsd-select 114 | position: relative 115 | display: inline-block 116 | height: $TOOLBAR_HEIGHT 117 | transition: opacity 0.1s, background-color 0.2s 118 | vertical-align: bottom 119 | cursor: pointer 120 | 121 | .tsd-select-label 122 | @extend %TSD_WIDGET_ICON 123 | opacity: 0.6 124 | transition: opacity 0.2s 125 | 126 | &:before 127 | background-position: -240px 0 128 | 129 | &.active 130 | .tsd-select-label 131 | opacity: 0.8 132 | 133 | .tsd-select-list 134 | visibility: visible 135 | opacity: 1 136 | transition-delay: 0s 137 | 138 | .tsd-select-list 139 | position: absolute 140 | visibility: hidden 141 | top: $TOOLBAR_HEIGHT 142 | left: 0 143 | margin: 0 144 | padding: 0 145 | opacity: 0 146 | list-style: none 147 | box-shadow: 0 0 4px rgba(#000, 0.25) 148 | transition: visibility 0s 0.2s, opacity 0.2s 149 | 150 | li 151 | @extend %TSD_WIDGET_ICON 152 | padding: 0 20px 0 0 153 | background-color: var(--color-background) 154 | 155 | &:before 156 | background-position: 40px 0 157 | 158 | &:nth-child(even) 159 | background-color: var(--color-panel) 160 | 161 | &:hover 162 | background-color: var(--color-panel-divider) 163 | 164 | &.selected:before 165 | background-position: -200px 0 166 | 167 | +size-xs-sm 168 | .tsd-select-list 169 | top: 0 170 | left: auto 171 | right: 100% 172 | margin-right: -5px 173 | 174 | .tsd-select-label:before 175 | background-position: -280px 0 176 | -------------------------------------------------------------------------------- /tests/dummy/app/components/widgets/widget-2/stacked-chart/index.js: -------------------------------------------------------------------------------- 1 | /* 2 | D3 code adapted from https://observablehq.com/@mbostock/revenue-by-music-format-1973-2018 3 | */ 4 | import { action } from '@ember/object'; 5 | import Component from '@glimmer/component'; 6 | import { tracked } from '@glimmer/tracking'; 7 | import { COLOR_PALETTE, formatRevenue } from 'dummy/utils/widgets/widget-2'; 8 | 9 | import { extent, max, rollup, ticks } from 'd3-array'; 10 | import { axisBottom, axisLeft } from 'd3-axis'; 11 | import { scaleBand, scaleLinear, scaleOrdinal } from 'd3-scale'; 12 | import { select } from 'd3-selection'; 13 | import { stack, stackOrderReverse } from 'd3-shape'; 14 | 15 | const musicFormats = Object.keys(COLOR_PALETTE); 16 | const paletteColors = Object.values(COLOR_PALETTE); 17 | 18 | export default class WidgetsWidget2StackedChartComponent extends Component { 19 | @tracked height = 0; 20 | @tracked width = 0; 21 | 22 | get color() { 23 | return scaleOrdinal().domain(musicFormats).range(paletteColors); 24 | } 25 | 26 | get data() { 27 | return this.args.data ?? []; 28 | } 29 | 30 | get margin() { 31 | return { 32 | top: 20, 33 | right: 15, 34 | bottom: 30, 35 | left: 35, 36 | }; 37 | } 38 | 39 | get series() { 40 | const foo = stack() 41 | .keys(musicFormats) 42 | .value((group, key) => group.get(key).revenue) 43 | .order(stackOrderReverse); 44 | 45 | const bar = Array.from( 46 | rollup( 47 | this.data, 48 | ([d]) => d, 49 | (d) => d.year, 50 | (d) => d.musicFormat 51 | ).values() 52 | ); 53 | 54 | const foobar = foo(bar).map((s) => (s.forEach((d) => (d.data = d.data.get(s.key))), s)); 55 | 56 | return foobar; 57 | } 58 | 59 | get xAxis() { 60 | const { height, margin, xScale } = this; 61 | 62 | return (g) => 63 | g.attr('transform', `translate(0, ${height - margin.bottom})`).call( 64 | axisBottom(xScale) 65 | .tickValues(ticks(...extent(xScale.domain()), 5)) 66 | .tickSizeOuter(0) 67 | ); 68 | } 69 | 70 | get xScale() { 71 | const { data, margin, width } = this; 72 | 73 | return scaleBand() 74 | .domain(data.map((d) => d.year)) 75 | .rangeRound([margin.left, width - margin.right]); 76 | } 77 | 78 | get yAxis() { 79 | const { data, margin, yScale } = this; 80 | 81 | return (g) => 82 | g 83 | .attr('transform', `translate(${margin.left}, 0)`) 84 | .call( 85 | axisLeft(yScale) 86 | .tickFormat((x) => (x / 1e9).toFixed(0)) 87 | .tickValues(ticks(...extent(yScale.domain()), 5)) 88 | ) 89 | .call((g) => g.select('.domain').remove()) 90 | .call((g) => 91 | g 92 | .select('.tick:last-of-type text') 93 | .clone() 94 | .attr('x', 3) 95 | .attr('text-anchor', 'start') 96 | .attr('font-weight', 'bold') 97 | .text(data.y) 98 | ); 99 | } 100 | 101 | get yScale() { 102 | const { height, margin, series } = this; 103 | 104 | return scaleLinear() 105 | .domain([0, max(series, (d) => max(d, (d) => d[1]))]) 106 | .nice() 107 | .range([height - margin.bottom, margin.top]); 108 | } 109 | 110 | @action refreshChart(element) { 111 | if (element.element) { 112 | element = element.element; 113 | } 114 | 115 | this.clearSvg(element); 116 | this.measureDimensions(element); 117 | this.drawChart(element); 118 | } 119 | 120 | clearSvg(element) { 121 | element.querySelector('svg').innerHTML = ''; 122 | } 123 | 124 | measureDimensions(element) { 125 | const { clientHeight, clientWidth } = element; 126 | 127 | this.height = clientHeight; 128 | this.width = clientWidth; 129 | } 130 | 131 | @action drawChart(element) { 132 | const { height, width } = this; 133 | const { color, series, xAxis, yAxis, xScale, yScale } = this; 134 | 135 | const svg = select(element.querySelector('svg')); 136 | 137 | svg.attr('viewBox', [0, 0, width, height]); 138 | 139 | svg 140 | .append('g') 141 | .selectAll('g') 142 | .data(series) 143 | .join('g') 144 | .attr('fill', ({ key }) => color(key)) 145 | .call((g) => 146 | g 147 | .selectAll('rect') 148 | .data((d) => d) 149 | .join('rect') 150 | .attr('x', (d) => xScale(d.data.year)) 151 | .attr('y', (d) => yScale(d[1])) 152 | .attr('width', xScale.bandwidth() - 1) 153 | .attr('height', (d) => Math.max(yScale(d[0]) - yScale(d[1]), 0)) 154 | .append('title') 155 | .text((d) => `${d.data.musicFormat}, ${d.data.year} ${formatRevenue(d.data.revenue)}`) 156 | ); 157 | 158 | svg.append('g').call(xAxis); 159 | svg.append('g').call(yAxis); 160 | } 161 | } 162 | -------------------------------------------------------------------------------- /typedoc-theme/assets/js/src/typedoc/components/Signature.ts: -------------------------------------------------------------------------------- 1 | import { Component, IComponentOptions } from "../Component"; 2 | import { Viewport } from "../services/Viewport"; 3 | 4 | /** 5 | * Holds a signature and its description. 6 | */ 7 | class SignatureGroup { 8 | /** 9 | * The target signature. 10 | */ 11 | signature: Element; 12 | 13 | /** 14 | * The description for the signature. 15 | */ 16 | description: Element; 17 | 18 | /** 19 | * Create a new SignatureGroup instance. 20 | * 21 | * @param signature The target signature. 22 | * @param description The description for the signature. 23 | */ 24 | constructor(signature: Element, description: Element) { 25 | this.signature = signature; 26 | this.description = description; 27 | } 28 | 29 | /** 30 | * Add the given class to all elements of the group. 31 | * 32 | * @param className The class name to add. 33 | */ 34 | addClass(className: string): SignatureGroup { 35 | this.signature.classList.add(className); 36 | this.description.classList.add(className); 37 | return this; 38 | } 39 | 40 | /** 41 | * Remove the given class from all elements of the group. 42 | * 43 | * @param className The class name to remove. 44 | */ 45 | removeClass(className: string): SignatureGroup { 46 | this.signature.classList.remove(className); 47 | this.description.classList.remove(className); 48 | return this; 49 | } 50 | } 51 | 52 | /** 53 | * Controls the tab like behaviour of methods and functions with multiple signatures. 54 | */ 55 | export class Signature extends Component { 56 | /** 57 | * List of found signature groups. 58 | */ 59 | private groups: SignatureGroup[] = []; 60 | 61 | /** 62 | * The container holding all the descriptions. 63 | */ 64 | private container?: HTMLElement; 65 | 66 | /** 67 | * The index of the currently displayed signature. 68 | */ 69 | private index: number = -1; 70 | 71 | /** 72 | * Create a new Signature instance. 73 | * 74 | * @param options Backbone view constructor options. 75 | */ 76 | constructor(options: IComponentOptions) { 77 | super(options); 78 | 79 | this.createGroups(); 80 | 81 | if (this.container) { 82 | this.el.classList.add("active"); 83 | Array.from(this.el.children).forEach((signature) => { 84 | signature.addEventListener("touchstart", (event) => 85 | this.onClick(event) 86 | ); 87 | signature.addEventListener("click", (event) => 88 | this.onClick(event) 89 | ); 90 | }); 91 | this.container.classList.add("active"); 92 | this.setIndex(0); 93 | } 94 | } 95 | 96 | /** 97 | * Set the index of the active signature. 98 | * 99 | * @param index The index of the signature to activate. 100 | */ 101 | private setIndex(index: number) { 102 | if (index < 0) index = 0; 103 | if (index > this.groups.length - 1) index = this.groups.length - 1; 104 | if (this.index == index) return; 105 | 106 | const to = this.groups[index]; 107 | if (this.index > -1) { 108 | const from = this.groups[this.index]; 109 | 110 | from.removeClass("current").addClass("fade-out"); 111 | to.addClass("current"); 112 | to.addClass("fade-in"); 113 | Viewport.instance.triggerResize(); 114 | 115 | setTimeout(() => { 116 | from.removeClass("fade-out"); 117 | to.removeClass("fade-in"); 118 | }, 300); 119 | } else { 120 | to.addClass("current"); 121 | Viewport.instance.triggerResize(); 122 | } 123 | 124 | this.index = index; 125 | } 126 | 127 | /** 128 | * Find all signature/description groups. 129 | */ 130 | private createGroups() { 131 | const signatures = this.el.children; 132 | if (signatures.length < 2) return; 133 | 134 | this.container = this.el.nextElementSibling as HTMLElement; 135 | const descriptions = this.container.children; 136 | 137 | this.groups = []; 138 | for (let index = 0; index < signatures.length; index++) { 139 | this.groups.push( 140 | new SignatureGroup(signatures[index], descriptions[index]) 141 | ); 142 | } 143 | } 144 | 145 | /** 146 | * Triggered when the user clicks onto a signature header. 147 | * 148 | * @param e The related event object. 149 | */ 150 | private onClick(e: Event) { 151 | this.groups.forEach((group, index) => { 152 | if (group.signature === e.currentTarget) { 153 | this.setIndex(index); 154 | } 155 | }); 156 | } 157 | } 158 | -------------------------------------------------------------------------------- /typedoc-theme/assets/css/elements/_navigation.sass: -------------------------------------------------------------------------------- 1 | // Base format for the navigation parts. 2 | // 3 | =INDENT($DEPTH, $BASE, $STEP, $PROGRESS:$DEPTH) 4 | @if $PROGRESS > 0 5 | & li 6 | +INDENT($DEPTH, $BASE, $STEP, $PROGRESS - 1) 7 | @else 8 | & a 9 | padding-left: #{($BASE + $STEP * ($DEPTH - 1))}px 10 | 11 | =INDENTS($COUNT, $BASE, $STEP) 12 | @for $DEPTH from 1 through $COUNT 13 | +INDENT($DEPTH, $BASE, $STEP) 14 | 15 | .tsd-navigation 16 | margin: 0 0 0 40px 17 | 18 | a 19 | display: block 20 | padding-top: 2px 21 | padding-bottom: 2px 22 | border-left: 2px solid transparent 23 | color: var(--color-text) 24 | text-decoration: none 25 | transition: border-left-color 0.1s 26 | 27 | &:hover 28 | text-decoration: underline 29 | 30 | ul 31 | margin: 0 32 | padding: 0 33 | list-style: none 34 | 35 | li 36 | padding: 0 37 | 38 | // Primary part of the navigation containing the available modules. 39 | // 40 | // 53 | // 54 | .tsd-navigation.primary 55 | padding-bottom: 40px 56 | 57 | a 58 | display: block 59 | padding-top: 6px 60 | padding-bottom: 6px 61 | 62 | ul 63 | +INDENTS(6, 5, 20) 64 | 65 | > ul 66 | border-bottom: 1px solid var(--color-panel-divider) 67 | 68 | li 69 | border-top: 1px solid var(--color-panel-divider) 70 | 71 | &.current > a 72 | font-weight: bold 73 | 74 | &.label span 75 | display: block 76 | padding: 20px 0 6px 5px 77 | color: var(--color-menu-label) 78 | 79 | &.globals + li > span, 80 | &.globals + li > a 81 | padding-top: 20px 82 | 83 | // Secondary part of the navigation containing the table of contents 84 | // of the current module. 85 | // Can be made sticky by `typedoc.MenuSticky` and will highlight current sticky with `typedoc.MenuHighlight`. 86 | // 87 | // 109 | // 110 | .tsd-navigation.secondary 111 | max-height: calc(100vh - 1rem - #{$TOOLBAR_HEIGHT}) 112 | overflow: auto 113 | position: -webkit-sticky 114 | position: sticky 115 | top: calc(.5rem + #{$TOOLBAR_HEIGHT}) 116 | transition: .3s 117 | 118 | &.tsd-navigation--toolbar-hide 119 | max-height: calc(100vh - 1rem) 120 | top: .5rem 121 | 122 | ul 123 | +INDENTS(6, 25, 20) 124 | transition: opacity 0.2s 125 | 126 | &.current a 127 | border-left-color: var(--color-panel-divider) 128 | 129 | li.focus > a, 130 | ul.current li.focus > a 131 | border-left-color: var(--color-menu-divider-focus) 132 | 133 | li.current 134 | margin-top: 20px 135 | margin-bottom: 20px 136 | border-left-color: var(--color-panel-divider) 137 | 138 | > a 139 | font-weight: bold 140 | 141 | // Sticky menu setup 142 | // 143 | .menu-sticky-wrap 144 | +size-md-lg 145 | position: static 146 | -------------------------------------------------------------------------------- /typedoc-theme/assets/css/setup/_icons.scss: -------------------------------------------------------------------------------- 1 | $type-icons: (object-literal), (class), ("class.tsd-has-type-parameter"), 2 | (interface), ("interface.tsd-has-type-parameter"), (namespace, module), 3 | (enum), (enum-member), (signature), (type-alias), 4 | ("type-alias.tsd-has-type-parameter"); 5 | 6 | $member-icons: (variable, property), (get-signature), (set-signature), 7 | (accessor), (function, method, call-signature), 8 | ("function.tsd-has-type-parameter", "method.tsd-has-type-parameter"), 9 | (constructor, constructor-signature), (index-signature), (event), (property), 10 | (function, method, call-signature), (event); 11 | 12 | // parameter 13 | // type-literal 14 | // type-parameter 15 | 16 | .tsd-kind-icon { 17 | display: block; 18 | position: relative; 19 | padding-left: 20px; 20 | text-indent: -20px; 21 | 22 | &:before { 23 | content: ""; 24 | display: inline-block; 25 | vertical-align: middle; 26 | width: 17px; 27 | height: 17px; 28 | margin: 0 3px 2px 0; 29 | background-image: url(../../images/icons.png); 30 | 31 | @include retina { 32 | background-image: url(../../images/icons@2x.png); 33 | background-size: 238px 204px; 34 | } 35 | } 36 | } 37 | 38 | .tsd-signature.tsd-kind-icon:before { 39 | background-position: 0 -153px; 40 | } 41 | 42 | $icon-size: 17px; 43 | $type: -0 * $icon-size; 44 | $type-protected: -1 * $icon-size; 45 | $type-private: -2 * $icon-size; 46 | $member-class-public: -3 * $icon-size; 47 | $member-class-public-inherited: -4 * $icon-size; 48 | $member-class-protected: -5 * $icon-size; 49 | $member-class-protected-inherited: -6 * $icon-size; 50 | $member-private: -7 * $icon-size; 51 | $member: -8 * $icon-size; 52 | $member-protected: -9 * $icon-size; 53 | $member-enum: -10 * $icon-size; 54 | $member-enum-protected: -11 * $icon-size; 55 | $member-interface: -12 * $icon-size; 56 | $member-interface-inherited: -13 * $icon-size; 57 | 58 | @for $index from 1 through length($type-icons) { 59 | @each $kind in nth($type-icons, $index) { 60 | $selector: ".tsd-kind-" + $kind; 61 | $offset: -#{17 * ($index)}px; 62 | 63 | #{$selector} { 64 | > .tsd-kind-icon:before { 65 | background-position: $type $offset; 66 | } 67 | 68 | &.tsd-is-protected > .tsd-kind-icon:before { 69 | background-position: $type-protected $offset; 70 | } 71 | 72 | &.tsd-is-private > .tsd-kind-icon:before { 73 | background-position: $type-private $offset; 74 | } 75 | } 76 | } 77 | } 78 | 79 | @for $index from 1 through length($member-icons) { 80 | @each $kind in nth($member-icons, $index) { 81 | $offset: -#{17 * ($index - 1)}px; 82 | $selector: ".tsd-kind-" + $kind; 83 | @if $index == 10 { 84 | $selector: ".tsd-is-static"; 85 | } @else if $index > 10 { 86 | $selector: ".tsd-is-static.tsd-kind-" + $kind; 87 | } 88 | 89 | #{$selector} { 90 | > .tsd-kind-icon:before { 91 | background-position: $member $offset; 92 | } 93 | 94 | &.tsd-is-protected > .tsd-kind-icon:before { 95 | background-position: $member-protected $offset; 96 | } 97 | 98 | &.tsd-is-private > .tsd-kind-icon:before { 99 | background-position: $member-private $offset; 100 | } 101 | 102 | &.tsd-parent-kind-class { 103 | > .tsd-kind-icon:before { 104 | background-position: $member-class-public $offset; 105 | } 106 | 107 | &.tsd-is-inherited > .tsd-kind-icon:before { 108 | background-position: $member-class-public-inherited $offset; 109 | } 110 | 111 | &.tsd-is-protected > .tsd-kind-icon:before { 112 | background-position: $member-class-protected $offset; 113 | } 114 | 115 | &.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { 116 | background-position: $member-class-protected-inherited 117 | $offset; 118 | } 119 | 120 | &.tsd-is-private > .tsd-kind-icon:before { 121 | background-position: $member-private $offset; 122 | } 123 | } 124 | 125 | &.tsd-parent-kind-enum { 126 | > .tsd-kind-icon:before { 127 | background-position: $member-enum $offset; 128 | } 129 | 130 | &.tsd-is-protected > .tsd-kind-icon:before { 131 | background-position: $member-enum-protected $offset; 132 | } 133 | 134 | &.tsd-is-private > .tsd-kind-icon:before { 135 | background-position: $member-private $offset; 136 | } 137 | } 138 | 139 | &.tsd-parent-kind-interface { 140 | > .tsd-kind-icon:before { 141 | background-position: $member-interface $offset; 142 | } 143 | 144 | &.tsd-is-inherited > .tsd-kind-icon:before { 145 | background-position: $member-interface-inherited $offset; 146 | } 147 | } 148 | } 149 | } 150 | } 151 | --------------------------------------------------------------------------------