@contractkit/explorer-ui 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,4 @@
1
+ import type { ScalarTypeNode } from '@contractkit/core';
2
+ /** Formats the constraint parameters on a scalar type (min/max/len/regex/format) as a parenthesized suffix. */
3
+ export declare function constraintSummary(scalar: ScalarTypeNode): string;
4
+ //# sourceMappingURL=constraints.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constraints.d.ts","sourceRoot":"","sources":["../src/constraints.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAExD,+GAA+G;AAC/G,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,cAAc,GAAG,MAAM,CAQhE"}
package/dist/html.d.ts ADDED
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Minimal tagged-template helper for building HTML strings with automatic escaping.
3
+ *
4
+ * html`<p>${userInput}</p>` // escapes userInput
5
+ * html`<ul>${raw(items.join(''))}</ul>` // bypasses escaping
6
+ *
7
+ * Interpolations are coerced to strings and HTML-escaped. Arrays are joined without a separator
8
+ * after escaping each element. `raw(...)` marks a string as pre-escaped so it passes through.
9
+ */
10
+ declare const RAW: unique symbol;
11
+ interface RawHtml {
12
+ [RAW]: true;
13
+ value: string;
14
+ }
15
+ /** Marks a string as already-escaped HTML so the {@link html} tag inserts it verbatim. */
16
+ export declare function raw(value: string): RawHtml;
17
+ /** Escapes the five HTML-significant characters (`& < > " '`) so the input is safe to embed in markup. */
18
+ export declare function escapeHtml(value: string): string;
19
+ /**
20
+ * Tagged template literal that auto-escapes every interpolated value. Use {@link raw} to inject
21
+ * pre-built HTML without double-escaping. `null`, `undefined`, and `false` interpolations render
22
+ * as empty strings; arrays are flattened and each element is escaped (or passed through if `raw`).
23
+ */
24
+ export declare function html(strings: TemplateStringsArray, ...values: unknown[]): string;
25
+ /** Slugify an arbitrary string for use in anchor ids — keeps a-z, 0-9, dashes; collapses everything else. */
26
+ export declare function slug(value: string): string;
27
+ export {};
28
+ //# sourceMappingURL=html.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"html.d.ts","sourceRoot":"","sources":["../src/html.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,QAAA,MAAM,GAAG,eAAgB,CAAC;AAE1B,UAAU,OAAO;IACb,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;CACjB;AAED,0FAA0F;AAC1F,wBAAgB,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAE1C;AAMD,0GAA0G;AAC1G,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAOhD;AASD;;;;GAIG;AACH,wBAAgB,IAAI,CAAC,OAAO,EAAE,oBAAoB,EAAE,GAAG,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,CAMhF;AAED,6GAA6G;AAC7G,wBAAgB,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAK1C"}
@@ -0,0 +1,14 @@
1
+ export { renderApp } from './render.js';
2
+ export { renderOperation, operationAnchor } from './render-operation.js';
3
+ export { renderTryIt } from './render-tryit.js';
4
+ export { renderModel, renderFieldRows, modelAnchor } from './render-model.js';
5
+ export { renderType } from './render-type.js';
6
+ export { renderSchemaTree } from './render-schema.js';
7
+ export { renderCodeSamples } from './render-code-samples.js';
8
+ export { renderItemPage, listSelections, operationId, modelId } from './render-item.js';
9
+ export type { ItemSelection } from './render-item.js';
10
+ export { constraintSummary } from './constraints.js';
11
+ export { renderMarkdown } from './markdown.js';
12
+ export { escapeHtml, html, raw, slug } from './html.js';
13
+ export type { PreviewData, PreviewConfigMeta, PreviewServer, PreviewWarning, ResolvedOperation, ResolvedModel, } from './types.js';
14
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACzE,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAC9E,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AACxF,YAAY,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACxD,YAAY,EACR,WAAW,EACX,iBAAiB,EACjB,aAAa,EACb,cAAc,EACd,iBAAiB,EACjB,aAAa,GAChB,MAAM,YAAY,CAAC"}