@powerlines/plugin-alloy 0.26.133 → 0.26.143

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/dist/core/components/output.cjs +0 -1
  2. package/dist/core/components/single-line-comment.cjs +0 -1
  3. package/dist/core/components/spacing.cjs +0 -1
  4. package/dist/core/contexts/context.cjs +0 -1
  5. package/dist/core/contexts/index.cjs +0 -4
  6. package/dist/core/contexts/index.d.cts +2 -2
  7. package/dist/core/contexts/index.d.mts +2 -2
  8. package/dist/core/contexts/index.mjs +2 -2
  9. package/dist/core/contexts/meta.cjs +0 -1
  10. package/dist/core/contexts/schema.cjs +0 -31
  11. package/dist/core/contexts/schema.d.cts +6 -27
  12. package/dist/core/contexts/schema.d.cts.map +1 -1
  13. package/dist/core/contexts/schema.d.mts +6 -27
  14. package/dist/core/contexts/schema.d.mts.map +1 -1
  15. package/dist/core/contexts/schema.mjs +1 -27
  16. package/dist/core/contexts/schema.mjs.map +1 -1
  17. package/dist/core/helpers/code.cjs +0 -1
  18. package/dist/core/index.cjs +0 -4
  19. package/dist/core/index.d.cts +2 -2
  20. package/dist/core/index.d.mts +2 -2
  21. package/dist/core/index.mjs +2 -2
  22. package/dist/hcl/components/block-declaration.cjs +0 -1
  23. package/dist/hcl/components/hcl-file.cjs +0 -1
  24. package/dist/hcl/components/packer-file.cjs +0 -1
  25. package/dist/hcl/components/terraform-file.cjs +0 -1
  26. package/dist/helpers/create-builtin.cjs +0 -1
  27. package/dist/helpers/refkey.cjs +0 -1
  28. package/dist/helpers/typescript.cjs +0 -1
  29. package/dist/markdown/components/front-matter.cjs +0 -1
  30. package/dist/markdown/components/heading.cjs +0 -1
  31. package/dist/markdown/components/markdown-file.cjs +0 -1
  32. package/dist/markdown/components/markdown-table.cjs +0 -1
  33. package/dist/markdown/contexts/markdown-table.cjs +0 -1
  34. package/dist/render.cjs +0 -1
  35. package/dist/typescript/components/builtin-file.cjs +0 -1
  36. package/dist/typescript/components/class-declaration.cjs +0 -1
  37. package/dist/typescript/components/dynamic-import-statement.cjs +0 -1
  38. package/dist/typescript/components/interface-declaration.cjs +22 -17
  39. package/dist/typescript/components/interface-declaration.d.cts +15 -18
  40. package/dist/typescript/components/interface-declaration.d.cts.map +1 -1
  41. package/dist/typescript/components/interface-declaration.d.mts +15 -18
  42. package/dist/typescript/components/interface-declaration.d.mts.map +1 -1
  43. package/dist/typescript/components/interface-declaration.mjs +23 -17
  44. package/dist/typescript/components/interface-declaration.mjs.map +1 -1
  45. package/dist/typescript/components/object-declaration.cjs +6 -7
  46. package/dist/typescript/components/object-declaration.d.cts +7 -7
  47. package/dist/typescript/components/object-declaration.d.cts.map +1 -1
  48. package/dist/typescript/components/object-declaration.d.mts +7 -7
  49. package/dist/typescript/components/object-declaration.d.mts.map +1 -1
  50. package/dist/typescript/components/object-declaration.mjs +7 -7
  51. package/dist/typescript/components/object-declaration.mjs.map +1 -1
  52. package/dist/typescript/components/property-name.cjs +0 -1
  53. package/dist/typescript/components/record-expression.cjs +0 -1
  54. package/dist/typescript/components/tsdoc-schema.cjs +43 -50
  55. package/dist/typescript/components/tsdoc-schema.d.cts +7 -7
  56. package/dist/typescript/components/tsdoc-schema.d.cts.map +1 -1
  57. package/dist/typescript/components/tsdoc-schema.d.mts +7 -7
  58. package/dist/typescript/components/tsdoc-schema.d.mts.map +1 -1
  59. package/dist/typescript/components/tsdoc-schema.mjs +43 -49
  60. package/dist/typescript/components/tsdoc-schema.mjs.map +1 -1
  61. package/dist/typescript/components/tsdoc.cjs +21 -22
  62. package/dist/typescript/components/tsdoc.d.cts +11 -11
  63. package/dist/typescript/components/tsdoc.d.cts.map +1 -1
  64. package/dist/typescript/components/tsdoc.d.mts +11 -11
  65. package/dist/typescript/components/tsdoc.d.mts.map +1 -1
  66. package/dist/typescript/components/tsdoc.mjs +21 -21
  67. package/dist/typescript/components/tsdoc.mjs.map +1 -1
  68. package/dist/typescript/components/type-declaration.cjs +0 -1
  69. package/dist/typescript/components/type-parameters.cjs +0 -1
  70. package/dist/typescript/components/typescript-file.cjs +0 -1
  71. package/dist/typescript/contexts/lexical-scope.cjs +0 -1
  72. package/dist/typescript/contexts/member-scope.cjs +0 -1
  73. package/dist/typescript/helpers/get-call-signature-props.cjs +0 -1
  74. package/dist/yaml/components/yaml-file.cjs +0 -1
  75. package/package.json +8 -8
@@ -1,5 +1,4 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
3
2
  const require_core_contexts_context = require('../contexts/context.cjs');
4
3
  const require_core_contexts_meta = require('../contexts/meta.cjs');
5
4
  require('../contexts/index.cjs');
@@ -1,5 +1,4 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
3
2
  let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
4
3
  let _alloy_js_core = require("@alloy-js/core");
5
4
 
@@ -1,5 +1,4 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
3
2
  let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
4
3
  let _alloy_js_core = require("@alloy-js/core");
5
4
 
@@ -1,5 +1,4 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
3
2
  let _alloy_js_core = require("@alloy-js/core");
4
3
 
5
4
  //#region src/core/contexts/context.ts
@@ -5,8 +5,6 @@ const require_core_contexts_schema = require('./schema.cjs');
5
5
 
6
6
  exports.MetaContext = require_core_contexts_meta.MetaContext;
7
7
  exports.PowerlinesContext = require_core_contexts_context.PowerlinesContext;
8
- exports.ReflectionMethodContext = require_core_contexts_schema.ReflectionMethodContext;
9
- exports.ReflectionParameterContext = require_core_contexts_schema.ReflectionParameterContext;
10
8
  exports.SchemaContext = require_core_contexts_schema.SchemaContext;
11
9
  exports.SchemaPropertyContext = require_core_contexts_schema.SchemaPropertyContext;
12
10
  exports.useMeta = require_core_contexts_meta.useMeta;
@@ -15,7 +13,5 @@ exports.useMetaSafe = require_core_contexts_meta.useMetaSafe;
15
13
  exports.usePowerlines = require_core_contexts_context.usePowerlines;
16
14
  exports.usePowerlinesContext = require_core_contexts_context.usePowerlinesContext;
17
15
  exports.usePowerlinesSafe = require_core_contexts_context.usePowerlinesSafe;
18
- exports.useReflectionMethod = require_core_contexts_schema.useReflectionMethod;
19
- exports.useReflectionParameter = require_core_contexts_schema.useReflectionParameter;
20
16
  exports.useSchema = require_core_contexts_schema.useSchema;
21
17
  exports.useSchemaProperty = require_core_contexts_schema.useSchemaProperty;
@@ -1,4 +1,4 @@
1
1
  import { PowerlinesContext, usePowerlines, usePowerlinesContext, usePowerlinesSafe } from "./context.cjs";
2
2
  import { MetaContext, MetaItem, useMeta, useMetaContext, useMetaSafe } from "./meta.cjs";
3
- import { ReflectionMethodContext, ReflectionParameterContext, SchemaContext, SchemaPropertyContext, useReflectionMethod, useReflectionParameter, useSchema, useSchemaProperty } from "./schema.cjs";
4
- export { MetaContext, MetaItem, PowerlinesContext, ReflectionMethodContext, ReflectionParameterContext, SchemaContext, SchemaPropertyContext, useMeta, useMetaContext, useMetaSafe, usePowerlines, usePowerlinesContext, usePowerlinesSafe, useReflectionMethod, useReflectionParameter, useSchema, useSchemaProperty };
3
+ import { SchemaContext, SchemaPropertyContext, useSchema, useSchemaProperty } from "./schema.cjs";
4
+ export { MetaContext, MetaItem, PowerlinesContext, SchemaContext, SchemaPropertyContext, useMeta, useMetaContext, useMetaSafe, usePowerlines, usePowerlinesContext, usePowerlinesSafe, useSchema, useSchemaProperty };
@@ -1,4 +1,4 @@
1
1
  import { PowerlinesContext, usePowerlines, usePowerlinesContext, usePowerlinesSafe } from "./context.mjs";
2
2
  import { MetaContext, MetaItem, useMeta, useMetaContext, useMetaSafe } from "./meta.mjs";
3
- import { ReflectionMethodContext, ReflectionParameterContext, SchemaContext, SchemaPropertyContext, useReflectionMethod, useReflectionParameter, useSchema, useSchemaProperty } from "./schema.mjs";
4
- export { MetaContext, MetaItem, PowerlinesContext, ReflectionMethodContext, ReflectionParameterContext, SchemaContext, SchemaPropertyContext, useMeta, useMetaContext, useMetaSafe, usePowerlines, usePowerlinesContext, usePowerlinesSafe, useReflectionMethod, useReflectionParameter, useSchema, useSchemaProperty };
3
+ import { SchemaContext, SchemaPropertyContext, useSchema, useSchemaProperty } from "./schema.mjs";
4
+ export { MetaContext, MetaItem, PowerlinesContext, SchemaContext, SchemaPropertyContext, useMeta, useMetaContext, useMetaSafe, usePowerlines, usePowerlinesContext, usePowerlinesSafe, useSchema, useSchemaProperty };
@@ -1,5 +1,5 @@
1
1
  import { PowerlinesContext, usePowerlines, usePowerlinesContext, usePowerlinesSafe } from "./context.mjs";
2
2
  import { MetaContext, useMeta, useMetaContext, useMetaSafe } from "./meta.mjs";
3
- import { ReflectionMethodContext, ReflectionParameterContext, SchemaContext, SchemaPropertyContext, useReflectionMethod, useReflectionParameter, useSchema, useSchemaProperty } from "./schema.mjs";
3
+ import { SchemaContext, SchemaPropertyContext, useSchema, useSchemaProperty } from "./schema.mjs";
4
4
 
5
- export { MetaContext, PowerlinesContext, ReflectionMethodContext, ReflectionParameterContext, SchemaContext, SchemaPropertyContext, useMeta, useMetaContext, useMetaSafe, usePowerlines, usePowerlinesContext, usePowerlinesSafe, useReflectionMethod, useReflectionParameter, useSchema, useSchemaProperty };
5
+ export { MetaContext, PowerlinesContext, SchemaContext, SchemaPropertyContext, useMeta, useMetaContext, useMetaSafe, usePowerlines, usePowerlinesContext, usePowerlinesSafe, useSchema, useSchemaProperty };
@@ -1,5 +1,4 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
3
2
  let _alloy_js_core = require("@alloy-js/core");
4
3
 
5
4
  //#region src/core/contexts/meta.ts
@@ -1,5 +1,4 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
3
2
  let _alloy_js_core = require("@alloy-js/core");
4
3
 
5
4
  //#region src/core/contexts/schema.ts
@@ -31,39 +30,9 @@ function useSchemaProperty() {
31
30
  if (!context) throw new Error("Powerlines - Schema 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`.");
32
31
  return context;
33
32
  }
34
- /**
35
- * The reflection method context used in template rendering.
36
- */
37
- const ReflectionMethodContext = (0, _alloy_js_core.createNamedContext)("ReflectionMethod");
38
- /**
39
- * Hook to access the Reflection Method context.
40
- *
41
- * @returns A reactive version of the current reflection.
42
- */
43
- function useReflectionMethod() {
44
- const context = (0, _alloy_js_core.useContext)(ReflectionMethodContext);
45
- 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`.");
46
- return context;
47
- }
48
- /**
49
- * The reflection parameter context used in template rendering.
50
- */
51
- const ReflectionParameterContext = (0, _alloy_js_core.createNamedContext)("ReflectionParameter");
52
- /**
53
- * Hook to access the Reflection Parameter context.
54
- *
55
- * @returns A reactive version of the current reflection.
56
- */
57
- function useReflectionParameter() {
58
- return (0, _alloy_js_core.useContext)(ReflectionParameterContext);
59
- }
60
33
 
61
34
  //#endregion
62
- exports.ReflectionMethodContext = ReflectionMethodContext;
63
- exports.ReflectionParameterContext = ReflectionParameterContext;
64
35
  exports.SchemaContext = SchemaContext;
65
36
  exports.SchemaPropertyContext = SchemaPropertyContext;
66
- exports.useReflectionMethod = useReflectionMethod;
67
- exports.useReflectionParameter = useReflectionParameter;
68
37
  exports.useSchema = useSchema;
69
38
  exports.useSchemaProperty = useSchemaProperty;
@@ -1,48 +1,27 @@
1
1
  import { ComponentContext } from "@alloy-js/core";
2
- import { ReflectionMethod, ReflectionParameter } from "@powerlines/deepkit/vendor/type";
3
- import { JTDSchemaType } from "@powerlines/schema";
2
+ import { JsonSchemaLike } from "@powerlines/schema";
4
3
 
5
4
  //#region src/core/contexts/schema.d.ts
6
5
  /**
7
6
  * The reflection class context used in template rendering.
8
7
  */
9
- declare const SchemaContext: ComponentContext<JTDSchemaType>;
8
+ declare const SchemaContext: ComponentContext<JsonSchemaLike>;
10
9
  /**
11
10
  * Hook to access the schema context.
12
11
  *
13
12
  * @returns A reactive version of the current schema.
14
13
  */
15
- declare function useSchema(): JTDSchemaType;
14
+ declare function useSchema(): JsonSchemaLike;
16
15
  /**
17
16
  * The schema property context used in template rendering.
18
17
  */
19
- declare const SchemaPropertyContext: ComponentContext<JTDSchemaType>;
18
+ declare const SchemaPropertyContext: ComponentContext<JsonSchemaLike>;
20
19
  /**
21
20
  * Hook to access the Schema Property context.
22
21
  *
23
22
  * @returns A reactive version of the current schema property.
24
23
  */
25
- declare function useSchemaProperty(): JTDSchemaType;
26
- /**
27
- * The reflection method context used in template rendering.
28
- */
29
- declare const ReflectionMethodContext: ComponentContext<ReflectionMethod>;
30
- /**
31
- * Hook to access the Reflection Method context.
32
- *
33
- * @returns A reactive version of the current reflection.
34
- */
35
- declare function useReflectionMethod(): ReflectionMethod;
36
- /**
37
- * The reflection parameter context used in template rendering.
38
- */
39
- declare const ReflectionParameterContext: ComponentContext<ReflectionParameter>;
40
- /**
41
- * Hook to access the Reflection Parameter context.
42
- *
43
- * @returns A reactive version of the current reflection.
44
- */
45
- declare function useReflectionParameter(): ReflectionParameter;
24
+ declare function useSchemaProperty(): JsonSchemaLike;
46
25
  //#endregion
47
- export { ReflectionMethodContext, ReflectionParameterContext, SchemaContext, SchemaPropertyContext, useReflectionMethod, useReflectionParameter, useSchema, useSchemaProperty };
26
+ export { SchemaContext, SchemaPropertyContext, useSchema, useSchemaProperty };
48
27
  //# sourceMappingURL=schema.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.cts","names":[],"sources":["../../../src/core/contexts/schema.ts"],"mappings":";;;;;;;AA6BA;cAAa,aAAA,EAAe,gBAAgB,CAAC,aAAA;;;AAAa;AAQ1D;;iBAAgB,SAAA,CAAA,GAAS,aAAA;;AAAA;AAezB;cAAa,qBAAA,EAAuB,gBAAgB,CAAC,aAAA;;;AAAa;AAQlE;;iBAAgB,iBAAA,CAAA,GAAiB,aAAA;;AAAA;AAcjC;cAAa,uBAAA,EAAyB,gBAAgB,CAAC,gBAAA;;;AAAgB;AAQvE;;iBAAgB,mBAAA,CAAA,GAAmB,gBAAA;;AAAA;AAenC;cAAa,0BAAA,EAA4B,gBAAgB,CAAC,mBAAA;;;AAAmB;AAQ7E;;iBAAgB,sBAAA,CAAA,GAAsB,mBAAA"}
1
+ {"version":3,"file":"schema.d.cts","names":[],"sources":["../../../src/core/contexts/schema.ts"],"mappings":";;;;;;AAyBA;cAAa,aAAA,EAAe,gBAAgB,CAAC,cAAA;;;AAAc;AAQ3D;;iBAAgB,SAAA,CAAA,GAAS,cAAA;;AAAA;AAezB;cAAa,qBAAA,EAAuB,gBAAgB,CAAC,cAAA;;;AAAc;AAQnE;;iBAAgB,iBAAA,CAAA,GAAiB,cAAA"}
@@ -1,48 +1,27 @@
1
1
  import { ComponentContext } from "@alloy-js/core";
2
- import { ReflectionMethod, ReflectionParameter } from "@powerlines/deepkit/vendor/type";
3
- import { JTDSchemaType } from "@powerlines/schema";
2
+ import { JsonSchemaLike } from "@powerlines/schema";
4
3
 
5
4
  //#region src/core/contexts/schema.d.ts
6
5
  /**
7
6
  * The reflection class context used in template rendering.
8
7
  */
9
- declare const SchemaContext: ComponentContext<JTDSchemaType>;
8
+ declare const SchemaContext: ComponentContext<JsonSchemaLike>;
10
9
  /**
11
10
  * Hook to access the schema context.
12
11
  *
13
12
  * @returns A reactive version of the current schema.
14
13
  */
15
- declare function useSchema(): JTDSchemaType;
14
+ declare function useSchema(): JsonSchemaLike;
16
15
  /**
17
16
  * The schema property context used in template rendering.
18
17
  */
19
- declare const SchemaPropertyContext: ComponentContext<JTDSchemaType>;
18
+ declare const SchemaPropertyContext: ComponentContext<JsonSchemaLike>;
20
19
  /**
21
20
  * Hook to access the Schema Property context.
22
21
  *
23
22
  * @returns A reactive version of the current schema property.
24
23
  */
25
- declare function useSchemaProperty(): JTDSchemaType;
26
- /**
27
- * The reflection method context used in template rendering.
28
- */
29
- declare const ReflectionMethodContext: ComponentContext<ReflectionMethod>;
30
- /**
31
- * Hook to access the Reflection Method context.
32
- *
33
- * @returns A reactive version of the current reflection.
34
- */
35
- declare function useReflectionMethod(): ReflectionMethod;
36
- /**
37
- * The reflection parameter context used in template rendering.
38
- */
39
- declare const ReflectionParameterContext: ComponentContext<ReflectionParameter>;
40
- /**
41
- * Hook to access the Reflection Parameter context.
42
- *
43
- * @returns A reactive version of the current reflection.
44
- */
45
- declare function useReflectionParameter(): ReflectionParameter;
24
+ declare function useSchemaProperty(): JsonSchemaLike;
46
25
  //#endregion
47
- export { ReflectionMethodContext, ReflectionParameterContext, SchemaContext, SchemaPropertyContext, useReflectionMethod, useReflectionParameter, useSchema, useSchemaProperty };
26
+ export { SchemaContext, SchemaPropertyContext, useSchema, useSchemaProperty };
48
27
  //# sourceMappingURL=schema.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.mts","names":[],"sources":["../../../src/core/contexts/schema.ts"],"mappings":";;;;;;;AA6BA;cAAa,aAAA,EAAe,gBAAgB,CAAC,aAAA;;;AAAa;AAQ1D;;iBAAgB,SAAA,CAAA,GAAS,aAAA;;AAAA;AAezB;cAAa,qBAAA,EAAuB,gBAAgB,CAAC,aAAA;;;AAAa;AAQlE;;iBAAgB,iBAAA,CAAA,GAAiB,aAAA;;AAAA;AAcjC;cAAa,uBAAA,EAAyB,gBAAgB,CAAC,gBAAA;;;AAAgB;AAQvE;;iBAAgB,mBAAA,CAAA,GAAmB,gBAAA;;AAAA;AAenC;cAAa,0BAAA,EAA4B,gBAAgB,CAAC,mBAAA;;;AAAmB;AAQ7E;;iBAAgB,sBAAA,CAAA,GAAsB,mBAAA"}
1
+ {"version":3,"file":"schema.d.mts","names":[],"sources":["../../../src/core/contexts/schema.ts"],"mappings":";;;;;;AAyBA;cAAa,aAAA,EAAe,gBAAgB,CAAC,cAAA;;;AAAc;AAQ3D;;iBAAgB,SAAA,CAAA,GAAS,cAAA;;AAAA;AAezB;cAAa,qBAAA,EAAuB,gBAAgB,CAAC,cAAA;;;AAAc;AAQnE;;iBAAgB,iBAAA,CAAA,GAAiB,cAAA"}
@@ -29,33 +29,7 @@ function useSchemaProperty() {
29
29
  if (!context) throw new Error("Powerlines - Schema 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
30
  return context;
31
31
  }
32
- /**
33
- * The reflection method context used in template rendering.
34
- */
35
- const ReflectionMethodContext = createNamedContext("ReflectionMethod");
36
- /**
37
- * Hook to access the Reflection Method context.
38
- *
39
- * @returns A reactive version of the current reflection.
40
- */
41
- function useReflectionMethod() {
42
- const context = useContext(ReflectionMethodContext);
43
- 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`.");
44
- return context;
45
- }
46
- /**
47
- * The reflection parameter context used in template rendering.
48
- */
49
- const ReflectionParameterContext = createNamedContext("ReflectionParameter");
50
- /**
51
- * Hook to access the Reflection Parameter context.
52
- *
53
- * @returns A reactive version of the current reflection.
54
- */
55
- function useReflectionParameter() {
56
- return useContext(ReflectionParameterContext);
57
- }
58
32
 
59
33
  //#endregion
60
- export { ReflectionMethodContext, ReflectionParameterContext, SchemaContext, SchemaPropertyContext, useReflectionMethod, useReflectionParameter, useSchema, useSchemaProperty };
34
+ export { SchemaContext, SchemaPropertyContext, useSchema, useSchemaProperty };
61
35
  //# sourceMappingURL=schema.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"schema.mjs","names":[],"sources":["../../../src/core/contexts/schema.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport type { ComponentContext } from \"@alloy-js/core\";\nimport { createContext, createNamedContext, useContext } from \"@alloy-js/core\";\nimport type {\n ReflectionMethod,\n ReflectionParameter\n} from \"@powerlines/deepkit/vendor/type\";\nimport { JTDSchemaType } from \"@powerlines/schema\";\n\n/**\n * The reflection class context used in template rendering.\n */\nexport const SchemaContext: ComponentContext<JTDSchemaType> =\n createContext<JTDSchemaType>();\n\n/**\n * Hook to access the schema context.\n *\n * @returns A reactive version of the current schema.\n */\nexport function useSchema() {\n const context = useContext<JTDSchemaType>(SchemaContext)!;\n\n if (!context) {\n throw new Error(\n \"Powerlines - Schema 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`.\"\n );\n }\n\n return context;\n}\n\n/**\n * The schema property context used in template rendering.\n */\nexport const SchemaPropertyContext: ComponentContext<JTDSchemaType> =\n createNamedContext<JTDSchemaType>(\"SchemaProperty\");\n\n/**\n * Hook to access the Schema Property context.\n *\n * @returns A reactive version of the current schema property.\n */\nexport function useSchemaProperty() {\n const context = useContext<JTDSchemaType>(SchemaPropertyContext)!;\n if (!context) {\n throw new Error(\n \"Powerlines - Schema 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`.\"\n );\n }\n\n return context;\n}\n\n/**\n * The reflection method context used in template rendering.\n */\nexport const ReflectionMethodContext: ComponentContext<ReflectionMethod> =\n createNamedContext<ReflectionMethod>(\"ReflectionMethod\");\n\n/**\n * Hook to access the Reflection Method context.\n *\n * @returns A reactive version of the current reflection.\n */\nexport function useReflectionMethod() {\n const context = useContext<ReflectionMethod>(ReflectionMethodContext)!;\n\n if (!context) {\n throw new Error(\n \"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`.\"\n );\n }\n\n return context;\n}\n\n/**\n * The reflection parameter context used in template rendering.\n */\nexport const ReflectionParameterContext: ComponentContext<ReflectionParameter> =\n createNamedContext<ReflectionParameter>(\"ReflectionParameter\");\n\n/**\n * Hook to access the Reflection Parameter context.\n *\n * @returns A reactive version of the current reflection.\n */\nexport function useReflectionParameter() {\n return useContext<ReflectionParameter>(ReflectionParameterContext)!;\n}\n"],"mappings":";;;;;;AAwBA,MAAS,gBAAoB,cAAc;;;;;;;CAQzC,MAAA,UAAA,WAAA,aAAA;CACA,IAAC,CAAI,SACN,MAAA,IAAA,MAAA,4LAAA;CAEC,OAAA;AACF;;;;AAKA,MAAO,wBAA8B,mBAAiB,gBAAc;;;;;;AAOpE,SAAE,oBAAA;CACA,MAAK,UAAO,WAAS,qBAAyB;CAC9C,IAAA,CAAA,SACF,MAAO,IAAM,MAAA,qMAAuD;;AAGpE;;;;AAKA,MAAO,0BAA6B,mBAAA,kBAAA;;;;;;;CAQlC,MAAM,UAAQ,WAAA,uBAAA;CAChB,IAAA,CAAA;CAGE,OAAK;AACP;;;;AAKA,MAAW,6BAA6B,mBAAO,qBAAA;;;;;;AAO/C,SAAgB,yBAAA;CACd,OAAO,WAAU,0BAAA;AACnB"}
1
+ {"version":3,"file":"schema.mjs","names":[],"sources":["../../../src/core/contexts/schema.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport type { ComponentContext } from \"@alloy-js/core\";\nimport { createContext, createNamedContext, useContext } from \"@alloy-js/core\";\nimport { JsonSchemaLike } from \"@powerlines/schema\";\n\n/**\n * The reflection class context used in template rendering.\n */\nexport const SchemaContext: ComponentContext<JsonSchemaLike> =\n createContext<JsonSchemaLike>();\n\n/**\n * Hook to access the schema context.\n *\n * @returns A reactive version of the current schema.\n */\nexport function useSchema() {\n const context = useContext<JsonSchemaLike>(SchemaContext)!;\n\n if (!context) {\n throw new Error(\n \"Powerlines - Schema 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`.\"\n );\n }\n\n return context;\n}\n\n/**\n * The schema property context used in template rendering.\n */\nexport const SchemaPropertyContext: ComponentContext<JsonSchemaLike> =\n createNamedContext<JsonSchemaLike>(\"SchemaProperty\");\n\n/**\n * Hook to access the Schema Property context.\n *\n * @returns A reactive version of the current schema property.\n */\nexport function useSchemaProperty() {\n const context = useContext<JsonSchemaLike>(SchemaPropertyContext)!;\n if (!context) {\n throw new Error(\n \"Powerlines - Schema 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`.\"\n );\n }\n\n return context;\n}\n\n// /**\n// * The reflection method context used in template rendering.\n// */\n// export const ReflectionMethodContext: ComponentContext<ReflectionMethod> =\n// createNamedContext<ReflectionMethod>(\"ReflectionMethod\");\n\n// /**\n// * Hook to access the Reflection Method context.\n// *\n// * @returns A reactive version of the current reflection.\n// */\n// export function useReflectionMethod() {\n// const context = useContext<ReflectionMethod>(ReflectionMethodContext)!;\n\n// if (!context) {\n// throw new Error(\n// \"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`.\"\n// );\n// }\n\n// return context;\n// }\n\n// /**\n// * The reflection parameter context used in template rendering.\n// */\n// export const ReflectionParameterContext: ComponentContext<ReflectionParameter> =\n// createNamedContext<ReflectionParameter>(\"ReflectionParameter\");\n\n// /**\n// * Hook to access the Reflection Parameter context.\n// *\n// * @returns A reactive version of the current reflection.\n// */\n// export function useReflectionParameter() {\n// return useContext<ReflectionParameter>(ReflectionParameterContext)!;\n// }\n"],"mappings":";;;;;;AAwBA,MAAE,gBAAA,cAAA;;;;;;AAOF,SAAc,YAAS;CACrB,MAAA,UAAA,WAAA,aAAA;CACF,IAAM,CAAC,SACL,MAAM,IAAA,MAAU,4LAA0C;CAE1D,OAAK;AACP;;;;AAKA,MAAS,wBAAO,mBAAA,gBAAA;;;;;;AAOhB,SAAE,oBAAkC;;CAElC,IAAA,CAAA,SACC,MAAO,IAAC,MAAO,qMAA2B;CAE3C,OAAE;AACJ"}
@@ -1,5 +1,4 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
3
2
  let _alloy_js_core = require("@alloy-js/core");
4
3
 
5
4
  //#region src/core/helpers/code.ts
@@ -16,8 +16,6 @@ exports.InfrastructureFile = require_core_components_infrastructure_file.Infrast
16
16
  exports.MetaContext = require_core_contexts_meta.MetaContext;
17
17
  exports.Output = require_core_components_output.Output;
18
18
  exports.PowerlinesContext = require_core_contexts_context.PowerlinesContext;
19
- exports.ReflectionMethodContext = require_core_contexts_schema.ReflectionMethodContext;
20
- exports.ReflectionParameterContext = require_core_contexts_schema.ReflectionParameterContext;
21
19
  exports.SchemaContext = require_core_contexts_schema.SchemaContext;
22
20
  exports.SchemaPropertyContext = require_core_contexts_schema.SchemaPropertyContext;
23
21
  exports.SingleLineComment = require_core_components_single_line_comment.SingleLineComment;
@@ -30,7 +28,5 @@ exports.useMetaSafe = require_core_contexts_meta.useMetaSafe;
30
28
  exports.usePowerlines = require_core_contexts_context.usePowerlines;
31
29
  exports.usePowerlinesContext = require_core_contexts_context.usePowerlinesContext;
32
30
  exports.usePowerlinesSafe = require_core_contexts_context.usePowerlinesSafe;
33
- exports.useReflectionMethod = require_core_contexts_schema.useReflectionMethod;
34
- exports.useReflectionParameter = require_core_contexts_schema.useReflectionParameter;
35
31
  exports.useSchema = require_core_contexts_schema.useSchema;
36
32
  exports.useSchemaProperty = require_core_contexts_schema.useSchemaProperty;
@@ -2,9 +2,9 @@ import { SourceFile, SourceFileProps } from "./components/source-file.cjs";
2
2
  import { InfrastructureFile, InfrastructureFileProps } from "./components/infrastructure-file.cjs";
3
3
  import { PowerlinesContext, usePowerlines, usePowerlinesContext, usePowerlinesSafe } from "./contexts/context.cjs";
4
4
  import { MetaContext, MetaItem, useMeta, useMetaContext, useMetaSafe } from "./contexts/meta.cjs";
5
- import { ReflectionMethodContext, ReflectionParameterContext, SchemaContext, SchemaPropertyContext, useReflectionMethod, useReflectionParameter, useSchema, useSchemaProperty } from "./contexts/schema.cjs";
5
+ import { SchemaContext, SchemaPropertyContext, useSchema, useSchemaProperty } from "./contexts/schema.cjs";
6
6
  import { Output, OutputProps } from "./components/output.cjs";
7
7
  import { SingleLineComment, SingleLineCommentProps, SingleLineCommentVariant } from "./components/single-line-comment.cjs";
8
8
  import { Spacing, SpacingProps } from "./components/spacing.cjs";
9
9
  import { code } from "./helpers/code.cjs";
10
- export { InfrastructureFile, InfrastructureFileProps, MetaContext, MetaItem, Output, OutputProps, PowerlinesContext, ReflectionMethodContext, ReflectionParameterContext, SchemaContext, SchemaPropertyContext, SingleLineComment, SingleLineCommentProps, SingleLineCommentVariant, SourceFile, SourceFileProps, Spacing, SpacingProps, code, useMeta, useMetaContext, useMetaSafe, usePowerlines, usePowerlinesContext, usePowerlinesSafe, useReflectionMethod, useReflectionParameter, useSchema, useSchemaProperty };
10
+ export { InfrastructureFile, InfrastructureFileProps, MetaContext, MetaItem, Output, OutputProps, PowerlinesContext, SchemaContext, SchemaPropertyContext, SingleLineComment, SingleLineCommentProps, SingleLineCommentVariant, SourceFile, SourceFileProps, Spacing, SpacingProps, code, useMeta, useMetaContext, useMetaSafe, usePowerlines, usePowerlinesContext, usePowerlinesSafe, useSchema, useSchemaProperty };
@@ -2,9 +2,9 @@ import { SourceFile, SourceFileProps } from "./components/source-file.mjs";
2
2
  import { InfrastructureFile, InfrastructureFileProps } from "./components/infrastructure-file.mjs";
3
3
  import { PowerlinesContext, usePowerlines, usePowerlinesContext, usePowerlinesSafe } from "./contexts/context.mjs";
4
4
  import { MetaContext, MetaItem, useMeta, useMetaContext, useMetaSafe } from "./contexts/meta.mjs";
5
- import { ReflectionMethodContext, ReflectionParameterContext, SchemaContext, SchemaPropertyContext, useReflectionMethod, useReflectionParameter, useSchema, useSchemaProperty } from "./contexts/schema.mjs";
5
+ import { SchemaContext, SchemaPropertyContext, useSchema, useSchemaProperty } from "./contexts/schema.mjs";
6
6
  import { Output, OutputProps } from "./components/output.mjs";
7
7
  import { SingleLineComment, SingleLineCommentProps, SingleLineCommentVariant } from "./components/single-line-comment.mjs";
8
8
  import { Spacing, SpacingProps } from "./components/spacing.mjs";
9
9
  import { code } from "./helpers/code.mjs";
10
- export { InfrastructureFile, InfrastructureFileProps, MetaContext, MetaItem, Output, OutputProps, PowerlinesContext, ReflectionMethodContext, ReflectionParameterContext, SchemaContext, SchemaPropertyContext, SingleLineComment, SingleLineCommentProps, SingleLineCommentVariant, SourceFile, SourceFileProps, Spacing, SpacingProps, code, useMeta, useMetaContext, useMetaSafe, usePowerlines, usePowerlinesContext, usePowerlinesSafe, useReflectionMethod, useReflectionParameter, useSchema, useSchemaProperty };
10
+ export { InfrastructureFile, InfrastructureFileProps, MetaContext, MetaItem, Output, OutputProps, PowerlinesContext, SchemaContext, SchemaPropertyContext, SingleLineComment, SingleLineCommentProps, SingleLineCommentVariant, SourceFile, SourceFileProps, Spacing, SpacingProps, code, useMeta, useMetaContext, useMetaSafe, usePowerlines, usePowerlinesContext, usePowerlinesSafe, useSchema, useSchemaProperty };
@@ -2,7 +2,7 @@ import { PowerlinesContext, usePowerlines, usePowerlinesContext, usePowerlinesSa
2
2
  import { MetaContext, useMeta, useMetaContext, useMetaSafe } from "./contexts/meta.mjs";
3
3
  import { SourceFile } from "./components/source-file.mjs";
4
4
  import { InfrastructureFile } from "./components/infrastructure-file.mjs";
5
- import { ReflectionMethodContext, ReflectionParameterContext, SchemaContext, SchemaPropertyContext, useReflectionMethod, useReflectionParameter, useSchema, useSchemaProperty } from "./contexts/schema.mjs";
5
+ import { SchemaContext, SchemaPropertyContext, useSchema, useSchemaProperty } from "./contexts/schema.mjs";
6
6
  import "./contexts/index.mjs";
7
7
  import { Output } from "./components/output.mjs";
8
8
  import { SingleLineComment } from "./components/single-line-comment.mjs";
@@ -11,4 +11,4 @@ import "./components/index.mjs";
11
11
  import { code } from "./helpers/code.mjs";
12
12
  import "./helpers/index.mjs";
13
13
 
14
- export { InfrastructureFile, MetaContext, Output, PowerlinesContext, ReflectionMethodContext, ReflectionParameterContext, SchemaContext, SchemaPropertyContext, SingleLineComment, SourceFile, Spacing, code, useMeta, useMetaContext, useMetaSafe, usePowerlines, usePowerlinesContext, usePowerlinesSafe, useReflectionMethod, useReflectionParameter, useSchema, useSchemaProperty };
14
+ export { InfrastructureFile, MetaContext, Output, PowerlinesContext, SchemaContext, SchemaPropertyContext, SingleLineComment, SourceFile, Spacing, code, useMeta, useMetaContext, useMetaSafe, usePowerlines, usePowerlinesContext, usePowerlinesSafe, useSchema, useSchemaProperty };
@@ -1,5 +1,4 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
3
2
  const require_core_helpers_code = require('../../core/helpers/code.cjs');
4
3
  let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
5
4
  let _alloy_js_core = require("@alloy-js/core");
@@ -1,5 +1,4 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
3
2
  const require_core_contexts_context = require('../../core/contexts/context.cjs');
4
3
  const require_core_components_infrastructure_file = require('../../core/components/infrastructure-file.cjs');
5
4
  const require_core_components_single_line_comment = require('../../core/components/single-line-comment.cjs');
@@ -1,5 +1,4 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
3
2
  const require_hcl_components_hcl_file = require('./hcl-file.cjs');
4
3
  let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
5
4
  let _alloy_js_core = require("@alloy-js/core");
@@ -1,5 +1,4 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
3
2
  const require_hcl_components_hcl_file = require('./hcl-file.cjs');
4
3
  let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
5
4
  let _alloy_js_core = require("@alloy-js/core");
@@ -1,5 +1,4 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
3
2
  let _alloy_js_typescript = require("@alloy-js/typescript");
4
3
 
5
4
  //#region src/helpers/create-builtin.ts
@@ -1,5 +1,4 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
3
2
  let _alloy_js_core = require("@alloy-js/core");
4
3
 
5
4
  //#region src/helpers/refkey.ts
@@ -1,5 +1,4 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
3
2
  let _stryke_string_format_title_case = require("@stryke/string-format/title-case");
4
3
  let _powerlines_deepkit_utilities = require("@powerlines/deepkit/utilities");
5
4
  let _stryke_string_format_camel_case = require("@stryke/string-format/camel-case");
@@ -1,5 +1,4 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
3
2
  let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
4
3
  let _alloy_js_core = require("@alloy-js/core");
5
4
 
@@ -1,5 +1,4 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
3
2
  const require_core_components_spacing = require('../../core/components/spacing.cjs');
4
3
  let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
5
4
  let _alloy_js_markdown = require("@alloy-js/markdown");
@@ -1,5 +1,4 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
3
2
  const require_core_contexts_context = require('../../core/contexts/context.cjs');
4
3
  const require_core_components_source_file = require('../../core/components/source-file.cjs');
5
4
  const require_core_components_single_line_comment = require('../../core/components/single-line-comment.cjs');
@@ -1,5 +1,4 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
3
2
  const require_markdown_contexts_markdown_table = require('../contexts/markdown-table.cjs');
4
3
  let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
5
4
  let _alloy_js_core = require("@alloy-js/core");
@@ -1,5 +1,4 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
3
2
  let _alloy_js_core = require("@alloy-js/core");
4
3
 
5
4
  //#region src/markdown/contexts/markdown-table.ts
package/dist/render.cjs CHANGED
@@ -1,5 +1,4 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
3
2
  const require_core_components_output = require('./core/components/output.cjs');
4
3
  require('./core/index.cjs');
5
4
  let _stryke_path_file_path_fns = require("@stryke/path/file-path-fns");
@@ -1,5 +1,4 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
3
2
  const require_core_contexts_context = require('../../core/contexts/context.cjs');
4
3
  const require_typescript_components_tsdoc = require('./tsdoc.cjs');
5
4
  const require_typescript_components_typescript_file = require('./typescript-file.cjs');
@@ -1,5 +1,4 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
3
2
  const require_typescript_components_tsdoc = require('./tsdoc.cjs');
4
3
  const require_typescript_contexts_lexical_scope = require('../contexts/lexical-scope.cjs');
5
4
  require('../contexts/index.cjs');
@@ -1,5 +1,4 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
3
2
  let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
4
3
  let _alloy_js_core = require("@alloy-js/core");
5
4
  let _alloy_js_typescript = require("@alloy-js/typescript");
@@ -1,5 +1,4 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
3
2
  const require_core_contexts_schema = require('../../core/contexts/schema.cjs');
4
3
  const require_typescript_components_tsdoc = require('./tsdoc.cjs');
5
4
  const require_typescript_contexts_member_scope = require('../contexts/member-scope.cjs');
@@ -44,7 +43,7 @@ const InterfaceExpression = (0, _alloy_js_typescript.ensureTypeRefContext)(funct
44
43
  */
45
44
  function InterfaceMember(props) {
46
45
  const type = props.schema ? (0, _powerlines_schema.stringifyType)(props.schema) : props.type ?? props.children;
47
- const readonly = props.schema && props.schema?.metadata?.isReadonly || !props.schema && props.isReadonly ? "readonly " : "";
46
+ const readonly = props.schema && props.schema?.readOnly || !props.schema && props.readOnly ? "readonly " : "";
48
47
  if ("indexer" in props) return [
49
48
  (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
50
49
  get when() {
@@ -62,9 +61,9 @@ function InterfaceMember(props) {
62
61
  "]: ",
63
62
  type
64
63
  ];
65
- const optional = !!(props.schema && props.schema?.nullable) || !!(!props.schema && props.optional);
64
+ const optional = !!(props.schema && "nullable" in props.schema && props.schema.nullable) || !!props.nullish;
66
65
  const scope = (0, _alloy_js_typescript.useTSMemberScope)();
67
- const sym = (0, _alloy_js_core.createSymbol)(_alloy_js_typescript.TSOutputSymbol, String((props.schema ? props.schema.metadata?.name || props.schema.metadata?.resourceId : (0, _stryke_type_checks_is_set_string.isSetString)(props.name) ? props.name : props.name.toString()) || (0, _stryke_unique_id_uuid.uuid)().replace(/-/g, "")), scope.ownerSymbol.staticMembers, {
66
+ const sym = (0, _alloy_js_core.createSymbol)(_alloy_js_typescript.TSOutputSymbol, ((props.schema ? props.schema?.name : void 0) || (0, _stryke_type_checks_is_set_string.isSetString)(props.name) ? props.name : props.name.toString()) || (0, _stryke_unique_id_uuid.uuid)().replace(/-/g, ""), scope.ownerSymbol.staticMembers, {
68
67
  refkeys: props.refkey,
69
68
  tsFlags: _alloy_js_typescript.TSSymbolFlags.TypeSymbol | (optional ? _alloy_js_typescript.TSSymbolFlags.Nullish : _alloy_js_typescript.TSSymbolFlags.None),
70
69
  namePolicy: (0, _alloy_js_typescript.useTSNamePolicy)().for("interface-member"),
@@ -159,16 +158,25 @@ function InterfaceDeclaration(props) {
159
158
  "schema",
160
159
  "doc"
161
160
  ]);
162
- const interfaceName = (0, _alloy_js_core.computed)(() => (0, _stryke_string_format_pascal_case.pascalCase)((0, _stryke_type_checks_is_set_string.isSetString)(name) ? name : schema?.metadata?.name || schema?.metadata?.title || ""));
163
- const properties = (0, _alloy_js_core.computed)(() => schema ? Object.values((0, _powerlines_schema.getProperties)(schema)).filter((property) => !property.metadata?.isIgnored).sort((a, b) => a.metadata?.isReadonly && b.metadata?.isReadonly || !a.metadata?.isReadonly && !b.metadata?.isReadonly ? a.name.localeCompare(b.name) : a.metadata?.isReadonly ? 1 : -1) : []);
161
+ const interfaceName = (0, _alloy_js_core.computed)(() => (0, _stryke_string_format_pascal_case.pascalCase)((0, _stryke_type_checks_is_set_string.isSetString)(name) ? name : schema?.name || schema?.title || ""));
162
+ const properties = (0, _alloy_js_core.computed)(() => schema ? (0, _powerlines_schema.getPropertiesList)(schema).filter((property) => !property?.ignore).sort((a, b) => a?.readOnly && b?.readOnly || !a?.readOnly && !b?.readOnly ? !a.name && !b.name ? 0 : !a.name ? -1 : !b.name ? 1 : a.name.localeCompare(b.name) : a?.readOnly ? 1 : -1) : []);
164
163
  return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
165
164
  get when() {
166
165
  return schema && properties.value.length > 0;
167
166
  },
168
167
  get fallback() {
169
- return (0, _alloy_js_core_jsx_runtime.createComponent)(BaseInterfaceDeclaration, (0, _alloy_js_core_jsx_runtime.mergeProps)(props, { get name() {
170
- return interfaceName.value;
171
- } }));
168
+ return (0, _alloy_js_core_jsx_runtime.createComponent)(BaseInterfaceDeclaration, (0, _alloy_js_core_jsx_runtime.mergeProps)(props, {
169
+ get schema() {
170
+ return {
171
+ type: "object",
172
+ name: interfaceName.value,
173
+ properties: {}
174
+ };
175
+ },
176
+ get name() {
177
+ return interfaceName.value;
178
+ }
179
+ }));
172
180
  },
173
181
  get children() {
174
182
  return (0, _alloy_js_core_jsx_runtime.createComponent)(require_core_contexts_schema.SchemaContext.Provider, {
@@ -200,7 +208,7 @@ function InterfaceDeclaration(props) {
200
208
  */
201
209
  function InterfaceDeclarationProperty(props) {
202
210
  const [{ schema }, rest] = (0, _alloy_js_core.splitProps)(props, ["schema"]);
203
- const name = (0, _alloy_js_core.computed)(() => schema.metadata?.name || (0, _stryke_string_format_camel_case.camelCase)(schema.metadata?.title || schema.metadata?.resourceId));
211
+ const name = (0, _alloy_js_core.computed)(() => schema?.name || (0, _stryke_string_format_camel_case.camelCase)(schema?.title || schema?.databaseSchemaName || schema?.$id));
204
212
  return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
205
213
  get when() {
206
214
  return (0, _stryke_type_checks_is_set_string.isSetString)(name.value);
@@ -213,17 +221,14 @@ function InterfaceDeclarationProperty(props) {
213
221
  get name() {
214
222
  return name.value;
215
223
  },
216
- get isReadonly() {
217
- return schema.metadata?.isReadonly;
218
- },
219
- get optional() {
220
- return !!schema.metadata?.isOptional;
224
+ get readOnly() {
225
+ return schema?.readOnly;
221
226
  },
222
227
  get nullish() {
223
- return !!schema?.nullable;
228
+ return schema?.nullable || (0, _powerlines_schema.isSchemaNullable)(schema);
224
229
  },
225
230
  get type() {
226
- return schema.type;
231
+ return (0, _powerlines_schema.getPrimarySchemaType)(schema);
227
232
  }
228
233
  }, rest))];
229
234
  }