@powerlines/plugin-env 0.15.122 → 0.15.124

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 (219) hide show
  1. package/dist/babel/plugin.cjs +11 -11
  2. package/dist/babel/plugin.d.cts +2 -2
  3. package/dist/babel/plugin.d.mts +2 -3
  4. package/dist/babel/plugin.mjs +5 -5
  5. package/dist/components/docs.cjs +6 -6
  6. package/dist/components/docs.d.cts +1 -1
  7. package/dist/components/docs.d.mts +1 -1
  8. package/dist/components/docs.mjs +3 -3
  9. package/dist/components/env.cjs +40 -40
  10. package/dist/components/env.d.cts +2 -2
  11. package/dist/components/env.d.mts +2 -2
  12. package/dist/components/env.mjs +11 -11
  13. package/dist/helpers/automd-generator.cjs +2 -2
  14. package/dist/helpers/automd-generator.d.cts +1 -1
  15. package/dist/helpers/automd-generator.d.mts +1 -1
  16. package/dist/helpers/automd-generator.mjs +1 -1
  17. package/dist/helpers/load.cjs +7 -7
  18. package/dist/helpers/load.mjs +8 -8
  19. package/dist/helpers/persistence.cjs +23 -23
  20. package/dist/helpers/persistence.d.cts +1 -1
  21. package/dist/helpers/persistence.d.mts +1 -1
  22. package/dist/helpers/persistence.mjs +5 -5
  23. package/dist/helpers/reflect.cjs +5 -5
  24. package/dist/helpers/reflect.mjs +1 -1
  25. package/dist/helpers/source-file-env.cjs +1 -1
  26. package/dist/helpers/source-file-env.mjs +1 -1
  27. package/dist/index.cjs +13 -10
  28. package/dist/index.d.cts +1 -1
  29. package/dist/index.d.mts +1 -1
  30. package/dist/index.mjs +12 -12
  31. package/dist/types/plugin.cjs +19 -18
  32. package/dist/types/plugin.d.cts +5 -6
  33. package/dist/types/plugin.d.mts +4 -6
  34. package/dist/types/plugin.mjs +4 -4
  35. package/package.json +7 -7
  36. package/dist/deepkit/schemas/reflection.cjs +0 -5426
  37. package/dist/deepkit/schemas/reflection.d.cts +0 -1560
  38. package/dist/deepkit/schemas/reflection.d.mts +0 -1560
  39. package/dist/deepkit/schemas/reflection.mjs +0 -5423
  40. package/dist/deepkit/schemas/reflection2.cjs +0 -4112
  41. package/dist/deepkit/schemas/reflection2.mjs +0 -4110
  42. package/dist/deepkit/src/capnp.cjs +0 -1692
  43. package/dist/deepkit/src/capnp.mjs +0 -1690
  44. package/dist/deepkit/src/esbuild-plugin.cjs +0 -99
  45. package/dist/deepkit/src/esbuild-plugin.mjs +0 -98
  46. package/dist/deepkit/src/reflect-type.cjs +0 -40
  47. package/dist/deepkit/src/reflect-type.mjs +0 -38
  48. package/dist/deepkit/src/resolve-reflections.cjs +0 -23
  49. package/dist/deepkit/src/resolve-reflections.mjs +0 -22
  50. package/dist/deepkit/src/transformer.cjs +0 -92
  51. package/dist/deepkit/src/transformer.mjs +0 -89
  52. package/dist/deepkit/src/transpile.cjs +0 -39
  53. package/dist/deepkit/src/transpile.mjs +0 -37
  54. package/dist/deepkit/src/types.cjs +0 -22
  55. package/dist/deepkit/src/types.d.cts +0 -10
  56. package/dist/deepkit/src/types.d.mts +0 -10
  57. package/dist/deepkit/src/types.mjs +0 -21
  58. package/dist/deepkit/src/utilities.cjs +0 -184
  59. package/dist/deepkit/src/utilities.mjs +0 -183
  60. package/dist/plugin-alloy/src/core/components/output.cjs +0 -43
  61. package/dist/plugin-alloy/src/core/components/output.mjs +0 -42
  62. package/dist/plugin-alloy/src/core/components/single-line-comment.cjs +0 -22
  63. package/dist/plugin-alloy/src/core/components/single-line-comment.mjs +0 -21
  64. package/dist/plugin-alloy/src/core/components/source-file.cjs +0 -64
  65. package/dist/plugin-alloy/src/core/components/source-file.d.cts +0 -23
  66. package/dist/plugin-alloy/src/core/components/source-file.d.mts +0 -23
  67. package/dist/plugin-alloy/src/core/components/source-file.mjs +0 -62
  68. package/dist/plugin-alloy/src/core/contexts/context.cjs +0 -134
  69. package/dist/plugin-alloy/src/core/contexts/context.mjs +0 -126
  70. package/dist/plugin-alloy/src/core/contexts/index.cjs +0 -2
  71. package/dist/plugin-alloy/src/core/contexts/index.mjs +0 -4
  72. package/dist/plugin-alloy/src/core/contexts/reflection.cjs +0 -110
  73. package/dist/plugin-alloy/src/core/contexts/reflection.mjs +0 -101
  74. package/dist/plugin-alloy/src/helpers/refkey.cjs +0 -23
  75. package/dist/plugin-alloy/src/helpers/refkey.mjs +0 -22
  76. package/dist/plugin-alloy/src/index.cjs +0 -105
  77. package/dist/plugin-alloy/src/index.mjs +0 -103
  78. package/dist/plugin-alloy/src/markdown/components/markdown-file.cjs +0 -115
  79. package/dist/plugin-alloy/src/markdown/components/markdown-file.d.cts +0 -8
  80. package/dist/plugin-alloy/src/markdown/components/markdown-file.d.mts +0 -8
  81. package/dist/plugin-alloy/src/markdown/components/markdown-file.mjs +0 -114
  82. package/dist/plugin-alloy/src/markdown/components/markdown-table.cjs +0 -39
  83. package/dist/plugin-alloy/src/markdown/components/markdown-table.mjs +0 -38
  84. package/dist/plugin-alloy/src/markdown/contexts/markdown-table.cjs +0 -72
  85. package/dist/plugin-alloy/src/markdown/contexts/markdown-table.mjs +0 -71
  86. package/dist/plugin-alloy/src/types/components.cjs +0 -22
  87. package/dist/plugin-alloy/src/types/components.d.cts +0 -20
  88. package/dist/plugin-alloy/src/types/components.d.mts +0 -21
  89. package/dist/plugin-alloy/src/types/components.mjs +0 -21
  90. package/dist/plugin-alloy/src/types/index.d.cts +0 -2
  91. package/dist/plugin-alloy/src/types/index.d.mts +0 -2
  92. package/dist/plugin-alloy/src/types/plugin.cjs +0 -53
  93. package/dist/plugin-alloy/src/types/plugin.d.cts +0 -36
  94. package/dist/plugin-alloy/src/types/plugin.d.mts +0 -36
  95. package/dist/plugin-alloy/src/types/plugin.mjs +0 -50
  96. package/dist/plugin-alloy/src/typescript/components/builtin-file.cjs +0 -62
  97. package/dist/plugin-alloy/src/typescript/components/builtin-file.d.cts +0 -26
  98. package/dist/plugin-alloy/src/typescript/components/builtin-file.d.mts +0 -26
  99. package/dist/plugin-alloy/src/typescript/components/builtin-file.mjs +0 -61
  100. package/dist/plugin-alloy/src/typescript/components/tsdoc-reflection.cjs +0 -131
  101. package/dist/plugin-alloy/src/typescript/components/tsdoc-reflection.mjs +0 -129
  102. package/dist/plugin-alloy/src/typescript/components/tsdoc.cjs +0 -451
  103. package/dist/plugin-alloy/src/typescript/components/tsdoc.d.cts +0 -37
  104. package/dist/plugin-alloy/src/typescript/components/tsdoc.d.mts +0 -37
  105. package/dist/plugin-alloy/src/typescript/components/tsdoc.mjs +0 -442
  106. package/dist/plugin-alloy/src/typescript/components/typescript-file.cjs +0 -216
  107. package/dist/plugin-alloy/src/typescript/components/typescript-file.d.cts +0 -16
  108. package/dist/plugin-alloy/src/typescript/components/typescript-file.d.mts +0 -16
  109. package/dist/plugin-alloy/src/typescript/components/typescript-file.mjs +0 -213
  110. package/dist/plugin-alloy/src/typescript/components/typescript-interface.cjs +0 -72
  111. package/dist/plugin-alloy/src/typescript/components/typescript-interface.d.cts +0 -12
  112. package/dist/plugin-alloy/src/typescript/components/typescript-interface.d.mts +0 -12
  113. package/dist/plugin-alloy/src/typescript/components/typescript-interface.mjs +0 -71
  114. package/dist/plugin-alloy/src/typescript/components/typescript-object.cjs +0 -124
  115. package/dist/plugin-alloy/src/typescript/components/typescript-object.mjs +0 -123
  116. package/dist/plugin-automd/src/index.cjs +0 -127
  117. package/dist/plugin-automd/src/index.mjs +0 -124
  118. package/dist/plugin-automd/src/types/plugin.cjs +0 -47
  119. package/dist/plugin-automd/src/types/plugin.d.cts +0 -38
  120. package/dist/plugin-automd/src/types/plugin.d.mts +0 -40
  121. package/dist/plugin-automd/src/types/plugin.mjs +0 -47
  122. package/dist/plugin-automd/src/types/toc.cjs +0 -26
  123. package/dist/plugin-automd/src/types/toc.d.cts +0 -33
  124. package/dist/plugin-automd/src/types/toc.d.mts +0 -33
  125. package/dist/plugin-automd/src/types/toc.mjs +0 -25
  126. package/dist/plugin-babel/src/helpers/ast-utils.cjs +0 -74
  127. package/dist/plugin-babel/src/helpers/ast-utils.mjs +0 -70
  128. package/dist/plugin-babel/src/helpers/create-plugin.cjs +0 -71
  129. package/dist/plugin-babel/src/helpers/create-plugin.mjs +0 -69
  130. package/dist/plugin-babel/src/helpers/filters.cjs +0 -158
  131. package/dist/plugin-babel/src/helpers/filters.mjs +0 -154
  132. package/dist/plugin-babel/src/helpers/index.cjs +0 -5
  133. package/dist/plugin-babel/src/helpers/index.mjs +0 -7
  134. package/dist/plugin-babel/src/helpers/module-helpers.cjs +0 -200
  135. package/dist/plugin-babel/src/helpers/module-helpers.mjs +0 -192
  136. package/dist/plugin-babel/src/helpers/options.cjs +0 -73
  137. package/dist/plugin-babel/src/helpers/options.mjs +0 -70
  138. package/dist/plugin-babel/src/index.cjs +0 -125
  139. package/dist/plugin-babel/src/index.mjs +0 -123
  140. package/dist/plugin-babel/src/types/index.d.mts +0 -1
  141. package/dist/plugin-babel/src/types/plugin.cjs +0 -42
  142. package/dist/plugin-babel/src/types/plugin.d.cts +0 -15
  143. package/dist/plugin-babel/src/types/plugin.d.mts +0 -15
  144. package/dist/plugin-babel/src/types/plugin.mjs +0 -39
  145. package/dist/powerlines/src/internal/helpers/hooks.cjs +0 -136
  146. package/dist/powerlines/src/internal/helpers/hooks.d.cts +0 -47
  147. package/dist/powerlines/src/internal/helpers/hooks.d.mts +0 -49
  148. package/dist/powerlines/src/internal/helpers/hooks.mjs +0 -134
  149. package/dist/powerlines/src/lib/build/esbuild.cjs +0 -142
  150. package/dist/powerlines/src/lib/build/esbuild.mjs +0 -140
  151. package/dist/powerlines/src/lib/constants/environments.cjs +0 -6
  152. package/dist/powerlines/src/lib/constants/environments.mjs +0 -5
  153. package/dist/powerlines/src/lib/entry.cjs +0 -195
  154. package/dist/powerlines/src/lib/entry.mjs +0 -194
  155. package/dist/powerlines/src/lib/logger.cjs +0 -108
  156. package/dist/powerlines/src/lib/logger.mjs +0 -106
  157. package/dist/powerlines/src/lib/unplugin/helpers.cjs +0 -41
  158. package/dist/powerlines/src/lib/unplugin/helpers.mjs +0 -40
  159. package/dist/powerlines/src/lib/unplugin/module-resolution.cjs +0 -98
  160. package/dist/powerlines/src/lib/unplugin/module-resolution.mjs +0 -97
  161. package/dist/powerlines/src/lib/unplugin/plugin.cjs +0 -139
  162. package/dist/powerlines/src/lib/unplugin/plugin.mjs +0 -138
  163. package/dist/powerlines/src/lib/utilities/bundle.cjs +0 -74
  164. package/dist/powerlines/src/lib/utilities/bundle.mjs +0 -72
  165. package/dist/powerlines/src/lib/utilities/resolve.cjs +0 -69
  166. package/dist/powerlines/src/lib/utilities/resolve.mjs +0 -68
  167. package/dist/powerlines/src/lib/utilities/source-file.cjs +0 -68
  168. package/dist/powerlines/src/lib/utilities/source-file.mjs +0 -66
  169. package/dist/powerlines/src/plugin-utils/paths.cjs +0 -46
  170. package/dist/powerlines/src/plugin-utils/paths.mjs +0 -45
  171. package/dist/powerlines/src/types/api.cjs +0 -62
  172. package/dist/powerlines/src/types/api.d.cts +0 -104
  173. package/dist/powerlines/src/types/api.d.mts +0 -104
  174. package/dist/powerlines/src/types/api.mjs +0 -62
  175. package/dist/powerlines/src/types/babel.cjs +0 -156
  176. package/dist/powerlines/src/types/babel.d.cts +0 -23
  177. package/dist/powerlines/src/types/babel.d.mts +0 -23
  178. package/dist/powerlines/src/types/babel.mjs +0 -147
  179. package/dist/powerlines/src/types/build.cjs +0 -127
  180. package/dist/powerlines/src/types/build.d.cts +0 -185
  181. package/dist/powerlines/src/types/build.d.mts +0 -185
  182. package/dist/powerlines/src/types/build.mjs +0 -121
  183. package/dist/powerlines/src/types/commands.cjs +0 -16
  184. package/dist/powerlines/src/types/commands.d.cts +0 -8
  185. package/dist/powerlines/src/types/commands.d.mts +0 -9
  186. package/dist/powerlines/src/types/commands.mjs +0 -15
  187. package/dist/powerlines/src/types/config.cjs +0 -420
  188. package/dist/powerlines/src/types/config.d.cts +0 -435
  189. package/dist/powerlines/src/types/config.d.mts +0 -436
  190. package/dist/powerlines/src/types/config.mjs +0 -397
  191. package/dist/powerlines/src/types/context.cjs +0 -388
  192. package/dist/powerlines/src/types/context.d.cts +0 -514
  193. package/dist/powerlines/src/types/context.d.mts +0 -514
  194. package/dist/powerlines/src/types/context.mjs +0 -371
  195. package/dist/powerlines/src/types/fs.cjs +0 -78
  196. package/dist/powerlines/src/types/fs.d.cts +0 -486
  197. package/dist/powerlines/src/types/fs.d.mts +0 -486
  198. package/dist/powerlines/src/types/fs.mjs +0 -75
  199. package/dist/powerlines/src/types/hooks.cjs +0 -71
  200. package/dist/powerlines/src/types/hooks.d.cts +0 -32
  201. package/dist/powerlines/src/types/hooks.d.mts +0 -32
  202. package/dist/powerlines/src/types/hooks.mjs +0 -68
  203. package/dist/powerlines/src/types/index.cjs +0 -11
  204. package/dist/powerlines/src/types/index.d.mts +0 -12
  205. package/dist/powerlines/src/types/index.mjs +0 -13
  206. package/dist/powerlines/src/types/plugin.cjs +0 -184
  207. package/dist/powerlines/src/types/plugin.d.cts +0 -205
  208. package/dist/powerlines/src/types/plugin.d.mts +0 -205
  209. package/dist/powerlines/src/types/plugin.mjs +0 -178
  210. package/dist/powerlines/src/types/resolved.cjs +0 -149
  211. package/dist/powerlines/src/types/resolved.d.cts +0 -94
  212. package/dist/powerlines/src/types/resolved.d.mts +0 -94
  213. package/dist/powerlines/src/types/resolved.mjs +0 -144
  214. package/dist/powerlines/src/types/tsconfig.d.cts +0 -69
  215. package/dist/powerlines/src/types/tsconfig.d.mts +0 -69
  216. package/dist/powerlines/src/types/unplugin.cjs +0 -64
  217. package/dist/powerlines/src/types/unplugin.d.cts +0 -22
  218. package/dist/powerlines/src/types/unplugin.d.mts +0 -23
  219. package/dist/powerlines/src/types/unplugin.mjs +0 -62
@@ -1,62 +0,0 @@
1
- import { useMetaSafe } from "../contexts/context.mjs";
2
- import "../contexts/index.mjs";
3
- import defu$1 from "defu";
4
- import { appendPath } from "@stryke/path/append";
5
- import { Show, SourceDirectoryContext, SourceFileContext, getContext, splitProps, useContext, useFormatOptions } from "@alloy-js/core";
6
- import { createComponent, createIntrinsic } from "@alloy-js/core/jsx-runtime";
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 = useMetaSafe();
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$1({
41
- sourceFile,
42
- printOptions
43
- }, meta ?? {});
44
- if (metadata) metadata[sourceFile.path] = {
45
- storage,
46
- ...meta ?? {}
47
- };
48
- return createComponent(SourceFileContext.Provider, {
49
- value: sourceFile,
50
- get children() {
51
- return [createComponent(Show, {
52
- when: header !== void 0,
53
- get children() {
54
- return [header, createIntrinsic("hbr", {})];
55
- }
56
- }), children];
57
- }
58
- });
59
- }
60
-
61
- //#endregion
62
- export { SourceFile };
@@ -1,134 +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
- const __ΩRecord = [
6
- "K",
7
- "T",
8
- "Record",
9
- "l'e#\"Rb!b\"Pde\"!N#!w#y"
10
- ];
11
- const __ΩMetaItem = [
12
- "builtin",
13
- "entry",
14
- "kind",
15
- "The kind of metadata item.",
16
- "skipFormat",
17
- "Whether to skip formatting for this output.",
18
- "StoragePreset",
19
- "storage",
20
- "The storage preset or adapter name for the output files.",
21
- "MetaItem",
22
- "PP.!.\"&J4#8?$)4%8?&P\"w'&J4(8?)&\"LMw*y"
23
- ];
24
- const __ΩPowerlinesContextInterface = [
25
- "PluginContext",
26
- "TContext",
27
- () => __ΩRecord,
28
- () => __ΩMetaItem,
29
- "TMeta",
30
- "value",
31
- "The current Powerlines context.",
32
- "meta",
33
- "The current render metadata.",
34
- "PowerlinesContextInterface",
35
- "\"w!c\"&n$o##c%Pe\"!4&?'e\"\"4(?)Mw*y"
36
- ];
37
- /**
38
- * The Powerlines context used in template rendering.
39
- */
40
- const PowerlinesContext = (__alloy_js_core.createNamedContext.Ω = [[() => __ΩPowerlinesContextInterface, "\"\"o!#"]], (0, __alloy_js_core.createNamedContext)("powerlines"));
41
- /**
42
- * Hook to access the Powerlines Context.
43
- *
44
- * @returns The Context.
45
- */
46
- function usePowerlinesContext() {
47
- return __alloy_js_core.useContext.Ω = [[
48
- () => __ΩPowerlinesContextInterface,
49
- "PluginContext",
50
- () => __ΩRecord,
51
- () => __ΩMetaItem,
52
- "\"w\"&n$o##o!#"
53
- ]], (0, __alloy_js_core.useContext)(PowerlinesContext);
54
- }
55
- usePowerlinesContext.__type = [
56
- () => __ΩPowerlinesContextInterface,
57
- "usePowerlinesContext",
58
- "Hook to access the Powerlines Context.",
59
- "PP\"\"o!#-J/\"?#"
60
- ];
61
- /**
62
- * Hook to safely access the {@link PluginContext | Powerlines context}.
63
- *
64
- * @returns The Powerlines context or undefined if not set.
65
- */
66
- function usePowerlinesSafe() {
67
- return (usePowerlinesContext.Ω = [["PluginContext", "\"w!"]], usePowerlinesContext())?.value;
68
- }
69
- usePowerlinesSafe.__type = [
70
- "usePowerlinesSafe",
71
- "Hook to safely access the {@link PluginContext | Powerlines context}.",
72
- "PP\"-J/!?\""
73
- ];
74
- /**
75
- * Hook to access the {@link PluginContext | Powerlines context}.
76
- *
77
- * @returns The Powerlines context.
78
- */
79
- function usePowerlines() {
80
- const powerlines = (usePowerlinesSafe.Ω = [["PluginContext", "\"w!"]], usePowerlinesSafe());
81
- 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`.");
82
- return powerlines;
83
- }
84
- usePowerlines.__type = [
85
- "usePowerlines",
86
- "Hook to access the {@link PluginContext | Powerlines context}.",
87
- "P\"/!?\""
88
- ];
89
- /**
90
- * Hook to safely access the render context's metadata.
91
- *
92
- * @returns The Powerlines context or undefined if not set.
93
- */
94
- function useMetaSafe() {
95
- return (usePowerlinesContext.Ω = [["PluginContext", "\"w!"], [
96
- () => __ΩRecord,
97
- () => __ΩMetaItem,
98
- "&n\"o!#"
99
- ]], usePowerlinesContext())?.meta;
100
- }
101
- useMetaSafe.__type = [
102
- "useMetaSafe",
103
- "Hook to safely access the render context's metadata.",
104
- "PP\"-J/!?\""
105
- ];
106
- /**
107
- * Hook to access the render context's metadata.
108
- *
109
- * @returns The Powerlines context.
110
- */
111
- function useMeta() {
112
- const meta = (useMetaSafe.Ω = [[
113
- () => __ΩRecord,
114
- () => __ΩMetaItem,
115
- "&n\"o!#"
116
- ]], useMetaSafe());
117
- 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`.");
118
- return meta;
119
- }
120
- useMeta.__type = [
121
- "useMeta",
122
- "Hook to access the render context's metadata.",
123
- "P\"/!?\""
124
- ];
125
-
126
- //#endregion
127
- exports.PowerlinesContext = PowerlinesContext;
128
- exports.__ΩMetaItem = __ΩMetaItem;
129
- exports.__ΩPowerlinesContextInterface = __ΩPowerlinesContextInterface;
130
- exports.useMeta = useMeta;
131
- exports.useMetaSafe = useMetaSafe;
132
- exports.usePowerlines = usePowerlines;
133
- exports.usePowerlinesContext = usePowerlinesContext;
134
- exports.usePowerlinesSafe = usePowerlinesSafe;
@@ -1,126 +0,0 @@
1
- import { createNamedContext, useContext } from "@alloy-js/core";
2
-
3
- //#region ../plugin-alloy/src/core/contexts/context.ts
4
- const __ΩRecord = [
5
- "K",
6
- "T",
7
- "Record",
8
- "l'e#\"Rb!b\"Pde\"!N#!w#y"
9
- ];
10
- const __ΩMetaItem = [
11
- "builtin",
12
- "entry",
13
- "kind",
14
- "The kind of metadata item.",
15
- "skipFormat",
16
- "Whether to skip formatting for this output.",
17
- "StoragePreset",
18
- "storage",
19
- "The storage preset or adapter name for the output files.",
20
- "MetaItem",
21
- "PP.!.\"&J4#8?$)4%8?&P\"w'&J4(8?)&\"LMw*y"
22
- ];
23
- const __ΩPowerlinesContextInterface = [
24
- "PluginContext",
25
- "TContext",
26
- () => __ΩRecord,
27
- () => __ΩMetaItem,
28
- "TMeta",
29
- "value",
30
- "The current Powerlines context.",
31
- "meta",
32
- "The current render metadata.",
33
- "PowerlinesContextInterface",
34
- "\"w!c\"&n$o##c%Pe\"!4&?'e\"\"4(?)Mw*y"
35
- ];
36
- /**
37
- * The Powerlines context used in template rendering.
38
- */
39
- const PowerlinesContext = (createNamedContext.Ω = [[() => __ΩPowerlinesContextInterface, "\"\"o!#"]], createNamedContext("powerlines"));
40
- /**
41
- * Hook to access the Powerlines Context.
42
- *
43
- * @returns The Context.
44
- */
45
- function usePowerlinesContext() {
46
- return useContext.Ω = [[
47
- () => __ΩPowerlinesContextInterface,
48
- "PluginContext",
49
- () => __ΩRecord,
50
- () => __ΩMetaItem,
51
- "\"w\"&n$o##o!#"
52
- ]], useContext(PowerlinesContext);
53
- }
54
- usePowerlinesContext.__type = [
55
- () => __ΩPowerlinesContextInterface,
56
- "usePowerlinesContext",
57
- "Hook to access the Powerlines Context.",
58
- "PP\"\"o!#-J/\"?#"
59
- ];
60
- /**
61
- * Hook to safely access the {@link PluginContext | Powerlines context}.
62
- *
63
- * @returns The Powerlines context or undefined if not set.
64
- */
65
- function usePowerlinesSafe() {
66
- return (usePowerlinesContext.Ω = [["PluginContext", "\"w!"]], usePowerlinesContext())?.value;
67
- }
68
- usePowerlinesSafe.__type = [
69
- "usePowerlinesSafe",
70
- "Hook to safely access the {@link PluginContext | Powerlines context}.",
71
- "PP\"-J/!?\""
72
- ];
73
- /**
74
- * Hook to access the {@link PluginContext | Powerlines context}.
75
- *
76
- * @returns The Powerlines context.
77
- */
78
- function usePowerlines() {
79
- const powerlines = (usePowerlinesSafe.Ω = [["PluginContext", "\"w!"]], usePowerlinesSafe());
80
- 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`.");
81
- return powerlines;
82
- }
83
- usePowerlines.__type = [
84
- "usePowerlines",
85
- "Hook to access the {@link PluginContext | Powerlines context}.",
86
- "P\"/!?\""
87
- ];
88
- /**
89
- * Hook to safely access the render context's metadata.
90
- *
91
- * @returns The Powerlines context or undefined if not set.
92
- */
93
- function useMetaSafe() {
94
- return (usePowerlinesContext.Ω = [["PluginContext", "\"w!"], [
95
- () => __ΩRecord,
96
- () => __ΩMetaItem,
97
- "&n\"o!#"
98
- ]], usePowerlinesContext())?.meta;
99
- }
100
- useMetaSafe.__type = [
101
- "useMetaSafe",
102
- "Hook to safely access the render context's metadata.",
103
- "PP\"-J/!?\""
104
- ];
105
- /**
106
- * Hook to access the render context's metadata.
107
- *
108
- * @returns The Powerlines context.
109
- */
110
- function useMeta() {
111
- const meta = (useMetaSafe.Ω = [[
112
- () => __ΩRecord,
113
- () => __ΩMetaItem,
114
- "&n\"o!#"
115
- ]], useMetaSafe());
116
- 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`.");
117
- return meta;
118
- }
119
- useMeta.__type = [
120
- "useMeta",
121
- "Hook to access the render context's metadata.",
122
- "P\"/!?\""
123
- ];
124
-
125
- //#endregion
126
- export { PowerlinesContext, __ΩMetaItem, __ΩPowerlinesContextInterface, 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, __ΩMetaItem, __ΩPowerlinesContextInterface, useMeta, useMetaSafe, usePowerlines, usePowerlinesContext, usePowerlinesSafe } from "./context.mjs";
2
- import { ReflectionClassContext, ReflectionMethodContext, ReflectionParameterContext, ReflectionPropertyContext, __ΩReflectionClassContextInterface, useReflectionClass, useReflectionMethod, useReflectionParameter, useReflectionProperty } from "./reflection.mjs";
3
-
4
- export { };
@@ -1,110 +0,0 @@
1
- const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.cjs');
2
- const require_components = require('../../types/components.cjs');
3
- let __alloy_js_core = require("@alloy-js/core");
4
-
5
- //#region ../plugin-alloy/src/core/contexts/reflection.ts
6
- const __ΩRecord = [
7
- "K",
8
- "T",
9
- "Record",
10
- "l'e#\"Rb!b\"Pde\"!N#!w#y"
11
- ];
12
- const __ΩReflectionClassContextInterface = [
13
- () => __ΩRecord,
14
- "T",
15
- "ReflectionClass",
16
- "reflection",
17
- () => require_components.__ΩReflectionOverrideInterface,
18
- "override",
19
- "ReflectionClassContextInterface",
20
- "&\"o!#c\"P\"w#4$e\"!o%\"4&8Mw'y"
21
- ];
22
- /**
23
- * The reflection class context used in template rendering.
24
- */
25
- const ReflectionClassContext = (__alloy_js_core.createContext.Ω = [[() => __ΩReflectionClassContextInterface, "\"o!\""]], (0, __alloy_js_core.createContext)());
26
- /**
27
- * Hook to access the Reflection context.
28
- *
29
- * @returns A reactive version of the current reflection.
30
- */
31
- function useReflectionClass() {
32
- const context = (__alloy_js_core.useContext.Ω = [[
33
- () => __ΩReflectionClassContextInterface,
34
- () => __ΩRecord,
35
- "&\"o\"#o!\""
36
- ]], (0, __alloy_js_core.useContext)(ReflectionClassContext));
37
- 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`.");
38
- return context;
39
- }
40
- useReflectionClass.__type = [
41
- "useReflectionClass",
42
- "Hook to access the Reflection context.",
43
- "P\"/!?\""
44
- ];
45
- /**
46
- * The reflection property context used in template rendering.
47
- */
48
- const ReflectionPropertyContext = (__alloy_js_core.createNamedContext.Ω = [["ReflectionProperty", "\"w!"]], (0, __alloy_js_core.createNamedContext)("reflection-property"));
49
- /**
50
- * Hook to access the Reflection Property context.
51
- *
52
- * @returns A reactive version of the current reflection.
53
- */
54
- function useReflectionProperty() {
55
- const context = (__alloy_js_core.useContext.Ω = [["ReflectionProperty", "\"w!"]], (0, __alloy_js_core.useContext)(ReflectionPropertyContext));
56
- 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`.");
57
- return context;
58
- }
59
- useReflectionProperty.__type = [
60
- "useReflectionProperty",
61
- "Hook to access the Reflection Property context.",
62
- "P\"/!?\""
63
- ];
64
- /**
65
- * The reflection method context used in template rendering.
66
- */
67
- const ReflectionMethodContext = (__alloy_js_core.createNamedContext.Ω = [["ReflectionMethod", "\"w!"]], (0, __alloy_js_core.createNamedContext)("reflection-method"));
68
- /**
69
- * Hook to access the Reflection Method context.
70
- *
71
- * @returns A reactive version of the current reflection.
72
- */
73
- function useReflectionMethod() {
74
- const context = (__alloy_js_core.useContext.Ω = [["ReflectionMethod", "\"w!"]], (0, __alloy_js_core.useContext)(ReflectionMethodContext));
75
- if (!context) throw new Error("Powerlines - Reflection Method 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`.");
76
- return context;
77
- }
78
- useReflectionMethod.__type = [
79
- "useReflectionMethod",
80
- "Hook to access the Reflection Method context.",
81
- "P\"/!?\""
82
- ];
83
- /**
84
- * The reflection parameter context used in template rendering.
85
- */
86
- const ReflectionParameterContext = (__alloy_js_core.createNamedContext.Ω = [["ReflectionParameter", "\"w!"]], (0, __alloy_js_core.createNamedContext)("reflection-parameter"));
87
- /**
88
- * Hook to access the Reflection Parameter context.
89
- *
90
- * @returns A reactive version of the current reflection.
91
- */
92
- function useReflectionParameter() {
93
- return __alloy_js_core.useContext.Ω = [["ReflectionParameter", "\"w!"]], (0, __alloy_js_core.useContext)(ReflectionParameterContext);
94
- }
95
- useReflectionParameter.__type = [
96
- "useReflectionParameter",
97
- "Hook to access the Reflection Parameter context.",
98
- "P\"/!?\""
99
- ];
100
-
101
- //#endregion
102
- exports.ReflectionClassContext = ReflectionClassContext;
103
- exports.ReflectionMethodContext = ReflectionMethodContext;
104
- exports.ReflectionParameterContext = ReflectionParameterContext;
105
- exports.ReflectionPropertyContext = ReflectionPropertyContext;
106
- exports.__ΩReflectionClassContextInterface = __ΩReflectionClassContextInterface;
107
- exports.useReflectionClass = useReflectionClass;
108
- exports.useReflectionMethod = useReflectionMethod;
109
- exports.useReflectionParameter = useReflectionParameter;
110
- exports.useReflectionProperty = useReflectionProperty;
@@ -1,101 +0,0 @@
1
- import { __ΩReflectionOverrideInterface } from "../../types/components.mjs";
2
- import { createContext, createNamedContext, useContext } from "@alloy-js/core";
3
-
4
- //#region ../plugin-alloy/src/core/contexts/reflection.ts
5
- const __ΩRecord = [
6
- "K",
7
- "T",
8
- "Record",
9
- "l'e#\"Rb!b\"Pde\"!N#!w#y"
10
- ];
11
- const __ΩReflectionClassContextInterface = [
12
- () => __ΩRecord,
13
- "T",
14
- "ReflectionClass",
15
- "reflection",
16
- () => __ΩReflectionOverrideInterface,
17
- "override",
18
- "ReflectionClassContextInterface",
19
- "&\"o!#c\"P\"w#4$e\"!o%\"4&8Mw'y"
20
- ];
21
- /**
22
- * The reflection class context used in template rendering.
23
- */
24
- const ReflectionClassContext = (createContext.Ω = [[() => __ΩReflectionClassContextInterface, "\"o!\""]], createContext());
25
- /**
26
- * Hook to access the Reflection context.
27
- *
28
- * @returns A reactive version of the current reflection.
29
- */
30
- function useReflectionClass() {
31
- const context = (useContext.Ω = [[
32
- () => __ΩReflectionClassContextInterface,
33
- () => __ΩRecord,
34
- "&\"o\"#o!\""
35
- ]], useContext(ReflectionClassContext));
36
- 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`.");
37
- return context;
38
- }
39
- useReflectionClass.__type = [
40
- "useReflectionClass",
41
- "Hook to access the Reflection context.",
42
- "P\"/!?\""
43
- ];
44
- /**
45
- * The reflection property context used in template rendering.
46
- */
47
- const ReflectionPropertyContext = (createNamedContext.Ω = [["ReflectionProperty", "\"w!"]], createNamedContext("reflection-property"));
48
- /**
49
- * Hook to access the Reflection Property context.
50
- *
51
- * @returns A reactive version of the current reflection.
52
- */
53
- function useReflectionProperty() {
54
- const context = (useContext.Ω = [["ReflectionProperty", "\"w!"]], useContext(ReflectionPropertyContext));
55
- 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`.");
56
- return context;
57
- }
58
- useReflectionProperty.__type = [
59
- "useReflectionProperty",
60
- "Hook to access the Reflection Property context.",
61
- "P\"/!?\""
62
- ];
63
- /**
64
- * The reflection method context used in template rendering.
65
- */
66
- const ReflectionMethodContext = (createNamedContext.Ω = [["ReflectionMethod", "\"w!"]], createNamedContext("reflection-method"));
67
- /**
68
- * Hook to access the Reflection Method context.
69
- *
70
- * @returns A reactive version of the current reflection.
71
- */
72
- function useReflectionMethod() {
73
- const context = (useContext.Ω = [["ReflectionMethod", "\"w!"]], useContext(ReflectionMethodContext));
74
- if (!context) throw new Error("Powerlines - Reflection Method 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`.");
75
- return context;
76
- }
77
- useReflectionMethod.__type = [
78
- "useReflectionMethod",
79
- "Hook to access the Reflection Method context.",
80
- "P\"/!?\""
81
- ];
82
- /**
83
- * The reflection parameter context used in template rendering.
84
- */
85
- const ReflectionParameterContext = (createNamedContext.Ω = [["ReflectionParameter", "\"w!"]], createNamedContext("reflection-parameter"));
86
- /**
87
- * Hook to access the Reflection Parameter context.
88
- *
89
- * @returns A reactive version of the current reflection.
90
- */
91
- function useReflectionParameter() {
92
- return useContext.Ω = [["ReflectionParameter", "\"w!"]], useContext(ReflectionParameterContext);
93
- }
94
- useReflectionParameter.__type = [
95
- "useReflectionParameter",
96
- "Hook to access the Reflection Parameter context.",
97
- "P\"/!?\""
98
- ];
99
-
100
- //#endregion
101
- export { ReflectionClassContext, ReflectionMethodContext, ReflectionParameterContext, ReflectionPropertyContext, __ΩReflectionClassContextInterface, useReflectionClass, useReflectionMethod, useReflectionParameter, useReflectionProperty };
@@ -1,23 +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
- refkey.__type = [
15
- "args",
16
- "Refkey",
17
- "refkey",
18
- "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.",
19
- "P#@2!\"w\"/#?$"
20
- ];
21
-
22
- //#endregion
23
- exports.refkey = refkey;
@@ -1,22 +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
- refkey$1.__type = [
14
- "args",
15
- "Refkey",
16
- "refkey",
17
- "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.",
18
- "P#@2!\"w\"/#?$"
19
- ];
20
-
21
- //#endregion
22
- export { refkey$1 as refkey };