@powerlines/plugin-date 0.12.140 → 0.12.142
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/index-CA4VvAY_.d.mts +1 -0
- package/dist/index-CmCelmEL.d.cts +1 -0
- package/dist/index.cjs +13844 -17
- package/dist/index.d.cts +40 -7
- package/dist/index.d.mts +40 -9
- package/dist/index.mjs +13800 -6
- package/dist/plugin-BUfZ6cT1.d.cts +4432 -0
- package/dist/plugin-CuNMs4r-.d.mts +4434 -0
- package/dist/plugin-DHXHjv16.cjs +0 -0
- package/dist/plugin-ufqFO5xS.mjs +1 -0
- package/dist/runtime-B7WoCmC4.mjs +1 -0
- package/dist/runtime-B8LVkjWB.d.cts +711 -0
- package/dist/runtime-CiYq8JJ6.d.mts +711 -0
- package/dist/runtime-D4zTdSwv.cjs +0 -0
- package/dist/types/index.cjs +3 -0
- package/dist/types/index.d.cts +3 -2
- package/dist/types/index.d.mts +3 -2
- package/dist/types/index.mjs +4 -0
- package/dist/types/plugin.cjs +1 -0
- package/dist/types/plugin.d.cts +1 -42
- package/dist/types/plugin.d.mts +1 -42
- package/dist/types/plugin.mjs +2 -0
- package/dist/types/runtime.cjs +1 -0
- package/dist/types/runtime.d.cts +1 -710
- package/dist/types/runtime.d.mts +1 -710
- package/dist/types/runtime.mjs +2 -0
- package/dist/types-BReKsBV6.mjs +1 -0
- package/dist/types-CBTc19th.cjs +0 -0
- package/package.json +3 -3
- package/dist/_virtual/rolldown_runtime.cjs +0 -37
- package/dist/_virtual/rolldown_runtime.mjs +0 -29
- package/dist/components/date-fns.cjs +0 -527
- package/dist/components/date-fns.d.cts +0 -13
- package/dist/components/date-fns.d.mts +0 -13
- package/dist/components/date-fns.mjs +0 -527
- package/dist/components/dayjs.cjs +0 -472
- package/dist/components/dayjs.d.cts +0 -13
- package/dist/components/dayjs.d.mts +0 -13
- package/dist/components/dayjs.mjs +0 -472
- package/dist/components/index.cjs +0 -4
- package/dist/components/index.d.mts +0 -4
- package/dist/components/index.mjs +0 -6
- package/dist/components/luxon.cjs +0 -476
- package/dist/components/luxon.d.cts +0 -13
- package/dist/components/luxon.d.mts +0 -13
- package/dist/components/luxon.mjs +0 -476
- package/dist/components/moment.cjs +0 -462
- package/dist/components/moment.d.cts +0 -13
- package/dist/components/moment.d.mts +0 -13
- package/dist/components/moment.mjs +0 -462
- package/dist/deepkit/schemas/reflection.cjs +0 -3998
- package/dist/deepkit/schemas/reflection.d.cts +0 -1560
- package/dist/deepkit/schemas/reflection.d.mts +0 -1560
- package/dist/deepkit/schemas/reflection.mjs +0 -3996
- package/dist/deepkit/schemas/reflection2.cjs +0 -4112
- package/dist/deepkit/schemas/reflection2.mjs +0 -4110
- package/dist/deepkit/src/capnp.cjs +0 -913
- package/dist/deepkit/src/capnp.mjs +0 -911
- package/dist/deepkit/src/esbuild-plugin.cjs +0 -47
- package/dist/deepkit/src/esbuild-plugin.mjs +0 -46
- package/dist/deepkit/src/reflect-type.cjs +0 -22
- package/dist/deepkit/src/reflect-type.mjs +0 -20
- package/dist/deepkit/src/resolve-reflections.cjs +0 -16
- package/dist/deepkit/src/resolve-reflections.mjs +0 -15
- package/dist/deepkit/src/transformer.cjs +0 -52
- package/dist/deepkit/src/transformer.mjs +0 -49
- package/dist/deepkit/src/transpile.cjs +0 -29
- package/dist/deepkit/src/transpile.mjs +0 -27
- package/dist/deepkit/src/types.d.cts +0 -10
- package/dist/deepkit/src/types.d.mts +0 -10
- package/dist/deepkit/src/utilities.cjs +0 -66
- package/dist/deepkit/src/utilities.mjs +0 -65
- package/dist/deepkit/src/vendor/type-compiler/index.cjs +0 -38
- package/dist/deepkit/src/vendor/type-compiler/index.mjs +0 -19
- package/dist/deepkit/src/vendor/type.cjs +0 -20
- package/dist/deepkit/src/vendor/type.d.cts +0 -7
- package/dist/deepkit/src/vendor/type.d.mts +0 -7
- package/dist/deepkit/src/vendor/type.mjs +0 -11
- package/dist/plugin-alloy/src/core/components/output.cjs +0 -38
- package/dist/plugin-alloy/src/core/components/output.mjs +0 -37
- package/dist/plugin-alloy/src/core/components/single-line-comment.cjs +0 -20
- package/dist/plugin-alloy/src/core/components/single-line-comment.mjs +0 -19
- package/dist/plugin-alloy/src/core/components/source-file.cjs +0 -60
- package/dist/plugin-alloy/src/core/components/source-file.mjs +0 -58
- package/dist/plugin-alloy/src/core/contexts/context.cjs +0 -60
- package/dist/plugin-alloy/src/core/contexts/context.mjs +0 -54
- package/dist/plugin-alloy/src/core/contexts/index.cjs +0 -2
- package/dist/plugin-alloy/src/core/contexts/index.mjs +0 -4
- package/dist/plugin-alloy/src/core/contexts/reflection.cjs +0 -46
- package/dist/plugin-alloy/src/core/contexts/reflection.mjs +0 -42
- package/dist/plugin-alloy/src/helpers/refkey.cjs +0 -16
- package/dist/plugin-alloy/src/helpers/refkey.mjs +0 -15
- package/dist/plugin-alloy/src/index.cjs +0 -90
- package/dist/plugin-alloy/src/index.mjs +0 -88
- package/dist/plugin-alloy/src/markdown/components/markdown-file.cjs +0 -7
- package/dist/plugin-alloy/src/markdown/components/markdown-file.mjs +0 -9
- package/dist/plugin-alloy/src/markdown/components/markdown-table.cjs +0 -5
- package/dist/plugin-alloy/src/markdown/components/markdown-table.mjs +0 -7
- package/dist/plugin-alloy/src/markdown/contexts/markdown-table.cjs +0 -17
- package/dist/plugin-alloy/src/markdown/contexts/markdown-table.mjs +0 -17
- package/dist/plugin-alloy/src/types/components.d.mts +0 -4
- package/dist/plugin-alloy/src/types/index.d.mts +0 -2
- package/dist/plugin-alloy/src/types/plugin.d.cts +0 -37
- package/dist/plugin-alloy/src/types/plugin.d.mts +0 -37
- package/dist/plugin-alloy/src/typescript/components/builtin-file.cjs +0 -47
- package/dist/plugin-alloy/src/typescript/components/builtin-file.mjs +0 -46
- package/dist/plugin-alloy/src/typescript/components/tsdoc-reflection.cjs +0 -75
- package/dist/plugin-alloy/src/typescript/components/tsdoc-reflection.mjs +0 -73
- package/dist/plugin-alloy/src/typescript/components/tsdoc.cjs +0 -359
- package/dist/plugin-alloy/src/typescript/components/tsdoc.mjs +0 -350
- package/dist/plugin-alloy/src/typescript/components/typescript-file.cjs +0 -143
- package/dist/plugin-alloy/src/typescript/components/typescript-file.mjs +0 -140
- package/dist/plugin-alloy/src/typescript/components/typescript-interface.cjs +0 -53
- package/dist/plugin-alloy/src/typescript/components/typescript-interface.mjs +0 -52
- package/dist/plugin-alloy/src/typescript/components/typescript-object.cjs +0 -94
- package/dist/plugin-alloy/src/typescript/components/typescript-object.mjs +0 -93
- package/dist/plugin-automd/src/index.cjs +0 -101
- package/dist/plugin-automd/src/index.mjs +0 -98
- package/dist/plugin-automd/src/types/plugin.d.cts +0 -38
- package/dist/plugin-automd/src/types/plugin.d.mts +0 -40
- package/dist/plugin-automd/src/types/toc.d.cts +0 -33
- package/dist/plugin-automd/src/types/toc.d.mts +0 -33
- package/dist/plugin-babel/src/helpers/ast-utils.cjs +0 -10
- package/dist/plugin-babel/src/helpers/ast-utils.mjs +0 -9
- package/dist/plugin-babel/src/helpers/create-plugin.cjs +0 -41
- package/dist/plugin-babel/src/helpers/create-plugin.mjs +0 -39
- package/dist/plugin-babel/src/helpers/filters.cjs +0 -23
- package/dist/plugin-babel/src/helpers/filters.mjs +0 -21
- package/dist/plugin-babel/src/helpers/index.cjs +0 -5
- package/dist/plugin-babel/src/helpers/index.mjs +0 -7
- package/dist/plugin-babel/src/helpers/module-helpers.cjs +0 -38
- package/dist/plugin-babel/src/helpers/module-helpers.mjs +0 -35
- package/dist/plugin-babel/src/helpers/options.cjs +0 -50
- package/dist/plugin-babel/src/helpers/options.mjs +0 -47
- package/dist/plugin-babel/src/index.cjs +0 -91
- package/dist/plugin-babel/src/index.mjs +0 -89
- package/dist/plugin-babel/src/types/index.d.mts +0 -1
- package/dist/plugin-babel/src/types/plugin.d.cts +0 -15
- package/dist/plugin-babel/src/types/plugin.d.mts +0 -15
- package/dist/plugin-env/src/babel/index.cjs +0 -1
- package/dist/plugin-env/src/babel/index.mjs +0 -3
- package/dist/plugin-env/src/babel/plugin.cjs +0 -121
- package/dist/plugin-env/src/babel/plugin.mjs +0 -119
- package/dist/plugin-env/src/components/docs.cjs +0 -9
- package/dist/plugin-env/src/components/docs.mjs +0 -11
- package/dist/plugin-env/src/components/env.cjs +0 -487
- package/dist/plugin-env/src/components/env.mjs +0 -484
- package/dist/plugin-env/src/components/index.cjs +0 -2
- package/dist/plugin-env/src/components/index.mjs +0 -4
- package/dist/plugin-env/src/helpers/automd-generator.cjs +0 -22
- package/dist/plugin-env/src/helpers/automd-generator.mjs +0 -21
- package/dist/plugin-env/src/helpers/create-reflection-resource.cjs +0 -55
- package/dist/plugin-env/src/helpers/create-reflection-resource.mjs +0 -54
- package/dist/plugin-env/src/helpers/index.cjs +0 -6
- package/dist/plugin-env/src/helpers/index.mjs +0 -8
- package/dist/plugin-env/src/helpers/load.cjs +0 -83
- package/dist/plugin-env/src/helpers/load.mjs +0 -80
- package/dist/plugin-env/src/helpers/persistence.cjs +0 -200
- package/dist/plugin-env/src/helpers/persistence.mjs +0 -189
- package/dist/plugin-env/src/helpers/reflect.cjs +0 -125
- package/dist/plugin-env/src/helpers/reflect.mjs +0 -117
- package/dist/plugin-env/src/helpers/source-file-env.cjs +0 -24
- package/dist/plugin-env/src/helpers/source-file-env.mjs +0 -23
- package/dist/plugin-env/src/helpers/template-helpers.cjs +0 -2
- package/dist/plugin-env/src/helpers/template-helpers.mjs +0 -4
- package/dist/plugin-env/src/index.cjs +0 -172
- package/dist/plugin-env/src/index.mjs +0 -170
- package/dist/plugin-env/src/types/plugin.d.cts +0 -151
- package/dist/plugin-env/src/types/plugin.d.mts +0 -153
- package/dist/plugin-env/src/types/runtime.d.cts +0 -792
- package/dist/plugin-env/src/types/runtime.d.mts +0 -792
- package/dist/powerlines/src/lib/build/esbuild.cjs +0 -102
- package/dist/powerlines/src/lib/build/esbuild.mjs +0 -100
- package/dist/powerlines/src/lib/entry.cjs +0 -12
- package/dist/powerlines/src/lib/entry.mjs +0 -14
- package/dist/powerlines/src/lib/logger.cjs +0 -41
- package/dist/powerlines/src/lib/logger.mjs +0 -39
- package/dist/powerlines/src/lib/utilities/bundle.cjs +0 -35
- package/dist/powerlines/src/lib/utilities/bundle.mjs +0 -34
- package/dist/powerlines/src/lib/utilities/file-header.cjs +0 -22
- package/dist/powerlines/src/lib/utilities/file-header.mjs +0 -21
- package/dist/powerlines/src/lib/utilities/resolve.cjs +0 -30
- package/dist/powerlines/src/lib/utilities/resolve.mjs +0 -29
- package/dist/powerlines/src/plugin-utils/paths.cjs +0 -1
- package/dist/powerlines/src/plugin-utils/paths.mjs +0 -3
- package/dist/powerlines/src/types/babel.d.cts +0 -22
- package/dist/powerlines/src/types/babel.d.mts +0 -22
- package/dist/powerlines/src/types/build.d.cts +0 -145
- package/dist/powerlines/src/types/build.d.mts +0 -147
- package/dist/powerlines/src/types/commands.d.cts +0 -8
- package/dist/powerlines/src/types/commands.d.mts +0 -9
- package/dist/powerlines/src/types/config.d.cts +0 -380
- package/dist/powerlines/src/types/config.d.mts +0 -381
- package/dist/powerlines/src/types/context.d.cts +0 -414
- package/dist/powerlines/src/types/context.d.mts +0 -416
- package/dist/powerlines/src/types/fs.d.cts +0 -486
- package/dist/powerlines/src/types/fs.d.mts +0 -486
- package/dist/powerlines/src/types/hooks.d.mts +0 -2
- package/dist/powerlines/src/types/plugin.d.cts +0 -231
- package/dist/powerlines/src/types/plugin.d.mts +0 -231
- package/dist/powerlines/src/types/resolved.d.cts +0 -82
- package/dist/powerlines/src/types/resolved.d.mts +0 -83
- package/dist/powerlines/src/types/tsconfig.d.cts +0 -69
- package/dist/powerlines/src/types/tsconfig.d.mts +0 -69
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.cjs');
|
|
2
|
-
let __alloy_js_core = require("@alloy-js/core");
|
|
3
|
-
|
|
4
|
-
//#region ../plugin-alloy/src/markdown/contexts/markdown-table.ts
|
|
5
|
-
/**
|
|
6
|
-
* The Powerlines context used in template rendering.
|
|
7
|
-
*/
|
|
8
|
-
const MarkdownTableColumnContext = (0, __alloy_js_core.createNamedContext)("markdown-table-column", {});
|
|
9
|
-
/**
|
|
10
|
-
* The Powerlines context used in template rendering.
|
|
11
|
-
*/
|
|
12
|
-
const MarkdownTableContext = (0, __alloy_js_core.createContext)({
|
|
13
|
-
columns: [],
|
|
14
|
-
data: []
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
//#endregion
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { createContext, createNamedContext, useContext } from "@alloy-js/core";
|
|
2
|
-
|
|
3
|
-
//#region ../plugin-alloy/src/markdown/contexts/markdown-table.ts
|
|
4
|
-
/**
|
|
5
|
-
* The Powerlines context used in template rendering.
|
|
6
|
-
*/
|
|
7
|
-
const MarkdownTableColumnContext = createNamedContext("markdown-table-column", {});
|
|
8
|
-
/**
|
|
9
|
-
* The Powerlines context used in template rendering.
|
|
10
|
-
*/
|
|
11
|
-
const MarkdownTableContext = createContext({
|
|
12
|
-
columns: [],
|
|
13
|
-
data: []
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
//#endregion
|
|
17
|
-
export { };
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { UserConfig } from "../../../powerlines/src/types/config.cjs";
|
|
2
|
-
import { ResolvedConfig } from "../../../powerlines/src/types/resolved.cjs";
|
|
3
|
-
import { PluginContext } from "../../../powerlines/src/types/context.cjs";
|
|
4
|
-
import { Children, PrintTreeOptions } from "@alloy-js/core";
|
|
5
|
-
|
|
6
|
-
//#region ../plugin-alloy/src/types/plugin.d.ts
|
|
7
|
-
type AlloyPluginOptions = Partial<PrintTreeOptions> & {
|
|
8
|
-
/**
|
|
9
|
-
* If true, the Alloy framework is used to generate Typescript output files.
|
|
10
|
-
*
|
|
11
|
-
* @defaultValue true
|
|
12
|
-
*/
|
|
13
|
-
typescript?: boolean;
|
|
14
|
-
/**
|
|
15
|
-
* If true, the Alloy framework is used to generate JSON output files.
|
|
16
|
-
*
|
|
17
|
-
* @defaultValue false
|
|
18
|
-
*/
|
|
19
|
-
json?: boolean;
|
|
20
|
-
/**
|
|
21
|
-
* If true, the Alloy framework is used to generate Markdown output files.
|
|
22
|
-
*
|
|
23
|
-
* @defaultValue false
|
|
24
|
-
*/
|
|
25
|
-
markdown?: boolean;
|
|
26
|
-
};
|
|
27
|
-
type AlloyPluginUserConfig = UserConfig & {
|
|
28
|
-
alloy?: AlloyPluginOptions;
|
|
29
|
-
};
|
|
30
|
-
type AlloyPluginResolvedConfig = ResolvedConfig & {
|
|
31
|
-
alloy: AlloyPluginOptions;
|
|
32
|
-
};
|
|
33
|
-
type AlloyPluginContext<TResolvedConfig extends AlloyPluginResolvedConfig = AlloyPluginResolvedConfig> = PluginContext<TResolvedConfig> & {
|
|
34
|
-
render: <TContext extends AlloyPluginContext>(this: TContext, children: Children) => Promise<void>;
|
|
35
|
-
};
|
|
36
|
-
//#endregion
|
|
37
|
-
export { AlloyPluginContext, AlloyPluginOptions, AlloyPluginResolvedConfig, AlloyPluginUserConfig };
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { UserConfig } from "../../../powerlines/src/types/config.mjs";
|
|
2
|
-
import { ResolvedConfig } from "../../../powerlines/src/types/resolved.mjs";
|
|
3
|
-
import { PluginContext } from "../../../powerlines/src/types/context.mjs";
|
|
4
|
-
import { Children, PrintTreeOptions } from "@alloy-js/core";
|
|
5
|
-
|
|
6
|
-
//#region ../plugin-alloy/src/types/plugin.d.ts
|
|
7
|
-
type AlloyPluginOptions = Partial<PrintTreeOptions> & {
|
|
8
|
-
/**
|
|
9
|
-
* If true, the Alloy framework is used to generate Typescript output files.
|
|
10
|
-
*
|
|
11
|
-
* @defaultValue true
|
|
12
|
-
*/
|
|
13
|
-
typescript?: boolean;
|
|
14
|
-
/**
|
|
15
|
-
* If true, the Alloy framework is used to generate JSON output files.
|
|
16
|
-
*
|
|
17
|
-
* @defaultValue false
|
|
18
|
-
*/
|
|
19
|
-
json?: boolean;
|
|
20
|
-
/**
|
|
21
|
-
* If true, the Alloy framework is used to generate Markdown output files.
|
|
22
|
-
*
|
|
23
|
-
* @defaultValue false
|
|
24
|
-
*/
|
|
25
|
-
markdown?: boolean;
|
|
26
|
-
};
|
|
27
|
-
type AlloyPluginUserConfig = UserConfig & {
|
|
28
|
-
alloy?: AlloyPluginOptions;
|
|
29
|
-
};
|
|
30
|
-
type AlloyPluginResolvedConfig = ResolvedConfig & {
|
|
31
|
-
alloy: AlloyPluginOptions;
|
|
32
|
-
};
|
|
33
|
-
type AlloyPluginContext<TResolvedConfig extends AlloyPluginResolvedConfig = AlloyPluginResolvedConfig> = PluginContext<TResolvedConfig> & {
|
|
34
|
-
render: <TContext extends AlloyPluginContext>(this: TContext, children: Children) => Promise<void>;
|
|
35
|
-
};
|
|
36
|
-
//#endregion
|
|
37
|
-
export { AlloyPluginContext, AlloyPluginOptions, AlloyPluginResolvedConfig, AlloyPluginUserConfig };
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.cjs');
|
|
2
|
-
const require_context = require('../../core/contexts/context.cjs');
|
|
3
|
-
const require_tsdoc = require('./tsdoc.cjs');
|
|
4
|
-
const require_typescript_file = require('./typescript-file.cjs');
|
|
5
|
-
let __alloy_js_core = require("@alloy-js/core");
|
|
6
|
-
let __stryke_path_replace = require("@stryke/path/replace");
|
|
7
|
-
let react_jsx_runtime = require("react/jsx-runtime");
|
|
8
|
-
let __stryke_path_file_path_fns = require("@stryke/path/file-path-fns");
|
|
9
|
-
let __stryke_type_checks_is_set = require("@stryke/type-checks/is-set");
|
|
10
|
-
|
|
11
|
-
//#region ../plugin-alloy/src/typescript/components/builtin-file.tsx
|
|
12
|
-
/**
|
|
13
|
-
* A base component representing a Powerlines generated Typescript source file.
|
|
14
|
-
*
|
|
15
|
-
* @param props - The properties for the source file.
|
|
16
|
-
* @returns The rendered source file component.
|
|
17
|
-
*/
|
|
18
|
-
function BuiltinFile(props) {
|
|
19
|
-
const [{ children, imports, id, description, tsx }, rest] = (0, __alloy_js_core.splitProps)(props, [
|
|
20
|
-
"children",
|
|
21
|
-
"imports",
|
|
22
|
-
"id",
|
|
23
|
-
"description",
|
|
24
|
-
"tsx"
|
|
25
|
-
]);
|
|
26
|
-
const context = require_context.usePowerlines();
|
|
27
|
-
const path = (0, __alloy_js_core.computed)(() => (0, __stryke_path_replace.replacePath)(`${!(0, __stryke_type_checks_is_set.isSet)(tsx) ? id : (0, __stryke_path_replace.replaceExtension)(id)}${(0, __stryke_path_file_path_fns.hasFileExtension)(id) && !(0, __stryke_type_checks_is_set.isSet)(tsx) ? "" : tsx ? ".tsx" : ".ts"}`, context.builtinsPath));
|
|
28
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_typescript_file.TypescriptFile, {
|
|
29
|
-
header: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_typescript_file.TypescriptFileHeader, {
|
|
30
|
-
header: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_tsdoc.TSDocModule, {
|
|
31
|
-
name: id,
|
|
32
|
-
children: description
|
|
33
|
-
}),
|
|
34
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_typescript_file.TypescriptFileHeaderImports, { imports })
|
|
35
|
-
}),
|
|
36
|
-
meta: {
|
|
37
|
-
kind: "builtin",
|
|
38
|
-
id: (0, __stryke_path_replace.replaceExtension)(id)
|
|
39
|
-
},
|
|
40
|
-
...rest,
|
|
41
|
-
path: path.value,
|
|
42
|
-
children
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
//#endregion
|
|
47
|
-
exports.BuiltinFile = BuiltinFile;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { usePowerlines } from "../../core/contexts/context.mjs";
|
|
2
|
-
import { TSDocModule } from "./tsdoc.mjs";
|
|
3
|
-
import { TypescriptFile, TypescriptFileHeader, TypescriptFileHeaderImports } from "./typescript-file.mjs";
|
|
4
|
-
import { computed, splitProps } from "@alloy-js/core";
|
|
5
|
-
import { replaceExtension, replacePath } from "@stryke/path/replace";
|
|
6
|
-
import { jsx } from "react/jsx-runtime";
|
|
7
|
-
import { hasFileExtension } from "@stryke/path/file-path-fns";
|
|
8
|
-
import { isSet } from "@stryke/type-checks/is-set";
|
|
9
|
-
|
|
10
|
-
//#region ../plugin-alloy/src/typescript/components/builtin-file.tsx
|
|
11
|
-
/**
|
|
12
|
-
* A base component representing a Powerlines generated Typescript source file.
|
|
13
|
-
*
|
|
14
|
-
* @param props - The properties for the source file.
|
|
15
|
-
* @returns The rendered source file component.
|
|
16
|
-
*/
|
|
17
|
-
function BuiltinFile(props) {
|
|
18
|
-
const [{ children, imports, id, description, tsx }, rest] = splitProps(props, [
|
|
19
|
-
"children",
|
|
20
|
-
"imports",
|
|
21
|
-
"id",
|
|
22
|
-
"description",
|
|
23
|
-
"tsx"
|
|
24
|
-
]);
|
|
25
|
-
const context = usePowerlines();
|
|
26
|
-
const path = computed(() => replacePath(`${!isSet(tsx) ? id : replaceExtension(id)}${hasFileExtension(id) && !isSet(tsx) ? "" : tsx ? ".tsx" : ".ts"}`, context.builtinsPath));
|
|
27
|
-
return /* @__PURE__ */ jsx(TypescriptFile, {
|
|
28
|
-
header: /* @__PURE__ */ jsx(TypescriptFileHeader, {
|
|
29
|
-
header: /* @__PURE__ */ jsx(TSDocModule, {
|
|
30
|
-
name: id,
|
|
31
|
-
children: description
|
|
32
|
-
}),
|
|
33
|
-
children: /* @__PURE__ */ jsx(TypescriptFileHeaderImports, { imports })
|
|
34
|
-
}),
|
|
35
|
-
meta: {
|
|
36
|
-
kind: "builtin",
|
|
37
|
-
id: replaceExtension(id)
|
|
38
|
-
},
|
|
39
|
-
...rest,
|
|
40
|
-
path: path.value,
|
|
41
|
-
children
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
//#endregion
|
|
46
|
-
export { BuiltinFile };
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.cjs');
|
|
2
|
-
const require_tsdoc = require('./tsdoc.cjs');
|
|
3
|
-
const require_reflection = require('../../core/contexts/reflection.cjs');
|
|
4
|
-
let __alloy_js_core = require("@alloy-js/core");
|
|
5
|
-
let react_jsx_runtime = require("react/jsx-runtime");
|
|
6
|
-
let __stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-string");
|
|
7
|
-
let __stryke_string_format_title_case = require("@stryke/string-format/title-case");
|
|
8
|
-
let __stryke_type_checks_is_string = require("@stryke/type-checks/is-string");
|
|
9
|
-
let __stryke_type_checks_is_undefined = require("@stryke/type-checks/is-undefined");
|
|
10
|
-
|
|
11
|
-
//#region ../plugin-alloy/src/typescript/components/tsdoc-reflection.tsx
|
|
12
|
-
/**
|
|
13
|
-
* Generates a TypeScript interface property for the given reflection class.
|
|
14
|
-
*/
|
|
15
|
-
function TSDocReflectionClass(props) {
|
|
16
|
-
const [{ children }, rest] = (0, __alloy_js_core.splitProps)(props, ["children"]);
|
|
17
|
-
const reflectionClass = require_reflection.useReflectionClass();
|
|
18
|
-
const title = (0, __alloy_js_core.computed)(() => reflectionClass.reflection.getTitle() || (0, __stryke_string_format_title_case.titleCase)(reflectionClass.reflection.getName()));
|
|
19
|
-
const alias = (0, __alloy_js_core.computed)(() => reflectionClass.reflection.getAlias());
|
|
20
|
-
const domain = (0, __alloy_js_core.computed)(() => reflectionClass.reflection.getDomain());
|
|
21
|
-
const permission = (0, __alloy_js_core.computed)(() => reflectionClass.reflection.getPermission());
|
|
22
|
-
const readonly = (0, __alloy_js_core.computed)(() => reflectionClass.reflection.isReadonly());
|
|
23
|
-
const internal = (0, __alloy_js_core.computed)(() => reflectionClass.reflection.isInternal());
|
|
24
|
-
const ignore = (0, __alloy_js_core.computed)(() => reflectionClass.reflection.isIgnored());
|
|
25
|
-
const hidden = (0, __alloy_js_core.computed)(() => reflectionClass.reflection.isHidden());
|
|
26
|
-
if (!reflectionClass.reflection.getName()) return null;
|
|
27
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_tsdoc.TSDoc, {
|
|
28
|
-
...rest,
|
|
29
|
-
heading: reflectionClass.reflection.getDescription(),
|
|
30
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(__alloy_js_core.Show, {
|
|
31
|
-
when: (0, __stryke_type_checks_is_set_string.isSetString)(title.value) || !(0, __stryke_type_checks_is_undefined.isUndefined)(alias.value) && alias.value.length > 0 || !(0, __stryke_type_checks_is_undefined.isUndefined)(permission.value) && permission.value.length > 0 || (0, __stryke_type_checks_is_set_string.isSetString)(domain.value) || !(0, __stryke_type_checks_is_undefined.isUndefined)(readonly.value) || !(0, __stryke_type_checks_is_undefined.isUndefined)(internal.value) || !(0, __stryke_type_checks_is_undefined.isUndefined)(ignore.value) || !(0, __stryke_type_checks_is_undefined.isUndefined)(hidden.value),
|
|
32
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_tsdoc.TSDocAttributesTags, {
|
|
33
|
-
title: title.value,
|
|
34
|
-
alias: alias.value,
|
|
35
|
-
domain: domain.value,
|
|
36
|
-
permission: permission.value,
|
|
37
|
-
readonly: readonly.value,
|
|
38
|
-
internal: internal.value,
|
|
39
|
-
ignore: ignore.value,
|
|
40
|
-
hidden: hidden.value
|
|
41
|
-
})
|
|
42
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__alloy_js_core.Show, {
|
|
43
|
-
when: Boolean(children) && (0, __alloy_js_core.childrenArray)(() => children).length > 0,
|
|
44
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__alloy_js_core.List, { children: (0, __alloy_js_core.childrenArray)(() => children) })
|
|
45
|
-
})]
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Generates a TypeScript interface property for the given reflection class.
|
|
50
|
-
*/
|
|
51
|
-
function TSDocReflectionProperty(props) {
|
|
52
|
-
const [{ children }, rest] = (0, __alloy_js_core.splitProps)(props, ["children"]);
|
|
53
|
-
const context = require_reflection.useReflectionProperty();
|
|
54
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_tsdoc.TSDoc, {
|
|
55
|
-
heading: context.getDescription(),
|
|
56
|
-
...rest,
|
|
57
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_tsdoc.TSDocAttributesTags, {
|
|
58
|
-
title: context.getTitle(),
|
|
59
|
-
alias: context.getAlias(),
|
|
60
|
-
domain: context.getDomain(),
|
|
61
|
-
permission: context.getPermission(),
|
|
62
|
-
readonly: context.isReadonly(),
|
|
63
|
-
internal: context.isInternal(),
|
|
64
|
-
ignore: context.isIgnored(),
|
|
65
|
-
hidden: context.isHidden()
|
|
66
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__alloy_js_core.Show, {
|
|
67
|
-
when: Boolean(children) && (0, __alloy_js_core.childrenArray)(() => children).length > 0,
|
|
68
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__alloy_js_core.List, { children: (0, __alloy_js_core.childrenArray)(() => children) })
|
|
69
|
-
})]
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
//#endregion
|
|
74
|
-
exports.TSDocReflectionClass = TSDocReflectionClass;
|
|
75
|
-
exports.TSDocReflectionProperty = TSDocReflectionProperty;
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { TSDoc, TSDocAttributesTags } from "./tsdoc.mjs";
|
|
2
|
-
import { useReflectionClass, useReflectionProperty } from "../../core/contexts/reflection.mjs";
|
|
3
|
-
import { List, Show, childrenArray, code, computed, splitProps } from "@alloy-js/core";
|
|
4
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
-
import { isSetString } from "@stryke/type-checks/is-set-string";
|
|
6
|
-
import { titleCase } from "@stryke/string-format/title-case";
|
|
7
|
-
import { isString } from "@stryke/type-checks/is-string";
|
|
8
|
-
import { isUndefined } from "@stryke/type-checks/is-undefined";
|
|
9
|
-
|
|
10
|
-
//#region ../plugin-alloy/src/typescript/components/tsdoc-reflection.tsx
|
|
11
|
-
/**
|
|
12
|
-
* Generates a TypeScript interface property for the given reflection class.
|
|
13
|
-
*/
|
|
14
|
-
function TSDocReflectionClass(props) {
|
|
15
|
-
const [{ children }, rest] = splitProps(props, ["children"]);
|
|
16
|
-
const reflectionClass = useReflectionClass();
|
|
17
|
-
const title = computed(() => reflectionClass.reflection.getTitle() || titleCase(reflectionClass.reflection.getName()));
|
|
18
|
-
const alias = computed(() => reflectionClass.reflection.getAlias());
|
|
19
|
-
const domain = computed(() => reflectionClass.reflection.getDomain());
|
|
20
|
-
const permission = computed(() => reflectionClass.reflection.getPermission());
|
|
21
|
-
const readonly = computed(() => reflectionClass.reflection.isReadonly());
|
|
22
|
-
const internal = computed(() => reflectionClass.reflection.isInternal());
|
|
23
|
-
const ignore = computed(() => reflectionClass.reflection.isIgnored());
|
|
24
|
-
const hidden = computed(() => reflectionClass.reflection.isHidden());
|
|
25
|
-
if (!reflectionClass.reflection.getName()) return null;
|
|
26
|
-
return /* @__PURE__ */ jsxs(TSDoc, {
|
|
27
|
-
...rest,
|
|
28
|
-
heading: reflectionClass.reflection.getDescription(),
|
|
29
|
-
children: [/* @__PURE__ */ jsx(Show, {
|
|
30
|
-
when: isSetString(title.value) || !isUndefined(alias.value) && alias.value.length > 0 || !isUndefined(permission.value) && permission.value.length > 0 || isSetString(domain.value) || !isUndefined(readonly.value) || !isUndefined(internal.value) || !isUndefined(ignore.value) || !isUndefined(hidden.value),
|
|
31
|
-
children: /* @__PURE__ */ jsx(TSDocAttributesTags, {
|
|
32
|
-
title: title.value,
|
|
33
|
-
alias: alias.value,
|
|
34
|
-
domain: domain.value,
|
|
35
|
-
permission: permission.value,
|
|
36
|
-
readonly: readonly.value,
|
|
37
|
-
internal: internal.value,
|
|
38
|
-
ignore: ignore.value,
|
|
39
|
-
hidden: hidden.value
|
|
40
|
-
})
|
|
41
|
-
}), /* @__PURE__ */ jsx(Show, {
|
|
42
|
-
when: Boolean(children) && childrenArray(() => children).length > 0,
|
|
43
|
-
children: /* @__PURE__ */ jsx(List, { children: childrenArray(() => children) })
|
|
44
|
-
})]
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Generates a TypeScript interface property for the given reflection class.
|
|
49
|
-
*/
|
|
50
|
-
function TSDocReflectionProperty(props) {
|
|
51
|
-
const [{ children }, rest] = splitProps(props, ["children"]);
|
|
52
|
-
const context = useReflectionProperty();
|
|
53
|
-
return /* @__PURE__ */ jsxs(TSDoc, {
|
|
54
|
-
heading: context.getDescription(),
|
|
55
|
-
...rest,
|
|
56
|
-
children: [/* @__PURE__ */ jsx(TSDocAttributesTags, {
|
|
57
|
-
title: context.getTitle(),
|
|
58
|
-
alias: context.getAlias(),
|
|
59
|
-
domain: context.getDomain(),
|
|
60
|
-
permission: context.getPermission(),
|
|
61
|
-
readonly: context.isReadonly(),
|
|
62
|
-
internal: context.isInternal(),
|
|
63
|
-
ignore: context.isIgnored(),
|
|
64
|
-
hidden: context.isHidden()
|
|
65
|
-
}), /* @__PURE__ */ jsx(Show, {
|
|
66
|
-
when: Boolean(children) && childrenArray(() => children).length > 0,
|
|
67
|
-
children: /* @__PURE__ */ jsx(List, { children: childrenArray(() => children) })
|
|
68
|
-
})]
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
//#endregion
|
|
73
|
-
export { TSDocReflectionClass, TSDocReflectionProperty };
|