@snackbit/opendil 0.0.0 → 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.
- package/LICENSE +201 -0
- package/README.md +200 -2
- package/THIRD_PARTY_NOTICES.md +9 -0
- package/bin/opendil.mjs +20 -0
- package/bin/publish-directory.mjs +32 -0
- package/dist/chunk-ZWAN2JCV.js +2 -0
- package/dist/index.js +11 -0
- package/dist/mermaid-diagram-GFWD4Y2X.js +2 -0
- package/dist/runtime/frame.html +2362 -0
- package/dist/runtime/frame.js +4625 -0
- package/dist/runtime/vm.js +6 -0
- package/dist/shadow-renderer-F25KL3C4.js +2363 -0
- package/dist/styles.css +2361 -0
- package/dist/types/components/ui/controls/button.d.ts +10 -0
- package/dist/types/components/ui/controls/checkbox.d.ts +4 -0
- package/dist/types/components/ui/controls/input.d.ts +3 -0
- package/dist/types/components/ui/controls/radio-group.d.ts +5 -0
- package/dist/types/components/ui/controls/slider.d.ts +4 -0
- package/dist/types/components/ui/controls/textarea.d.ts +3 -0
- package/dist/types/components/ui/controls/toggle-group.d.ts +9 -0
- package/dist/types/components/ui/controls/toggle.d.ts +9 -0
- package/dist/types/components/ui/display/badge.d.ts +9 -0
- package/dist/types/components/ui/display/card.d.ts +9 -0
- package/dist/types/components/ui/display/chart.d.ts +45 -0
- package/dist/types/components/ui/display/separator.d.ts +4 -0
- package/dist/types/components/ui/display/skeleton.d.ts +2 -0
- package/dist/types/components/ui/display/table.d.ts +10 -0
- package/dist/types/components/ui/media/carousel.d.ts +19 -0
- package/dist/types/components/ui/overlays/popover.d.ts +10 -0
- package/dist/types/components/ui/overlays/tooltip.d.ts +8 -0
- package/dist/types/components/ui/overlays/ui-scope.d.ts +11 -0
- package/dist/types/dil/custom-component.d.ts +14 -0
- package/dist/types/dil/customization.d.ts +21 -0
- package/dist/types/dil/dil-renderer.d.ts +55 -0
- package/dist/types/dil/isolation/frame.d.ts +1 -0
- package/dist/types/dil/isolation/isolated-renderer.d.ts +22 -0
- package/dist/types/dil/isolation/shadow-renderer.d.ts +7 -0
- package/dist/types/dil/isolation/shadow-styles.d.ts +2 -0
- package/dist/types/dil/isolation/viewport-scroll.d.ts +6 -0
- package/dist/types/dil/isolation/vm-worker.d.ts +1 -0
- package/dist/types/dil/message-renderer.d.ts +16 -0
- package/dist/types/dil/parser/dil-parser.d.ts +33 -0
- package/dist/types/dil/parser/lexical.d.ts +16 -0
- package/dist/types/dil/parser/stream-worker.d.ts +1 -0
- package/dist/types/dil/parser/types.d.ts +32 -0
- package/dist/types/dil/renderer-environment.d.ts +22 -0
- package/dist/types/dil/renderer-handle.d.ts +4 -0
- package/dist/types/dil/runtime/action-receipt.d.ts +5 -0
- package/dist/types/dil/runtime/child-list.d.ts +8 -0
- package/dist/types/dil/runtime/document.d.ts +42 -0
- package/dist/types/dil/runtime/evaluation-cache.d.ts +24 -0
- package/dist/types/dil/runtime/execution-queue.d.ts +55 -0
- package/dist/types/dil/runtime/expressions.d.ts +59 -0
- package/dist/types/dil/runtime/markdown-stream.d.ts +17 -0
- package/dist/types/dil/runtime/presentation-history.d.ts +14 -0
- package/dist/types/dil/runtime/presentation-scheduler.d.ts +16 -0
- package/dist/types/dil/runtime/render-budget.d.ts +10 -0
- package/dist/types/dil/runtime/view-cost.d.ts +10 -0
- package/dist/types/dil/view/conditional-view.d.ts +12 -0
- package/dist/types/dil/view/loading-block.d.ts +7 -0
- package/dist/types/dil/view/markdown-node.d.ts +12 -0
- package/dist/types/dil/view/node-children.d.ts +13 -0
- package/dist/types/dil/view/node-view.d.ts +11 -0
- package/dist/types/dil/view/progressive-reveal.d.ts +6 -0
- package/dist/types/dil/view/render-boundary.d.ts +22 -0
- package/dist/types/dil/view/render-limit.d.ts +14 -0
- package/dist/types/dil/view/repeated-nodes.d.ts +15 -0
- package/dist/types/dil/view/reveal/controller.d.ts +25 -0
- package/dist/types/dil/view/reveal/presentation.d.ts +13 -0
- package/dist/types/dil/view/reveal-options.d.ts +11 -0
- package/dist/types/dil/view/scroll/controller.d.ts +28 -0
- package/dist/types/dil/view/scroll-options.d.ts +10 -0
- package/dist/types/dil/view/stream-follow.d.ts +8 -0
- package/dist/types/dil/view/table-context.d.ts +15 -0
- package/dist/types/dil/view/virtual-flow.d.ts +15 -0
- package/dist/types/dil/widgets/action-feedback.d.ts +11 -0
- package/dist/types/dil/widgets/async-image.d.ts +6 -0
- package/dist/types/dil/widgets/charts/chart-legend.d.ts +10 -0
- package/dist/types/dil/widgets/charts/chart-selection.d.ts +8 -0
- package/dist/types/dil/widgets/charts/chart-series.d.ts +11 -0
- package/dist/types/dil/widgets/charts/chart-snapping.d.ts +15 -0
- package/dist/types/dil/widgets/charts/dil-chart.d.ts +5 -0
- package/dist/types/dil/widgets/charts/snap-cursor.d.ts +16 -0
- package/dist/types/dil/widgets/charts/snap-tooltip.d.ts +10 -0
- package/dist/types/dil/widgets/code/code-editor.d.ts +9 -0
- package/dist/types/dil/widgets/code/highlighted-code.d.ts +25 -0
- package/dist/types/dil/widgets/code-block.d.ts +11 -0
- package/dist/types/dil/widgets/control-revision.d.ts +1 -0
- package/dist/types/dil/widgets/control-state.d.ts +8 -0
- package/dist/types/dil/widgets/controls.d.ts +25 -0
- package/dist/types/dil/widgets/graphs/graph-model.d.ts +13 -0
- package/dist/types/dil/widgets/graphs/node-graph.d.ts +6 -0
- package/dist/types/dil/widgets/graphs/service-node.d.ts +3 -0
- package/dist/types/dil/widgets/mermaid-diagram.d.ts +5 -0
- package/dist/types/dil/widgets/primitives/attribute-values.d.ts +12 -0
- package/dist/types/dil/widgets/primitives/primitive.d.ts +17 -0
- package/dist/types/dil/widgets/primitives/vocabulary.d.ts +5 -0
- package/dist/types/dil/widgets/use-control-value.d.ts +2 -0
- package/dist/types/index.d.ts +8 -0
- package/dist/types/lib/cn.d.ts +2 -0
- package/dist/types/ui.d.ts +8 -0
- package/dist/ui.js +2 -0
- package/package.json +74 -4
- package/styles/tailwind.css +391 -0
- package/styles/tokens.css +29 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { CSSProperties } from "react";
|
|
2
|
+
export type Attributes = Readonly<Record<string, unknown>>;
|
|
3
|
+
export declare function text(value: unknown, fallback?: string): string;
|
|
4
|
+
export declare function number(value: unknown, fallback?: number): number;
|
|
5
|
+
export declare function record(value: unknown): Record<string, unknown>;
|
|
6
|
+
export declare function invoke(attributes: Attributes, key: string, value?: unknown): any;
|
|
7
|
+
/** Presentation-only SVG attributes; paint and marker references stay in the document. */
|
|
8
|
+
export declare function svgAttributes(attributes: Attributes): Record<string, unknown>;
|
|
9
|
+
export declare function color(value: unknown): string | undefined;
|
|
10
|
+
export declare function layoutStyle(attributes: Attributes): CSSProperties & {
|
|
11
|
+
"--dil-columns"?: number;
|
|
12
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import type { DilNode } from "../../parser/types";
|
|
3
|
+
import type { DilDocument } from "../../runtime/document";
|
|
4
|
+
import type { Scope } from "../../runtime/expressions";
|
|
5
|
+
import { type Attributes } from "./attribute-values";
|
|
6
|
+
export interface PrimitiveProps {
|
|
7
|
+
node: DilNode;
|
|
8
|
+
attributes: Attributes;
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
document: DilDocument;
|
|
11
|
+
scope: Scope;
|
|
12
|
+
instance: string;
|
|
13
|
+
svg: boolean;
|
|
14
|
+
inline: boolean;
|
|
15
|
+
interactive: boolean;
|
|
16
|
+
}
|
|
17
|
+
export declare function Primitive({ node, attributes: sourceAttributes, children, document, instance, svg, inline, interactive, }: PrimitiveProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { DilRenderer } from "./dil/dil-renderer";
|
|
2
|
+
export type { DilRendererHandle } from "./dil/renderer-handle";
|
|
3
|
+
export type { AutoScroll, AutoScrollOptions } from "./dil/view/scroll-options";
|
|
4
|
+
export type { UpdateInterval } from "./dil/runtime/presentation-scheduler";
|
|
5
|
+
export type { DilRendererProps, DilHostRendererProps, DilShadowRendererProps, DilIsolatedRendererProps, } from "./dil/dil-renderer";
|
|
6
|
+
export type { DilComponentProps, DilCustomization } from "./dil/customization";
|
|
7
|
+
export type { RendererMetrics } from "./dil/renderer-environment";
|
|
8
|
+
export type { ProgressiveRevealOptions, ProgressiveReveal, } from "./dil/view/reveal-options";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { Button, buttonVariants } from "./components/ui/controls/button";
|
|
2
|
+
export { ToggleGroup, ToggleGroupItem, } from "./components/ui/controls/toggle-group";
|
|
3
|
+
export { UiScope } from "./components/ui/overlays/ui-scope";
|
|
4
|
+
export { Popover, PopoverTrigger, PopoverContent, } from "./components/ui/overlays/popover";
|
|
5
|
+
export { Tooltip } from "./components/ui/overlays/tooltip";
|
|
6
|
+
export { Input } from "./components/ui/controls/input";
|
|
7
|
+
export { Checkbox } from "./components/ui/controls/checkbox";
|
|
8
|
+
export { Slider } from "./components/ui/controls/slider";
|
package/dist/ui.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import{b as o,c as r,d as e,e as t,g as p,h as m,i as x,j as f,k as g,l as n,m as i,n as u}from"./chunk-ZWAN2JCV.js";export{m as Button,f as Checkbox,g as Input,r as Popover,t as PopoverContent,e as PopoverTrigger,n as Slider,i as ToggleGroup,u as ToggleGroupItem,x as Tooltip,o as UiScope,p as buttonVariants};
|
package/package.json
CHANGED
|
@@ -1,12 +1,82 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@snackbit/opendil",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Streaming interactive documents for React using Dynamic Interface Language",
|
|
5
|
+
"type": "module",
|
|
5
6
|
"license": "Apache-2.0",
|
|
6
7
|
"repository": {
|
|
7
8
|
"type": "git",
|
|
8
|
-
"url": "git+https://github.com/snackbit/opendil.git"
|
|
9
|
+
"url": "git+https://github.com/snackbit/opendil.git",
|
|
10
|
+
"directory": "packages/opendil"
|
|
9
11
|
},
|
|
10
12
|
"homepage": "https://opendil.com",
|
|
11
|
-
"
|
|
13
|
+
"bugs": "https://github.com/snackbit/opendil/issues",
|
|
14
|
+
"keywords": [
|
|
15
|
+
"react",
|
|
16
|
+
"generative-ui",
|
|
17
|
+
"streaming",
|
|
18
|
+
"dil"
|
|
19
|
+
],
|
|
20
|
+
"engines": {
|
|
21
|
+
"node": ">=22"
|
|
22
|
+
},
|
|
23
|
+
"files": [
|
|
24
|
+
"dist",
|
|
25
|
+
"styles",
|
|
26
|
+
"bin",
|
|
27
|
+
"THIRD_PARTY_NOTICES.md"
|
|
28
|
+
],
|
|
29
|
+
"sideEffects": [
|
|
30
|
+
"**/*.css"
|
|
31
|
+
],
|
|
32
|
+
"exports": {
|
|
33
|
+
".": {
|
|
34
|
+
"types": "./dist/types/index.d.ts",
|
|
35
|
+
"import": "./dist/index.js"
|
|
36
|
+
},
|
|
37
|
+
"./styles.css": "./dist/styles.css",
|
|
38
|
+
"./tailwind.css": "./styles/tailwind.css",
|
|
39
|
+
"./package.json": "./package.json",
|
|
40
|
+
"./ui": {
|
|
41
|
+
"types": "./dist/types/ui.d.ts",
|
|
42
|
+
"import": "./dist/ui.js"
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"bin": {
|
|
46
|
+
"opendil": "./bin/opendil.mjs"
|
|
47
|
+
},
|
|
48
|
+
"publishConfig": {
|
|
49
|
+
"access": "public"
|
|
50
|
+
},
|
|
51
|
+
"scripts": {
|
|
52
|
+
"build": "node scripts/build.mjs",
|
|
53
|
+
"typecheck": "tsc --noEmit -p tsconfig.json"
|
|
54
|
+
},
|
|
55
|
+
"peerDependencies": {
|
|
56
|
+
"react": "^19.0.0",
|
|
57
|
+
"react-dom": "^19.0.0"
|
|
58
|
+
},
|
|
59
|
+
"dependencies": {
|
|
60
|
+
"@tanstack/react-virtual": "^3.13.12",
|
|
61
|
+
"@xyflow/react": "^12.12.1",
|
|
62
|
+
"acorn": "^8.16.0",
|
|
63
|
+
"acorn-walk": "^8.3.4",
|
|
64
|
+
"class-variance-authority": "^0.7.1",
|
|
65
|
+
"clsx": "^2.1.1",
|
|
66
|
+
"dompurify": "^3.4.17",
|
|
67
|
+
"embla-carousel-react": "^8.6.0",
|
|
68
|
+
"lowlight": "3.3.0",
|
|
69
|
+
"lucide-react": "^0.468.0",
|
|
70
|
+
"mermaid": "^12.2.0",
|
|
71
|
+
"quickjs-emscripten": "^0.32.0",
|
|
72
|
+
"radix-ui": "^1.8.1",
|
|
73
|
+
"react-markdown": "^10.1.0",
|
|
74
|
+
"recharts": "^3.8.0",
|
|
75
|
+
"remark-gfm": "^4.0.1",
|
|
76
|
+
"remark-parse": "^11.0.0",
|
|
77
|
+
"remend": "^1.4.0",
|
|
78
|
+
"tailwind-merge": "^3.3.1",
|
|
79
|
+
"unified": "^11.0.5",
|
|
80
|
+
"zustand": "^5.0.8"
|
|
81
|
+
}
|
|
12
82
|
}
|
|
@@ -0,0 +1,391 @@
|
|
|
1
|
+
@import "tailwindcss/theme.css";
|
|
2
|
+
@import "tailwindcss/utilities.css" source("../dist");
|
|
3
|
+
@import "@xyflow/react/dist/style.css";
|
|
4
|
+
@import "./tokens.css";
|
|
5
|
+
|
|
6
|
+
.dil-scope {
|
|
7
|
+
--background: #ffffff;
|
|
8
|
+
--foreground: var(--dil-text-color);
|
|
9
|
+
--card: #ffffff;
|
|
10
|
+
--card-foreground: #171717;
|
|
11
|
+
--popover: #ffffff;
|
|
12
|
+
--popover-foreground: #171717;
|
|
13
|
+
--primary: #202020;
|
|
14
|
+
--primary-foreground: #ffffff;
|
|
15
|
+
--secondary: #f3f3f2;
|
|
16
|
+
--secondary-foreground: #242424;
|
|
17
|
+
--muted: #f6f6f5;
|
|
18
|
+
--muted-foreground: var(--dil-muted-text-color);
|
|
19
|
+
--accent: #eeeeec;
|
|
20
|
+
--accent-foreground: #171717;
|
|
21
|
+
--destructive: #cc4545;
|
|
22
|
+
--border: #e5e5e2;
|
|
23
|
+
--input: #dededb;
|
|
24
|
+
--ring: #8b8b87;
|
|
25
|
+
--radius: 0.75rem;
|
|
26
|
+
--chart-1: #6580d9;
|
|
27
|
+
--chart-2: #47a98a;
|
|
28
|
+
--chart-3: #d4a458;
|
|
29
|
+
--chart-4: #ac81cc;
|
|
30
|
+
--chart-5: #d78675;
|
|
31
|
+
}
|
|
32
|
+
@theme inline {
|
|
33
|
+
--color-background: var(--background);
|
|
34
|
+
--color-foreground: var(--foreground);
|
|
35
|
+
--color-card: var(--card);
|
|
36
|
+
--color-card-foreground: var(--card-foreground);
|
|
37
|
+
--color-popover: var(--popover);
|
|
38
|
+
--color-popover-foreground: var(--popover-foreground);
|
|
39
|
+
--color-primary: var(--primary);
|
|
40
|
+
--color-primary-foreground: var(--primary-foreground);
|
|
41
|
+
--color-secondary: var(--secondary);
|
|
42
|
+
--color-secondary-foreground: var(--secondary-foreground);
|
|
43
|
+
--color-muted: var(--muted);
|
|
44
|
+
--color-muted-foreground: var(--muted-foreground);
|
|
45
|
+
--color-accent: var(--accent);
|
|
46
|
+
--color-accent-foreground: var(--accent-foreground);
|
|
47
|
+
--color-destructive: var(--destructive);
|
|
48
|
+
--color-border: var(--border);
|
|
49
|
+
--color-input: var(--input);
|
|
50
|
+
--color-ring: var(--ring);
|
|
51
|
+
--color-chart-1: var(--chart-1);
|
|
52
|
+
--color-chart-2: var(--chart-2);
|
|
53
|
+
--color-chart-3: var(--chart-3);
|
|
54
|
+
--color-chart-4: var(--chart-4);
|
|
55
|
+
--color-chart-5: var(--chart-5);
|
|
56
|
+
--radius-sm: calc(var(--radius) - 4px);
|
|
57
|
+
--radius-md: calc(var(--radius) - 2px);
|
|
58
|
+
--radius-lg: var(--radius);
|
|
59
|
+
--radius-xl: calc(var(--radius) + 4px);
|
|
60
|
+
}
|
|
61
|
+
@layer base {
|
|
62
|
+
.dil-scope *,
|
|
63
|
+
.dil-scope *::before,
|
|
64
|
+
.dil-scope *::after {
|
|
65
|
+
box-sizing: border-box;
|
|
66
|
+
border: 0 solid var(--border);
|
|
67
|
+
}
|
|
68
|
+
.dil-scope h1,
|
|
69
|
+
.dil-scope h2,
|
|
70
|
+
.dil-scope h3,
|
|
71
|
+
.dil-scope p {
|
|
72
|
+
margin: 0;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
.dil-scope {
|
|
76
|
+
background: var(--background);
|
|
77
|
+
color: var(--foreground);
|
|
78
|
+
font-family: var(--font-dil);
|
|
79
|
+
font-size: 15px;
|
|
80
|
+
line-height: 1.65;
|
|
81
|
+
}
|
|
82
|
+
.dil-scope button:not(:disabled),
|
|
83
|
+
.dil-scope [role="button"]:not([aria-disabled="true"]) {
|
|
84
|
+
cursor: pointer;
|
|
85
|
+
}
|
|
86
|
+
.dil-scope button,
|
|
87
|
+
.dil-scope input,
|
|
88
|
+
.dil-scope textarea {
|
|
89
|
+
font: inherit;
|
|
90
|
+
}
|
|
91
|
+
.dil-scope[data-theme="dark"] {
|
|
92
|
+
--background: #171717;
|
|
93
|
+
--foreground: #fafafa;
|
|
94
|
+
--dil-text-color: #fafafa;
|
|
95
|
+
--dil-muted-text-color: #b5b5b5;
|
|
96
|
+
--card: #202020;
|
|
97
|
+
--card-foreground: #fafafa;
|
|
98
|
+
--popover: #202020;
|
|
99
|
+
--popover-foreground: #fafafa;
|
|
100
|
+
--primary: #eeeeee;
|
|
101
|
+
--primary-foreground: #171717;
|
|
102
|
+
--secondary: #303030;
|
|
103
|
+
--secondary-foreground: #eeeeee;
|
|
104
|
+
--muted: #292929;
|
|
105
|
+
--muted-foreground: #b5b5b5;
|
|
106
|
+
--accent: #363636;
|
|
107
|
+
--accent-foreground: #fafafa;
|
|
108
|
+
--border: #454545;
|
|
109
|
+
--input: #505050;
|
|
110
|
+
}
|
|
111
|
+
.dil-document {
|
|
112
|
+
overflow-wrap: anywhere;
|
|
113
|
+
}
|
|
114
|
+
.dil-markdown {
|
|
115
|
+
display: contents;
|
|
116
|
+
}
|
|
117
|
+
.dil-markdown p {
|
|
118
|
+
margin: 0;
|
|
119
|
+
}
|
|
120
|
+
.dil-markdown h1 {
|
|
121
|
+
font-size: 1.8rem;
|
|
122
|
+
font-weight: 650;
|
|
123
|
+
line-height: 1.25;
|
|
124
|
+
margin: 0 0 8px;
|
|
125
|
+
letter-spacing: -0.035em;
|
|
126
|
+
}
|
|
127
|
+
.dil-markdown h2 {
|
|
128
|
+
font-size: 1.25rem;
|
|
129
|
+
font-weight: 650;
|
|
130
|
+
line-height: 1.4;
|
|
131
|
+
margin: 24px 0 4px;
|
|
132
|
+
letter-spacing: -0.02em;
|
|
133
|
+
}
|
|
134
|
+
.dil-markdown strong {
|
|
135
|
+
font-weight: 600;
|
|
136
|
+
}
|
|
137
|
+
.dil-markdown table {
|
|
138
|
+
width: 100%;
|
|
139
|
+
border-collapse: collapse;
|
|
140
|
+
font-size: 14px;
|
|
141
|
+
}
|
|
142
|
+
.dil-markdown th,
|
|
143
|
+
.dil-markdown td {
|
|
144
|
+
padding: 10px 12px;
|
|
145
|
+
text-align: left;
|
|
146
|
+
border-bottom: 1px solid var(--border);
|
|
147
|
+
}
|
|
148
|
+
.dil-markdown pre {
|
|
149
|
+
overflow-x: auto;
|
|
150
|
+
padding: 16px;
|
|
151
|
+
background: var(--muted);
|
|
152
|
+
border-radius: 8px;
|
|
153
|
+
}
|
|
154
|
+
.dil-flow {
|
|
155
|
+
display: flex;
|
|
156
|
+
flex-direction: column;
|
|
157
|
+
gap: 12px;
|
|
158
|
+
min-width: 0;
|
|
159
|
+
}
|
|
160
|
+
.dil-layout {
|
|
161
|
+
display: flex;
|
|
162
|
+
flex-direction: column;
|
|
163
|
+
min-width: 0;
|
|
164
|
+
}
|
|
165
|
+
.dil-row {
|
|
166
|
+
flex-direction: row;
|
|
167
|
+
}
|
|
168
|
+
.dil-grid {
|
|
169
|
+
display: grid;
|
|
170
|
+
grid-template-columns: repeat(var(--dil-columns, 2), minmax(0, 1fr));
|
|
171
|
+
}
|
|
172
|
+
.dil-inline p {
|
|
173
|
+
display: inline;
|
|
174
|
+
}
|
|
175
|
+
.dil-input-wrap {
|
|
176
|
+
display: flex;
|
|
177
|
+
flex-direction: column;
|
|
178
|
+
gap: 6px;
|
|
179
|
+
min-width: 0;
|
|
180
|
+
}
|
|
181
|
+
.dil-virtual-item {
|
|
182
|
+
width: 100%;
|
|
183
|
+
position: absolute;
|
|
184
|
+
top: 0;
|
|
185
|
+
left: 0;
|
|
186
|
+
padding-bottom: var(--dil-item-gap, 12px);
|
|
187
|
+
}
|
|
188
|
+
.dil-virtual-item:focus-within {
|
|
189
|
+
z-index: 1;
|
|
190
|
+
}
|
|
191
|
+
.dil-skeleton {
|
|
192
|
+
min-height: 28px;
|
|
193
|
+
border-radius: 8px;
|
|
194
|
+
background: var(--muted);
|
|
195
|
+
animation: dil-pulse 1.5s ease-in-out infinite;
|
|
196
|
+
}
|
|
197
|
+
.dil-chart-legend {
|
|
198
|
+
display: flex;
|
|
199
|
+
justify-content: center;
|
|
200
|
+
flex-wrap: wrap;
|
|
201
|
+
min-height: 32px;
|
|
202
|
+
gap: 2px;
|
|
203
|
+
}
|
|
204
|
+
.dil-scope .dil-legend-item {
|
|
205
|
+
font-weight: 400;
|
|
206
|
+
display: inline-flex;
|
|
207
|
+
align-items: center;
|
|
208
|
+
gap: 4px;
|
|
209
|
+
padding: 3px 5px;
|
|
210
|
+
font-size: 12px;
|
|
211
|
+
background: transparent;
|
|
212
|
+
box-shadow: none;
|
|
213
|
+
transition: opacity 150ms ease;
|
|
214
|
+
}
|
|
215
|
+
.dil-legend-item:hover {
|
|
216
|
+
background: transparent;
|
|
217
|
+
}
|
|
218
|
+
.dil-legend-item:focus-visible {
|
|
219
|
+
outline: 2px solid var(--ring);
|
|
220
|
+
outline-offset: 2px;
|
|
221
|
+
}
|
|
222
|
+
.dil-legend-item[data-muted="true"] {
|
|
223
|
+
opacity: 0.625;
|
|
224
|
+
}
|
|
225
|
+
.dil-legend-item[data-hidden="true"] {
|
|
226
|
+
opacity: 0.45;
|
|
227
|
+
text-decoration: line-through;
|
|
228
|
+
}
|
|
229
|
+
.dil-legend-swatch {
|
|
230
|
+
width: 11px;
|
|
231
|
+
height: 11px;
|
|
232
|
+
border-radius: 1px;
|
|
233
|
+
flex-shrink: 0;
|
|
234
|
+
}
|
|
235
|
+
.dil-chart-series {
|
|
236
|
+
transition: opacity 150ms ease;
|
|
237
|
+
}
|
|
238
|
+
.dil-tooltip {
|
|
239
|
+
z-index: 60;
|
|
240
|
+
max-width: min(24rem, calc(100vw - 16px));
|
|
241
|
+
border-radius: 8px;
|
|
242
|
+
background: var(--foreground);
|
|
243
|
+
color: var(--background);
|
|
244
|
+
padding: 6px 10px;
|
|
245
|
+
font-size: 12px;
|
|
246
|
+
line-height: 1.4;
|
|
247
|
+
box-shadow: 0 4px 12px rgb(0 0 0 / 15%);
|
|
248
|
+
}
|
|
249
|
+
.dil-snap-tooltip {
|
|
250
|
+
pointer-events: none;
|
|
251
|
+
}
|
|
252
|
+
.dil-code-block textarea {
|
|
253
|
+
font-family: var(--font-mono, monospace);
|
|
254
|
+
font-size: var(--text-xs, 0.75rem);
|
|
255
|
+
line-height: 1.6;
|
|
256
|
+
white-space: pre;
|
|
257
|
+
overflow-wrap: normal;
|
|
258
|
+
overflow-x: auto;
|
|
259
|
+
}
|
|
260
|
+
.dil-code-editor {
|
|
261
|
+
position: relative;
|
|
262
|
+
}
|
|
263
|
+
.dil-code-editor textarea,
|
|
264
|
+
.dil-code-editor .dil-code-highlight {
|
|
265
|
+
margin: 0;
|
|
266
|
+
padding: 12px;
|
|
267
|
+
font-family: var(--font-mono, monospace);
|
|
268
|
+
font-size: 12px;
|
|
269
|
+
line-height: 1.6;
|
|
270
|
+
letter-spacing: normal;
|
|
271
|
+
tab-size: 2;
|
|
272
|
+
white-space: pre;
|
|
273
|
+
overflow-wrap: normal;
|
|
274
|
+
word-break: normal;
|
|
275
|
+
}
|
|
276
|
+
.dil-code-editor .dil-code-highlight {
|
|
277
|
+
position: absolute;
|
|
278
|
+
inset: 0;
|
|
279
|
+
overflow: hidden;
|
|
280
|
+
pointer-events: none;
|
|
281
|
+
}
|
|
282
|
+
.dil-code-editor .dil-code-highlight code,
|
|
283
|
+
.dil-code-editor .dil-code-highlight span {
|
|
284
|
+
font: inherit;
|
|
285
|
+
letter-spacing: inherit;
|
|
286
|
+
tab-size: inherit;
|
|
287
|
+
}
|
|
288
|
+
.dil-code-editor textarea {
|
|
289
|
+
position: relative;
|
|
290
|
+
color: transparent;
|
|
291
|
+
caret-color: var(--foreground);
|
|
292
|
+
background: transparent;
|
|
293
|
+
}
|
|
294
|
+
.dil-code-editor textarea::selection {
|
|
295
|
+
color: transparent;
|
|
296
|
+
background: color-mix(in srgb, var(--primary) 24%, transparent);
|
|
297
|
+
}
|
|
298
|
+
.dil-code-block .hljs-keyword,
|
|
299
|
+
.dil-code-block .hljs-literal,
|
|
300
|
+
.dil-code-block .hljs-type {
|
|
301
|
+
color: var(--dil-code-keyword, #7044a6);
|
|
302
|
+
}
|
|
303
|
+
.dil-code-block .hljs-string,
|
|
304
|
+
.dil-code-block .hljs-attr,
|
|
305
|
+
.dil-code-block .hljs-addition {
|
|
306
|
+
color: var(--dil-code-string, #24734f);
|
|
307
|
+
}
|
|
308
|
+
.dil-code-block .hljs-number,
|
|
309
|
+
.dil-code-block .hljs-symbol {
|
|
310
|
+
color: var(--dil-code-number, #a15021);
|
|
311
|
+
}
|
|
312
|
+
.dil-code-block .hljs-title,
|
|
313
|
+
.dil-code-block .hljs-built_in,
|
|
314
|
+
.dil-code-block .hljs-tag {
|
|
315
|
+
color: var(--dil-code-title, #285ca3);
|
|
316
|
+
}
|
|
317
|
+
.dil-code-block .hljs-comment,
|
|
318
|
+
.dil-code-block .hljs-meta {
|
|
319
|
+
color: var(--muted-foreground);
|
|
320
|
+
}
|
|
321
|
+
.dil-scope[data-theme="dark"] {
|
|
322
|
+
--dil-code-keyword: #c7a7f8;
|
|
323
|
+
--dil-code-string: #8bd4ae;
|
|
324
|
+
--dil-code-number: #f2b685;
|
|
325
|
+
--dil-code-title: #97bdf4;
|
|
326
|
+
}
|
|
327
|
+
@media (forced-colors: active) {
|
|
328
|
+
.dil-code-editor .dil-code-highlight {
|
|
329
|
+
visibility: hidden;
|
|
330
|
+
}
|
|
331
|
+
.dil-code-editor textarea {
|
|
332
|
+
color: CanvasText;
|
|
333
|
+
caret-color: CanvasText;
|
|
334
|
+
}
|
|
335
|
+
.dil-code-editor textarea::selection {
|
|
336
|
+
color: HighlightText;
|
|
337
|
+
background: Highlight;
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
.dil-code-block[data-word-wrap="true"] :is(pre, textarea) {
|
|
341
|
+
white-space: pre-wrap;
|
|
342
|
+
overflow-wrap: anywhere;
|
|
343
|
+
}
|
|
344
|
+
.dil-service-node {
|
|
345
|
+
width: 160px;
|
|
346
|
+
height: 72px;
|
|
347
|
+
display: flex;
|
|
348
|
+
flex-direction: column;
|
|
349
|
+
justify-content: center;
|
|
350
|
+
gap: 4px;
|
|
351
|
+
padding: 10px 14px;
|
|
352
|
+
border: 1px solid var(--border);
|
|
353
|
+
border-radius: 12px;
|
|
354
|
+
background: var(--card);
|
|
355
|
+
color: var(--foreground);
|
|
356
|
+
}
|
|
357
|
+
.dil-service-node strong {
|
|
358
|
+
font-size: 14px;
|
|
359
|
+
line-height: 1.2;
|
|
360
|
+
}
|
|
361
|
+
.dil-service-node > span {
|
|
362
|
+
font-size: 12px;
|
|
363
|
+
color: var(--muted-foreground);
|
|
364
|
+
line-height: 1.2;
|
|
365
|
+
}
|
|
366
|
+
.dil-service-node[data-selected="true"] {
|
|
367
|
+
border-color: var(--ring);
|
|
368
|
+
box-shadow: 0 0 0 2px color-mix(in srgb, var(--ring) 35%, transparent);
|
|
369
|
+
}
|
|
370
|
+
@keyframes dil-pulse {
|
|
371
|
+
50% {
|
|
372
|
+
opacity: 0.5;
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
@media (max-width: 520px) {
|
|
376
|
+
.dil-grid {
|
|
377
|
+
grid-template-columns: 1fr;
|
|
378
|
+
}
|
|
379
|
+
.dil-row[data-wrap="wrap"] {
|
|
380
|
+
flex-wrap: wrap;
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
@media (prefers-reduced-motion: reduce) {
|
|
384
|
+
*,
|
|
385
|
+
*::before,
|
|
386
|
+
*::after {
|
|
387
|
+
animation: none !important;
|
|
388
|
+
scroll-behavior: auto !important;
|
|
389
|
+
transition: none !important;
|
|
390
|
+
}
|
|
391
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/* Default OpenDIL tokens, scoped to each renderer. */
|
|
2
|
+
.dil-scope {
|
|
3
|
+
--dil-text-color: #0d0d0d;
|
|
4
|
+
--dil-muted-text-color: #5d5d5d;
|
|
5
|
+
--foreground: #0d0d0d;
|
|
6
|
+
--muted-foreground: #5d5d5d;
|
|
7
|
+
--secondary: #f4f4f4;
|
|
8
|
+
--muted: #f7f7f7;
|
|
9
|
+
--border: #e5e5e5;
|
|
10
|
+
--font-dil:
|
|
11
|
+
ui-sans-serif, system-ui, -apple-system, "Segoe UI", Helvetica, Arial,
|
|
12
|
+
sans-serif;
|
|
13
|
+
--dil-control-radius: 12px;
|
|
14
|
+
--dil-item-radius: 8px;
|
|
15
|
+
--dil-success: #22825e;
|
|
16
|
+
--dil-warning: #ad751a;
|
|
17
|
+
--dil-tertiary: #8f8f8f;
|
|
18
|
+
--dil-node-selected: #343d75;
|
|
19
|
+
--dil-node-surface: #2a303b;
|
|
20
|
+
--dil-chart-height: 280px;
|
|
21
|
+
--dil-spacing: 4px;
|
|
22
|
+
}
|
|
23
|
+
[data-slot="toggle-group"] {
|
|
24
|
+
border-radius: var(--dil-control-radius);
|
|
25
|
+
gap: var(--dil-spacing);
|
|
26
|
+
}
|
|
27
|
+
[data-slot="toggle-group-item"] {
|
|
28
|
+
border-radius: var(--dil-item-radius);
|
|
29
|
+
}
|