@powerlines/plugin-date 0.12.151 → 0.12.152

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.
Files changed (150) hide show
  1. package/dist/components/date-fns.cjs +3 -2
  2. package/dist/components/date-fns.mjs +1 -1
  3. package/dist/components/dayjs.cjs +3 -2
  4. package/dist/components/dayjs.mjs +1 -1
  5. package/dist/components/luxon.cjs +3 -2
  6. package/dist/components/luxon.mjs +1 -1
  7. package/dist/components/moment.cjs +3 -2
  8. package/dist/components/moment.mjs +1 -1
  9. package/dist/index.cjs +5 -5
  10. package/dist/index.d.mts +1 -1
  11. package/dist/index.mjs +3 -3
  12. package/dist/node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.cjs +43 -0
  13. package/dist/node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.mjs +42 -0
  14. package/dist/packages/plugin-alloy/src/types/components.d.mts +2 -0
  15. package/dist/{plugin-env → packages/plugin-env}/src/types/plugin.d.mts +1 -1
  16. package/dist/{powerlines → packages/powerlines}/src/types/build.d.mts +6 -6
  17. package/dist/{powerlines → packages/powerlines}/src/types/config.d.mts +1 -2
  18. package/dist/{powerlines → packages/powerlines}/src/types/tsconfig.d.mts +1 -1
  19. package/dist/types/plugin.d.mts +1 -1
  20. package/package.json +5 -5
  21. package/dist/deepkit/schemas/reflection.cjs +0 -3998
  22. package/dist/deepkit/schemas/reflection.mjs +0 -3996
  23. package/dist/deepkit/schemas/reflection2.cjs +0 -4112
  24. package/dist/deepkit/schemas/reflection2.mjs +0 -4110
  25. package/dist/deepkit/src/capnp.cjs +0 -913
  26. package/dist/deepkit/src/capnp.mjs +0 -911
  27. package/dist/deepkit/src/esbuild-plugin.cjs +0 -47
  28. package/dist/deepkit/src/esbuild-plugin.mjs +0 -46
  29. package/dist/deepkit/src/reflect-type.cjs +0 -22
  30. package/dist/deepkit/src/reflect-type.mjs +0 -20
  31. package/dist/deepkit/src/resolve-reflections.cjs +0 -16
  32. package/dist/deepkit/src/resolve-reflections.mjs +0 -15
  33. package/dist/deepkit/src/transformer.cjs +0 -52
  34. package/dist/deepkit/src/transformer.mjs +0 -49
  35. package/dist/deepkit/src/transpile.cjs +0 -29
  36. package/dist/deepkit/src/transpile.mjs +0 -27
  37. package/dist/deepkit/src/utilities.cjs +0 -66
  38. package/dist/deepkit/src/utilities.mjs +0 -65
  39. package/dist/plugin-alloy/src/core/components/output.cjs +0 -38
  40. package/dist/plugin-alloy/src/core/components/output.mjs +0 -37
  41. package/dist/plugin-alloy/src/core/components/single-line-comment.cjs +0 -20
  42. package/dist/plugin-alloy/src/core/components/single-line-comment.mjs +0 -19
  43. package/dist/plugin-alloy/src/core/components/source-file.cjs +0 -60
  44. package/dist/plugin-alloy/src/core/components/source-file.mjs +0 -58
  45. package/dist/plugin-alloy/src/core/contexts/context.cjs +0 -60
  46. package/dist/plugin-alloy/src/core/contexts/context.mjs +0 -54
  47. package/dist/plugin-alloy/src/core/contexts/index.cjs +0 -2
  48. package/dist/plugin-alloy/src/core/contexts/index.mjs +0 -4
  49. package/dist/plugin-alloy/src/core/contexts/reflection.cjs +0 -46
  50. package/dist/plugin-alloy/src/core/contexts/reflection.mjs +0 -42
  51. package/dist/plugin-alloy/src/helpers/refkey.cjs +0 -16
  52. package/dist/plugin-alloy/src/helpers/refkey.mjs +0 -15
  53. package/dist/plugin-alloy/src/index.cjs +0 -103
  54. package/dist/plugin-alloy/src/index.mjs +0 -101
  55. package/dist/plugin-alloy/src/markdown/components/markdown-file.cjs +0 -7
  56. package/dist/plugin-alloy/src/markdown/components/markdown-file.mjs +0 -9
  57. package/dist/plugin-alloy/src/markdown/components/markdown-table.cjs +0 -5
  58. package/dist/plugin-alloy/src/markdown/components/markdown-table.mjs +0 -7
  59. package/dist/plugin-alloy/src/markdown/contexts/markdown-table.cjs +0 -17
  60. package/dist/plugin-alloy/src/markdown/contexts/markdown-table.mjs +0 -17
  61. package/dist/plugin-alloy/src/types/components.d.mts +0 -3
  62. package/dist/plugin-alloy/src/typescript/components/builtin-file.cjs +0 -47
  63. package/dist/plugin-alloy/src/typescript/components/builtin-file.mjs +0 -46
  64. package/dist/plugin-alloy/src/typescript/components/tsdoc-reflection.cjs +0 -75
  65. package/dist/plugin-alloy/src/typescript/components/tsdoc-reflection.mjs +0 -73
  66. package/dist/plugin-alloy/src/typescript/components/tsdoc.cjs +0 -359
  67. package/dist/plugin-alloy/src/typescript/components/tsdoc.mjs +0 -350
  68. package/dist/plugin-alloy/src/typescript/components/typescript-file.cjs +0 -153
  69. package/dist/plugin-alloy/src/typescript/components/typescript-file.mjs +0 -150
  70. package/dist/plugin-alloy/src/typescript/components/typescript-interface.cjs +0 -53
  71. package/dist/plugin-alloy/src/typescript/components/typescript-interface.mjs +0 -52
  72. package/dist/plugin-alloy/src/typescript/components/typescript-object.cjs +0 -94
  73. package/dist/plugin-alloy/src/typescript/components/typescript-object.mjs +0 -93
  74. package/dist/plugin-automd/src/index.cjs +0 -101
  75. package/dist/plugin-automd/src/index.mjs +0 -98
  76. package/dist/plugin-babel/src/helpers/ast-utils.cjs +0 -10
  77. package/dist/plugin-babel/src/helpers/ast-utils.mjs +0 -9
  78. package/dist/plugin-babel/src/helpers/create-plugin.cjs +0 -41
  79. package/dist/plugin-babel/src/helpers/create-plugin.mjs +0 -39
  80. package/dist/plugin-babel/src/helpers/filters.cjs +0 -23
  81. package/dist/plugin-babel/src/helpers/filters.mjs +0 -21
  82. package/dist/plugin-babel/src/helpers/index.cjs +0 -5
  83. package/dist/plugin-babel/src/helpers/index.mjs +0 -7
  84. package/dist/plugin-babel/src/helpers/module-helpers.cjs +0 -38
  85. package/dist/plugin-babel/src/helpers/module-helpers.mjs +0 -35
  86. package/dist/plugin-babel/src/helpers/options.cjs +0 -50
  87. package/dist/plugin-babel/src/helpers/options.mjs +0 -47
  88. package/dist/plugin-babel/src/index.cjs +0 -91
  89. package/dist/plugin-babel/src/index.mjs +0 -89
  90. package/dist/plugin-env/src/babel/index.cjs +0 -1
  91. package/dist/plugin-env/src/babel/index.mjs +0 -3
  92. package/dist/plugin-env/src/babel/plugin.cjs +0 -121
  93. package/dist/plugin-env/src/babel/plugin.mjs +0 -119
  94. package/dist/plugin-env/src/components/docs.cjs +0 -9
  95. package/dist/plugin-env/src/components/docs.mjs +0 -11
  96. package/dist/plugin-env/src/components/env.cjs +0 -487
  97. package/dist/plugin-env/src/components/env.mjs +0 -484
  98. package/dist/plugin-env/src/components/index.cjs +0 -2
  99. package/dist/plugin-env/src/components/index.mjs +0 -4
  100. package/dist/plugin-env/src/helpers/automd-generator.cjs +0 -22
  101. package/dist/plugin-env/src/helpers/automd-generator.mjs +0 -21
  102. package/dist/plugin-env/src/helpers/create-reflection-resource.cjs +0 -55
  103. package/dist/plugin-env/src/helpers/create-reflection-resource.mjs +0 -54
  104. package/dist/plugin-env/src/helpers/index.cjs +0 -6
  105. package/dist/plugin-env/src/helpers/index.mjs +0 -8
  106. package/dist/plugin-env/src/helpers/load.cjs +0 -83
  107. package/dist/plugin-env/src/helpers/load.mjs +0 -80
  108. package/dist/plugin-env/src/helpers/persistence.cjs +0 -201
  109. package/dist/plugin-env/src/helpers/persistence.mjs +0 -190
  110. package/dist/plugin-env/src/helpers/reflect.cjs +0 -125
  111. package/dist/plugin-env/src/helpers/reflect.mjs +0 -117
  112. package/dist/plugin-env/src/helpers/source-file-env.cjs +0 -24
  113. package/dist/plugin-env/src/helpers/source-file-env.mjs +0 -23
  114. package/dist/plugin-env/src/helpers/template-helpers.cjs +0 -2
  115. package/dist/plugin-env/src/helpers/template-helpers.mjs +0 -4
  116. package/dist/plugin-env/src/index.cjs +0 -172
  117. package/dist/plugin-env/src/index.mjs +0 -170
  118. package/dist/powerlines/src/lib/build/esbuild.cjs +0 -102
  119. package/dist/powerlines/src/lib/build/esbuild.mjs +0 -100
  120. package/dist/powerlines/src/lib/entry.cjs +0 -12
  121. package/dist/powerlines/src/lib/entry.mjs +0 -14
  122. package/dist/powerlines/src/lib/logger.cjs +0 -41
  123. package/dist/powerlines/src/lib/logger.mjs +0 -39
  124. package/dist/powerlines/src/lib/utilities/bundle.cjs +0 -35
  125. package/dist/powerlines/src/lib/utilities/bundle.mjs +0 -34
  126. package/dist/powerlines/src/lib/utilities/file-header.cjs +0 -22
  127. package/dist/powerlines/src/lib/utilities/file-header.mjs +0 -21
  128. package/dist/powerlines/src/lib/utilities/resolve.cjs +0 -30
  129. package/dist/powerlines/src/lib/utilities/resolve.mjs +0 -29
  130. package/dist/powerlines/src/plugin-utils/paths.cjs +0 -1
  131. package/dist/powerlines/src/plugin-utils/paths.mjs +0 -3
  132. /package/dist/{deepkit → packages/deepkit}/schemas/reflection.d.mts +0 -0
  133. /package/dist/{deepkit → packages/deepkit}/src/types.d.mts +0 -0
  134. /package/dist/{plugin-alloy → packages/plugin-alloy}/src/types/index.d.mts +0 -0
  135. /package/dist/{plugin-alloy → packages/plugin-alloy}/src/types/plugin.d.mts +0 -0
  136. /package/dist/{plugin-automd → packages/plugin-automd}/src/types/plugin.d.mts +0 -0
  137. /package/dist/{plugin-automd → packages/plugin-automd}/src/types/toc.d.mts +0 -0
  138. /package/dist/{plugin-babel → packages/plugin-babel}/src/types/index.d.mts +0 -0
  139. /package/dist/{plugin-babel → packages/plugin-babel}/src/types/plugin.d.mts +0 -0
  140. /package/dist/{plugin-env → packages/plugin-env}/src/types/runtime.d.mts +0 -0
  141. /package/dist/{powerlines → packages/powerlines}/src/internal/helpers/hooks.d.mts +0 -0
  142. /package/dist/{powerlines → packages/powerlines}/src/types/api.d.mts +0 -0
  143. /package/dist/{powerlines → packages/powerlines}/src/types/babel.d.mts +0 -0
  144. /package/dist/{powerlines → packages/powerlines}/src/types/commands.d.mts +0 -0
  145. /package/dist/{powerlines → packages/powerlines}/src/types/context.d.mts +0 -0
  146. /package/dist/{powerlines → packages/powerlines}/src/types/fs.d.mts +0 -0
  147. /package/dist/{powerlines → packages/powerlines}/src/types/hooks.d.mts +0 -0
  148. /package/dist/{powerlines → packages/powerlines}/src/types/plugin.d.mts +0 -0
  149. /package/dist/{powerlines → packages/powerlines}/src/types/resolved.d.mts +0 -0
  150. /package/dist/{powerlines → packages/powerlines}/src/types/unplugin.d.mts +0 -0
@@ -1,58 +0,0 @@
1
- import { useMeta } from "../contexts/context.mjs";
2
- import "../contexts/index.mjs";
3
- import { Show, SourceDirectoryContext, SourceFileContext, getContext, splitProps, useContext, useFormatOptions } from "@alloy-js/core";
4
- import { jsx, jsxs } from "react/jsx-runtime";
5
- import { appendPath } from "@stryke/path/append";
6
- import defu from "defu";
7
-
8
- //#region ../plugin-alloy/src/core/components/source-file.tsx
9
- /**
10
- * A base component representing a Powerlines generated source file.
11
- *
12
- * @param props - The properties for the source file.
13
- * @returns The rendered source file component.
14
- */
15
- function SourceFile(props) {
16
- const [{ children, meta, path, header, storage, filetype, reference }] = splitProps(props, [
17
- "children",
18
- "meta",
19
- "path",
20
- "header",
21
- "storage",
22
- "filetype",
23
- "reference"
24
- ]);
25
- const metadata = useMeta();
26
- const parentDirectory = useContext(SourceDirectoryContext);
27
- const sourceFile = {
28
- path: appendPath(path, parentDirectory.path),
29
- filetype,
30
- reference
31
- };
32
- parentDirectory?.addContent(sourceFile);
33
- const printOptions = useFormatOptions({
34
- printWidth: props.printWidth,
35
- tabWidth: props.tabWidth,
36
- useTabs: props.useTabs,
37
- insertFinalNewLine: props.insertFinalNewLine
38
- });
39
- const nodeContext = getContext();
40
- nodeContext.meta = defu({
41
- sourceFile,
42
- printOptions
43
- }, meta ?? {});
44
- metadata[sourceFile.path] = {
45
- storage,
46
- ...meta ?? {}
47
- };
48
- return /* @__PURE__ */ jsxs(SourceFileContext.Provider, {
49
- value: sourceFile,
50
- children: [/* @__PURE__ */ jsxs(Show, {
51
- when: header !== void 0,
52
- children: [header, /* @__PURE__ */ jsx("hbr", {})]
53
- }), children]
54
- });
55
- }
56
-
57
- //#endregion
58
- export { SourceFile };
@@ -1,60 +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/core/contexts/context.ts
5
- /**
6
- * The Powerlines context used in template rendering.
7
- */
8
- const PowerlinesContext = (0, __alloy_js_core.createNamedContext)("powerlines");
9
- /**
10
- * Hook to access the Powerlines Context.
11
- *
12
- * @returns The Context.
13
- */
14
- function usePowerlinesContext() {
15
- return (0, __alloy_js_core.useContext)(PowerlinesContext);
16
- }
17
- /**
18
- * Hook to safely access the {@link PluginContext | Powerlines context}.
19
- *
20
- * @returns The Powerlines context or undefined if not set.
21
- */
22
- function usePowerlinesSafe() {
23
- return usePowerlinesContext()?.ref?.value;
24
- }
25
- /**
26
- * Hook to access the {@link PluginContext | Powerlines context}.
27
- *
28
- * @returns The Powerlines context.
29
- */
30
- function usePowerlines() {
31
- const powerlines = usePowerlinesSafe();
32
- if (!powerlines) throw new Error("Powerlines - Context is not set. Please make sure the Alloy components are being provided to an invocation of the `render` function added to plugins by `@powerlines/plugin-alloy`.");
33
- return powerlines;
34
- }
35
- /**
36
- * Hook to safely access the render context's metadata.
37
- *
38
- * @returns The Powerlines context or undefined if not set.
39
- */
40
- function useMetaSafe() {
41
- return usePowerlinesContext()?.meta?.value;
42
- }
43
- /**
44
- * Hook to access the render context's metadata.
45
- *
46
- * @returns The Powerlines context.
47
- */
48
- function useMeta() {
49
- const meta = useMetaSafe();
50
- if (!meta) throw new Error("Powerlines metadata is not available in the rendering context. Please make sure the Alloy components are being provided to an invocation of the `render` function added to plugins by `@powerlines/plugin-alloy`.");
51
- return meta;
52
- }
53
-
54
- //#endregion
55
- exports.PowerlinesContext = PowerlinesContext;
56
- exports.useMeta = useMeta;
57
- exports.useMetaSafe = useMetaSafe;
58
- exports.usePowerlines = usePowerlines;
59
- exports.usePowerlinesContext = usePowerlinesContext;
60
- exports.usePowerlinesSafe = usePowerlinesSafe;
@@ -1,54 +0,0 @@
1
- import { createNamedContext, useContext } from "@alloy-js/core";
2
-
3
- //#region ../plugin-alloy/src/core/contexts/context.ts
4
- /**
5
- * The Powerlines context used in template rendering.
6
- */
7
- const PowerlinesContext = createNamedContext("powerlines");
8
- /**
9
- * Hook to access the Powerlines Context.
10
- *
11
- * @returns The Context.
12
- */
13
- function usePowerlinesContext() {
14
- return useContext(PowerlinesContext);
15
- }
16
- /**
17
- * Hook to safely access the {@link PluginContext | Powerlines context}.
18
- *
19
- * @returns The Powerlines context or undefined if not set.
20
- */
21
- function usePowerlinesSafe() {
22
- return usePowerlinesContext()?.ref?.value;
23
- }
24
- /**
25
- * Hook to access the {@link PluginContext | Powerlines context}.
26
- *
27
- * @returns The Powerlines context.
28
- */
29
- function usePowerlines() {
30
- const powerlines = usePowerlinesSafe();
31
- if (!powerlines) throw new Error("Powerlines - Context is not set. Please make sure the Alloy components are being provided to an invocation of the `render` function added to plugins by `@powerlines/plugin-alloy`.");
32
- return powerlines;
33
- }
34
- /**
35
- * Hook to safely access the render context's metadata.
36
- *
37
- * @returns The Powerlines context or undefined if not set.
38
- */
39
- function useMetaSafe() {
40
- return usePowerlinesContext()?.meta?.value;
41
- }
42
- /**
43
- * Hook to access the render context's metadata.
44
- *
45
- * @returns The Powerlines context.
46
- */
47
- function useMeta() {
48
- const meta = useMetaSafe();
49
- if (!meta) throw new Error("Powerlines metadata is not available in the rendering context. Please make sure the Alloy components are being provided to an invocation of the `render` function added to plugins by `@powerlines/plugin-alloy`.");
50
- return meta;
51
- }
52
-
53
- //#endregion
54
- export { PowerlinesContext, useMeta, useMetaSafe, usePowerlines, usePowerlinesContext, usePowerlinesSafe };
@@ -1,2 +0,0 @@
1
- const require_context = require('./context.cjs');
2
- const require_reflection = require('./reflection.cjs');
@@ -1,4 +0,0 @@
1
- import { PowerlinesContext, useMeta, useMetaSafe, usePowerlines, usePowerlinesContext, usePowerlinesSafe } from "./context.mjs";
2
- import { ReflectionClassContext, ReflectionPropertyContext, useReflectionClass, useReflectionProperty } from "./reflection.mjs";
3
-
4
- export { };
@@ -1,46 +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/core/contexts/reflection.ts
5
- /**
6
- * The reflection class context used in template rendering.
7
- */
8
- const ReflectionClassContext = (0, __alloy_js_core.createContext)();
9
- /**
10
- * Hook to access the Reflection context.
11
- *
12
- * @returns A reactive version of the current reflection.
13
- */
14
- function useReflectionClass() {
15
- const context = (0, __alloy_js_core.useContext)(ReflectionClassContext);
16
- if (!context) throw new Error("Powerlines - ReflectionClass Context is not set. Please make sure the Alloy components are being provided to an invocation of the `render` function added to plugins by `@powerlines/plugin-alloy`.");
17
- return context;
18
- }
19
- /**
20
- * The reflection property context used in template rendering.
21
- */
22
- const ReflectionPropertyContext = (0, __alloy_js_core.createNamedContext)("reflection-property");
23
- /**
24
- * Hook to access the Reflection Property context.
25
- *
26
- * @returns A reactive version of the current reflection.
27
- */
28
- function useReflectionProperty() {
29
- const context = (0, __alloy_js_core.useContext)(ReflectionPropertyContext);
30
- if (!context) throw new Error("Powerlines - Reflection Property Context is not set. Please make sure the Alloy components are being provided to an invocation of the `render` function added to plugins by `@powerlines/plugin-alloy`.");
31
- return context;
32
- }
33
- /**
34
- * The reflection method context used in template rendering.
35
- */
36
- const ReflectionMethodContext = (0, __alloy_js_core.createNamedContext)("reflection-method");
37
- /**
38
- * The reflection parameter context used in template rendering.
39
- */
40
- const ReflectionParameterContext = (0, __alloy_js_core.createNamedContext)("reflection-parameter");
41
-
42
- //#endregion
43
- exports.ReflectionClassContext = ReflectionClassContext;
44
- exports.ReflectionPropertyContext = ReflectionPropertyContext;
45
- exports.useReflectionClass = useReflectionClass;
46
- exports.useReflectionProperty = useReflectionProperty;
@@ -1,42 +0,0 @@
1
- import { createContext, createNamedContext, useContext } from "@alloy-js/core";
2
-
3
- //#region ../plugin-alloy/src/core/contexts/reflection.ts
4
- /**
5
- * The reflection class context used in template rendering.
6
- */
7
- const ReflectionClassContext = createContext();
8
- /**
9
- * Hook to access the Reflection context.
10
- *
11
- * @returns A reactive version of the current reflection.
12
- */
13
- function useReflectionClass() {
14
- const context = useContext(ReflectionClassContext);
15
- if (!context) throw new Error("Powerlines - ReflectionClass Context is not set. Please make sure the Alloy components are being provided to an invocation of the `render` function added to plugins by `@powerlines/plugin-alloy`.");
16
- return context;
17
- }
18
- /**
19
- * The reflection property context used in template rendering.
20
- */
21
- const ReflectionPropertyContext = createNamedContext("reflection-property");
22
- /**
23
- * Hook to access the Reflection Property context.
24
- *
25
- * @returns A reactive version of the current reflection.
26
- */
27
- function useReflectionProperty() {
28
- const context = useContext(ReflectionPropertyContext);
29
- if (!context) throw new Error("Powerlines - Reflection Property Context is not set. Please make sure the Alloy components are being provided to an invocation of the `render` function added to plugins by `@powerlines/plugin-alloy`.");
30
- return context;
31
- }
32
- /**
33
- * The reflection method context used in template rendering.
34
- */
35
- const ReflectionMethodContext = createNamedContext("reflection-method");
36
- /**
37
- * The reflection parameter context used in template rendering.
38
- */
39
- const ReflectionParameterContext = createNamedContext("reflection-parameter");
40
-
41
- //#endregion
42
- export { ReflectionClassContext, ReflectionPropertyContext, useReflectionClass, useReflectionProperty };
@@ -1,16 +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/helpers/refkey.ts
5
- /**
6
- * Create a refkey for the provided arguments. Passing no arguments returns a fresh refkey that is guaranteed to be unique. Otherwise, the arguments passed will be used to create a refkey for those values. Providing the same arguments will always return the same refkey.
7
- *
8
- * @remarks
9
- * Values are compared using the SameValueZero algorithm, which considers objects the same if they are reference identical, and primitives the same if they are the same value, with the exception of `NaN`, which is always considered equal to other `NaN` values, and `-0`, which is considered identical to `+0`
10
- */
11
- function refkey(...args) {
12
- return (0, __alloy_js_core.refkey)("powerlines", ...args);
13
- }
14
-
15
- //#endregion
16
- exports.refkey = refkey;
@@ -1,15 +0,0 @@
1
- import { refkey } from "@alloy-js/core";
2
-
3
- //#region ../plugin-alloy/src/helpers/refkey.ts
4
- /**
5
- * Create a refkey for the provided arguments. Passing no arguments returns a fresh refkey that is guaranteed to be unique. Otherwise, the arguments passed will be used to create a refkey for those values. Providing the same arguments will always return the same refkey.
6
- *
7
- * @remarks
8
- * Values are compared using the SameValueZero algorithm, which considers objects the same if they are reference identical, and primitives the same if they are the same value, with the exception of `NaN`, which is always considered equal to other `NaN` values, and `-0`, which is considered identical to `+0`
9
- */
10
- function refkey$1(...args) {
11
- return refkey("powerlines", ...args);
12
- }
13
-
14
- //#endregion
15
- export { refkey$1 as refkey };
@@ -1,103 +0,0 @@
1
- const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
2
- const require_output = require('./core/components/output.cjs');
3
- let __alloy_js_core = require("@alloy-js/core");
4
- let __alloy_js_rollup_plugin = require("@alloy-js/rollup-plugin");
5
- __alloy_js_rollup_plugin = require_rolldown_runtime.__toESM(__alloy_js_rollup_plugin);
6
- let __stryke_json_storm_json = require("@stryke/json/storm-json");
7
- let react_jsx_runtime = require("react/jsx-runtime");
8
-
9
- //#region ../plugin-alloy/src/index.tsx
10
- /**
11
- * Alloy-js plugin for Powerlines.
12
- *
13
- * @param options - The Alloy-js plugin user configuration options.
14
- * @returns A Powerlines plugin that integrates Alloy-js transformations.
15
- */
16
- const plugin = (options = {}) => {
17
- return [{
18
- name: "alloy:config",
19
- config() {
20
- return {
21
- alloy: {
22
- typescript: true,
23
- ...options
24
- },
25
- build: {
26
- inputOptions: { transform: {
27
- typescript: {
28
- jsxPragma: "Alloy.createElement",
29
- jsxPragmaFrag: "Alloy.Fragment"
30
- },
31
- jsx: {
32
- runtime: "classic",
33
- pragma: "Alloy.createElement",
34
- pragmaFrag: "Alloy.Fragment",
35
- importSource: "@alloy-js/core"
36
- }
37
- } },
38
- plugins: [(0, __alloy_js_rollup_plugin.default)()],
39
- external: [
40
- "@alloy-js/core",
41
- "@alloy-js/typescript",
42
- "@alloy-js/json",
43
- "@alloy-js/markdown"
44
- ]
45
- }
46
- };
47
- },
48
- async configResolved() {
49
- if (this.tsconfig.tsconfigJson.compilerOptions?.jsx !== "preserve" || this.tsconfig.tsconfigJson.compilerOptions?.jsxImportSource !== "@alloy-js/core") {
50
- this.tsconfig.tsconfigJson.compilerOptions ??= {};
51
- if (this.tsconfig.tsconfigJson.compilerOptions.jsx !== "preserve") this.tsconfig.tsconfigJson.compilerOptions.jsx = "preserve";
52
- if (this.tsconfig.tsconfigJson.compilerOptions.jsxImportSource !== "@alloy-js/core") this.tsconfig.tsconfigJson.compilerOptions.jsxImportSource = "@alloy-js/core";
53
- await this.fs.write(this.tsconfig.tsconfigFilePath, __stryke_json_storm_json.StormJSON.stringify(this.tsconfig.tsconfigJson));
54
- }
55
- this.dependencies["@alloy-js/core"] = "^0.22.0";
56
- if (this.config.alloy?.typescript !== false) this.dependencies["@alloy-js/typescript"] = "^0.22.0";
57
- if (this.config.alloy?.json === true) this.dependencies["@alloy-js/json"] = "^0.22.0";
58
- if (this.config.alloy?.markdown === true) this.dependencies["@alloy-js/markdown"] = "^0.22.0";
59
- }
60
- }, {
61
- name: "alloy:update-context",
62
- configResolved: {
63
- order: "pre",
64
- async handler() {
65
- this.render = async (children) => {
66
- const meta = {};
67
- await (0, __alloy_js_core.traverseOutput)(await (0, __alloy_js_core.renderAsync)(/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_output.Output, {
68
- context: this,
69
- meta,
70
- basePath: this.workspaceConfig.workspaceRoot,
71
- children
72
- })), {
73
- visitDirectory: (directory) => {
74
- if (this.fs.existsSync(directory.path)) return;
75
- this.fs.mkdirSync(directory.path);
76
- },
77
- visitFile: (file) => {
78
- if ("contents" in file) {
79
- const metadata = meta[file.path] ?? {};
80
- if (metadata.kind === "builtin") {
81
- if (!metadata.id) throw new Error(`Built-in file "${file.path}" is missing its ID in the render metadata.`);
82
- this.emitBuiltinSync(file.contents, metadata.id, file.path, {
83
- skipFormat: metadata.skipFormat,
84
- storage: metadata.storage
85
- });
86
- } else if (metadata.kind === "entry") this.emitEntrySync(file.contents, file.path, {
87
- skipFormat: metadata.skipFormat,
88
- storage: metadata.storage,
89
- ...metadata.typeDefinition ?? {}
90
- });
91
- else this.emitSync(file.contents, file.path, metadata);
92
- } else this.fs.copySync(file.sourcePath, file.path);
93
- }
94
- });
95
- };
96
- }
97
- }
98
- }];
99
- };
100
- var src_default = plugin;
101
-
102
- //#endregion
103
- exports.default = src_default;
@@ -1,101 +0,0 @@
1
- import { Output as Output$1 } from "./core/components/output.mjs";
2
- import { renderAsync, traverseOutput } from "@alloy-js/core";
3
- import alloy from "@alloy-js/rollup-plugin";
4
- import { StormJSON } from "@stryke/json/storm-json";
5
- import { jsx } from "react/jsx-runtime";
6
-
7
- //#region ../plugin-alloy/src/index.tsx
8
- /**
9
- * Alloy-js plugin for Powerlines.
10
- *
11
- * @param options - The Alloy-js plugin user configuration options.
12
- * @returns A Powerlines plugin that integrates Alloy-js transformations.
13
- */
14
- const plugin = (options = {}) => {
15
- return [{
16
- name: "alloy:config",
17
- config() {
18
- return {
19
- alloy: {
20
- typescript: true,
21
- ...options
22
- },
23
- build: {
24
- inputOptions: { transform: {
25
- typescript: {
26
- jsxPragma: "Alloy.createElement",
27
- jsxPragmaFrag: "Alloy.Fragment"
28
- },
29
- jsx: {
30
- runtime: "classic",
31
- pragma: "Alloy.createElement",
32
- pragmaFrag: "Alloy.Fragment",
33
- importSource: "@alloy-js/core"
34
- }
35
- } },
36
- plugins: [alloy()],
37
- external: [
38
- "@alloy-js/core",
39
- "@alloy-js/typescript",
40
- "@alloy-js/json",
41
- "@alloy-js/markdown"
42
- ]
43
- }
44
- };
45
- },
46
- async configResolved() {
47
- if (this.tsconfig.tsconfigJson.compilerOptions?.jsx !== "preserve" || this.tsconfig.tsconfigJson.compilerOptions?.jsxImportSource !== "@alloy-js/core") {
48
- this.tsconfig.tsconfigJson.compilerOptions ??= {};
49
- if (this.tsconfig.tsconfigJson.compilerOptions.jsx !== "preserve") this.tsconfig.tsconfigJson.compilerOptions.jsx = "preserve";
50
- if (this.tsconfig.tsconfigJson.compilerOptions.jsxImportSource !== "@alloy-js/core") this.tsconfig.tsconfigJson.compilerOptions.jsxImportSource = "@alloy-js/core";
51
- await this.fs.write(this.tsconfig.tsconfigFilePath, StormJSON.stringify(this.tsconfig.tsconfigJson));
52
- }
53
- this.dependencies["@alloy-js/core"] = "^0.22.0";
54
- if (this.config.alloy?.typescript !== false) this.dependencies["@alloy-js/typescript"] = "^0.22.0";
55
- if (this.config.alloy?.json === true) this.dependencies["@alloy-js/json"] = "^0.22.0";
56
- if (this.config.alloy?.markdown === true) this.dependencies["@alloy-js/markdown"] = "^0.22.0";
57
- }
58
- }, {
59
- name: "alloy:update-context",
60
- configResolved: {
61
- order: "pre",
62
- async handler() {
63
- this.render = async (children) => {
64
- const meta = {};
65
- await traverseOutput(await renderAsync(/* @__PURE__ */ jsx(Output$1, {
66
- context: this,
67
- meta,
68
- basePath: this.workspaceConfig.workspaceRoot,
69
- children
70
- })), {
71
- visitDirectory: (directory) => {
72
- if (this.fs.existsSync(directory.path)) return;
73
- this.fs.mkdirSync(directory.path);
74
- },
75
- visitFile: (file) => {
76
- if ("contents" in file) {
77
- const metadata = meta[file.path] ?? {};
78
- if (metadata.kind === "builtin") {
79
- if (!metadata.id) throw new Error(`Built-in file "${file.path}" is missing its ID in the render metadata.`);
80
- this.emitBuiltinSync(file.contents, metadata.id, file.path, {
81
- skipFormat: metadata.skipFormat,
82
- storage: metadata.storage
83
- });
84
- } else if (metadata.kind === "entry") this.emitEntrySync(file.contents, file.path, {
85
- skipFormat: metadata.skipFormat,
86
- storage: metadata.storage,
87
- ...metadata.typeDefinition ?? {}
88
- });
89
- else this.emitSync(file.contents, file.path, metadata);
90
- } else this.fs.copySync(file.sourcePath, file.path);
91
- }
92
- });
93
- };
94
- }
95
- }
96
- }];
97
- };
98
- var src_default = plugin;
99
-
100
- //#endregion
101
- export { src_default as default };
@@ -1,7 +0,0 @@
1
- require('../../core/contexts/context.cjs');
2
- require('../../core/components/single-line-comment.cjs');
3
- require('../../core/components/source-file.cjs');
4
- let __alloy_js_core = require("@alloy-js/core");
5
- let react_jsx_runtime = require("react/jsx-runtime");
6
- let __stryke_string_format_title_case = require("@stryke/string-format/title-case");
7
- require("@alloy-js/markdown");
@@ -1,9 +0,0 @@
1
- import "../../core/contexts/context.mjs";
2
- import "../../core/components/single-line-comment.mjs";
3
- import "../../core/components/source-file.mjs";
4
- import { Show, code, splitProps } from "@alloy-js/core";
5
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
- import { titleCase } from "@stryke/string-format/title-case";
7
- import "@alloy-js/markdown";
8
-
9
- export { };
@@ -1,5 +0,0 @@
1
- require('../contexts/markdown-table.cjs');
2
- let __alloy_js_core = require("@alloy-js/core");
3
- let react_jsx_runtime = require("react/jsx-runtime");
4
- let __stryke_string_format_title_case = require("@stryke/string-format/title-case");
5
- let __stryke_type_checks_is_undefined = require("@stryke/type-checks/is-undefined");
@@ -1,7 +0,0 @@
1
- import "../contexts/markdown-table.mjs";
2
- import { Prose, Show, code, computed, splitProps } from "@alloy-js/core";
3
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
4
- import { titleCase } from "@stryke/string-format/title-case";
5
- import { isUndefined } from "@stryke/type-checks/is-undefined";
6
-
7
- export { };
@@ -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,3 +0,0 @@
1
- import "../../../powerlines/src/types/resolved.mjs";
2
- import { Children } from "@alloy-js/core";
3
- import { SourceFileContext as SourceFileContext$1 } from "@alloy-js/typescript";
@@ -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;