@powerlines/plugin-alloy 0.15.6 → 0.15.8
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/_virtual/rolldown_runtime.cjs +8 -0
- package/dist/_virtual/rolldown_runtime.mjs +29 -0
- package/dist/core/components/output.cjs +6 -6
- package/dist/core/components/output.d.cts +3 -3
- package/dist/core/components/output.d.mts +3 -3
- package/dist/core/components/output.mjs +1 -1
- package/dist/core/components/single-line-comment.cjs +2 -2
- package/dist/core/components/single-line-comment.d.cts +2 -2
- package/dist/core/components/single-line-comment.d.mts +2 -2
- package/dist/core/components/single-line-comment.mjs +1 -1
- package/dist/core/components/source-file.cjs +7 -7
- package/dist/core/components/source-file.d.cts +3 -3
- package/dist/core/components/source-file.d.mts +3 -3
- package/dist/core/components/source-file.mjs +1 -1
- package/dist/core/contexts/context.cjs +3 -3
- package/dist/core/contexts/context.d.cts +1 -1
- package/dist/core/contexts/context.d.mts +1 -1
- package/dist/core/contexts/context.mjs +1 -1
- package/dist/core/contexts/reflection.cjs +9 -9
- package/dist/core/contexts/reflection.d.cts +1 -1
- package/dist/core/contexts/reflection.d.mts +1 -1
- package/dist/core/contexts/reflection.mjs +1 -1
- package/dist/core/index.d.cts +2 -0
- package/dist/helpers/capnp.cjs +2 -2
- package/dist/helpers/capnp.mjs +2 -2
- package/dist/helpers/create-builtin.d.cts +1 -1
- package/dist/helpers/create-builtin.d.mts +1 -1
- package/dist/helpers/index.cjs +2 -2
- package/dist/helpers/index.mjs +2 -2
- package/dist/helpers/refkey.cjs +2 -2
- package/dist/helpers/refkey.d.cts +1 -1
- package/dist/helpers/refkey.d.mts +1 -1
- package/dist/helpers/refkey.mjs +1 -1
- package/dist/index.cjs +15 -114
- package/dist/index.d.cts +3 -24
- package/dist/index.d.mts +3 -29
- package/dist/index.mjs +15 -38
- package/dist/markdown/components/markdown-file.cjs +12 -12
- package/dist/markdown/components/markdown-file.d.cts +5 -5
- package/dist/markdown/components/markdown-file.d.mts +5 -5
- package/dist/markdown/components/markdown-file.mjs +1 -1
- package/dist/markdown/components/markdown-table.cjs +17 -17
- package/dist/markdown/components/markdown-table.d.cts +4 -4
- package/dist/markdown/components/markdown-table.d.mts +4 -4
- package/dist/markdown/components/markdown-table.mjs +1 -1
- package/dist/markdown/contexts/markdown-table.cjs +5 -5
- package/dist/markdown/contexts/markdown-table.d.cts +1 -1
- package/dist/markdown/contexts/markdown-table.d.mts +1 -1
- package/dist/markdown/contexts/markdown-table.mjs +1 -1
- package/dist/markdown/index.d.cts +2 -0
- package/dist/types/components.d.cts +4 -5
- package/dist/types/components.d.mts +1 -2
- package/dist/types/plugin.d.cts +2 -3
- package/dist/types/plugin.d.mts +1 -2
- package/dist/typescript/components/builtin-file.cjs +2 -2
- package/dist/typescript/components/builtin-file.d.cts +2 -2
- package/dist/typescript/components/builtin-file.mjs +1 -1
- package/dist/typescript/components/dynamic-import-statement.cjs +2 -2
- package/dist/typescript/components/dynamic-import-statement.d.cts +2 -2
- package/dist/typescript/components/dynamic-import-statement.d.mts +2 -2
- package/dist/typescript/components/dynamic-import-statement.mjs +1 -1
- package/dist/typescript/components/entry-file.cjs +3 -3
- package/dist/typescript/components/entry-file.d.cts +2 -2
- package/dist/typescript/components/entry-file.d.mts +2 -2
- package/dist/typescript/components/entry-file.mjs +1 -1
- package/dist/typescript/components/record-expression.cjs +2 -2
- package/dist/typescript/components/record-expression.d.cts +1 -1
- package/dist/typescript/components/record-expression.d.mts +1 -1
- package/dist/typescript/components/record-expression.mjs +1 -1
- package/dist/typescript/components/tsdoc-reflection.cjs +26 -26
- package/dist/typescript/components/tsdoc-reflection.d.cts +4 -4
- package/dist/typescript/components/tsdoc-reflection.d.mts +4 -4
- package/dist/typescript/components/tsdoc-reflection.mjs +1 -1
- package/dist/typescript/components/tsdoc.cjs +45 -45
- package/dist/typescript/components/tsdoc.d.cts +1 -1
- package/dist/typescript/components/tsdoc.d.mts +1 -1
- package/dist/typescript/components/tsdoc.mjs +1 -1
- package/dist/typescript/components/typescript-file.cjs +20 -20
- package/dist/typescript/components/typescript-file.d.cts +1 -1
- package/dist/typescript/components/typescript-file.d.mts +1 -1
- package/dist/typescript/components/typescript-file.mjs +1 -1
- package/dist/typescript/components/typescript-interface.cjs +5 -5
- package/dist/typescript/components/typescript-interface.mjs +1 -1
- package/dist/typescript/components/typescript-object.cjs +12 -12
- package/dist/typescript/components/typescript-object.d.cts +3 -3
- package/dist/typescript/components/typescript-object.d.mts +3 -3
- package/dist/typescript/components/typescript-object.mjs +1 -1
- package/dist/typescript/index.d.cts +1 -0
- package/dist/vendor.cjs +14 -12588
- package/dist/vendor.js +99 -103
- package/dist/vendor.mjs +11 -0
- package/package.json +7 -23
package/dist/index.cjs
CHANGED
|
@@ -1,32 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
2
|
const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
|
|
3
|
-
const require_core_contexts_context = require('./core/contexts/context.cjs');
|
|
4
3
|
const require_core_components_output = require('./core/components/output.cjs');
|
|
5
|
-
const
|
|
6
|
-
const require_core_components_source_file = require('./core/components/source-file.cjs');
|
|
7
|
-
const require_core_contexts_reflection = require('./core/contexts/reflection.cjs');
|
|
8
|
-
require('./core/index.cjs');
|
|
9
|
-
const require_helpers_capnp = require('./helpers/capnp.cjs');
|
|
10
|
-
const require_helpers_create_builtin = require('./helpers/create-builtin.cjs');
|
|
11
|
-
const require_helpers_refkey = require('./helpers/refkey.cjs');
|
|
12
|
-
const require_helpers_typescript = require('./helpers/typescript.cjs');
|
|
13
|
-
require('./helpers/index.cjs');
|
|
14
|
-
const require_markdown_components_markdown_file = require('./markdown/components/markdown-file.cjs');
|
|
15
|
-
const require_markdown_contexts_markdown_table = require('./markdown/contexts/markdown-table.cjs');
|
|
16
|
-
const require_markdown_components_markdown_table = require('./markdown/components/markdown-table.cjs');
|
|
17
|
-
require('./markdown/index.cjs');
|
|
18
|
-
const require_typescript_components_tsdoc = require('./typescript/components/tsdoc.cjs');
|
|
19
|
-
const require_typescript_components_typescript_file = require('./typescript/components/typescript-file.cjs');
|
|
20
|
-
const require_typescript_components_builtin_file = require('./typescript/components/builtin-file.cjs');
|
|
21
|
-
const require_typescript_components_dynamic_import_statement = require('./typescript/components/dynamic-import-statement.cjs');
|
|
22
|
-
const require_typescript_components_entry_file = require('./typescript/components/entry-file.cjs');
|
|
23
|
-
const require_typescript_components_record_expression = require('./typescript/components/record-expression.cjs');
|
|
24
|
-
const require_typescript_components_tsdoc_reflection = require('./typescript/components/tsdoc-reflection.cjs');
|
|
25
|
-
const require_typescript_components_typescript_interface = require('./typescript/components/typescript-interface.cjs');
|
|
26
|
-
const require_typescript_components_typescript_object = require('./typescript/components/typescript-object.cjs');
|
|
27
|
-
require('./typescript/index.cjs');
|
|
4
|
+
const require_vendor = require('./vendor.cjs');
|
|
28
5
|
let __alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
29
|
-
let __alloy_js_core = require("@alloy-js/core");
|
|
30
6
|
let __alloy_js_rollup_plugin = require("@alloy-js/rollup-plugin");
|
|
31
7
|
__alloy_js_rollup_plugin = require_rolldown_runtime.__toESM(__alloy_js_rollup_plugin);
|
|
32
8
|
let __storm_software_config_tools_types = require("@storm-software/config-tools/types");
|
|
@@ -58,13 +34,7 @@ const plugin = (options = {}) => {
|
|
|
58
34
|
pragma: "Alloy.createElement",
|
|
59
35
|
importSource: "@alloy-js/core"
|
|
60
36
|
} } },
|
|
61
|
-
plugins: [(0, __alloy_js_rollup_plugin.default)()]
|
|
62
|
-
alias: { "@alloy-js/core": "@powerlines/plugin-alloy/vendor" },
|
|
63
|
-
external: [
|
|
64
|
-
"@alloy-js/core",
|
|
65
|
-
"@vue/reactivity",
|
|
66
|
-
"@vue/shared"
|
|
67
|
-
]
|
|
37
|
+
plugins: [(0, __alloy_js_rollup_plugin.default)()]
|
|
68
38
|
}
|
|
69
39
|
};
|
|
70
40
|
},
|
|
@@ -79,6 +49,13 @@ const plugin = (options = {}) => {
|
|
|
79
49
|
if (this.config.alloy?.typescript !== false) this.dependencies["@alloy-js/typescript"] = "^0.22.0";
|
|
80
50
|
if (this.config.alloy?.json === true) this.dependencies["@alloy-js/json"] = "^0.22.0";
|
|
81
51
|
if (this.config.alloy?.markdown === true) this.dependencies["@alloy-js/markdown"] = "^0.22.0";
|
|
52
|
+
},
|
|
53
|
+
resolveId(id) {
|
|
54
|
+
if (id === "@alloy-js/core") return {
|
|
55
|
+
id: "@powerlines/plugin-alloy/vendor",
|
|
56
|
+
external: true
|
|
57
|
+
};
|
|
58
|
+
return null;
|
|
82
59
|
}
|
|
83
60
|
}, {
|
|
84
61
|
name: "alloy:update-context",
|
|
@@ -87,7 +64,7 @@ const plugin = (options = {}) => {
|
|
|
87
64
|
async handler() {
|
|
88
65
|
this.render = async (children) => {
|
|
89
66
|
const _self$ = this;
|
|
90
|
-
const tree = (0,
|
|
67
|
+
const tree = (0, require_vendor.vendor_exports.renderTree)((0, __alloy_js_core_jsx_runtime.createComponent)(require_core_components_output.Output, {
|
|
91
68
|
context: _self$,
|
|
92
69
|
get basePath() {
|
|
93
70
|
return _self$.workspaceConfig.workspaceRoot;
|
|
@@ -108,14 +85,14 @@ var src_default = plugin;
|
|
|
108
85
|
* @param tree - The rendered output files.
|
|
109
86
|
*/
|
|
110
87
|
async function writeTree(context, tree, options = {}) {
|
|
111
|
-
await (0,
|
|
88
|
+
await (0, require_vendor.vendor_exports.flushJobsAsync)();
|
|
112
89
|
let result;
|
|
113
90
|
const generateOutput = async (currentDirectory, root) => {
|
|
114
91
|
if (!Array.isArray(root)) return;
|
|
115
92
|
const recurse = async (cwd) => {
|
|
116
93
|
for (const child of root) await generateOutput(cwd, child);
|
|
117
94
|
};
|
|
118
|
-
const renderContext = (0,
|
|
95
|
+
const renderContext = (0, require_vendor.vendor_exports.getContextForRenderNode)(root);
|
|
119
96
|
if (!renderContext) return recurse(currentDirectory);
|
|
120
97
|
if (renderContext.meta?.directory) {
|
|
121
98
|
const directory = {
|
|
@@ -194,7 +171,7 @@ async function printTree(context, tree, options = {}) {
|
|
|
194
171
|
options.tabWidth ??= 2;
|
|
195
172
|
options.useTabs ??= false;
|
|
196
173
|
options.insertFinalNewLine ??= true;
|
|
197
|
-
await (0,
|
|
174
|
+
await (0, require_vendor.vendor_exports.flushJobsAsync)();
|
|
198
175
|
const result = prettier_doc_js.printer.printDocToString(printTreeWorker(tree), options).formatted;
|
|
199
176
|
return options.insertFinalNewLine && !result.endsWith("\n") ? `${result}\n` : result;
|
|
200
177
|
}
|
|
@@ -203,87 +180,11 @@ function printTreeWorker(tree) {
|
|
|
203
180
|
for (const node of tree) if (typeof node === "string") {
|
|
204
181
|
const normalizedNode = node.split(/\r?\n/).flatMap((line, index, array) => index < array.length - 1 ? [line] : [line]);
|
|
205
182
|
doc.push(normalizedNode);
|
|
206
|
-
} else if ((0,
|
|
183
|
+
} else if ((0, require_vendor.vendor_exports.isPrintHook)(node)) doc.push(node.print(node.subtree, printTreeWorker));
|
|
207
184
|
else doc.push(printTreeWorker(node));
|
|
208
185
|
return doc;
|
|
209
186
|
}
|
|
210
187
|
|
|
211
188
|
//#endregion
|
|
212
|
-
exports.BuiltinFile = require_typescript_components_builtin_file.BuiltinFile;
|
|
213
|
-
exports.DynamicImportStatement = require_typescript_components_dynamic_import_statement.DynamicImportStatement;
|
|
214
|
-
exports.EntryFile = require_typescript_components_entry_file.EntryFile;
|
|
215
|
-
exports.LARGE_BUFFER = require_helpers_capnp.LARGE_BUFFER;
|
|
216
|
-
exports.MarkdownFile = require_markdown_components_markdown_file.MarkdownFile;
|
|
217
|
-
exports.MarkdownFileHeader = require_markdown_components_markdown_file.MarkdownFileHeader;
|
|
218
|
-
exports.MarkdownTable = require_markdown_components_markdown_table.MarkdownTable;
|
|
219
|
-
exports.MarkdownTableColumn = require_markdown_components_markdown_table.MarkdownTableColumn;
|
|
220
|
-
exports.MarkdownTableColumnContext = require_markdown_contexts_markdown_table.MarkdownTableColumnContext;
|
|
221
|
-
exports.MarkdownTableColumnHeader = require_markdown_components_markdown_table.MarkdownTableColumnHeader;
|
|
222
|
-
exports.MarkdownTableContext = require_markdown_contexts_markdown_table.MarkdownTableContext;
|
|
223
|
-
exports.Output = require_core_components_output.Output;
|
|
224
|
-
exports.PowerlinesContext = require_core_contexts_context.PowerlinesContext;
|
|
225
|
-
exports.RecordExpression = require_typescript_components_record_expression.RecordExpression;
|
|
226
|
-
exports.ReflectionClassContext = require_core_contexts_reflection.ReflectionClassContext;
|
|
227
|
-
exports.ReflectionMethodContext = require_core_contexts_reflection.ReflectionMethodContext;
|
|
228
|
-
exports.ReflectionParameterContext = require_core_contexts_reflection.ReflectionParameterContext;
|
|
229
|
-
exports.ReflectionPropertyContext = require_core_contexts_reflection.ReflectionPropertyContext;
|
|
230
|
-
exports.SingleLineComment = require_core_components_single_line_comment.SingleLineComment;
|
|
231
|
-
exports.SourceFile = require_core_components_source_file.SourceFile;
|
|
232
|
-
exports.TSDoc = require_typescript_components_tsdoc.TSDoc;
|
|
233
|
-
exports.TSDocAlias = require_typescript_components_tsdoc.TSDocAlias;
|
|
234
|
-
exports.TSDocAttributesTags = require_typescript_components_tsdoc.TSDocAttributesTags;
|
|
235
|
-
exports.TSDocDefaultValue = require_typescript_components_tsdoc.TSDocDefaultValue;
|
|
236
|
-
exports.TSDocDomain = require_typescript_components_tsdoc.TSDocDomain;
|
|
237
|
-
exports.TSDocExample = require_typescript_components_tsdoc.TSDocExample;
|
|
238
|
-
exports.TSDocHidden = require_typescript_components_tsdoc.TSDocHidden;
|
|
239
|
-
exports.TSDocIgnore = require_typescript_components_tsdoc.TSDocIgnore;
|
|
240
|
-
exports.TSDocInternal = require_typescript_components_tsdoc.TSDocInternal;
|
|
241
|
-
exports.TSDocLink = require_typescript_components_tsdoc.TSDocLink;
|
|
242
|
-
exports.TSDocModule = require_typescript_components_tsdoc.TSDocModule;
|
|
243
|
-
exports.TSDocParam = require_typescript_components_tsdoc.TSDocParam;
|
|
244
|
-
exports.TSDocParams = require_typescript_components_tsdoc.TSDocParams;
|
|
245
|
-
exports.TSDocPermission = require_typescript_components_tsdoc.TSDocPermission;
|
|
246
|
-
exports.TSDocReadonly = require_typescript_components_tsdoc.TSDocReadonly;
|
|
247
|
-
exports.TSDocReflectionClass = require_typescript_components_tsdoc_reflection.TSDocReflectionClass;
|
|
248
|
-
exports.TSDocReflectionMethod = require_typescript_components_tsdoc_reflection.TSDocReflectionMethod;
|
|
249
|
-
exports.TSDocReflectionProperty = require_typescript_components_tsdoc_reflection.TSDocReflectionProperty;
|
|
250
|
-
exports.TSDocRemarks = require_typescript_components_tsdoc.TSDocRemarks;
|
|
251
|
-
exports.TSDocReturns = require_typescript_components_tsdoc.TSDocReturns;
|
|
252
|
-
exports.TSDocTag = require_typescript_components_tsdoc.TSDocTag;
|
|
253
|
-
exports.TSDocThrows = require_typescript_components_tsdoc.TSDocThrows;
|
|
254
|
-
exports.TSDocTitle = require_typescript_components_tsdoc.TSDocTitle;
|
|
255
|
-
exports.TypeScriptInterface = require_typescript_components_typescript_interface.TypeScriptInterface;
|
|
256
|
-
exports.TypescriptFile = require_typescript_components_typescript_file.TypescriptFile;
|
|
257
|
-
exports.TypescriptFileHeader = require_typescript_components_typescript_file.TypescriptFileHeader;
|
|
258
|
-
exports.TypescriptFileHeaderImports = require_typescript_components_typescript_file.TypescriptFileHeaderImports;
|
|
259
|
-
exports.TypescriptInterfaceProperty = require_typescript_components_typescript_interface.TypescriptInterfaceProperty;
|
|
260
|
-
exports.TypescriptObject = require_typescript_components_typescript_object.TypescriptObject;
|
|
261
|
-
exports.TypescriptObjectProperty = require_typescript_components_typescript_object.TypescriptObjectProperty;
|
|
262
|
-
exports.compile = require_helpers_capnp.compile;
|
|
263
|
-
exports.createBuiltin = require_helpers_create_builtin.createBuiltin;
|
|
264
189
|
exports.default = src_default;
|
|
265
|
-
exports.
|
|
266
|
-
exports.generateCapnpEnumSchema = require_helpers_capnp.generateCapnpEnumSchema;
|
|
267
|
-
exports.generateCapnpId = require_helpers_capnp.generateCapnpId;
|
|
268
|
-
exports.generateCapnpInterface = require_helpers_capnp.generateCapnpInterface;
|
|
269
|
-
exports.generateCapnpMethodSchema = require_helpers_capnp.generateCapnpMethodSchema;
|
|
270
|
-
exports.generateCapnpPrimitive = require_helpers_capnp.generateCapnpPrimitive;
|
|
271
|
-
exports.generateCapnpSchema = require_helpers_capnp.generateCapnpSchema;
|
|
272
|
-
exports.generateCapnpStruct = require_helpers_capnp.generateCapnpStruct;
|
|
273
|
-
exports.generateTypeScriptObject = require_helpers_typescript.generateTypeScriptObject;
|
|
274
|
-
exports.getCapnpEnumTypes = require_helpers_capnp.getCapnpEnumTypes;
|
|
275
|
-
exports.getCapnpUnionTypes = require_helpers_capnp.getCapnpUnionTypes;
|
|
276
|
-
exports.isCapnpStringUnion = require_helpers_capnp.isCapnpStringUnion;
|
|
277
|
-
exports.isVoidType = require_helpers_capnp.isVoidType;
|
|
278
|
-
exports.plugin = plugin;
|
|
279
|
-
exports.refkey = require_helpers_refkey.refkey;
|
|
280
|
-
exports.stringifyCapnpDefaultValue = require_helpers_capnp.stringifyCapnpDefaultValue;
|
|
281
|
-
exports.stringifyCapnpValue = require_helpers_capnp.stringifyCapnpValue;
|
|
282
|
-
exports.useMarkdownTable = require_markdown_contexts_markdown_table.useMarkdownTable;
|
|
283
|
-
exports.useMarkdownTableColumn = require_markdown_contexts_markdown_table.useMarkdownTableColumn;
|
|
284
|
-
exports.usePowerlines = require_core_contexts_context.usePowerlines;
|
|
285
|
-
exports.usePowerlinesContext = require_core_contexts_context.usePowerlinesContext;
|
|
286
|
-
exports.useReflectionClass = require_core_contexts_reflection.useReflectionClass;
|
|
287
|
-
exports.useReflectionMethod = require_core_contexts_reflection.useReflectionMethod;
|
|
288
|
-
exports.useReflectionParameter = require_core_contexts_reflection.useReflectionParameter;
|
|
289
|
-
exports.useReflectionProperty = require_core_contexts_reflection.useReflectionProperty;
|
|
190
|
+
exports.plugin = plugin;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,29 +1,8 @@
|
|
|
1
1
|
import { Plugin } from "./powerlines/src/types/plugin.cjs";
|
|
2
|
-
import {
|
|
3
|
-
import { BuiltinSourceFileContext, ComponentProps, ComponentPropsWithChildren, CopyFileOutputContext, CopyOutputFile, OutputDirectory, OutputFile, ReflectionOverrideInterface, RenderBuiltinContext, RenderContext, RenderEntryContext, RenderOutputContext, SourceFileHeaderProps, TypescriptFileImportItem, TypescriptFileImports, WriteOutputFile, __ΩBuiltinSourceFileContext, __ΩComponentProps, __ΩComponentPropsWithChildren, __ΩCopyFileOutputContext, __ΩCopyOutputFile, __ΩOutputDirectory, __ΩOutputFile, __ΩReflectionOverrideInterface, __ΩRenderBuiltinContext, __ΩRenderContext, __ΩRenderEntryContext, __ΩRenderOutputContext, __ΩSourceFileHeaderProps, __ΩTypescriptFileImportItem, __ΩTypescriptFileImports, __ΩWriteOutputFile } from "./types/components.cjs";
|
|
4
|
-
import { SingleLineComment, SingleLineCommentProps, SingleLineCommentVariant, __ΩSingleLineCommentProps, __ΩSingleLineCommentVariant } from "./core/components/single-line-comment.cjs";
|
|
5
|
-
import { SourceFile, SourceFileProps, __ΩSourceFileProps } from "./core/components/source-file.cjs";
|
|
6
|
-
import { PowerlinesContext, PowerlinesContextInterface, __ΩPowerlinesContextInterface, usePowerlines, usePowerlinesContext } from "./core/contexts/context.cjs";
|
|
7
|
-
import { ReflectionClassContext, ReflectionClassContextInterface, ReflectionMethodContext, ReflectionParameterContext, ReflectionPropertyContext, __ΩReflectionClassContextInterface, useReflectionClass, useReflectionMethod, useReflectionParameter, useReflectionProperty } from "./core/contexts/reflection.cjs";
|
|
8
|
-
import { GenerateCapnpOptions, GenerateCapnpStructOptions, IOType, LARGE_BUFFER, StdioOptions, __ΩGenerateCapnpOptions, __ΩGenerateCapnpStructOptions, __ΩIOType, __ΩStdioOptions, compile, generateCapnp, generateCapnpEnumSchema, generateCapnpId, generateCapnpInterface, generateCapnpMethodSchema, generateCapnpPrimitive, generateCapnpSchema, generateCapnpStruct, getCapnpEnumTypes, getCapnpUnionTypes, isCapnpStringUnion, isVoidType, stringifyCapnpDefaultValue, stringifyCapnpValue } from "./helpers/capnp.cjs";
|
|
9
|
-
import { CreateBuiltinOptions, __ΩCreateBuiltinOptions, createBuiltin } from "./helpers/create-builtin.cjs";
|
|
10
|
-
import { refkey } from "./helpers/refkey.cjs";
|
|
11
|
-
import { GenerateTypeScriptInterfaceOptions, GenerateTypeScriptObjectOptions, __ΩGenerateTypeScriptInterfaceOptions, __ΩGenerateTypeScriptObjectOptions, generateTypeScriptObject } from "./helpers/typescript.cjs";
|
|
12
|
-
import { AlloyPluginContext, AlloyPluginOptions, AlloyPluginResolvedConfig, AlloyPluginUserConfig, __ΩAlloyPluginContext, __ΩAlloyPluginOptions, __ΩAlloyPluginResolvedConfig, __ΩAlloyPluginUserConfig } from "./types/plugin.cjs";
|
|
13
|
-
import { MarkdownFile, MarkdownFileHeader, MarkdownFileProps, __ΩMarkdownFileProps } from "./markdown/components/markdown-file.cjs";
|
|
14
|
-
import { MarkdownTableColumnContext, MarkdownTableColumnContextInterface, MarkdownTableContext, MarkdownTableContextInterface, __ΩMarkdownTableColumnContextInterface, __ΩMarkdownTableContextInterface, useMarkdownTable, useMarkdownTableColumn } from "./markdown/contexts/markdown-table.cjs";
|
|
15
|
-
import { MarkdownTable, MarkdownTableColumn, MarkdownTableColumnHeader, MarkdownTableColumnProps, MarkdownTableProps, __ΩMarkdownTableColumnProps, __ΩMarkdownTableProps } from "./markdown/components/markdown-table.cjs";
|
|
16
|
-
import { TSDoc, TSDocAlias, TSDocAttributesTags, TSDocAttributesTagsProps, TSDocDefaultValue, TSDocDefaultValueProps, TSDocDomain, TSDocExample, TSDocExampleProps, TSDocHidden, TSDocIgnore, TSDocInternal, TSDocLink, TSDocModule, TSDocModuleProps, TSDocParam, TSDocParamProps, TSDocParams, TSDocParamsProps, TSDocPermission, TSDocProps, TSDocReadonly, TSDocRemarks, TSDocReturns, TSDocTag, TSDocTagProps, TSDocThrows, TSDocTitle, __ΩTSDocAttributesTagsProps, __ΩTSDocDefaultValueProps, __ΩTSDocExampleProps, __ΩTSDocModuleProps, __ΩTSDocParamProps, __ΩTSDocParamsProps, __ΩTSDocProps, __ΩTSDocTagProps } from "./typescript/components/tsdoc.cjs";
|
|
17
|
-
import { TypescriptFile, TypescriptFileHeader, TypescriptFileHeaderImports, TypescriptFileHeaderImportsProps, TypescriptFileHeaderProps, TypescriptFileProps, __ΩTypescriptFileHeaderImportsProps, __ΩTypescriptFileHeaderProps, __ΩTypescriptFileProps } from "./typescript/components/typescript-file.cjs";
|
|
18
|
-
import { BuiltinFile, BuiltinFileProps, __ΩBuiltinFileProps } from "./typescript/components/builtin-file.cjs";
|
|
19
|
-
import { DynamicImportStatement, DynamicImportStatementProps, __ΩDynamicImportStatementProps } from "./typescript/components/dynamic-import-statement.cjs";
|
|
20
|
-
import { EntryFile, EntryFileProps, __ΩEntryFileProps } from "./typescript/components/entry-file.cjs";
|
|
21
|
-
import { RecordExpression, RecordExpressionProps, __ΩRecordExpressionProps } from "./typescript/components/record-expression.cjs";
|
|
22
|
-
import { TSDocReflectionClass, TSDocReflectionMethod, TSDocReflectionProperty } from "./typescript/components/tsdoc-reflection.cjs";
|
|
23
|
-
import { TypeScriptInterface, TypeScriptInterfaceProps, TypescriptInterfaceProperty, TypescriptInterfacePropertyProps, __ΩTypeScriptInterfaceProps, __ΩTypescriptInterfacePropertyProps } from "./typescript/components/typescript-interface.cjs";
|
|
24
|
-
import { TypescriptObject, TypescriptObjectProperty, TypescriptObjectPropertyProps, TypescriptObjectProps, __ΩTypescriptObjectPropertyProps, __ΩTypescriptObjectProps } from "./typescript/components/typescript-object.cjs";
|
|
2
|
+
import { AlloyPluginContext, AlloyPluginOptions } from "./types/plugin.cjs";
|
|
25
3
|
|
|
26
4
|
//#region src/index.d.ts
|
|
5
|
+
|
|
27
6
|
/**
|
|
28
7
|
* Alloy-js plugin for Powerlines.
|
|
29
8
|
*
|
|
@@ -32,4 +11,4 @@ import { TypescriptObject, TypescriptObjectProperty, TypescriptObjectPropertyPro
|
|
|
32
11
|
*/
|
|
33
12
|
declare const plugin: <TContext extends AlloyPluginContext = AlloyPluginContext>(options?: AlloyPluginOptions) => Plugin<TContext>[];
|
|
34
13
|
//#endregion
|
|
35
|
-
export {
|
|
14
|
+
export { plugin as default, plugin };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,34 +1,8 @@
|
|
|
1
1
|
import { Plugin } from "./powerlines/src/types/plugin.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { BuiltinSourceFileContext, ComponentProps, ComponentPropsWithChildren, CopyFileOutputContext, CopyOutputFile, OutputDirectory, OutputFile, ReflectionOverrideInterface, RenderBuiltinContext, RenderContext, RenderEntryContext, RenderOutputContext, SourceFileHeaderProps, TypescriptFileImportItem, TypescriptFileImports, WriteOutputFile, __ΩBuiltinSourceFileContext, __ΩComponentProps, __ΩComponentPropsWithChildren, __ΩCopyFileOutputContext, __ΩCopyOutputFile, __ΩOutputDirectory, __ΩOutputFile, __ΩReflectionOverrideInterface, __ΩRenderBuiltinContext, __ΩRenderContext, __ΩRenderEntryContext, __ΩRenderOutputContext, __ΩSourceFileHeaderProps, __ΩTypescriptFileImportItem, __ΩTypescriptFileImports, __ΩWriteOutputFile } from "./types/components.mjs";
|
|
4
|
-
import { SingleLineComment, SingleLineCommentProps, SingleLineCommentVariant, __ΩSingleLineCommentProps, __ΩSingleLineCommentVariant } from "./core/components/single-line-comment.mjs";
|
|
5
|
-
import { SourceFile, SourceFileProps, __ΩSourceFileProps } from "./core/components/source-file.mjs";
|
|
6
|
-
import { PowerlinesContext, PowerlinesContextInterface, __ΩPowerlinesContextInterface, usePowerlines, usePowerlinesContext } from "./core/contexts/context.mjs";
|
|
7
|
-
import { ReflectionClassContext, ReflectionClassContextInterface, ReflectionMethodContext, ReflectionParameterContext, ReflectionPropertyContext, __ΩReflectionClassContextInterface, useReflectionClass, useReflectionMethod, useReflectionParameter, useReflectionProperty } from "./core/contexts/reflection.mjs";
|
|
8
|
-
import "./core/index.mjs";
|
|
9
|
-
import { GenerateCapnpOptions, GenerateCapnpStructOptions, IOType, LARGE_BUFFER, StdioOptions, __ΩGenerateCapnpOptions, __ΩGenerateCapnpStructOptions, __ΩIOType, __ΩStdioOptions, compile, generateCapnp, generateCapnpEnumSchema, generateCapnpId, generateCapnpInterface, generateCapnpMethodSchema, generateCapnpPrimitive, generateCapnpSchema, generateCapnpStruct, getCapnpEnumTypes, getCapnpUnionTypes, isCapnpStringUnion, isVoidType, stringifyCapnpDefaultValue, stringifyCapnpValue } from "./helpers/capnp.mjs";
|
|
10
|
-
import { CreateBuiltinOptions, __ΩCreateBuiltinOptions, createBuiltin } from "./helpers/create-builtin.mjs";
|
|
11
|
-
import { refkey } from "./helpers/refkey.mjs";
|
|
12
|
-
import { GenerateTypeScriptInterfaceOptions, GenerateTypeScriptObjectOptions, __ΩGenerateTypeScriptInterfaceOptions, __ΩGenerateTypeScriptObjectOptions, generateTypeScriptObject } from "./helpers/typescript.mjs";
|
|
13
|
-
import "./helpers/index.mjs";
|
|
14
|
-
import { AlloyPluginContext, AlloyPluginOptions, AlloyPluginResolvedConfig, AlloyPluginUserConfig, __ΩAlloyPluginContext, __ΩAlloyPluginOptions, __ΩAlloyPluginResolvedConfig, __ΩAlloyPluginUserConfig } from "./types/plugin.mjs";
|
|
15
|
-
import { MarkdownFile, MarkdownFileHeader, MarkdownFileProps, __ΩMarkdownFileProps } from "./markdown/components/markdown-file.mjs";
|
|
16
|
-
import { MarkdownTableColumnContext, MarkdownTableColumnContextInterface, MarkdownTableContext, MarkdownTableContextInterface, __ΩMarkdownTableColumnContextInterface, __ΩMarkdownTableContextInterface, useMarkdownTable, useMarkdownTableColumn } from "./markdown/contexts/markdown-table.mjs";
|
|
17
|
-
import { MarkdownTable, MarkdownTableColumn, MarkdownTableColumnHeader, MarkdownTableColumnProps, MarkdownTableProps, __ΩMarkdownTableColumnProps, __ΩMarkdownTableProps } from "./markdown/components/markdown-table.mjs";
|
|
18
|
-
import "./markdown/index.mjs";
|
|
19
|
-
import "./types/index.mjs";
|
|
20
|
-
import { TSDoc, TSDocAlias, TSDocAttributesTags, TSDocAttributesTagsProps, TSDocDefaultValue, TSDocDefaultValueProps, TSDocDomain, TSDocExample, TSDocExampleProps, TSDocHidden, TSDocIgnore, TSDocInternal, TSDocLink, TSDocModule, TSDocModuleProps, TSDocParam, TSDocParamProps, TSDocParams, TSDocParamsProps, TSDocPermission, TSDocProps, TSDocReadonly, TSDocRemarks, TSDocReturns, TSDocTag, TSDocTagProps, TSDocThrows, TSDocTitle, __ΩTSDocAttributesTagsProps, __ΩTSDocDefaultValueProps, __ΩTSDocExampleProps, __ΩTSDocModuleProps, __ΩTSDocParamProps, __ΩTSDocParamsProps, __ΩTSDocProps, __ΩTSDocTagProps } from "./typescript/components/tsdoc.mjs";
|
|
21
|
-
import { TypescriptFile, TypescriptFileHeader, TypescriptFileHeaderImports, TypescriptFileHeaderImportsProps, TypescriptFileHeaderProps, TypescriptFileProps, __ΩTypescriptFileHeaderImportsProps, __ΩTypescriptFileHeaderProps, __ΩTypescriptFileProps } from "./typescript/components/typescript-file.mjs";
|
|
22
|
-
import { BuiltinFile, BuiltinFileProps, __ΩBuiltinFileProps } from "./typescript/components/builtin-file.mjs";
|
|
23
|
-
import { DynamicImportStatement, DynamicImportStatementProps, __ΩDynamicImportStatementProps } from "./typescript/components/dynamic-import-statement.mjs";
|
|
24
|
-
import { EntryFile, EntryFileProps, __ΩEntryFileProps } from "./typescript/components/entry-file.mjs";
|
|
25
|
-
import { RecordExpression, RecordExpressionProps, __ΩRecordExpressionProps } from "./typescript/components/record-expression.mjs";
|
|
26
|
-
import { TSDocReflectionClass, TSDocReflectionMethod, TSDocReflectionProperty } from "./typescript/components/tsdoc-reflection.mjs";
|
|
27
|
-
import { TypeScriptInterface, TypeScriptInterfaceProps, TypescriptInterfaceProperty, TypescriptInterfacePropertyProps, __ΩTypeScriptInterfaceProps, __ΩTypescriptInterfacePropertyProps } from "./typescript/components/typescript-interface.mjs";
|
|
28
|
-
import { TypescriptObject, TypescriptObjectProperty, TypescriptObjectPropertyProps, TypescriptObjectProps, __ΩTypescriptObjectPropertyProps, __ΩTypescriptObjectProps } from "./typescript/components/typescript-object.mjs";
|
|
29
|
-
import "./typescript/index.mjs";
|
|
2
|
+
import { AlloyPluginContext, AlloyPluginOptions } from "./types/plugin.mjs";
|
|
30
3
|
|
|
31
4
|
//#region src/index.d.ts
|
|
5
|
+
|
|
32
6
|
/**
|
|
33
7
|
* Alloy-js plugin for Powerlines.
|
|
34
8
|
*
|
|
@@ -37,4 +11,4 @@ import "./typescript/index.mjs";
|
|
|
37
11
|
*/
|
|
38
12
|
declare const plugin: <TContext extends AlloyPluginContext = AlloyPluginContext>(options?: AlloyPluginOptions) => Plugin<TContext>[];
|
|
39
13
|
//#endregion
|
|
40
|
-
export {
|
|
14
|
+
export { plugin as default, plugin };
|
package/dist/index.mjs
CHANGED
|
@@ -1,30 +1,6 @@
|
|
|
1
|
-
import { PowerlinesContext, usePowerlines, usePowerlinesContext } from "./core/contexts/context.mjs";
|
|
2
1
|
import { Output } from "./core/components/output.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import { SourceFile } from "./core/components/source-file.mjs";
|
|
5
|
-
import { ReflectionClassContext, ReflectionMethodContext, ReflectionParameterContext, ReflectionPropertyContext, useReflectionClass, useReflectionMethod, useReflectionParameter, useReflectionProperty } from "./core/contexts/reflection.mjs";
|
|
6
|
-
import "./core/index.mjs";
|
|
7
|
-
import { LARGE_BUFFER, compile, generateCapnp, generateCapnpEnumSchema, generateCapnpId, generateCapnpInterface, generateCapnpMethodSchema, generateCapnpPrimitive, generateCapnpSchema, generateCapnpStruct, getCapnpEnumTypes, getCapnpUnionTypes, isCapnpStringUnion, isVoidType, stringifyCapnpDefaultValue, stringifyCapnpValue } from "./helpers/capnp.mjs";
|
|
8
|
-
import { createBuiltin } from "./helpers/create-builtin.mjs";
|
|
9
|
-
import { refkey } from "./helpers/refkey.mjs";
|
|
10
|
-
import { generateTypeScriptObject } from "./helpers/typescript.mjs";
|
|
11
|
-
import "./helpers/index.mjs";
|
|
12
|
-
import { MarkdownFile, MarkdownFileHeader } from "./markdown/components/markdown-file.mjs";
|
|
13
|
-
import { MarkdownTableColumnContext, MarkdownTableContext, useMarkdownTable, useMarkdownTableColumn } from "./markdown/contexts/markdown-table.mjs";
|
|
14
|
-
import { MarkdownTable, MarkdownTableColumn, MarkdownTableColumnHeader } from "./markdown/components/markdown-table.mjs";
|
|
15
|
-
import "./markdown/index.mjs";
|
|
16
|
-
import { TSDoc, TSDocAlias, TSDocAttributesTags, TSDocDefaultValue, TSDocDomain, TSDocExample, TSDocHidden, TSDocIgnore, TSDocInternal, TSDocLink, TSDocModule, TSDocParam, TSDocParams, TSDocPermission, TSDocReadonly, TSDocRemarks, TSDocReturns, TSDocTag, TSDocThrows, TSDocTitle } from "./typescript/components/tsdoc.mjs";
|
|
17
|
-
import { TypescriptFile, TypescriptFileHeader, TypescriptFileHeaderImports } from "./typescript/components/typescript-file.mjs";
|
|
18
|
-
import { BuiltinFile } from "./typescript/components/builtin-file.mjs";
|
|
19
|
-
import { DynamicImportStatement } from "./typescript/components/dynamic-import-statement.mjs";
|
|
20
|
-
import { EntryFile } from "./typescript/components/entry-file.mjs";
|
|
21
|
-
import { RecordExpression } from "./typescript/components/record-expression.mjs";
|
|
22
|
-
import { TSDocReflectionClass, TSDocReflectionMethod, TSDocReflectionProperty } from "./typescript/components/tsdoc-reflection.mjs";
|
|
23
|
-
import { TypeScriptInterface, TypescriptInterfaceProperty } from "./typescript/components/typescript-interface.mjs";
|
|
24
|
-
import { TypescriptObject, TypescriptObjectProperty } from "./typescript/components/typescript-object.mjs";
|
|
25
|
-
import "./typescript/index.mjs";
|
|
2
|
+
import { vendor_exports } from "./vendor.mjs";
|
|
26
3
|
import { createComponent } from "@alloy-js/core/jsx-runtime";
|
|
27
|
-
import { flushJobsAsync, getContextForRenderNode, isPrintHook, renderTree } from "@alloy-js/core";
|
|
28
4
|
import alloy from "@alloy-js/rollup-plugin";
|
|
29
5
|
import { LogLevelLabel } from "@storm-software/config-tools/types";
|
|
30
6
|
import { StormJSON } from "@stryke/json/storm-json";
|
|
@@ -55,13 +31,7 @@ const plugin = (options = {}) => {
|
|
|
55
31
|
pragma: "Alloy.createElement",
|
|
56
32
|
importSource: "@alloy-js/core"
|
|
57
33
|
} } },
|
|
58
|
-
plugins: [alloy()]
|
|
59
|
-
alias: { "@alloy-js/core": "@powerlines/plugin-alloy/vendor" },
|
|
60
|
-
external: [
|
|
61
|
-
"@alloy-js/core",
|
|
62
|
-
"@vue/reactivity",
|
|
63
|
-
"@vue/shared"
|
|
64
|
-
]
|
|
34
|
+
plugins: [alloy()]
|
|
65
35
|
}
|
|
66
36
|
};
|
|
67
37
|
},
|
|
@@ -76,6 +46,13 @@ const plugin = (options = {}) => {
|
|
|
76
46
|
if (this.config.alloy?.typescript !== false) this.dependencies["@alloy-js/typescript"] = "^0.22.0";
|
|
77
47
|
if (this.config.alloy?.json === true) this.dependencies["@alloy-js/json"] = "^0.22.0";
|
|
78
48
|
if (this.config.alloy?.markdown === true) this.dependencies["@alloy-js/markdown"] = "^0.22.0";
|
|
49
|
+
},
|
|
50
|
+
resolveId(id) {
|
|
51
|
+
if (id === "@alloy-js/core") return {
|
|
52
|
+
id: "@powerlines/plugin-alloy/vendor",
|
|
53
|
+
external: true
|
|
54
|
+
};
|
|
55
|
+
return null;
|
|
79
56
|
}
|
|
80
57
|
}, {
|
|
81
58
|
name: "alloy:update-context",
|
|
@@ -84,7 +61,7 @@ const plugin = (options = {}) => {
|
|
|
84
61
|
async handler() {
|
|
85
62
|
this.render = async (children) => {
|
|
86
63
|
const _self$ = this;
|
|
87
|
-
const tree = renderTree(createComponent(Output, {
|
|
64
|
+
const tree = (0, vendor_exports.renderTree)(createComponent(Output, {
|
|
88
65
|
context: _self$,
|
|
89
66
|
get basePath() {
|
|
90
67
|
return _self$.workspaceConfig.workspaceRoot;
|
|
@@ -105,14 +82,14 @@ var src_default = plugin;
|
|
|
105
82
|
* @param tree - The rendered output files.
|
|
106
83
|
*/
|
|
107
84
|
async function writeTree(context, tree, options = {}) {
|
|
108
|
-
await flushJobsAsync();
|
|
85
|
+
await (0, vendor_exports.flushJobsAsync)();
|
|
109
86
|
let result;
|
|
110
87
|
const generateOutput = async (currentDirectory, root) => {
|
|
111
88
|
if (!Array.isArray(root)) return;
|
|
112
89
|
const recurse = async (cwd) => {
|
|
113
90
|
for (const child of root) await generateOutput(cwd, child);
|
|
114
91
|
};
|
|
115
|
-
const renderContext = getContextForRenderNode(root);
|
|
92
|
+
const renderContext = (0, vendor_exports.getContextForRenderNode)(root);
|
|
116
93
|
if (!renderContext) return recurse(currentDirectory);
|
|
117
94
|
if (renderContext.meta?.directory) {
|
|
118
95
|
const directory = {
|
|
@@ -191,7 +168,7 @@ async function printTree(context, tree, options = {}) {
|
|
|
191
168
|
options.tabWidth ??= 2;
|
|
192
169
|
options.useTabs ??= false;
|
|
193
170
|
options.insertFinalNewLine ??= true;
|
|
194
|
-
await flushJobsAsync();
|
|
171
|
+
await (0, vendor_exports.flushJobsAsync)();
|
|
195
172
|
const result = printer.printDocToString(printTreeWorker(tree), options).formatted;
|
|
196
173
|
return options.insertFinalNewLine && !result.endsWith("\n") ? `${result}\n` : result;
|
|
197
174
|
}
|
|
@@ -200,10 +177,10 @@ function printTreeWorker(tree) {
|
|
|
200
177
|
for (const node of tree) if (typeof node === "string") {
|
|
201
178
|
const normalizedNode = node.split(/\r?\n/).flatMap((line, index, array) => index < array.length - 1 ? [line] : [line]);
|
|
202
179
|
doc.push(normalizedNode);
|
|
203
|
-
} else if (isPrintHook(node)) doc.push(node.print(node.subtree, printTreeWorker));
|
|
180
|
+
} else if ((0, vendor_exports.isPrintHook)(node)) doc.push(node.print(node.subtree, printTreeWorker));
|
|
204
181
|
else doc.push(printTreeWorker(node));
|
|
205
182
|
return doc;
|
|
206
183
|
}
|
|
207
184
|
|
|
208
185
|
//#endregion
|
|
209
|
-
export {
|
|
186
|
+
export { src_default as default, plugin };
|
|
@@ -3,7 +3,7 @@ const require_core_contexts_context = require('../../core/contexts/context.cjs')
|
|
|
3
3
|
const require_core_components_single_line_comment = require('../../core/components/single-line-comment.cjs');
|
|
4
4
|
const require_core_components_source_file = require('../../core/components/source-file.cjs');
|
|
5
5
|
let __alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
6
|
-
let
|
|
6
|
+
let __powerlines_plugin_alloy_vendor = require("@powerlines/plugin-alloy/vendor");
|
|
7
7
|
let __stryke_string_format_title_case = require("@stryke/string-format/title-case");
|
|
8
8
|
let __alloy_js_markdown = require("@alloy-js/markdown");
|
|
9
9
|
|
|
@@ -15,8 +15,8 @@ let __alloy_js_markdown = require("@alloy-js/markdown");
|
|
|
15
15
|
* @returns The rendered source file component.
|
|
16
16
|
*/
|
|
17
17
|
function MarkdownFile(props) {
|
|
18
|
-
const [{ children, preset }, rest] = (0,
|
|
19
|
-
const nodeContext = (0,
|
|
18
|
+
const [{ children, preset }, rest] = (0, __powerlines_plugin_alloy_vendor.splitProps)(props, ["children", "preset"]);
|
|
19
|
+
const nodeContext = (0, __powerlines_plugin_alloy_vendor.getContext)();
|
|
20
20
|
nodeContext.meta ??= {};
|
|
21
21
|
nodeContext.meta.output = { preset };
|
|
22
22
|
return (0, __alloy_js_core_jsx_runtime.createComponent)(require_core_components_source_file.SourceFile, (0, __alloy_js_core_jsx_runtime.mergeProps)({ get header() {
|
|
@@ -25,7 +25,7 @@ function MarkdownFile(props) {
|
|
|
25
25
|
filetype: "md",
|
|
26
26
|
reference: __alloy_js_markdown.Link,
|
|
27
27
|
get children() {
|
|
28
|
-
return (0, __alloy_js_core_jsx_runtime.createComponent)(
|
|
28
|
+
return (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_vendor.Show, {
|
|
29
29
|
get when() {
|
|
30
30
|
return Boolean(children);
|
|
31
31
|
},
|
|
@@ -41,7 +41,7 @@ function MarkdownFile(props) {
|
|
|
41
41
|
* @returns The rendered source file header.
|
|
42
42
|
*/
|
|
43
43
|
function MarkdownFileHeader(props) {
|
|
44
|
-
const [{ children, disableEslint = true, disableBiome = true, disablePrettier = false }] = (0,
|
|
44
|
+
const [{ children, disableEslint = true, disableBiome = true, disablePrettier = false }] = (0, __powerlines_plugin_alloy_vendor.splitProps)(props, [
|
|
45
45
|
"children",
|
|
46
46
|
"disableEslint",
|
|
47
47
|
"disableBiome",
|
|
@@ -49,7 +49,7 @@ function MarkdownFileHeader(props) {
|
|
|
49
49
|
]);
|
|
50
50
|
const context = require_core_contexts_context.usePowerlines();
|
|
51
51
|
return [
|
|
52
|
-
(0, __alloy_js_core_jsx_runtime.createComponent)(
|
|
52
|
+
(0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_vendor.Show, {
|
|
53
53
|
get when() {
|
|
54
54
|
return Boolean(disableEslint);
|
|
55
55
|
},
|
|
@@ -60,7 +60,7 @@ function MarkdownFileHeader(props) {
|
|
|
60
60
|
}), (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {})];
|
|
61
61
|
}
|
|
62
62
|
}),
|
|
63
|
-
(0, __alloy_js_core_jsx_runtime.createComponent)(
|
|
63
|
+
(0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_vendor.Show, {
|
|
64
64
|
get when() {
|
|
65
65
|
return Boolean(disablePrettier);
|
|
66
66
|
},
|
|
@@ -71,7 +71,7 @@ function MarkdownFileHeader(props) {
|
|
|
71
71
|
}), (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {})];
|
|
72
72
|
}
|
|
73
73
|
}),
|
|
74
|
-
(0, __alloy_js_core_jsx_runtime.createComponent)(
|
|
74
|
+
(0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_vendor.Show, {
|
|
75
75
|
get when() {
|
|
76
76
|
return Boolean(disableBiome);
|
|
77
77
|
},
|
|
@@ -82,7 +82,7 @@ function MarkdownFileHeader(props) {
|
|
|
82
82
|
}), (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {})];
|
|
83
83
|
}
|
|
84
84
|
}),
|
|
85
|
-
(0, __alloy_js_core_jsx_runtime.createComponent)(
|
|
85
|
+
(0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_vendor.Show, {
|
|
86
86
|
get when() {
|
|
87
87
|
return Boolean(disableEslint) || Boolean(disablePrettier) || Boolean(disableBiome);
|
|
88
88
|
},
|
|
@@ -90,7 +90,7 @@ function MarkdownFileHeader(props) {
|
|
|
90
90
|
return (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {});
|
|
91
91
|
}
|
|
92
92
|
}),
|
|
93
|
-
(0, __alloy_js_core_jsx_runtime.createComponent)(
|
|
93
|
+
(0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_vendor.Show, {
|
|
94
94
|
get when() {
|
|
95
95
|
return Boolean(children);
|
|
96
96
|
},
|
|
@@ -101,13 +101,13 @@ function MarkdownFileHeader(props) {
|
|
|
101
101
|
(0, __alloy_js_core_jsx_runtime.createComponent)(require_core_components_single_line_comment.SingleLineComment, {
|
|
102
102
|
variant: "markdown",
|
|
103
103
|
get children() {
|
|
104
|
-
return
|
|
104
|
+
return __powerlines_plugin_alloy_vendor.code`Generated by ${(0, __stryke_string_format_title_case.titleCase)(context?.config.framework) || "Powerlines"}`;
|
|
105
105
|
}
|
|
106
106
|
}),
|
|
107
107
|
(0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
108
108
|
(0, __alloy_js_core_jsx_runtime.createComponent)(require_core_components_single_line_comment.SingleLineComment, {
|
|
109
109
|
variant: "markdown",
|
|
110
|
-
children:
|
|
110
|
+
children: __powerlines_plugin_alloy_vendor.code`NOTE: Do not edit this file manually - it will be overwritten automatically by the "prepare" command`
|
|
111
111
|
}),
|
|
112
112
|
(0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {})
|
|
113
113
|
];
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { ComponentProps, SourceFileHeaderProps } from "../../types/components.cjs";
|
|
2
|
-
import { SourceFileProps
|
|
3
|
-
import * as
|
|
2
|
+
import { SourceFileProps } from "../../core/components/source-file.cjs";
|
|
3
|
+
import * as _alloy_js_core5 from "@alloy-js/core";
|
|
4
4
|
|
|
5
5
|
//#region src/markdown/components/markdown-file.d.ts
|
|
6
|
-
type MarkdownFileProps = Omit<SourceFileProps
|
|
6
|
+
type MarkdownFileProps = Omit<SourceFileProps, "filetype"> & ComponentProps;
|
|
7
7
|
/**
|
|
8
8
|
* A base component representing a Powerlines generated markdown source file.
|
|
9
9
|
*
|
|
10
10
|
* @param props - The properties for the source file.
|
|
11
11
|
* @returns The rendered source file component.
|
|
12
12
|
*/
|
|
13
|
-
declare function MarkdownFile(props: MarkdownFileProps):
|
|
13
|
+
declare function MarkdownFile(props: MarkdownFileProps): _alloy_js_core5.Children;
|
|
14
14
|
/**
|
|
15
15
|
* Renders the header for a Powerlines Typescript source file.
|
|
16
16
|
*
|
|
17
17
|
* @param props - The properties for the source file header.
|
|
18
18
|
* @returns The rendered source file header.
|
|
19
19
|
*/
|
|
20
|
-
declare function MarkdownFileHeader(props: SourceFileHeaderProps):
|
|
20
|
+
declare function MarkdownFileHeader(props: SourceFileHeaderProps): _alloy_js_core5.Children;
|
|
21
21
|
declare type __ΩMarkdownFileProps = any[];
|
|
22
22
|
//#endregion
|
|
23
23
|
export { MarkdownFile, MarkdownFileHeader, MarkdownFileProps, __ΩMarkdownFileProps };
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { ComponentProps, SourceFileHeaderProps } from "../../types/components.mjs";
|
|
2
|
-
import { SourceFileProps
|
|
3
|
-
import * as
|
|
2
|
+
import { SourceFileProps } from "../../core/components/source-file.mjs";
|
|
3
|
+
import * as _alloy_js_core5 from "@alloy-js/core";
|
|
4
4
|
|
|
5
5
|
//#region src/markdown/components/markdown-file.d.ts
|
|
6
|
-
type MarkdownFileProps = Omit<SourceFileProps
|
|
6
|
+
type MarkdownFileProps = Omit<SourceFileProps, "filetype"> & ComponentProps;
|
|
7
7
|
/**
|
|
8
8
|
* A base component representing a Powerlines generated markdown source file.
|
|
9
9
|
*
|
|
10
10
|
* @param props - The properties for the source file.
|
|
11
11
|
* @returns The rendered source file component.
|
|
12
12
|
*/
|
|
13
|
-
declare function MarkdownFile(props: MarkdownFileProps):
|
|
13
|
+
declare function MarkdownFile(props: MarkdownFileProps): _alloy_js_core5.Children;
|
|
14
14
|
/**
|
|
15
15
|
* Renders the header for a Powerlines Typescript source file.
|
|
16
16
|
*
|
|
17
17
|
* @param props - The properties for the source file header.
|
|
18
18
|
* @returns The rendered source file header.
|
|
19
19
|
*/
|
|
20
|
-
declare function MarkdownFileHeader(props: SourceFileHeaderProps):
|
|
20
|
+
declare function MarkdownFileHeader(props: SourceFileHeaderProps): _alloy_js_core5.Children;
|
|
21
21
|
declare type __ΩMarkdownFileProps = any[];
|
|
22
22
|
//#endregion
|
|
23
23
|
export { MarkdownFile, MarkdownFileHeader, MarkdownFileProps, __ΩMarkdownFileProps };
|
|
@@ -2,7 +2,7 @@ import { usePowerlines } from "../../core/contexts/context.mjs";
|
|
|
2
2
|
import { SingleLineComment } from "../../core/components/single-line-comment.mjs";
|
|
3
3
|
import { SourceFile } from "../../core/components/source-file.mjs";
|
|
4
4
|
import { createComponent, createIntrinsic, mergeProps } from "@alloy-js/core/jsx-runtime";
|
|
5
|
-
import { Show, code, getContext, splitProps } from "@alloy
|
|
5
|
+
import { Show, code, getContext, splitProps } from "@powerlines/plugin-alloy/vendor";
|
|
6
6
|
import { titleCase } from "@stryke/string-format/title-case";
|
|
7
7
|
import { Link } from "@alloy-js/markdown";
|
|
8
8
|
|