@powerduck/schema-designer 0.1.0

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 (102) hide show
  1. package/README.md +217 -0
  2. package/dist/InlineSchemaEditor-BssSx3SI.d.ts +6 -0
  3. package/dist/InlineSchemaEditor-Bua-lDhE.d.cts +6 -0
  4. package/dist/chunk-2XUQB6BQ.js +1896 -0
  5. package/dist/chunk-4H3LXOL4.cjs +1900 -0
  6. package/dist/chunk-7LG4MVMD.cjs +2 -0
  7. package/dist/chunk-BXFABOMJ.js +1475 -0
  8. package/dist/chunk-FTALJIVZ.js +1 -0
  9. package/dist/chunk-GTZH37JS.cjs +1120 -0
  10. package/dist/chunk-GWHDTTQK.js +1437 -0
  11. package/dist/chunk-GXXD6ITE.cjs +1477 -0
  12. package/dist/chunk-HI5FBHCO.js +1057 -0
  13. package/dist/chunk-KX3LFFOV.js +88 -0
  14. package/dist/chunk-MADPN2PJ.js +185 -0
  15. package/dist/chunk-NOUORNCI.cjs +1452 -0
  16. package/dist/chunk-O6PTRJQ5.js +1195 -0
  17. package/dist/chunk-OBHJC3I2.cjs +2 -0
  18. package/dist/chunk-OOSNM45O.cjs +264 -0
  19. package/dist/chunk-P5B3HSPY.js +244 -0
  20. package/dist/chunk-PBE36BVA.js +1 -0
  21. package/dist/chunk-PVEYKCM6.js +1 -0
  22. package/dist/chunk-QZADGAP3.cjs +1218 -0
  23. package/dist/chunk-S7GNTGEE.js +1 -0
  24. package/dist/chunk-SMBDRWV2.cjs +2 -0
  25. package/dist/chunk-THYDOHOP.cjs +2 -0
  26. package/dist/chunk-WRHWOMZQ.cjs +190 -0
  27. package/dist/chunk-YNKP5JJA.cjs +32 -0
  28. package/dist/chunk-YWDKCX6N.cjs +91 -0
  29. package/dist/chunk-ZHNYNFGL.js +28 -0
  30. package/dist/compat/inline.cjs +137 -0
  31. package/dist/compat/inline.css +275 -0
  32. package/dist/compat/inline.d.cts +6 -0
  33. package/dist/compat/inline.d.ts +6 -0
  34. package/dist/compat/inline.js +4 -0
  35. package/dist/compat/parameters.cjs +90 -0
  36. package/dist/compat/parameters.css +997 -0
  37. package/dist/compat/parameters.d.cts +70 -0
  38. package/dist/compat/parameters.d.ts +70 -0
  39. package/dist/compat/parameters.js +9 -0
  40. package/dist/compat/tree.cjs +142 -0
  41. package/dist/compat/tree.css +1069 -0
  42. package/dist/compat/tree.d.cts +4 -0
  43. package/dist/compat/tree.d.ts +4 -0
  44. package/dist/compat/tree.js +5 -0
  45. package/dist/compat/variable-editor.cjs +82 -0
  46. package/dist/compat/variable-editor.d.cts +68 -0
  47. package/dist/compat/variable-editor.d.ts +68 -0
  48. package/dist/compat/variable-editor.js +1 -0
  49. package/dist/core/index.cjs +197 -0
  50. package/dist/core/index.d.cts +21 -0
  51. package/dist/core/index.d.ts +21 -0
  52. package/dist/core/index.js +4 -0
  53. package/dist/index.cjs +35 -0
  54. package/dist/index.css +1791 -0
  55. package/dist/index.d.cts +9 -0
  56. package/dist/index.d.ts +9 -0
  57. package/dist/index.js +10 -0
  58. package/dist/parameterValue-2pL9n-3q.d.ts +8 -0
  59. package/dist/parameterValue-Cky9Lnd3.d.cts +8 -0
  60. package/dist/react/index.cjs +35 -0
  61. package/dist/react/index.css +1791 -0
  62. package/dist/react/index.d.cts +9 -0
  63. package/dist/react/index.d.ts +9 -0
  64. package/dist/react/index.js +10 -0
  65. package/dist/react/inlineSchemaEditor/index.cjs +97 -0
  66. package/dist/react/inlineSchemaEditor/index.css +275 -0
  67. package/dist/react/inlineSchemaEditor/index.d.cts +6 -0
  68. package/dist/react/inlineSchemaEditor/index.d.ts +6 -0
  69. package/dist/react/inlineSchemaEditor/index.js +4 -0
  70. package/dist/react/parametersTable/index.cjs +22 -0
  71. package/dist/react/parametersTable/index.css +997 -0
  72. package/dist/react/parametersTable/index.d.cts +7 -0
  73. package/dist/react/parametersTable/index.d.ts +7 -0
  74. package/dist/react/parametersTable/index.js +9 -0
  75. package/dist/react/parametersTable/libs/generateValue.cjs +558 -0
  76. package/dist/react/parametersTable/libs/generateValue.d.cts +17 -0
  77. package/dist/react/parametersTable/libs/generateValue.d.ts +17 -0
  78. package/dist/react/parametersTable/libs/generateValue.js +551 -0
  79. package/dist/react/schemaTreeEditor/index.cjs +18 -0
  80. package/dist/react/schemaTreeEditor/index.css +1069 -0
  81. package/dist/react/schemaTreeEditor/index.d.cts +7 -0
  82. package/dist/react/schemaTreeEditor/index.d.ts +7 -0
  83. package/dist/react/schemaTreeEditor/index.js +5 -0
  84. package/dist/react/variableTextEditor/index.cjs +11 -0
  85. package/dist/react/variableTextEditor/index.css +306 -0
  86. package/dist/react/variableTextEditor/index.d.cts +6 -0
  87. package/dist/react/variableTextEditor/index.d.ts +6 -0
  88. package/dist/react/variableTextEditor/index.js +2 -0
  89. package/dist/schema-CKAPsYeW.d.cts +41 -0
  90. package/dist/schema-o7OJRaJ8.d.ts +41 -0
  91. package/dist/styles.css +1791 -0
  92. package/dist/tree-D06Xa6_N.d.ts +95 -0
  93. package/dist/tree-Dq1Rk-CF.d.cts +95 -0
  94. package/dist/types-B27Dw9do.d.cts +163 -0
  95. package/dist/types-B27Dw9do.d.ts +163 -0
  96. package/dist/types-Bk9rzr6l.d.cts +48 -0
  97. package/dist/types-D2jEaM9Z.d.cts +145 -0
  98. package/dist/types-D2jEaM9Z.d.ts +145 -0
  99. package/dist/types-xAihO_KW.d.ts +48 -0
  100. package/dist/variableTextEditor.types-ClzvARvK.d.cts +49 -0
  101. package/dist/variableTextEditor.types-ClzvARvK.d.ts +49 -0
  102. package/package.json +130 -0
@@ -0,0 +1,7 @@
1
+ import { c as SchemaDesignerTreeProps } from '../../types-D2jEaM9Z.cjs';
2
+ export { A as AddFieldMode, a as AdvancedEditorContext, F as FlatNode, J as JSONSchema, b as JSONSchemaType, N as NodeKind, R as RefSegment, S as SCHEMA_TYPES, d as SchemaEditorError, e as SchemaEditorErrorScope, f as SchemaErrorHandler } from '../../types-D2jEaM9Z.cjs';
3
+ import * as react from 'react';
4
+
5
+ declare const SchemaTreeEditor: react.MemoExoticComponent<(props: SchemaDesignerTreeProps) => react.JSX.Element>;
6
+
7
+ export { SchemaDesignerTreeProps, SchemaTreeEditor, SchemaDesignerTreeProps as SchemaTreeEditorProps };
@@ -0,0 +1,7 @@
1
+ import { c as SchemaDesignerTreeProps } from '../../types-D2jEaM9Z.js';
2
+ export { A as AddFieldMode, a as AdvancedEditorContext, F as FlatNode, J as JSONSchema, b as JSONSchemaType, N as NodeKind, R as RefSegment, S as SCHEMA_TYPES, d as SchemaEditorError, e as SchemaEditorErrorScope, f as SchemaErrorHandler } from '../../types-D2jEaM9Z.js';
3
+ import * as react from 'react';
4
+
5
+ declare const SchemaTreeEditor: react.MemoExoticComponent<(props: SchemaDesignerTreeProps) => react.JSX.Element>;
6
+
7
+ export { SchemaDesignerTreeProps, SchemaTreeEditor, SchemaDesignerTreeProps as SchemaTreeEditorProps };
@@ -0,0 +1,5 @@
1
+ import '../../chunk-S7GNTGEE.js';
2
+ export { SCHEMA_TYPES, SchemaTreeEditor } from '../../chunk-O6PTRJQ5.js';
3
+ import '../../chunk-2XUQB6BQ.js';
4
+ import '../../chunk-HI5FBHCO.js';
5
+ import '../../chunk-KX3LFFOV.js';
@@ -0,0 +1,11 @@
1
+ 'use strict';
2
+
3
+ var chunkGXXD6ITE_cjs = require('../../chunk-GXXD6ITE.cjs');
4
+ require('../../chunk-OOSNM45O.cjs');
5
+
6
+
7
+
8
+ Object.defineProperty(exports, "VariableTextEditor", {
9
+ enumerable: true,
10
+ get: function () { return chunkGXXD6ITE_cjs.VariableTextEditor; }
11
+ });
@@ -0,0 +1,306 @@
1
+ /* src/react/variableTextEditor/VariableTextEditor.module.css */
2
+ .VariableTextEditor_root {
3
+ --editor-min-height: 40px;
4
+ --editor-max-focused-height: 240px;
5
+ --editor-line-height: 24px;
6
+ --editor-padding-block: 4px;
7
+ position: relative;
8
+ box-sizing: border-box;
9
+ width: 100%;
10
+ min-width: 0;
11
+ min-height: var(--editor-min-height);
12
+ height: var(--editor-min-height);
13
+ overflow: hidden;
14
+ color: var(--color-text-primary, #202124);
15
+ background: transparent;
16
+ font-family:
17
+ var(--font-family-ui, Inter),
18
+ ui-monospace,
19
+ SFMono-Regular,
20
+ Menlo,
21
+ Monaco,
22
+ Consolas,
23
+ monospace;
24
+ font-size: var(--font-size-sm, 13px);
25
+ line-height: var(--editor-line-height);
26
+ }
27
+ .VariableTextEditor_root[data-focused] {
28
+ height: var(--editor-focused-height, var(--editor-min-height));
29
+ max-height: var(--editor-max-focused-height);
30
+ }
31
+ .VariableTextEditor_root[data-wrapped] {
32
+ border-radius: var(--radius-sm, 4px);
33
+ background: var(--color-surface, #fff);
34
+ margin-left: 0;
35
+ margin-top: 0;
36
+ z-index: 1;
37
+ width: 100%;
38
+ }
39
+ .VariableTextEditor_root[data-disabled] {
40
+ color: var(--color-text-disabled, #9aa0a6);
41
+ }
42
+ .VariableTextEditor_root .cm-editor,
43
+ .VariableTextEditor_root .cm-scroller {
44
+ box-sizing: border-box;
45
+ width: 100%;
46
+ min-width: 0;
47
+ height: 100%;
48
+ background: transparent;
49
+ }
50
+ .VariableTextEditor_root .cm-editor {
51
+ font: inherit;
52
+ }
53
+ .VariableTextEditor_root .cm-scroller {
54
+ padding-inline: var(--space-2, 8px);
55
+ overflow-x: hidden;
56
+ overflow-y: hidden;
57
+ scrollbar-width: thin;
58
+ scrollbar-color: transparent transparent;
59
+ }
60
+ .VariableTextEditor_root .cm-content {
61
+ box-sizing: border-box;
62
+ display: block;
63
+ width: 100%;
64
+ min-width: 0;
65
+ min-height: 0;
66
+ height: auto;
67
+ padding: 0;
68
+ white-space: pre;
69
+ overflow-wrap: normal;
70
+ word-break: normal;
71
+ line-height: var(--editor-line-height);
72
+ }
73
+ .VariableTextEditor_root .cm-line {
74
+ font-family: var(--font-family-ui, Inter), sans-serif;
75
+ box-sizing: border-box;
76
+ width: auto;
77
+ min-width: 0;
78
+ min-height: var(--editor-min-height);
79
+ padding: 0;
80
+ font-size: var(--font-size-sm, 13px);
81
+ line-height: var(--editor-min-height);
82
+ }
83
+ .VariableTextEditor_root[data-focused] .cm-scroller {
84
+ overflow-x: hidden;
85
+ overflow-y: hidden;
86
+ }
87
+ .VariableTextEditor_root[data-focused] .cm-content {
88
+ width: 100%;
89
+ min-width: 0;
90
+ min-height: 0 !important;
91
+ height: auto !important;
92
+ padding-block: var(--editor-padding-block, 4px);
93
+ white-space: pre-wrap !important;
94
+ overflow-wrap: anywhere !important;
95
+ word-break: normal !important;
96
+ line-height: var(--editor-line-height);
97
+ }
98
+ .VariableTextEditor_root[data-focused] .cm-lineWrapping {
99
+ white-space: pre-wrap !important;
100
+ overflow-wrap: anywhere !important;
101
+ word-break: normal !important;
102
+ }
103
+ .VariableTextEditor_root[data-focused] .cm-line {
104
+ width: auto;
105
+ min-width: 0;
106
+ min-height: var(--editor-line-height);
107
+ line-height: var(--editor-line-height);
108
+ white-space: pre-wrap !important;
109
+ overflow-wrap: anywhere !important;
110
+ word-break: normal !important;
111
+ hyphens: manual;
112
+ }
113
+ .VariableTextEditor_root .cm-selectionLayer {
114
+ pointer-events: none;
115
+ }
116
+ .VariableTextEditor_root .cm-selectionBackground {
117
+ background: var( --pd-editor-selection-background, color-mix(in srgb, var(--color-info, #4f79bf) 24%, transparent) ) !important;
118
+ }
119
+ .VariableTextEditor_root .cm-focused .cm-selectionBackground {
120
+ background: var( --pd-editor-selection-background-focused, color-mix(in srgb, var(--color-info, #4f79bf) 34%, transparent) ) !important;
121
+ }
122
+ .VariableTextEditor_root .cm-cursorLayer {
123
+ z-index: 30;
124
+ pointer-events: none;
125
+ }
126
+ .VariableTextEditor_root .cm-cursor {
127
+ border-left: 1px solid currentColor;
128
+ display: none;
129
+ visibility: visible;
130
+ box-sizing: border-box;
131
+ margin-left: 0;
132
+ filter: drop-shadow(1px 0 0 var(--color-surface, #fff)) drop-shadow(-1px 0 0 var(--color-surface, #fff));
133
+ pointer-events: none;
134
+ }
135
+ .VariableTextEditor_root .cm-focused .cm-cursor {
136
+ display: block;
137
+ }
138
+ .VariableTextEditor_root .cm-fat-cursor {
139
+ background: currentColor;
140
+ color: var(--color-surface, #fff);
141
+ }
142
+ .VariableTextEditor_root .cm-tooltip-autocomplete {
143
+ z-index: 1500;
144
+ min-width: 220px;
145
+ max-width: min(360px, calc(100vw - 24px));
146
+ margin-top: 8px;
147
+ overflow: hidden;
148
+ color: var(--color-text-primary, #202124);
149
+ background: var(--color-surface, #fff);
150
+ border: 1px solid var(--color-border-default, #dadce0);
151
+ border-radius: var(--radius-md, 8px);
152
+ box-shadow: var(--shadow-lg, 0 12px 32px rgb(60 64 67 / 18%));
153
+ }
154
+ .VariableTextEditor_root .cm-tooltip-autocomplete > ul {
155
+ max-height: 280px;
156
+ padding: 4px;
157
+ overflow-y: auto;
158
+ font-family: var(--font-family-ui, Inter), sans-serif;
159
+ font-size: var(--font-size-sm, 13px);
160
+ }
161
+ .VariableTextEditor_root .cm-tooltip-autocomplete > ul > li {
162
+ min-height: 30px;
163
+ padding: 5px 8px;
164
+ border-radius: var(--radius-sm, 6px);
165
+ }
166
+ .VariableTextEditor_root .cm-tooltip-autocomplete > ul > li[aria-selected=true] {
167
+ color: var(--color-text-primary, #202124);
168
+ background: var(--color-surface-hover, #f1f3f4);
169
+ }
170
+ .VariableTextEditor_variableToken {
171
+ --token-color: unset;
172
+ --token-bg-color: unset;
173
+ color: var(--token-color);
174
+ background-color: var(--token-bg-color);
175
+ position: relative;
176
+ z-index: 1;
177
+ display: inline;
178
+ padding: 2px 0;
179
+ border-radius: var(--radius-sm, 4px);
180
+ box-decoration-break: clone;
181
+ -webkit-box-decoration-break: clone;
182
+ cursor: text;
183
+ white-space: nowrap;
184
+ overflow-wrap: normal;
185
+ word-break: normal;
186
+ }
187
+ .VariableTextEditor_variableToken_unknown {
188
+ color: var(--color-accent, #dc2626);
189
+ }
190
+ .VariableTextEditor_variableToken_environment {
191
+ color: var(--color-success, #15803d);
192
+ }
193
+ .VariableTextEditor_variableToken_secret {
194
+ color: var(--color-secret, #7c3aed);
195
+ }
196
+ .VariableTextEditor_variableToken_request {
197
+ color: var(--color-info, #2563eb);
198
+ }
199
+ .VariableTextEditor_variableToken_dynamic {
200
+ color: var(--color-dynamic, #1d4ed8);
201
+ }
202
+ .VariableTextEditor_hoverPopover {
203
+ position: fixed;
204
+ z-index: 1600;
205
+ box-sizing: border-box;
206
+ width: min(360px, calc(100vw - 24px));
207
+ padding: 14px;
208
+ color: var(--color-text-primary, #202124);
209
+ background: var(--color-surface, #fff);
210
+ border: 1px solid var(--color-border-default, #dadce0);
211
+ border-radius: var(--radius-lg, 10px);
212
+ box-shadow: var(--shadow-lg, 0 12px 32px rgb(60 64 67 / 20%));
213
+ isolation: isolate;
214
+ pointer-events: auto;
215
+ }
216
+ .VariableTextEditor_hoverPopover[data-placement=bottom]::before,
217
+ .VariableTextEditor_hoverPopover[data-placement=top]::before {
218
+ position: absolute;
219
+ right: -8px;
220
+ left: -8px;
221
+ height: 12px;
222
+ content: "";
223
+ pointer-events: auto;
224
+ }
225
+ .VariableTextEditor_hoverPopover[data-placement=bottom]::before {
226
+ top: -16px;
227
+ }
228
+ .VariableTextEditor_hoverPopover[data-placement=top]::before {
229
+ bottom: -16px;
230
+ }
231
+ .VariableTextEditor_hoverPopoverArrow {
232
+ position: absolute;
233
+ left: var(--popover-arrow-left, 50%);
234
+ width: 11px;
235
+ height: 11px;
236
+ background: var(--color-surface, #fff);
237
+ pointer-events: none;
238
+ }
239
+ .VariableTextEditor_hoverPopover[data-placement=bottom] .VariableTextEditor_hoverPopoverArrow {
240
+ top: -6px;
241
+ border-top: 1px solid var(--color-border-default, #dadce0);
242
+ border-left: 1px solid var(--color-border-default, #dadce0);
243
+ transform: translateX(-50%) rotate(45deg);
244
+ }
245
+ .VariableTextEditor_hoverPopover[data-placement=top] .VariableTextEditor_hoverPopoverArrow {
246
+ bottom: -6px;
247
+ border-right: 1px solid var(--color-border-default, #dadce0);
248
+ border-bottom: 1px solid var(--color-border-default, #dadce0);
249
+ transform: translateX(-50%) rotate(45deg);
250
+ }
251
+ .VariableTextEditor_popoverHeader {
252
+ font-weight: var(--font-weight-semibold, 600);
253
+ }
254
+ .VariableTextEditor_popoverType {
255
+ color: var(--color-text-tertiary, #80868b);
256
+ font-size: var(--font-size-xs, 12px);
257
+ text-transform: capitalize;
258
+ }
259
+ .VariableTextEditor_popoverValue {
260
+ box-sizing: border-box;
261
+ width: 100%;
262
+ max-height: 180px;
263
+ margin-top: 5px;
264
+ padding: 7px 9px;
265
+ overflow: auto;
266
+ overflow-wrap: anywhere;
267
+ color: var(--color-text-primary, #202124);
268
+ background: var(--color-surface-subtle, #f8f9fa);
269
+ border-radius: var(--radius-sm, 6px);
270
+ font-family: var(--font-family-ui, Inter), sans-serif;
271
+ white-space: pre-wrap;
272
+ }
273
+ .VariableTextEditor_popoverDesc {
274
+ color: var(--color-text-secondary, #5f6368);
275
+ font-size: var(--font-size-sm, 13px);
276
+ overflow-wrap: anywhere;
277
+ }
278
+ .VariableTextEditor_root[data-focused] {
279
+ border-radius: 0;
280
+ background: var(--color-surface, #fff);
281
+ box-shadow: inset 0 0 0 1px var(--color-border-strong, #ccd2d8);
282
+ }
283
+ .VariableTextEditor_root .cm-focused {
284
+ outline: none;
285
+ }
286
+ .VariableTextEditor_root[data-focused] .cm-scroller {
287
+ overflow-y: auto;
288
+ }
289
+ .VariableTextEditor_root[data-focused]:hover .cm-scroller,
290
+ .VariableTextEditor_root[data-focused]:focus-within .cm-scroller {
291
+ scrollbar-color: var(--color-border-strong, #ccd2d8) transparent;
292
+ }
293
+ .VariableTextEditor_hoverPopover {
294
+ max-height: calc(100dvh - 24px);
295
+ overflow: auto;
296
+ }
297
+ .VariableTextEditor_root[data-focused][data-multiline] .cm-line {
298
+ position: relative;
299
+ }
300
+ .VariableTextEditor_root[data-focused][data-multiline] .cm-line:has(> br:only-child)::before {
301
+ content: "\21b5";
302
+ position: absolute;
303
+ color: var(--color-text-tertiary, #989da5);
304
+ pointer-events: none;
305
+ user-select: none;
306
+ }
@@ -0,0 +1,6 @@
1
+ import { V as VariableTextEditorProps } from '../../variableTextEditor.types-ClzvARvK.cjs';
2
+ export { E as EndpointVariable, a as VariableTextPart, b as VariableTokenMatch, c as VariableTokenPresentation } from '../../variableTextEditor.types-ClzvARvK.cjs';
3
+
4
+ declare const VariableTextEditor: React.FC<VariableTextEditorProps>;
5
+
6
+ export { VariableTextEditor, VariableTextEditorProps };
@@ -0,0 +1,6 @@
1
+ import { V as VariableTextEditorProps } from '../../variableTextEditor.types-ClzvARvK.js';
2
+ export { E as EndpointVariable, a as VariableTextPart, b as VariableTokenMatch, c as VariableTokenPresentation } from '../../variableTextEditor.types-ClzvARvK.js';
3
+
4
+ declare const VariableTextEditor: React.FC<VariableTextEditorProps>;
5
+
6
+ export { VariableTextEditor, VariableTextEditorProps };
@@ -0,0 +1,2 @@
1
+ export { VariableTextEditor } from '../../chunk-BXFABOMJ.js';
2
+ import '../../chunk-P5B3HSPY.js';
@@ -0,0 +1,41 @@
1
+ import { i as SchemaValue } from './types-D2jEaM9Z.cjs';
2
+ import { a as cloneSchema$1 } from './tree-Dq1Rk-CF.cjs';
3
+ import { e as SchemaRecord, O as OpenApiSchema, a as InlineSchemaType, C as CompositionKey, S as SchemaFormatOptions } from './types-Bk9rzr6l.cjs';
4
+
5
+ declare function isRecord(value: unknown): value is SchemaRecord;
6
+ declare function isSchema(value: unknown): value is OpenApiSchema;
7
+ declare function toSchemaRecord(schema: SchemaValue | undefined | unknown): SchemaRecord;
8
+ declare const cloneSchema: typeof cloneSchema$1;
9
+ declare function asOpenApiSchema(value: SchemaRecord): OpenApiSchema;
10
+ declare function compactSchema(value: SchemaRecord): OpenApiSchema;
11
+ declare function mergeSchema(schema: SchemaValue | undefined, patch: Partial<OpenApiSchema>): OpenApiSchema;
12
+ declare function normalizeSchemaType(value: unknown): InlineSchemaType;
13
+ declare function getSchemaType(schema: SchemaValue | undefined): InlineSchemaType;
14
+ declare function createSchemaForType(type: InlineSchemaType, previous?: OpenApiSchema): OpenApiSchema;
15
+ declare function normalizeFormatOptions(options?: SchemaFormatOptions): string[];
16
+ declare function parseOptionalNumber(value: string): number | undefined;
17
+ declare function toInputValue(value: unknown): string;
18
+ declare function stringifySchemaValue(value: unknown): string;
19
+ declare function canParseSchemaValue(value: string, type: InlineSchemaType): boolean;
20
+ declare function parseSchemaValue(value: string, type: InlineSchemaType): unknown;
21
+ declare function getEnumValues(schema: SchemaValue | undefined): unknown[];
22
+ declare function getProperties(schema: SchemaValue | undefined): Record<string, SchemaValue>;
23
+ declare function getRequiredProperties(schema: SchemaValue | undefined): Set<string>;
24
+ declare function updateProperty(schema: OpenApiSchema, name: string, propertySchema: SchemaValue): OpenApiSchema;
25
+ declare function removeProperty(schema: OpenApiSchema, name: string): OpenApiSchema;
26
+ declare function renameProperty(schema: OpenApiSchema, oldName: string, newName: string): OpenApiSchema;
27
+ declare function setPropertyRequired(schema: OpenApiSchema, name: string, required: boolean): OpenApiSchema;
28
+ declare function getArrayItems(schema: SchemaValue | undefined): SchemaValue | undefined;
29
+ declare function getPrefixItems(schema: SchemaValue | undefined): SchemaValue[];
30
+ declare function getComposition(schema: SchemaValue | undefined, key: CompositionKey): SchemaValue[];
31
+ declare function setComposition(schema: OpenApiSchema, key: CompositionKey, values: SchemaValue[]): OpenApiSchema;
32
+ declare function getReferenceOptions(schema: SchemaValue | undefined): string[];
33
+ declare function getSchemaSummary(schema: SchemaValue | undefined): string;
34
+ type DiffLine = {
35
+ kind: "same" | "added" | "removed";
36
+ value: string;
37
+ };
38
+ declare function diffSchemaLines(before: string, after: string): DiffLine[];
39
+ declare function setEnumValues(schema: OpenApiSchema, values: unknown[]): OpenApiSchema;
40
+
41
+ export { isSchema as A, removeProperty as B, renameProperty as C, type DiffLine as D, setPropertyRequired as E, updateProperty as F, asOpenApiSchema as a, compactSchema as b, cloneSchema as c, createSchemaForType as d, getComposition as e, getEnumValues as f, getArrayItems as g, getPrefixItems as h, getProperties as i, getRequiredProperties as j, getSchemaType as k, normalizeSchemaType as l, mergeSchema as m, normalizeFormatOptions as n, parseSchemaValue as o, parseOptionalNumber as p, setEnumValues as q, stringifySchemaValue as r, setComposition as s, toInputValue as t, toSchemaRecord as u, canParseSchemaValue as v, diffSchemaLines as w, getReferenceOptions as x, getSchemaSummary as y, isRecord as z };
@@ -0,0 +1,41 @@
1
+ import { i as SchemaValue } from './types-D2jEaM9Z.js';
2
+ import { a as cloneSchema$1 } from './tree-D06Xa6_N.js';
3
+ import { e as SchemaRecord, O as OpenApiSchema, a as InlineSchemaType, C as CompositionKey, S as SchemaFormatOptions } from './types-xAihO_KW.js';
4
+
5
+ declare function isRecord(value: unknown): value is SchemaRecord;
6
+ declare function isSchema(value: unknown): value is OpenApiSchema;
7
+ declare function toSchemaRecord(schema: SchemaValue | undefined | unknown): SchemaRecord;
8
+ declare const cloneSchema: typeof cloneSchema$1;
9
+ declare function asOpenApiSchema(value: SchemaRecord): OpenApiSchema;
10
+ declare function compactSchema(value: SchemaRecord): OpenApiSchema;
11
+ declare function mergeSchema(schema: SchemaValue | undefined, patch: Partial<OpenApiSchema>): OpenApiSchema;
12
+ declare function normalizeSchemaType(value: unknown): InlineSchemaType;
13
+ declare function getSchemaType(schema: SchemaValue | undefined): InlineSchemaType;
14
+ declare function createSchemaForType(type: InlineSchemaType, previous?: OpenApiSchema): OpenApiSchema;
15
+ declare function normalizeFormatOptions(options?: SchemaFormatOptions): string[];
16
+ declare function parseOptionalNumber(value: string): number | undefined;
17
+ declare function toInputValue(value: unknown): string;
18
+ declare function stringifySchemaValue(value: unknown): string;
19
+ declare function canParseSchemaValue(value: string, type: InlineSchemaType): boolean;
20
+ declare function parseSchemaValue(value: string, type: InlineSchemaType): unknown;
21
+ declare function getEnumValues(schema: SchemaValue | undefined): unknown[];
22
+ declare function getProperties(schema: SchemaValue | undefined): Record<string, SchemaValue>;
23
+ declare function getRequiredProperties(schema: SchemaValue | undefined): Set<string>;
24
+ declare function updateProperty(schema: OpenApiSchema, name: string, propertySchema: SchemaValue): OpenApiSchema;
25
+ declare function removeProperty(schema: OpenApiSchema, name: string): OpenApiSchema;
26
+ declare function renameProperty(schema: OpenApiSchema, oldName: string, newName: string): OpenApiSchema;
27
+ declare function setPropertyRequired(schema: OpenApiSchema, name: string, required: boolean): OpenApiSchema;
28
+ declare function getArrayItems(schema: SchemaValue | undefined): SchemaValue | undefined;
29
+ declare function getPrefixItems(schema: SchemaValue | undefined): SchemaValue[];
30
+ declare function getComposition(schema: SchemaValue | undefined, key: CompositionKey): SchemaValue[];
31
+ declare function setComposition(schema: OpenApiSchema, key: CompositionKey, values: SchemaValue[]): OpenApiSchema;
32
+ declare function getReferenceOptions(schema: SchemaValue | undefined): string[];
33
+ declare function getSchemaSummary(schema: SchemaValue | undefined): string;
34
+ type DiffLine = {
35
+ kind: "same" | "added" | "removed";
36
+ value: string;
37
+ };
38
+ declare function diffSchemaLines(before: string, after: string): DiffLine[];
39
+ declare function setEnumValues(schema: OpenApiSchema, values: unknown[]): OpenApiSchema;
40
+
41
+ export { isSchema as A, removeProperty as B, renameProperty as C, type DiffLine as D, setPropertyRequired as E, updateProperty as F, asOpenApiSchema as a, compactSchema as b, cloneSchema as c, createSchemaForType as d, getComposition as e, getEnumValues as f, getArrayItems as g, getPrefixItems as h, getProperties as i, getRequiredProperties as j, getSchemaType as k, normalizeSchemaType as l, mergeSchema as m, normalizeFormatOptions as n, parseSchemaValue as o, parseOptionalNumber as p, setEnumValues as q, stringifySchemaValue as r, setComposition as s, toInputValue as t, toSchemaRecord as u, canParseSchemaValue as v, diffSchemaLines as w, getReferenceOptions as x, getSchemaSummary as y, isRecord as z };