@glyphjs/components 0.2.0 → 0.4.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.
- package/dist/index.cjs +548 -151
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +53 -34
- package/dist/index.d.ts +53 -34
- package/dist/index.js +549 -152
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.d.cts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { GlyphComponentProps, GlyphComponentDefinition, GraphNode, GraphEdge } from '@glyphjs/types';
|
|
1
|
+
import { GlyphComponentProps, InlineNode, GlyphComponentDefinition, GraphNode, GraphEdge } from '@glyphjs/types';
|
|
2
2
|
import { ReactElement } from 'react';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
|
|
5
5
|
interface CalloutData {
|
|
6
6
|
type: 'info' | 'warning' | 'error' | 'tip';
|
|
7
|
-
title?: string;
|
|
8
|
-
content: string;
|
|
7
|
+
title?: string | InlineNode[];
|
|
8
|
+
content: string | InlineNode[];
|
|
9
|
+
markdown?: boolean;
|
|
9
10
|
}
|
|
10
11
|
/**
|
|
11
12
|
* Renders a styled callout box with variant-specific icon, optional title,
|
|
@@ -47,10 +48,11 @@ declare const chartDefinition: GlyphComponentDefinition;
|
|
|
47
48
|
interface StepItem {
|
|
48
49
|
title: string;
|
|
49
50
|
status?: 'pending' | 'active' | 'completed';
|
|
50
|
-
content: string;
|
|
51
|
+
content: string | InlineNode[];
|
|
51
52
|
}
|
|
52
53
|
interface StepsData {
|
|
53
54
|
steps: StepItem[];
|
|
55
|
+
markdown?: boolean;
|
|
54
56
|
}
|
|
55
57
|
/**
|
|
56
58
|
* Renders a vertical list of steps with status indicators.
|
|
@@ -114,13 +116,14 @@ declare const tabsDefinition: GlyphComponentDefinition<TabsData>;
|
|
|
114
116
|
|
|
115
117
|
interface TimelineEvent {
|
|
116
118
|
date: string;
|
|
117
|
-
title: string;
|
|
118
|
-
description?: string;
|
|
119
|
+
title: string | InlineNode[];
|
|
120
|
+
description?: string | InlineNode[];
|
|
119
121
|
type?: string;
|
|
120
122
|
}
|
|
121
123
|
interface TimelineData {
|
|
122
124
|
events: TimelineEvent[];
|
|
123
125
|
orientation?: 'vertical' | 'horizontal';
|
|
126
|
+
markdown?: boolean;
|
|
124
127
|
}
|
|
125
128
|
/**
|
|
126
129
|
* Renders an interactive timeline visualization using D3 for positioning.
|
|
@@ -155,6 +158,7 @@ interface GraphData {
|
|
|
155
158
|
nodes: GraphNodeData[];
|
|
156
159
|
edges: GraphEdgeData[];
|
|
157
160
|
layout?: 'top-down' | 'left-right' | 'bottom-up' | 'radial' | 'force';
|
|
161
|
+
interactionMode?: 'modifier-key' | 'click-to-activate' | 'always';
|
|
158
162
|
}
|
|
159
163
|
declare function Graph({ data, block, outgoingRefs, onNavigate, onInteraction, container, }: GlyphComponentProps<GraphData>): ReactElement;
|
|
160
164
|
|
|
@@ -211,13 +215,14 @@ interface RelationData {
|
|
|
211
215
|
entities: Entity[];
|
|
212
216
|
relationships: Relationship[];
|
|
213
217
|
layout?: 'top-down' | 'left-right';
|
|
218
|
+
interactionMode?: 'modifier-key' | 'click-to-activate' | 'always';
|
|
214
219
|
}
|
|
215
|
-
declare function Relation({ data }: GlyphComponentProps<RelationData>): ReactElement;
|
|
220
|
+
declare function Relation({ data, block }: GlyphComponentProps<RelationData>): ReactElement;
|
|
216
221
|
|
|
217
222
|
declare const relationDefinition: GlyphComponentDefinition<RelationData>;
|
|
218
223
|
|
|
219
224
|
interface KpiMetric {
|
|
220
|
-
label: string;
|
|
225
|
+
label: string | InlineNode[];
|
|
221
226
|
value: string;
|
|
222
227
|
delta?: string;
|
|
223
228
|
trend?: 'up' | 'down' | 'flat';
|
|
@@ -228,6 +233,7 @@ interface KpiData {
|
|
|
228
233
|
title?: string;
|
|
229
234
|
metrics: KpiMetric[];
|
|
230
235
|
columns?: number;
|
|
236
|
+
markdown?: boolean;
|
|
231
237
|
}
|
|
232
238
|
declare function Kpi({ data, block, container }: GlyphComponentProps<KpiData>): ReactElement;
|
|
233
239
|
|
|
@@ -235,13 +241,14 @@ declare const kpiDefinition: GlyphComponentDefinition<KpiData>;
|
|
|
235
241
|
|
|
236
242
|
interface AccordionSection {
|
|
237
243
|
title: string;
|
|
238
|
-
content: string;
|
|
244
|
+
content: string | InlineNode[];
|
|
239
245
|
}
|
|
240
246
|
interface AccordionData {
|
|
241
247
|
title?: string;
|
|
242
248
|
sections: AccordionSection[];
|
|
243
249
|
defaultOpen?: number[];
|
|
244
250
|
multiple?: boolean;
|
|
251
|
+
markdown?: boolean;
|
|
245
252
|
}
|
|
246
253
|
declare function Accordion({ data, block, onInteraction, }: GlyphComponentProps<AccordionData>): ReactElement;
|
|
247
254
|
|
|
@@ -249,16 +256,17 @@ declare const accordionDefinition: GlyphComponentDefinition<AccordionData>;
|
|
|
249
256
|
|
|
250
257
|
interface ComparisonOption {
|
|
251
258
|
name: string;
|
|
252
|
-
description?: string;
|
|
259
|
+
description?: string | InlineNode[];
|
|
253
260
|
}
|
|
254
261
|
interface ComparisonFeature {
|
|
255
262
|
name: string;
|
|
256
|
-
values: string[];
|
|
263
|
+
values: (string | InlineNode[])[];
|
|
257
264
|
}
|
|
258
265
|
interface ComparisonData {
|
|
259
266
|
title?: string;
|
|
260
267
|
options: ComparisonOption[];
|
|
261
268
|
features: ComparisonFeature[];
|
|
269
|
+
markdown?: boolean;
|
|
262
270
|
}
|
|
263
271
|
declare function Comparison({ data, block, container, onInteraction, }: GlyphComponentProps<ComparisonData>): ReactElement;
|
|
264
272
|
|
|
@@ -305,8 +313,9 @@ interface FlowchartData {
|
|
|
305
313
|
nodes: FlowchartNodeData[];
|
|
306
314
|
edges: FlowchartEdgeData[];
|
|
307
315
|
direction: 'top-down' | 'left-right';
|
|
316
|
+
interactionMode?: 'modifier-key' | 'click-to-activate' | 'always';
|
|
308
317
|
}
|
|
309
|
-
declare function Flowchart({ data, container }: GlyphComponentProps<FlowchartData>): ReactElement;
|
|
318
|
+
declare function Flowchart({ data, block, container, }: GlyphComponentProps<FlowchartData>): ReactElement;
|
|
310
319
|
|
|
311
320
|
declare const flowchartDefinition: GlyphComponentDefinition<FlowchartData>;
|
|
312
321
|
|
|
@@ -436,29 +445,30 @@ declare const equationDefinition: GlyphComponentDefinition<EquationData>;
|
|
|
436
445
|
|
|
437
446
|
interface QuizMultipleChoice {
|
|
438
447
|
type: 'multiple-choice';
|
|
439
|
-
question: string;
|
|
440
|
-
options: string[];
|
|
448
|
+
question: string | InlineNode[];
|
|
449
|
+
options: (string | InlineNode[])[];
|
|
441
450
|
answer: number;
|
|
442
|
-
explanation?: string;
|
|
451
|
+
explanation?: string | InlineNode[];
|
|
443
452
|
}
|
|
444
453
|
interface QuizTrueFalse {
|
|
445
454
|
type: 'true-false';
|
|
446
|
-
question: string;
|
|
455
|
+
question: string | InlineNode[];
|
|
447
456
|
answer: boolean;
|
|
448
|
-
explanation?: string;
|
|
457
|
+
explanation?: string | InlineNode[];
|
|
449
458
|
}
|
|
450
459
|
interface QuizMultiSelect {
|
|
451
460
|
type: 'multi-select';
|
|
452
|
-
question: string;
|
|
453
|
-
options: string[];
|
|
461
|
+
question: string | InlineNode[];
|
|
462
|
+
options: (string | InlineNode[])[];
|
|
454
463
|
answer: number[];
|
|
455
|
-
explanation?: string;
|
|
464
|
+
explanation?: string | InlineNode[];
|
|
456
465
|
}
|
|
457
466
|
type QuizQuestion = QuizMultipleChoice | QuizTrueFalse | QuizMultiSelect;
|
|
458
467
|
interface QuizData {
|
|
459
468
|
questions: QuizQuestion[];
|
|
460
469
|
showScore?: boolean;
|
|
461
470
|
title?: string;
|
|
471
|
+
markdown?: boolean;
|
|
462
472
|
}
|
|
463
473
|
declare function Quiz({ data, block, onInteraction }: GlyphComponentProps<QuizData>): ReactElement;
|
|
464
474
|
|
|
@@ -470,10 +480,10 @@ interface CardAction {
|
|
|
470
480
|
}
|
|
471
481
|
interface CardItem {
|
|
472
482
|
title: string;
|
|
473
|
-
subtitle?: string;
|
|
483
|
+
subtitle?: string | InlineNode[];
|
|
474
484
|
image?: string;
|
|
475
485
|
icon?: string;
|
|
476
|
-
body?: string;
|
|
486
|
+
body?: string | InlineNode[];
|
|
477
487
|
actions?: CardAction[];
|
|
478
488
|
}
|
|
479
489
|
interface CardData {
|
|
@@ -481,6 +491,7 @@ interface CardData {
|
|
|
481
491
|
cards: CardItem[];
|
|
482
492
|
variant?: 'default' | 'outlined' | 'elevated';
|
|
483
493
|
columns?: number;
|
|
494
|
+
markdown?: boolean;
|
|
484
495
|
}
|
|
485
496
|
declare function Card({ data, block, container }: GlyphComponentProps<CardData>): ReactElement;
|
|
486
497
|
|
|
@@ -490,12 +501,12 @@ interface StatItem {
|
|
|
490
501
|
type: 'stat';
|
|
491
502
|
label: string;
|
|
492
503
|
value: string;
|
|
493
|
-
description?: string;
|
|
504
|
+
description?: string | InlineNode[];
|
|
494
505
|
}
|
|
495
506
|
interface FactItem {
|
|
496
507
|
type: 'fact';
|
|
497
508
|
icon?: string;
|
|
498
|
-
text: string;
|
|
509
|
+
text: string | InlineNode[];
|
|
499
510
|
}
|
|
500
511
|
interface ProgressItem {
|
|
501
512
|
type: 'progress';
|
|
@@ -538,25 +549,27 @@ interface InfographicSection {
|
|
|
538
549
|
interface InfographicData {
|
|
539
550
|
title?: string;
|
|
540
551
|
sections: InfographicSection[];
|
|
552
|
+
markdown?: boolean;
|
|
541
553
|
}
|
|
542
554
|
declare function Infographic({ data, block, container, }: GlyphComponentProps<InfographicData>): ReactElement;
|
|
543
555
|
|
|
544
556
|
declare const infographicDefinition: GlyphComponentDefinition<InfographicData>;
|
|
545
557
|
|
|
546
558
|
interface PollData {
|
|
547
|
-
question: string;
|
|
548
|
-
options: string[];
|
|
559
|
+
question: string | InlineNode[];
|
|
560
|
+
options: (string | InlineNode[])[];
|
|
549
561
|
multiple?: boolean;
|
|
550
562
|
showResults?: boolean;
|
|
551
563
|
title?: string;
|
|
564
|
+
markdown?: boolean;
|
|
552
565
|
}
|
|
553
566
|
declare function Poll({ data, block, onInteraction }: GlyphComponentProps<PollData>): ReactElement;
|
|
554
567
|
|
|
555
568
|
declare const pollDefinition: GlyphComponentDefinition<PollData>;
|
|
556
569
|
|
|
557
570
|
interface RatingItem {
|
|
558
|
-
label: string;
|
|
559
|
-
description?: string;
|
|
571
|
+
label: string | InlineNode[];
|
|
572
|
+
description?: string | InlineNode[];
|
|
560
573
|
}
|
|
561
574
|
interface RatingData {
|
|
562
575
|
title?: string;
|
|
@@ -567,6 +580,7 @@ interface RatingData {
|
|
|
567
580
|
high: string;
|
|
568
581
|
};
|
|
569
582
|
items: RatingItem[];
|
|
583
|
+
markdown?: boolean;
|
|
570
584
|
}
|
|
571
585
|
declare function Rating({ data, block, onInteraction, }: GlyphComponentProps<RatingData>): ReactElement;
|
|
572
586
|
|
|
@@ -574,12 +588,13 @@ declare const ratingDefinition: GlyphComponentDefinition<RatingData>;
|
|
|
574
588
|
|
|
575
589
|
interface RankerItemData {
|
|
576
590
|
id: string;
|
|
577
|
-
label: string;
|
|
591
|
+
label: string | InlineNode[];
|
|
578
592
|
description?: string;
|
|
579
593
|
}
|
|
580
594
|
interface RankerData {
|
|
581
595
|
title?: string;
|
|
582
596
|
items: RankerItemData[];
|
|
597
|
+
markdown?: boolean;
|
|
583
598
|
}
|
|
584
599
|
declare function Ranker({ data, block, onInteraction, }: GlyphComponentProps<RankerData>): ReactElement;
|
|
585
600
|
|
|
@@ -587,7 +602,7 @@ declare const rankerDefinition: GlyphComponentDefinition<RankerData>;
|
|
|
587
602
|
|
|
588
603
|
interface SliderParameter {
|
|
589
604
|
id: string;
|
|
590
|
-
label: string;
|
|
605
|
+
label: string | InlineNode[];
|
|
591
606
|
min?: number;
|
|
592
607
|
max?: number;
|
|
593
608
|
step?: number;
|
|
@@ -598,6 +613,7 @@ interface SliderData {
|
|
|
598
613
|
title?: string;
|
|
599
614
|
layout?: 'vertical' | 'horizontal';
|
|
600
615
|
parameters: SliderParameter[];
|
|
616
|
+
markdown?: boolean;
|
|
601
617
|
}
|
|
602
618
|
declare function Slider({ data, block, onInteraction, }: GlyphComponentProps<SliderData>): ReactElement;
|
|
603
619
|
|
|
@@ -605,12 +621,12 @@ declare const sliderDefinition: GlyphComponentDefinition<SliderData>;
|
|
|
605
621
|
|
|
606
622
|
interface MatrixColumn {
|
|
607
623
|
id: string;
|
|
608
|
-
label: string;
|
|
624
|
+
label: string | InlineNode[];
|
|
609
625
|
weight?: number;
|
|
610
626
|
}
|
|
611
627
|
interface MatrixRow {
|
|
612
628
|
id: string;
|
|
613
|
-
label: string;
|
|
629
|
+
label: string | InlineNode[];
|
|
614
630
|
}
|
|
615
631
|
interface MatrixData {
|
|
616
632
|
title?: string;
|
|
@@ -618,6 +634,7 @@ interface MatrixData {
|
|
|
618
634
|
showTotals?: boolean;
|
|
619
635
|
columns: MatrixColumn[];
|
|
620
636
|
rows: MatrixRow[];
|
|
637
|
+
markdown?: boolean;
|
|
621
638
|
}
|
|
622
639
|
declare function Matrix({ data, block, onInteraction, }: GlyphComponentProps<MatrixData>): ReactElement;
|
|
623
640
|
|
|
@@ -667,9 +684,10 @@ interface RangeField {
|
|
|
667
684
|
type FormField = TextField | TextareaField | SelectField | CheckboxField | RangeField;
|
|
668
685
|
interface FormData {
|
|
669
686
|
title?: string;
|
|
670
|
-
description?: string;
|
|
687
|
+
description?: string | InlineNode[];
|
|
671
688
|
submitLabel?: string;
|
|
672
689
|
fields: FormField[];
|
|
690
|
+
markdown?: boolean;
|
|
673
691
|
}
|
|
674
692
|
declare function Form({ data, block, onInteraction }: GlyphComponentProps<FormData>): ReactElement;
|
|
675
693
|
|
|
@@ -709,8 +727,9 @@ interface Annotation {
|
|
|
709
727
|
interface AnnotateData {
|
|
710
728
|
title?: string;
|
|
711
729
|
labels: AnnotateLabel[];
|
|
712
|
-
text: string;
|
|
730
|
+
text: string | InlineNode[];
|
|
713
731
|
annotations?: Annotation[];
|
|
732
|
+
markdown?: boolean;
|
|
714
733
|
}
|
|
715
734
|
declare function Annotate({ data, block, onInteraction, }: GlyphComponentProps<AnnotateData>): ReactElement;
|
|
716
735
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { GlyphComponentProps, GlyphComponentDefinition, GraphNode, GraphEdge } from '@glyphjs/types';
|
|
1
|
+
import { GlyphComponentProps, InlineNode, GlyphComponentDefinition, GraphNode, GraphEdge } from '@glyphjs/types';
|
|
2
2
|
import { ReactElement } from 'react';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
|
|
5
5
|
interface CalloutData {
|
|
6
6
|
type: 'info' | 'warning' | 'error' | 'tip';
|
|
7
|
-
title?: string;
|
|
8
|
-
content: string;
|
|
7
|
+
title?: string | InlineNode[];
|
|
8
|
+
content: string | InlineNode[];
|
|
9
|
+
markdown?: boolean;
|
|
9
10
|
}
|
|
10
11
|
/**
|
|
11
12
|
* Renders a styled callout box with variant-specific icon, optional title,
|
|
@@ -47,10 +48,11 @@ declare const chartDefinition: GlyphComponentDefinition;
|
|
|
47
48
|
interface StepItem {
|
|
48
49
|
title: string;
|
|
49
50
|
status?: 'pending' | 'active' | 'completed';
|
|
50
|
-
content: string;
|
|
51
|
+
content: string | InlineNode[];
|
|
51
52
|
}
|
|
52
53
|
interface StepsData {
|
|
53
54
|
steps: StepItem[];
|
|
55
|
+
markdown?: boolean;
|
|
54
56
|
}
|
|
55
57
|
/**
|
|
56
58
|
* Renders a vertical list of steps with status indicators.
|
|
@@ -114,13 +116,14 @@ declare const tabsDefinition: GlyphComponentDefinition<TabsData>;
|
|
|
114
116
|
|
|
115
117
|
interface TimelineEvent {
|
|
116
118
|
date: string;
|
|
117
|
-
title: string;
|
|
118
|
-
description?: string;
|
|
119
|
+
title: string | InlineNode[];
|
|
120
|
+
description?: string | InlineNode[];
|
|
119
121
|
type?: string;
|
|
120
122
|
}
|
|
121
123
|
interface TimelineData {
|
|
122
124
|
events: TimelineEvent[];
|
|
123
125
|
orientation?: 'vertical' | 'horizontal';
|
|
126
|
+
markdown?: boolean;
|
|
124
127
|
}
|
|
125
128
|
/**
|
|
126
129
|
* Renders an interactive timeline visualization using D3 for positioning.
|
|
@@ -155,6 +158,7 @@ interface GraphData {
|
|
|
155
158
|
nodes: GraphNodeData[];
|
|
156
159
|
edges: GraphEdgeData[];
|
|
157
160
|
layout?: 'top-down' | 'left-right' | 'bottom-up' | 'radial' | 'force';
|
|
161
|
+
interactionMode?: 'modifier-key' | 'click-to-activate' | 'always';
|
|
158
162
|
}
|
|
159
163
|
declare function Graph({ data, block, outgoingRefs, onNavigate, onInteraction, container, }: GlyphComponentProps<GraphData>): ReactElement;
|
|
160
164
|
|
|
@@ -211,13 +215,14 @@ interface RelationData {
|
|
|
211
215
|
entities: Entity[];
|
|
212
216
|
relationships: Relationship[];
|
|
213
217
|
layout?: 'top-down' | 'left-right';
|
|
218
|
+
interactionMode?: 'modifier-key' | 'click-to-activate' | 'always';
|
|
214
219
|
}
|
|
215
|
-
declare function Relation({ data }: GlyphComponentProps<RelationData>): ReactElement;
|
|
220
|
+
declare function Relation({ data, block }: GlyphComponentProps<RelationData>): ReactElement;
|
|
216
221
|
|
|
217
222
|
declare const relationDefinition: GlyphComponentDefinition<RelationData>;
|
|
218
223
|
|
|
219
224
|
interface KpiMetric {
|
|
220
|
-
label: string;
|
|
225
|
+
label: string | InlineNode[];
|
|
221
226
|
value: string;
|
|
222
227
|
delta?: string;
|
|
223
228
|
trend?: 'up' | 'down' | 'flat';
|
|
@@ -228,6 +233,7 @@ interface KpiData {
|
|
|
228
233
|
title?: string;
|
|
229
234
|
metrics: KpiMetric[];
|
|
230
235
|
columns?: number;
|
|
236
|
+
markdown?: boolean;
|
|
231
237
|
}
|
|
232
238
|
declare function Kpi({ data, block, container }: GlyphComponentProps<KpiData>): ReactElement;
|
|
233
239
|
|
|
@@ -235,13 +241,14 @@ declare const kpiDefinition: GlyphComponentDefinition<KpiData>;
|
|
|
235
241
|
|
|
236
242
|
interface AccordionSection {
|
|
237
243
|
title: string;
|
|
238
|
-
content: string;
|
|
244
|
+
content: string | InlineNode[];
|
|
239
245
|
}
|
|
240
246
|
interface AccordionData {
|
|
241
247
|
title?: string;
|
|
242
248
|
sections: AccordionSection[];
|
|
243
249
|
defaultOpen?: number[];
|
|
244
250
|
multiple?: boolean;
|
|
251
|
+
markdown?: boolean;
|
|
245
252
|
}
|
|
246
253
|
declare function Accordion({ data, block, onInteraction, }: GlyphComponentProps<AccordionData>): ReactElement;
|
|
247
254
|
|
|
@@ -249,16 +256,17 @@ declare const accordionDefinition: GlyphComponentDefinition<AccordionData>;
|
|
|
249
256
|
|
|
250
257
|
interface ComparisonOption {
|
|
251
258
|
name: string;
|
|
252
|
-
description?: string;
|
|
259
|
+
description?: string | InlineNode[];
|
|
253
260
|
}
|
|
254
261
|
interface ComparisonFeature {
|
|
255
262
|
name: string;
|
|
256
|
-
values: string[];
|
|
263
|
+
values: (string | InlineNode[])[];
|
|
257
264
|
}
|
|
258
265
|
interface ComparisonData {
|
|
259
266
|
title?: string;
|
|
260
267
|
options: ComparisonOption[];
|
|
261
268
|
features: ComparisonFeature[];
|
|
269
|
+
markdown?: boolean;
|
|
262
270
|
}
|
|
263
271
|
declare function Comparison({ data, block, container, onInteraction, }: GlyphComponentProps<ComparisonData>): ReactElement;
|
|
264
272
|
|
|
@@ -305,8 +313,9 @@ interface FlowchartData {
|
|
|
305
313
|
nodes: FlowchartNodeData[];
|
|
306
314
|
edges: FlowchartEdgeData[];
|
|
307
315
|
direction: 'top-down' | 'left-right';
|
|
316
|
+
interactionMode?: 'modifier-key' | 'click-to-activate' | 'always';
|
|
308
317
|
}
|
|
309
|
-
declare function Flowchart({ data, container }: GlyphComponentProps<FlowchartData>): ReactElement;
|
|
318
|
+
declare function Flowchart({ data, block, container, }: GlyphComponentProps<FlowchartData>): ReactElement;
|
|
310
319
|
|
|
311
320
|
declare const flowchartDefinition: GlyphComponentDefinition<FlowchartData>;
|
|
312
321
|
|
|
@@ -436,29 +445,30 @@ declare const equationDefinition: GlyphComponentDefinition<EquationData>;
|
|
|
436
445
|
|
|
437
446
|
interface QuizMultipleChoice {
|
|
438
447
|
type: 'multiple-choice';
|
|
439
|
-
question: string;
|
|
440
|
-
options: string[];
|
|
448
|
+
question: string | InlineNode[];
|
|
449
|
+
options: (string | InlineNode[])[];
|
|
441
450
|
answer: number;
|
|
442
|
-
explanation?: string;
|
|
451
|
+
explanation?: string | InlineNode[];
|
|
443
452
|
}
|
|
444
453
|
interface QuizTrueFalse {
|
|
445
454
|
type: 'true-false';
|
|
446
|
-
question: string;
|
|
455
|
+
question: string | InlineNode[];
|
|
447
456
|
answer: boolean;
|
|
448
|
-
explanation?: string;
|
|
457
|
+
explanation?: string | InlineNode[];
|
|
449
458
|
}
|
|
450
459
|
interface QuizMultiSelect {
|
|
451
460
|
type: 'multi-select';
|
|
452
|
-
question: string;
|
|
453
|
-
options: string[];
|
|
461
|
+
question: string | InlineNode[];
|
|
462
|
+
options: (string | InlineNode[])[];
|
|
454
463
|
answer: number[];
|
|
455
|
-
explanation?: string;
|
|
464
|
+
explanation?: string | InlineNode[];
|
|
456
465
|
}
|
|
457
466
|
type QuizQuestion = QuizMultipleChoice | QuizTrueFalse | QuizMultiSelect;
|
|
458
467
|
interface QuizData {
|
|
459
468
|
questions: QuizQuestion[];
|
|
460
469
|
showScore?: boolean;
|
|
461
470
|
title?: string;
|
|
471
|
+
markdown?: boolean;
|
|
462
472
|
}
|
|
463
473
|
declare function Quiz({ data, block, onInteraction }: GlyphComponentProps<QuizData>): ReactElement;
|
|
464
474
|
|
|
@@ -470,10 +480,10 @@ interface CardAction {
|
|
|
470
480
|
}
|
|
471
481
|
interface CardItem {
|
|
472
482
|
title: string;
|
|
473
|
-
subtitle?: string;
|
|
483
|
+
subtitle?: string | InlineNode[];
|
|
474
484
|
image?: string;
|
|
475
485
|
icon?: string;
|
|
476
|
-
body?: string;
|
|
486
|
+
body?: string | InlineNode[];
|
|
477
487
|
actions?: CardAction[];
|
|
478
488
|
}
|
|
479
489
|
interface CardData {
|
|
@@ -481,6 +491,7 @@ interface CardData {
|
|
|
481
491
|
cards: CardItem[];
|
|
482
492
|
variant?: 'default' | 'outlined' | 'elevated';
|
|
483
493
|
columns?: number;
|
|
494
|
+
markdown?: boolean;
|
|
484
495
|
}
|
|
485
496
|
declare function Card({ data, block, container }: GlyphComponentProps<CardData>): ReactElement;
|
|
486
497
|
|
|
@@ -490,12 +501,12 @@ interface StatItem {
|
|
|
490
501
|
type: 'stat';
|
|
491
502
|
label: string;
|
|
492
503
|
value: string;
|
|
493
|
-
description?: string;
|
|
504
|
+
description?: string | InlineNode[];
|
|
494
505
|
}
|
|
495
506
|
interface FactItem {
|
|
496
507
|
type: 'fact';
|
|
497
508
|
icon?: string;
|
|
498
|
-
text: string;
|
|
509
|
+
text: string | InlineNode[];
|
|
499
510
|
}
|
|
500
511
|
interface ProgressItem {
|
|
501
512
|
type: 'progress';
|
|
@@ -538,25 +549,27 @@ interface InfographicSection {
|
|
|
538
549
|
interface InfographicData {
|
|
539
550
|
title?: string;
|
|
540
551
|
sections: InfographicSection[];
|
|
552
|
+
markdown?: boolean;
|
|
541
553
|
}
|
|
542
554
|
declare function Infographic({ data, block, container, }: GlyphComponentProps<InfographicData>): ReactElement;
|
|
543
555
|
|
|
544
556
|
declare const infographicDefinition: GlyphComponentDefinition<InfographicData>;
|
|
545
557
|
|
|
546
558
|
interface PollData {
|
|
547
|
-
question: string;
|
|
548
|
-
options: string[];
|
|
559
|
+
question: string | InlineNode[];
|
|
560
|
+
options: (string | InlineNode[])[];
|
|
549
561
|
multiple?: boolean;
|
|
550
562
|
showResults?: boolean;
|
|
551
563
|
title?: string;
|
|
564
|
+
markdown?: boolean;
|
|
552
565
|
}
|
|
553
566
|
declare function Poll({ data, block, onInteraction }: GlyphComponentProps<PollData>): ReactElement;
|
|
554
567
|
|
|
555
568
|
declare const pollDefinition: GlyphComponentDefinition<PollData>;
|
|
556
569
|
|
|
557
570
|
interface RatingItem {
|
|
558
|
-
label: string;
|
|
559
|
-
description?: string;
|
|
571
|
+
label: string | InlineNode[];
|
|
572
|
+
description?: string | InlineNode[];
|
|
560
573
|
}
|
|
561
574
|
interface RatingData {
|
|
562
575
|
title?: string;
|
|
@@ -567,6 +580,7 @@ interface RatingData {
|
|
|
567
580
|
high: string;
|
|
568
581
|
};
|
|
569
582
|
items: RatingItem[];
|
|
583
|
+
markdown?: boolean;
|
|
570
584
|
}
|
|
571
585
|
declare function Rating({ data, block, onInteraction, }: GlyphComponentProps<RatingData>): ReactElement;
|
|
572
586
|
|
|
@@ -574,12 +588,13 @@ declare const ratingDefinition: GlyphComponentDefinition<RatingData>;
|
|
|
574
588
|
|
|
575
589
|
interface RankerItemData {
|
|
576
590
|
id: string;
|
|
577
|
-
label: string;
|
|
591
|
+
label: string | InlineNode[];
|
|
578
592
|
description?: string;
|
|
579
593
|
}
|
|
580
594
|
interface RankerData {
|
|
581
595
|
title?: string;
|
|
582
596
|
items: RankerItemData[];
|
|
597
|
+
markdown?: boolean;
|
|
583
598
|
}
|
|
584
599
|
declare function Ranker({ data, block, onInteraction, }: GlyphComponentProps<RankerData>): ReactElement;
|
|
585
600
|
|
|
@@ -587,7 +602,7 @@ declare const rankerDefinition: GlyphComponentDefinition<RankerData>;
|
|
|
587
602
|
|
|
588
603
|
interface SliderParameter {
|
|
589
604
|
id: string;
|
|
590
|
-
label: string;
|
|
605
|
+
label: string | InlineNode[];
|
|
591
606
|
min?: number;
|
|
592
607
|
max?: number;
|
|
593
608
|
step?: number;
|
|
@@ -598,6 +613,7 @@ interface SliderData {
|
|
|
598
613
|
title?: string;
|
|
599
614
|
layout?: 'vertical' | 'horizontal';
|
|
600
615
|
parameters: SliderParameter[];
|
|
616
|
+
markdown?: boolean;
|
|
601
617
|
}
|
|
602
618
|
declare function Slider({ data, block, onInteraction, }: GlyphComponentProps<SliderData>): ReactElement;
|
|
603
619
|
|
|
@@ -605,12 +621,12 @@ declare const sliderDefinition: GlyphComponentDefinition<SliderData>;
|
|
|
605
621
|
|
|
606
622
|
interface MatrixColumn {
|
|
607
623
|
id: string;
|
|
608
|
-
label: string;
|
|
624
|
+
label: string | InlineNode[];
|
|
609
625
|
weight?: number;
|
|
610
626
|
}
|
|
611
627
|
interface MatrixRow {
|
|
612
628
|
id: string;
|
|
613
|
-
label: string;
|
|
629
|
+
label: string | InlineNode[];
|
|
614
630
|
}
|
|
615
631
|
interface MatrixData {
|
|
616
632
|
title?: string;
|
|
@@ -618,6 +634,7 @@ interface MatrixData {
|
|
|
618
634
|
showTotals?: boolean;
|
|
619
635
|
columns: MatrixColumn[];
|
|
620
636
|
rows: MatrixRow[];
|
|
637
|
+
markdown?: boolean;
|
|
621
638
|
}
|
|
622
639
|
declare function Matrix({ data, block, onInteraction, }: GlyphComponentProps<MatrixData>): ReactElement;
|
|
623
640
|
|
|
@@ -667,9 +684,10 @@ interface RangeField {
|
|
|
667
684
|
type FormField = TextField | TextareaField | SelectField | CheckboxField | RangeField;
|
|
668
685
|
interface FormData {
|
|
669
686
|
title?: string;
|
|
670
|
-
description?: string;
|
|
687
|
+
description?: string | InlineNode[];
|
|
671
688
|
submitLabel?: string;
|
|
672
689
|
fields: FormField[];
|
|
690
|
+
markdown?: boolean;
|
|
673
691
|
}
|
|
674
692
|
declare function Form({ data, block, onInteraction }: GlyphComponentProps<FormData>): ReactElement;
|
|
675
693
|
|
|
@@ -709,8 +727,9 @@ interface Annotation {
|
|
|
709
727
|
interface AnnotateData {
|
|
710
728
|
title?: string;
|
|
711
729
|
labels: AnnotateLabel[];
|
|
712
|
-
text: string;
|
|
730
|
+
text: string | InlineNode[];
|
|
713
731
|
annotations?: Annotation[];
|
|
732
|
+
markdown?: boolean;
|
|
714
733
|
}
|
|
715
734
|
declare function Annotate({ data, block, onInteraction, }: GlyphComponentProps<AnnotateData>): ReactElement;
|
|
716
735
|
|