@record-evolution/widget-markdown 1.0.7 → 1.0.8
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/package.json
CHANGED
|
@@ -25,7 +25,7 @@ export type Variables = {
|
|
|
25
25
|
/**
|
|
26
26
|
* A markdown rendering widget for displaying formatted text with dynamic variable substitution. Use this widget for documentation, instructions, dynamic reports, or any rich text content on dashboards. Supports full Markdown syntax including headers, lists, tables, links, and code blocks. Variables can be embedded using {{variableName}} notation and bound to data sources for real-time updates. Ideal for creating contextual help, status summaries, or narrative text that incorporates live data values.
|
|
27
27
|
*/
|
|
28
|
-
export interface
|
|
28
|
+
export interface MarkdownConfiguration {
|
|
29
29
|
markdown?: Markdown;
|
|
30
30
|
data?: Variables;
|
|
31
31
|
[k: string]: unknown;
|
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
{
|
|
2
|
-
"title": "
|
|
2
|
+
"title": "Markdown Configuration",
|
|
3
3
|
"description": "A markdown rendering widget for displaying formatted text with dynamic variable substitution. Use this widget for documentation, instructions, dynamic reports, or any rich text content on dashboards. Supports full Markdown syntax including headers, lists, tables, links, and code blocks. Variables can be embedded using {{variableName}} notation and bound to data sources for real-time updates. Ideal for creating contextual help, status summaries, or narrative text that incorporates live data values.",
|
|
4
|
+
"aiSelection": {
|
|
5
|
+
"dataShape": "A Markdown document, with {{variableName}} placeholders substituted from data[] entries that each bind a label to a live value.",
|
|
6
|
+
"useWhen": [
|
|
7
|
+
"Prose, documentation, instructions or a written summary belongs on the dashboard.",
|
|
8
|
+
"The text needs structure or markup — headings, lists, links, tables, code blocks.",
|
|
9
|
+
"A narrative should incorporate live numbers, e.g. 'Line 3 produced {{units}} units today'."
|
|
10
|
+
],
|
|
11
|
+
"notFor": [
|
|
12
|
+
"A single styled string with no markup — use widget-label; a Markdown renderer is overkill.",
|
|
13
|
+
"Fixed title / subtitle / body sections with per-section typography — use widget-textbox.",
|
|
14
|
+
"Tabular data coming from a query rather than written by hand — use widget-table.",
|
|
15
|
+
"Numbers that should be read as figures rather than embedded in a sentence — use widget-value."
|
|
16
|
+
]
|
|
17
|
+
},
|
|
4
18
|
"type": "object",
|
|
5
19
|
"properties": {
|
|
6
20
|
"markdown": {
|
package/src/widget-markdown.ts
CHANGED
|
@@ -16,7 +16,7 @@ import cssLang from 'highlight.js/lib/languages/css'
|
|
|
16
16
|
import highlightCSS from 'highlight.js/styles/github.css?inline'
|
|
17
17
|
import githubCss from 'github-markdown-css/github-markdown.css?inline'
|
|
18
18
|
import { customElement, property, state } from 'lit/decorators.js'
|
|
19
|
-
import {
|
|
19
|
+
import { MarkdownConfiguration } from './definition-schema'
|
|
20
20
|
|
|
21
21
|
hljs.registerLanguage('shell', shell)
|
|
22
22
|
hljs.registerLanguage('bash', shell)
|
|
@@ -37,7 +37,7 @@ type Theme = {
|
|
|
37
37
|
@customElement('widget-markdown-versionplaceholder')
|
|
38
38
|
export class WidgetMarkdown extends LitElement {
|
|
39
39
|
@property({ type: Object })
|
|
40
|
-
inputData?:
|
|
40
|
+
inputData?: MarkdownConfiguration
|
|
41
41
|
|
|
42
42
|
@property({ type: Object })
|
|
43
43
|
theme?: Theme
|