@snackbit/opendil 0.1.0 → 0.2.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/README.md +74 -137
- package/bin/opendil.mjs +66 -11
- package/bin/publish-directory.d.mts +18 -0
- package/bin/publish-directory.mjs +173 -17
- package/dist/agent-spec.js +9 -0
- package/dist/chunk-RPZW4WVX.js +2 -0
- package/dist/chunk-ZSTXLIS6.js +2 -0
- package/dist/index.js +1 -10
- package/dist/runtime/frame.html +117 -44
- package/dist/runtime/frame.js +501 -505
- package/dist/spec/genui.agent.full.md +1927 -0
- package/dist/spec/genui.agent.md +479 -0
- package/dist/spec/genui.examples.md +836 -0
- package/dist/styled-renderer-PHI4MNPF.js +2441 -0
- package/dist/styles.css +115 -42
- package/dist/types/agent-spec.d.ts +12 -0
- package/dist/types/components/ui/controls/select.d.ts +14 -0
- package/dist/types/components/ui/controls/tabs.d.ts +7 -0
- package/dist/types/components/ui/controls/toggle-group.d.ts +3 -2
- package/dist/types/components/ui/display/chart.d.ts +6 -12
- package/dist/types/components/ui/media/carousel.d.ts +1 -1
- package/dist/types/components/ui/overlays/collapsible.d.ts +6 -0
- package/dist/types/components/ui/overlays/popover.d.ts +2 -1
- package/dist/types/components/ui/overlays/ui-scope.d.ts +16 -0
- package/dist/types/dil/custom-component.d.ts +1 -1
- package/dist/types/dil/dil-renderer.d.ts +58 -23
- package/dist/types/dil/isolation/frame-startup.d.ts +18 -0
- package/dist/types/dil/isolation/frame-theme.d.ts +14 -0
- package/dist/types/dil/isolation/frame-viewport.d.ts +30 -0
- package/dist/types/dil/isolation/isolated-renderer.d.ts +13 -7
- package/dist/types/dil/isolation/overlay-room.d.ts +29 -0
- package/dist/types/dil/isolation/viewport-scroll.d.ts +3 -2
- package/dist/types/dil/message-renderer.d.ts +6 -5
- package/dist/types/dil/parser/dil-parser.d.ts +44 -3
- package/dist/types/dil/parser/lexical.d.ts +13 -2
- package/dist/types/dil/parser/literal-tag.d.ts +16 -0
- package/dist/types/dil/parser/markdown-lexing.d.ts +41 -0
- package/dist/types/dil/parser/types.d.ts +22 -1
- package/dist/types/dil/parser/unfinished.d.ts +22 -0
- package/dist/types/dil/parser/vocabulary.d.ts +12 -0
- package/dist/types/dil/render-error.d.ts +47 -0
- package/dist/types/dil/renderer-environment.d.ts +19 -8
- package/dist/types/dil/runtime/document.d.ts +18 -6
- package/dist/types/dil/runtime/execution-queue.d.ts +2 -1
- package/dist/types/dil/runtime/expressions.d.ts +8 -5
- package/dist/types/dil/runtime/inline-worker.d.ts +33 -0
- package/dist/types/dil/runtime/view-cost.d.ts +2 -2
- package/dist/types/dil/styled-renderer.d.ts +39 -0
- package/dist/types/dil/view/conditional-view.d.ts +3 -3
- package/dist/types/dil/view/markdown-node.d.ts +3 -3
- package/dist/types/dil/view/node-children.d.ts +3 -3
- package/dist/types/dil/view/node-view.d.ts +2 -2
- package/dist/types/dil/view/progressive-reveal.d.ts +5 -4
- package/dist/types/dil/view/render-boundary.d.ts +13 -0
- package/dist/types/dil/view/render-limit.d.ts +1 -1
- package/dist/types/dil/view/repeated-nodes.d.ts +4 -4
- package/dist/types/dil/view/reveal/controller.d.ts +9 -2
- package/dist/types/dil/view/reveal/presentation.d.ts +1 -1
- package/dist/types/dil/view/scroll/controller.d.ts +16 -2
- package/dist/types/dil/view/scroll/host-viewport.d.ts +24 -0
- package/dist/types/dil/view/scroll/root-tracker.d.ts +17 -0
- package/dist/types/dil/view/scroll/scroll-root.d.ts +36 -0
- package/dist/types/dil/view/scroll-options.d.ts +15 -0
- package/dist/types/dil/view/stream-follow.d.ts +10 -3
- package/dist/types/dil/view/table-context.d.ts +1 -1
- package/dist/types/dil/view/virtual-flow.d.ts +3 -3
- package/dist/types/dil/widgets/action-feedback.d.ts +1 -1
- package/dist/types/dil/widgets/charts/chart-hover.d.ts +17 -0
- package/dist/types/dil/widgets/charts/chart-legend.d.ts +1 -1
- package/dist/types/dil/widgets/charts/chart-pie.d.ts +16 -0
- package/dist/types/dil/widgets/charts/chart-series.d.ts +10 -2
- package/dist/types/dil/widgets/charts/chart-snapping.d.ts +3 -5
- package/dist/types/dil/widgets/charts/snap-cursor.d.ts +3 -7
- package/dist/types/dil/widgets/charts/snap-tooltip.d.ts +6 -4
- package/dist/types/dil/widgets/code-block.d.ts +1 -1
- package/dist/types/dil/widgets/controls.d.ts +2 -2
- package/dist/types/dil/widgets/graphs/node-graph.d.ts +1 -1
- package/dist/types/dil/widgets/graphs/service-node.d.ts +1 -1
- package/dist/types/dil/widgets/primitives/primitive.d.ts +4 -4
- package/dist/types/index.d.ts +9 -8
- package/dist/types/ui.d.ts +11 -8
- package/dist/ui.js +1 -1
- package/package.json +13 -2
- package/styles/tailwind.css +53 -1
- package/styles/tokens.css +3 -0
- package/dist/chunk-ZWAN2JCV.js +0 -2
- package/dist/runtime/vm.js +0 -6
- package/dist/shadow-renderer-F25KL3C4.js +0 -2363
package/dist/styles.css
CHANGED
|
@@ -317,6 +317,9 @@
|
|
|
317
317
|
:where(.dil-scope) .animate-pulse {
|
|
318
318
|
animation: var(--animate-pulse);
|
|
319
319
|
}
|
|
320
|
+
:where(.dil-scope) .cursor-default {
|
|
321
|
+
cursor: default;
|
|
322
|
+
}
|
|
320
323
|
:where(.dil-scope) .cursor-pointer {
|
|
321
324
|
cursor: pointer;
|
|
322
325
|
}
|
|
@@ -413,6 +416,9 @@
|
|
|
413
416
|
:where(.dil-scope) .rounded-none {
|
|
414
417
|
border-radius: 0;
|
|
415
418
|
}
|
|
419
|
+
:where(.dil-scope) .rounded-sm {
|
|
420
|
+
border-radius: calc(var(--radius) - 4px);
|
|
421
|
+
}
|
|
416
422
|
:where(.dil-scope) .rounded-xl {
|
|
417
423
|
border-radius: calc(var(--radius) + 4px);
|
|
418
424
|
}
|
|
@@ -572,12 +578,18 @@
|
|
|
572
578
|
:where(.dil-scope) .pt-4 {
|
|
573
579
|
padding-top: calc(var(--spacing) * 4);
|
|
574
580
|
}
|
|
581
|
+
:where(.dil-scope) .pr-2 {
|
|
582
|
+
padding-right: calc(var(--spacing) * 2);
|
|
583
|
+
}
|
|
575
584
|
:where(.dil-scope) .pb-3 {
|
|
576
585
|
padding-bottom: calc(var(--spacing) * 3);
|
|
577
586
|
}
|
|
578
587
|
:where(.dil-scope) .pl-4 {
|
|
579
588
|
padding-left: calc(var(--spacing) * 4);
|
|
580
589
|
}
|
|
590
|
+
:where(.dil-scope) .pl-8 {
|
|
591
|
+
padding-left: calc(var(--spacing) * 8);
|
|
592
|
+
}
|
|
581
593
|
:where(.dil-scope) .text-left {
|
|
582
594
|
text-align: left;
|
|
583
595
|
}
|
|
@@ -648,6 +660,9 @@
|
|
|
648
660
|
:where(.dil-scope) .text-white {
|
|
649
661
|
color: var(--color-white);
|
|
650
662
|
}
|
|
663
|
+
:where(.dil-scope) .lowercase {
|
|
664
|
+
text-transform: lowercase;
|
|
665
|
+
}
|
|
651
666
|
:where(.dil-scope) .tabular-nums {
|
|
652
667
|
--tw-numeric-spacing: tabular-nums;
|
|
653
668
|
font-variant-numeric: var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,);
|
|
@@ -655,6 +670,9 @@
|
|
|
655
670
|
:where(.dil-scope) .line-through {
|
|
656
671
|
text-decoration-line: line-through;
|
|
657
672
|
}
|
|
673
|
+
:where(.dil-scope) .underline {
|
|
674
|
+
text-decoration-line: underline;
|
|
675
|
+
}
|
|
658
676
|
:where(.dil-scope) .underline-offset-4 {
|
|
659
677
|
text-underline-offset: 4px;
|
|
660
678
|
}
|
|
@@ -917,9 +935,15 @@
|
|
|
917
935
|
--tw-ring-color: color-mix(in oklab, var(--destructive) 20%, transparent);
|
|
918
936
|
}
|
|
919
937
|
}
|
|
938
|
+
:where(.dil-scope) .data-\[disabled\]\:pointer-events-none[data-disabled] {
|
|
939
|
+
pointer-events: none;
|
|
940
|
+
}
|
|
920
941
|
:where(.dil-scope) .data-\[disabled\]\:opacity-50[data-disabled] {
|
|
921
942
|
opacity: 50%;
|
|
922
943
|
}
|
|
944
|
+
:where(.dil-scope) .data-\[highlighted\]\:bg-accent[data-highlighted] {
|
|
945
|
+
background-color: var(--accent);
|
|
946
|
+
}
|
|
923
947
|
:where(.dil-scope) .data-\[orientation\=horizontal\]\:h-1\.5[data-orientation="horizontal"] {
|
|
924
948
|
height: calc(var(--spacing) * 1.5);
|
|
925
949
|
}
|
|
@@ -953,6 +977,16 @@
|
|
|
953
977
|
:where(.dil-scope) .data-\[orientation\=vertical\]\:flex-col[data-orientation="vertical"] {
|
|
954
978
|
flex-direction: column;
|
|
955
979
|
}
|
|
980
|
+
:where(.dil-scope) .data-\[size\=sm\]\:px-2[data-size="sm"] {
|
|
981
|
+
padding-inline: calc(var(--spacing) * 2);
|
|
982
|
+
}
|
|
983
|
+
:where(.dil-scope) .data-\[state\=active\]\:bg-background[data-state="active"] {
|
|
984
|
+
background-color: var(--background);
|
|
985
|
+
}
|
|
986
|
+
:where(.dil-scope) .data-\[state\=active\]\:shadow-sm[data-state="active"] {
|
|
987
|
+
--tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1));
|
|
988
|
+
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
989
|
+
}
|
|
956
990
|
:where(.dil-scope) .data-\[state\=checked\]\:border-primary[data-state="checked"] {
|
|
957
991
|
border-color: var(--primary);
|
|
958
992
|
}
|
|
@@ -988,60 +1022,54 @@
|
|
|
988
1022
|
line-height: var(--tw-leading, var(--text-sm--line-height));
|
|
989
1023
|
}
|
|
990
1024
|
}
|
|
991
|
-
|
|
992
|
-
:
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
:
|
|
996
|
-
|
|
1025
|
+
.dil-dark\:border-input:where(.dil-scope[data-theme="dark"], .dil-scope[data-theme="dark"] *) {
|
|
1026
|
+
border-color: var(--input);
|
|
1027
|
+
}
|
|
1028
|
+
.dil-dark\:bg-destructive\/60:where(.dil-scope[data-theme="dark"], .dil-scope[data-theme="dark"] *) {
|
|
1029
|
+
background-color: var(--destructive);
|
|
1030
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
1031
|
+
background-color: color-mix(in oklab, var(--destructive) 60%, transparent);
|
|
997
1032
|
}
|
|
1033
|
+
}
|
|
1034
|
+
.dil-dark\:bg-input\/30:where(.dil-scope[data-theme="dark"], .dil-scope[data-theme="dark"] *) {
|
|
1035
|
+
background-color: var(--input);
|
|
998
1036
|
@supports (color: color-mix(in lab, red, red)) {
|
|
999
|
-
:
|
|
1000
|
-
background-color: color-mix(in oklab, var(--destructive) 60%, transparent);
|
|
1001
|
-
}
|
|
1037
|
+
background-color: color-mix(in oklab, var(--input) 30%, transparent);
|
|
1002
1038
|
}
|
|
1003
|
-
|
|
1004
|
-
|
|
1039
|
+
}
|
|
1040
|
+
@media (hover: hover) {
|
|
1041
|
+
.dil-dark\:hover\:bg-accent\/50:where(.dil-scope[data-theme="dark"], .dil-scope[data-theme="dark"] *):hover {
|
|
1042
|
+
background-color: var(--accent);
|
|
1005
1043
|
}
|
|
1006
1044
|
@supports (color: color-mix(in lab, red, red)) {
|
|
1007
|
-
:where(.dil-scope
|
|
1008
|
-
background-color: color-mix(in oklab, var(--
|
|
1045
|
+
.dil-dark\:hover\:bg-accent\/50:where(.dil-scope[data-theme="dark"], .dil-scope[data-theme="dark"] *):hover {
|
|
1046
|
+
background-color: color-mix(in oklab, var(--accent) 50%, transparent);
|
|
1009
1047
|
}
|
|
1010
1048
|
}
|
|
1011
|
-
|
|
1012
|
-
:
|
|
1013
|
-
background-color: var(--accent);
|
|
1014
|
-
}
|
|
1015
|
-
@supports (color: color-mix(in lab, red, red)) {
|
|
1016
|
-
:where(.dil-scope) .dark\:hover\:bg-accent\/50:hover {
|
|
1017
|
-
background-color: color-mix(in oklab, var(--accent) 50%, transparent);
|
|
1018
|
-
}
|
|
1019
|
-
}
|
|
1020
|
-
:where(.dil-scope) .dark\:hover\:bg-input\/50:hover {
|
|
1021
|
-
background-color: var(--input);
|
|
1022
|
-
}
|
|
1023
|
-
@supports (color: color-mix(in lab, red, red)) {
|
|
1024
|
-
:where(.dil-scope) .dark\:hover\:bg-input\/50:hover {
|
|
1025
|
-
background-color: color-mix(in oklab, var(--input) 50%, transparent);
|
|
1026
|
-
}
|
|
1027
|
-
}
|
|
1049
|
+
.dil-dark\:hover\:bg-input\/50:where(.dil-scope[data-theme="dark"], .dil-scope[data-theme="dark"] *):hover {
|
|
1050
|
+
background-color: var(--input);
|
|
1028
1051
|
}
|
|
1029
|
-
:
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
--tw-ring-color: color-mix(in oklab, var(--destructive) 40%, transparent);
|
|
1052
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
1053
|
+
.dil-dark\:hover\:bg-input\/50:where(.dil-scope[data-theme="dark"], .dil-scope[data-theme="dark"] *):hover {
|
|
1054
|
+
background-color: color-mix(in oklab, var(--input) 50%, transparent);
|
|
1033
1055
|
}
|
|
1034
1056
|
}
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1057
|
+
}
|
|
1058
|
+
.dil-dark\:focus-visible\:ring-destructive\/40:where(.dil-scope[data-theme="dark"], .dil-scope[data-theme="dark"] *):focus-visible {
|
|
1059
|
+
--tw-ring-color: var(--destructive);
|
|
1060
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
1061
|
+
--tw-ring-color: color-mix(in oklab, var(--destructive) 40%, transparent);
|
|
1040
1062
|
}
|
|
1041
|
-
|
|
1042
|
-
|
|
1063
|
+
}
|
|
1064
|
+
.dil-dark\:aria-invalid\:ring-destructive\/40:where(.dil-scope[data-theme="dark"], .dil-scope[data-theme="dark"] *)[aria-invalid="true"] {
|
|
1065
|
+
--tw-ring-color: var(--destructive);
|
|
1066
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
1067
|
+
--tw-ring-color: color-mix(in oklab, var(--destructive) 40%, transparent);
|
|
1043
1068
|
}
|
|
1044
1069
|
}
|
|
1070
|
+
.dil-dark\:data-\[state\=checked\]\:bg-primary:where(.dil-scope[data-theme="dark"], .dil-scope[data-theme="dark"] *)[data-state="checked"] {
|
|
1071
|
+
background-color: var(--primary);
|
|
1072
|
+
}
|
|
1045
1073
|
:where(.dil-scope) .\[\&_\.recharts-cartesian-axis-tick_text\]\:fill-muted-foreground .recharts-cartesian-axis-tick text {
|
|
1046
1074
|
fill: var(--muted-foreground);
|
|
1047
1075
|
}
|
|
@@ -1732,6 +1760,9 @@
|
|
|
1732
1760
|
--dil-item-radius: 8px;
|
|
1733
1761
|
--dil-success: #22825e;
|
|
1734
1762
|
--dil-warning: #ad751a;
|
|
1763
|
+
--dil-success-surface: #e5f5ee;
|
|
1764
|
+
--dil-warning-surface: #fff2d9;
|
|
1765
|
+
--dil-danger-surface: #fee8e8;
|
|
1735
1766
|
--dil-tertiary: #8f8f8f;
|
|
1736
1767
|
--dil-node-selected: #343d75;
|
|
1737
1768
|
--dil-node-surface: #2a303b;
|
|
@@ -1772,6 +1803,9 @@
|
|
|
1772
1803
|
--chart-5: #d78675;
|
|
1773
1804
|
}
|
|
1774
1805
|
@layer base {
|
|
1806
|
+
.dil-scope {
|
|
1807
|
+
position: relative;
|
|
1808
|
+
}
|
|
1775
1809
|
.dil-scope *,
|
|
1776
1810
|
.dil-scope *::before,
|
|
1777
1811
|
.dil-scope *::after {
|
|
@@ -1784,8 +1818,13 @@
|
|
|
1784
1818
|
.dil-scope p {
|
|
1785
1819
|
margin: 0;
|
|
1786
1820
|
}
|
|
1821
|
+
.dil-scope :is(button, input, select, textarea) {
|
|
1822
|
+
color: inherit;
|
|
1823
|
+
background-color: transparent;
|
|
1824
|
+
}
|
|
1787
1825
|
}
|
|
1788
1826
|
.dil-scope {
|
|
1827
|
+
color-scheme: light;
|
|
1789
1828
|
background: var(--background);
|
|
1790
1829
|
color: var(--foreground);
|
|
1791
1830
|
font-family: var(--font-dil);
|
|
@@ -1802,6 +1841,7 @@
|
|
|
1802
1841
|
font: inherit;
|
|
1803
1842
|
}
|
|
1804
1843
|
.dil-scope[data-theme="dark"] {
|
|
1844
|
+
color-scheme: dark;
|
|
1805
1845
|
--background: #171717;
|
|
1806
1846
|
--foreground: #fafafa;
|
|
1807
1847
|
--dil-text-color: #fafafa;
|
|
@@ -1820,6 +1860,11 @@
|
|
|
1820
1860
|
--accent-foreground: #fafafa;
|
|
1821
1861
|
--border: #454545;
|
|
1822
1862
|
--input: #505050;
|
|
1863
|
+
--dil-success: #5cc59a;
|
|
1864
|
+
--dil-warning: #e2ad55;
|
|
1865
|
+
--dil-success-surface: #1d3a2f;
|
|
1866
|
+
--dil-warning-surface: #3d3020;
|
|
1867
|
+
--dil-danger-surface: #432526;
|
|
1823
1868
|
}
|
|
1824
1869
|
:where(.dil-scope) .dil-document {
|
|
1825
1870
|
overflow-wrap: anywhere;
|
|
@@ -1847,6 +1892,28 @@
|
|
|
1847
1892
|
:where(.dil-scope) .dil-markdown strong {
|
|
1848
1893
|
font-weight: 600;
|
|
1849
1894
|
}
|
|
1895
|
+
:where(.dil-scope) .dil-markdown :where(ul, ol) {
|
|
1896
|
+
margin-block: 1em;
|
|
1897
|
+
padding-inline-start: 40px;
|
|
1898
|
+
}
|
|
1899
|
+
:where(.dil-scope) .dil-markdown :where(ul, ol) :where(ul, ol) {
|
|
1900
|
+
margin-block: 0;
|
|
1901
|
+
}
|
|
1902
|
+
:where(.dil-scope) .dil-markdown ul {
|
|
1903
|
+
list-style-type: disc;
|
|
1904
|
+
}
|
|
1905
|
+
:where(.dil-scope) .dil-markdown :where(ul, ol) ul {
|
|
1906
|
+
list-style-type: circle;
|
|
1907
|
+
}
|
|
1908
|
+
:where(.dil-scope) .dil-markdown :where(ul, ol) :where(ul, ol) ul {
|
|
1909
|
+
list-style-type: square;
|
|
1910
|
+
}
|
|
1911
|
+
:where(.dil-scope) .dil-markdown ol {
|
|
1912
|
+
list-style-type: decimal;
|
|
1913
|
+
}
|
|
1914
|
+
:where(.dil-scope) .dil-markdown blockquote {
|
|
1915
|
+
margin: 1em 40px;
|
|
1916
|
+
}
|
|
1850
1917
|
:where(.dil-scope) .dil-markdown table {
|
|
1851
1918
|
width: 100%;
|
|
1852
1919
|
border-collapse: collapse;
|
|
@@ -1937,7 +2004,6 @@
|
|
|
1937
2004
|
}
|
|
1938
2005
|
:where(.dil-scope) .dil-legend-item[data-hidden="true"] {
|
|
1939
2006
|
opacity: 0.45;
|
|
1940
|
-
text-decoration: line-through;
|
|
1941
2007
|
}
|
|
1942
2008
|
:where(.dil-scope) .dil-legend-swatch {
|
|
1943
2009
|
width: 11px;
|
|
@@ -1948,6 +2014,10 @@
|
|
|
1948
2014
|
:where(.dil-scope) .dil-chart-series {
|
|
1949
2015
|
transition: opacity 150ms ease;
|
|
1950
2016
|
}
|
|
2017
|
+
:where(.dil-scope) .dil-chart-pie:has(.dil-chart-series:hover, .dil-chart-series:focus-visible)
|
|
2018
|
+
.dil-chart-series:not(:hover, :focus-visible) {
|
|
2019
|
+
opacity: 0.625;
|
|
2020
|
+
}
|
|
1951
2021
|
:where(.dil-scope) .dil-tooltip {
|
|
1952
2022
|
z-index: 60;
|
|
1953
2023
|
max-width: min(24rem, calc(100vw - 16px));
|
|
@@ -1962,6 +2032,9 @@
|
|
|
1962
2032
|
:where(.dil-scope) .dil-snap-tooltip {
|
|
1963
2033
|
pointer-events: none;
|
|
1964
2034
|
}
|
|
2035
|
+
:where(.dil-scope) .dil-snap-tooltip [data-emphasized="true"] span {
|
|
2036
|
+
font-weight: 700;
|
|
2037
|
+
}
|
|
1965
2038
|
:where(.dil-scope) .dil-code-block textarea {
|
|
1966
2039
|
font-family: var(--font-mono, monospace);
|
|
1967
2040
|
font-size: var(--text-xs, 0.75rem);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Primary DIL authoring instructions (genui.agent.md). Put this in the system
|
|
3
|
+
* prompt of the model that writes documents for this renderer version.
|
|
4
|
+
*/
|
|
5
|
+
export declare const agentSpec: string;
|
|
6
|
+
/**
|
|
7
|
+
* Complete component and property reference (genui.agent.full.md) for
|
|
8
|
+
* targeted lookups, such as a retrieval tool or a larger context budget.
|
|
9
|
+
*/
|
|
10
|
+
export declare const agentSpecFull: string;
|
|
11
|
+
/** Executable example catalog (genui.examples.md) with recipes per feature. */
|
|
12
|
+
export declare const agentSpecExamples: string;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ComponentProps } from "react";
|
|
2
|
+
import { Select as SelectPrimitive } from "radix-ui";
|
|
3
|
+
declare const Select: import("react").FC<SelectPrimitive.SelectProps>;
|
|
4
|
+
declare const SelectValue: import("react").ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & import("react").RefAttributes<HTMLSpanElement>>;
|
|
5
|
+
declare const SelectGroup: import("react").ForwardRefExoticComponent<SelectPrimitive.SelectGroupProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
6
|
+
declare const SelectViewport: import("react").ForwardRefExoticComponent<SelectPrimitive.SelectViewportProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
7
|
+
declare const SelectItemIndicator: import("react").ForwardRefExoticComponent<SelectPrimitive.SelectItemIndicatorProps & import("react").RefAttributes<HTMLSpanElement>>;
|
|
8
|
+
declare const SelectItemText: import("react").ForwardRefExoticComponent<SelectPrimitive.SelectItemTextProps & import("react").RefAttributes<HTMLSpanElement>>;
|
|
9
|
+
declare function SelectPortal(props: ComponentProps<typeof SelectPrimitive.Portal>): import("react").JSX.Element;
|
|
10
|
+
declare function SelectTrigger({ className, ...props }: ComponentProps<typeof SelectPrimitive.Trigger>): import("react").JSX.Element;
|
|
11
|
+
declare function SelectContent({ className, ...props }: ComponentProps<typeof SelectPrimitive.Content>): import("react").JSX.Element;
|
|
12
|
+
declare function SelectItem({ className, ...props }: ComponentProps<typeof SelectPrimitive.Item>): import("react").JSX.Element;
|
|
13
|
+
declare function SelectLabel({ className, ...props }: ComponentProps<typeof SelectPrimitive.Label>): import("react").JSX.Element;
|
|
14
|
+
export { Select, SelectValue, SelectGroup, SelectPortal, SelectViewport, SelectItemIndicator, SelectItemText, SelectTrigger, SelectContent, SelectItem, SelectLabel, };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ComponentProps } from "react";
|
|
2
|
+
import { Tabs as TabsPrimitive } from "radix-ui";
|
|
3
|
+
declare function Tabs(props: ComponentProps<typeof TabsPrimitive.Root>): import("react").JSX.Element;
|
|
4
|
+
declare function TabsList({ className, ...props }: ComponentProps<typeof TabsPrimitive.List>): import("react").JSX.Element;
|
|
5
|
+
declare function TabsTrigger({ className, ...props }: ComponentProps<typeof TabsPrimitive.Trigger>): import("react").JSX.Element;
|
|
6
|
+
declare function TabsContent(props: ComponentProps<typeof TabsPrimitive.Content>): import("react").JSX.Element;
|
|
7
|
+
export { Tabs, TabsList, TabsTrigger, TabsContent };
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { type VariantProps } from "class-variance-authority";
|
|
3
3
|
import { ToggleGroup as ToggleGroupPrimitive } from "radix-ui";
|
|
4
|
-
import { toggleVariants } from "./toggle";
|
|
5
|
-
declare function ToggleGroup({ className, variant, size, spacing, children, ...props }: React.ComponentProps<typeof ToggleGroupPrimitive.Root> & VariantProps<typeof toggleVariants> & {
|
|
4
|
+
import { toggleVariants } from "./toggle.js";
|
|
5
|
+
declare function ToggleGroup({ className, variant, size, spacing, segmented, children, ...props }: React.ComponentProps<typeof ToggleGroupPrimitive.Root> & VariantProps<typeof toggleVariants> & {
|
|
6
6
|
spacing?: number;
|
|
7
|
+
segmented?: boolean;
|
|
7
8
|
}): React.JSX.Element;
|
|
8
9
|
declare function ToggleGroupItem({ className, children, variant, size, ...props }: React.ComponentProps<typeof ToggleGroupPrimitive.Item> & VariantProps<typeof toggleVariants>): React.JSX.Element;
|
|
9
10
|
export { ToggleGroup, ToggleGroupItem };
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import * as RechartsPrimitive from "recharts";
|
|
3
3
|
import type { TooltipValueType } from "recharts";
|
|
4
|
-
declare const THEMES: {
|
|
5
|
-
readonly light: "";
|
|
6
|
-
readonly dark: ".dark";
|
|
7
|
-
};
|
|
8
4
|
type TooltipNameType = number | string;
|
|
9
5
|
export type ChartConfig = Record<string, {
|
|
10
6
|
label?: React.ReactNode;
|
|
@@ -14,9 +10,9 @@ export type ChartConfig = Record<string, {
|
|
|
14
10
|
theme?: never;
|
|
15
11
|
} | {
|
|
16
12
|
color?: never;
|
|
17
|
-
theme: Record<
|
|
13
|
+
theme: Record<"light" | "dark", string>;
|
|
18
14
|
})>;
|
|
19
|
-
declare function ChartContainer({ id, className, children, config, overlay, initialDimension, ...props }: React.ComponentProps<"div"> & {
|
|
15
|
+
declare function ChartContainer({ id, className, children, config, overlay, initialDimension, style, ...props }: React.ComponentProps<"div"> & {
|
|
20
16
|
config: ChartConfig;
|
|
21
17
|
overlay?: React.ReactNode;
|
|
22
18
|
children: React.ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>["children"];
|
|
@@ -25,21 +21,19 @@ declare function ChartContainer({ id, className, children, config, overlay, init
|
|
|
25
21
|
height: number;
|
|
26
22
|
};
|
|
27
23
|
}): React.JSX.Element;
|
|
28
|
-
declare const ChartStyle: ({ id, config }: {
|
|
29
|
-
id: string;
|
|
30
|
-
config: ChartConfig;
|
|
31
|
-
}) => React.JSX.Element | null;
|
|
32
24
|
declare const ChartTooltip: typeof RechartsPrimitive.Tooltip;
|
|
33
|
-
declare function ChartTooltipContent({ active, payload, className, indicator, hideLabel, hideIndicator, label, labelFormatter, labelClassName, formatter, color, nameKey, labelKey, }: React.ComponentProps<typeof RechartsPrimitive.Tooltip> & React.ComponentProps<"div"> & {
|
|
25
|
+
declare function ChartTooltipContent({ active, payload, className, indicator, hideLabel, hideIndicator, label, labelFormatter, labelClassName, formatter, color, nameKey, labelKey, emphasizedKey, }: React.ComponentProps<typeof RechartsPrimitive.Tooltip> & React.ComponentProps<"div"> & {
|
|
34
26
|
hideLabel?: boolean;
|
|
35
27
|
hideIndicator?: boolean;
|
|
36
28
|
indicator?: "line" | "dot" | "dashed";
|
|
37
29
|
nameKey?: string;
|
|
38
30
|
labelKey?: string;
|
|
31
|
+
/** Marks the row whose dataKey matches with `data-emphasized="true"` for styling. */
|
|
32
|
+
emphasizedKey?: string | undefined;
|
|
39
33
|
} & Omit<RechartsPrimitive.DefaultTooltipContentProps<TooltipValueType, TooltipNameType>, "accessibilityLayer">): React.JSX.Element | null;
|
|
40
34
|
declare const ChartLegend: React.MemoExoticComponent<(outsideProps: RechartsPrimitive.LegendProps) => React.ReactPortal | null>;
|
|
41
35
|
declare function ChartLegendContent({ className, hideIcon, payload, verticalAlign, nameKey, }: React.ComponentProps<"div"> & {
|
|
42
36
|
hideIcon?: boolean;
|
|
43
37
|
nameKey?: string;
|
|
44
38
|
} & RechartsPrimitive.DefaultLegendContentProps): React.JSX.Element | null;
|
|
45
|
-
export { ChartContainer, ChartTooltip, ChartTooltipContent, ChartLegend, ChartLegendContent,
|
|
39
|
+
export { ChartContainer, ChartTooltip, ChartTooltipContent, ChartLegend, ChartLegendContent, };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import useEmblaCarousel, { type UseEmblaCarouselType } from "embla-carousel-react";
|
|
3
|
-
import { Button } from "../controls/button";
|
|
3
|
+
import { Button } from "../controls/button.js";
|
|
4
4
|
type CarouselApi = UseEmblaCarouselType[1];
|
|
5
5
|
type UseCarouselParameters = Parameters<typeof useEmblaCarousel>;
|
|
6
6
|
type CarouselOptions = UseCarouselParameters[0];
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Collapsible as CollapsiblePrimitive } from "radix-ui";
|
|
2
|
+
import type { ComponentProps } from "react";
|
|
3
|
+
declare function Collapsible(props: ComponentProps<typeof CollapsiblePrimitive.Root>): import("react").JSX.Element;
|
|
4
|
+
declare function CollapsibleTrigger(props: ComponentProps<typeof CollapsiblePrimitive.Trigger>): import("react").JSX.Element;
|
|
5
|
+
declare function CollapsibleContent(props: ComponentProps<typeof CollapsiblePrimitive.Content>): import("react").JSX.Element;
|
|
6
|
+
export { Collapsible, CollapsibleTrigger, CollapsibleContent };
|
|
@@ -2,7 +2,8 @@ import * as React from "react";
|
|
|
2
2
|
import { Popover as PopoverPrimitive } from "radix-ui";
|
|
3
3
|
declare function Popover({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Root>): React.JSX.Element;
|
|
4
4
|
declare function PopoverTrigger({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Trigger>): React.JSX.Element;
|
|
5
|
-
|
|
5
|
+
type PopoverContentProps = React.ComponentProps<typeof PopoverPrimitive.Content>;
|
|
6
|
+
declare function PopoverContent(props: PopoverContentProps): React.JSX.Element;
|
|
6
7
|
declare function PopoverAnchor({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Anchor>): React.JSX.Element;
|
|
7
8
|
declare function PopoverHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
8
9
|
declare function PopoverTitle({ className, ...props }: React.ComponentProps<"h2">): React.JSX.Element;
|
|
@@ -3,9 +3,25 @@ export declare function usePortalScope(): {
|
|
|
3
3
|
container: HTMLElement | null;
|
|
4
4
|
boundary?: Element;
|
|
5
5
|
};
|
|
6
|
+
/**
|
|
7
|
+
* Space below the viewport that overlays may extend into, in pixels. The
|
|
8
|
+
* iframe runtime provides it: the host grows a content-sized frame to show an
|
|
9
|
+
* overlay that extends past its bottom, so an overlay need not flip above its
|
|
10
|
+
* trigger, where the frame's top would clip it.
|
|
11
|
+
*/
|
|
12
|
+
export interface OverlayRoom {
|
|
13
|
+
below(): number;
|
|
14
|
+
subscribe(listener: () => void): () => void;
|
|
15
|
+
}
|
|
16
|
+
export declare const OverlayRoomContext: import("react").Context<OverlayRoom | null>;
|
|
17
|
+
type Side = "top" | "right" | "bottom" | "left";
|
|
18
|
+
export type CollisionPadding = number | Partial<Record<Side, number>>;
|
|
19
|
+
/** Extends an overlay's collision padding by the room below the viewport. */
|
|
20
|
+
export declare function useCollisionPadding(padding?: CollisionPadding): CollisionPadding;
|
|
6
21
|
export interface UiScopeProps extends ComponentProps<"section"> {
|
|
7
22
|
appearance?: "light" | "dark";
|
|
8
23
|
tokens?: Readonly<Record<`--${string}`, string>>;
|
|
9
24
|
boundary?: Element;
|
|
10
25
|
}
|
|
11
26
|
export declare function UiScope({ children, className, style, appearance, tokens, boundary, ...props }: UiScopeProps): import("react").JSX.Element;
|
|
27
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ComponentType, type ReactNode } from "react";
|
|
2
|
-
import type { DilComponentProps } from "./customization";
|
|
2
|
+
import type { DilComponentProps } from "./customization.js";
|
|
3
3
|
export interface CustomComponentProps {
|
|
4
4
|
component: ComponentType<DilComponentProps>;
|
|
5
5
|
name: string;
|
|
@@ -1,54 +1,89 @@
|
|
|
1
1
|
import { type Ref } from "react";
|
|
2
|
-
import type { DilRendererHandle } from "./renderer-handle";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import type {
|
|
6
|
-
import type {
|
|
7
|
-
import {
|
|
2
|
+
import type { DilRendererHandle } from "./renderer-handle.js";
|
|
3
|
+
import type { DilCustomization } from "./customization.js";
|
|
4
|
+
import type { RendererMetrics } from "./renderer-environment.js";
|
|
5
|
+
import type { DilRenderError } from "./render-error.js";
|
|
6
|
+
import type { ProgressiveReveal } from "./view/reveal-options.js";
|
|
7
|
+
import type { AutoScroll, ScrollContainer } from "./view/scroll-options.js";
|
|
8
|
+
import { type UpdateInterval } from "./runtime/presentation-scheduler.js";
|
|
9
|
+
/**
|
|
10
|
+
* Starts loading the code that `mode="host"` and `mode="shadow"` share. Once
|
|
11
|
+
* it resolves, those modes render synchronously: their `ref` is set in the
|
|
12
|
+
* first commit and `renderToString` includes them.
|
|
13
|
+
*/
|
|
14
|
+
export declare function preloadHostRenderer(): Promise<void>;
|
|
8
15
|
interface DilCommonProps {
|
|
9
16
|
ref?: Ref<DilRendererHandle> | undefined;
|
|
10
17
|
/** Append-only source prefix. Remount with a new key to replace it. */
|
|
11
18
|
text: string;
|
|
12
19
|
isStreaming?: boolean;
|
|
13
|
-
/**
|
|
20
|
+
/**
|
|
21
|
+
* Show the "Receiving document", "Incomplete" or "Complete" label. Errors
|
|
22
|
+
* and the note that a response ended early stay visible when false.
|
|
23
|
+
*/
|
|
14
24
|
showStatus?: boolean;
|
|
15
25
|
/** Stagger newly shown blocks; disabled by default and under reduced motion. */
|
|
16
26
|
progressiveReveal?: ProgressiveReveal;
|
|
17
27
|
autoScroll?: AutoScroll;
|
|
28
|
+
/**
|
|
29
|
+
* What scrolls around the renderer, for `autoScroll` and for virtualized
|
|
30
|
+
* long content. Defaults to `"auto"`: the nearest ancestor that scrolls
|
|
31
|
+
* vertically, crossing Shadow DOM boundaries, or the window when none does.
|
|
32
|
+
* Pass `"window"`, an element, or a ref to an element to choose one.
|
|
33
|
+
*/
|
|
34
|
+
scrollContainer?: ScrollContainer | undefined;
|
|
18
35
|
/** Maximum streaming presentation frequency; user interaction remains immediate. */
|
|
19
36
|
updateInterval?: UpdateInterval;
|
|
37
|
+
/** Color scheme of the stock components. Defaults to "light". */
|
|
38
|
+
appearance?: "light" | "dark" | undefined;
|
|
39
|
+
/**
|
|
40
|
+
* CSS custom properties applied to the renderer root, such as `--primary` or
|
|
41
|
+
* `--background`. The iframe mode accepts only values that cannot load
|
|
42
|
+
* resources and ignores the rest with a console warning.
|
|
43
|
+
*/
|
|
44
|
+
tokens?: Readonly<Record<`--${string}`, string>> | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* URL of the directory that serves frame.html. Defaults to "/opendil/". Only
|
|
47
|
+
* the iframe mode loads it; host and Shadow DOM modes ignore it, so a mode
|
|
48
|
+
* chosen at runtime can always pass the app's runtime location.
|
|
49
|
+
*/
|
|
50
|
+
runtimeBaseUrl?: string | undefined;
|
|
20
51
|
onFollowChange?: (following: boolean) => void;
|
|
21
52
|
onInput?: (detail: {
|
|
22
53
|
length: number;
|
|
23
54
|
}) => void;
|
|
24
55
|
onCommit?: (detail: RendererMetrics) => void;
|
|
56
|
+
/**
|
|
57
|
+
* Receives each distinct problem once, with a developer-facing message and,
|
|
58
|
+
* for parse problems, the offset in `text`. Readers see short generic
|
|
59
|
+
* wording instead. Syntax problems and documents that ended with unfinished
|
|
60
|
+
* structure are also logged with `console.warn`. One message reports at most
|
|
61
|
+
* 20 problems, then one `limit` error; the `incomplete` report always
|
|
62
|
+
* arrives. An exception thrown here is rethrown asynchronously and does not
|
|
63
|
+
* interrupt rendering.
|
|
64
|
+
*/
|
|
65
|
+
onError?: ((error: DilRenderError) => void) | undefined;
|
|
25
66
|
}
|
|
26
67
|
export interface DilIsolatedRendererProps extends DilCommonProps {
|
|
27
|
-
mode?: "isolated";
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
className?: never;
|
|
35
|
-
appearance?: never;
|
|
36
|
-
shadowStyles?: never;
|
|
68
|
+
mode?: "isolated" | undefined;
|
|
69
|
+
components?: undefined;
|
|
70
|
+
componentConfig?: undefined;
|
|
71
|
+
classNames?: undefined;
|
|
72
|
+
slots?: undefined;
|
|
73
|
+
className?: undefined;
|
|
74
|
+
shadowStyles?: undefined;
|
|
37
75
|
}
|
|
38
76
|
interface DilStyledRendererProps extends DilCommonProps, DilCustomization {
|
|
39
|
-
|
|
40
|
-
className?: string;
|
|
41
|
-
tokens?: Readonly<Record<`--${string}`, string>>;
|
|
42
|
-
appearance?: "light" | "dark";
|
|
77
|
+
className?: string | undefined;
|
|
43
78
|
}
|
|
44
79
|
export interface DilHostRendererProps extends DilStyledRendererProps {
|
|
45
80
|
mode: "host";
|
|
46
|
-
shadowStyles?:
|
|
81
|
+
shadowStyles?: undefined;
|
|
47
82
|
}
|
|
48
83
|
export interface DilShadowRendererProps extends DilStyledRendererProps {
|
|
49
84
|
mode: "shadow";
|
|
50
85
|
/** Trusted application CSS installed inside this renderer's ShadowRoot. */
|
|
51
|
-
shadowStyles?: string;
|
|
86
|
+
shadowStyles?: string | undefined;
|
|
52
87
|
}
|
|
53
88
|
export type DilRendererProps = DilIsolatedRendererProps | DilHostRendererProps | DilShadowRendererProps;
|
|
54
89
|
export declare function DilRenderer(props: DilRendererProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/** Package version, compiled into both the renderer and the copied frame runtime. */
|
|
2
|
+
export declare const RUNTIME_VERSION: string;
|
|
3
|
+
/**
|
|
4
|
+
* The frame script runs before the frame document's load event, so a frame that
|
|
5
|
+
* loaded without announcing itself is not the OpenDIL runtime.
|
|
6
|
+
*/
|
|
7
|
+
export declare const READY_AFTER_LOAD_MS = 3000;
|
|
8
|
+
/**
|
|
9
|
+
* frame.html pings the host every second while frame.js downloads, so this
|
|
10
|
+
* limit applies only to a frame that has sent nothing at all, such as an app
|
|
11
|
+
* page whose load event fired before the renderer hydrated.
|
|
12
|
+
*/
|
|
13
|
+
export declare const SILENT_FRAME_MS = 20000;
|
|
14
|
+
export declare function startupFailureMessage(url: string): string;
|
|
15
|
+
export declare function reportStartupFailure(url: string): void;
|
|
16
|
+
/** Warns once per frame URL when the copied runtime and the renderer differ. */
|
|
17
|
+
export declare function checkFrameVersion(url: string, version: unknown): void;
|
|
18
|
+
export declare function reportRejectedTokens(names: readonly string[]): void;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type Appearance = "light" | "dark";
|
|
2
|
+
export type ThemeTokens = Readonly<Record<`--${string}`, string>>;
|
|
3
|
+
export interface FrameTheme {
|
|
4
|
+
appearance: Appearance;
|
|
5
|
+
tokens: ThemeTokens;
|
|
6
|
+
}
|
|
7
|
+
export declare function isSafeTokenValue(value: string): boolean;
|
|
8
|
+
/** Keeps valid custom properties and names everything it drops. */
|
|
9
|
+
export declare function readThemeTokens(value: unknown): {
|
|
10
|
+
tokens: ThemeTokens;
|
|
11
|
+
rejected: string[];
|
|
12
|
+
};
|
|
13
|
+
/** Parses a port message into a theme, or returns undefined to ignore it. */
|
|
14
|
+
export declare function readFrameTheme(data: object): FrameTheme | undefined;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { ScrollRootTracker } from "../view/scroll/root-tracker.js";
|
|
2
|
+
export interface FrameViewportMessage {
|
|
3
|
+
type: "viewport";
|
|
4
|
+
revision: number;
|
|
5
|
+
offset: number;
|
|
6
|
+
height: number;
|
|
7
|
+
width: number;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Tells the frame which part of it is visible in the host's scroller, the
|
|
11
|
+
* page or a scroll container, so virtualized content inside can mount.
|
|
12
|
+
*/
|
|
13
|
+
export declare class FrameViewportReporter {
|
|
14
|
+
private readonly frame;
|
|
15
|
+
private readonly scroller;
|
|
16
|
+
private readonly post;
|
|
17
|
+
private revision;
|
|
18
|
+
private lastOffset;
|
|
19
|
+
private observed;
|
|
20
|
+
private readonly stop;
|
|
21
|
+
constructor(frame: HTMLIFrameElement, scroller: ScrollRootTracker, post: (message: FrameViewportMessage) => void);
|
|
22
|
+
private visible;
|
|
23
|
+
report: () => void;
|
|
24
|
+
/**
|
|
25
|
+
* Scrolls the host until frame offset `offset` is at the visible top. A
|
|
26
|
+
* request from before the reader's latest scroll is discarded.
|
|
27
|
+
*/
|
|
28
|
+
scroll(offset: number, revision: number): void;
|
|
29
|
+
dispose(): void;
|
|
30
|
+
}
|