summaryrefslogtreecommitdiff
path: root/ui/routes/(swatch)/.swatch/swatch
diff options
context:
space:
mode:
Diffstat (limited to 'ui/routes/(swatch)/.swatch/swatch')
-rw-r--r--ui/routes/(swatch)/.swatch/swatch/EventLog/+page.svelte13
1 files changed, 6 insertions, 7 deletions
diff --git a/ui/routes/(swatch)/.swatch/swatch/EventLog/+page.svelte b/ui/routes/(swatch)/.swatch/swatch/EventLog/+page.svelte
index a751ca3..eae0838 100644
--- a/ui/routes/(swatch)/.swatch/swatch/EventLog/+page.svelte
+++ b/ui/routes/(swatch)/.swatch/swatch/EventLog/+page.svelte
@@ -1,17 +1,16 @@
<script>
import EventCapture from '$lib/swatch/event-capture.svelte.js';
- import { json } from '$lib/swatch/derive.js';
+ import * as json from '$lib/swatch/json.js';
import EventLog from '$lib/components/swatch/EventLog.svelte';
let eventsInput = $state(
- JSON.stringify(
- [{ event: 'example', args: ['argument a', 'argument b'] }],
- /* replacer */ null,
- /* space */ 2,
- ),
+ json.encode([
+ { event: 'firstExample', args: ['argument a', 'argument b'] },
+ { event: 'secondExample', args: ['argument 1'] },
+ ]),
);
- let events = $derived(json(eventsInput));
+ let events = $derived(json.decode(eventsInput));
let capture = $state(new EventCapture());
const clear = capture.on('clear');