apiuikit 1.12.0 → 2.0.1

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 (161) hide show
  1. package/README.md +2 -52
  2. package/dist/CodeSamples-C5Tl3k83.cjs +50 -0
  3. package/dist/{CodeSamples-BzQONJ_W.js → CodeSamples-bu8KSzOn.js} +1225 -1231
  4. package/dist/{LogoExtension-NutcLQ6T.cjs → LogoExtension-BVOE2HZc.cjs} +1 -1
  5. package/dist/{LogoExtension-DyWnBQ1M.js → LogoExtension-CZJpJnyk.js} +1 -1
  6. package/dist/apiuikit.cjs.js +1 -1
  7. package/dist/apiuikit.css +1 -1
  8. package/dist/apiuikit.es.js +1 -1
  9. package/dist/c-B4BAHWS4.cjs +1 -0
  10. package/dist/{c-Bz1-FJiA.js → c-C0DTNf68.js} +122 -63
  11. package/dist/components/AsyncCodeSample.d.ts +1 -1
  12. package/dist/components/Authorization.d.ts +5 -5
  13. package/dist/components/Bindings.d.ts +1 -1
  14. package/dist/components/ChannelAddress.d.ts +1 -1
  15. package/dist/components/CodeBlock.d.ts +1 -1
  16. package/dist/components/CodeSamples.d.ts +1 -1
  17. package/dist/components/CollapsiblePanel.d.ts +1 -1
  18. package/dist/components/ContentTab.d.ts +1 -1
  19. package/dist/components/CopyButton.d.ts +1 -1
  20. package/dist/components/DefinitionListItem.d.ts +1 -1
  21. package/dist/components/DocumentTopBar.d.ts +1 -1
  22. package/dist/components/ErrorBoundary.d.ts +1 -1
  23. package/dist/components/Examples.d.ts +1 -1
  24. package/dist/components/InfoMetadata.d.ts +1 -1
  25. package/dist/components/MarkdownExportMenu.d.ts +1 -1
  26. package/dist/components/MethodBadge.d.ts +1 -1
  27. package/dist/components/Navigation/AsyncAPINavigation.d.ts +1 -1
  28. package/dist/components/Navigation/Navigation.d.ts +1 -1
  29. package/dist/components/Navigation/OpenAPINavigation.d.ts +1 -1
  30. package/dist/components/Navigation/SpecNavigation.d.ts +1 -1
  31. package/dist/components/QueryParameters.d.ts +1 -1
  32. package/dist/components/RenderExtensions.d.ts +1 -1
  33. package/dist/components/Reply.d.ts +1 -1
  34. package/dist/components/SearchPanel.d.ts +1 -1
  35. package/dist/components/Section.d.ts +8 -1
  36. package/dist/components/ServerAddressBanner.d.ts +1 -1
  37. package/dist/components/TabToggle.d.ts +1 -1
  38. package/dist/components/Tabs.d.ts +2 -2
  39. package/dist/components/Tag.d.ts +1 -1
  40. package/dist/components/VerticalNavigation.d.ts +1 -1
  41. package/dist/components/schema/ExpandToggle.d.ts +1 -1
  42. package/dist/components/schema/SchemaCaseDetail.d.ts +1 -1
  43. package/dist/components/schema/SchemaConstraints.d.ts +1 -1
  44. package/dist/components/schema/SchemaFieldMeta.d.ts +1 -1
  45. package/dist/components/schema/SchemaIfThenElseBranch.d.ts +1 -1
  46. package/dist/components/schema/SchemaMapBranch.d.ts +1 -1
  47. package/dist/components/schema/SchemaNode.d.ts +1 -1
  48. package/dist/components/schema/SchemaNotBranch.d.ts +2 -2
  49. package/dist/components/schema/SchemaTab.d.ts +1 -1
  50. package/dist/components/schema/SchemaTree.d.ts +1 -1
  51. package/dist/components/schema/SchemaTreeBranch.d.ts +1 -1
  52. package/dist/components/schema/SchemaTreeRow.d.ts +1 -1
  53. package/dist/components/schema/SchemaTypeLabel.d.ts +1 -1
  54. package/dist/components/schema/SchemaUnionBranch.d.ts +1 -1
  55. package/dist/config/config.d.ts +17 -0
  56. package/dist/containers/AsyncAPI/AsyncAPI.d.ts +1 -1
  57. package/dist/containers/AsyncAPI/AsyncAPIDocumentProvider.d.ts +1 -1
  58. package/dist/containers/AsyncAPI/AsyncAPIRenderer.d.ts +1 -1
  59. package/dist/containers/AsyncAPI/Layout.d.ts +1 -1
  60. package/dist/containers/Information/InformationSection.d.ts +2 -2
  61. package/dist/containers/Information/OpenAPIInformation.d.ts +1 -1
  62. package/dist/containers/Messages/Message.d.ts +1 -1
  63. package/dist/containers/Messages/MessageDetails.d.ts +1 -1
  64. package/dist/containers/Messages/Messages.d.ts +1 -1
  65. package/dist/containers/OpenAPI/Layout.d.ts +1 -1
  66. package/dist/containers/OpenAPI/OpenAPI.d.ts +1 -1
  67. package/dist/containers/OpenAPI/OpenAPIDocumentProvider.d.ts +1 -1
  68. package/dist/containers/OpenAPI/OpenAPIRenderer.d.ts +1 -1
  69. package/dist/containers/Operation/Operation.d.ts +1 -1
  70. package/dist/containers/Operation/Operations.d.ts +1 -1
  71. package/dist/containers/Path/OperationCallbacks.d.ts +1 -1
  72. package/dist/containers/Path/PathOperation.d.ts +1 -1
  73. package/dist/containers/Path/Paths.d.ts +1 -1
  74. package/dist/containers/Path/ResponseLinks.d.ts +1 -1
  75. package/dist/containers/Schema/Schemas.d.ts +1 -1
  76. package/dist/containers/Server/OpenAPIServer.d.ts +1 -1
  77. package/dist/containers/Server/OpenAPIServers.d.ts +1 -1
  78. package/dist/containers/Server/Server.d.ts +1 -1
  79. package/dist/containers/Server/Servers.d.ts +1 -1
  80. package/dist/contexts/useSpec.d.ts +5 -0
  81. package/dist/{crystal-BcGgviMR.cjs → crystal-BA1RB3o9.cjs} +1 -1
  82. package/dist/{crystal-BtD5fR4q.js → crystal-C5EKc8oK.js} +29 -18
  83. package/dist/{csharp-AnFv7wyC.js → csharp-B6YWt0KR.js} +47 -47
  84. package/dist/csharp-IihVQN8U.cjs +1 -0
  85. package/dist/{go-BpetKc7b.cjs → go-By8nj0Vi.cjs} +1 -1
  86. package/dist/{go-CkZ9_bn0.js → go-C8VcBUsu.js} +7 -2
  87. package/dist/helpers/openapiParser.d.ts +1 -1
  88. package/dist/helpers/parser.d.ts +1 -1
  89. package/dist/hooks/useDocumentProviderValue.d.ts +1 -0
  90. package/dist/icons/ArrowDown.d.ts +1 -1
  91. package/dist/icons/ArrowRight.d.ts +1 -1
  92. package/dist/icons/AtSymbol.d.ts +1 -1
  93. package/dist/icons/BookOpen.d.ts +1 -1
  94. package/dist/icons/Check.d.ts +1 -1
  95. package/dist/icons/Clipboard.d.ts +1 -1
  96. package/dist/icons/Connection.d.ts +1 -1
  97. package/dist/icons/Copy.d.ts +1 -1
  98. package/dist/icons/ExternalLink.d.ts +1 -1
  99. package/dist/icons/Globe.d.ts +1 -1
  100. package/dist/icons/IconWrapper.d.ts +1 -1
  101. package/dist/icons/Info.d.ts +1 -1
  102. package/dist/icons/Link.d.ts +1 -1
  103. package/dist/icons/Message.d.ts +1 -1
  104. package/dist/icons/Operation.d.ts +1 -1
  105. package/dist/icons/Scale.d.ts +1 -1
  106. package/dist/icons/Schema.d.ts +1 -1
  107. package/dist/icons/Server.d.ts +1 -1
  108. package/dist/icons/ShieldCheck.d.ts +1 -1
  109. package/dist/icons/Tag.d.ts +1 -1
  110. package/dist/icons/Variable.d.ts +1 -1
  111. package/dist/index-1SEMQuYi.js +1704 -0
  112. package/dist/index-29FyeXas.cjs +137 -0
  113. package/dist/index-C2tdEw22.cjs +178 -0
  114. package/dist/{index-Zmu_k8_1.js → index-CbVUi36m.js} +3637 -3400
  115. package/dist/{index-ByyWsuPc.js → index-Ccaf5SNM.js} +10357 -10196
  116. package/dist/index-Ccy_JZ0T.cjs +4 -0
  117. package/dist/index-DKcgVKzx.cjs +107 -0
  118. package/dist/{index-CxOoKEXt.js → index-DkjcpZQZ.js} +3118 -3026
  119. package/dist/{java-BicX26Pg.js → java-BoRJOXvw.js} +48 -39
  120. package/dist/java-DFXAwvvK.cjs +1 -0
  121. package/dist/{kotlin-kGuORR5a.cjs → kotlin-B3HlgtFq.cjs} +2 -2
  122. package/dist/{kotlin-BwB8b-YX.js → kotlin-CIEA64JZ.js} +3 -1
  123. package/dist/markdown-assets/protoToJsonSchema-B7uaS_Ic.js +83 -0
  124. package/dist/markdown-assets/{protoToJsonSchema-CBPWaboT.js → protoToJsonSchema-CWtEPUyE.js} +1807 -1788
  125. package/dist/markdown.cjs +37 -37
  126. package/dist/markdown.es.js +927 -900
  127. package/dist/{php-DF4zG2hq.cjs → php-BMUCoWpx.cjs} +2 -2
  128. package/dist/{php-BL35ZHWM.js → php-DJ7KS8rT.js} +39 -33
  129. package/dist/plugins/OperationPluginTabs.d.ts +1 -1
  130. package/dist/plugins/PluginSlot.d.ts +2 -2
  131. package/dist/{protoToJsonSchema-DYct0Ubq.js → protoToJsonSchema-BvNrF6Ce.js} +787 -769
  132. package/dist/protoToJsonSchema-CQwj_Ytd.cjs +83 -0
  133. package/dist/{protobufSchemaParser-AhCAnBeA.cjs → protobufSchemaParser-DO1jnL81.cjs} +1 -1
  134. package/dist/{protobufSchemaParser-DDehPdy5.js → protobufSchemaParser-hOIbQrct.js} +2 -2
  135. package/dist/public/createSectionRoot.d.ts +1 -1
  136. package/dist/public/openapiSections.d.ts +5 -5
  137. package/dist/public/schemasSection.d.ts +1 -1
  138. package/dist/public/sections.d.ts +5 -5
  139. package/dist/{ruby-nPcbuC2a.cjs → ruby-CGL4kvvH.cjs} +1 -1
  140. package/dist/{ruby-CvOid-1s.js → ruby-t1jbZ0Fv.js} +2 -2
  141. package/dist/{rust-BocnJ3Ns.js → rust-DY-oA2gr.js} +40 -26
  142. package/dist/rust-_vvcEGSJ.cjs +1 -0
  143. package/dist/swift-BAji1QIq.cjs +1 -0
  144. package/dist/{swift-C35Eof-I.js → swift-CdDIFB_j.js} +25 -11
  145. package/dist/utils/theme.d.ts +14 -0
  146. package/package.json +20 -4
  147. package/dist/App.d.ts +0 -2
  148. package/dist/CodeSamples-BpMwzCbt.cjs +0 -50
  149. package/dist/c-C_Sx7N-F.cjs +0 -1
  150. package/dist/csharp-yuAGIuP4.cjs +0 -1
  151. package/dist/index-BKvXpIUY.cjs +0 -107
  152. package/dist/index-DCDYBZcY.js +0 -1461
  153. package/dist/index-DgKIIH6w.cjs +0 -139
  154. package/dist/index-DwDyiZr3.cjs +0 -178
  155. package/dist/index-d8kJa7YD.cjs +0 -4
  156. package/dist/java-BIk0G-rH.cjs +0 -1
  157. package/dist/main.d.ts +0 -0
  158. package/dist/markdown-assets/protoToJsonSchema-CgkcluFJ.js +0 -83
  159. package/dist/protoToJsonSchema-B86Gpg5n.cjs +0 -83
  160. package/dist/rust-DKnYCg2f.cjs +0 -1
  161. package/dist/swift-CAnH__EC.cjs +0 -1
@@ -31,4 +31,4 @@ export interface SchemaNodeProps {
31
31
  focusId?: string | null;
32
32
  }
33
33
  /** Recursively renders one schema node and its descendants. */
34
- export default function SchemaNode({ schema: rawSchema, path, depth, required, refStack, deref, suppressRow, branchLineVariant, defaultExpanded, ancestors, focusTokens, focusId, }: SchemaNodeProps): import("react").JSX.Element | null;
34
+ export default function SchemaNode({ schema: rawSchema, path, depth, required, refStack, deref, suppressRow, branchLineVariant, defaultExpanded, ancestors, focusTokens, focusId, }: SchemaNodeProps): import('react').JSX.Element | null;
@@ -3,10 +3,10 @@ interface SchemaNotBranchProps {
3
3
  children: ReactNode;
4
4
  }
5
5
  /** Branch UI for not schemas — shows the negated subschema. */
6
- export default function SchemaNotBranch({ children }: SchemaNotBranchProps): import("react").JSX.Element;
6
+ export default function SchemaNotBranch({ children }: SchemaNotBranchProps): import('react').JSX.Element;
7
7
  interface BooleanNotPillProps {
8
8
  value: boolean;
9
9
  }
10
10
  /** Compact label for boolean not subschemas (true/false). */
11
- export declare function BooleanNotPill({ value }: BooleanNotPillProps): import("react").JSX.Element;
11
+ export declare function BooleanNotPill({ value }: BooleanNotPillProps): import('react').JSX.Element;
12
12
  export {};
@@ -28,5 +28,5 @@ declare function SchemaTabs({ schema, label, rootName, description, schemaFormat
28
28
  * documented name/type/description is what the reader actually wants.
29
29
  */
30
30
  defaultView?: "schema" | "example";
31
- }): import("react").JSX.Element;
31
+ }): import('react').JSX.Element;
32
32
  export default SchemaTabs;
@@ -9,4 +9,4 @@ export interface SchemaTreeProps {
9
9
  focusId?: string | null;
10
10
  }
11
11
  /** Entry point: renders a full schema tree with $ref resolution and expand/collapse. */
12
- export default function SchemaTree({ schema, rootName, className, focusTokens, focusId, }: SchemaTreeProps): import("react").JSX.Element | null;
12
+ export default function SchemaTree({ schema, rootName, className, focusTokens, focusId, }: SchemaTreeProps): import('react').JSX.Element | null;
@@ -5,4 +5,4 @@ export default function SchemaTreeBranch({ depth, children, lineVariant, }: {
5
5
  depth: number;
6
6
  children: ReactNode;
7
7
  lineVariant?: SchemaTreeBranchLineVariant;
8
- }): import("react").JSX.Element;
8
+ }): import('react').JSX.Element;
@@ -16,4 +16,4 @@ export interface SchemaTreeRowProps {
16
16
  showBorder?: boolean;
17
17
  }
18
18
  /** Single tree row: name, type, constraints, and optional description. */
19
- export default function SchemaTreeRow({ id, path, depth, schema, refLabel, itemSchema, typeLabelOverride, required, description, expandable, expanded, onToggle, showBorder, }: SchemaTreeRowProps): import("react").JSX.Element;
19
+ export default function SchemaTreeRow({ id, path, depth, schema, refLabel, itemSchema, typeLabelOverride, required, description, expandable, expanded, onToggle, showBorder, }: SchemaTreeRowProps): import('react').JSX.Element;
@@ -5,4 +5,4 @@ export interface SchemaTypeLabelProps {
5
5
  className?: string;
6
6
  }
7
7
  /** Renders the structural type string for a schema node. */
8
- export default function SchemaTypeLabel({ schema, refLabel, className, }: SchemaTypeLabelProps): import("react").JSX.Element;
8
+ export default function SchemaTypeLabel({ schema, refLabel, className, }: SchemaTypeLabelProps): import('react').JSX.Element;
@@ -8,5 +8,5 @@ interface SchemaUnionBranchProps {
8
8
  children: ReactNode;
9
9
  }
10
10
  /** Tabbed branch UI for oneOf/anyOf schemas — shows one case at a time. */
11
- export default function SchemaUnionBranch({ variant, caseCount, caseLabels, selectedCase, onSelectCase, children, }: SchemaUnionBranchProps): import("react").JSX.Element | null;
11
+ export default function SchemaUnionBranch({ variant, caseCount, caseLabels, selectedCase, onSelectCase, children, }: SchemaUnionBranchProps): import('react').JSX.Element | null;
12
12
  export {};
@@ -94,6 +94,23 @@ export interface ShowConfig {
94
94
  codeSamples?: boolean;
95
95
  /** The "Copy for LLM" / "View as Markdown" floating button. Defaults to true. */
96
96
  copyMarkdown?: boolean;
97
+ /**
98
+ * The built-in "Try it" panel in the operation side panel's header. For
99
+ * OpenAPI, a request builder that sends real requests from the reader's
100
+ * browser; for AsyncAPI, a WebSocket client for operations with a `ws`/`wss`
101
+ * server (operations without one show no button).
102
+ *
103
+ * **Defaults to false**, unlike every other flag here. Enabling it turns a
104
+ * documentation page into one that collects credentials from readers (the
105
+ * OpenAPI panel holds them in `sessionStorage` for the tab's lifetime), and
106
+ * requests and connections go to whichever origin the *document's*
107
+ * `servers` entry names — so the decision belongs to the host, made once,
108
+ * rather than arriving with an upgrade.
109
+ *
110
+ * Each panel's code is a separate chunk, fetched only when this is on: a
111
+ * consumer who leaves it off ships nothing extra to their readers.
112
+ */
113
+ tryIt?: boolean;
97
114
  }
98
115
  export interface ExpandConfig {
99
116
  messageExamples?: boolean;
@@ -28,5 +28,5 @@ export interface IAsyncAPIProps {
28
28
  * `$ref`-carrying) document object; for raw YAML/JSON strings, use
29
29
  * `AsyncAPIRenderer` instead, which parses first.
30
30
  */
31
- declare const AsyncAPI: (props: IAsyncAPIProps) => import("react").JSX.Element;
31
+ declare const AsyncAPI: (props: IAsyncAPIProps) => import('react').JSX.Element;
32
32
  export default AsyncAPI;
@@ -11,5 +11,5 @@ export interface AsyncAPIDocumentProviderProps {
11
11
  className?: string;
12
12
  children: ReactNode;
13
13
  }
14
- export declare function AsyncAPIDocumentProvider({ document: asyncapi, config, plugins, className, children, }: AsyncAPIDocumentProviderProps): import("react").JSX.Element;
14
+ export declare function AsyncAPIDocumentProvider({ document: asyncapi, config, plugins, className, children, }: AsyncAPIDocumentProviderProps): import('react').JSX.Element;
15
15
  export default AsyncAPIDocumentProvider;
@@ -27,5 +27,5 @@ interface AsyncAPIRendererProps {
27
27
  * document as text rather than a pre-parsed object, e.g. user-entered or
28
28
  * loaded from a file at runtime.
29
29
  */
30
- export declare function AsyncAPIRenderer({ raw, config, plugins, onDiagnostics, errorFallback, onError, initialLocation, onLocationChange, }: AsyncAPIRendererProps): import("react").JSX.Element | null;
30
+ export declare function AsyncAPIRenderer({ raw, config, plugins, onDiagnostics, errorFallback, onError, initialLocation, onLocationChange, }: AsyncAPIRendererProps): import('react').JSX.Element | null;
31
31
  export {};
@@ -11,5 +11,5 @@ export interface LayoutProps {
11
11
  onLocationChange?: (location: SpecLocation<AsyncAPITabKey> | null) => void;
12
12
  }
13
13
  type AsyncAPITabKey = NavTab;
14
- export default function Layout({ asyncapi, config, plugins, initialLocation, onLocationChange }: LayoutProps): import("react").JSX.Element;
14
+ export default function Layout({ asyncapi, config, plugins, initialLocation, onLocationChange }: LayoutProps): import('react').JSX.Element;
15
15
  export {};
@@ -27,6 +27,6 @@ interface InformationLogoProps {
27
27
  }
28
28
  export declare const hasInformationLogo: (source?: object) => boolean;
29
29
  /** Renders the special `info.x-logo` extension outside the generic extension row. */
30
- export declare function InformationLogo({ source }: InformationLogoProps): import("react").JSX.Element | null;
31
- export default function InformationSection({ title, description, license, contact, externalDocs, tags, extensionsSource, layout, showLogo, }: InformationSectionProps): import("react").JSX.Element;
30
+ export declare function InformationLogo({ source }: InformationLogoProps): import('react').JSX.Element | null;
31
+ export default function InformationSection({ title, description, license, contact, externalDocs, tags, extensionsSource, layout, showLogo, }: InformationSectionProps): import('react').JSX.Element;
32
32
  export {};
@@ -8,5 +8,5 @@ interface OpenAPIInformationProps {
8
8
  layout?: SectionLayout;
9
9
  showLogo?: boolean;
10
10
  }
11
- export default function OpenAPIInformation({ info, tags, externalDocs, layout, showLogo, }: OpenAPIInformationProps): import("react").JSX.Element;
11
+ export default function OpenAPIInformation({ info, tags, externalDocs, layout, showLogo, }: OpenAPIInformationProps): import('react').JSX.Element;
12
12
  export {};
@@ -4,5 +4,5 @@ interface MessageProps {
4
4
  messageId?: string;
5
5
  i: number;
6
6
  }
7
- export declare function Message({ message, messageId, i }: MessageProps): import("react").JSX.Element;
7
+ export declare function Message({ message, messageId, i }: MessageProps): import('react').JSX.Element;
8
8
  export {};
@@ -7,5 +7,5 @@ interface MessageDetailsProps {
7
7
  /** "payload" | "headers" when search navigated here for that schema specifically. */
8
8
  focusSection?: string | null;
9
9
  }
10
- export declare function MessageDetails({ message, expanded, onToggleExpanded, paddingX, focusSection, }: MessageDetailsProps): import("react").JSX.Element;
10
+ export declare function MessageDetails({ message, expanded, onToggleExpanded, paddingX, focusSection, }: MessageDetailsProps): import('react').JSX.Element;
11
11
  export {};
@@ -7,5 +7,5 @@ interface MessagesProps {
7
7
  focusSection?: string | null;
8
8
  layout?: SectionLayout;
9
9
  }
10
- export default function Messages({ messages, selectedKey, focusSection, layout }: MessagesProps): import("react").JSX.Element;
10
+ export default function Messages({ messages, selectedKey, focusSection, layout }: MessagesProps): import('react').JSX.Element;
11
11
  export {};
@@ -11,5 +11,5 @@ export interface OpenAPILayoutProps {
11
11
  onLocationChange?: (location: SpecLocation<OpenAPITabKey> | null) => void;
12
12
  }
13
13
  type OpenAPITabKey = OpenAPINavTab;
14
- export default function Layout({ openapi, config, plugins, initialLocation, onLocationChange }: OpenAPILayoutProps): import("react").JSX.Element;
14
+ export default function Layout({ openapi, config, plugins, initialLocation, onLocationChange }: OpenAPILayoutProps): import('react').JSX.Element;
15
15
  export {};
@@ -28,5 +28,5 @@ export interface IOpenAPIProps {
28
28
  * document object; for raw YAML/JSON strings, use `OpenAPIRenderer` instead,
29
29
  * which parses first.
30
30
  */
31
- declare const OpenAPI: (props: IOpenAPIProps) => import("react").JSX.Element;
31
+ declare const OpenAPI: (props: IOpenAPIProps) => import('react').JSX.Element;
32
32
  export default OpenAPI;
@@ -12,5 +12,5 @@ export interface OpenAPIDocumentProviderProps {
12
12
  children: ReactNode;
13
13
  }
14
14
  /** Mirrors AsyncAPIDocumentProvider, sharing the same DocumentContext shape. */
15
- export declare function OpenAPIDocumentProvider({ document: openapi, config, plugins, className, children, }: OpenAPIDocumentProviderProps): import("react").JSX.Element;
15
+ export declare function OpenAPIDocumentProvider({ document: openapi, config, plugins, className, children, }: OpenAPIDocumentProviderProps): import('react').JSX.Element;
16
16
  export default OpenAPIDocumentProvider;
@@ -27,5 +27,5 @@ interface OpenAPIRendererProps {
27
27
  * have a document as text rather than a pre-parsed object, e.g. user-entered
28
28
  * or loaded from a file at runtime.
29
29
  */
30
- export declare function OpenAPIRenderer({ raw, config, plugins, onDiagnostics, errorFallback, onError, initialLocation, onLocationChange, }: OpenAPIRendererProps): import("react").JSX.Element | null;
30
+ export declare function OpenAPIRenderer({ raw, config, plugins, onDiagnostics, errorFallback, onError, initialLocation, onLocationChange, }: OpenAPIRendererProps): import('react').JSX.Element | null;
31
31
  export {};
@@ -5,5 +5,5 @@ interface OperationProps {
5
5
  /** Which collapsed section search navigated to, e.g. `binding:kafka`. */
6
6
  focusSection?: string | null;
7
7
  }
8
- export default function Operation({ op, id, focusSection }: OperationProps): import("react").JSX.Element;
8
+ export default function Operation({ op, id, focusSection }: OperationProps): import('react').JSX.Element;
9
9
  export {};
@@ -8,5 +8,5 @@ interface OperationsProps {
8
8
  focusSection?: string | null;
9
9
  layout?: SectionLayout;
10
10
  }
11
- export default function Operations({ operations, selectedKey, onSelectKey, focusSection, layout }: OperationsProps): import("react").JSX.Element | null;
11
+ export default function Operations({ operations, selectedKey, onSelectKey, focusSection, layout }: OperationsProps): import('react').JSX.Element | null;
12
12
  export {};
@@ -33,5 +33,5 @@ interface OperationCallbacksProps {
33
33
  /** Nesting level of the parent operation, so a callback's own callbacks don't recurse without end. */
34
34
  depth: number;
35
35
  }
36
- export default function OperationCallbacks({ callbacks, id, renderOperation: RenderOperation, depth, }: OperationCallbacksProps): import("react").JSX.Element | null;
36
+ export default function OperationCallbacks({ callbacks, id, renderOperation: RenderOperation, depth, }: OperationCallbacksProps): import('react').JSX.Element | null;
37
37
  export {};
@@ -17,5 +17,5 @@ interface PathOperationProps {
17
17
  /** Nesting level. A callback's operation may declare callbacks of its own, so past the first level they stop expanding rather than recursing without end. */
18
18
  depth?: number;
19
19
  }
20
- export default function PathOperation({ method, path, op, id, idPrefix, globalSecurity, securitySchemes, onFollowOperation, isOperationKnown, depth, }: PathOperationProps): import("react").JSX.Element;
20
+ export default function PathOperation({ method, path, op, id, idPrefix, globalSecurity, securitySchemes, onFollowOperation, isOperationKnown, depth, }: PathOperationProps): import('react').JSX.Element;
21
21
  export {};
@@ -13,5 +13,5 @@ interface PathsProps {
13
13
  idPrefix?: string;
14
14
  layout?: SectionLayout;
15
15
  }
16
- export default function Paths({ paths, security, securitySchemes, selectedKey, onSelectKey, columnLabel, idPrefix, layout, }: PathsProps): import("react").JSX.Element | null;
16
+ export default function Paths({ paths, security, securitySchemes, selectedKey, onSelectKey, columnLabel, idPrefix, layout, }: PathsProps): import('react').JSX.Element | null;
17
17
  export {};
@@ -17,5 +17,5 @@ interface ResponseLinksProps {
17
17
  /** Whether `operationId` resolves to an operation in the current list, so the target can be a link rather than plain text. */
18
18
  isOperationKnown?: (operationId: string) => boolean;
19
19
  }
20
- export default function ResponseLinks({ links, onFollowOperation, isOperationKnown, }: ResponseLinksProps): import("react").JSX.Element;
20
+ export default function ResponseLinks({ links, onFollowOperation, isOperationKnown, }: ResponseLinksProps): import('react').JSX.Element;
21
21
  export {};
@@ -10,5 +10,5 @@ interface SchemasProps {
10
10
  } | null;
11
11
  layout?: SectionLayout;
12
12
  }
13
- export default function Schemas({ schemas, selectedKey, focusTarget, layout }: SchemasProps): import("react").JSX.Element;
13
+ export default function Schemas({ schemas, selectedKey, focusTarget, layout }: SchemasProps): import('react').JSX.Element;
14
14
  export {};
@@ -1,4 +1,4 @@
1
1
  import { OpenAPIServerData } from '../../types/openapi';
2
2
  type OpenAPIServerProps = OpenAPIServerData;
3
- export default function OpenAPIServer({ url, description, variables }: OpenAPIServerProps): import("react").JSX.Element;
3
+ export default function OpenAPIServer({ url, description, variables }: OpenAPIServerProps): import('react').JSX.Element;
4
4
  export {};
@@ -11,5 +11,5 @@ interface OpenAPIServersProps {
11
11
  * map — server keys here are stable positional indices ("server-0", ...),
12
12
  * displayed via each server's own `url`.
13
13
  */
14
- export default function OpenAPIServers({ servers, selectedServer, onSelectServer, layout }: OpenAPIServersProps): import("react").JSX.Element;
14
+ export default function OpenAPIServers({ servers, selectedServer, onSelectServer, layout }: OpenAPIServersProps): import('react').JSX.Element;
15
15
  export {};
@@ -5,5 +5,5 @@ interface ServerProps extends ServerInterface {
5
5
  /** Which collapsed section (if any) search navigated to, e.g. `binding:kafka`. */
6
6
  focusSection?: string | null;
7
7
  }
8
- export default function Server({ host, protocol, description, tags, variables, security, bindings, serverKey, focusSection, }: ServerProps): import("react").JSX.Element;
8
+ export default function Server({ host, protocol, description, tags, variables, security, bindings, serverKey, focusSection, }: ServerProps): import('react').JSX.Element;
9
9
  export {};
@@ -8,5 +8,5 @@ interface ServersProps {
8
8
  focusSection?: string | null;
9
9
  layout?: SectionLayout;
10
10
  }
11
- export default function Servers({ servers, selectedServer, onSelectServer, focusSection, layout }: ServersProps): import("react").JSX.Element;
11
+ export default function Servers({ servers, selectedServer, onSelectServer, focusSection, layout }: ServersProps): import('react').JSX.Element;
12
12
  export {};
@@ -26,6 +26,11 @@ interface DocumentContextBase {
26
26
  showExtensions: boolean;
27
27
  /** Whether to render per-operation / per-endpoint code samples. Defaults to true. */
28
28
  showCodeSamples: boolean;
29
+ /** Whether the built-in "Try it" panel is enabled. Optional, and absent
30
+ * means off — the one context flag that is opt-in, so a context assembled
31
+ * without it (a test fixture, a bare provider) can't switch it on by
32
+ * omission. See `ShowConfig.tryIt`. */
33
+ showTryIt?: boolean;
29
34
  /** Resolves the hosted URL serving a target as Markdown, if the consumer serves one (config.markdown.url). */
30
35
  markdownUrl?: MarkdownUrlResolver;
31
36
  /** Third-party plugins registered on the nearest `<AsyncAPI>`/`<OpenAPI>` (or provider), consumed via `PluginSlot`. Undefined is equivalent to none registered. */
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function m(e){const i="(_?[ui](8|16|32|64|128))?",l="(_?f(32|64))?",g="[a-zA-Z_]\\w*[!?=]?",s="[a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|[=!]~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~|]|//|//=|&[-+*]=?|&\\*\\*|\\[\\][=?]?",t="[A-Za-z_]\\w*(::\\w+)*(\\?|!)?",c={$pattern:g,keyword:"abstract alias annotation as as? asm begin break case class def do else elsif end ensure enum extend for fun if include instance_sizeof is_a? lib macro module next nil? of out pointerof private protected rescue responds_to? return require select self sizeof struct super then type typeof union uninitialized unless until verbatim when while with yield __DIR__ __END_LINE__ __FILE__ __LINE__",literal:"false nil true"},a={className:"subst",begin:/#\{/,end:/\}/,keywords:c},d={className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},b={className:"template-variable",variants:[{begin:"\\{\\{",end:"\\}\\}"},{begin:"\\{%",end:"%\\}"}],keywords:c};function n(S,A){const r=[{begin:S,end:A}];return r[0].contains=r,r}const _={className:"string",contains:[e.BACKSLASH_ESCAPE,a],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:"%[Qwi]?\\(",end:"\\)",contains:n("\\(","\\)")},{begin:"%[Qwi]?\\[",end:"\\]",contains:n("\\[","\\]")},{begin:"%[Qwi]?\\{",end:/\}/,contains:n(/\{/,/\}/)},{begin:"%[Qwi]?<",end:">",contains:n("<",">")},{begin:"%[Qwi]?\\|",end:"\\|"},{begin:/<<-\w+$/,end:/^\s*\w+$/}],relevance:0},E={className:"string",variants:[{begin:"%q\\(",end:"\\)",contains:n("\\(","\\)")},{begin:"%q\\[",end:"\\]",contains:n("\\[","\\]")},{begin:"%q\\{",end:/\}/,contains:n(/\{/,/\}/)},{begin:"%q<",end:">",contains:n("<",">")},{begin:"%q\\|",end:"\\|"},{begin:/<<-'\w+'$/,end:/^\s*\w+$/}],relevance:0},u={begin:"(?!%\\})("+e.RE_STARTERS_RE+"|\\n|\\b(case|if|select|unless|until|when|while)\\b)\\s*",keywords:"case if select unless until when while",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,a],variants:[{begin:"//[a-z]*",relevance:0},{begin:"/(?!\\/)",end:"/[a-z]*"}]}],relevance:0},T={className:"regexp",contains:[e.BACKSLASH_ESCAPE,a],variants:[{begin:"%r\\(",end:"\\)",contains:n("\\(","\\)")},{begin:"%r\\[",end:"\\]",contains:n("\\[","\\]")},{begin:"%r\\{",end:/\}/,contains:n(/\{/,/\}/)},{begin:"%r<",end:">",contains:n("<",">")},{begin:"%r\\|",end:"\\|"}],relevance:0},N={className:"meta",begin:"@\\[",end:"\\]",contains:[e.inherit(e.QUOTE_STRING_MODE,{className:"string"})]},o=[b,_,E,T,u,N,d,e.HASH_COMMENT_MODE,{className:"class",beginKeywords:"class module struct",end:"$|;",illegal:/=/,contains:[e.HASH_COMMENT_MODE,e.inherit(e.TITLE_MODE,{begin:t}),{begin:"<"}]},{className:"class",beginKeywords:"lib enum union",end:"$|;",illegal:/=/,contains:[e.HASH_COMMENT_MODE,e.inherit(e.TITLE_MODE,{begin:t})]},{beginKeywords:"annotation",end:"$|;",illegal:/=/,contains:[e.HASH_COMMENT_MODE,e.inherit(e.TITLE_MODE,{begin:t})],relevance:2},{className:"function",beginKeywords:"def",end:/\B\b/,contains:[e.inherit(e.TITLE_MODE,{begin:s,endsParent:!0})]},{className:"function",beginKeywords:"fun macro",end:/\B\b/,contains:[e.inherit(e.TITLE_MODE,{begin:s,endsParent:!0})],relevance:2},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":",contains:[_,{begin:s}],relevance:0},{className:"number",variants:[{begin:"\\b0b([01_]+)"+i},{begin:"\\b0o([0-7_]+)"+i},{begin:"\\b0x([A-Fa-f0-9_]+)"+i},{begin:"\\b([1-9][0-9_]*[0-9]|[0-9])(\\.[0-9][0-9_]*)?([eE]_?[-+]?[0-9_]*)?"+l+"(?!_)"},{begin:"\\b([1-9][0-9_]*|0)"+i}],relevance:0}];return a.contains=o,b.contains=o.slice(1),{name:"Crystal",aliases:["cr"],keywords:c,contains:o}}exports.default=m;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function m(e){const i="(_?[ui](8|16|32|64|128))?",l="(_?f(32|64))?",g="[a-zA-Z_]\\w*[!?=]?",s="[a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|[=!]~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~|]|//|//=|&[-+*]=?|&\\*\\*|\\[\\][=?]?",t="[A-Za-z_]\\w*(::\\w+)*(\\?|!)?",c={$pattern:g,keyword:"abstract alias annotation as as? asm begin break case class def do else elsif end ensure enum extend for fun if include instance_sizeof is_a? lib macro module next nil? of out pointerof private protected rescue responds_to? return require select self sizeof struct super then type typeof union uninitialized unless until verbatim when while with yield __DIR__ __END_LINE__ __FILE__ __LINE__",literal:"false nil true"},a={className:"subst",begin:/#\{/,end:/\}/,keywords:c},d={className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},b={className:"template-variable",variants:[{begin:"\\{\\{",end:"\\}\\}"},{begin:"\\{%",end:"%\\}"}],keywords:c};function n(S,A){const r=[{begin:S,end:A}];return r[0].contains=r,r}const _={className:"string",contains:[e.BACKSLASH_ESCAPE,a],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:"%[Qwi]?\\(",end:"\\)",contains:n("\\(","\\)")},{begin:"%[Qwi]?\\[",end:"\\]",contains:n("\\[","\\]")},{begin:"%[Qwi]?\\{",end:/\}/,contains:n(/\{/,/\}/)},{begin:"%[Qwi]?<",end:">",contains:n("<",">")},{begin:"%[Qwi]?\\|",end:"\\|"},{begin:/<<-\w+$/,end:/^\s*\w+$/}],relevance:0},E={className:"string",variants:[{begin:"%q\\(",end:"\\)",contains:n("\\(","\\)")},{begin:"%q\\[",end:"\\]",contains:n("\\[","\\]")},{begin:"%q\\{",end:/\}/,contains:n(/\{/,/\}/)},{begin:"%q<",end:">",contains:n("<",">")},{begin:"%q\\|",end:"\\|"},{begin:/<<-'\w+'$/,end:/^\s*\w+$/}],relevance:0},u={begin:"(?!%\\})("+e.RE_STARTERS_RE+"|\\n|\\b(case|if|select|unless|until|when|while)\\b)\\s*",keywords:"case if select unless until when while",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,a],begin:"/(?!\\/)",end:"/[a-z]*"}],relevance:0},T={className:"regexp",contains:[e.BACKSLASH_ESCAPE,a],variants:[{begin:"%r\\(",end:"\\)",contains:n("\\(","\\)")},{begin:"%r\\[",end:"\\]",contains:n("\\[","\\]")},{begin:"%r\\{",end:/\}/,contains:n(/\{/,/\}/)},{begin:"%r<",end:">",contains:n("<",">")},{begin:"%r\\|",end:"\\|"}],relevance:0},N={className:"meta",begin:"@\\[",end:"\\]",contains:[e.inherit(e.QUOTE_STRING_MODE,{className:"string"})]},o=[b,_,E,T,{begin:/\/\/=?/,relevance:0},u,N,d,e.HASH_COMMENT_MODE,{className:"class",beginKeywords:"class module struct",end:"$|;",illegal:/=/,contains:[e.HASH_COMMENT_MODE,e.inherit(e.TITLE_MODE,{begin:t}),{begin:"<"}]},{className:"class",beginKeywords:"lib enum union",end:"$|;",illegal:/=/,contains:[e.HASH_COMMENT_MODE,e.inherit(e.TITLE_MODE,{begin:t})]},{beginKeywords:"annotation",end:"$|;",illegal:/=/,contains:[e.HASH_COMMENT_MODE,e.inherit(e.TITLE_MODE,{begin:t})],relevance:2},{className:"function",beginKeywords:"def",end:/\B\b/,contains:[e.inherit(e.TITLE_MODE,{begin:s,endsParent:!0})]},{className:"function",beginKeywords:"fun macro",end:/\B\b/,contains:[e.inherit(e.TITLE_MODE,{begin:s,endsParent:!0})],relevance:2},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":",contains:[_,{begin:s}],relevance:0},{className:"number",variants:[{begin:"\\b0b([01_]+)"+i},{begin:"\\b0o([0-7_]+)"+i},{begin:"\\b0x([A-Fa-f0-9_]+)"+i},{begin:"\\b([1-9][0-9_]*[0-9]|[0-9])(\\.[0-9][0-9_]*)?([eE]_?[-+]?[0-9_]*)?"+l+"(?!_)"},{begin:"\\b([1-9][0-9_]*|0)"+i}],relevance:0}];return a.contains=o,b.contains=o.slice(1),{name:"Crystal",aliases:["cr"],keywords:c,contains:o}}exports.default=m;
@@ -1,4 +1,4 @@
1
- function S(n) {
1
+ function m(n) {
2
2
  const i = "(_?[ui](8|16|32|64|128))?", g = "(_?f(32|64))?", l = "[a-zA-Z_]\\w*[!?=]?", s = "[a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|[=!]~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~|]|//|//=|&[-+*]=?|&\\*\\*|\\[\\][=?]?", t = "[A-Za-z_]\\w*(::\\w+)*(\\?|!)?", c = {
3
3
  $pattern: l,
4
4
  keyword: "abstract alias annotation as as? asm begin break case class def do else elsif end ensure enum extend for fun if include instance_sizeof is_a? lib macro module next nil? of out pointerof private protected rescue responds_to? return require select self sizeof struct super then type typeof union uninitialized unless until verbatim when while with yield __DIR__ __END_LINE__ __FILE__ __LINE__",
@@ -27,11 +27,11 @@ function S(n) {
27
27
  ],
28
28
  keywords: c
29
29
  };
30
- function e(A, w) {
30
+ function e(S, A) {
31
31
  const r = [
32
32
  {
33
- begin: A,
34
- end: w
33
+ begin: S,
34
+ end: A
35
35
  }
36
36
  ];
37
37
  return r[0].contains = r, r;
@@ -118,7 +118,7 @@ function S(n) {
118
118
  }
119
119
  ],
120
120
  relevance: 0
121
- }, u = {
121
+ }, T = {
122
122
  begin: "(?!%\\})(" + n.RE_STARTERS_RE + "|\\n|\\b(case|if|select|unless|until|when|while)\\b)\\s*",
123
123
  keywords: "case if select unless until when while",
124
124
  contains: [
@@ -128,20 +128,27 @@ function S(n) {
128
128
  n.BACKSLASH_ESCAPE,
129
129
  a
130
130
  ],
131
- variants: [
132
- {
133
- begin: "//[a-z]*",
134
- relevance: 0
135
- },
136
- {
137
- begin: "/(?!\\/)",
138
- end: "/[a-z]*"
139
- }
140
- ]
131
+ // Unlike Ruby, Crystal has no "empty regex" (`//`) literal syntax,
132
+ // since `//` is already used for integer division. Treating it as
133
+ // a regex here would also make this variant swallow the rest of
134
+ // the line (or file) whenever `//` appears at the start of a
135
+ // statement, since there would be no closing delimiter to match.
136
+ //
137
+ // INTEGER_DIVISION (above, given priority over this REGEXP mode)
138
+ // already handles the common case where `//` starts matching at the
139
+ // same position as this mode, e.g. mid-expression like
140
+ // `something // 4`. But this outer REGEXP mode's `begin` can also
141
+ // start matching one character earlier, at a preceding newline
142
+ // (via its `\n` alternative), when `//`/`//=` is the first thing on
143
+ // a line; in that case INTEGER_DIVISION never gets a chance to
144
+ // compete, so this lookahead is what stops `//` from being
145
+ // misclassified as a regexp there too.
146
+ begin: "/(?!\\/)",
147
+ end: "/[a-z]*"
141
148
  }
142
149
  ],
143
150
  relevance: 0
144
- }, T = {
151
+ }, u = {
145
152
  className: "regexp",
146
153
  contains: [
147
154
  n.BACKSLASH_ESCAPE,
@@ -183,8 +190,12 @@ function S(n) {
183
190
  b,
184
191
  _,
185
192
  E,
186
- T,
187
193
  u,
194
+ {
195
+ begin: /\/\/=?/,
196
+ relevance: 0
197
+ },
198
+ T,
188
199
  N,
189
200
  d,
190
201
  n.HASH_COMMENT_MODE,
@@ -279,5 +290,5 @@ function S(n) {
279
290
  };
280
291
  }
281
292
  export {
282
- S as default
293
+ m as default
283
294
  };