@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.
- package/CHANGELOG.md +27 -0
- package/dist/cli/generate/get-schema-template.js +1 -1
- package/dist/client/app/hooks/markdown/useMarkdocRenderer.js +1 -1
- package/dist/client/app/hooks/markdown/useMarkdownText.js +1 -1
- package/dist/client/app/markdoc/custom-components/openapi/use-markdown-adapter.d.ts +1 -33
- package/dist/markdoc/attributes/definition-path.d.ts +1 -1
- package/dist/markdoc/attributes/json-example-ref.d.ts +1 -1
- package/dist/markdoc/attributes/json-schema-ref.d.ts +1 -1
- package/dist/markdoc/attributes/parsed-yaml.d.ts +1 -1
- package/dist/markdoc/attributes/raw-content.d.ts +1 -1
- package/dist/markdoc/attributes/sample-from-json-schema.d.ts +1 -1
- package/dist/markdoc/helpers/extract-rbac-from-condition-node.d.ts +1 -1
- package/dist/markdoc/helpers/get-inner-text.d.ts +1 -1
- package/dist/markdoc/helpers/get-node-attribute.d.ts +1 -1
- package/dist/markdoc/helpers/get-variable.d.ts +1 -1
- package/dist/markdoc/helpers/guards/is-conditional-node.d.ts +1 -1
- package/dist/markdoc/helpers/guards/is-function.d.ts +1 -1
- package/dist/markdoc/helpers/guards/is-node.d.ts +1 -1
- package/dist/markdoc/helpers/guards/is-prompt-node.d.ts +1 -1
- package/dist/markdoc/helpers/guards/is-tag.d.ts +1 -1
- package/dist/markdoc/helpers/guards/is-variable.d.ts +1 -1
- package/dist/markdoc/helpers/parse-partials.d.ts +1 -1
- package/dist/markdoc/helpers/parse-partials.js +1 -1
- package/dist/markdoc/helpers/remove-markdoc-tags.js +1 -1
- package/dist/markdoc/helpers/set-node-attribute-value.d.ts +1 -1
- package/dist/markdoc/nodes/fence/index.d.ts +1 -1
- package/dist/markdoc/nodes/fence/index.js +1 -1
- package/dist/markdoc/nodes/gfm-list-item.d.ts +1 -1
- package/dist/markdoc/nodes/gfm-list-item.js +1 -1
- package/dist/markdoc/nodes/heading.d.ts +1 -1
- package/dist/markdoc/nodes/heading.js +1 -1
- package/dist/markdoc/nodes/index.d.ts +6 -165
- package/dist/markdoc/nodes/index.js +1 -1
- package/dist/markdoc/nodes/table.d.ts +1 -1
- package/dist/markdoc/nodes/table.js +1 -1
- package/dist/markdoc/nodes/text.d.ts +1 -1
- package/dist/markdoc/tags/json-example.js +1 -1
- package/dist/server/esbuild/plugins/dependency-resolver.js +1 -1
- package/dist/server/plugins/api-docs/loader.d.ts +1 -1
- package/dist/server/plugins/markdown/attribute-resolvers/code-walkthrough/filesets-resolver.d.ts +1 -1
- package/dist/server/plugins/markdown/attribute-resolvers/helpers/load-openapi-bundle.d.ts +1 -1
- package/dist/server/plugins/markdown/attribute-resolvers/index.d.ts +1 -1
- package/dist/server/plugins/markdown/attribute-resolvers/resolve-code-snippet-from-file.d.ts +1 -1
- package/dist/server/plugins/markdown/attribute-resolvers/resolve-diagram-from-file.d.ts +1 -1
- package/dist/server/plugins/markdown/attribute-resolvers/resolve-html-href.d.ts +1 -1
- package/dist/server/plugins/markdown/attribute-resolvers/resolve-html-source-attribute.d.ts +1 -1
- package/dist/server/plugins/markdown/attribute-resolvers/resolve-image-gallery.d.ts +1 -1
- package/dist/server/plugins/markdown/attribute-resolvers/resolve-image-src-set.d.ts +1 -1
- package/dist/server/plugins/markdown/attribute-resolvers/resolve-image-src.d.ts +1 -1
- package/dist/server/plugins/markdown/attribute-resolvers/resolve-json-example-ref.d.ts +1 -1
- package/dist/server/plugins/markdown/attribute-resolvers/resolve-json-schema-ref.d.ts +1 -1
- package/dist/server/plugins/markdown/attribute-resolvers/resolve-link.d.ts +1 -1
- package/dist/server/plugins/markdown/attribute-resolvers/resolve-native-md-link.d.ts +1 -1
- package/dist/server/plugins/markdown/attribute-resolvers/resolve-nav-links.d.ts +1 -1
- package/dist/server/plugins/markdown/attribute-resolvers/resolve-open-api-ref.d.ts +1 -1
- package/dist/server/plugins/markdown/attribute-resolvers/resolve-openapi-code-samples.d.ts +1 -1
- package/dist/server/plugins/markdown/attribute-resolvers/resolve-openapi-response-samples.d.ts +1 -1
- package/dist/server/plugins/markdown/attribute-resolvers/resolve-parsed-yaml.d.ts +1 -1
- package/dist/server/plugins/markdown/attribute-resolvers/resolve-raw-content.d.ts +1 -1
- package/dist/server/plugins/markdown/attribute-resolvers/resolve-relative-or-cdn-icon.d.ts +1 -1
- package/dist/server/plugins/markdown/attribute-resolvers/resolve-relative-path.d.ts +1 -1
- package/dist/server/plugins/markdown/attribute-resolvers/resolve-sample-from-json-schema.d.ts +1 -1
- package/dist/server/plugins/markdown/attribute-resolvers/resolve-svg-content.d.ts +1 -1
- package/dist/server/plugins/markdown/attribute-resolvers/resolve-tag-raw-content.d.ts +1 -1
- package/dist/server/plugins/markdown/attribute-resolvers/resolve-tag-raw-content.js +2 -2
- package/dist/server/plugins/markdown/attribute-resolvers/utils.d.ts +1 -1
- package/dist/server/plugins/markdown/compiler.d.ts +1 -1
- package/dist/server/plugins/markdown/compiler.js +1 -1
- package/dist/server/plugins/markdown/errors.d.ts +1 -1
- package/dist/server/plugins/markdown/get-server-props.js +1 -1
- package/dist/server/plugins/markdown/html/normalize-html-headings.d.ts +1 -1
- package/dist/server/plugins/markdown/html/normalize-html-headings.js +1 -1
- package/dist/server/plugins/markdown/markdoc/functions/concat.d.ts +1 -1
- package/dist/server/plugins/markdown/markdoc/markdoc-options.d.ts +5 -165
- package/dist/server/plugins/markdown/markdoc/markdoc-options.js +1 -1
- package/dist/server/plugins/markdown/markdoc/partials.d.ts +1 -1
- package/dist/server/plugins/markdown/markdoc/plugins/headings.d.ts +1 -1
- package/dist/server/plugins/markdown/markdoc/plugins/utils.d.ts +1 -1
- package/dist/server/plugins/markdown/markdoc/reparse-example-fences.d.ts +1 -1
- package/dist/server/plugins/markdown/markdoc/reparse-example-fences.js +1 -1
- package/dist/server/plugins/markdown/runtime-transform.d.ts +2 -2
- package/dist/server/plugins/markdown/runtime-transform.js +1 -1
- package/dist/server/plugins/markdown/search/get-ai-search-documents.js +1 -1
- package/dist/server/plugins/markdown/search/nodes/section-node.d.ts +1 -1
- package/dist/server/plugins/markdown/search/search-resolver.js +1 -1
- package/dist/server/plugins/markdown/search/to-markdown.d.ts +1 -1
- package/dist/server/plugins/markdown/search/walk-sections.d.ts +1 -1
- package/dist/server/plugins/markdown/search/walk-sections.js +1 -1
- package/dist/server/plugins/markdown/utils/stringify-tag-children-objects.d.ts +1 -1
- package/dist/server/store.d.ts +1 -1
- package/dist/server/store.js +1 -1
- package/dist/server/types/plugins/common.d.ts +1 -1
- package/dist/server/utils/codeframes/codeframes.d.ts +1 -1
- package/dist/server/utils/codeframes/yaml-ast.d.ts +1 -1
- package/dist/types/errors.d.ts +1 -1
- package/dist/types/markdoc.d.ts +1 -1
- package/package.json +6 -6
- package/dist/server/plugins/markdown/html/html-jsx-attribute-mapping.d.ts +0 -6
- package/dist/server/plugins/markdown/html/html-jsx-attribute-mapping.js +0 -1
- package/dist/server/plugins/markdown/html/process-html-tokens.d.ts +0 -2
- package/dist/server/plugins/markdown/html/process-html-tokens.js +0 -1
- package/dist/server/plugins/markdown/source.d.ts +0 -4
- 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 +1 @@
|
|
|
1
|
-
import*as t from"react";import{useMemo as n}from"react";import m from"@
|
|
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"@
|
|
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 '@
|
|
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 '@
|
|
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 '@
|
|
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 '@
|
|
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 '@
|
|
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 '@
|
|
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 { Function, Node, RenderableTreeNode, Variable } from '@
|
|
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 +1 @@
|
|
|
1
|
-
import{Ast as i}from"@
|
|
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"@
|
|
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 +1 @@
|
|
|
1
|
-
import a from"@
|
|
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 +1 @@
|
|
|
1
|
-
import r from"@
|
|
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 +1 @@
|
|
|
1
|
-
import s from"@
|
|
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
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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"@
|
|
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 +1 @@
|
|
|
1
|
-
import t from"@
|
|
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 +1 @@
|
|
|
1
|
-
import l from"@
|
|
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
|
|
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 '@
|
|
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 = {
|
package/dist/server/plugins/markdown/attribute-resolvers/code-walkthrough/filesets-resolver.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Node } from '@
|
|
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,5 +1,5 @@
|
|
|
1
1
|
import type { MarkdocResolveContext, WithOriginalAttr } from '../../../types';
|
|
2
|
-
import type { Node } from '@
|
|
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>;
|
package/dist/server/plugins/markdown/attribute-resolvers/resolve-code-snippet-from-file.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Node } from '@
|
|
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 '@
|
|
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 '@
|
|
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 '@
|
|
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 '@
|
|
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 '@
|
|
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 '@
|
|
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 '@
|
|
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 '@
|
|
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;
|