@powerlines/plugin-alloy 0.26.133 → 0.26.143
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/components/output.cjs +0 -1
- package/dist/core/components/single-line-comment.cjs +0 -1
- package/dist/core/components/spacing.cjs +0 -1
- package/dist/core/contexts/context.cjs +0 -1
- package/dist/core/contexts/index.cjs +0 -4
- package/dist/core/contexts/index.d.cts +2 -2
- package/dist/core/contexts/index.d.mts +2 -2
- package/dist/core/contexts/index.mjs +2 -2
- package/dist/core/contexts/meta.cjs +0 -1
- package/dist/core/contexts/schema.cjs +0 -31
- package/dist/core/contexts/schema.d.cts +6 -27
- package/dist/core/contexts/schema.d.cts.map +1 -1
- package/dist/core/contexts/schema.d.mts +6 -27
- package/dist/core/contexts/schema.d.mts.map +1 -1
- package/dist/core/contexts/schema.mjs +1 -27
- package/dist/core/contexts/schema.mjs.map +1 -1
- package/dist/core/helpers/code.cjs +0 -1
- package/dist/core/index.cjs +0 -4
- package/dist/core/index.d.cts +2 -2
- package/dist/core/index.d.mts +2 -2
- package/dist/core/index.mjs +2 -2
- package/dist/hcl/components/block-declaration.cjs +0 -1
- package/dist/hcl/components/hcl-file.cjs +0 -1
- package/dist/hcl/components/packer-file.cjs +0 -1
- package/dist/hcl/components/terraform-file.cjs +0 -1
- package/dist/helpers/create-builtin.cjs +0 -1
- package/dist/helpers/refkey.cjs +0 -1
- package/dist/helpers/typescript.cjs +0 -1
- package/dist/markdown/components/front-matter.cjs +0 -1
- package/dist/markdown/components/heading.cjs +0 -1
- package/dist/markdown/components/markdown-file.cjs +0 -1
- package/dist/markdown/components/markdown-table.cjs +0 -1
- package/dist/markdown/contexts/markdown-table.cjs +0 -1
- package/dist/render.cjs +0 -1
- package/dist/typescript/components/builtin-file.cjs +0 -1
- package/dist/typescript/components/class-declaration.cjs +0 -1
- package/dist/typescript/components/dynamic-import-statement.cjs +0 -1
- package/dist/typescript/components/interface-declaration.cjs +22 -17
- package/dist/typescript/components/interface-declaration.d.cts +15 -18
- package/dist/typescript/components/interface-declaration.d.cts.map +1 -1
- package/dist/typescript/components/interface-declaration.d.mts +15 -18
- package/dist/typescript/components/interface-declaration.d.mts.map +1 -1
- package/dist/typescript/components/interface-declaration.mjs +23 -17
- package/dist/typescript/components/interface-declaration.mjs.map +1 -1
- package/dist/typescript/components/object-declaration.cjs +6 -7
- package/dist/typescript/components/object-declaration.d.cts +7 -7
- package/dist/typescript/components/object-declaration.d.cts.map +1 -1
- package/dist/typescript/components/object-declaration.d.mts +7 -7
- package/dist/typescript/components/object-declaration.d.mts.map +1 -1
- package/dist/typescript/components/object-declaration.mjs +7 -7
- package/dist/typescript/components/object-declaration.mjs.map +1 -1
- package/dist/typescript/components/property-name.cjs +0 -1
- package/dist/typescript/components/record-expression.cjs +0 -1
- package/dist/typescript/components/tsdoc-schema.cjs +43 -50
- package/dist/typescript/components/tsdoc-schema.d.cts +7 -7
- package/dist/typescript/components/tsdoc-schema.d.cts.map +1 -1
- package/dist/typescript/components/tsdoc-schema.d.mts +7 -7
- package/dist/typescript/components/tsdoc-schema.d.mts.map +1 -1
- package/dist/typescript/components/tsdoc-schema.mjs +43 -49
- package/dist/typescript/components/tsdoc-schema.mjs.map +1 -1
- package/dist/typescript/components/tsdoc.cjs +21 -22
- package/dist/typescript/components/tsdoc.d.cts +11 -11
- package/dist/typescript/components/tsdoc.d.cts.map +1 -1
- package/dist/typescript/components/tsdoc.d.mts +11 -11
- package/dist/typescript/components/tsdoc.d.mts.map +1 -1
- package/dist/typescript/components/tsdoc.mjs +21 -21
- package/dist/typescript/components/tsdoc.mjs.map +1 -1
- package/dist/typescript/components/type-declaration.cjs +0 -1
- package/dist/typescript/components/type-parameters.cjs +0 -1
- package/dist/typescript/components/typescript-file.cjs +0 -1
- package/dist/typescript/contexts/lexical-scope.cjs +0 -1
- package/dist/typescript/contexts/member-scope.cjs +0 -1
- package/dist/typescript/helpers/get-call-signature-props.cjs +0 -1
- package/dist/yaml/components/yaml-file.cjs +0 -1
- package/package.json +8 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tsdoc.d.cts","names":[],"sources":["../../../src/typescript/components/tsdoc.tsx"],"mappings":";;;;;;UAsCiB,UAAA,SAAmB,cAAc;EAChD,OAAA,GAAU,QAAA;AAAA;;;;iBAMI,KAAA,CAAM,KAAA,EAAO,UAAA,GAAU,QAAA;AAAA,UA6BtB,aAAA,SAAsB,cAAc;EACnD,GAAG;AAAA;AApCe;AAMpB;;AANoB,iBA0CJ,QAAA,CAAS,KAAA,EAAO,aAAA,GAAa,QAAA;AAAA,UAgB5B,gBAAA;EACf,UAAA,EAAY,mBAAmB;AAAA;;;AArDM;iBA2DvB,WAAA,CAAY,KAAA,EAAO,gBAAA,GAAgB,QAAA;;;;iBA2BnC,UAAA,CAAW,KAAA,EAAO,cAAA,GAAc,QAAA;AAlDhD;;;AAAA,iBA+DgB,WAAA,CAAY,KAAA,EAAO,cAAA,GAAc,QAAA;;;;iBAajC,UAAA,CAAW,KAAA,EAAO,cAAA,GAAc,QAAA;AA5EH;AAgB7C;;AAhB6C,iBAyF7B,eAAA,CAAgB,KAAA,EAAO,cAAA,GAAc,QAAA;;AAxEpB;AAMjC;iBA+EgB,UAAA,CAAW,KAAA,EAAO,cAAA,GAAc,QAAA;AAAA,UAU/B,sBAAA,SAA+B,cAAc;EAC5D,IAAA,GAAO,
|
|
1
|
+
{"version":3,"file":"tsdoc.d.cts","names":[],"sources":["../../../src/typescript/components/tsdoc.tsx"],"mappings":";;;;;;UAsCiB,UAAA,SAAmB,cAAc;EAChD,OAAA,GAAU,QAAA;AAAA;;;;iBAMI,KAAA,CAAM,KAAA,EAAO,UAAA,GAAU,QAAA;AAAA,UA6BtB,aAAA,SAAsB,cAAc;EACnD,GAAG;AAAA;AApCe;AAMpB;;AANoB,iBA0CJ,QAAA,CAAS,KAAA,EAAO,aAAA,GAAa,QAAA;AAAA,UAgB5B,gBAAA;EACf,UAA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AAwB,QAAA;AAAA,UAiFlD,eAAA;EACf,IAAA,EAAM,QAAA;EACN,QAAA,GAAW,QAAA;EACX,QAAA;EACA,OAAA,GAAU,QAAA;AAAA;AAjMZ;;;AAAA,iBAuMgB,UAAA,CAAW,KAAA,EAAO,eAAA,GAAe,QAAA;;;;iBAiDjC,YAAA,CAAa,KAAA,EAAO,cAAA,GAAc,QAAA;AAxPA;AAelD;;AAfkD,iBA+PlC,WAAA,CAAY,KAAA,EAAO,cAAA,GAAc,QAAA;AAAA,UAIhC,gBAAA,SAAyB,cAAc;EApPvB;;;;AAAc;AAI/C;;;;AAMK;AAML;;;EAkPE,MAAA;EAlPkC;;;;AAAiB;AA4BrD;;;;AAA6B;AAO7B;EA4NE,IAAA,EAAM,QAAA;AAAA;;AA5NqB;AAO7B;iBA2NgB,WAAA,CAAY,KAAA,EAAO,gBAAA,GAAgB,QAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ComponentProps } from "../../types/components.mjs";
|
|
2
2
|
import { Children } from "@alloy-js/core";
|
|
3
3
|
import { JSDocExampleProps, ParameterDescriptor } from "@alloy-js/typescript";
|
|
4
|
-
import {
|
|
4
|
+
import { JsonSchemaPrimitiveType } from "@powerlines/schema/types";
|
|
5
5
|
|
|
6
6
|
//#region src/typescript/components/tsdoc.d.ts
|
|
7
7
|
interface TSDocProps extends ComponentProps {
|
|
@@ -46,7 +46,7 @@ declare function TSDocPermission(props: ComponentProps): Children;
|
|
|
46
46
|
*/
|
|
47
47
|
declare function TSDocGroup(props: ComponentProps): Children;
|
|
48
48
|
interface TSDocDefaultValueProps extends ComponentProps {
|
|
49
|
-
type?:
|
|
49
|
+
type?: JsonSchemaPrimitiveType;
|
|
50
50
|
defaultValue: any;
|
|
51
51
|
}
|
|
52
52
|
/**
|
|
@@ -94,17 +94,17 @@ declare function TSDocHidden(): Children;
|
|
|
94
94
|
*/
|
|
95
95
|
declare function TSDocRuntime(): Children;
|
|
96
96
|
interface TSDocAttributesTagsProps {
|
|
97
|
-
type?:
|
|
98
|
-
|
|
97
|
+
type?: JsonSchemaPrimitiveType;
|
|
98
|
+
default?: any;
|
|
99
99
|
title?: string;
|
|
100
100
|
alias?: string[];
|
|
101
|
-
|
|
101
|
+
tags?: string[];
|
|
102
102
|
resourceId?: string;
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
103
|
+
readOnly?: boolean;
|
|
104
|
+
internal?: boolean;
|
|
105
|
+
ignore?: boolean;
|
|
106
|
+
hidden?: boolean;
|
|
107
|
+
runtime?: boolean;
|
|
108
108
|
}
|
|
109
109
|
/**
|
|
110
110
|
* Generates a TypeScript interface property for the given reflection class.
|
|
@@ -114,7 +114,7 @@ interface TSDocParamProps {
|
|
|
114
114
|
name: Children;
|
|
115
115
|
children?: Children;
|
|
116
116
|
optional?: boolean;
|
|
117
|
-
|
|
117
|
+
default?: Children;
|
|
118
118
|
}
|
|
119
119
|
/**
|
|
120
120
|
* Create a TSDoc parameter set off with `@param`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tsdoc.d.mts","names":[],"sources":["../../../src/typescript/components/tsdoc.tsx"],"mappings":";;;;;;UAsCiB,UAAA,SAAmB,cAAc;EAChD,OAAA,GAAU,QAAA;AAAA;;;;iBAMI,KAAA,CAAM,KAAA,EAAO,UAAA,GAAU,QAAA;AAAA,UA6BtB,aAAA,SAAsB,cAAc;EACnD,GAAG;AAAA;AApCe;AAMpB;;AANoB,iBA0CJ,QAAA,CAAS,KAAA,EAAO,aAAA,GAAa,QAAA;AAAA,UAgB5B,gBAAA;EACf,UAAA,EAAY,mBAAmB;AAAA;;;AArDM;iBA2DvB,WAAA,CAAY,KAAA,EAAO,gBAAA,GAAgB,QAAA;;;;iBA2BnC,UAAA,CAAW,KAAA,EAAO,cAAA,GAAc,QAAA;AAlDhD;;;AAAA,iBA+DgB,WAAA,CAAY,KAAA,EAAO,cAAA,GAAc,QAAA;;;;iBAaj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
|
260
260
|
*/
|
|
261
261
|
function TSDocAttributesTags(props) {
|
|
262
|
-
const [{ type, alias,
|
|
262
|
+
const [{ type, alias, tags, readOnly, internal, ignore, hidden, runtime, default: defaultValue }] = splitProps(props, [
|
|
263
263
|
"type",
|
|
264
264
|
"alias",
|
|
265
|
-
"
|
|
266
|
-
"
|
|
267
|
-
"
|
|
268
|
-
"
|
|
269
|
-
"
|
|
270
|
-
"
|
|
271
|
-
"
|
|
265
|
+
"tags",
|
|
266
|
+
"readOnly",
|
|
267
|
+
"internal",
|
|
268
|
+
"ignore",
|
|
269
|
+
"hidden",
|
|
270
|
+
"runtime",
|
|
271
|
+
"default"
|
|
272
272
|
]);
|
|
273
273
|
const title = computed(() => props.title?.trim() || "");
|
|
274
274
|
const domain = computed(() => props.resourceId?.trim() || "");
|
|
@@ -308,50 +308,50 @@ function TSDocAttributesTags(props) {
|
|
|
308
308
|
}),
|
|
309
309
|
createComponent(Show, {
|
|
310
310
|
get when() {
|
|
311
|
-
return memo(() => !!(!isUndefined(
|
|
311
|
+
return memo(() => !!(!isUndefined(tags) && tags.length > 0))() && tags.some((g) => isSetString(g?.trim()));
|
|
312
312
|
},
|
|
313
313
|
get children() {
|
|
314
314
|
return createComponent(For, {
|
|
315
315
|
get each() {
|
|
316
|
-
return
|
|
316
|
+
return tags?.filter((g) => isSetString(g?.trim())) ?? [];
|
|
317
317
|
},
|
|
318
|
-
children: (
|
|
318
|
+
children: (tag) => createComponent(TSDocGroup, { children: tag })
|
|
319
319
|
});
|
|
320
320
|
}
|
|
321
321
|
}),
|
|
322
322
|
createComponent(Show, {
|
|
323
|
-
when:
|
|
323
|
+
when: readOnly === true,
|
|
324
324
|
get children() {
|
|
325
325
|
return createComponent(TSDocReadonly, {});
|
|
326
326
|
}
|
|
327
327
|
}),
|
|
328
328
|
createComponent(Show, {
|
|
329
|
-
when:
|
|
329
|
+
when: internal === true,
|
|
330
330
|
get children() {
|
|
331
331
|
return createComponent(TSDocInternal, {});
|
|
332
332
|
}
|
|
333
333
|
}),
|
|
334
334
|
createComponent(Show, {
|
|
335
|
-
when:
|
|
335
|
+
when: ignore === true,
|
|
336
336
|
get children() {
|
|
337
337
|
return createComponent(TSDocIgnore, {});
|
|
338
338
|
}
|
|
339
339
|
}),
|
|
340
340
|
createComponent(Show, {
|
|
341
|
-
when:
|
|
341
|
+
when: hidden === true,
|
|
342
342
|
get children() {
|
|
343
343
|
return createComponent(TSDocHidden, {});
|
|
344
344
|
}
|
|
345
345
|
}),
|
|
346
346
|
createComponent(Show, {
|
|
347
|
-
when:
|
|
347
|
+
when: runtime === true,
|
|
348
348
|
get children() {
|
|
349
349
|
return createComponent(TSDocRuntime, {});
|
|
350
350
|
}
|
|
351
351
|
}),
|
|
352
352
|
createComponent(Show, {
|
|
353
353
|
get when() {
|
|
354
|
-
return memo(() => !!(
|
|
354
|
+
return memo(() => !!(runtime !== true && !isUndefined(type)))() && !isUndefined(defaultValue);
|
|
355
355
|
},
|
|
356
356
|
get children() {
|
|
357
357
|
return createComponent(TSDocDefaultValue, {
|
|
@@ -375,8 +375,8 @@ function TSDocParam(props) {
|
|
|
375
375
|
get optional() {
|
|
376
376
|
return props.optional;
|
|
377
377
|
},
|
|
378
|
-
get
|
|
379
|
-
return props.
|
|
378
|
+
get ["default"]() {
|
|
379
|
+
return props.default;
|
|
380
380
|
}
|
|
381
381
|
}),
|
|
382
382
|
createComponent(TSDocParamDescription, { get children() {
|
|
@@ -395,10 +395,10 @@ function TSDocParamName(props) {
|
|
|
395
395
|
memo(() => props.name),
|
|
396
396
|
createComponent(Show, {
|
|
397
397
|
get when() {
|
|
398
|
-
return Boolean(props.
|
|
398
|
+
return Boolean(props.default);
|
|
399
399
|
},
|
|
400
400
|
get children() {
|
|
401
|
-
return ["=", memo(() => props.
|
|
401
|
+
return ["=", memo(() => props.default)];
|
|
402
402
|
}
|
|
403
403
|
}),
|
|
404
404
|
createComponent(Show, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tsdoc.mjs","names":[],"sources":["../../../src/typescript/components/tsdoc.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 Children,\n childrenArray,\n computed,\n For,\n List,\n Prose,\n Show,\n splitProps\n} from \"@alloy-js/core\";\nimport { JSDocExampleProps, ParameterDescriptor } from \"@alloy-js/typescript\";\n\nimport { stringifyValue } from \"@powerlines/schema/codegen\";\nimport { JTDType } from \"@powerlines/schema/types\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport { isUndefined } from \"@stryke/type-checks/is-undefined\";\nimport { Spacing } from \"../../core/components/spacing\";\nimport { usePowerlinesSafe } from \"../../core/contexts/context\";\nimport { ComponentProps } from \"../../types/components\";\n\nexport interface TSDocProps extends ComponentProps {\n heading?: Children;\n}\n\n/**\n * Generates a TypeScript interface for the given reflection class.\n */\nexport function TSDoc(props: TSDocProps) {\n const [{ children, heading }] = splitProps(props, [\"children\", \"heading\"]);\n\n return (\n <>\n /**\n <align string=\" * \">\n <hbr />\n <Show when={!isUndefined(heading)}>{heading}</Show>\n <Show\n when={\n !isUndefined(children) &&\n childrenArray(() => children).filter(Boolean).length > 0\n }>\n <Show when={!isUndefined(heading)}>\n <Spacing />\n </Show>\n <List hardline={false} softline={true}>\n {childrenArray(() => children)}\n </List>\n </Show>\n </align>\n <hbr />\n {`*/`}\n <hbr />\n </>\n );\n}\n\nexport interface TSDocTagProps extends ComponentProps {\n tag: string;\n}\n\n/**\n * Create a TSDoc `@<props.tag>` tag.\n */\nexport function TSDocTag(props: TSDocTagProps) {\n const [{ children, tag }] = splitProps(props, [\"children\", \"tag\"]);\n\n return (\n <>\n {`@${tag} `}\n <Show when={Boolean(children)}>\n <align width={2}>\n <Prose>{children}</Prose>\n </align>\n </Show>\n <sbr />\n </>\n );\n}\n\nexport interface TSDocParamsProps {\n parameters: ParameterDescriptor[] | string[];\n}\n\n/**\n * A component that creates a TSDoc block with `@param` tags for each parameter.\n */\nexport function TSDocParams(props: TSDocParamsProps) {\n const parameters = normalizeParametersForDoc(props.parameters);\n\n return (\n <For each={parameters}>\n {param => (\n <TSDocParam name={param.name} optional={param.optional}>\n {param.doc}\n </TSDocParam>\n )}\n </For>\n );\n}\n\nfunction normalizeParametersForDoc(\n parameters: ParameterDescriptor[] | string[]\n): ParameterDescriptor[] {\n if (parameters.some(p => typeof p === \"string\")) {\n return [];\n }\n\n return parameters as ParameterDescriptor[];\n}\n\n/**\n * Create a TSDoc `@title` tag.\n */\nexport function TSDocTitle(props: ComponentProps) {\n const [{ children }, rest] = splitProps(props, [\"children\"]);\n\n return (\n <TSDocTag {...rest} tag=\"title\">\n {children}\n </TSDocTag>\n );\n}\n\n/**\n * Create a TSDoc `@domain` tag.\n */\nexport function TSDocDomain(props: ComponentProps) {\n const [{ children }, rest] = splitProps(props, [\"children\"]);\n\n return (\n <TSDocTag {...rest} tag=\"domain\">\n {children}\n </TSDocTag>\n );\n}\n\n/**\n * Create a TSDoc `@alias` tag.\n */\nexport function TSDocAlias(props: ComponentProps) {\n const [{ children }, rest] = splitProps(props, [\"children\"]);\n\n return (\n <TSDocTag {...rest} tag=\"alias\">\n {children}\n </TSDocTag>\n );\n}\n\n/**\n * Create a TSDoc `@permission` tag.\n */\nexport function TSDocPermission(props: ComponentProps) {\n const [{ children }, rest] = splitProps(props, [\"children\"]);\n\n return (\n <TSDocTag {...rest} tag=\"permission\">\n {children}\n </TSDocTag>\n );\n}\n\n/**\n * Create a TSDoc `@group` tag.\n */\nexport function TSDocGroup(props: ComponentProps) {\n const [{ children }, rest] = splitProps(props, [\"children\"]);\n\n return (\n <TSDocTag {...rest} tag=\"group\">\n {children}\n </TSDocTag>\n );\n}\n\nexport interface TSDocDefaultValueProps extends ComponentProps {\n type?: JTDType;\n defaultValue: any;\n}\n\n/**\n * Create a TSDoc `@defaultValue` tag.\n */\nexport function TSDocDefaultValue(props: TSDocDefaultValueProps) {\n const [{ type, defaultValue }] = splitProps(props, [\"type\", \"defaultValue\"]);\n\n return (\n <>\n {\"@defaultValue \"}\n <Show when={!isUndefined(defaultValue)}>\n <align width={2}>\n <Prose>{stringifyValue(defaultValue, type)}</Prose>\n </align>\n </Show>\n </>\n );\n}\n\n/**\n * Create a TSDoc `@remarks` tag.\n */\nexport function TSDocRemarks(props: ComponentProps) {\n return (\n <>\n {\"@remarks \"}\n <hbr />\n <List hardline={false} softline={true}>\n {childrenArray(() => props.children)}\n </List>\n </>\n );\n}\n\n/**\n * Create a TSDoc `@see` tag.\n */\nexport function TSDocLink(props: ComponentProps) {\n return <TSDocTag {...props} tag=\"see\" />;\n}\n\nexport interface TSDocExampleProps extends JSDocExampleProps {\n /**\n * Whether the file is a TSX file.\n *\n * @defaultValue false\n */\n tsx?: boolean;\n}\n\n/**\n * Create a TSDoc `@example` tag.\n */\nexport function TSDocExample(props: TSDocExampleProps) {\n const [{ tsx, fenced = true, language, children }] = splitProps(props, [\n \"tsx\",\n \"fenced\",\n \"language\",\n \"children\"\n ]);\n\n return (\n <>\n {\"@example \"}\n <hbr />\n <Show when={fenced}>\n ```{language || (tsx ? \"tsx\" : \"ts\")}\n <hbr />\n </Show>\n {children}\n <Show when={fenced}>\n <hbr />\n ```\n </Show>\n </>\n );\n}\n\n/**\n * Create a TSDoc `@readonly` tag.\n */\nexport function TSDocReadonly() {\n return <TSDocTag tag=\"readonly\" />;\n}\n\n/**\n * Create a TSDoc `@internal` tag.\n */\nexport function TSDocInternal() {\n return <TSDocTag tag=\"internal\" />;\n}\n\n/**\n * Create a TSDoc `@ignore` tag.\n */\nexport function TSDocIgnore() {\n return <TSDocTag tag=\"ignore\" />;\n}\n\n/**\n * Create a TSDoc `@hidden` tag.\n */\nexport function TSDocHidden() {\n return <TSDocTag tag=\"hidden\" />;\n}\n\n/**\n * Create a TSDoc `@runtime` tag.\n */\nexport function TSDocRuntime() {\n return <TSDocTag tag=\"runtime\" />;\n}\n\nexport interface TSDocAttributesTagsProps {\n type?: JTDType;\n defaultValue?: any;\n title?: string;\n alias?: string[];\n groups?: string[];\n resourceId?: string;\n isReadonly?: boolean;\n isInternal?: boolean;\n isIgnored?: boolean;\n isHidden?: boolean;\n isRuntime?: boolean;\n}\n\n/**\n * Generates a TypeScript interface property for the given reflection class.\n */\nexport function TSDocAttributesTags(props: TSDocAttributesTagsProps) {\n const [\n {\n type,\n alias,\n groups,\n isReadonly,\n isInternal,\n isIgnored,\n isHidden,\n isRuntime,\n defaultValue\n }\n ] = splitProps(props, [\n \"type\",\n \"alias\",\n \"groups\",\n \"isReadonly\",\n \"isInternal\",\n \"isIgnored\",\n \"isHidden\",\n \"isRuntime\",\n \"defaultValue\"\n ]);\n\n const title = computed(() => props.title?.trim() || \"\");\n const domain = computed(() => props.resourceId?.trim() || \"\");\n\n return (\n <>\n <Show when={isSetString(title.value)}>\n <TSDocTitle>{title.value}</TSDocTitle>\n </Show>\n <Show\n when={\n !isUndefined(alias) &&\n alias.length > 0 &&\n alias.some(a => isSetString(a?.trim()))\n }>\n <For each={alias?.filter(a => isSetString(a?.trim())) ?? []}>\n {alias => <TSDocAlias>{alias}</TSDocAlias>}\n </For>\n </Show>\n <Show when={isSetString(domain.value)}>\n <TSDocDomain>{domain.value}</TSDocDomain>\n </Show>\n <Show\n when={\n !isUndefined(groups) &&\n groups.length > 0 &&\n groups.some(g => isSetString(g?.trim()))\n }>\n <For each={groups?.filter(g => isSetString(g?.trim())) ?? []}>\n {group => <TSDocGroup>{group}</TSDocGroup>}\n </For>\n </Show>\n <Show when={isReadonly === true}>\n <TSDocReadonly />\n </Show>\n <Show when={isInternal === true}>\n <TSDocInternal />\n </Show>\n <Show when={isIgnored === true}>\n <TSDocIgnore />\n </Show>\n <Show when={isHidden === true}>\n <TSDocHidden />\n </Show>\n <Show when={isRuntime === true}>\n <TSDocRuntime />\n </Show>\n <Show\n when={\n isRuntime !== true && !isUndefined(type) && !isUndefined(defaultValue)\n }>\n <TSDocDefaultValue type={type} defaultValue={defaultValue} />\n </Show>\n </>\n );\n}\n\nexport interface TSDocParamProps {\n name: Children;\n children?: Children;\n optional?: boolean;\n defaultValue?: Children;\n}\n\n/**\n * Create a TSDoc parameter set off with `@param`.\n */\nexport function TSDocParam(props: TSDocParamProps) {\n return (\n <>\n {\"@param \"}\n <TSDocParamName\n name={props.name}\n optional={props.optional}\n defaultValue={props.defaultValue}\n />\n <TSDocParamDescription children={props.children} />\n </>\n );\n}\n\ninterface TSDocParamNameProps {\n name: Children;\n optional?: boolean;\n defaultValue?: Children;\n}\n\nfunction TSDocParamName(props: TSDocParamNameProps) {\n return (\n <>\n <Show when={props.optional}>{\"[\"}</Show>\n {props.name}\n <Show when={Boolean(props.defaultValue)}>={props.defaultValue}</Show>\n <Show when={props.optional}>{\"]\"}</Show>\n </>\n );\n}\n\ninterface TSDocParamDescriptionProps {\n children?: Children;\n}\n\nfunction TSDocParamDescription(props: TSDocParamDescriptionProps) {\n return (\n <Show when={Boolean(props.children)}>\n {\" - \"}\n <align width={2}>\n <Prose>{props.children}</Prose>\n </align>\n </Show>\n );\n}\n\n/**\n * Create a TSDoc `@returns` tag.\n */\nexport function TSDocReturns(props: ComponentProps) {\n return <TSDocTag {...props} tag=\"returns\" />;\n}\n\n/**\n * Create a TSDoc `@throws` tag.\n */\nexport function TSDocThrows(props: ComponentProps) {\n return <TSDocTag {...props} tag=\"throws\" />;\n}\n\nexport interface TSDocModuleProps extends ComponentProps {\n /**\n * The prefix for the builtin module name\n *\n * @remarks\n * This value is populated from the Powerlines configuration output builtin prefix by default.\n *\n * @example\n * ```ts\n * /**\n * @module powerlines:my-module\n * \\/\n * ```\n */\n prefix?: string;\n\n /**\n * The name of the module\n *\n * @remarks\n * This will be used in the `@module` tag as well as the import path for the module, e.g. `storm:<name>`.\n *\n * @example\n * ```ts\n * import { MyModule } from \"powerlines:my-module\";\n * ```\n */\n name: Children;\n}\n\n/**\n * Generates a TSDoc `@module` tag for the given module name.\n */\nexport function TSDocModule(props: TSDocModuleProps) {\n const [{ children, name, prefix }] = splitProps(props, [\n \"children\",\n \"name\",\n \"prefix\"\n ]);\n\n const context = usePowerlinesSafe();\n\n return (\n <>\n /**\n <align string=\" * \">\n <hbr />\n <Show when={Boolean(children)}>\n <List hardline={false} softline={true}>\n {childrenArray(() => children)}\n </List>\n <Spacing />\n </Show>\n {\"@module \"}\n {prefix || context?.config?.framework?.name || \"powerlines\"}:{name}\n </align>\n <hbr />\n {` */`}\n </>\n );\n}\n"],"mappings":";;;;;;;;;;;;AA+BA,SAAgB,MAAG,OAAO;CAC1B,MAAQ,CAAC,EACT,UACA,aACO,WAAE,OAAA,CAAiB,YAAY,SAAQ,CAAA;CAC9C,OAAS;EAAA;EAAA,gBAA0B,SAAS;;GAE5C,IAAO,WAAU;IACf,OAAU;KAAA,gBAAQ,OAAA,CAAA,CAAA;KAAA,gBAAA,MAAA;MACpB,IAAA,OAAA;;MAEE;MACC,UAAY;KACb,CAAA;KAAA,gBAAA,MAAA;MACK,IAAA,OAAS;OACN,OAAC,WAAmB,CAAC,CAAC,CAAC,YAAY,QAAQ,CAAC,EAAA,KAAA,oBAAsB,QAAA,EAAA,OAAA,OAAA,EAAA,SAAA;;MAEpE,IAAC,WAAA;OACJ,OAAA,CAAA,gBAAA,MAAA;QACG,IAAA,OAAA;SACK,OAAQ,CAAC,YAAG,OAAA;QACb;QACH,IAAK,WAAO;SACZ,OAAA,gBAAA,SAAA,CAAA,CAAA;QACC;OACA,CAAC,GAAE,gBAAY,MAAW;QACxB,UAAA;QACD,UAAA;QACA,IAAK,WAAO;SACV,OAAQ,oBAAC,QAAA;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,EAC7C,KAAA;AAEA;;;;AAIA,SAAM,YAAA,OAAA;CACJ,MAAG,CAAI,EACN,UACC,MACA,YACG,WAAA,OAAA;EAAA;EAAA;EAAA;CAAA,CAAA;CACL,MAAK,UAAO,kBAAc;CAC1B,OAAK;EAAA;EAAA,gBAAA,SAAA;GACH,QAAG;GACH,IAAA,WAAA;IACF,OAAS;KAAA,gBAAM,OAAA,CAAA,CAAA;KAAA,gBAAA,MAAA;;OAEb,OAAA,QAAA,QAAA;MACI;MACL,IAAA,WAAA;OACG,OAAA,CAAA,gBAAA,MAAA;QACI,UAAY;QACnB,UAAA;QACG,IAAA,WAAA;SACE,OAAA,oBAAA,QAAA;QACI;OACL,CAAA,GAAA,gBAAA,SAAA,CAAA,CAAA,CAAA;MACH;KACE,CAAC;KAAC;KAAQ,WAAA,UAAA,SAAA,QAAA,WAAA,QAAA,YAAA;KAAA;KAAA;IAAA;GAChB;;;;;AAEA"}
|
|
1
|
+
{"version":3,"file":"tsdoc.mjs","names":[],"sources":["../../../src/typescript/components/tsdoc.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 Children,\n childrenArray,\n computed,\n For,\n List,\n Prose,\n Show,\n splitProps\n} from \"@alloy-js/core\";\nimport { JSDocExampleProps, ParameterDescriptor } from \"@alloy-js/typescript\";\n\nimport { stringifyValue } from \"@powerlines/schema/codegen\";\nimport { JsonSchemaPrimitiveType } from \"@powerlines/schema/types\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport { isUndefined } from \"@stryke/type-checks/is-undefined\";\nimport { Spacing } from \"../../core/components/spacing\";\nimport { usePowerlinesSafe } from \"../../core/contexts/context\";\nimport { ComponentProps } from \"../../types/components\";\n\nexport interface TSDocProps extends ComponentProps {\n heading?: Children;\n}\n\n/**\n * Generates a TypeScript interface for the given reflection class.\n */\nexport function TSDoc(props: TSDocProps) {\n const [{ children, heading }] = splitProps(props, [\"children\", \"heading\"]);\n\n return (\n <>\n /**\n <align string=\" * \">\n <hbr />\n <Show when={!isUndefined(heading)}>{heading}</Show>\n <Show\n when={\n !isUndefined(children) &&\n childrenArray(() => children).filter(Boolean).length > 0\n }>\n <Show when={!isUndefined(heading)}>\n <Spacing />\n </Show>\n <List hardline={false} softline={true}>\n {childrenArray(() => children)}\n </List>\n </Show>\n </align>\n <hbr />\n {`*/`}\n <hbr />\n </>\n );\n}\n\nexport interface TSDocTagProps extends ComponentProps {\n tag: string;\n}\n\n/**\n * Create a TSDoc `@<props.tag>` tag.\n */\nexport function TSDocTag(props: TSDocTagProps) {\n const [{ children, tag }] = splitProps(props, [\"children\", \"tag\"]);\n\n return (\n <>\n {`@${tag} `}\n <Show when={Boolean(children)}>\n <align width={2}>\n <Prose>{children}</Prose>\n </align>\n </Show>\n <sbr />\n </>\n );\n}\n\nexport interface TSDocParamsProps {\n parameters: ParameterDescriptor[] | string[];\n}\n\n/**\n * A component that creates a TSDoc block with `@param` tags for each parameter.\n */\nexport function TSDocParams(props: TSDocParamsProps) {\n const parameters = normalizeParametersForDoc(props.parameters);\n\n return (\n <For each={parameters}>\n {param => (\n <TSDocParam name={param.name} optional={param.optional}>\n {param.doc}\n </TSDocParam>\n )}\n </For>\n );\n}\n\nfunction normalizeParametersForDoc(\n parameters: ParameterDescriptor[] | string[]\n): ParameterDescriptor[] {\n if (parameters.some(p => typeof p === \"string\")) {\n return [];\n }\n\n return parameters as ParameterDescriptor[];\n}\n\n/**\n * Create a TSDoc `@title` tag.\n */\nexport function TSDocTitle(props: ComponentProps) {\n const [{ children }, rest] = splitProps(props, [\"children\"]);\n\n return (\n <TSDocTag {...rest} tag=\"title\">\n {children}\n </TSDocTag>\n );\n}\n\n/**\n * Create a TSDoc `@domain` tag.\n */\nexport function TSDocDomain(props: ComponentProps) {\n const [{ children }, rest] = splitProps(props, [\"children\"]);\n\n return (\n <TSDocTag {...rest} tag=\"domain\">\n {children}\n </TSDocTag>\n );\n}\n\n/**\n * Create a TSDoc `@alias` tag.\n */\nexport function TSDocAlias(props: ComponentProps) {\n const [{ children }, rest] = splitProps(props, [\"children\"]);\n\n return (\n <TSDocTag {...rest} tag=\"alias\">\n {children}\n </TSDocTag>\n );\n}\n\n/**\n * Create a TSDoc `@permission` tag.\n */\nexport function TSDocPermission(props: ComponentProps) {\n const [{ children }, rest] = splitProps(props, [\"children\"]);\n\n return (\n <TSDocTag {...rest} tag=\"permission\">\n {children}\n </TSDocTag>\n );\n}\n\n/**\n * Create a TSDoc `@group` tag.\n */\nexport function TSDocGroup(props: ComponentProps) {\n const [{ children }, rest] = splitProps(props, [\"children\"]);\n\n return (\n <TSDocTag {...rest} tag=\"group\">\n {children}\n </TSDocTag>\n );\n}\n\nexport interface TSDocDefaultValueProps extends ComponentProps {\n type?: JsonSchemaPrimitiveType;\n defaultValue: any;\n}\n\n/**\n * Create a TSDoc `@defaultValue` tag.\n */\nexport function TSDocDefaultValue(props: TSDocDefaultValueProps) {\n const [{ type, defaultValue }] = splitProps(props, [\"type\", \"defaultValue\"]);\n\n return (\n <>\n {\"@defaultValue \"}\n <Show when={!isUndefined(defaultValue)}>\n <align width={2}>\n <Prose>{stringifyValue(defaultValue, type)}</Prose>\n </align>\n </Show>\n </>\n );\n}\n\n/**\n * Create a TSDoc `@remarks` tag.\n */\nexport function TSDocRemarks(props: ComponentProps) {\n return (\n <>\n {\"@remarks \"}\n <hbr />\n <List hardline={false} softline={true}>\n {childrenArray(() => props.children)}\n </List>\n </>\n );\n}\n\n/**\n * Create a TSDoc `@see` tag.\n */\nexport function TSDocLink(props: ComponentProps) {\n return <TSDocTag {...props} tag=\"see\" />;\n}\n\nexport interface TSDocExampleProps extends JSDocExampleProps {\n /**\n * Whether the file is a TSX file.\n *\n * @defaultValue false\n */\n tsx?: boolean;\n}\n\n/**\n * Create a TSDoc `@example` tag.\n */\nexport function TSDocExample(props: TSDocExampleProps) {\n const [{ tsx, fenced = true, language, children }] = splitProps(props, [\n \"tsx\",\n \"fenced\",\n \"language\",\n \"children\"\n ]);\n\n return (\n <>\n {\"@example \"}\n <hbr />\n <Show when={fenced}>\n ```{language || (tsx ? \"tsx\" : \"ts\")}\n <hbr />\n </Show>\n {children}\n <Show when={fenced}>\n <hbr />\n ```\n </Show>\n </>\n );\n}\n\n/**\n * Create a TSDoc `@readonly` tag.\n */\nexport function TSDocReadonly() {\n return <TSDocTag tag=\"readonly\" />;\n}\n\n/**\n * Create a TSDoc `@internal` tag.\n */\nexport function TSDocInternal() {\n return <TSDocTag tag=\"internal\" />;\n}\n\n/**\n * Create a TSDoc `@ignore` tag.\n */\nexport function TSDocIgnore() {\n return <TSDocTag tag=\"ignore\" />;\n}\n\n/**\n * Create a TSDoc `@hidden` tag.\n */\nexport function TSDocHidden() {\n return <TSDocTag tag=\"hidden\" />;\n}\n\n/**\n * Create a TSDoc `@runtime` tag.\n */\nexport function TSDocRuntime() {\n return <TSDocTag tag=\"runtime\" />;\n}\n\nexport interface TSDocAttributesTagsProps {\n type?: JsonSchemaPrimitiveType;\n default?: any;\n title?: string;\n alias?: string[];\n tags?: string[];\n resourceId?: string;\n readOnly?: boolean;\n internal?: boolean;\n ignore?: boolean;\n hidden?: boolean;\n runtime?: boolean;\n}\n\n/**\n * Generates a TypeScript interface property for the given reflection class.\n */\nexport function TSDocAttributesTags(props: TSDocAttributesTagsProps) {\n const [\n {\n type,\n alias,\n tags,\n readOnly,\n internal,\n ignore,\n hidden,\n runtime,\n default: defaultValue\n }\n ] = splitProps(props, [\n \"type\",\n \"alias\",\n \"tags\",\n \"readOnly\",\n \"internal\",\n \"ignore\",\n \"hidden\",\n \"runtime\",\n \"default\"\n ]);\n\n const title = computed(() => props.title?.trim() || \"\");\n const domain = computed(() => props.resourceId?.trim() || \"\");\n\n return (\n <>\n <Show when={isSetString(title.value)}>\n <TSDocTitle>{title.value}</TSDocTitle>\n </Show>\n <Show\n when={\n !isUndefined(alias) &&\n alias.length > 0 &&\n alias.some(a => isSetString(a?.trim()))\n }>\n <For each={alias?.filter(a => isSetString(a?.trim())) ?? []}>\n {alias => <TSDocAlias>{alias}</TSDocAlias>}\n </For>\n </Show>\n <Show when={isSetString(domain.value)}>\n <TSDocDomain>{domain.value}</TSDocDomain>\n </Show>\n <Show\n when={\n !isUndefined(tags) &&\n tags.length > 0 &&\n tags.some(g => isSetString(g?.trim()))\n }>\n <For each={tags?.filter(g => isSetString(g?.trim())) ?? []}>\n {tag => <TSDocGroup>{tag}</TSDocGroup>}\n </For>\n </Show>\n <Show when={readOnly === true}>\n <TSDocReadonly />\n </Show>\n <Show when={internal === true}>\n <TSDocInternal />\n </Show>\n <Show when={ignore === true}>\n <TSDocIgnore />\n </Show>\n <Show when={hidden === true}>\n <TSDocHidden />\n </Show>\n <Show when={runtime === true}>\n <TSDocRuntime />\n </Show>\n <Show\n when={\n runtime !== true && !isUndefined(type) && !isUndefined(defaultValue)\n }>\n <TSDocDefaultValue type={type} defaultValue={defaultValue} />\n </Show>\n </>\n );\n}\n\nexport interface TSDocParamProps {\n name: Children;\n children?: Children;\n optional?: boolean;\n default?: Children;\n}\n\n/**\n * Create a TSDoc parameter set off with `@param`.\n */\nexport function TSDocParam(props: TSDocParamProps) {\n return (\n <>\n {\"@param \"}\n <TSDocParamName\n name={props.name}\n optional={props.optional}\n default={props.default}\n />\n <TSDocParamDescription children={props.children} />\n </>\n );\n}\n\ninterface TSDocParamNameProps {\n name: Children;\n optional?: boolean;\n default?: Children;\n}\n\nfunction TSDocParamName(props: TSDocParamNameProps) {\n return (\n <>\n <Show when={props.optional}>{\"[\"}</Show>\n {props.name}\n <Show when={Boolean(props.default)}>={props.default}</Show>\n <Show when={props.optional}>{\"]\"}</Show>\n </>\n );\n}\n\ninterface TSDocParamDescriptionProps {\n children?: Children;\n}\n\nfunction TSDocParamDescription(props: TSDocParamDescriptionProps) {\n return (\n <Show when={Boolean(props.children)}>\n {\" - \"}\n <align width={2}>\n <Prose>{props.children}</Prose>\n </align>\n </Show>\n );\n}\n\n/**\n * Create a TSDoc `@returns` tag.\n */\nexport function TSDocReturns(props: ComponentProps) {\n return <TSDocTag {...props} tag=\"returns\" />;\n}\n\n/**\n * Create a TSDoc `@throws` tag.\n */\nexport function TSDocThrows(props: ComponentProps) {\n return <TSDocTag {...props} tag=\"throws\" />;\n}\n\nexport interface TSDocModuleProps extends ComponentProps {\n /**\n * The prefix for the builtin module name\n *\n * @remarks\n * This value is populated from the Powerlines configuration output builtin prefix by default.\n *\n * @example\n * ```ts\n * /**\n * @module powerlines:my-module\n * \\/\n * ```\n */\n prefix?: string;\n\n /**\n * The name of the module\n *\n * @remarks\n * This will be used in the `@module` tag as well as the import path for the module, e.g. `storm:<name>`.\n *\n * @example\n * ```ts\n * import { MyModule } from \"powerlines:my-module\";\n * ```\n */\n name: Children;\n}\n\n/**\n * Generates a TSDoc `@module` tag for the given module name.\n */\nexport function TSDocModule(props: TSDocModuleProps) {\n const [{ children, name, prefix }] = splitProps(props, [\n \"children\",\n \"name\",\n \"prefix\"\n ]);\n\n const context = usePowerlinesSafe();\n\n return (\n <>\n /**\n <align string=\" * \">\n <hbr />\n <Show when={Boolean(children)}>\n <List hardline={false} softline={true}>\n {childrenArray(() => children)}\n </List>\n <Spacing />\n </Show>\n {\"@module \"}\n {prefix || context?.config?.framework?.name || \"powerlines\"}:{name}\n </align>\n <hbr />\n {` */`}\n </>\n );\n}\n"],"mappings":";;;;;;;;;;;;AA+BA,SAAS,MAAA,OAAA;CACT,MAAQ,CAAC,EACT,UACA,aACO,WAAE,OAAA,CAAiB,YAAY,SAAQ,CAAA;CAC9C,OAAS;EA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
|
-
const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
|
|
3
2
|
const require_typescript_components_tsdoc = require('./tsdoc.cjs');
|
|
4
3
|
const require_typescript_components_type_parameters = require('./type-parameters.cjs');
|
|
5
4
|
let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
|
|
3
2
|
let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
4
3
|
let _alloy_js_core = require("@alloy-js/core");
|
|
5
4
|
let _alloy_js_typescript = require("@alloy-js/typescript");
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
|
|
3
2
|
const require_core_contexts_context = require('../../core/contexts/context.cjs');
|
|
4
3
|
const require_core_components_source_file = require('../../core/components/source-file.cjs');
|
|
5
4
|
const require_core_components_single_line_comment = require('../../core/components/single-line-comment.cjs');
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
|
|
3
2
|
let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
4
3
|
let _alloy_js_core = require("@alloy-js/core");
|
|
5
4
|
let _alloy_js_typescript = require("@alloy-js/typescript");
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
|
|
3
2
|
let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
4
3
|
let _alloy_js_core = require("@alloy-js/core");
|
|
5
4
|
let _alloy_js_typescript = require("@alloy-js/typescript");
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
|
|
3
2
|
const require_core_contexts_context = require('../../core/contexts/context.cjs');
|
|
4
3
|
const require_core_components_source_file = require('../../core/components/source-file.cjs');
|
|
5
4
|
const require_core_components_single_line_comment = require('../../core/components/single-line-comment.cjs');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-alloy",
|
|
3
|
-
"version": "0.26.
|
|
3
|
+
"version": "0.26.143",
|
|
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",
|
|
@@ -292,9 +292,9 @@
|
|
|
292
292
|
"@alloy-js/json": "^0.23.0",
|
|
293
293
|
"@alloy-js/markdown": "^0.23.0",
|
|
294
294
|
"@alloy-js/typescript": "^0.23.0",
|
|
295
|
-
"@powerlines/deepkit": "
|
|
296
|
-
"@powerlines/plugin-babel": "
|
|
297
|
-
"@storm-software/config-tools": "^1.190.
|
|
295
|
+
"@powerlines/deepkit": "0.9.34",
|
|
296
|
+
"@powerlines/plugin-babel": "0.13.54",
|
|
297
|
+
"@storm-software/config-tools": "^1.190.26",
|
|
298
298
|
"@stryke/capnp": "^0.12.102",
|
|
299
299
|
"@stryke/convert": "^0.7.7",
|
|
300
300
|
"@stryke/fs": "^0.33.76",
|
|
@@ -306,14 +306,14 @@
|
|
|
306
306
|
"@stryke/types": "^0.12.4",
|
|
307
307
|
"@stryke/unique-id": "^0.3.87",
|
|
308
308
|
"defu": "^6.1.7",
|
|
309
|
-
"powerlines": "
|
|
309
|
+
"powerlines": "0.47.58",
|
|
310
310
|
"prettier": "^3.8.3",
|
|
311
311
|
"unctx": "^2.5.0"
|
|
312
312
|
},
|
|
313
313
|
"devDependencies": {
|
|
314
314
|
"@babel/preset-typescript": "8.0.0-rc.5",
|
|
315
|
-
"@powerlines/plugin-plugin": "
|
|
316
|
-
"@types/node": "^25.9.
|
|
315
|
+
"@powerlines/plugin-plugin": "0.12.470",
|
|
316
|
+
"@types/node": "^25.9.1"
|
|
317
317
|
},
|
|
318
318
|
"peerDependencies": {
|
|
319
319
|
"@babel/preset-typescript": "8.0.0-rc5",
|
|
@@ -324,5 +324,5 @@
|
|
|
324
324
|
"@babel/preset-typescript": { "optional": false }
|
|
325
325
|
},
|
|
326
326
|
"publishConfig": { "access": "public" },
|
|
327
|
-
"gitHead": "
|
|
327
|
+
"gitHead": "63c6c22ee9f8ceb3fb4302204d8e6079bbd98b6c"
|
|
328
328
|
}
|