Skip to content

Commit

Permalink
chore: Temporarily committed declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
ijlee2 committed Aug 13, 2024
1 parent c86baa8 commit 054ee20
Show file tree
Hide file tree
Showing 28 changed files with 158 additions and 2 deletions.
1 change: 0 additions & 1 deletion docs/my-v2-addon/.gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# compiled output
/declarations/
/dist/

# dependencies
Expand Down
19 changes: 19 additions & 0 deletions docs/my-v2-addon/declarations/components/navigation-menu.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import Component from '@glimmer/component';
type MenuItem = {
label: string;
route: string;
};
interface NavigationMenuSignature {
Args: {
menuItems: MenuItem[];
name?: string;
};
}
export default class NavigationMenuComponent extends Component<NavigationMenuSignature> {
styles: {
readonly link: string;
readonly list: string;
};
}
export {};
//# sourceMappingURL=navigation-menu.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 28 additions & 0 deletions docs/my-v2-addon/declarations/components/ui/page.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import Component from '@glimmer/component';
import type { WithBoundArgs } from '@glint/template';
import type UiPageDemoComponent from './page/demo.ts';
import type UiPageSectionComponent from './page/section.ts';
import type UiPageSubsectionComponent from './page/subsection.ts';
interface UiPageSignature {
Args: {
title: string;
};
Blocks: {
default: [
{
Demo: WithBoundArgs<typeof UiPageDemoComponent, never>;
Section: WithBoundArgs<typeof UiPageSectionComponent, never>;
Subsection: WithBoundArgs<typeof UiPageSubsectionComponent, never>;
}
];
};
}
export default class UiPageComponent extends Component<UiPageSignature> {
styles: {
readonly container: string;
readonly content: string;
readonly title: string;
};
}
export {};
//# sourceMappingURL=page.d.ts.map
1 change: 1 addition & 0 deletions docs/my-v2-addon/declarations/components/ui/page.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions docs/my-v2-addon/declarations/components/ui/page/demo.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import Component from '@glimmer/component';
interface UiPageDemoSignature {
Blocks: {
default: [];
};
}
export default class UiPageDemoComponent extends Component<UiPageDemoSignature> {
styles: {
readonly demo: string;
};
}
export {};
//# sourceMappingURL=demo.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions docs/my-v2-addon/declarations/components/ui/page/section.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import Component from '@glimmer/component';
interface UiPageSectionSignature {
Blocks: {
content: [];
title: [];
};
}
export default class UiPageSectionComponent extends Component<UiPageSectionSignature> {
styles: {
readonly section: string;
readonly title: string;
};
}
export {};
//# sourceMappingURL=section.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions docs/my-v2-addon/declarations/components/ui/page/subsection.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import Component from '@glimmer/component';
interface UiPageSubsectionSignature {
Blocks: {
content: [];
title: [];
};
}
export default class UiPageSubsectionComponent extends Component<UiPageSubsectionSignature> {
styles: {
readonly subsection: string;
readonly title: string;
};
}
export {};
//# sourceMappingURL=subsection.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions docs/my-v2-addon/declarations/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export { default as NavigationMenu } from './components/navigation-menu.ts';
export { default as UiPage } from './components/ui/page.ts';
//# sourceMappingURL=index.d.ts.map
1 change: 1 addition & 0 deletions docs/my-v2-addon/declarations/index.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions docs/my-v2-addon/declarations/template-registry.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import type NavigationMenuComponent from './components/navigation-menu.ts';
import type UiPageComponent from './components/ui/page.ts';
import type UiPageDemoComponent from './components/ui/page/demo.ts';
import type UiPageSectionComponent from './components/ui/page/section.ts';
import type UiPageSubsectionComponent from './components/ui/page/subsection.ts';
export default interface MyV2AddonRegistry {
NavigationMenu: typeof NavigationMenuComponent;
'Ui::Page': typeof UiPageComponent;
'Ui::Page::Demo': typeof UiPageDemoComponent;
'Ui::Page::Section': typeof UiPageSectionComponent;
'Ui::Page::Subsection': typeof UiPageSubsectionComponent;
'ui/page/demo': typeof UiPageDemoComponent;
'ui/page/section': typeof UiPageSectionComponent;
'ui/page/subsection': typeof UiPageSubsectionComponent;
}
//# sourceMappingURL=template-registry.d.ts.map
1 change: 1 addition & 0 deletions docs/my-v2-addon/declarations/template-registry.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions docs/my-v2-addon/declarations/test-support.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export * from './test-support/components/navigation-menu.ts';
export * from './test-support/components/ui/page.ts';
//# sourceMappingURL=test-support.d.ts.map
1 change: 1 addition & 0 deletions docs/my-v2-addon/declarations/test-support.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import styles from '../../components/navigation-menu.css';
type LocalClassName = keyof typeof styles;
export declare function getClassForNavigationMenu(localClassName: LocalClassName): string;
export {};
//# sourceMappingURL=navigation-menu.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import styles from '../../../components/ui/page.css';
type LocalClassName = keyof typeof styles;
export declare function getClassForUiPage(localClassName: LocalClassName): string;
export {};
//# sourceMappingURL=page.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion packages/embroider-css-modules/.gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# compiled output
/declarations/
/dist/

# dependencies
Expand Down
16 changes: 16 additions & 0 deletions packages/embroider-css-modules/declarations/helpers/local.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import Helper from '@ember/component/helper';
type IndexSignatureParameter = string | number | symbol;
type LocalClassName<T extends IndexSignatureParameter> = T;
type Styles<T extends IndexSignatureParameter> = Record<LocalClassName<T>, string>;
type MaybeLocalClassName<T extends IndexSignatureParameter> = LocalClassName<T>[] | LocalClassName<T> | undefined | null;
interface LocalSignature<T extends IndexSignatureParameter> {
Args: {
Positional: [Styles<T>, ...MaybeLocalClassName<T>[]];
};
Return: string;
}
export default class LocalHelper<T extends IndexSignatureParameter> extends Helper<LocalSignature<T>> {
compute(positional: LocalSignature<T>['Args']['Positional']): string;
}
export {};
//# sourceMappingURL=local.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions packages/embroider-css-modules/declarations/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export { default as local } from './helpers/local.ts';
//# sourceMappingURL=index.d.ts.map
1 change: 1 addition & 0 deletions packages/embroider-css-modules/declarations/index.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import type LocalHelper from './helpers/local.ts';
export default interface EmbroiderCssModulesRegistry {
local: typeof LocalHelper;
}
//# sourceMappingURL=template-registry.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 054ee20

Please sign in to comment.