@redocly/redoc-reef 0.140.0-next.4 → 0.140.0-next.5

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 (103) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/dist/cli/generate/get-schema-template.js +1 -1
  3. package/dist/client/app/hooks/markdown/useMarkdocRenderer.js +1 -1
  4. package/dist/client/app/hooks/markdown/useMarkdownText.js +1 -1
  5. package/dist/client/app/markdoc/custom-components/openapi/use-markdown-adapter.d.ts +1 -33
  6. package/dist/markdoc/attributes/definition-path.d.ts +1 -1
  7. package/dist/markdoc/attributes/json-example-ref.d.ts +1 -1
  8. package/dist/markdoc/attributes/json-schema-ref.d.ts +1 -1
  9. package/dist/markdoc/attributes/parsed-yaml.d.ts +1 -1
  10. package/dist/markdoc/attributes/raw-content.d.ts +1 -1
  11. package/dist/markdoc/attributes/sample-from-json-schema.d.ts +1 -1
  12. package/dist/markdoc/helpers/extract-rbac-from-condition-node.d.ts +1 -1
  13. package/dist/markdoc/helpers/get-inner-text.d.ts +1 -1
  14. package/dist/markdoc/helpers/get-node-attribute.d.ts +1 -1
  15. package/dist/markdoc/helpers/get-variable.d.ts +1 -1
  16. package/dist/markdoc/helpers/guards/is-conditional-node.d.ts +1 -1
  17. package/dist/markdoc/helpers/guards/is-function.d.ts +1 -1
  18. package/dist/markdoc/helpers/guards/is-node.d.ts +1 -1
  19. package/dist/markdoc/helpers/guards/is-prompt-node.d.ts +1 -1
  20. package/dist/markdoc/helpers/guards/is-tag.d.ts +1 -1
  21. package/dist/markdoc/helpers/guards/is-variable.d.ts +1 -1
  22. package/dist/markdoc/helpers/parse-partials.d.ts +1 -1
  23. package/dist/markdoc/helpers/parse-partials.js +1 -1
  24. package/dist/markdoc/helpers/remove-markdoc-tags.js +1 -1
  25. package/dist/markdoc/helpers/set-node-attribute-value.d.ts +1 -1
  26. package/dist/markdoc/nodes/fence/index.d.ts +1 -1
  27. package/dist/markdoc/nodes/fence/index.js +1 -1
  28. package/dist/markdoc/nodes/gfm-list-item.d.ts +1 -1
  29. package/dist/markdoc/nodes/gfm-list-item.js +1 -1
  30. package/dist/markdoc/nodes/heading.d.ts +1 -1
  31. package/dist/markdoc/nodes/heading.js +1 -1
  32. package/dist/markdoc/nodes/index.d.ts +6 -165
  33. package/dist/markdoc/nodes/index.js +1 -1
  34. package/dist/markdoc/nodes/table.d.ts +1 -1
  35. package/dist/markdoc/nodes/table.js +1 -1
  36. package/dist/markdoc/nodes/text.d.ts +1 -1
  37. package/dist/markdoc/tags/json-example.js +1 -1
  38. package/dist/server/esbuild/plugins/dependency-resolver.js +1 -1
  39. package/dist/server/plugins/api-docs/loader.d.ts +1 -1
  40. package/dist/server/plugins/markdown/attribute-resolvers/code-walkthrough/filesets-resolver.d.ts +1 -1
  41. package/dist/server/plugins/markdown/attribute-resolvers/helpers/load-openapi-bundle.d.ts +1 -1
  42. package/dist/server/plugins/markdown/attribute-resolvers/index.d.ts +1 -1
  43. package/dist/server/plugins/markdown/attribute-resolvers/resolve-code-snippet-from-file.d.ts +1 -1
  44. package/dist/server/plugins/markdown/attribute-resolvers/resolve-diagram-from-file.d.ts +1 -1
  45. package/dist/server/plugins/markdown/attribute-resolvers/resolve-html-href.d.ts +1 -1
  46. package/dist/server/plugins/markdown/attribute-resolvers/resolve-html-source-attribute.d.ts +1 -1
  47. package/dist/server/plugins/markdown/attribute-resolvers/resolve-image-gallery.d.ts +1 -1
  48. package/dist/server/plugins/markdown/attribute-resolvers/resolve-image-src-set.d.ts +1 -1
  49. package/dist/server/plugins/markdown/attribute-resolvers/resolve-image-src.d.ts +1 -1
  50. package/dist/server/plugins/markdown/attribute-resolvers/resolve-json-example-ref.d.ts +1 -1
  51. package/dist/server/plugins/markdown/attribute-resolvers/resolve-json-schema-ref.d.ts +1 -1
  52. package/dist/server/plugins/markdown/attribute-resolvers/resolve-link.d.ts +1 -1
  53. package/dist/server/plugins/markdown/attribute-resolvers/resolve-native-md-link.d.ts +1 -1
  54. package/dist/server/plugins/markdown/attribute-resolvers/resolve-nav-links.d.ts +1 -1
  55. package/dist/server/plugins/markdown/attribute-resolvers/resolve-open-api-ref.d.ts +1 -1
  56. package/dist/server/plugins/markdown/attribute-resolvers/resolve-openapi-code-samples.d.ts +1 -1
  57. package/dist/server/plugins/markdown/attribute-resolvers/resolve-openapi-response-samples.d.ts +1 -1
  58. package/dist/server/plugins/markdown/attribute-resolvers/resolve-parsed-yaml.d.ts +1 -1
  59. package/dist/server/plugins/markdown/attribute-resolvers/resolve-raw-content.d.ts +1 -1
  60. package/dist/server/plugins/markdown/attribute-resolvers/resolve-relative-or-cdn-icon.d.ts +1 -1
  61. package/dist/server/plugins/markdown/attribute-resolvers/resolve-relative-path.d.ts +1 -1
  62. package/dist/server/plugins/markdown/attribute-resolvers/resolve-sample-from-json-schema.d.ts +1 -1
  63. package/dist/server/plugins/markdown/attribute-resolvers/resolve-svg-content.d.ts +1 -1
  64. package/dist/server/plugins/markdown/attribute-resolvers/resolve-tag-raw-content.d.ts +1 -1
  65. package/dist/server/plugins/markdown/attribute-resolvers/resolve-tag-raw-content.js +2 -2
  66. package/dist/server/plugins/markdown/attribute-resolvers/utils.d.ts +1 -1
  67. package/dist/server/plugins/markdown/compiler.d.ts +1 -1
  68. package/dist/server/plugins/markdown/compiler.js +1 -1
  69. package/dist/server/plugins/markdown/errors.d.ts +1 -1
  70. package/dist/server/plugins/markdown/get-server-props.js +1 -1
  71. package/dist/server/plugins/markdown/html/normalize-html-headings.d.ts +1 -1
  72. package/dist/server/plugins/markdown/html/normalize-html-headings.js +1 -1
  73. package/dist/server/plugins/markdown/markdoc/functions/concat.d.ts +1 -1
  74. package/dist/server/plugins/markdown/markdoc/markdoc-options.d.ts +5 -165
  75. package/dist/server/plugins/markdown/markdoc/markdoc-options.js +1 -1
  76. package/dist/server/plugins/markdown/markdoc/partials.d.ts +1 -1
  77. package/dist/server/plugins/markdown/markdoc/plugins/headings.d.ts +1 -1
  78. package/dist/server/plugins/markdown/markdoc/plugins/utils.d.ts +1 -1
  79. package/dist/server/plugins/markdown/markdoc/reparse-example-fences.d.ts +1 -1
  80. package/dist/server/plugins/markdown/markdoc/reparse-example-fences.js +1 -1
  81. package/dist/server/plugins/markdown/runtime-transform.d.ts +2 -2
  82. package/dist/server/plugins/markdown/runtime-transform.js +1 -1
  83. package/dist/server/plugins/markdown/search/get-ai-search-documents.js +1 -1
  84. package/dist/server/plugins/markdown/search/nodes/section-node.d.ts +1 -1
  85. package/dist/server/plugins/markdown/search/search-resolver.js +1 -1
  86. package/dist/server/plugins/markdown/search/to-markdown.d.ts +1 -1
  87. package/dist/server/plugins/markdown/search/walk-sections.d.ts +1 -1
  88. package/dist/server/plugins/markdown/search/walk-sections.js +1 -1
  89. package/dist/server/plugins/markdown/utils/stringify-tag-children-objects.d.ts +1 -1
  90. package/dist/server/store.d.ts +1 -1
  91. package/dist/server/store.js +1 -1
  92. package/dist/server/types/plugins/common.d.ts +1 -1
  93. package/dist/server/utils/codeframes/codeframes.d.ts +1 -1
  94. package/dist/server/utils/codeframes/yaml-ast.d.ts +1 -1
  95. package/dist/types/errors.d.ts +1 -1
  96. package/dist/types/markdoc.d.ts +1 -1
  97. package/package.json +6 -6
  98. package/dist/server/plugins/markdown/html/html-jsx-attribute-mapping.d.ts +0 -6
  99. package/dist/server/plugins/markdown/html/html-jsx-attribute-mapping.js +0 -1
  100. package/dist/server/plugins/markdown/html/process-html-tokens.d.ts +0 -2
  101. package/dist/server/plugins/markdown/html/process-html-tokens.js +0 -1
  102. package/dist/server/plugins/markdown/source.d.ts +0 -4
  103. package/dist/server/plugins/markdown/source.js +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,32 @@
1
1
  # @redocly/redoc-reef
2
2
 
3
+ ## 0.140.0-next.5
4
+
5
+ ### Minor Changes
6
+
7
+ - 1427a7a148b: Added support for GitHub alert syntax in Markdown pages: `> [!NOTE]`, `> [!TIP]`, `> [!IMPORTANT]`, `> [!WARNING]`, and `> [!CAUTION]` render as admonitions.
8
+ - 1427a7a148b: Switched Markdoc to `@redocly/markdoc`, Redocly's fork of Markdoc.
9
+ Custom tags that import from `@markdoc/markdoc` keep working.
10
+ - fe438812a35: Added the `alt` attribute to the `inline-svg` Markdoc tag, which gives the SVG an accessible name for people who use assistive technologies.
11
+
12
+ ### Patch Changes
13
+
14
+ - 193788e3f12: Fixed an issue in API docs where content shifted on load when users opened a direct link to an operation or a tag.
15
+ - 6ede6bd88ca: Fixed an issue where the mock server returned values from earlier requests in later responses.
16
+ - a879730b94d: Fixed an issue where API docs displayed error on pages translated with the browser translation feature.
17
+ - 1427a7a148b: Fixed raw HTML in Markdown pages and API descriptions: boolean attributes such as `<details open>` take effect, and `style` values that contain semicolons, such as data URLs, are kept.
18
+ - b363f7119d0: Fixed an issue in the **Try it** console in OpenAPI docs where the **History** tab listed requests by path instead of operation name.
19
+ - Updated dependencies [193788e3f12]
20
+ - Updated dependencies [1427a7a148b]
21
+ - Updated dependencies [a879730b94d]
22
+ - Updated dependencies [1427a7a148b]
23
+ - Updated dependencies [1427a7a148b]
24
+ - Updated dependencies [abe82fc0fc2]
25
+ - Updated dependencies [fe438812a35]
26
+ - @redocly/api-docs@0.5.0-next.3
27
+ - @redocly/theme@0.72.0-next.2
28
+ - @redocly/portal-plugin-mock-server@0.25.0-next.0
29
+
3
30
  ## 0.140.0-next.4
4
31
 
5
32
  ### Patch Changes
@@ -1,4 +1,4 @@
1
- import{capitalize as t}from"./string-utils.js";const r=e=>`import { Schema } from '@markdoc/markdoc';
1
+ import{capitalize as t}from"./string-utils.js";const r=e=>`import { Schema } from '@redocly/markdoc';
2
2
 
3
3
  export const ${e}: Schema = {
4
4
  attributes: {},
@@ -1 +1 @@
1
- import*as t from"react";import{useMemo as n}from"react";import m from"@markdoc/markdoc";import{components as s}from"@redocly-markdoc/components";import{components as p}from"@redocly/theme/markdoc/default";import{isTag as c}from"../../../../markdoc/helpers/guards/is-tag";const d=r=>n(()=>{if(!r)return null;let o;if(typeof r=="string")try{o=JSON.parse(r)}catch(e){return console.error("Error parsing AST string:",e),null}else o=r;return c(o)?m.renderers.react(o,t,{components:{...globalThis.__LOADER?.markdocComponents,...p,...s}}):null},[r]);export{d as useMarkdocRenderer};
1
+ import*as t from"react";import{useMemo as n}from"react";import m from"@redocly/markdoc";import{components as s}from"@redocly-markdoc/components";import{components as p}from"@redocly/theme/markdoc/default";import{isTag as c}from"../../../../markdoc/helpers/guards/is-tag";const d=r=>n(()=>{if(!r)return null;let o;if(typeof r=="string")try{o=JSON.parse(r)}catch(e){return console.error("Error parsing AST string:",e),null}else o=r;return c(o)?m.renderers.react(o,t,{components:{...globalThis.__LOADER?.markdocComponents,...p,...s}}):null},[r]);export{d as useMarkdocRenderer};
@@ -1 +1 @@
1
- import m,{useMemo as h}from"react";import{parse as p,transform as u,renderers as b,Tag as g,nodes as d}from"@markdoc/markdoc";import{CodeBlock as k}from"@redocly/theme/components/CodeBlock/CodeBlock";import{tags as C,components as y}from"@redocly/theme/markdoc/default";const N=Object.fromEntries(Object.entries(y).filter(([,t])=>typeof t=="function")),T=t=>/\{%\s*(?:\/?\w+(?:-\w+)*|\/)(?:\s[^%]*)?(?:\/%|%\})/.test(t),w=(t,e)=>{try{const r=u(t,e);return Array.isArray(r)?r:[r]}catch(r){console.error("Error transforming node:",r)}return[]},l=(t,e,r,n)=>new g("CodeBlock",{...t,header:{title:n,controls:{copy:{}}},source:e,lang:r},[]),A=(t,e)=>{const r=t.transformAttributes(e),n=r["data-language"]||"markdoc",c=r["data-title"],o=t.attributes.content||"",a=l(r,o,n,c),s=[];if(!t.children||t.children.length<=1)return{codeNode:a,contentNodes:s};for(const i of t.children){if(!i)continue;const f=w(i,e);s.push(...f)}return{codeNode:a,contentNodes:s}},F=(t,e)=>{const r=t.transformAttributes(e),n=r["data-language"],c=r["data-title"],o=t.attributes.content||"";if(!T(o)||!t.children||t.children.length===0)return l(r,o,n,c);const a=t.children[0];if(!a||a.type!=="tag")return l(r,o,n,c);const{codeNode:s,contentNodes:i}=A(t,e);return new g("Fragment",{},[s,...i])},x=t=>h(()=>{if(!t)return null;const r=p(t),n=u(r,{tags:C,nodes:{document:{...d.document,render:"div"},fence:{...d.fence,attributes:{...d.fence.attributes,label:{type:String,render:"data-label"},title:{type:String,render:"data-title"},highlight:{type:String,render:"data-highlight"}},transform:F}}});return b.react(n,m,{components:{...N,CodeBlock:k,Fragment:m.Fragment}})},[t]);export{T as containsMarkdocTags,x as useMarkdownText};
1
+ import m,{useMemo as h}from"react";import{parse as p,transform as u,renderers as b,Tag as g,nodes as d}from"@redocly/markdoc";import{CodeBlock as k}from"@redocly/theme/components/CodeBlock/CodeBlock";import{tags as C,components as y}from"@redocly/theme/markdoc/default";const N=Object.fromEntries(Object.entries(y).filter(([,t])=>typeof t=="function")),T=t=>/\{%\s*(?:\/?\w+(?:-\w+)*|\/)(?:\s[^%]*)?(?:\/%|%\})/.test(t),w=(t,e)=>{try{const r=u(t,e);return Array.isArray(r)?r:[r]}catch(r){console.error("Error transforming node:",r)}return[]},l=(t,e,r,n)=>new g("CodeBlock",{...t,header:{title:n,controls:{copy:{}}},source:e,lang:r},[]),A=(t,e)=>{const r=t.transformAttributes(e),n=r["data-language"]||"markdoc",c=r["data-title"],o=t.attributes.content||"",a=l(r,o,n,c),s=[];if(!t.children||t.children.length<=1)return{codeNode:a,contentNodes:s};for(const i of t.children){if(!i)continue;const f=w(i,e);s.push(...f)}return{codeNode:a,contentNodes:s}},F=(t,e)=>{const r=t.transformAttributes(e),n=r["data-language"],c=r["data-title"],o=t.attributes.content||"";if(!T(o)||!t.children||t.children.length===0)return l(r,o,n,c);const a=t.children[0];if(!a||a.type!=="tag")return l(r,o,n,c);const{codeNode:s,contentNodes:i}=A(t,e);return new g("Fragment",{},[s,...i])},x=t=>h(()=>{if(!t)return null;const r=p(t),n=u(r,{tags:C,nodes:{document:{...d.document,render:"div"},fence:{...d.fence,attributes:{...d.fence.attributes,label:{type:String,render:"data-label"},title:{type:String,render:"data-title"},highlight:{type:String,render:"data-highlight"}},transform:F}}});return b.react(n,m,{components:{...N,CodeBlock:k,Fragment:m.Fragment}})},[t]);export{T as containsMarkdocTags,x as useMarkdownText};
@@ -3,39 +3,7 @@ import { MarkdownLink } from '@redocly/theme/markdoc/components/MarkdownLink/Mar
3
3
  /** Routes description links through portal `Link` (path prefix, locale, etc.). */
4
4
  export declare const markdocOptions: {
5
5
  nodes: {
6
- link: {
7
- attributes?: Record<string, import("@markdoc/markdoc").SchemaAttribute>;
8
- slots?: Record<string, import("@markdoc/markdoc").SchemaSlot>;
9
- selfClosing?: boolean;
10
- inline?: boolean;
11
- transform?(node: import("@markdoc/markdoc").Node, config: Readonly<Partial<{
12
- nodes: Partial<Record<import("@markdoc/markdoc").NodeType, import("@markdoc/markdoc").Schema<Partial</*elided*/ any>, string>>>;
13
- tags: Record<string, import("@markdoc/markdoc").Schema>;
14
- variables: Record<string, any>;
15
- functions: Record<string, import("@markdoc/markdoc").ConfigFunction>;
16
- partials: Record<string, any>;
17
- validation?: {
18
- parents?: import("@markdoc/markdoc").Node[];
19
- validateFunctions?: boolean;
20
- environment?: string;
21
- };
22
- }>>): import("@markdoc/markdoc").MaybePromise<import("@markdoc/markdoc").RenderableTreeNodes>;
23
- validate?(node: import("@markdoc/markdoc").Node, config: Readonly<Partial<{
24
- nodes: Partial<Record<import("@markdoc/markdoc").NodeType, import("@markdoc/markdoc").Schema<Partial</*elided*/ any>, string>>>;
25
- tags: Record<string, import("@markdoc/markdoc").Schema>;
26
- variables: Record<string, any>;
27
- functions: Record<string, import("@markdoc/markdoc").ConfigFunction>;
28
- partials: Record<string, any>;
29
- validation?: {
30
- parents?: import("@markdoc/markdoc").Node[];
31
- validateFunctions?: boolean;
32
- environment?: string;
33
- };
34
- }>>): import("@markdoc/markdoc").MaybePromise<import("@markdoc/markdoc").ValidationError[]>;
35
- description?: string;
36
- render: string;
37
- children: string[];
38
- };
6
+ link: import("@markdoc/markdoc").Schema;
39
7
  };
40
8
  components: {
41
9
  MarkdownLink: typeof MarkdownLink;
@@ -1,4 +1,4 @@
1
- import type { CustomAttributeTypeInterface, ValidationError } from '@markdoc/markdoc';
1
+ import type { CustomAttributeTypeInterface, ValidationError } from '@redocly/markdoc';
2
2
  export declare class DefinitionPath implements CustomAttributeTypeInterface {
3
3
  validate(_value: string): ValidationError[];
4
4
  static resolver: string;
@@ -1,4 +1,4 @@
1
- import type { CustomAttributeTypeInterface, ValidationError } from '@markdoc/markdoc';
1
+ import type { CustomAttributeTypeInterface, ValidationError } from '@redocly/markdoc';
2
2
  export declare class JsonExampleRef implements CustomAttributeTypeInterface {
3
3
  validate(_value: string): ValidationError[];
4
4
  static resolver: string;
@@ -1,4 +1,4 @@
1
- import type { CustomAttributeTypeInterface, ValidationError } from '@markdoc/markdoc';
1
+ import type { CustomAttributeTypeInterface, ValidationError } from '@redocly/markdoc';
2
2
  export declare class JsonSchemaRef implements CustomAttributeTypeInterface {
3
3
  validate(_value: string): ValidationError[];
4
4
  static resolver: string;
@@ -1,4 +1,4 @@
1
- import type { CustomAttributeTypeInterface, ValidationError } from '@markdoc/markdoc';
1
+ import type { CustomAttributeTypeInterface, ValidationError } from '@redocly/markdoc';
2
2
  export declare class ParsedYaml implements CustomAttributeTypeInterface {
3
3
  validate(_value: string): ValidationError[];
4
4
  static resolver: string;
@@ -1,4 +1,4 @@
1
- import type { CustomAttributeTypeInterface, ValidationError } from '@markdoc/markdoc';
1
+ import type { CustomAttributeTypeInterface, ValidationError } from '@redocly/markdoc';
2
2
  export declare class RawContent implements CustomAttributeTypeInterface {
3
3
  validate(_value: string): ValidationError[];
4
4
  static resolver: string;
@@ -1,4 +1,4 @@
1
- import type { CustomAttributeTypeInterface, ValidationError } from '@markdoc/markdoc';
1
+ import type { CustomAttributeTypeInterface, ValidationError } from '@redocly/markdoc';
2
2
  export declare class SampleFromJsonSchema implements CustomAttributeTypeInterface {
3
3
  validate(_value: string): ValidationError[];
4
4
  static resolver: string;
@@ -1,4 +1,4 @@
1
- import type { Node } from '@markdoc/markdoc';
1
+ import type { Node } from '@redocly/markdoc';
2
2
  /**
3
3
  * Extracts RBAC team(s) from a conditional Markdoc node.
4
4
  *
@@ -1,4 +1,4 @@
1
- import type { Function, Node, RenderableTreeNode, Variable } from '@markdoc/markdoc';
1
+ import type { Function, Node, RenderableTreeNode, Variable } from '@redocly/markdoc';
2
2
  import type { GetInnerContentFnOptions } from '../../types/index.js';
3
3
  /**
4
4
  * Extracts and concatenates the inner text content from a tree of renderable nodes.
@@ -1,4 +1,4 @@
1
- import type { Node, Tag } from '@markdoc/markdoc';
1
+ import type { Node, Tag } from '@redocly/markdoc';
2
2
  /**
3
3
  * Retrieves the value of a given attribute from a Markdoc `Node` or `Tag`.
4
4
  *
@@ -1,4 +1,4 @@
1
- import type { Variable } from '@markdoc/markdoc';
1
+ import type { Variable } from '@redocly/markdoc';
2
2
  /**
3
3
  * Resolves the value of a Markdoc `Variable` node.
4
4
  *
@@ -1,4 +1,4 @@
1
- import type { Node } from '@markdoc/markdoc';
1
+ import type { Node } from '@redocly/markdoc';
2
2
  /**
3
3
  * Checks whether a given value is a Markdoc `Node` representing a conditional (`if`) tag.
4
4
  *
@@ -1,4 +1,4 @@
1
- import type { Function } from '@markdoc/markdoc';
1
+ import type { Function } from '@redocly/markdoc';
2
2
  /**
3
3
  * Checks whether the given value is a Markdoc `Function` node.
4
4
  *
@@ -1,4 +1,4 @@
1
- import type { Node } from '@markdoc/markdoc';
1
+ import type { Node } from '@redocly/markdoc';
2
2
  /**
3
3
  * Checks whether the given value is a Markdoc `Node`.
4
4
  *
@@ -1,4 +1,4 @@
1
- import type { Node } from '@markdoc/markdoc';
1
+ import type { Node } from '@redocly/markdoc';
2
2
  import { PROMPT_TAG } from '@redocly/theme/core/constants';
3
3
  /**
4
4
  * Checks if a given value is a Markdoc `prompt` tag node.
@@ -1,4 +1,4 @@
1
- import type { Tag } from '@markdoc/markdoc';
1
+ import type { Tag } from '@redocly/markdoc';
2
2
  /**
3
3
  * Checks if the given value is a Markdoc `Tag` node.
4
4
  *
@@ -1,4 +1,4 @@
1
- import type { Variable } from '@markdoc/markdoc';
1
+ import type { Variable } from '@redocly/markdoc';
2
2
  /**
3
3
  * Checks if a given value is a Markdoc `Variable`.
4
4
  *
@@ -1,3 +1,3 @@
1
- import { type Node } from '@markdoc/markdoc';
1
+ import { type Node } from '@redocly/markdoc';
2
2
  export declare function parsePartials(partials?: Record<string, any>): Record<string, Node[] | Node> | undefined;
3
3
  //# sourceMappingURL=parse-partials.d.ts.map
@@ -1 +1 @@
1
- import{Ast as i}from"@markdoc/markdoc";function o(r){if(r)return Object.entries(r).reduce((e,[t,n])=>(e[t]=i.fromJSON(JSON.stringify(n)),e),{})}export{o as parsePartials};
1
+ import{Ast as i}from"@redocly/markdoc";function o(r){if(r)return Object.entries(r).reduce((e,[t,n])=>(e[t]=i.fromJSON(JSON.stringify(n)),e),{})}export{o as parsePartials};
@@ -1 +1 @@
1
- import n from"@markdoc/markdoc";import{skipAgentsOnlyContent as e}from"@redocly/theme/markdoc/tags/visibility";import{getInnerText as t}from"./get-inner-text.js";function a(r){if(!r)return r;const o=n.parse(r);return t([o],{renderTag:e})}export{a as removeMarkdocTags};
1
+ import n from"@redocly/markdoc";import{skipAgentsOnlyContent as e}from"@redocly/theme/markdoc/tags/visibility";import{getInnerText as t}from"./get-inner-text.js";function a(r){if(!r)return r;const o=n.parse(r);return t([o],{renderTag:e})}export{a as removeMarkdocTags};
@@ -1,4 +1,4 @@
1
- import type { Node, Tag } from '@markdoc/markdoc';
1
+ import type { Node, Tag } from '@redocly/markdoc';
2
2
  /**
3
3
  * Sets or updates the value of a specific attribute on a Markdoc `Node` or `Tag`.
4
4
  *
@@ -1,3 +1,3 @@
1
- import type { Schema } from '@markdoc/markdoc';
1
+ import type { Schema } from '@redocly/markdoc';
2
2
  export declare const fence: Schema;
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- import a from"@markdoc/markdoc";import{EXAMPLE_CONTENT_ATTRIBUTE as m}from"@redocly/theme/core/constants";import{isPrimitive as f}from"../../../utils/guards/is-primitive.js";import{isStringNode as o}from"../../helpers/guards/is-string-node.js";import{isTag as u}from"../../helpers/guards/is-tag.js";const g=a.nodes.fence,y={...g,attributes:{...g.attributes,label:{type:String,render:"data-label"},title:{type:String,render:"data-title"},highlight:{type:String,render:"data-highlight"},align:{type:String,matches:["left","center","right"]},width:{type:String},[m]:{type:Object,render:!1}},transform(e,s){const r=e.transformAttributes(s);let t=e.transformChildren(s);const n=r["data-language"],l=r["data-title"];switch(e.attributes.process===!1&&(t=[e.attributes.content]),n){case"mermaid":case"excalidraw":case"plantuml":return o(t[0])?new a.Tag("Diagram",{...r,diagramType:n,diagramSource:t[0]},t):new a.Tag(e.tag,r,t);default:{const c=t.map(i=>f(i)?i.toString():u(i)?i?.attributes?.rawtag:"").join("");return o(t[0])?new a.Tag("CodeBlock",{...r,header:{title:l,controls:{copy:{}}},source:c,lang:n},[]):new a.Tag(e.tag,r,t)}}}};export{y as fence};
1
+ import a from"@redocly/markdoc";import{EXAMPLE_CONTENT_ATTRIBUTE as m}from"@redocly/theme/core/constants";import{isPrimitive as f}from"../../../utils/guards/is-primitive.js";import{isStringNode as o}from"../../helpers/guards/is-string-node.js";import{isTag as u}from"../../helpers/guards/is-tag.js";const g=a.nodes.fence,y={...g,attributes:{...g.attributes,label:{type:String,render:"data-label"},title:{type:String,render:"data-title"},highlight:{type:String,render:"data-highlight"},align:{type:String,matches:["left","center","right"]},width:{type:String},[m]:{type:Object,render:!1}},transform(e,s){const r=e.transformAttributes(s);let t=e.transformChildren(s);const n=r["data-language"],l=r["data-title"];switch(e.attributes.process===!1&&(t=[e.attributes.content]),n){case"mermaid":case"excalidraw":case"plantuml":return o(t[0])?new a.Tag("Diagram",{...r,diagramType:n,diagramSource:t[0]},t):new a.Tag(e.tag,r,t);default:{const c=t.map(i=>f(i)?i.toString():u(i)?i?.attributes?.rawtag:"").join("");return o(t[0])?new a.Tag("CodeBlock",{...r,header:{title:l,controls:{copy:{}}},source:c,lang:n},[]):new a.Tag(e.tag,r,t)}}}};export{y as fence};
@@ -1,3 +1,3 @@
1
- import type { Schema } from '@markdoc/markdoc';
1
+ import type { Schema } from '@redocly/markdoc';
2
2
  export declare const item: Schema;
3
3
  //# sourceMappingURL=gfm-list-item.d.ts.map
@@ -1 +1 @@
1
- import r from"@markdoc/markdoc";import{isStringNode as n}from"../helpers/guards/is-string-node.js";const o=r.nodes.item,a=e=>e.match(/^\[[x ]\]/i),c=e=>!e.startsWith("[ ]"),h={...o,transform(e,s){const i=e.transformAttributes(s);let t=e.transformChildren(s);return n(t[0])&&a(t[0])&&(t=[new r.Tag("input",{checked:c(t[0]),type:"checkbox",readOnly:!0},[]),t[0].substring(3),...t.slice(1)]),new r.Tag("li",i,t)}};export{h as item};
1
+ import r from"@redocly/markdoc";import{isStringNode as n}from"../helpers/guards/is-string-node.js";const o=r.nodes.item,a=e=>e.match(/^\[[x ]\]/i),c=e=>!e.startsWith("[ ]"),h={...o,transform(e,s){const i=e.transformAttributes(s);let t=e.transformChildren(s);return n(t[0])&&a(t[0])&&(t=[new r.Tag("input",{checked:c(t[0]),type:"checkbox",readOnly:!0},[]),t[0].substring(3),...t.slice(1)]),new r.Tag("li",i,t)}};export{h as item};
@@ -1,3 +1,3 @@
1
- import type { Schema } from '@markdoc/markdoc';
1
+ import type { Schema } from '@redocly/markdoc';
2
2
  export declare const heading: Schema;
3
3
  //# sourceMappingURL=heading.d.ts.map
@@ -1 +1 @@
1
- import s from"@markdoc/markdoc";import{slugger as l}from"../../utils/slugger.js";import{getInnerText as a}from"../helpers/get-inner-text.js";const d={children:["inline"],attributes:{id:{type:String},level:{type:Number,required:!0,default:1},__idx:{type:Number}},transform(e,r){const t=e.transformAttributes(r),i=e.transformChildren(r),n=typeof t.id=="string"?t.id:l.slug(a(i),{replaceDots:!0,replaceSlashes:!0});return new s.Tag("Heading",{...t,id:n,level:e.attributes.level},i)}};export{d as heading};
1
+ import s from"@redocly/markdoc";import{slugger as l}from"../../utils/slugger.js";import{getInnerText as a}from"../helpers/get-inner-text.js";const d={children:["inline"],attributes:{id:{type:String},level:{type:Number,required:!0,default:1},__idx:{type:Number}},transform(e,r){const t=e.transformAttributes(r),i=e.transformChildren(r),n=typeof t.id=="string"?t.id:l.slug(a(i),{replaceDots:!0,replaceSlashes:!0});return new s.Tag("Heading",{...t,id:n,level:e.attributes.level},i)}};export{d as heading};
@@ -1,171 +1,12 @@
1
+ import type { Schema } from '@redocly/markdoc';
1
2
  export * from './gfm-list-item.js';
2
3
  export * from './heading.js';
3
4
  export * from './fence/index.js';
4
5
  export * from './table.js';
5
6
  export * from './text.js';
6
- export declare const strong: {
7
- render?: string | undefined;
8
- attributes?: Record<string, import("@markdoc/markdoc").SchemaAttribute>;
9
- slots?: Record<string, import("@markdoc/markdoc").SchemaSlot>;
10
- selfClosing?: boolean;
11
- inline?: boolean;
12
- transform?(node: import("@markdoc/markdoc").Node, config: Readonly<Partial<{
13
- nodes: Partial<Record<import("@markdoc/markdoc").NodeType, import("@markdoc/markdoc").Schema<Partial</*elided*/ any>, string>>>;
14
- tags: Record<string, import("@markdoc/markdoc").Schema>;
15
- variables: Record<string, any>;
16
- functions: Record<string, import("@markdoc/markdoc").ConfigFunction>;
17
- partials: Record<string, any>;
18
- validation?: {
19
- parents?: import("@markdoc/markdoc").Node[];
20
- validateFunctions?: boolean;
21
- environment?: string;
22
- };
23
- }>>): import("@markdoc/markdoc").MaybePromise<import("@markdoc/markdoc").RenderableTreeNodes>;
24
- validate?(node: import("@markdoc/markdoc").Node, config: Readonly<Partial<{
25
- nodes: Partial<Record<import("@markdoc/markdoc").NodeType, import("@markdoc/markdoc").Schema<Partial</*elided*/ any>, string>>>;
26
- tags: Record<string, import("@markdoc/markdoc").Schema>;
27
- variables: Record<string, any>;
28
- functions: Record<string, import("@markdoc/markdoc").ConfigFunction>;
29
- partials: Record<string, any>;
30
- validation?: {
31
- parents?: import("@markdoc/markdoc").Node[];
32
- validateFunctions?: boolean;
33
- environment?: string;
34
- };
35
- }>>): import("@markdoc/markdoc").MaybePromise<import("@markdoc/markdoc").ValidationError[]>;
36
- description?: string;
37
- children: string[];
38
- };
39
- export declare const em: {
40
- render?: string | undefined;
41
- attributes?: Record<string, import("@markdoc/markdoc").SchemaAttribute>;
42
- slots?: Record<string, import("@markdoc/markdoc").SchemaSlot>;
43
- selfClosing?: boolean;
44
- inline?: boolean;
45
- transform?(node: import("@markdoc/markdoc").Node, config: Readonly<Partial<{
46
- nodes: Partial<Record<import("@markdoc/markdoc").NodeType, import("@markdoc/markdoc").Schema<Partial</*elided*/ any>, string>>>;
47
- tags: Record<string, import("@markdoc/markdoc").Schema>;
48
- variables: Record<string, any>;
49
- functions: Record<string, import("@markdoc/markdoc").ConfigFunction>;
50
- partials: Record<string, any>;
51
- validation?: {
52
- parents?: import("@markdoc/markdoc").Node[];
53
- validateFunctions?: boolean;
54
- environment?: string;
55
- };
56
- }>>): import("@markdoc/markdoc").MaybePromise<import("@markdoc/markdoc").RenderableTreeNodes>;
57
- validate?(node: import("@markdoc/markdoc").Node, config: Readonly<Partial<{
58
- nodes: Partial<Record<import("@markdoc/markdoc").NodeType, import("@markdoc/markdoc").Schema<Partial</*elided*/ any>, string>>>;
59
- tags: Record<string, import("@markdoc/markdoc").Schema>;
60
- variables: Record<string, any>;
61
- functions: Record<string, import("@markdoc/markdoc").ConfigFunction>;
62
- partials: Record<string, any>;
63
- validation?: {
64
- parents?: import("@markdoc/markdoc").Node[];
65
- validateFunctions?: boolean;
66
- environment?: string;
67
- };
68
- }>>): import("@markdoc/markdoc").MaybePromise<import("@markdoc/markdoc").ValidationError[]>;
69
- description?: string;
70
- children: string[];
71
- };
72
- export declare const s: {
73
- render?: string | undefined;
74
- attributes?: Record<string, import("@markdoc/markdoc").SchemaAttribute>;
75
- slots?: Record<string, import("@markdoc/markdoc").SchemaSlot>;
76
- selfClosing?: boolean;
77
- inline?: boolean;
78
- transform?(node: import("@markdoc/markdoc").Node, config: Readonly<Partial<{
79
- nodes: Partial<Record<import("@markdoc/markdoc").NodeType, import("@markdoc/markdoc").Schema<Partial</*elided*/ any>, string>>>;
80
- tags: Record<string, import("@markdoc/markdoc").Schema>;
81
- variables: Record<string, any>;
82
- functions: Record<string, import("@markdoc/markdoc").ConfigFunction>;
83
- partials: Record<string, any>;
84
- validation?: {
85
- parents?: import("@markdoc/markdoc").Node[];
86
- validateFunctions?: boolean;
87
- environment?: string;
88
- };
89
- }>>): import("@markdoc/markdoc").MaybePromise<import("@markdoc/markdoc").RenderableTreeNodes>;
90
- validate?(node: import("@markdoc/markdoc").Node, config: Readonly<Partial<{
91
- nodes: Partial<Record<import("@markdoc/markdoc").NodeType, import("@markdoc/markdoc").Schema<Partial</*elided*/ any>, string>>>;
92
- tags: Record<string, import("@markdoc/markdoc").Schema>;
93
- variables: Record<string, any>;
94
- functions: Record<string, import("@markdoc/markdoc").ConfigFunction>;
95
- partials: Record<string, any>;
96
- validation?: {
97
- parents?: import("@markdoc/markdoc").Node[];
98
- validateFunctions?: boolean;
99
- environment?: string;
100
- };
101
- }>>): import("@markdoc/markdoc").MaybePromise<import("@markdoc/markdoc").ValidationError[]>;
102
- description?: string;
103
- children: string[];
104
- };
105
- export declare const link: {
106
- attributes?: Record<string, import("@markdoc/markdoc").SchemaAttribute>;
107
- slots?: Record<string, import("@markdoc/markdoc").SchemaSlot>;
108
- selfClosing?: boolean;
109
- inline?: boolean;
110
- transform?(node: import("@markdoc/markdoc").Node, config: Readonly<Partial<{
111
- nodes: Partial<Record<import("@markdoc/markdoc").NodeType, import("@markdoc/markdoc").Schema<Partial</*elided*/ any>, string>>>;
112
- tags: Record<string, import("@markdoc/markdoc").Schema>;
113
- variables: Record<string, any>;
114
- functions: Record<string, import("@markdoc/markdoc").ConfigFunction>;
115
- partials: Record<string, any>;
116
- validation?: {
117
- parents?: import("@markdoc/markdoc").Node[];
118
- validateFunctions?: boolean;
119
- environment?: string;
120
- };
121
- }>>): import("@markdoc/markdoc").MaybePromise<import("@markdoc/markdoc").RenderableTreeNodes>;
122
- validate?(node: import("@markdoc/markdoc").Node, config: Readonly<Partial<{
123
- nodes: Partial<Record<import("@markdoc/markdoc").NodeType, import("@markdoc/markdoc").Schema<Partial</*elided*/ any>, string>>>;
124
- tags: Record<string, import("@markdoc/markdoc").Schema>;
125
- variables: Record<string, any>;
126
- functions: Record<string, import("@markdoc/markdoc").ConfigFunction>;
127
- partials: Record<string, any>;
128
- validation?: {
129
- parents?: import("@markdoc/markdoc").Node[];
130
- validateFunctions?: boolean;
131
- environment?: string;
132
- };
133
- }>>): import("@markdoc/markdoc").MaybePromise<import("@markdoc/markdoc").ValidationError[]>;
134
- description?: string;
135
- render: string;
136
- children: string[];
137
- };
138
- export declare const document: {
139
- render?: string | undefined;
140
- attributes?: Record<string, import("@markdoc/markdoc").SchemaAttribute>;
141
- slots?: Record<string, import("@markdoc/markdoc").SchemaSlot>;
142
- selfClosing?: boolean;
143
- inline?: boolean;
144
- transform?(node: import("@markdoc/markdoc").Node, config: Readonly<Partial<{
145
- nodes: Partial<Record<import("@markdoc/markdoc").NodeType, import("@markdoc/markdoc").Schema<Partial</*elided*/ any>, string>>>;
146
- tags: Record<string, import("@markdoc/markdoc").Schema>;
147
- variables: Record<string, any>;
148
- functions: Record<string, import("@markdoc/markdoc").ConfigFunction>;
149
- partials: Record<string, any>;
150
- validation?: {
151
- parents?: import("@markdoc/markdoc").Node[];
152
- validateFunctions?: boolean;
153
- environment?: string;
154
- };
155
- }>>): import("@markdoc/markdoc").MaybePromise<import("@markdoc/markdoc").RenderableTreeNodes>;
156
- validate?(node: import("@markdoc/markdoc").Node, config: Readonly<Partial<{
157
- nodes: Partial<Record<import("@markdoc/markdoc").NodeType, import("@markdoc/markdoc").Schema<Partial</*elided*/ any>, string>>>;
158
- tags: Record<string, import("@markdoc/markdoc").Schema>;
159
- variables: Record<string, any>;
160
- functions: Record<string, import("@markdoc/markdoc").ConfigFunction>;
161
- partials: Record<string, any>;
162
- validation?: {
163
- parents?: import("@markdoc/markdoc").Node[];
164
- validateFunctions?: boolean;
165
- environment?: string;
166
- };
167
- }>>): import("@markdoc/markdoc").MaybePromise<import("@markdoc/markdoc").ValidationError[]>;
168
- description?: string;
169
- children: string[];
170
- };
7
+ export declare const strong: Schema;
8
+ export declare const em: Schema;
9
+ export declare const s: Schema;
10
+ export declare const link: Schema;
11
+ export declare const document: Schema;
171
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- import e from"@markdoc/markdoc";export*from"./gfm-list-item.js";export*from"./heading.js";export*from"./fence/index.js";export*from"./table.js";export*from"./text.js";const r={...e.nodes.strong,children:[...e.nodes.strong.children,"softbreak","em","strong"]},n={...e.nodes.em,children:[...e.nodes.em.children,"softbreak","em","strong"]},t={...e.nodes.s,children:[...e.nodes.s.children,"softbreak"]},s={...e.nodes.link,render:"MarkdownLink",children:[...e.nodes.link.children,"softbreak","image"]},d={...e.nodes.document,children:[...e.nodes.document.children,"text"]};export{d as document,n as em,s as link,t as s,r as strong};
1
+ import e from"@redocly/markdoc";export*from"./gfm-list-item.js";export*from"./heading.js";export*from"./fence/index.js";export*from"./table.js";export*from"./text.js";const r={...e.nodes.strong,children:[...e.nodes.strong.children??[],"softbreak","em","strong"]},n={...e.nodes.em,children:[...e.nodes.em.children??[],"softbreak","em","strong"]},t={...e.nodes.s,children:[...e.nodes.s.children??[],"softbreak"]},s={...e.nodes.link,render:"MarkdownLink",children:[...e.nodes.link.children??[],"softbreak","image"]},d={...e.nodes.document,children:[...e.nodes.document.children??[],"text"]};export{d as document,n as em,s as link,t as s,r as strong};
@@ -1,4 +1,4 @@
1
- import type { Schema } from '@markdoc/markdoc';
1
+ import type { Schema } from '@redocly/markdoc';
2
2
  /**
3
3
  * Temporary solution.
4
4
  * We should find a way to add .md class to all built-in markdoc nodes
@@ -1 +1 @@
1
- import t from"@markdoc/markdoc";import{MARKDOWN_CLASS_NAME as m}from"@redocly/theme/core/constants";import{isTag as i}from"../helpers/guards/is-tag.js";import{getInnerText as d}from"../helpers/get-inner-text.js";const g={transform(e,r){const s=e.transformAttributes(r),n=e.transformChildren(r);return new t.Tag("div",{className:"md-table-wrapper"},[new t.Tag("table",{...s,className:m},u(n))])}},o={type:String,matches:["top","middle","bottom"],render:"vAlign"},c={...t.nodes.td,attributes:{...t.nodes.td.attributes,valign:o}},T={...t.nodes.th,attributes:{...t.nodes.th.attributes,valign:o}};function u(e){if(!e.length)return e;const[r,...s]=e;return!i(r)||r.name!=="thead"?e:[new t.Tag("thead",r.attributes,r.children.map(n=>!i(n)||n.name!=="tr"?n:new t.Tag("tr",n.attributes,n.children.map(a=>!i(a)||a.name!=="th"?a:new t.Tag("th",{...a.attributes,"data-label":d(a.children)},a.children))))),...s]}export{g as table,c as td,T as th};
1
+ import t from"@redocly/markdoc";import{MARKDOWN_CLASS_NAME as m}from"@redocly/theme/core/constants";import{isTag as i}from"../helpers/guards/is-tag.js";import{getInnerText as d}from"../helpers/get-inner-text.js";const g={transform(e,r){const s=e.transformAttributes(r),n=e.transformChildren(r);return new t.Tag("div",{className:"md-table-wrapper"},[new t.Tag("table",{...s,className:m},u(n))])}},o={type:String,matches:["top","middle","bottom"],render:"vAlign"},c={...t.nodes.td,attributes:{...t.nodes.td.attributes,valign:o}},T={...t.nodes.th,attributes:{...t.nodes.th.attributes,valign:o}};function u(e){if(!e.length)return e;const[r,...s]=e;return!i(r)||r.name!=="thead"?e:[new t.Tag("thead",r.attributes,r.children.map(n=>!i(n)||n.name!=="tr"?n:new t.Tag("tr",n.attributes,n.children.map(a=>!i(a)||a.name!=="th"?a:new t.Tag("th",{...a.attributes,"data-label":d(a.children)},a.children))))),...s]}export{g as table,c as td,T as th};
@@ -1,3 +1,3 @@
1
- import type { Schema } from '@markdoc/markdoc';
1
+ import type { Schema } from '@redocly/markdoc';
2
2
  export declare const text: Schema;
3
3
  //# sourceMappingURL=text.d.ts.map
@@ -1 +1 @@
1
- import l from"@markdoc/markdoc";import{SampleFromJsonSchema as m,JsonExampleRef as n}from"../attributes/index.js";const v={schema:{attributes:{value:{type:n,required:!1},schema:{type:m,required:!1},mode:{type:String,matches:["read","write"],required:!1},title:{type:String,required:!1},valueResolved:{required:!1},valueResolvedErrors:{type:Array,default:[]},schemaResolved:{required:!1},schemaResolvedErrors:{type:Array,default:[]}},render:"JsonExample",selfClosing:!0,dynamicComponentLib:"openapi",transform:(e,r)=>{const o=e.transformAttributes(r),{valueResolved:a,schemaResolved:u,schemaResolvedErrors:i,valueResolvedErrors:t,title:s}=o;return a||t.length?new l.Tag("JsonExample",{title:s,json:a,errors:t}):new l.Tag("JsonExample",{title:s,json:u,errors:i})},validate(e){const r=[];return e.attributes.schema&&e.attributes.value&&r.push({id:"schema-and-value-attributes-are-mutually-exclusive",level:"error",message:'The "schema" and "value" attributes are mutually exclusive, you can only use one.'}),!e.attributes.schema&&!e.attributes.value&&r.push({id:"schema-or-value-attribute-required",level:"error",message:'This tag requires the "schema" or "value" attribute to render correctly.'}),r}},tagName:"json-example"};export{v as jsonExample};
1
+ import l from"@redocly/markdoc";import{SampleFromJsonSchema as m,JsonExampleRef as n}from"../attributes/index.js";const v={schema:{attributes:{value:{type:n,required:!1},schema:{type:m,required:!1},mode:{type:String,matches:["read","write"],required:!1},title:{type:String,required:!1},valueResolved:{required:!1},valueResolvedErrors:{type:Array,default:[]},schemaResolved:{required:!1},schemaResolvedErrors:{type:Array,default:[]}},render:"JsonExample",selfClosing:!0,dynamicComponentLib:"openapi",transform:(e,r)=>{const o=e.transformAttributes(r),{valueResolved:a,schemaResolved:u,schemaResolvedErrors:i,valueResolvedErrors:t,title:s}=o;return a||t.length?new l.Tag("JsonExample",{title:s,json:a,errors:t}):new l.Tag("JsonExample",{title:s,json:u,errors:i})},validate(e){const r=[];return e.attributes.schema&&e.attributes.value&&r.push({id:"schema-and-value-attributes-are-mutually-exclusive",level:"error",message:'The "schema" and "value" attributes are mutually exclusive, you can only use one.'}),!e.attributes.schema&&!e.attributes.value&&r.push({id:"schema-or-value-attribute-required",level:"error",message:'This tag requires the "schema" or "value" attribute to render correctly.'}),r}},tagName:"json-example"};export{v as jsonExample};
@@ -1 +1 @@
1
- import{generatePortalResolverDir as a}from"./codegen/generate-resolver-dir.js";const d=()=>{const t={},l=a(),p=["react","styled-components"];return{name:"dependency-resolver",setup(n){for(const c of p){const i=r(c);n.onResolve({filter:i,namespace:"file"},async e=>{if(e.resolveDir==="")return;if(t[e.path]!==void 0)return t[e.path];const o=!!n.initialOptions.external?.some(s=>r(s).test(e.path));return o?(t[e.path]=Promise.resolve({path:e.path,external:o}),t[e.path]):(t[e.path]=n.resolve(e.path,{kind:e.kind,resolveDir:l}),t[e.path])})}}}};function r(t){return new RegExp(`^${t}(/|$)`)}export{d as DependencyResolver};
1
+ import{generatePortalResolverDir as u}from"./codegen/generate-resolver-dir.js";const l={"@markdoc/markdoc":"@redocly/markdoc"},v=()=>{const t={},a=u(),i=["react","styled-components",...Object.keys(l)];return{name:"dependency-resolver",setup(n){for(const o of i){const p=s(o),m=l[o]??o;n.onResolve({filter:p,namespace:"file"},async e=>{if(e.resolveDir==="")return;if(t[e.path]!==void 0)return t[e.path];const r=m+e.path.slice(o.length),c=!!n.initialOptions.external?.some(d=>s(d).test(r));return c?(t[e.path]=Promise.resolve({path:r,external:c}),t[e.path]):(t[e.path]=n.resolve(r,{kind:e.kind,resolveDir:a}),t[e.path])})}}}};function s(t){return new RegExp(`^${t}(/|$)`)}export{v as DependencyResolver};
@@ -1,6 +1,6 @@
1
1
  import { type ASTNode, type DocumentNode } from 'graphql';
2
2
  import type { OpenAPIDefinition, AsyncApiDefinition, ApiSpecType, RawApiDocsOptions } from '@redocly/api-docs';
3
- import type { Node as MarkdocNode } from '@markdoc/markdoc';
3
+ import type { Node as MarkdocNode } from '@redocly/markdoc';
4
4
  import type { LifecycleContext } from '../../types';
5
5
  import type { RedoclyConfig } from '@redocly/config';
6
6
  export type MarkdocChunk = {
@@ -1,4 +1,4 @@
1
- import type { Node } from '@markdoc/markdoc';
1
+ import type { Node } from '@redocly/markdoc';
2
2
  import type { MarkdocResolveContext } from '../../../../types';
3
3
  export declare function resolveCodeWalkthroughFilesets(node: Node, attributeName: string, pageRelativePath: string, markdocResolveContext: MarkdocResolveContext): Promise<void>;
4
4
  //# sourceMappingURL=filesets-resolver.d.ts.map
@@ -1,4 +1,4 @@
1
- import type { Node } from '@markdoc/markdoc';
1
+ import type { Node } from '@redocly/markdoc';
2
2
  import type { OpenAPIDefinition, RawApiDocsOptions } from '@redocly/api-docs';
3
3
  import type { LifecycleContext } from '../../../../types';
4
4
  export type OpenapiBundle = {
@@ -1,5 +1,5 @@
1
1
  import type { MarkdocResolveContext, WithOriginalAttr } from '../../../types';
2
- import type { Node } from '@markdoc/markdoc';
2
+ import type { Node } from '@redocly/markdoc';
3
3
  type ResolverFunction = (node: WithOriginalAttr<Node>, attrName: string, relativePath: string, context: MarkdocResolveContext) => Promise<{
4
4
  sharedDataId?: string;
5
5
  } | undefined | void>;
@@ -1,4 +1,4 @@
1
- import type { Node } from '@markdoc/markdoc';
1
+ import type { Node } from '@redocly/markdoc';
2
2
  import type { MarkdocResolveContext, WithOriginalAttr } from '../../../types';
3
3
  export declare function resolveCodeSnippetFromFile(node: WithOriginalAttr<Node>, attributeName: string, pageRelativePath: string, { actions: { contentDir }, context }: MarkdocResolveContext): Promise<void>;
4
4
  //# sourceMappingURL=resolve-code-snippet-from-file.d.ts.map
@@ -1,4 +1,4 @@
1
- import type { Node } from '@markdoc/markdoc';
1
+ import type { Node } from '@redocly/markdoc';
2
2
  import type { MarkdocResolveContext, WithOriginalAttr } from '../../../types';
3
3
  export declare function resolveDiagramFromFile(node: WithOriginalAttr<Node>, attributeName: string, pageRelativePath: string, { actions: { contentDir }, context }: MarkdocResolveContext): Promise<void>;
4
4
  //# sourceMappingURL=resolve-diagram-from-file.d.ts.map
@@ -1,4 +1,4 @@
1
- import type { Node } from '@markdoc/markdoc';
1
+ import type { Node } from '@redocly/markdoc';
2
2
  import type { MarkdocResolveContext, WithOriginalAttr } from '../../../types';
3
3
  /**
4
4
  * Resolves HTML href attributes (e.g., `<a href="...">`) using the existing `resolveLink` logic
@@ -1,4 +1,4 @@
1
- import type { Node } from '@markdoc/markdoc';
1
+ import type { Node } from '@redocly/markdoc';
2
2
  import type { MarkdocResolveContext, WithOriginalAttr } from '../../../types';
3
3
  export declare function resolveHtmlSourceAttribute(node: WithOriginalAttr<Node>, attributeName: string, pageRelativePath: string, { actions: { contentDir, outdir, getRouteBySlug }, context }: MarkdocResolveContext): Promise<void>;
4
4
  //# sourceMappingURL=resolve-html-source-attribute.d.ts.map
@@ -1,4 +1,4 @@
1
- import type { Node } from '@markdoc/markdoc';
1
+ import type { Node } from '@redocly/markdoc';
2
2
  import type { MarkdocResolveContext, WithOriginalAttr } from '../../../types';
3
3
  export declare function resolveImageGallery(node: WithOriginalAttr<Node>, attributeName: string, pageRelativePath: string, { actions: { contentDir, outdir }, context }: MarkdocResolveContext): Promise<void>;
4
4
  //# sourceMappingURL=resolve-image-gallery.d.ts.map
@@ -1,4 +1,4 @@
1
- import type { Node } from '@markdoc/markdoc';
1
+ import type { Node } from '@redocly/markdoc';
2
2
  import type { MarkdocResolveContext, WithOriginalAttr } from '../../../types';
3
3
  export declare function resolveImageSrcSet(node: WithOriginalAttr<Node>, attributeName: string, pageRelativePath: string, { actions: { contentDir, outdir }, context }: MarkdocResolveContext): Promise<void>;
4
4
  //# sourceMappingURL=resolve-image-src-set.d.ts.map
@@ -1,4 +1,4 @@
1
- import type { Node } from '@markdoc/markdoc';
1
+ import type { Node } from '@redocly/markdoc';
2
2
  import type { MarkdocResolveContext, WithOriginalAttr } from '../../../types';
3
3
  export declare function resolveImageSrc(node: WithOriginalAttr<Node>, attributeName: string, pageRelativePath: string, { actions: { contentDir, outdir }, context }: MarkdocResolveContext): Promise<void>;
4
4
  //# sourceMappingURL=resolve-image-src.d.ts.map
@@ -1,4 +1,4 @@
1
- import type { Node } from '@markdoc/markdoc';
1
+ import type { Node } from '@redocly/markdoc';
2
2
  import type { MarkdocResolveContext } from '../../../types';
3
3
  export declare function resolveJsonExampleRef(node: Node, attrName: string, relativePath: string, { context, actions }: MarkdocResolveContext): Promise<void>;
4
4
  //# sourceMappingURL=resolve-json-example-ref.d.ts.map
@@ -1,4 +1,4 @@
1
- import type { Node } from '@markdoc/markdoc';
1
+ import type { Node } from '@redocly/markdoc';
2
2
  import type { MarkdocResolveContext } from '../../../types';
3
3
  export declare function resolveJsonSchemaRef(node: Node, attrName: string, relativePath: string, { context, actions }: MarkdocResolveContext): Promise<{
4
4
  sharedDataId?: string;