@powerlines/plugin-alloy 0.26.164 → 0.26.166

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  import { Children, Context } from "@alloy-js/core";
2
- import { ResolvedEntryTypeDefinition, StoragePreset } from "powerlines";
2
+ import { ResolvedEntryFileReference, StoragePreset } from "powerlines";
3
3
  import { SourceFileContext } from "@alloy-js/typescript";
4
4
 
5
5
  //#region src/types/components.d.ts
@@ -32,7 +32,7 @@ type OutputFile = (WriteOutputFile & {
32
32
  kind: "file";
33
33
  }) | (WriteOutputFile & {
34
34
  kind: "entry";
35
- typeDefinition?: ResolvedEntryTypeDefinition;
35
+ typeDefinition?: ResolvedEntryFileReference;
36
36
  }) | (WriteOutputFile & {
37
37
  kind: "builtin";
38
38
  id: string;
@@ -43,7 +43,7 @@ interface OutputDirectory {
43
43
  contents: (OutputDirectory | OutputFile)[];
44
44
  }
45
45
  interface RenderEntryContext {
46
- typeDefinition: ResolvedEntryTypeDefinition;
46
+ typeDefinition: ResolvedEntryFileReference;
47
47
  }
48
48
  interface RenderBuiltinContext {
49
49
  id: string;
@@ -1 +1 @@
1
- {"version":3,"file":"components.d.cts","names":[],"sources":["../../src/types/components.ts"],"mappings":";;;;;UAsBiB,cAAA;EACf,IAAA;EACA,IAAA;EACA,UAAA;;;;;;;EAQA,MAAA,GAAS,aAAa;AAAA;AAAA,UAGP,eAAA;EACf,IAAA;EACA,IAAA;EACA,QAAA;EACA,QAAA;EAHA;;;;;;EAWA,MAAA,GAAS,aAAa;AAAA;AAAA,KAGZ,UAAA,IACP,eAAA;EAAoB,IAAA;AAAA,MACpB,eAAA;EACC,IAAA;EACA,cAAA,GAAiB,2BAAA;AAAA,MAElB,eAAA;EAAoB,IAAA;EAAiB,EAAA;AAAA,KACtC,cAAA;AAAA,UAEa,eAAA;EACf,IAAA;EACA,IAAA;EACA,QAAA,GAAW,eAAA,GAAkB,UAAU;AAAA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+1,6 @@
1
1
  import { Children, Context } from "@alloy-js/core";
2
2
  import { SourceFileContext as SourceFileContext$1 } from "@alloy-js/typescript";
3
- import { ResolvedEntryTypeDefinition, StoragePreset } from "powerlines";
3
+ import { ResolvedEntryFileReference, StoragePreset } from "powerlines";
4
4
 
5
5
  //#region src/types/components.d.ts
6
6
  interface CopyOutputFile {
@@ -32,7 +32,7 @@ type OutputFile = (WriteOutputFile & {
32
32
  kind: "file";
33
33
  }) | (WriteOutputFile & {
34
34
  kind: "entry";
35
- typeDefinition?: ResolvedEntryTypeDefinition;
35
+ typeDefinition?: ResolvedEntryFileReference;
36
36
  }) | (WriteOutputFile & {
37
37
  kind: "builtin";
38
38
  id: string;
@@ -43,7 +43,7 @@ interface OutputDirectory {
43
43
  contents: (OutputDirectory | OutputFile)[];
44
44
  }
45
45
  interface RenderEntryContext {
46
- typeDefinition: ResolvedEntryTypeDefinition;
46
+ typeDefinition: ResolvedEntryFileReference;
47
47
  }
48
48
  interface RenderBuiltinContext {
49
49
  id: string;
@@ -1 +1 @@
1
- {"version":3,"file":"components.d.mts","names":[],"sources":["../../src/types/components.ts"],"mappings":";;;;;UAsBiB,cAAA;EACf,IAAA;EACA,IAAA;EACA,UAAA;;;;;;;EAQA,MAAA,GAAS,aAAa;AAAA;AAAA,UAGP,eAAA;EACf,IAAA;EACA,IAAA;EACA,QAAA;EACA,QAAA;EAHA;;;;;;EAWA,MAAA,GAAS,aAAa;AAAA;AAAA,KAGZ,UAAA,IACP,eAAA;EAAoB,IAAA;AAAA,MACpB,eAAA;EACC,IAAA;EACA,cAAA,GAAiB,2BAAA;AAAA,MAElB,eAAA;EAAoB,IAAA;EAAiB,EAAA;AAAA,KACtC,cAAA;AAAA,UAEa,eAAA;EACf,IAAA;EACA,IAAA;EACA,QAAA,GAAW,eAAA,GAAkB,UAAU;AAAA;AAAA,UAGxB,kBAAA;EACf,cAAA,EAAgB,2BAA2B;AAAA;AAAA,UAG5B,oBAAA;EACf,EAAE;AAAA;A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AAA;AAAA,MAElB,eAAA;EAAoB,IAAA;EAAiB,EAAA;AAAA,KACtC,cAAA;AAAA,UAEa,eAAA;EACf,IAAA;EACA,IAAA;EACA,QAAA,GAAW,eAAA,GAAkB,UAAU;AAAA;AAAA,UAGxB,kBAAA;EACf,cAAA,EAAgB,0BAA0B;AAAA;AAAA,UAG3B,oBAAA;EACf,EAAE;AAAA;AAAA,UAGa,mBAAA;EACf,IAAA,GAAO,aAAa;AAAA;AAAA,UAGL,qBAAA;EACf,IAAA;EACA,UAAU;AAAA;AAAA,UAGK,aAAA,SAAsB,OAAA;EACrC,IAAA;IACE,QAAA,GAAW,qBAAA;IAtBgB;;AAAU;IA2BrC,OAAA,GAAU,oBAAA;IAxBqB;;;IA6B/B,KAAA,GAAQ,kBAAA;IAzBK;;;IA8Bb,MAAA,GAAS,mBAAA;EAAA,IACP,MAAA;AAAA;;;;UAMW,cAAA;EACf,QAAA,GAAW,QAAQ;AAAA;;;AA5BT;KAkCA,0BAAA,GAA6B,IAAA,CAAK,cAAA,gBAC5C,QAAA,CAAS,IAAA,CAAK,cAAA;AAAA,UAEC,wBAAA,SAAiC,mBAAiB;;;;EAIjE,EAAE;AAAA;AAAA,UAGa,2BAAA;EACf,IAAA,YAAgB,QAAA;EAChB,IAAA,YAAgB,QAAA;EAChB,OAAA;EACA,YAAA,GAAe,OAAA,CAAQ,CAAA;AAAA;AAAA,UAGR,wBAAA;EACf,IAAA;EACA,OAAA;EACA,KAAA;EACA,IAAA;AAAA;AAAA,KAGU,qBAAA,GAAwB,MAAA,yBAElB,KAAA,CAAM,wBAAA;AAAA,UAGP,qBAAA,SAA8B,cAAc;EA1CvD;;AAAM;AAMZ;;EA0CE,aAAA;EAzCA;AAAmB;AAMrB;;;EA0CE,YAAA;EA1CuC;;;;;EAiDvC,eAAA;AAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"components.mjs","names":[],"sources":["../../src/types/components.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport type { Children, Context } from \"@alloy-js/core\";\nimport type { SourceFileContext } from \"@alloy-js/typescript\";\nimport { ResolvedEntryTypeDefinition, StoragePreset } from \"powerlines\";\n\nexport interface CopyOutputFile {\n kind: \"file\";\n path: string;\n sourcePath: string;\n\n /**\n * The format of the output files\n *\n * @remarks\n * If not specified, the output mode will be determined by the provided \\`output.mode\\` value.\n */\n preset?: StoragePreset;\n}\n\nexport interface WriteOutputFile {\n kind: \"file\" | \"entry\" | \"builtin\";\n path: string;\n contents: string;\n filetype: string;\n\n /**\n * The format of the output files\n *\n * @remarks\n * If not specified, the output mode will be determined by the provided \\`output.mode\\` value.\n */\n preset?: StoragePreset;\n}\n\nexport type OutputFile =\n | (WriteOutputFile & { kind: \"file\" })\n | (WriteOutputFile & {\n kind: \"entry\";\n typeDefinition?: ResolvedEntryTypeDefinition;\n })\n | (WriteOutputFile & { kind: \"builtin\"; id: string })\n | CopyOutputFile;\n\nexport interface OutputDirectory {\n kind: \"directory\";\n path: string;\n contents: (OutputDirectory | OutputFile)[];\n}\n\nexport interface RenderEntryContext {\n typeDefinition: ResolvedEntryTypeDefinition;\n}\n\nexport interface RenderBuiltinContext {\n id: string;\n}\n\nexport interface RenderOutputContext {\n mode?: StoragePreset;\n}\n\nexport interface CopyFileOutputContext {\n path?: string;\n sourcePath?: string;\n}\n\nexport interface RenderContext extends Context {\n meta?: {\n copyFile?: CopyFileOutputContext;\n\n /**\n * The current context for the built-in module.\n */\n builtin?: RenderBuiltinContext;\n\n /**\n * The current context for the application entrypoint file being rendered.\n */\n entry?: RenderEntryContext;\n\n /**\n * The current context for output rendering.\n */\n output?: RenderOutputContext;\n } & Record<string, any>;\n}\n\n/**\n * A type that represents the props of a component that can have children.\n */\nexport interface ComponentProps {\n children?: Children;\n}\n\n/**\n * A type that requires the `children` prop in a component.\n */\nexport type ComponentPropsWithChildren = Omit<ComponentProps, \"children\"> &\n Required<Pick<ComponentProps, \"children\">>;\n\nexport interface BuiltinSourceFileContext extends SourceFileContext {\n /**\n * The runtime module identifier.\n */\n id: string;\n}\n\nexport interface ReflectionOverrideInterface<T> {\n name?: string | Children;\n type?: string | Children;\n extends?: string | false;\n defaultValue?: Partial<T>;\n}\n\nexport interface TypescriptFileImportItem {\n name: string;\n default?: boolean;\n alias?: string;\n type?: boolean;\n}\n\nexport type TypescriptFileImports = Record<\n string,\n null | string | Array<TypescriptFileImportItem | string>\n>;\n\nexport interface SourceFileHeaderProps extends ComponentProps {\n /**\n * If true, disables the ESLint directive at the top of the file.\n *\n * @defaultValue true\n */\n disableEslint?: boolean;\n\n /**\n * If true, disables the Biome directive at the top of the file.\n *\n * @defaultValue true\n */\n disableBiome?: boolean;\n\n /**\n * If true, disables the Prettier directive at the top of the file.\n *\n * @defaultValue false\n */\n disablePrettier?: boolean;\n}\n"],"mappings":""}
1
+ {"version":3,"file":"components.mjs","names":[],"sources":["../../src/types/components.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport type { Children, Context } from \"@alloy-js/core\";\nimport type { SourceFileContext } from \"@alloy-js/typescript\";\nimport { ResolvedEntryFileReference, StoragePreset } from \"powerlines\";\n\nexport interface CopyOutputFile {\n kind: \"file\";\n path: string;\n sourcePath: string;\n\n /**\n * The format of the output files\n *\n * @remarks\n * If not specified, the output mode will be determined by the provided \\`output.mode\\` value.\n */\n preset?: StoragePreset;\n}\n\nexport interface WriteOutputFile {\n kind: \"file\" | \"entry\" | \"builtin\";\n path: string;\n contents: string;\n filetype: string;\n\n /**\n * The format of the output files\n *\n * @remarks\n * If not specified, the output mode will be determined by the provided \\`output.mode\\` value.\n */\n preset?: StoragePreset;\n}\n\nexport type OutputFile =\n | (WriteOutputFile & { kind: \"file\" })\n | (WriteOutputFile & {\n kind: \"entry\";\n typeDefinition?: ResolvedEntryFileReference;\n })\n | (WriteOutputFile & { kind: \"builtin\"; id: string })\n | CopyOutputFile;\n\nexport interface OutputDirectory {\n kind: \"directory\";\n path: string;\n contents: (OutputDirectory | OutputFile)[];\n}\n\nexport interface RenderEntryContext {\n typeDefinition: ResolvedEntryFileReference;\n}\n\nexport interface RenderBuiltinContext {\n id: string;\n}\n\nexport interface RenderOutputContext {\n mode?: StoragePreset;\n}\n\nexport interface CopyFileOutputContext {\n path?: string;\n sourcePath?: string;\n}\n\nexport interface RenderContext extends Context {\n meta?: {\n copyFile?: CopyFileOutputContext;\n\n /**\n * The current context for the built-in module.\n */\n builtin?: RenderBuiltinContext;\n\n /**\n * The current context for the application entrypoint file being rendered.\n */\n entry?: RenderEntryContext;\n\n /**\n * The current context for output rendering.\n */\n output?: RenderOutputContext;\n } & Record<string, any>;\n}\n\n/**\n * A type that represents the props of a component that can have children.\n */\nexport interface ComponentProps {\n children?: Children;\n}\n\n/**\n * A type that requires the `children` prop in a component.\n */\nexport type ComponentPropsWithChildren = Omit<ComponentProps, \"children\"> &\n Required<Pick<ComponentProps, \"children\">>;\n\nexport interface BuiltinSourceFileContext extends SourceFileContext {\n /**\n * The runtime module identifier.\n */\n id: string;\n}\n\nexport interface ReflectionOverrideInterface<T> {\n name?: string | Children;\n type?: string | Children;\n extends?: string | false;\n defaultValue?: Partial<T>;\n}\n\nexport interface TypescriptFileImportItem {\n name: string;\n default?: boolean;\n alias?: string;\n type?: boolean;\n}\n\nexport type TypescriptFileImports = Record<\n string,\n null | string | Array<TypescriptFileImportItem | string>\n>;\n\nexport interface SourceFileHeaderProps extends ComponentProps {\n /**\n * If true, disables the ESLint directive at the top of the file.\n *\n * @defaultValue true\n */\n disableEslint?: boolean;\n\n /**\n * If true, disables the Biome directive at the top of the file.\n *\n * @defaultValue true\n */\n disableBiome?: boolean;\n\n /**\n * If true, disables the Prettier directive at the top of the file.\n *\n * @defaultValue false\n */\n disablePrettier?: boolean;\n}\n"],"mappings":""}
@@ -1,5 +1,5 @@
1
1
  import { TypescriptFileProps } from "./typescript-file.cjs";
2
- import { ResolvedEntryTypeDefinition } from "powerlines";
2
+ import { ResolvedEntryFileReference } from "powerlines";
3
3
 
4
4
  //#region src/typescript/components/entry-file.d.ts
5
5
  type EntryFileProps = TypescriptFileProps & {
@@ -12,7 +12,7 @@ type EntryFileProps = TypescriptFileProps & {
12
12
  /**
13
13
  * Render metadata information about the entrypoint
14
14
  */
15
- typeDefinition?: ResolvedEntryTypeDefinition;
15
+ typeDefinition?: ResolvedEntryFileReference;
16
16
  };
17
17
  /**
18
18
  * A base component representing a Powerlines generated Typescript source file.
@@ -1 +1 @@
1
- {"version":3,"file":"entry-file.d.cts","names":[],"sources":["../../../src/typescript/components/entry-file.tsx"],"mappings":";;;;KA4BY,cAAA,GAAiB,mBAAA;;AAA7B;;;;EAME,GAAA;EAAA;;;EAKA,cAAA,GAAiB,2BAA2B;AAAA;AAS9C;;;;;;AAAA,iBAAgB,SAAA,CAAU,KAAA,EAAO,cAAc,4BAAA,QAAA"}
1
+ {"version":3,"file":"entry-file.d.cts","names":[],"sources":["../../../src/typescript/components/entry-file.tsx"],"mappings":";;;;KA4BY,cAAA,GAAiB,mBAAA;;AAA7B;;;;EAME,GAAA;EAAA;;;EAKA,cAAA,GAAiB,0BAA0B;AAAA;AAS7C;;;;;;AAAA,iBAAgB,SAAA,CAAU,KAAA,EAAO,cAAc,4BAAA,QAAA"}
@@ -1,5 +1,5 @@
1
1
  import { TypescriptFileProps } from "./typescript-file.mjs";
2
- import { ResolvedEntryTypeDefinition } from "powerlines";
2
+ import { ResolvedEntryFileReference } from "powerlines";
3
3
 
4
4
  //#region src/typescript/components/entry-file.d.ts
5
5
  type EntryFileProps = TypescriptFileProps & {
@@ -12,7 +12,7 @@ type EntryFileProps = TypescriptFileProps & {
12
12
  /**
13
13
  * Render metadata information about the entrypoint
14
14
  */
15
- typeDefinition?: ResolvedEntryTypeDefinition;
15
+ typeDefinition?: ResolvedEntryFileReference;
16
16
  };
17
17
  /**
18
18
  * A base component representing a Powerlines generated Typescript source file.
@@ -1 +1 @@
1
- {"version":3,"file":"entry-file.d.mts","names":[],"sources":["../../../src/typescript/components/entry-file.tsx"],"mappings":";;;;KA4BY,cAAA,GAAiB,mBAAA;;AAA7B;;;;EAME,GAAA;EAAA;;;EAKA,cAAA,GAAiB,2BAA2B;AAAA;AAS9C;;;;;;AAAA,iBAAgB,SAAA,CAAU,KAAA,EAAO,cAAc,4BAAA,QAAA"}
1
+ {"version":3,"file":"entry-file.d.mts","names":[],"sources":["../../../src/typescript/components/entry-file.tsx"],"mappings":";;;;KA4BY,cAAA,GAAiB,mBAAA;;AAA7B;;;;EAME,GAAA;EAAA;;;EAKA,cAAA,GAAiB,0BAA0B;AAAA;AAS7C;;;;;;AAAA,iBAAgB,SAAA,CAAU,KAAA,EAAO,cAAc,4BAAA,QAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"entry-file.mjs","names":[],"sources":["../../../src/typescript/components/entry-file.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { computed, splitProps } from \"@alloy-js/core\";\nimport { appendPath } from \"@stryke/path/append\";\nimport { hasFileExtension } from \"@stryke/path/file-path-fns\";\nimport { replaceExtension, replacePath } from \"@stryke/path/replace\";\nimport { isSet } from \"@stryke/type-checks/is-set\";\nimport defu from \"defu\";\nimport { ResolvedEntryTypeDefinition } from \"powerlines\";\nimport { usePowerlinesSafe } from \"../../core/contexts/context\";\nimport { TypescriptFile, TypescriptFileProps } from \"./typescript-file\";\n\nexport type EntryFileProps = TypescriptFileProps & {\n /**\n * Whether the file is a TSX file.\n *\n * @defaultValue false\n */\n tsx?: boolean;\n\n /**\n * Render metadata information about the entrypoint\n */\n typeDefinition?: ResolvedEntryTypeDefinition;\n};\n\n/**\n * A base component representing a Powerlines generated Typescript source file.\n *\n * @param props - The properties for the source file.\n * @returns The rendered source file component.\n */\nexport function EntryFile(props: EntryFileProps) {\n const [{ children, meta, tsx, path, typeDefinition }, rest] = splitProps(\n props,\n [\"children\", \"meta\", \"tsx\", \"path\", \"typeDefinition\"]\n );\n\n const context = usePowerlinesSafe();\n const fullPath = computed(() =>\n context\n ? appendPath(\n `${\n !isSet(tsx) ? path : replaceExtension(path)\n }${tsx ? \".tsx\" : hasFileExtension(path) ? \"\" : \".ts\"}`,\n replacePath(context.entryPath, context.config.cwd)\n )\n : path\n );\n\n return (\n <TypescriptFile\n {...rest}\n path={fullPath.value}\n meta={defu(\n {\n kind: \"entry\"\n },\n meta ?? {},\n {\n typeDefinition\n }\n )}>\n {children}\n </TypescriptFile>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAkCA,SAAe,UAAA,OAAA;UAEX,UACA,MACA,KACF,MACD;;;;;;;CAEC,MAAA,UAAA,kBAAA;CACA,MAAG,WAAc,eAAe,UAAC,WAAoB,GAAC,CAAA,MAAA,GAAW,IAAA,OAAW,iBAAA,IAAA,IAAA,MAAA,SAAA,iBAAA,IAAA,IAAA,KAAA,SAAA,YAAA,QAAA,WAAA,QAAA,OAAA,GAAA,CAAA,IAAA,IAAA;CAC7E,OAAA,gBAAA,gBAAA,WAAA,MAAA;EACG,IAAA,OAAW;GACX,OAAQ,SAAI;EACd;EACF,IAAO,OAAQ;GACb,OAAS,KAAA,EACP,MAAK,QACH,GAAA,QAAW,CAAC,GAAA,EACf;EAED;EACM;CACN,CAAC,CAAC;AACJ"}
1
+ {"version":3,"file":"entry-file.mjs","names":[],"sources":["../../../src/typescript/components/entry-file.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { computed, splitProps } from \"@alloy-js/core\";\nimport { appendPath } from \"@stryke/path/append\";\nimport { hasFileExtension } from \"@stryke/path/file-path-fns\";\nimport { replaceExtension, replacePath } from \"@stryke/path/replace\";\nimport { isSet } from \"@stryke/type-checks/is-set\";\nimport defu from \"defu\";\nimport { ResolvedEntryFileReference } from \"powerlines\";\nimport { usePowerlinesSafe } from \"../../core/contexts/context\";\nimport { TypescriptFile, TypescriptFileProps } from \"./typescript-file\";\n\nexport type EntryFileProps = TypescriptFileProps & {\n /**\n * Whether the file is a TSX file.\n *\n * @defaultValue false\n */\n tsx?: boolean;\n\n /**\n * Render metadata information about the entrypoint\n */\n typeDefinition?: ResolvedEntryFileReference;\n};\n\n/**\n * A base component representing a Powerlines generated Typescript source file.\n *\n * @param props - The properties for the source file.\n * @returns The rendered source file component.\n */\nexport function EntryFile(props: EntryFileProps) {\n const [{ children, meta, tsx, path, typeDefinition }, rest] = splitProps(\n props,\n [\"children\", \"meta\", \"tsx\", \"path\", \"typeDefinition\"]\n );\n\n const context = usePowerlinesSafe();\n const fullPath = computed(() =>\n context\n ? appendPath(\n `${\n !isSet(tsx) ? path : replaceExtension(path)\n }${tsx ? \".tsx\" : hasFileExtension(path) ? \"\" : \".ts\"}`,\n replacePath(context.entryPath, context.config.cwd)\n )\n : path\n );\n\n return (\n <TypescriptFile\n {...rest}\n path={fullPath.value}\n meta={defu(\n {\n kind: \"entry\"\n },\n meta ?? {},\n {\n typeDefinition\n }\n )}>\n {children}\n </TypescriptFile>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAkCA,SAAe,UAAA,OAAA;UAEX,UACA,MACA,KACF,MACD;;;;;;;CAEC,MAAA,UAAA,kBAAA;CACA,MAAG,WAAc,eAAe,UAAC,WAAoB,GAAC,CAAA,MAAA,GAAW,IAAA,OAAW,iBAAA,IAAA,IAAA,MAAA,SAAA,iBAAA,IAAA,IAAA,KAAA,SAAA,YAAA,QAAA,WAAA,QAAA,OAAA,GAAA,CAAA,IAAA,IAAA;CAC7E,OAAA,gBAAA,gBAAA,WAAA,MAAA;EACG,IAAA,OAAW;GACX,OAAQ,SAAI;EACd;EACF,IAAO,OAAQ;GACb,OAAS,KAAA,EACP,MAAK,QACH,GAAA,QAAW,CAAC,GAAA,EACf;EAED;EACM;CACN,CAAC,CAAC;AACJ"}
@@ -5,10 +5,10 @@ import { TypeParameters, TypeParametersProps } from "./type-parameters.cjs";
5
5
  import { ClassDeclaration, ClassDeclarationProps, ClassField, ClassFieldProps, ClassMember, ClassMemberProps, ClassMethod, ClassMethodProps, ClassPropertyGet, ClassPropertyProps, ClassPropertySet } from "./class-declaration.cjs";
6
6
  import { DynamicImportStatement, DynamicImportStatementProps } from "./dynamic-import-statement.cjs";
7
7
  import { EntryFile, EntryFileProps } from "./entry-file.cjs";
8
- import { InterfaceDeclaration, InterfaceDeclarationProperty, InterfaceDeclarationPropertyProps, InterfaceDeclarationProps, InterfaceExpression, InterfaceExpressionProps, InterfaceIndexerMemberProps, InterfaceMember, InterfaceMemberProps, InterfaceMemberPropsBase, InterfaceSchemaMemberProps } from "./interface-declaration.cjs";
8
+ import { InterfaceDeclaration, InterfaceDeclarationProperty, InterfaceDeclarationPropertyProps, InterfaceDeclarationProps, InterfaceExpression, InterfaceExpressionProps, InterfaceIndexerMemberProps, InterfaceMember, InterfaceMemberProps, InterfaceMemberPropsBase, InterfaceSchemaMemberProps, InterfaceTypeMemberProps } from "./interface-declaration.cjs";
9
9
  import { ObjectDeclaration, ObjectDeclarationProperty, ObjectDeclarationPropertyProps, ObjectDeclarationProps } from "./object-declaration.cjs";
10
10
  import { PropertyName, PropertyNameProps } from "./property-name.cjs";
11
11
  import { RecordExpression, RecordExpressionProps } from "./record-expression.cjs";
12
12
  import { TSDocObjectSchema, TSDocObjectSchemaProps, TSDocSchemaProperty, TSDocSchemaPropertyProps } from "./tsdoc-schema.cjs";
13
13
  import { TypeDeclaration, TypeDeclarationProps } from "./type-declaration.cjs";
14
- export { BuiltinFile, BuiltinFileProps, ClassDeclaration, ClassDeclarationProps, ClassField, ClassFieldProps, ClassMember, ClassMemberProps, ClassMethod, ClassMethodProps, ClassPropertyGet, ClassPropertyProps, ClassPropertySet, DynamicImportStatement, DynamicImportStatementProps, EntryFile, EntryFileProps, InterfaceDeclaration, InterfaceDeclarationProperty, InterfaceDeclarationPropertyProps, InterfaceDeclarationProps, InterfaceExpression, InterfaceExpressionProps, InterfaceIndexerMemberProps, InterfaceMember, InterfaceMemberProps, InterfaceMemberPropsBase, InterfaceSchemaMemberProps, ObjectDeclaration, ObjectDeclarationProperty, ObjectDeclarationPropertyProps, ObjectDeclarationProps, PropertyName, PropertyNameProps, RecordExpression, RecordExpressionProps, TSDoc, TSDocAlias, TSDocAttributesTags, TSDocAttributesTagsProps, TSDocDefaultValue, TSDocDefaultValueProps, TSDocDomain, TSDocExample, TSDocExampleProps, TSDocGroup, TSDocHidden, TSDocIgnore, TSDocInternal, TSDocLink, TSDocModule, TSDocModuleProps, TSDocObjectSchema, TSDocObjectSchemaProps, TSDocParam, TSDocParamProps, TSDocParams, TSDocParamsProps, TSDocPermission, TSDocProps, TSDocReadonly, TSDocRemarks, TSDocReturns, TSDocRuntime, TSDocSchemaProperty, TSDocSchemaPropertyProps, TSDocTag, TSDocTagProps, TSDocThrows, TSDocTitle, TypeDeclaration, TypeDeclarationProps, TypeParameters, TypeParametersProps, TypescriptFile, TypescriptFileHeader, TypescriptFileHeaderImports, TypescriptFileHeaderImportsProps, TypescriptFileHeaderProps, TypescriptFileProps };
14
+ export { BuiltinFile, BuiltinFileProps, ClassDeclaration, ClassDeclarationProps, ClassField, ClassFieldProps, ClassMember, ClassMemberProps, ClassMethod, ClassMethodProps, ClassPropertyGet, ClassPropertyProps, ClassPropertySet, DynamicImportStatement, DynamicImportStatementProps, EntryFile, EntryFileProps, InterfaceDeclaration, InterfaceDeclarationProperty, InterfaceDeclarationPropertyProps, InterfaceDeclarationProps, InterfaceExpression, InterfaceExpressionProps, InterfaceIndexerMemberProps, InterfaceMember, InterfaceMemberProps, InterfaceMemberPropsBase, InterfaceSchemaMemberProps, InterfaceTypeMemberProps, ObjectDeclaration, ObjectDeclarationProperty, ObjectDeclarationPropertyProps, ObjectDeclarationProps, PropertyName, PropertyNameProps, RecordExpression, RecordExpressionProps, TSDoc, TSDocAlias, TSDocAttributesTags, TSDocAttributesTagsProps, TSDocDefaultValue, TSDocDefaultValueProps, TSDocDomain, TSDocExample, TSDocExampleProps, TSDocGroup, TSDocHidden, TSDocIgnore, TSDocInternal, TSDocLink, TSDocModule, TSDocModuleProps, TSDocObjectSchema, TSDocObjectSchemaProps, TSDocParam, TSDocParamProps, TSDocParams, TSDocParamsProps, TSDocPermission, TSDocProps, TSDocReadonly, TSDocRemarks, TSDocReturns, TSDocRuntime, TSDocSchemaProperty, TSDocSchemaPropertyProps, TSDocTag, TSDocTagProps, TSDocThrows, TSDocTitle, TypeDeclaration, TypeDeclarationProps, TypeParameters, TypeParametersProps, TypescriptFile, TypescriptFileHeader, TypescriptFileHeaderImports, TypescriptFileHeaderImportsProps, TypescriptFileHeaderProps, TypescriptFileProps };
@@ -5,10 +5,10 @@ import { TypeParameters, TypeParametersProps } from "./type-parameters.mjs";
5
5
  import { ClassDeclaration, ClassDeclarationProps, ClassField, ClassFieldProps, ClassMember, ClassMemberProps, ClassMethod, ClassMethodProps, ClassPropertyGet, ClassPropertyProps, ClassPropertySet } from "./class-declaration.mjs";
6
6
  import { DynamicImportStatement, DynamicImportStatementProps } from "./dynamic-import-statement.mjs";
7
7
  import { EntryFile, EntryFileProps } from "./entry-file.mjs";
8
- import { InterfaceDeclaration, InterfaceDeclarationProperty, InterfaceDeclarationPropertyProps, InterfaceDeclarationProps, InterfaceExpression, InterfaceExpressionProps, InterfaceIndexerMemberProps, InterfaceMember, InterfaceMemberProps, InterfaceMemberPropsBase, InterfaceSchemaMemberProps } from "./interface-declaration.mjs";
8
+ import { InterfaceDeclaration, InterfaceDeclarationProperty, InterfaceDeclarationPropertyProps, InterfaceDeclarationProps, InterfaceExpression, InterfaceExpressionProps, InterfaceIndexerMemberProps, InterfaceMember, InterfaceMemberProps, InterfaceMemberPropsBase, InterfaceSchemaMemberProps, InterfaceTypeMemberProps } from "./interface-declaration.mjs";
9
9
  import { ObjectDeclaration, ObjectDeclarationProperty, ObjectDeclarationPropertyProps, ObjectDeclarationProps } from "./object-declaration.mjs";
10
10
  import { PropertyName, PropertyNameProps } from "./property-name.mjs";
11
11
  import { RecordExpression, RecordExpressionProps } from "./record-expression.mjs";
12
12
  import { TSDocObjectSchema, TSDocObjectSchemaProps, TSDocSchemaProperty, TSDocSchemaPropertyProps } from "./tsdoc-schema.mjs";
13
13
  import { TypeDeclaration, TypeDeclarationProps } from "./type-declaration.mjs";
14
- export { BuiltinFile, BuiltinFileProps, ClassDeclaration, ClassDeclarationProps, ClassField, ClassFieldProps, ClassMember, ClassMemberProps, ClassMethod, ClassMethodProps, ClassPropertyGet, ClassPropertyProps, ClassPropertySet, DynamicImportStatement, DynamicImportStatementProps, EntryFile, EntryFileProps, InterfaceDeclaration, InterfaceDeclarationProperty, InterfaceDeclarationPropertyProps, InterfaceDeclarationProps, InterfaceExpression, InterfaceExpressionProps, InterfaceIndexerMemberProps, InterfaceMember, InterfaceMemberProps, InterfaceMemberPropsBase, InterfaceSchemaMemberProps, ObjectDeclaration, ObjectDeclarationProperty, ObjectDeclarationPropertyProps, ObjectDeclarationProps, PropertyName, PropertyNameProps, RecordExpression, RecordExpressionProps, TSDoc, TSDocAlias, TSDocAttributesTags, TSDocAttributesTagsProps, TSDocDefaultValue, TSDocDefaultValueProps, TSDocDomain, TSDocExample, TSDocExampleProps, TSDocGroup, TSDocHidden, TSDocIgnore, TSDocInternal, TSDocLink, TSDocModule, TSDocModuleProps, TSDocObjectSchema, TSDocObjectSchemaProps, TSDocParam, TSDocParamProps, TSDocParams, TSDocParamsProps, TSDocPermission, TSDocProps, TSDocReadonly, TSDocRemarks, TSDocReturns, TSDocRuntime, TSDocSchemaProperty, TSDocSchemaPropertyProps, TSDocTag, TSDocTagProps, TSDocThrows, TSDocTitle, TypeDeclaration, TypeDeclarationProps, TypeParameters, TypeParametersProps, TypescriptFile, TypescriptFileHeader, TypescriptFileHeaderImports, TypescriptFileHeaderImportsProps, TypescriptFileHeaderProps, TypescriptFileProps };
14
+ export { BuiltinFile, BuiltinFileProps, ClassDeclaration, ClassDeclarationProps, ClassField, ClassFieldProps, ClassMember, ClassMemberProps, ClassMethod, ClassMethodProps, ClassPropertyGet, ClassPropertyProps, ClassPropertySet, DynamicImportStatement, DynamicImportStatementProps, EntryFile, EntryFileProps, InterfaceDeclaration, InterfaceDeclarationProperty, InterfaceDeclarationPropertyProps, InterfaceDeclarationProps, InterfaceExpression, InterfaceExpressionProps, InterfaceIndexerMemberProps, InterfaceMember, InterfaceMemberProps, InterfaceMemberPropsBase, InterfaceSchemaMemberProps, InterfaceTypeMemberProps, ObjectDeclaration, ObjectDeclarationProperty, ObjectDeclarationPropertyProps, ObjectDeclarationProps, PropertyName, PropertyNameProps, RecordExpression, RecordExpressionProps, TSDoc, TSDocAlias, TSDocAttributesTags, TSDocAttributesTagsProps, TSDocDefaultValue, TSDocDefaultValueProps, TSDocDomain, TSDocExample, TSDocExampleProps, TSDocGroup, TSDocHidden, TSDocIgnore, TSDocInternal, TSDocLink, TSDocModule, TSDocModuleProps, TSDocObjectSchema, TSDocObjectSchemaProps, TSDocParam, TSDocParamProps, TSDocParams, TSDocParamsProps, TSDocPermission, TSDocProps, TSDocReadonly, TSDocRemarks, TSDocReturns, TSDocRuntime, TSDocSchemaProperty, TSDocSchemaPropertyProps, TSDocTag, TSDocTagProps, TSDocThrows, TSDocTitle, TypeDeclaration, TypeDeclarationProps, TypeParameters, TypeParametersProps, TypescriptFile, TypescriptFileHeader, TypescriptFileHeaderImports, TypescriptFileHeaderImportsProps, TypescriptFileHeaderProps, TypescriptFileProps };
@@ -44,15 +44,18 @@ interface InterfaceMemberPropsBase {
44
44
  readOnly?: boolean;
45
45
  type?: Children | JsonSchemaPrimitiveType | string;
46
46
  nullish?: boolean;
47
+ required?: boolean;
47
48
  }
48
49
  interface InterfaceIndexerMemberProps extends InterfaceMemberPropsBase {
49
50
  indexer: Children;
50
51
  }
52
+ interface InterfaceTypeMemberProps extends InterfaceMemberPropsBase {
53
+ type: string;
54
+ }
51
55
  interface InterfaceSchemaMemberProps extends InterfaceMemberPropsBase {
52
56
  schema: JsonSchema;
53
- required: boolean;
54
57
  }
55
- type InterfaceMemberProps = InterfaceIndexerMemberProps | InterfaceSchemaMemberProps;
58
+ type InterfaceMemberProps = InterfaceIndexerMemberProps | InterfaceTypeMemberProps | InterfaceSchemaMemberProps;
56
59
  /**
57
60
  * Create a TypeScript interface member.
58
61
  *
@@ -72,5 +75,5 @@ declare function InterfaceDeclaration(props: InterfaceDeclarationProps): Childre
72
75
  */
73
76
  declare function InterfaceDeclarationProperty(props: InterfaceDeclarationPropertyProps): Children;
74
77
  //#endregion
75
- export { InterfaceDeclaration, InterfaceDeclarationProperty, InterfaceDeclarationPropertyProps, InterfaceDeclarationProps, InterfaceExpression, InterfaceExpressionProps, InterfaceIndexerMemberProps, InterfaceMember, InterfaceMemberProps, InterfaceMemberPropsBase, InterfaceSchemaMemberProps };
78
+ export { InterfaceDeclaration, InterfaceDeclarationProperty, InterfaceDeclarationPropertyProps, InterfaceDeclarationProps, InterfaceExpression, InterfaceExpressionProps, InterfaceIndexerMemberProps, InterfaceMember, InterfaceMemberProps, InterfaceMemberPropsBase, InterfaceSchemaMemberProps, InterfaceTypeMemberProps };
76
79
  //# sourceMappingURL=interface-declaration.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"interface-declaration.d.cts","names":[],"sources":["../../../src/typescript/components/interface-declaration.tsx"],"mappings":";;;;;;;UAuEiB,yBAAA,SACP,WAAA,CAAY,sBAAA,WAAiC,cAAA;;AADvD;;EAKE,OAAA,GAAU,QAAA;EAJU;;;EASpB,cAAA,GAAiB,uBAAA;EAaX;;;;;;EALN,MAAA,GAAS,UAAA;EAjB4C;;;EAsBrD,GAAA,GAAM,QAAA;AAAA;AAAA,KAGI,iCAAA,GAAoC,oBAAA,GAC9C,cAAA;EACE,MAAA,EAAQ,UAAA;EACR,IAAA;EACA,QAAA;EACA,YAAA;AAAA;AAAA,UAGa,wBAAA;EACf,QAAA,GAAW,QAAQ;AAAA;AAAA,cAGR,mBAAA,2BAAmB,SAAA,CAAA,wBAAA;AAAA,UAoBf,wBAAA;EACf,QAAA,GAAW,QAAA;EACX,IAAA,WAAe,OAAA;EACf,GAAA,GAAM,QAAA;EACN,MAAA,GAAS,MAAA,GAAS,MAAA;EAClB,QAAA;EACA,IAAA,GAAO,QAAA,GAAW,uBAAA;EAClB,OAAA;AAAA;AAAA,UAGe,2BAAA,SAAoC,wBAAwB;EAC3E,OAAA,EAAS,QAAA;AAAA;AAAA,UAGM,0BAAA,SAAmC,wBAAwB;EAC1E,MAAA,EAAQ,UAAA;EACR,QAAA;AAAA;AAAA,KAGU,oBAAA,GACR,2BAAA,GACA,0BAA0B;AA5CT;AAGrB;;;;AAAgC;AAoBhC;;;AAvBqB,iBAuDL,eAAA,CAAgB,KAAA,EAAO,oBAAA,GAAoB,QAAA;;;;iBA6H3C,oBAAA,CAAqB,KAAA,EAAO,yBAAA,GAAyB,QAAA;;;;iBAoErD,4BAAA,CACd,KAAA,EAAO,iCAAA,GAAiC,QAAA"}
1
+ {"version":3,"file":"interface-declaration.d.cts","names":[],"sources":["../../../src/typescript/components/interface-declaration.tsx"],"mappings":";;;;;;;UAuEiB,yBAAA,SACP,WAAA,CAAY,sBAAA,WAAiC,cAAA;;AADvD;;EAKE,OAAA,GAAU,QAAA;EAJU;;;EASpB,cAAA,GAAiB,uBAAA;EAaX;;;;;;EALN,MAAA,GAAS,UAAA;EAjB4C;;;EAsBrD,GAAA,GAAM,QAAA;AAAA;AAAA,KAGI,iCAAA,GAAoC,oBAAA,GAC9C,cAAA;EACE,MAAA,EAAQ,UAAA;EACR,IAAA;EACA,QAAA;EACA,YAAA;AAAA;AAAA,UAGa,wBAAA;EACf,QAAA,GAAW,QAAQ;AAAA;AAAA,cAGR,mBAAA,2BAAmB,SAAA,CAAA,wBAAA;AAAA,UAoBf,wBAAA;EACf,QAAA,GAAW,QAAA;EACX,IAAA,WAAe,OAAA;EACf,GAAA,GAAM,QAAA;EACN,MAAA,GAAS,MAAA,GAAS,MAAA;EAClB,QAAA;EACA,IAAA,GAAO,QAAA,GAAW,uBAAA;EAClB,OAAA;EACA,QAAA;AAAA;AAAA,UAGe,2BAAA,SAAoC,wBAAwB;EAC3E,OAAA,EAAS,QAAA;AAAA;AAAA,UAGM,wBAAA,SAAiC,wBAAwB;EACxE,IAAI;AAAA;AAAA,UAGW,0BAAA,SAAmC,wBAAwB;EAC1E,MAAA,EAAQ,UAAA;AAAA;AAAA,KAGE,oBAAA,GACR,2BAAA,GACA,wBAAA,GACA,0BAAA;;;AA9C4B;AAoBhC;;;;;;iBAqCgB,eAAA,CAAgB,KAAA,EAAO,oBAAA,GAAoB,QAAA;;;;iBAkI3C,oBAAA,CAAqB,KAAA,EAAO,yBAAA,GAAyB,QAAA;;;;iBAoErD,4BAAA,CACd,KAAA,EAAO,iCAAA,GAAiC,QAAA"}
@@ -44,15 +44,18 @@ interface InterfaceMemberPropsBase {
44
44
  readOnly?: boolean;
45
45
  type?: Children | JsonSchemaPrimitiveType | string;
46
46
  nullish?: boolean;
47
+ required?: boolean;
47
48
  }
48
49
  interface InterfaceIndexerMemberProps extends InterfaceMemberPropsBase {
49
50
  indexer: Children;
50
51
  }
52
+ interface InterfaceTypeMemberProps extends InterfaceMemberPropsBase {
53
+ type: string;
54
+ }
51
55
  interface InterfaceSchemaMemberProps extends InterfaceMemberPropsBase {
52
56
  schema: JsonSchema;
53
- required: boolean;
54
57
  }
55
- type InterfaceMemberProps = InterfaceIndexerMemberProps | InterfaceSchemaMemberProps;
58
+ type InterfaceMemberProps = InterfaceIndexerMemberProps | InterfaceTypeMemberProps | InterfaceSchemaMemberProps;
56
59
  /**
57
60
  * Create a TypeScript interface member.
58
61
  *
@@ -72,5 +75,5 @@ declare function InterfaceDeclaration(props: InterfaceDeclarationProps): Childre
72
75
  */
73
76
  declare function InterfaceDeclarationProperty(props: InterfaceDeclarationPropertyProps): Children;
74
77
  //#endregion
75
- export { InterfaceDeclaration, InterfaceDeclarationProperty, InterfaceDeclarationPropertyProps, InterfaceDeclarationProps, InterfaceExpression, InterfaceExpressionProps, InterfaceIndexerMemberProps, InterfaceMember, InterfaceMemberProps, InterfaceMemberPropsBase, InterfaceSchemaMemberProps };
78
+ export { InterfaceDeclaration, InterfaceDeclarationProperty, InterfaceDeclarationPropertyProps, InterfaceDeclarationProps, InterfaceExpression, InterfaceExpressionProps, InterfaceIndexerMemberProps, InterfaceMember, InterfaceMemberProps, InterfaceMemberPropsBase, InterfaceSchemaMemberProps, InterfaceTypeMemberProps };
76
79
  //# sourceMappingURL=interface-declaration.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"interface-declaration.d.mts","names":[],"sources":["../../../src/typescript/components/interface-declaration.tsx"],"mappings":";;;;;;;UAuEiB,yBAAA,SACP,WAAA,CAAY,sBAAA,WAAiC,cAAA;;AADvD;;EAKE,OAAA,GAAU,QAAA;EAJU;;;EASpB,cAAA,GAAiB,uBAAA;EAaX;;;;;;EALN,MAAA,GAAS,UAAA;EAjB4C;;;EAsBrD,GAAA,GAAM,QAAA;AAAA;AAAA,KAGI,iCAAA,GAAoC,oBAAA,GAC9C,cAAA;EACE,MAAA,EAAQ,UAAA;EACR,IAAA;EACA,QAAA;EACA,YAAA;AAAA;AAAA,UAGa,wBAAA;EACf,QAAA,GAAW,QAAQ;AAAA;AAAA,cAGR,mBAAA,2BAAmB,SAAA,CAAA,wBAAA;AAAA,UAoBf,wBAAA;EACf,QAAA,GAAW,QAAA;EACX,IAAA,WAAe,OAAA;EACf,GAAA,GAAM,QAAA;EACN,MAAA,GAAS,MAAA,GAAS,MAAA;EAClB,QAAA;EACA,IAAA,GAAO,QAAA,GAAW,uBAAA;EAClB,OAAA;AAAA;AAAA,UAGe,2BAAA,SAAoC,wBAAwB;EAC3E,OAAA,EAAS,QAAA;AAAA;AAAA,UAGM,0BAAA,SAAmC,wBAAwB;EAC1E,MAAA,EAAQ,UAAA;EACR,QAAA;AAAA;AAAA,KAGU,oBAAA,GACR,2BAAA,GACA,0BAA0B;AA5CT;AAGrB;;;;AAAgC;AAoBhC;;;AAvBqB,iBAuDL,eAAA,CAAgB,KAAA,EAAO,oBAAA,GAAoB,QAAA;;;;iBA6H3C,oBAAA,CAAqB,KAAA,EAAO,yBAAA,GAAyB,QAAA;;;;iBAoErD,4BAAA,CACd,KAAA,EAAO,iCAAA,GAAiC,QAAA"}
1
+ {"version":3,"file":"interface-declaration.d.mts","names":[],"sources":["../../../src/typescript/components/interface-declaration.tsx"],"mappings":";;;;;;;UAuEiB,yBAAA,SACP,WAAA,CAAY,sBAAA,WAAiC,cAAA;;AADvD;;EAKE,OAAA,GAAU,QAAA;EAJU;;;EASpB,cAAA,GAAiB,uBAAA;EAaX;;;;;;EALN,MAAA,GAAS,UAAA;EAjB4C;;;EAsBrD,GAAA,GAAM,QAAA;AAAA;AAAA,KAGI,iCAAA,GAAoC,oBAAA,GAC9C,cAAA;EACE,MAAA,EAAQ,UAAA;EACR,IAAA;EACA,QAAA;EACA,YAAA;AAAA;AAAA,UAGa,wBAAA;EACf,QAAA,GAAW,QAAQ;AAAA;AAAA,cAGR,mBAAA,2BAAmB,SAAA,CAAA,wBAAA;AAAA,UAoBf,wBAAA;EACf,QAAA,GAAW,QAAA;EACX,IAAA,WAAe,OAAA;EACf,GAAA,GAAM,QAAA;EACN,MAAA,GAAS,MAAA,GAAS,MAAA;EAClB,QAAA;EACA,IAAA,GAAO,QAAA,GAAW,uBAAA;EAClB,OAAA;EACA,QAAA;AAAA;AAAA,UAGe,2BAAA,SAAoC,wBAAwB;EAC3E,OAAA,EAAS,QAAA;AAAA;AAAA,UAGM,wBAAA,SAAiC,wBAAwB;EACxE,IAAI;AAAA;AAAA,UAGW,0BAAA,SAAmC,wBAAwB;EAC1E,MAAA,EAAQ,UAAA;AAAA;AAAA,KAGE,oBAAA,GACR,2BAAA,GACA,wBAAA,GACA,0BAAA;;;AA9C4B;AAoBhC;;;;;;iBAqCgB,eAAA,CAAgB,KAAA,EAAO,oBAAA,GAAoB,QAAA;;;;iBAkI3C,oBAAA,CAAqB,KAAA,EAAO,yBAAA,GAAyB,QAAA;;;;iBAoErD,4BAAA,CACd,KAAA,EAAO,iCAAA,GAAiC,QAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"interface-declaration.mjs","names":[],"sources":["../../../src/typescript/components/interface-declaration.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport {\n Block,\n Children,\n childrenArray,\n computed,\n createSymbol,\n createSymbolSlot,\n effect,\n emitSymbol,\n findUnkeyedChildren,\n For,\n MemberDeclaration,\n Name,\n Namekey,\n Refkey,\n Show,\n splitProps,\n takeSymbols\n} from \"@alloy-js/core\";\nimport {\n CommonDeclarationProps,\n Declaration,\n ensureTypeRefContext,\n TSOutputSymbol,\n TSSymbolFlags,\n TypeParameterDescriptor,\n useTSLexicalScope,\n useTSMemberScope,\n useTSNamePolicy\n} from \"@alloy-js/typescript\";\nimport {\n getPrimarySchemaType,\n getPropertiesList,\n isSchemaNullable,\n JsonSchema,\n JsonSchemaPrimitiveType,\n stringifyType\n} from \"@powerlines/schema\";\nimport { pascalCase } from \"@stryke/string-format/pascal-case\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport { PartialKeys } from \"@stryke/types/base\";\nimport { uuid } from \"@stryke/unique-id/uuid\";\nimport {\n SchemaContext,\n SchemaPropertyContext\n} from \"../../core/contexts/schema\";\nimport { ComponentProps } from \"../../types/components\";\nimport { MemberScope } from \"../contexts/member-scope\";\nimport { PropertyName } from \"./property-name\";\nimport { TSDoc } from \"./tsdoc\";\nimport { TSDocObjectSchema, TSDocSchemaProperty } from \"./tsdoc-schema\";\nimport { TypeParameters } from \"./type-parameters\";\n\nexport interface InterfaceDeclarationProps\n extends PartialKeys<CommonDeclarationProps, \"name\">, ComponentProps {\n /**\n * A base type that this interface extends. This can be used to represent inheritance\n */\n extends?: Children;\n\n /**\n * The generic type parameters of the interface.\n */\n typeParameters?: TypeParameterDescriptor[] | string[];\n\n /**\n * The JSON Schema that describes the properties of this interface.\n *\n * @remarks\n * This is used to generate the members of the interface based on the properties of the schema.\n */\n schema?: JsonSchema;\n\n /**\n * Documentation for the interface. This can be a string or any Alloy component that renders documentation content (such as `TSDoc`).\n */\n doc?: Children;\n}\n\nexport type InterfaceDeclarationPropertyProps = InterfaceMemberProps &\n ComponentProps & {\n schema: JsonSchema;\n name: string;\n required: boolean;\n defaultValue?: unknown;\n };\n\nexport interface InterfaceExpressionProps {\n children?: Children;\n}\n\nexport const InterfaceExpression = ensureTypeRefContext(\n function InterfaceExpression(props: InterfaceExpressionProps) {\n const scope = useTSLexicalScope();\n const symbol = createSymbol(TSOutputSymbol, \"\", undefined, {\n transient: true,\n binder: scope?.binder\n });\n\n emitSymbol(symbol);\n\n return (\n <group>\n <MemberScope ownerSymbol={symbol}>\n <Block>{props.children}</Block>\n </MemberScope>\n </group>\n );\n }\n);\n\nexport interface InterfaceMemberPropsBase {\n children?: Children;\n name: string | Namekey;\n doc?: Children;\n refkey?: Refkey | Refkey[];\n readOnly?: boolean;\n type?: Children | JsonSchemaPrimitiveType | string;\n nullish?: boolean;\n}\n\nexport interface InterfaceIndexerMemberProps extends InterfaceMemberPropsBase {\n indexer: Children;\n}\n\nexport interface InterfaceSchemaMemberProps extends InterfaceMemberPropsBase {\n schema: JsonSchema;\n required: boolean;\n}\n\nexport type InterfaceMemberProps =\n | InterfaceIndexerMemberProps\n | InterfaceSchemaMemberProps;\n\n/**\n * Create a TypeScript interface member.\n *\n * An interface member can either provide a `name` prop to create a named\n * property, or an `indexer` prop to define an indexer for the interface.\n *\n * The type of the member can be provided either as the `type` prop or as the\n * children of the component.\n */\nexport function InterfaceMember(props: InterfaceMemberProps) {\n const type = (props as InterfaceSchemaMemberProps).schema\n ? stringifyType((props as InterfaceSchemaMemberProps).schema)\n : (props.type ?? props.children);\n\n const readonly =\n ((props as InterfaceSchemaMemberProps).schema &&\n (props as InterfaceSchemaMemberProps).schema?.readOnly) ||\n (!(props as InterfaceSchemaMemberProps).schema && props.readOnly)\n ? \"readonly \"\n : \"\";\n\n if (\"indexer\" in props) {\n return (\n <>\n <Show when={Boolean(props.doc)}>\n <TSDoc heading={props.doc} />\n </Show>\n {readonly}[{props.indexer}]: {type}\n </>\n );\n }\n\n const scope = useTSMemberScope();\n const sym = createSymbol(\n TSOutputSymbol,\n ((props.schema ? props.schema?.name : undefined) || isSetString(props.name)\n ? props.name\n : props.name.toString()) || uuid().replace(/-/g, \"\"),\n scope.ownerSymbol.staticMembers,\n {\n refkeys: props.refkey,\n tsFlags:\n TSSymbolFlags.TypeSymbol |\n (!!(props.schema && isSchemaNullable(props.schema)) || !!props.nullish\n ? TSSymbolFlags.Nullish\n : TSSymbolFlags.None),\n namePolicy: useTSNamePolicy().for(\"interface-member\"),\n binder: scope.binder\n }\n );\n\n const taken = takeSymbols();\n effect(() => {\n if (taken.size > 1) return;\n const symbol = Array.from(taken)[0];\n if (symbol?.isTransient) {\n symbol.moveMembersTo(sym);\n }\n });\n\n return (\n <MemberDeclaration symbol={sym}>\n <Show when={Boolean(props.doc)}>\n <TSDoc heading={props.doc} />\n </Show>\n {readonly}\n <PropertyName />\n {!props.required ? \"?\" : \"\"}: {type}\n </MemberDeclaration>\n );\n}\n\nconst BaseInterfaceDeclaration = ensureTypeRefContext(\n function InterfaceDeclaration(props: InterfaceDeclarationProps) {\n const ExprSlot = createSymbolSlot();\n\n const children = childrenArray(() => props.children);\n\n const extendsPart = props.extends ? <> extends {props.extends}</> : \"\";\n const filteredChildren = findUnkeyedChildren(children);\n const currentScope = useTSLexicalScope();\n\n const binder = currentScope?.binder;\n const sym = createSymbol(\n TSOutputSymbol,\n (isSetString(props.name) ? props.name : props.name?.toString()) ||\n uuid().replace(/-/g, \"\"),\n currentScope.types,\n {\n refkeys: props.refkey,\n default: props.default,\n export: props.export,\n metadata: props.metadata,\n tsFlags: TSSymbolFlags.TypeSymbol,\n namePolicy: useTSNamePolicy().for(\"interface\"),\n binder\n }\n );\n\n effect(() => {\n if (ExprSlot.ref.value) {\n const takenSymbols = ExprSlot.ref.value;\n for (const symbol of takenSymbols) {\n // ignore non-transient symbols (likely not the result of an expression).\n if (symbol.isTransient) {\n symbol.moveMembersTo(sym);\n }\n }\n }\n });\n\n return (\n <>\n <Show when={Boolean(props.doc)}>\n <TSDoc heading={props.doc} />\n </Show>\n <Declaration {...props} nameKind=\"interface\" kind=\"type\" symbol={sym}>\n interface <Name />\n {props.typeParameters && (\n <TypeParameters parameters={props.typeParameters} />\n )}\n {extendsPart}{\" \"}\n <ExprSlot>\n <InterfaceExpression>{filteredChildren}</InterfaceExpression>\n </ExprSlot>\n </Declaration>\n </>\n );\n }\n);\n\n/**\n * Generates a TypeScript interface for the given schema.\n */\nexport function InterfaceDeclaration(props: InterfaceDeclarationProps) {\n const [{ name, schema, doc }, rest] = splitProps(props, [\n \"name\",\n \"schema\",\n \"doc\"\n ]);\n\n const interfaceName = computed(() =>\n pascalCase(isSetString(name) ? name : schema?.name || schema?.title || \"\")\n );\n const properties = computed(() =>\n schema\n ? getPropertiesList(schema as Parameters<typeof getPropertiesList>[0])\n .filter(property => !property?.ignore)\n .sort((a, b) =>\n (a?.readOnly && b?.readOnly) || (!a?.readOnly && !b?.readOnly)\n ? !a.name && !b.name\n ? 0\n : !a.name\n ? -1\n : !b.name\n ? 1\n : a.name.localeCompare(b.name)\n : a?.readOnly\n ? 1\n : -1\n )\n : []\n );\n\n return (\n <Show\n when={schema && properties.value.length > 0}\n fallback={\n <BaseInterfaceDeclaration\n {...props}\n schema={{\n type: \"object\",\n name: interfaceName.value,\n properties: {}\n }}\n name={interfaceName.value}\n />\n }>\n <SchemaContext.Provider value={schema as JsonSchema}>\n <TSDocObjectSchema heading={doc} schema={schema!} />\n <BaseInterfaceDeclaration\n export={true}\n name={interfaceName.value}\n {...rest}>\n <For each={properties} doubleHardline={true} semicolon={true}>\n {property => (\n <InterfaceDeclarationProperty\n name={property.name}\n schema={property}\n required={!!property?.required}\n />\n )}\n </For>\n </BaseInterfaceDeclaration>\n </SchemaContext.Provider>\n </Show>\n );\n}\n\n/**\n * Generates a TypeScript interface property for the given reflection class.\n */\nexport function InterfaceDeclarationProperty(\n props: InterfaceDeclarationPropertyProps\n) {\n const [{ schema, name, required, defaultValue }, rest] = splitProps(props, [\n \"schema\",\n \"name\",\n \"required\",\n \"defaultValue\"\n ]);\n\n return (\n <Show when={isSetString(name)}>\n <SchemaPropertyContext.Provider value={schema}>\n <TSDocSchemaProperty schema={schema} defaultValue={defaultValue} />\n <InterfaceMember\n name={name}\n schema={schema}\n required={required}\n readOnly={schema?.readOnly}\n nullish={isSchemaNullable(schema)}\n type={getPrimarySchemaType(schema)}\n {...rest}\n />\n </SchemaPropertyContext.Provider>\n </Show>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;AAiCA,MAAM,sBAAA,qBAAA,SAAA,oBAAA,OAAA;CAEJ,MAAA,SAAA,aAAA,gBAAA,IAAA,QAAA;EACA,WAAa;EACf,QAHY,kBAGL,GAAA;CACL,CAAA;CACA,WAAW,MAAA;CACX,OAAA,gBAAoB,SAAA,EACpB,IAAA,WAAc;EACd,OAAA,gBAAa,eAAA;GACb,aAAA;GACA,IAAA,WAAiB;IACjB,OAAA,gBAAgB,OAAA,EAChB,IAAA,WAAA;KACY,OAAI,MAAA;IACX,EACL,CAAA;GACA;EACA,CAAA;CACA,EACA,CAAA;AACF,CAAC;;;;;;;;;;AAUD,SAAS,gBAAuB,OAAM;CACtC,MAAQ,OAAC,MAAY,SAAS,cAAW,MAAO,MAAM,IAAA,MAAA,QAAA,MAAA;CACtD,MAAQ,WAAC,MAAe,UAAQ,MAAS,QAAK,YAAA,CAAA,MAAA,UAAA,MAAA,WAAA,cAAA;CAC9C,IAAM,aAAW,OACjB,OAAS;EAAA,gBAAmB,MAAA;GACtB,IAAG,OAAA;;GAEH;GACJ,IAAQ,WAAW;IACjB,OAAA,gBAAA,OA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AA,OAAc;OACb,OAAW,qBAAM,MAAA;MAChB;KACD,GAAG,IAAA,CAAA,CAAA;IACL;GACF,CAAC;EACH;CACF,CAAC;AACH"}
1
+ {"version":3,"file":"interface-declaration.mjs","names":[],"sources":["../../../src/typescript/components/interface-declaration.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport {\n Block,\n Children,\n childrenArray,\n computed,\n createSymbol,\n createSymbolSlot,\n effect,\n emitSymbol,\n findUnkeyedChildren,\n For,\n MemberDeclaration,\n Name,\n Namekey,\n Refkey,\n Show,\n splitProps,\n takeSymbols\n} from \"@alloy-js/core\";\nimport {\n CommonDeclarationProps,\n Declaration,\n ensureTypeRefContext,\n TSOutputSymbol,\n TSSymbolFlags,\n TypeParameterDescriptor,\n useTSLexicalScope,\n useTSMemberScope,\n useTSNamePolicy\n} from \"@alloy-js/typescript\";\nimport {\n getPrimarySchemaType,\n getPropertiesList,\n isSchemaNullable,\n JsonSchema,\n JsonSchemaPrimitiveType,\n stringifyType\n} from \"@powerlines/schema\";\nimport { pascalCase } from \"@stryke/string-format/pascal-case\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport { PartialKeys } from \"@stryke/types/base\";\nimport { uuid } from \"@stryke/unique-id/uuid\";\nimport {\n SchemaContext,\n SchemaPropertyContext\n} from \"../../core/contexts/schema\";\nimport { ComponentProps } from \"../../types/components\";\nimport { MemberScope } from \"../contexts/member-scope\";\nimport { PropertyName } from \"./property-name\";\nimport { TSDoc } from \"./tsdoc\";\nimport { TSDocObjectSchema, TSDocSchemaProperty } from \"./tsdoc-schema\";\nimport { TypeParameters } from \"./type-parameters\";\n\nexport interface InterfaceDeclarationProps\n extends PartialKeys<CommonDeclarationProps, \"name\">, ComponentProps {\n /**\n * A base type that this interface extends. This can be used to represent inheritance\n */\n extends?: Children;\n\n /**\n * The generic type parameters of the interface.\n */\n typeParameters?: TypeParameterDescriptor[] | string[];\n\n /**\n * The JSON Schema that describes the properties of this interface.\n *\n * @remarks\n * This is used to generate the members of the interface based on the properties of the schema.\n */\n schema?: JsonSchema;\n\n /**\n * Documentation for the interface. This can be a string or any Alloy component that renders documentation content (such as `TSDoc`).\n */\n doc?: Children;\n}\n\nexport type InterfaceDeclarationPropertyProps = InterfaceMemberProps &\n ComponentProps & {\n schema: JsonSchema;\n name: string;\n required: boolean;\n defaultValue?: unknown;\n };\n\nexport interface InterfaceExpressionProps {\n children?: Children;\n}\n\nexport const InterfaceExpression = ensureTypeRefContext(\n function InterfaceExpression(props: InterfaceExpressionProps) {\n const scope = useTSLexicalScope();\n const symbol = createSymbol(TSOutputSymbol, \"\", undefined, {\n transient: true,\n binder: scope?.binder\n });\n\n emitSymbol(symbol);\n\n return (\n <group>\n <MemberScope ownerSymbol={symbol}>\n <Block>{props.children}</Block>\n </MemberScope>\n </group>\n );\n }\n);\n\nexport interface InterfaceMemberPropsBase {\n children?: Children;\n name: string | Namekey;\n doc?: Children;\n refkey?: Refkey | Refkey[];\n readOnly?: boolean;\n type?: Children | JsonSchemaPrimitiveType | string;\n nullish?: boolean;\n required?: boolean;\n}\n\nexport interface InterfaceIndexerMemberProps extends InterfaceMemberPropsBase {\n indexer: Children;\n}\n\nexport interface InterfaceTypeMemberProps extends InterfaceMemberPropsBase {\n type: string;\n}\n\nexport interface InterfaceSchemaMemberProps extends InterfaceMemberPropsBase {\n schema: JsonSchema;\n}\n\nexport type InterfaceMemberProps =\n | InterfaceIndexerMemberProps\n | InterfaceTypeMemberProps\n | InterfaceSchemaMemberProps;\n\n/**\n * Create a TypeScript interface member.\n *\n * An interface member can either provide a `name` prop to create a named\n * property, or an `indexer` prop to define an indexer for the interface.\n *\n * The type of the member can be provided either as the `type` prop or as the\n * children of the component.\n */\nexport function InterfaceMember(props: InterfaceMemberProps) {\n const type = (props as InterfaceSchemaMemberProps).schema\n ? stringifyType((props as InterfaceSchemaMemberProps).schema)\n : (props.type ?? props.children);\n\n const readonly =\n ((props as InterfaceSchemaMemberProps).schema &&\n (props as InterfaceSchemaMemberProps).schema?.readOnly) ||\n (!(props as InterfaceSchemaMemberProps).schema && props.readOnly)\n ? \"readonly \"\n : \"\";\n\n if (\"indexer\" in props) {\n return (\n <>\n <Show when={Boolean(props.doc)}>\n <TSDoc heading={props.doc} />\n </Show>\n {readonly}[{props.indexer}]: {type}\n </>\n );\n }\n\n const scope = useTSMemberScope();\n const sym = createSymbol(\n TSOutputSymbol,\n (((props as InterfaceSchemaMemberProps).schema\n ? (props as InterfaceSchemaMemberProps).schema?.name\n : undefined) || isSetString(props.name)\n ? props.name\n : props.name.toString()) || uuid().replace(/-/g, \"\"),\n scope.ownerSymbol.staticMembers,\n {\n refkeys: props.refkey,\n tsFlags:\n TSSymbolFlags.TypeSymbol |\n (!!(\n (props as InterfaceSchemaMemberProps).schema &&\n isSchemaNullable((props as InterfaceSchemaMemberProps).schema)\n ) || !!props.nullish\n ? TSSymbolFlags.Nullish\n : TSSymbolFlags.None),\n namePolicy: useTSNamePolicy().for(\"interface-member\"),\n binder: scope.binder\n }\n );\n\n const taken = takeSymbols();\n effect(() => {\n if (taken.size > 1) return;\n const symbol = Array.from(taken)[0];\n if (symbol?.isTransient) {\n symbol.moveMembersTo(sym);\n }\n });\n\n return (\n <MemberDeclaration symbol={sym}>\n <Show when={Boolean(props.doc)}>\n <TSDoc heading={props.doc} />\n </Show>\n {readonly}\n <PropertyName />\n {!props.required ? \"?\" : \"\"}: {type}\n </MemberDeclaration>\n );\n}\n\nconst BaseInterfaceDeclaration = ensureTypeRefContext(\n function InterfaceDeclaration(props: InterfaceDeclarationProps) {\n const ExprSlot = createSymbolSlot();\n\n const children = childrenArray(() => props.children);\n\n const extendsPart = props.extends ? <> extends {props.extends}</> : \"\";\n const filteredChildren = findUnkeyedChildren(children);\n const currentScope = useTSLexicalScope();\n\n const binder = currentScope?.binder;\n const sym = createSymbol(\n TSOutputSymbol,\n (isSetString(props.name) ? props.name : props.name?.toString()) ||\n uuid().replace(/-/g, \"\"),\n currentScope.types,\n {\n refkeys: props.refkey,\n default: props.default,\n export: props.export,\n metadata: props.metadata,\n tsFlags: TSSymbolFlags.TypeSymbol,\n namePolicy: useTSNamePolicy().for(\"interface\"),\n binder\n }\n );\n\n effect(() => {\n if (ExprSlot.ref.value) {\n const takenSymbols = ExprSlot.ref.value;\n for (const symbol of takenSymbols) {\n // ignore non-transient symbols (likely not the result of an expression).\n if (symbol.isTransient) {\n symbol.moveMembersTo(sym);\n }\n }\n }\n });\n\n return (\n <>\n <Show when={Boolean(props.doc)}>\n <TSDoc heading={props.doc} />\n </Show>\n <Declaration {...props} nameKind=\"interface\" kind=\"type\" symbol={sym}>\n interface <Name />\n {props.typeParameters && (\n <TypeParameters parameters={props.typeParameters} />\n )}\n {extendsPart}{\" \"}\n <ExprSlot>\n <InterfaceExpression>{filteredChildren}</InterfaceExpression>\n </ExprSlot>\n </Declaration>\n </>\n );\n }\n);\n\n/**\n * Generates a TypeScript interface for the given schema.\n */\nexport function InterfaceDeclaration(props: InterfaceDeclarationProps) {\n const [{ name, schema, doc }, rest] = splitProps(props, [\n \"name\",\n \"schema\",\n \"doc\"\n ]);\n\n const interfaceName = computed(() =>\n pascalCase(isSetString(name) ? name : schema?.name || schema?.title || \"\")\n );\n const properties = computed(() =>\n schema\n ? getPropertiesList(schema as Parameters<typeof getPropertiesList>[0])\n .filter(property => !property?.ignore)\n .sort((a, b) =>\n (a?.readOnly && b?.readOnly) || (!a?.readOnly && !b?.readOnly)\n ? !a.name && !b.name\n ? 0\n : !a.name\n ? -1\n : !b.name\n ? 1\n : a.name.localeCompare(b.name)\n : a?.readOnly\n ? 1\n : -1\n )\n : []\n );\n\n return (\n <Show\n when={schema && properties.value.length > 0}\n fallback={\n <BaseInterfaceDeclaration\n {...props}\n schema={{\n type: \"object\",\n name: interfaceName.value,\n properties: {}\n }}\n name={interfaceName.value}\n />\n }>\n <SchemaContext.Provider value={schema}>\n <TSDocObjectSchema heading={doc} schema={schema!} />\n <BaseInterfaceDeclaration\n export={true}\n name={interfaceName.value}\n {...rest}>\n <For each={properties} doubleHardline={true} semicolon={true}>\n {property => (\n <InterfaceDeclarationProperty\n name={property.name}\n schema={property}\n required={!!property?.required}\n />\n )}\n </For>\n </BaseInterfaceDeclaration>\n </SchemaContext.Provider>\n </Show>\n );\n}\n\n/**\n * Generates a TypeScript interface property for the given reflection class.\n */\nexport function InterfaceDeclarationProperty(\n props: InterfaceDeclarationPropertyProps\n) {\n const [{ schema, name, required, defaultValue }, rest] = splitProps(props, [\n \"schema\",\n \"name\",\n \"required\",\n \"defaultValue\"\n ]);\n\n return (\n <Show when={isSetString(name)}>\n <SchemaPropertyContext.Provider value={schema}>\n <TSDocSchemaProperty schema={schema} defaultValue={defaultValue} />\n <InterfaceMember\n name={name}\n schema={schema}\n required={required}\n readOnly={schema?.readOnly}\n nullish={isSchemaNullable(schema)}\n type={getPrimarySchemaType(schema)}\n {...rest}\n />\n </SchemaPropertyContext.Provider>\n </Show>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;AAiCA,MAAM,sBAAA,qBAAA,SAAA,oBAAA,OAAA;CAEJ,MAAA,SAAA,aAAA,gBAAA,IAAA,QAAA;EACA,WAAa;EACf,QAHY,kBAGL,GAAA;CACL,CAAA;CACA,WAAW,MAAA;CACX,OAAA,gBAAoB,SAAA,EACpB,IAAA,WAAc;EACd,OAAA,gBAAa,eAAA;GACb,aAAA;GACA,IAAA,WAAiB;IACjB,OAAA,gBAAgB,OAAA,EAChB,IAAA,WAAA;KACY,OAAI,MAAA;IACX,EACL,CA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AAA;EAAA;EAAA;EAAA;CAAA,CAAA;CAClB,OAAK,gBAAkB,MAAQ;EAC7B,IAAI,OAAO;GACT,OAAA,YAAkB,IAAA;EACpB;EACA,IAAI,WAAS;GACX,OAAE,gBAAsB,sBAAA,UAAA;IACtB,OAAO;IACP,IAAA,WAAe;KACf,OAAS,CAAA,gBAAc,qBAAU;MACrB;MACZ;KACF,CAAA,GAAA,gBAAA,iBAAA,WAAA;MACD;;MAEY;MACP,IAAA,WAAa;OACT,OAAA,QAAe;MACjB;MACA,IAAC,UAAW;OACV,OAAO,iBAAa,MAAA;MACtB;MACF,IAAA,OAAA;OACF,OAAA,qBAAA,MAAA;MACF;KACA,GAAA,IAAA,CAAA,CAAA;;GAEF,CAAA;EACA;CACF,CAAC;AACH"}
@@ -5,7 +5,7 @@ import { TypeParameters, TypeParametersProps } from "./components/type-parameter
5
5
  import { ClassDeclaration, ClassDeclarationProps, ClassField, ClassFieldProps, ClassMember, ClassMemberProps, ClassMethod, ClassMethodProps, ClassPropertyGet, ClassPropertyProps, ClassPropertySet } from "./components/class-declaration.cjs";
6
6
  import { DynamicImportStatement, DynamicImportStatementProps } from "./components/dynamic-import-statement.cjs";
7
7
  import { EntryFile, EntryFileProps } from "./components/entry-file.cjs";
8
- import { InterfaceDeclaration, InterfaceDeclarationProperty, InterfaceDeclarationPropertyProps, InterfaceDeclarationProps, InterfaceExpression, InterfaceExpressionProps, InterfaceIndexerMemberProps, InterfaceMember, InterfaceMemberProps, InterfaceMemberPropsBase, InterfaceSchemaMemberProps } from "./components/interface-declaration.cjs";
8
+ import { InterfaceDeclaration, InterfaceDeclarationProperty, InterfaceDeclarationPropertyProps, InterfaceDeclarationProps, InterfaceExpression, InterfaceExpressionProps, InterfaceIndexerMemberProps, InterfaceMember, InterfaceMemberProps, InterfaceMemberPropsBase, InterfaceSchemaMemberProps, InterfaceTypeMemberProps } from "./components/interface-declaration.cjs";
9
9
  import { ObjectDeclaration, ObjectDeclarationProperty, ObjectDeclarationPropertyProps, ObjectDeclarationProps } from "./components/object-declaration.cjs";
10
10
  import { PropertyName, PropertyNameProps } from "./components/property-name.cjs";
11
11
  import { RecordExpression, RecordExpressionProps } from "./components/record-expression.cjs";
@@ -14,4 +14,4 @@ import { TypeDeclaration, TypeDeclarationProps } from "./components/type-declara
14
14
  import { LexicalScope, LexicalScopeProps, LexicalScopePropsWithScopeInfo, LexicalScopePropsWithScopeValue } from "./contexts/lexical-scope.cjs";
15
15
  import { getCallSignatureProps } from "./helpers/get-call-signature-props.cjs";
16
16
  import { isValidJSIdentifier } from "./helpers/utilities.cjs";
17
- export { BuiltinFile, BuiltinFileProps, ClassDeclaration, ClassDeclarationProps, ClassField, ClassFieldProps, ClassMember, ClassMemberProps, ClassMethod, ClassMethodProps, ClassPropertyGet, ClassPropertyProps, ClassPropertySet, DynamicImportStatement, DynamicImportStatementProps, EntryFile, EntryFileProps, InterfaceDeclaration, InterfaceDeclarationProperty, InterfaceDeclarationPropertyProps, InterfaceDeclarationProps, InterfaceExpression, InterfaceExpressionProps, InterfaceIndexerMemberProps, InterfaceMember, InterfaceMemberProps, InterfaceMemberPropsBase, InterfaceSchemaMemberProps, LexicalScope, LexicalScopeProps, LexicalScopePropsWithScopeInfo, LexicalScopePropsWithScopeValue, ObjectDeclaration, ObjectDeclarationProperty, ObjectDeclarationPropertyProps, ObjectDeclarationProps, PropertyName, PropertyNameProps, RecordExpression, RecordExpressionProps, TSDoc, TSDocAlias, TSDocAttributesTags, TSDocAttributesTagsProps, TSDocDefaultValue, TSDocDefaultValueProps, TSDocDomain, TSDocExample, TSDocExampleProps, TSDocGroup, TSDocHidden, TSDocIgnore, TSDocInternal, TSDocLink, TSDocModule, TSDocModuleProps, TSDocObjectSchema, TSDocObjectSchemaProps, TSDocParam, TSDocParamProps, TSDocParams, TSDocParamsProps, TSDocPermission, TSDocProps, TSDocReadonly, TSDocRemarks, TSDocReturns, TSDocRuntime, TSDocSchemaProperty, TSDocSchemaPropertyProps, TSDocTag, TSDocTagProps, TSDocThrows, TSDocTitle, TypeDeclaration, TypeDeclarationProps, TypeParameters, TypeParametersProps, TypescriptFile, TypescriptFileHeader, TypescriptFileHeaderImports, TypescriptFileHeaderImportsProps, TypescriptFileHeaderProps, TypescriptFileProps, getCallSignatureProps, isValidJSIdentifier };
17
+ export { BuiltinFile, BuiltinFileProps, ClassDeclaration, ClassDeclarationProps, ClassField, ClassFieldProps, ClassMember, ClassMemberProps, ClassMethod, ClassMethodProps, ClassPropertyGet, ClassPropertyProps, ClassPropertySet, DynamicImportStatement, DynamicImportStatementProps, EntryFile, EntryFileProps, InterfaceDeclaration, InterfaceDeclarationProperty, InterfaceDeclarationPropertyProps, InterfaceDeclarationProps, InterfaceExpression, InterfaceExpressionProps, InterfaceIndexerMemberProps, InterfaceMember, InterfaceMemberProps, InterfaceMemberPropsBase, InterfaceSchemaMemberProps, InterfaceTypeMemberProps, LexicalScope, LexicalScopeProps, LexicalScopePropsWithScopeInfo, LexicalScopePropsWithScopeValue, ObjectDeclaration, ObjectDeclarationProperty, ObjectDeclarationPropertyProps, ObjectDeclarationProps, PropertyName, PropertyNameProps, RecordExpression, RecordExpressionProps, TSDoc, TSDocAlias, TSDocAttributesTags, TSDocAttributesTagsProps, TSDocDefaultValue, TSDocDefaultValueProps, TSDocDomain, TSDocExample, TSDocExampleProps, TSDocGroup, TSDocHidden, TSDocIgnore, TSDocInternal, TSDocLink, TSDocModule, TSDocModuleProps, TSDocObjectSchema, TSDocObjectSchemaProps, TSDocParam, TSDocParamProps, TSDocParams, TSDocParamsProps, TSDocPermission, TSDocProps, TSDocReadonly, TSDocRemarks, TSDocReturns, TSDocRuntime, TSDocSchemaProperty, TSDocSchemaPropertyProps, TSDocTag, TSDocTagProps, TSDocThrows, TSDocTitle, TypeDeclaration, TypeDeclarationProps, TypeParameters, TypeParametersProps, TypescriptFile, TypescriptFileHeader, TypescriptFileHeaderImports, TypescriptFileHeaderImportsProps, TypescriptFileHeaderProps, TypescriptFileProps, getCallSignatureProps, isValidJSIdentifier };
@@ -5,7 +5,7 @@ import { TypeParameters, TypeParametersProps } from "./components/type-parameter
5
5
  import { ClassDeclaration, ClassDeclarationProps, ClassField, ClassFieldProps, ClassMember, ClassMemberProps, ClassMethod, ClassMethodProps, ClassPropertyGet, ClassPropertyProps, ClassPropertySet } from "./components/class-declaration.mjs";
6
6
  import { DynamicImportStatement, DynamicImportStatementProps } from "./components/dynamic-import-statement.mjs";
7
7
  import { EntryFile, EntryFileProps } from "./components/entry-file.mjs";
8
- import { InterfaceDeclaration, InterfaceDeclarationProperty, InterfaceDeclarationPropertyProps, InterfaceDeclarationProps, InterfaceExpression, InterfaceExpressionProps, InterfaceIndexerMemberProps, InterfaceMember, InterfaceMemberProps, InterfaceMemberPropsBase, InterfaceSchemaMemberProps } from "./components/interface-declaration.mjs";
8
+ import { InterfaceDeclaration, InterfaceDeclarationProperty, InterfaceDeclarationPropertyProps, InterfaceDeclarationProps, InterfaceExpression, InterfaceExpressionProps, InterfaceIndexerMemberProps, InterfaceMember, InterfaceMemberProps, InterfaceMemberPropsBase, InterfaceSchemaMemberProps, InterfaceTypeMemberProps } from "./components/interface-declaration.mjs";
9
9
  import { ObjectDeclaration, ObjectDeclarationProperty, ObjectDeclarationPropertyProps, ObjectDeclarationProps } from "./components/object-declaration.mjs";
10
10
  import { PropertyName, PropertyNameProps } from "./components/property-name.mjs";
11
11
  import { RecordExpression, RecordExpressionProps } from "./components/record-expression.mjs";
@@ -14,4 +14,4 @@ import { TypeDeclaration, TypeDeclarationProps } from "./components/type-declara
14
14
  import { LexicalScope, LexicalScopeProps, LexicalScopePropsWithScopeInfo, LexicalScopePropsWithScopeValue } from "./contexts/lexical-scope.mjs";
15
15
  import { getCallSignatureProps } from "./helpers/get-call-signature-props.mjs";
16
16
  import { isValidJSIdentifier } from "./helpers/utilities.mjs";
17
- export { BuiltinFile, BuiltinFileProps, ClassDeclaration, ClassDeclarationProps, ClassField, ClassFieldProps, ClassMember, ClassMemberProps, ClassMethod, ClassMethodProps, ClassPropertyGet, ClassPropertyProps, ClassPropertySet, DynamicImportStatement, DynamicImportStatementProps, EntryFile, EntryFileProps, InterfaceDeclaration, InterfaceDeclarationProperty, InterfaceDeclarationPropertyProps, InterfaceDeclarationProps, InterfaceExpression, InterfaceExpressionProps, InterfaceIndexerMemberProps, InterfaceMember, InterfaceMemberProps, InterfaceMemberPropsBase, InterfaceSchemaMemberProps, LexicalScope, LexicalScopeProps, LexicalScopePropsWithScopeInfo, LexicalScopePropsWithScopeValue, ObjectDeclaration, ObjectDeclarationProperty, ObjectDeclarationPropertyProps, ObjectDeclarationProps, PropertyName, PropertyNameProps, RecordExpression, RecordExpressionProps, TSDoc, TSDocAlias, TSDocAttributesTags, TSDocAttributesTagsProps, TSDocDefaultValue, TSDocDefaultValueProps, TSDocDomain, TSDocExample, TSDocExampleProps, TSDocGroup, TSDocHidden, TSDocIgnore, TSDocInternal, TSDocLink, TSDocModule, TSDocModuleProps, TSDocObjectSchema, TSDocObjectSchemaProps, TSDocParam, TSDocParamProps, TSDocParams, TSDocParamsProps, TSDocPermission, TSDocProps, TSDocReadonly, TSDocRemarks, TSDocReturns, TSDocRuntime, TSDocSchemaProperty, TSDocSchemaPropertyProps, TSDocTag, TSDocTagProps, TSDocThrows, TSDocTitle, TypeDeclaration, TypeDeclarationProps, TypeParameters, TypeParametersProps, TypescriptFile, TypescriptFileHeader, TypescriptFileHeaderImports, TypescriptFileHeaderImportsProps, TypescriptFileHeaderProps, TypescriptFileProps, getCallSignatureProps, isValidJSIdentifier };
17
+ export { BuiltinFile, BuiltinFileProps, ClassDeclaration, ClassDeclarationProps, ClassField, ClassFieldProps, ClassMember, ClassMemberProps, ClassMethod, ClassMethodProps, ClassPropertyGet, ClassPropertyProps, ClassPropertySet, DynamicImportStatement, DynamicImportStatementProps, EntryFile, EntryFileProps, InterfaceDeclaration, InterfaceDeclarationProperty, InterfaceDeclarationPropertyProps, InterfaceDeclarationProps, InterfaceExpression, InterfaceExpressionProps, InterfaceIndexerMemberProps, InterfaceMember, InterfaceMemberProps, InterfaceMemberPropsBase, InterfaceSchemaMemberProps, InterfaceTypeMemberProps, LexicalScope, LexicalScopeProps, LexicalScopePropsWithScopeInfo, LexicalScopePropsWithScopeValue, ObjectDeclaration, ObjectDeclarationProperty, ObjectDeclarationPropertyProps, ObjectDeclarationProps, PropertyName, PropertyNameProps, RecordExpression, RecordExpressionProps, TSDoc, TSDocAlias, TSDocAttributesTags, TSDocAttributesTagsProps, TSDocDefaultValue, TSDocDefaultValueProps, TSDocDomain, TSDocExample, TSDocExampleProps, TSDocGroup, TSDocHidden, TSDocIgnore, TSDocInternal, TSDocLink, TSDocModule, TSDocModuleProps, TSDocObjectSchema, TSDocObjectSchemaProps, TSDocParam, TSDocParamProps, TSDocParams, TSDocParamsProps, TSDocPermission, TSDocProps, TSDocReadonly, TSDocRemarks, TSDocReturns, TSDocRuntime, TSDocSchemaProperty, TSDocSchemaPropertyProps, TSDocTag, TSDocTagProps, TSDocThrows, TSDocTitle, TypeDeclaration, TypeDeclarationProps, TypeParameters, TypeParametersProps, TypescriptFile, TypescriptFileHeader, TypescriptFileHeaderImports, TypescriptFileHeaderImportsProps, TypescriptFileHeaderProps, TypescriptFileProps, getCallSignatureProps, isValidJSIdentifier };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-alloy",
3
- "version": "0.26.164",
3
+ "version": "0.26.166",
4
4
  "description": "A package containing various Alloy framework components and helper utilities.",
5
5
  "keywords": ["alloy-js", "powerlines", "powerlines-plugin"],
6
6
  "homepage": "https://stormsoftware.com",
@@ -293,30 +293,30 @@
293
293
  "@alloy-js/json": "^0.23.0",
294
294
  "@alloy-js/markdown": "^0.23.0",
295
295
  "@alloy-js/typescript": "^0.23.0",
296
- "@powerlines/deepkit": "0.9.50",
297
- "@powerlines/plugin-babel": "0.13.71",
296
+ "@powerlines/deepkit": "0.9.51",
297
+ "@powerlines/plugin-babel": "0.13.72",
298
298
  "@storm-software/config-tools": "^1.190.33",
299
- "@stryke/capnp": "^0.12.103",
300
- "@stryke/convert": "^0.7.8",
301
- "@stryke/fs": "^0.33.77",
302
- "@stryke/helpers": "^0.10.17",
303
- "@stryke/json": "^0.15.1",
304
- "@stryke/path": "^0.29.4",
305
- "@stryke/string-format": "^0.17.19",
306
- "@stryke/type-checks": "^0.6.10",
307
- "@stryke/types": "^0.12.5",
308
- "@stryke/unique-id": "^0.3.88",
299
+ "@stryke/capnp": "^0.12.104",
300
+ "@stryke/convert": "^0.7.9",
301
+ "@stryke/fs": "^0.33.78",
302
+ "@stryke/helpers": "^0.10.18",
303
+ "@stryke/json": "^0.15.2",
304
+ "@stryke/path": "^0.29.5",
305
+ "@stryke/string-format": "^0.17.20",
306
+ "@stryke/type-checks": "^0.6.11",
307
+ "@stryke/types": "^0.12.6",
308
+ "@stryke/unique-id": "^0.3.89",
309
309
  "defu": "^6.1.7",
310
- "powerlines": "0.47.75",
310
+ "powerlines": "0.47.76",
311
311
  "prettier": "^3.8.3",
312
312
  "unctx": "^2.5.0"
313
313
  },
314
314
  "devDependencies": {
315
- "@powerlines/plugin-plugin": "0.12.487",
315
+ "@powerlines/plugin-plugin": "0.12.488",
316
316
  "@types/node": "^25.9.1"
317
317
  },
318
318
  "peerDependencies": { "@alloy-js/babel-preset": ">=0.3.0" },
319
319
  "peerDependenciesMeta": { "@alloy-js/babel-preset": { "optional": false } },
320
320
  "publishConfig": { "access": "public" },
321
- "gitHead": "c8d684b669671f6b19bc57dba25dd3bf1872e66a"
321
+ "gitHead": "53c5911f6d02444075c38d2965bb8361ae30f7e5"
322
322
  }