@magicborn/dialogue-forge 0.1.7 → 0.1.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/dist/esm/lib/yarn-runner/index.d.ts +2 -1
- package/dist/lib/yarn-runner/index.d.ts +2 -1
- package/package.json +13 -6
- package/demo/app/layout.tsx +0 -36
- package/demo/app/page.tsx +0 -455
- package/demo/components/ThemeSwitcher.tsx +0 -611
- package/demo/next.config.mjs +0 -7
- package/demo/package.json +0 -29
- package/demo/postcss.config.mjs +0 -7
- package/demo/public/logo.svg +0 -14
- package/demo/styles/globals.css +0 -19
- package/demo/tailwind.config.ts +0 -90
- package/demo/tsconfig.json +0 -42
- package/demo/tsconfig.tsbuildinfo +0 -1
|
@@ -1,611 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import React, { useState, useEffect } from 'react';
|
|
4
|
-
import { Palette } from 'lucide-react';
|
|
5
|
-
|
|
6
|
-
// Theme presets
|
|
7
|
-
export const themes = {
|
|
8
|
-
'dark-fantasy': {
|
|
9
|
-
name: 'Dark Fantasy',
|
|
10
|
-
description: 'Earthy tones, dark fantasy aesthetic',
|
|
11
|
-
css: `
|
|
12
|
-
:root {
|
|
13
|
-
/* Base Colors */
|
|
14
|
-
--color-df-base: oklch(0.15 0.02 250);
|
|
15
|
-
--color-df-surface: oklch(0.18 0.02 260);
|
|
16
|
-
--color-df-elevated: oklch(0.22 0.02 270);
|
|
17
|
-
|
|
18
|
-
/* NPC Node Colors (duller borders, bright when selected) */
|
|
19
|
-
--color-df-npc-bg: oklch(0.25 0.04 45);
|
|
20
|
-
--color-df-npc-border: oklch(0.35 0.05 35);
|
|
21
|
-
--color-df-npc-header: oklch(0.30 0.10 25);
|
|
22
|
-
--color-df-npc-selected: oklch(0.60 0.20 15);
|
|
23
|
-
|
|
24
|
-
/* Player Node Colors (duller borders, bright when selected) */
|
|
25
|
-
--color-df-player-bg: oklch(0.22 0.08 300);
|
|
26
|
-
--color-df-player-border: oklch(0.38 0.10 310);
|
|
27
|
-
--color-df-player-header: oklch(0.28 0.12 290);
|
|
28
|
-
--color-df-player-selected: oklch(0.65 0.25 280);
|
|
29
|
-
|
|
30
|
-
/* Conditional Node (duller borders, bright when selected) */
|
|
31
|
-
--color-df-conditional-bg: oklch(0.24 0.06 150);
|
|
32
|
-
--color-df-conditional-border: oklch(0.35 0.08 140);
|
|
33
|
-
--color-df-conditional-header: oklch(0.30 0.10 145);
|
|
34
|
-
|
|
35
|
-
/* Start/End */
|
|
36
|
-
--color-df-start: oklch(0.55 0.15 140);
|
|
37
|
-
--color-df-start-bg: oklch(0.25 0.08 140);
|
|
38
|
-
--color-df-end: oklch(0.50 0.15 45);
|
|
39
|
-
--color-df-end-bg: oklch(0.25 0.08 45);
|
|
40
|
-
|
|
41
|
-
/* Edges (duller default, bright on hover/selection) */
|
|
42
|
-
--color-df-edge-default: oklch(0.35 0.02 250);
|
|
43
|
-
--color-df-edge-default-hover: oklch(0.55 0.10 250);
|
|
44
|
-
--color-df-edge-choice-1: oklch(0.45 0.12 15);
|
|
45
|
-
--color-df-edge-choice-2: oklch(0.50 0.15 280);
|
|
46
|
-
--color-df-edge-choice-3: oklch(0.48 0.12 200);
|
|
47
|
-
--color-df-edge-choice-4: oklch(0.52 0.12 120);
|
|
48
|
-
--color-df-edge-choice-5: oklch(0.45 0.10 45);
|
|
49
|
-
--color-df-edge-loop: oklch(0.50 0.12 60);
|
|
50
|
-
--color-df-edge-dimmed: oklch(0.25 0.02 250);
|
|
51
|
-
|
|
52
|
-
/* Status */
|
|
53
|
-
--color-df-error: oklch(0.55 0.22 25);
|
|
54
|
-
--color-df-warning: oklch(0.65 0.18 70);
|
|
55
|
-
--color-df-success: oklch(0.60 0.18 150);
|
|
56
|
-
--color-df-info: oklch(0.55 0.15 220);
|
|
57
|
-
|
|
58
|
-
/* Text */
|
|
59
|
-
--color-df-text-primary: oklch(0.85 0.02 250);
|
|
60
|
-
--color-df-text-secondary: oklch(0.65 0.02 250);
|
|
61
|
-
--color-df-text-tertiary: oklch(0.45 0.02 250);
|
|
62
|
-
|
|
63
|
-
/* UI Controls */
|
|
64
|
-
--color-df-control-bg: oklch(0.18 0.02 260);
|
|
65
|
-
--color-df-control-border: oklch(0.30 0.03 250);
|
|
66
|
-
--color-df-control-hover: oklch(0.25 0.03 250);
|
|
67
|
-
|
|
68
|
-
/* Flags */
|
|
69
|
-
--color-df-flag-dialogue: oklch(0.45 0.03 250);
|
|
70
|
-
--color-df-flag-dialogue-bg: oklch(0.20 0.02 250);
|
|
71
|
-
--color-df-flag-quest: oklch(0.50 0.15 220);
|
|
72
|
-
--color-df-flag-quest-bg: oklch(0.22 0.08 220);
|
|
73
|
-
--color-df-flag-achievement: oklch(0.60 0.18 70);
|
|
74
|
-
--color-df-flag-achievement-bg: oklch(0.25 0.10 70);
|
|
75
|
-
--color-df-flag-item: oklch(0.55 0.15 150);
|
|
76
|
-
--color-df-flag-item-bg: oklch(0.25 0.08 150);
|
|
77
|
-
--color-df-flag-stat: oklch(0.55 0.18 280);
|
|
78
|
-
--color-df-flag-stat-bg: oklch(0.25 0.10 280);
|
|
79
|
-
--color-df-flag-title: oklch(0.55 0.18 330);
|
|
80
|
-
--color-df-flag-title-bg: oklch(0.25 0.10 330);
|
|
81
|
-
--color-df-flag-global: oklch(0.50 0.15 45);
|
|
82
|
-
--color-df-flag-global-bg: oklch(0.25 0.08 45);
|
|
83
|
-
|
|
84
|
-
/* Canvas */
|
|
85
|
-
--color-df-canvas-bg: oklch(0.12 0.01 250);
|
|
86
|
-
--color-df-canvas-grid: oklch(0.20 0.02 250);
|
|
87
|
-
|
|
88
|
-
/* Sidebar */
|
|
89
|
-
--color-df-sidebar-bg: oklch(0.18 0.02 260);
|
|
90
|
-
--color-df-sidebar-border: oklch(0.35 0.05 250);
|
|
91
|
-
--color-df-editor-bg: oklch(0.15 0.02 240);
|
|
92
|
-
--color-df-editor-border: oklch(0.30 0.03 250);
|
|
93
|
-
}
|
|
94
|
-
`,
|
|
95
|
-
},
|
|
96
|
-
'light': {
|
|
97
|
-
name: 'Light',
|
|
98
|
-
description: 'Clean, bright theme',
|
|
99
|
-
css: `
|
|
100
|
-
:root {
|
|
101
|
-
/* Base Colors */
|
|
102
|
-
--color-df-base: oklch(0.98 0.01 250);
|
|
103
|
-
--color-df-surface: oklch(0.95 0.01 260);
|
|
104
|
-
--color-df-elevated: oklch(0.92 0.01 270);
|
|
105
|
-
|
|
106
|
-
/* NPC Node Colors */
|
|
107
|
-
--color-df-npc-bg: oklch(0.90 0.03 45);
|
|
108
|
-
--color-df-npc-border: oklch(0.60 0.08 35);
|
|
109
|
-
--color-df-npc-header: oklch(0.85 0.05 25);
|
|
110
|
-
--color-df-npc-selected: oklch(0.55 0.15 15);
|
|
111
|
-
|
|
112
|
-
/* Player Node Colors */
|
|
113
|
-
--color-df-player-bg: oklch(0.92 0.05 300);
|
|
114
|
-
--color-df-player-border: oklch(0.55 0.15 310);
|
|
115
|
-
--color-df-player-header: oklch(0.88 0.08 290);
|
|
116
|
-
--color-df-player-selected: oklch(0.45 0.20 280);
|
|
117
|
-
|
|
118
|
-
/* Conditional Node */
|
|
119
|
-
--color-df-conditional-bg: oklch(0.91 0.04 150);
|
|
120
|
-
--color-df-conditional-border: oklch(0.58 0.12 140);
|
|
121
|
-
--color-df-conditional-header: oklch(0.88 0.06 145);
|
|
122
|
-
|
|
123
|
-
/* Start/End */
|
|
124
|
-
--color-df-start: oklch(0.45 0.15 140);
|
|
125
|
-
--color-df-start-bg: oklch(0.90 0.05 140);
|
|
126
|
-
--color-df-end: oklch(0.50 0.15 45);
|
|
127
|
-
--color-df-end-bg: oklch(0.90 0.05 45);
|
|
128
|
-
|
|
129
|
-
/* Edges */
|
|
130
|
-
--color-df-edge-default: oklch(0.60 0.03 250);
|
|
131
|
-
--color-df-edge-default-hover: oklch(0.50 0.05 250);
|
|
132
|
-
--color-df-edge-choice-1: oklch(0.50 0.18 15);
|
|
133
|
-
--color-df-edge-choice-2: oklch(0.45 0.20 280);
|
|
134
|
-
--color-df-edge-choice-3: oklch(0.48 0.18 200);
|
|
135
|
-
--color-df-edge-choice-4: oklch(0.42 0.16 120);
|
|
136
|
-
--color-df-edge-choice-5: oklch(0.50 0.15 45);
|
|
137
|
-
--color-df-edge-loop: oklch(0.45 0.15 60);
|
|
138
|
-
--color-df-edge-dimmed: oklch(0.75 0.02 250);
|
|
139
|
-
|
|
140
|
-
/* Status */
|
|
141
|
-
--color-df-error: oklch(0.45 0.22 25);
|
|
142
|
-
--color-df-warning: oklch(0.35 0.18 70);
|
|
143
|
-
--color-df-success: oklch(0.40 0.18 150);
|
|
144
|
-
--color-df-info: oklch(0.45 0.15 220);
|
|
145
|
-
|
|
146
|
-
/* Text */
|
|
147
|
-
--color-df-text-primary: oklch(0.15 0.02 250);
|
|
148
|
-
--color-df-text-secondary: oklch(0.35 0.02 250);
|
|
149
|
-
--color-df-text-tertiary: oklch(0.55 0.02 250);
|
|
150
|
-
|
|
151
|
-
/* UI Controls */
|
|
152
|
-
--color-df-control-bg: oklch(0.95 0.01 260);
|
|
153
|
-
--color-df-control-border: oklch(0.70 0.03 250);
|
|
154
|
-
--color-df-control-hover: oklch(0.88 0.02 250);
|
|
155
|
-
|
|
156
|
-
/* Flags - same as dark */
|
|
157
|
-
--color-df-flag-dialogue: oklch(0.55 0.03 250);
|
|
158
|
-
--color-df-flag-dialogue-bg: oklch(0.90 0.01 250);
|
|
159
|
-
--color-df-flag-quest: oklch(0.50 0.15 220);
|
|
160
|
-
--color-df-flag-quest-bg: oklch(0.88 0.05 220);
|
|
161
|
-
--color-df-flag-achievement: oklch(0.40 0.18 70);
|
|
162
|
-
--color-df-flag-achievement-bg: oklch(0.90 0.08 70);
|
|
163
|
-
--color-df-flag-item: oklch(0.45 0.15 150);
|
|
164
|
-
--color-df-flag-item-bg: oklch(0.90 0.05 150);
|
|
165
|
-
--color-df-flag-stat: oklch(0.45 0.18 280);
|
|
166
|
-
--color-df-flag-stat-bg: oklch(0.90 0.08 280);
|
|
167
|
-
--color-df-flag-title: oklch(0.45 0.18 330);
|
|
168
|
-
--color-df-flag-title-bg: oklch(0.90 0.08 330);
|
|
169
|
-
--color-df-flag-global: oklch(0.50 0.15 45);
|
|
170
|
-
--color-df-flag-global-bg: oklch(0.90 0.05 45);
|
|
171
|
-
|
|
172
|
-
/* Canvas */
|
|
173
|
-
--color-df-canvas-bg: oklch(0.98 0.01 250);
|
|
174
|
-
--color-df-canvas-grid: oklch(0.85 0.01 250);
|
|
175
|
-
|
|
176
|
-
/* Sidebar */
|
|
177
|
-
--color-df-sidebar-bg: oklch(0.95 0.01 260);
|
|
178
|
-
--color-df-sidebar-border: oklch(0.65 0.05 250);
|
|
179
|
-
--color-df-editor-bg: oklch(0.98 0.01 240);
|
|
180
|
-
--color-df-editor-border: oklch(0.70 0.03 250);
|
|
181
|
-
}
|
|
182
|
-
`,
|
|
183
|
-
},
|
|
184
|
-
'cyberpunk': {
|
|
185
|
-
name: 'Cyberpunk',
|
|
186
|
-
description: 'Neon colors, futuristic vibe',
|
|
187
|
-
css: `
|
|
188
|
-
:root {
|
|
189
|
-
/* Base Colors */
|
|
190
|
-
--color-df-base: oklch(0.10 0.02 280);
|
|
191
|
-
--color-df-surface: oklch(0.12 0.03 280);
|
|
192
|
-
--color-df-elevated: oklch(0.15 0.04 280);
|
|
193
|
-
|
|
194
|
-
/* NPC Node Colors */
|
|
195
|
-
--color-df-npc-bg: oklch(0.15 0.08 200);
|
|
196
|
-
--color-df-npc-border: oklch(0.50 0.20 200);
|
|
197
|
-
--color-df-npc-header: oklch(0.18 0.10 200);
|
|
198
|
-
--color-df-npc-selected: oklch(0.60 0.25 200);
|
|
199
|
-
|
|
200
|
-
/* Player Node Colors */
|
|
201
|
-
--color-df-player-bg: oklch(0.15 0.08 320);
|
|
202
|
-
--color-df-player-border: oklch(0.55 0.25 320);
|
|
203
|
-
--color-df-player-header: oklch(0.18 0.12 320);
|
|
204
|
-
--color-df-player-selected: oklch(0.65 0.30 320);
|
|
205
|
-
|
|
206
|
-
/* Conditional Node */
|
|
207
|
-
--color-df-conditional-bg: oklch(0.15 0.08 150);
|
|
208
|
-
--color-df-conditional-border: oklch(0.55 0.20 150);
|
|
209
|
-
--color-df-conditional-header: oklch(0.18 0.10 150);
|
|
210
|
-
|
|
211
|
-
/* Start/End */
|
|
212
|
-
--color-df-start: oklch(0.60 0.25 150);
|
|
213
|
-
--color-df-start-bg: oklch(0.20 0.10 150);
|
|
214
|
-
--color-df-end: oklch(0.55 0.25 30);
|
|
215
|
-
--color-df-end-bg: oklch(0.20 0.10 30);
|
|
216
|
-
|
|
217
|
-
/* Edges */
|
|
218
|
-
--color-df-edge-default: oklch(0.45 0.15 280);
|
|
219
|
-
--color-df-edge-default-hover: oklch(0.55 0.20 280);
|
|
220
|
-
--color-df-edge-choice-1: oklch(0.60 0.25 0);
|
|
221
|
-
--color-df-edge-choice-2: oklch(0.65 0.30 320);
|
|
222
|
-
--color-df-edge-choice-3: oklch(0.60 0.25 200);
|
|
223
|
-
--color-df-edge-choice-4: oklch(0.65 0.25 150);
|
|
224
|
-
--color-df-edge-choice-5: oklch(0.60 0.25 60);
|
|
225
|
-
--color-df-edge-loop: oklch(0.65 0.25 30);
|
|
226
|
-
--color-df-edge-dimmed: oklch(0.25 0.05 280);
|
|
227
|
-
|
|
228
|
-
/* Status */
|
|
229
|
-
--color-df-error: oklch(0.60 0.25 25);
|
|
230
|
-
--color-df-warning: oklch(0.65 0.25 70);
|
|
231
|
-
--color-df-success: oklch(0.60 0.25 150);
|
|
232
|
-
--color-df-info: oklch(0.60 0.25 220);
|
|
233
|
-
|
|
234
|
-
/* Text */
|
|
235
|
-
--color-df-text-primary: oklch(0.90 0.02 280);
|
|
236
|
-
--color-df-text-secondary: oklch(0.70 0.03 280);
|
|
237
|
-
--color-df-text-tertiary: oklch(0.50 0.03 280);
|
|
238
|
-
|
|
239
|
-
/* UI Controls */
|
|
240
|
-
--color-df-control-bg: oklch(0.12 0.03 280);
|
|
241
|
-
--color-df-control-border: oklch(0.40 0.10 280);
|
|
242
|
-
--color-df-control-hover: oklch(0.18 0.05 280);
|
|
243
|
-
|
|
244
|
-
/* Flags */
|
|
245
|
-
--color-df-flag-dialogue: oklch(0.50 0.15 280);
|
|
246
|
-
--color-df-flag-dialogue-bg: oklch(0.15 0.05 280);
|
|
247
|
-
--color-df-flag-quest: oklch(0.60 0.25 220);
|
|
248
|
-
--color-df-flag-quest-bg: oklch(0.18 0.08 220);
|
|
249
|
-
--color-df-flag-achievement: oklch(0.65 0.25 70);
|
|
250
|
-
--color-df-flag-achievement-bg: oklch(0.20 0.10 70);
|
|
251
|
-
--color-df-flag-item: oklch(0.60 0.25 150);
|
|
252
|
-
--color-df-flag-item-bg: oklch(0.18 0.08 150);
|
|
253
|
-
--color-df-flag-stat: oklch(0.65 0.30 320);
|
|
254
|
-
--color-df-flag-stat-bg: oklch(0.18 0.12 320);
|
|
255
|
-
--color-df-flag-title: oklch(0.65 0.30 330);
|
|
256
|
-
--color-df-flag-title-bg: oklch(0.18 0.12 330);
|
|
257
|
-
--color-df-flag-global: oklch(0.60 0.25 30);
|
|
258
|
-
--color-df-flag-global-bg: oklch(0.18 0.10 30);
|
|
259
|
-
|
|
260
|
-
/* Canvas */
|
|
261
|
-
--color-df-canvas-bg: oklch(0.08 0.01 280);
|
|
262
|
-
--color-df-canvas-grid: oklch(0.15 0.03 280);
|
|
263
|
-
|
|
264
|
-
/* Sidebar */
|
|
265
|
-
--color-df-sidebar-bg: oklch(0.12 0.03 280);
|
|
266
|
-
--color-df-sidebar-border: oklch(0.40 0.10 280);
|
|
267
|
-
--color-df-editor-bg: oklch(0.10 0.02 280);
|
|
268
|
-
--color-df-editor-border: oklch(0.35 0.08 280);
|
|
269
|
-
}
|
|
270
|
-
`,
|
|
271
|
-
},
|
|
272
|
-
'darcula': {
|
|
273
|
-
name: 'Darcula',
|
|
274
|
-
description: 'IntelliJ-inspired dark theme',
|
|
275
|
-
css: `
|
|
276
|
-
:root {
|
|
277
|
-
/* Base Colors */
|
|
278
|
-
--color-df-base: oklch(0.20 0.01 250);
|
|
279
|
-
--color-df-surface: oklch(0.22 0.01 260);
|
|
280
|
-
--color-df-elevated: oklch(0.25 0.01 270);
|
|
281
|
-
|
|
282
|
-
/* NPC Node Colors - Muted Red */
|
|
283
|
-
--color-df-npc-bg: oklch(0.22 0.03 20);
|
|
284
|
-
--color-df-npc-border: oklch(0.35 0.05 20);
|
|
285
|
-
--color-df-npc-header: oklch(0.25 0.04 20);
|
|
286
|
-
--color-df-npc-selected: oklch(0.60 0.15 20);
|
|
287
|
-
|
|
288
|
-
/* Player Node Colors - Muted Blue */
|
|
289
|
-
--color-df-player-bg: oklch(0.22 0.03 240);
|
|
290
|
-
--color-df-player-border: oklch(0.35 0.05 240);
|
|
291
|
-
--color-df-player-header: oklch(0.25 0.04 240);
|
|
292
|
-
--color-df-player-selected: oklch(0.60 0.15 240);
|
|
293
|
-
|
|
294
|
-
/* Conditional Node - Muted Green */
|
|
295
|
-
--color-df-conditional-bg: oklch(0.22 0.03 150);
|
|
296
|
-
--color-df-conditional-border: oklch(0.35 0.05 150);
|
|
297
|
-
--color-df-conditional-header: oklch(0.25 0.04 150);
|
|
298
|
-
|
|
299
|
-
/* Start/End */
|
|
300
|
-
--color-df-start: oklch(0.55 0.12 150);
|
|
301
|
-
--color-df-start-bg: oklch(0.25 0.04 150);
|
|
302
|
-
--color-df-end: oklch(0.50 0.12 30);
|
|
303
|
-
--color-df-end-bg: oklch(0.25 0.04 30);
|
|
304
|
-
|
|
305
|
-
/* Edges - Duller borders */
|
|
306
|
-
--color-df-edge-default: oklch(0.35 0.02 250);
|
|
307
|
-
--color-df-edge-default-hover: oklch(0.50 0.05 250);
|
|
308
|
-
--color-df-edge-choice-1: oklch(0.50 0.12 20);
|
|
309
|
-
--color-df-edge-choice-2: oklch(0.50 0.12 240);
|
|
310
|
-
--color-df-edge-choice-3: oklch(0.50 0.12 150);
|
|
311
|
-
--color-df-edge-choice-4: oklch(0.50 0.12 60);
|
|
312
|
-
--color-df-edge-choice-5: oklch(0.50 0.12 300);
|
|
313
|
-
--color-df-edge-loop: oklch(0.50 0.12 30);
|
|
314
|
-
--color-df-edge-dimmed: oklch(0.25 0.01 250);
|
|
315
|
-
|
|
316
|
-
/* Status */
|
|
317
|
-
--color-df-error: oklch(0.55 0.18 25);
|
|
318
|
-
--color-df-warning: oklch(0.60 0.15 70);
|
|
319
|
-
--color-df-success: oklch(0.55 0.12 150);
|
|
320
|
-
--color-df-info: oklch(0.55 0.12 220);
|
|
321
|
-
|
|
322
|
-
/* Text */
|
|
323
|
-
--color-df-text-primary: oklch(0.85 0.01 250);
|
|
324
|
-
--color-df-text-secondary: oklch(0.60 0.01 250);
|
|
325
|
-
--color-df-text-tertiary: oklch(0.45 0.01 250);
|
|
326
|
-
|
|
327
|
-
/* UI Controls */
|
|
328
|
-
--color-df-control-bg: oklch(0.22 0.01 260);
|
|
329
|
-
--color-df-control-border: oklch(0.30 0.02 250);
|
|
330
|
-
--color-df-control-hover: oklch(0.28 0.02 250);
|
|
331
|
-
|
|
332
|
-
/* Flags */
|
|
333
|
-
--color-df-flag-dialogue: oklch(0.50 0.02 250);
|
|
334
|
-
--color-df-flag-dialogue-bg: oklch(0.22 0.01 250);
|
|
335
|
-
--color-df-flag-quest: oklch(0.55 0.12 220);
|
|
336
|
-
--color-df-flag-quest-bg: oklch(0.24 0.04 220);
|
|
337
|
-
--color-df-flag-achievement: oklch(0.60 0.15 70);
|
|
338
|
-
--color-df-flag-achievement-bg: oklch(0.25 0.05 70);
|
|
339
|
-
--color-df-flag-item: oklch(0.55 0.12 150);
|
|
340
|
-
--color-df-flag-item-bg: oklch(0.24 0.04 150);
|
|
341
|
-
--color-df-flag-stat: oklch(0.55 0.12 280);
|
|
342
|
-
--color-df-flag-stat-bg: oklch(0.24 0.04 280);
|
|
343
|
-
--color-df-flag-title: oklch(0.55 0.12 330);
|
|
344
|
-
--color-df-flag-title-bg: oklch(0.24 0.04 330);
|
|
345
|
-
--color-df-flag-global: oklch(0.50 0.12 30);
|
|
346
|
-
--color-df-flag-global-bg: oklch(0.24 0.04 30);
|
|
347
|
-
|
|
348
|
-
/* Canvas */
|
|
349
|
-
--color-df-canvas-bg: oklch(0.18 0.01 250);
|
|
350
|
-
--color-df-canvas-grid: oklch(0.22 0.01 250);
|
|
351
|
-
|
|
352
|
-
/* Sidebar */
|
|
353
|
-
--color-df-sidebar-bg: oklch(0.22 0.01 260);
|
|
354
|
-
--color-df-sidebar-border: oklch(0.30 0.02 250);
|
|
355
|
-
--color-df-editor-bg: oklch(0.20 0.01 240);
|
|
356
|
-
--color-df-editor-border: oklch(0.30 0.02 250);
|
|
357
|
-
}
|
|
358
|
-
`,
|
|
359
|
-
},
|
|
360
|
-
'high-contrast': {
|
|
361
|
-
name: 'High Contrast',
|
|
362
|
-
description: 'High contrast for accessibility',
|
|
363
|
-
css: `
|
|
364
|
-
:root {
|
|
365
|
-
/* Base Colors */
|
|
366
|
-
--color-df-base: oklch(0.10 0.01 250);
|
|
367
|
-
--color-df-surface: oklch(0.12 0.01 260);
|
|
368
|
-
--color-df-elevated: oklch(0.15 0.01 270);
|
|
369
|
-
|
|
370
|
-
/* NPC Node Colors - Bright Red */
|
|
371
|
-
--color-df-npc-bg: oklch(0.15 0.05 20);
|
|
372
|
-
--color-df-npc-border: oklch(0.50 0.20 20);
|
|
373
|
-
--color-df-npc-header: oklch(0.20 0.08 20);
|
|
374
|
-
--color-df-npc-selected: oklch(0.70 0.25 20);
|
|
375
|
-
|
|
376
|
-
/* Player Node Colors - Bright Blue */
|
|
377
|
-
--color-df-player-bg: oklch(0.15 0.05 240);
|
|
378
|
-
--color-df-player-border: oklch(0.50 0.20 240);
|
|
379
|
-
--color-df-player-header: oklch(0.20 0.08 240);
|
|
380
|
-
--color-df-player-selected: oklch(0.70 0.25 240);
|
|
381
|
-
|
|
382
|
-
/* Conditional Node - Bright Green */
|
|
383
|
-
--color-df-conditional-bg: oklch(0.15 0.05 150);
|
|
384
|
-
--color-df-conditional-border: oklch(0.50 0.20 150);
|
|
385
|
-
--color-df-conditional-header: oklch(0.20 0.08 150);
|
|
386
|
-
|
|
387
|
-
/* Start/End */
|
|
388
|
-
--color-df-start: oklch(0.70 0.20 150);
|
|
389
|
-
--color-df-start-bg: oklch(0.20 0.08 150);
|
|
390
|
-
--color-df-end: oklch(0.70 0.20 30);
|
|
391
|
-
--color-df-end-bg: oklch(0.20 0.08 30);
|
|
392
|
-
|
|
393
|
-
/* Edges - High contrast */
|
|
394
|
-
--color-df-edge-default: oklch(0.60 0.05 250);
|
|
395
|
-
--color-df-edge-default-hover: oklch(0.75 0.10 250);
|
|
396
|
-
--color-df-edge-choice-1: oklch(0.70 0.25 20);
|
|
397
|
-
--color-df-edge-choice-2: oklch(0.70 0.25 240);
|
|
398
|
-
--color-df-edge-choice-3: oklch(0.70 0.25 150);
|
|
399
|
-
--color-df-edge-choice-4: oklch(0.70 0.25 60);
|
|
400
|
-
--color-df-edge-choice-5: oklch(0.70 0.25 300);
|
|
401
|
-
--color-df-edge-loop: oklch(0.70 0.25 30);
|
|
402
|
-
--color-df-edge-dimmed: oklch(0.40 0.02 250);
|
|
403
|
-
|
|
404
|
-
/* Status */
|
|
405
|
-
--color-df-error: oklch(0.70 0.25 25);
|
|
406
|
-
--color-df-warning: oklch(0.75 0.20 70);
|
|
407
|
-
--color-df-success: oklch(0.70 0.25 150);
|
|
408
|
-
--color-df-info: oklch(0.70 0.25 220);
|
|
409
|
-
|
|
410
|
-
/* Text */
|
|
411
|
-
--color-df-text-primary: oklch(0.95 0.01 250);
|
|
412
|
-
--color-df-text-secondary: oklch(0.80 0.01 250);
|
|
413
|
-
--color-df-text-tertiary: oklch(0.65 0.01 250);
|
|
414
|
-
|
|
415
|
-
/* UI Controls */
|
|
416
|
-
--color-df-control-bg: oklch(0.12 0.01 260);
|
|
417
|
-
--color-df-control-border: oklch(0.50 0.05 250);
|
|
418
|
-
--color-df-control-hover: oklch(0.18 0.02 250);
|
|
419
|
-
|
|
420
|
-
/* Flags */
|
|
421
|
-
--color-df-flag-dialogue: oklch(0.60 0.05 250);
|
|
422
|
-
--color-df-flag-dialogue-bg: oklch(0.15 0.02 250);
|
|
423
|
-
--color-df-flag-quest: oklch(0.70 0.25 220);
|
|
424
|
-
--color-df-flag-quest-bg: oklch(0.20 0.08 220);
|
|
425
|
-
--color-df-flag-achievement: oklch(0.75 0.20 70);
|
|
426
|
-
--color-df-flag-achievement-bg: oklch(0.20 0.10 70);
|
|
427
|
-
--color-df-flag-item: oklch(0.70 0.25 150);
|
|
428
|
-
--color-df-flag-item-bg: oklch(0.20 0.08 150);
|
|
429
|
-
--color-df-flag-stat: oklch(0.70 0.25 280);
|
|
430
|
-
--color-df-flag-stat-bg: oklch(0.20 0.10 280);
|
|
431
|
-
--color-df-flag-title: oklch(0.70 0.25 330);
|
|
432
|
-
--color-df-flag-title-bg: oklch(0.20 0.10 330);
|
|
433
|
-
--color-df-flag-global: oklch(0.70 0.25 30);
|
|
434
|
-
--color-df-flag-global-bg: oklch(0.20 0.08 30);
|
|
435
|
-
|
|
436
|
-
/* Canvas */
|
|
437
|
-
--color-df-canvas-bg: oklch(0.08 0.01 250);
|
|
438
|
-
--color-df-canvas-grid: oklch(0.25 0.01 250);
|
|
439
|
-
|
|
440
|
-
/* Sidebar */
|
|
441
|
-
--color-df-sidebar-bg: oklch(0.12 0.01 260);
|
|
442
|
-
--color-df-sidebar-border: oklch(0.50 0.05 250);
|
|
443
|
-
--color-df-editor-bg: oklch(0.10 0.01 240);
|
|
444
|
-
--color-df-editor-border: oklch(0.50 0.05 250);
|
|
445
|
-
}
|
|
446
|
-
`,
|
|
447
|
-
},
|
|
448
|
-
'girly': {
|
|
449
|
-
name: 'Girly',
|
|
450
|
-
description: 'Soft pinks and pastels',
|
|
451
|
-
css: `
|
|
452
|
-
:root {
|
|
453
|
-
/* Base Colors */
|
|
454
|
-
--color-df-base: oklch(0.18 0.02 330);
|
|
455
|
-
--color-df-surface: oklch(0.20 0.02 340);
|
|
456
|
-
--color-df-elevated: oklch(0.23 0.02 350);
|
|
457
|
-
|
|
458
|
-
/* NPC Node Colors - Soft Pink */
|
|
459
|
-
--color-df-npc-bg: oklch(0.25 0.05 350);
|
|
460
|
-
--color-df-npc-border: oklch(0.45 0.12 350);
|
|
461
|
-
--color-df-npc-header: oklch(0.28 0.08 350);
|
|
462
|
-
--color-df-npc-selected: oklch(0.65 0.20 350);
|
|
463
|
-
|
|
464
|
-
/* Player Node Colors - Soft Purple */
|
|
465
|
-
--color-df-player-bg: oklch(0.25 0.05 300);
|
|
466
|
-
--color-df-player-border: oklch(0.45 0.12 300);
|
|
467
|
-
--color-df-player-header: oklch(0.28 0.08 300);
|
|
468
|
-
--color-df-player-selected: oklch(0.65 0.20 300);
|
|
469
|
-
|
|
470
|
-
/* Conditional Node - Soft Mint */
|
|
471
|
-
--color-df-conditional-bg: oklch(0.25 0.05 180);
|
|
472
|
-
--color-df-conditional-border: oklch(0.45 0.12 180);
|
|
473
|
-
--color-df-conditional-header: oklch(0.28 0.08 180);
|
|
474
|
-
|
|
475
|
-
/* Start/End */
|
|
476
|
-
--color-df-start: oklch(0.65 0.18 180);
|
|
477
|
-
--color-df-start-bg: oklch(0.28 0.08 180);
|
|
478
|
-
--color-df-end: oklch(0.60 0.18 20);
|
|
479
|
-
--color-df-end-bg: oklch(0.28 0.08 20);
|
|
480
|
-
|
|
481
|
-
/* Edges - Soft pastels */
|
|
482
|
-
--color-df-edge-default: oklch(0.45 0.05 330);
|
|
483
|
-
--color-df-edge-default-hover: oklch(0.55 0.10 330);
|
|
484
|
-
--color-df-edge-choice-1: oklch(0.60 0.18 350);
|
|
485
|
-
--color-df-edge-choice-2: oklch(0.60 0.18 300);
|
|
486
|
-
--color-df-edge-choice-3: oklch(0.60 0.18 180);
|
|
487
|
-
--color-df-edge-choice-4: oklch(0.60 0.18 60);
|
|
488
|
-
--color-df-edge-choice-5: oklch(0.60 0.18 20);
|
|
489
|
-
--color-df-edge-loop: oklch(0.60 0.18 30);
|
|
490
|
-
--color-df-edge-dimmed: oklch(0.30 0.02 330);
|
|
491
|
-
|
|
492
|
-
/* Status */
|
|
493
|
-
--color-df-error: oklch(0.60 0.20 20);
|
|
494
|
-
--color-df-warning: oklch(0.70 0.18 70);
|
|
495
|
-
--color-df-success: oklch(0.60 0.18 150);
|
|
496
|
-
--color-df-info: oklch(0.60 0.18 220);
|
|
497
|
-
|
|
498
|
-
/* Text */
|
|
499
|
-
--color-df-text-primary: oklch(0.85 0.02 330);
|
|
500
|
-
--color-df-text-secondary: oklch(0.65 0.02 330);
|
|
501
|
-
--color-df-text-tertiary: oklch(0.50 0.02 330);
|
|
502
|
-
|
|
503
|
-
/* UI Controls */
|
|
504
|
-
--color-df-control-bg: oklch(0.20 0.02 340);
|
|
505
|
-
--color-df-control-border: oklch(0.40 0.05 330);
|
|
506
|
-
--color-df-control-hover: oklch(0.25 0.03 330);
|
|
507
|
-
|
|
508
|
-
/* Flags */
|
|
509
|
-
--color-df-flag-dialogue: oklch(0.50 0.05 330);
|
|
510
|
-
--color-df-flag-dialogue-bg: oklch(0.22 0.02 330);
|
|
511
|
-
--color-df-flag-quest: oklch(0.60 0.18 220);
|
|
512
|
-
--color-df-flag-quest-bg: oklch(0.25 0.08 220);
|
|
513
|
-
--color-df-flag-achievement: oklch(0.70 0.18 70);
|
|
514
|
-
--color-df-flag-achievement-bg: oklch(0.28 0.10 70);
|
|
515
|
-
--color-df-flag-item: oklch(0.60 0.18 150);
|
|
516
|
-
--color-df-flag-item-bg: oklch(0.25 0.08 150);
|
|
517
|
-
--color-df-flag-stat: oklch(0.60 0.18 300);
|
|
518
|
-
--color-df-flag-stat-bg: oklch(0.25 0.08 300);
|
|
519
|
-
--color-df-flag-title: oklch(0.60 0.18 350);
|
|
520
|
-
--color-df-flag-title-bg: oklch(0.25 0.08 350);
|
|
521
|
-
--color-df-flag-global: oklch(0.60 0.18 20);
|
|
522
|
-
--color-df-flag-global-bg: oklch(0.25 0.08 20);
|
|
523
|
-
|
|
524
|
-
/* Canvas */
|
|
525
|
-
--color-df-canvas-bg: oklch(0.15 0.01 330);
|
|
526
|
-
--color-df-canvas-grid: oklch(0.22 0.02 330);
|
|
527
|
-
|
|
528
|
-
/* Sidebar */
|
|
529
|
-
--color-df-sidebar-bg: oklch(0.20 0.02 340);
|
|
530
|
-
--color-df-sidebar-border: oklch(0.40 0.05 330);
|
|
531
|
-
--color-df-editor-bg: oklch(0.18 0.02 330);
|
|
532
|
-
--color-df-editor-border: oklch(0.40 0.05 330);
|
|
533
|
-
}
|
|
534
|
-
`,
|
|
535
|
-
},
|
|
536
|
-
};
|
|
537
|
-
|
|
538
|
-
export type ThemeId = keyof typeof themes;
|
|
539
|
-
|
|
540
|
-
interface ThemeSwitcherProps {
|
|
541
|
-
currentTheme?: ThemeId;
|
|
542
|
-
onThemeChange?: (themeId: ThemeId) => void;
|
|
543
|
-
}
|
|
544
|
-
|
|
545
|
-
export function ThemeSwitcher({ currentTheme = 'dark-fantasy', onThemeChange }: ThemeSwitcherProps) {
|
|
546
|
-
const [selectedTheme, setSelectedTheme] = useState<ThemeId>(currentTheme);
|
|
547
|
-
const [showMenu, setShowMenu] = useState(false);
|
|
548
|
-
|
|
549
|
-
useEffect(() => {
|
|
550
|
-
// Apply theme CSS by updating CSS variables in :root
|
|
551
|
-
const theme = themes[selectedTheme];
|
|
552
|
-
if (theme) {
|
|
553
|
-
// Extract CSS variable values from the theme CSS
|
|
554
|
-
const root = document.documentElement;
|
|
555
|
-
const matches = theme.css.matchAll(/--color-df-([\w-]+):\s*([^;]+);/g);
|
|
556
|
-
|
|
557
|
-
for (const match of matches) {
|
|
558
|
-
const varName = `--color-df-${match[1]}`;
|
|
559
|
-
const value = match[2].trim();
|
|
560
|
-
root.style.setProperty(varName, value);
|
|
561
|
-
}
|
|
562
|
-
}
|
|
563
|
-
}, [selectedTheme]);
|
|
564
|
-
|
|
565
|
-
const handleThemeChange = (themeId: ThemeId) => {
|
|
566
|
-
setSelectedTheme(themeId);
|
|
567
|
-
onThemeChange?.(themeId);
|
|
568
|
-
setShowMenu(false);
|
|
569
|
-
};
|
|
570
|
-
|
|
571
|
-
return (
|
|
572
|
-
<div className="relative">
|
|
573
|
-
<button
|
|
574
|
-
onClick={() => setShowMenu(!showMenu)}
|
|
575
|
-
className="p-1.5 bg-zinc-800 border border-zinc-700 rounded text-zinc-400 hover:text-white hover:border-zinc-600 transition-colors"
|
|
576
|
-
title="Change Theme"
|
|
577
|
-
>
|
|
578
|
-
<Palette size={14} />
|
|
579
|
-
</button>
|
|
580
|
-
|
|
581
|
-
{showMenu && (
|
|
582
|
-
<>
|
|
583
|
-
<div
|
|
584
|
-
className="fixed inset-0 z-40"
|
|
585
|
-
onClick={() => setShowMenu(false)}
|
|
586
|
-
/>
|
|
587
|
-
<div className="absolute right-0 top-full mt-2 z-50 bg-zinc-900 border border-zinc-700 rounded-lg shadow-xl p-1 min-w-[200px]">
|
|
588
|
-
<div className="px-3 py-1 text-[10px] text-zinc-500 uppercase border-b border-zinc-700">
|
|
589
|
-
Theme
|
|
590
|
-
</div>
|
|
591
|
-
{Object.entries(themes).map(([id, theme]) => (
|
|
592
|
-
<button
|
|
593
|
-
key={id}
|
|
594
|
-
onClick={() => handleThemeChange(id as ThemeId)}
|
|
595
|
-
className={`w-full text-left px-3 py-2 text-sm rounded transition-colors ${
|
|
596
|
-
selectedTheme === id
|
|
597
|
-
? 'bg-indigo-600/20 text-indigo-400'
|
|
598
|
-
: 'text-zinc-300 hover:bg-zinc-800'
|
|
599
|
-
}`}
|
|
600
|
-
>
|
|
601
|
-
<div className="font-medium">{theme.name}</div>
|
|
602
|
-
<div className="text-[10px] text-zinc-500 mt-0.5">{theme.description}</div>
|
|
603
|
-
</button>
|
|
604
|
-
))}
|
|
605
|
-
</div>
|
|
606
|
-
</>
|
|
607
|
-
)}
|
|
608
|
-
</div>
|
|
609
|
-
);
|
|
610
|
-
}
|
|
611
|
-
|
package/demo/next.config.mjs
DELETED
package/demo/package.json
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@magicborn/dialogue-forge-demo",
|
|
3
|
-
"version": "0.1.0",
|
|
4
|
-
"private": true,
|
|
5
|
-
"scripts": {
|
|
6
|
-
"dev": "next dev",
|
|
7
|
-
"build": "next build",
|
|
8
|
-
"start": "next start"
|
|
9
|
-
},
|
|
10
|
-
"dependencies": {
|
|
11
|
-
"@magicborn/dialogue-forge": "file:..",
|
|
12
|
-
"@magicborn/server-template": "file:../../packages-shared/server-template",
|
|
13
|
-
"next": "^16.0.9",
|
|
14
|
-
"react": "19.2.1",
|
|
15
|
-
"react-dom": "19.2.1",
|
|
16
|
-
"lucide-react": "^0.559.0",
|
|
17
|
-
"reactflow": "^11.11.4",
|
|
18
|
-
"react-tooltip": "^5.30.0"
|
|
19
|
-
},
|
|
20
|
-
"devDependencies": {
|
|
21
|
-
"@types/node": "^20",
|
|
22
|
-
"@types/react": "^19",
|
|
23
|
-
"@types/react-dom": "^19",
|
|
24
|
-
"typescript": "^5",
|
|
25
|
-
"tailwindcss": "^3.4.0",
|
|
26
|
-
"postcss": "^8.4.0",
|
|
27
|
-
"autoprefixer": "^10.4.0"
|
|
28
|
-
}
|
|
29
|
-
}
|
package/demo/postcss.config.mjs
DELETED
package/demo/public/logo.svg
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 96 96" role="img" aria-label="Dialogue Forge icon" preserveAspectRatio="xMidYMid meet">
|
|
2
|
-
<defs>
|
|
3
|
-
<style>
|
|
4
|
-
.ink{ fill:none; stroke:currentColor; stroke-width:6; stroke-linecap:round; stroke-linejoin:round; }
|
|
5
|
-
</style>
|
|
6
|
-
</defs>
|
|
7
|
-
|
|
8
|
-
<!-- Brackets -->
|
|
9
|
-
<path class="ink" d="M22 22v34c0 10 8 18 18 18h12"/>
|
|
10
|
-
<path class="ink" d="M74 22v34c0 10-8 18-18 18H44"/>
|
|
11
|
-
|
|
12
|
-
<!-- Construction bar -->
|
|
13
|
-
<path class="ink" d="M48 18v60"/>
|
|
14
|
-
</svg>
|
package/demo/styles/globals.css
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/* Import dialogue-forge theme - must be before @tailwind */
|
|
2
|
-
@import '../../src/styles/theme.css';
|
|
3
|
-
@import '../../src/styles/scrollbar.css';
|
|
4
|
-
|
|
5
|
-
@tailwind base;
|
|
6
|
-
@tailwind components;
|
|
7
|
-
@tailwind utilities;
|
|
8
|
-
|
|
9
|
-
:root {
|
|
10
|
-
--background: #0a0a0f;
|
|
11
|
-
--foreground: #e4e4e7;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
body {
|
|
15
|
-
color: var(--foreground);
|
|
16
|
-
background: var(--background);
|
|
17
|
-
font-family: system-ui, -apple-system, sans-serif;
|
|
18
|
-
}
|
|
19
|
-
|