@archie/devtools 0.1.10 → 0.1.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -204,8 +204,1371 @@ function babelPluginDndAuto({ types: t }, opts = {}) {
204
204
  };
205
205
  }
206
206
 
207
+ // node_modules/@8base-archie/editor-protocol/dist/ids.js
208
+ var import_zod = require("zod");
209
+ var VID_ATTR = "data-vid";
210
+ var VID_PATTERN = /^[a-z0-9]{6,8}$/;
211
+ var Vid = import_zod.z.string().regex(VID_PATTERN);
212
+
213
+ // node_modules/@8base-archie/editor-protocol/dist/node-meta.js
214
+ var import_zod2 = require("zod");
215
+ var LockReasonSchema = import_zod2.z.enum([
216
+ "KIT_INTERNAL",
217
+ "DYNAMIC_ARRAY",
218
+ "DYNAMIC_CONDITIONAL",
219
+ "CHROME_STRUCTURAL",
220
+ "DATA_TABLE",
221
+ "EXPRESSION_CONTAINER"
222
+ ]);
223
+ var DynamicTypeSchema = import_zod2.z.enum(["STATIC", "ARRAY", "CONDITIONAL"]);
224
+ var ContainerKindSchema = import_zod2.z.enum(["plain", "expression", "none"]);
225
+ var NodeMetaSchema = import_zod2.z.object({
226
+ vid: Vid,
227
+ file: import_zod2.z.string().min(1),
228
+ component: import_zod2.z.string().min(1).optional(),
229
+ dynamicType: DynamicTypeSchema,
230
+ isKitOrigin: import_zod2.z.boolean(),
231
+ isChrome: import_zod2.z.boolean(),
232
+ containerKind: ContainerKindSchema,
233
+ lockReason: LockReasonSchema.optional(),
234
+ usageVid: Vid.optional(),
235
+ usageFile: import_zod2.z.string().min(1).optional()
236
+ }).strict();
237
+
238
+ // node_modules/@8base-archie/editor-protocol/dist/ops.js
239
+ var import_zod3 = require("zod");
240
+ var literalValue = import_zod3.z.union([import_zod3.z.string(), import_zod3.z.number(), import_zod3.z.boolean(), import_zod3.z.null()]);
241
+ var opScopeSchema = import_zod3.z.enum(["instance", "definition"]);
242
+ var setTextHintSchema = import_zod3.z.object({
243
+ rowId: import_zod3.z.string().min(1).optional(),
244
+ rendered: import_zod3.z.string().optional()
245
+ }).strict();
246
+ var setTextTargetSchema = import_zod3.z.enum(["auto", "data", "source"]);
247
+ var setTextOpSchema = import_zod3.z.object({
248
+ kind: import_zod3.z.literal("setText"),
249
+ vid: Vid,
250
+ text: import_zod3.z.string(),
251
+ hint: setTextHintSchema.optional(),
252
+ scope: opScopeSchema.optional(),
253
+ target: setTextTargetSchema.optional()
254
+ }).strict();
255
+ var setClassNameOpSchema = import_zod3.z.object({
256
+ kind: import_zod3.z.literal("setClassName"),
257
+ vid: Vid,
258
+ add: import_zod3.z.array(import_zod3.z.string()),
259
+ remove: import_zod3.z.array(import_zod3.z.string()),
260
+ policy: import_zod3.z.enum(["static", "cn"]),
261
+ scope: opScopeSchema.optional()
262
+ }).strict();
263
+ var setStyleOpSchema = import_zod3.z.object({
264
+ kind: import_zod3.z.literal("setStyle"),
265
+ vid: Vid,
266
+ decls: import_zod3.z.record(import_zod3.z.string(), import_zod3.z.union([import_zod3.z.string(), import_zod3.z.null()])),
267
+ scope: opScopeSchema.optional(),
268
+ important: import_zod3.z.boolean().optional()
269
+ }).strict();
270
+ var setAttributeOpSchema = import_zod3.z.object({
271
+ kind: import_zod3.z.literal("setAttribute"),
272
+ vid: Vid,
273
+ name: import_zod3.z.string().min(1),
274
+ value: import_zod3.z.union([import_zod3.z.string(), import_zod3.z.null()])
275
+ }).strict();
276
+ var setPropOpSchema = import_zod3.z.object({
277
+ kind: import_zod3.z.literal("setProp"),
278
+ vid: Vid,
279
+ name: import_zod3.z.string().min(1),
280
+ literal: literalValue,
281
+ scope: opScopeSchema.optional()
282
+ }).strict();
283
+ var removeOpSchema = import_zod3.z.object({
284
+ kind: import_zod3.z.literal("remove"),
285
+ vid: Vid
286
+ }).strict();
287
+ var detachInstanceOpSchema = import_zod3.z.object({
288
+ kind: import_zod3.z.literal("detachInstance"),
289
+ vid: Vid
290
+ }).strict();
291
+ var setLocalConstOpSchema = import_zod3.z.object({
292
+ kind: import_zod3.z.literal("setLocalConst"),
293
+ file: import_zod3.z.string().min(1),
294
+ name: import_zod3.z.string().min(1),
295
+ literal: import_zod3.z.string()
296
+ }).strict();
297
+ var screenRootTargetSchema = import_zod3.z.object({ file: import_zod3.z.string().min(1) }).strict();
298
+ var EXACTLY_ONE_TARGET_MESSAGE = "exactly one of containerVid or screenRoot is required";
299
+ function hasExactlyOneTarget(v) {
300
+ return v.containerVid != null !== (v.screenRoot != null);
301
+ }
302
+ var moveOpSchema = import_zod3.z.object({
303
+ kind: import_zod3.z.literal("move"),
304
+ targetVid: Vid,
305
+ containerVid: Vid.optional(),
306
+ screenRoot: screenRootTargetSchema.optional(),
307
+ index: import_zod3.z.number().int().nonnegative()
308
+ }).strict();
309
+ var insertSourceSchema = import_zod3.z.union([
310
+ import_zod3.z.object({ paletteId: import_zod3.z.string().min(1) }).strict(),
311
+ import_zod3.z.object({ snippet: import_zod3.z.string().min(1) }).strict()
312
+ ]);
313
+ var insertOpSchema = import_zod3.z.object({
314
+ kind: import_zod3.z.literal("insert"),
315
+ containerVid: Vid.optional(),
316
+ screenRoot: screenRootTargetSchema.optional(),
317
+ index: import_zod3.z.number().int().nonnegative(),
318
+ source: insertSourceSchema,
319
+ proposedVids: import_zod3.z.array(Vid).optional()
320
+ }).strict();
321
+ var resizeOpSchema = import_zod3.z.object({
322
+ kind: import_zod3.z.literal("resize"),
323
+ vid: Vid,
324
+ width: import_zod3.z.number().optional(),
325
+ height: import_zod3.z.number().optional()
326
+ }).strict();
327
+ var shellConfigOpSchema = import_zod3.z.object({
328
+ kind: import_zod3.z.literal("shellConfig"),
329
+ patch: import_zod3.z.record(import_zod3.z.string(), import_zod3.z.unknown())
330
+ }).strict();
331
+ var sliceCellOpSchema = import_zod3.z.object({
332
+ kind: import_zod3.z.literal("sliceCell"),
333
+ slug: import_zod3.z.string().min(1),
334
+ entity: import_zod3.z.string().min(1),
335
+ rowId: import_zod3.z.string().min(1),
336
+ field: import_zod3.z.string().min(1),
337
+ value: literalValue
338
+ }).strict();
339
+ var LUCIDE_ICON_NAME_RE = /^[A-Z][A-Za-z0-9]*$/;
340
+ var MAX_SVG_ICON_LENGTH = 2e4;
341
+ var SVG_SINGLE_ROOT_RE = /^<svg\b[^>]*(?:\/>|>[\s\S]*<\/svg>)\s*$/i;
342
+ function isSingleSvgRoot(svg) {
343
+ if (!SVG_SINGLE_ROOT_RE.test(svg))
344
+ return false;
345
+ const openCount = (svg.match(/<svg\b/gi) ?? []).length;
346
+ const closeCount = (svg.match(/<\/svg>/gi) ?? []).length;
347
+ return openCount === 1 && closeCount <= 1;
348
+ }
349
+ var SVG_FORBIDDEN_CHAR_RE = /[&%]/;
350
+ var SVG_FORBIDDEN_MARKUP_RE = /<!|<\?/;
351
+ var SVG_FORBIDDEN_ATTR_RE = /\b(?:href|xlink:href|src|style)\s*=|\bon[a-zA-Z-]+\s*=/i;
352
+ var SVG_FORBIDDEN_SCHEME_RE = /\b(?:data|javascript):|url\(/i;
353
+ var SVG_FORBIDDEN_TAG_RE = /<\/?\s*(?:script|style|foreignobject|iframe|object|embed|use|image|a|animate\w*|set)\b/i;
354
+ function isForbiddenSvg(svg) {
355
+ return SVG_FORBIDDEN_CHAR_RE.test(svg) || SVG_FORBIDDEN_MARKUP_RE.test(svg) || SVG_FORBIDDEN_ATTR_RE.test(svg) || SVG_FORBIDDEN_SCHEME_RE.test(svg) || SVG_FORBIDDEN_TAG_RE.test(svg);
356
+ }
357
+ var setIconValueSchema = import_zod3.z.discriminatedUnion("kind", [
358
+ import_zod3.z.object({
359
+ kind: import_zod3.z.literal("lucide"),
360
+ name: import_zod3.z.string().min(1).max(64).regex(LUCIDE_ICON_NAME_RE, "lucide icon name must be a PascalCase identifier")
361
+ }).strict(),
362
+ import_zod3.z.object({
363
+ kind: import_zod3.z.literal("svg"),
364
+ svg: import_zod3.z.string().min(1).max(MAX_SVG_ICON_LENGTH).trim().refine((svg) => isSingleSvgRoot(svg), "svg must be a single <svg>\u2026</svg> (or self-closing <svg/>) root element").refine((svg) => !isForbiddenSvg(svg), "svg must not contain &, %, a comment/CDATA/DOCTYPE/processing instruction, an href/xlink:href/src/style attribute, an on* event handler, a data:/javascript: URL, a url(), or a script/style/foreignObject/iframe/object/embed/use/image/a/animate*/set element")
365
+ }).strict()
366
+ ]);
367
+ var setIconOpSchema = import_zod3.z.object({
368
+ kind: import_zod3.z.literal("setIcon"),
369
+ vid: Vid,
370
+ icon: setIconValueSchema
371
+ }).strict();
372
+ var OpSchema = import_zod3.z.discriminatedUnion("kind", [
373
+ setTextOpSchema,
374
+ setClassNameOpSchema,
375
+ setStyleOpSchema,
376
+ setAttributeOpSchema,
377
+ setPropOpSchema,
378
+ removeOpSchema,
379
+ setLocalConstOpSchema,
380
+ moveOpSchema,
381
+ insertOpSchema,
382
+ resizeOpSchema,
383
+ shellConfigOpSchema,
384
+ sliceCellOpSchema,
385
+ setIconOpSchema,
386
+ detachInstanceOpSchema
387
+ ]).superRefine((op, ctx) => {
388
+ if ((op.kind === "move" || op.kind === "insert") && !hasExactlyOneTarget(op)) {
389
+ ctx.addIssue({ code: import_zod3.z.ZodIssueCode.custom, message: EXACTLY_ONE_TARGET_MESSAGE, path: ["containerVid"] });
390
+ }
391
+ });
392
+ var OpLogSchema = import_zod3.z.array(OpSchema).min(1);
393
+
394
+ // node_modules/@8base-archie/editor-protocol/dist/apply-ops.js
395
+ var import_zod4 = require("zod");
396
+ var RefusalCodeSchema = import_zod4.z.enum([
397
+ "VID_NOT_FOUND",
398
+ "CONTAINER_NOT_PLAIN",
399
+ "KIT_INTERNAL",
400
+ "CHROME_STRUCTURAL",
401
+ "DYNAMIC_CHILD",
402
+ "STALE_BASE",
403
+ "GATE_REJECT",
404
+ "STYLE_UNMAPPABLE",
405
+ "DIALECT_UNSUPPORTED",
406
+ "COMPUTED_VALUE",
407
+ "PROP_BOUND",
408
+ "STATE_BOUND",
409
+ "ORIGIN_AMBIGUOUS",
410
+ "NOT_DETACHABLE"
411
+ ]);
412
+ var TextTargetSchema = import_zod4.z.discriminatedUnion("kind", [
413
+ import_zod4.z.object({ kind: import_zod4.z.literal("source") }).strict(),
414
+ import_zod4.z.object({
415
+ kind: import_zod4.z.literal("slice"),
416
+ entity: import_zod4.z.string().min(1),
417
+ rowId: import_zod4.z.string().min(1),
418
+ field: import_zod4.z.string().min(1),
419
+ slugs: import_zod4.z.array(import_zod4.z.string().min(1)).min(1)
420
+ }).strict()
421
+ ]);
422
+ var ApplyOpsFileRefSchema = import_zod4.z.object({
423
+ path: import_zod4.z.string().min(1),
424
+ baseSourceHash: import_zod4.z.string().min(1)
425
+ }).strict();
426
+ var ApplyOpsRequestSchema = import_zod4.z.object({
427
+ projectId: import_zod4.z.string().min(1),
428
+ protocolVersion: import_zod4.z.string().min(1),
429
+ dialect: import_zod4.z.enum(["kit-d", "vite-tsx"]),
430
+ files: import_zod4.z.array(ApplyOpsFileRefSchema).min(1),
431
+ baseRevisionId: import_zod4.z.string().min(1),
432
+ ops: import_zod4.z.array(OpSchema).min(1),
433
+ clientOpLogId: import_zod4.z.string().min(1)
434
+ }).strict();
435
+ var ApplyOpsFileResultSchema = import_zod4.z.object({
436
+ path: import_zod4.z.string().min(1),
437
+ newSource: import_zod4.z.string(),
438
+ sourceHash: import_zod4.z.string().min(1)
439
+ }).strict();
440
+ var RefusedOpSchema = import_zod4.z.object({
441
+ opIndex: import_zod4.z.number().int().nonnegative(),
442
+ code: RefusalCodeSchema,
443
+ cause: import_zod4.z.string(),
444
+ vid: Vid.optional()
445
+ }).strict();
446
+ var AppliedTargetSchema = import_zod4.z.object({
447
+ opIndex: import_zod4.z.number().int().nonnegative(),
448
+ target: TextTargetSchema
449
+ }).strict();
450
+ var PropagationFailureSchema = import_zod4.z.object({
451
+ slug: import_zod4.z.string().min(1),
452
+ code: RefusalCodeSchema,
453
+ cause: import_zod4.z.string()
454
+ }).strict();
455
+ var DetachedComponentNodeSchema = import_zod4.z.object({
456
+ vid: Vid,
457
+ templateVid: Vid.optional(),
458
+ slot: import_zod4.z.string().min(1).optional()
459
+ }).strict();
460
+ var DetachedComponentSchema = import_zod4.z.object({
461
+ vid: Vid,
462
+ component: import_zod4.z.string().min(1),
463
+ nodes: import_zod4.z.array(DetachedComponentNodeSchema)
464
+ }).strict();
465
+ var PropagationStatusSchema = import_zod4.z.object({
466
+ jobId: import_zod4.z.string().min(1),
467
+ status: import_zod4.z.enum(["pending", "done", "failed"]),
468
+ slugs: import_zod4.z.array(import_zod4.z.string().min(1)),
469
+ failed: import_zod4.z.array(PropagationFailureSchema).optional(),
470
+ revisionId: import_zod4.z.string().min(1).optional()
471
+ }).strict();
472
+ var ApplyOpsPropagationSchema = import_zod4.z.object({
473
+ status: import_zod4.z.enum(["pending", "done", "failed"]),
474
+ jobId: import_zod4.z.string().min(1),
475
+ slugs: import_zod4.z.array(import_zod4.z.string().min(1)),
476
+ failed: import_zod4.z.array(PropagationFailureSchema).optional()
477
+ }).strict();
478
+ var ApplyOpsResponseSchema = import_zod4.z.object({
479
+ revisionId: import_zod4.z.string().min(1),
480
+ files: import_zod4.z.array(ApplyOpsFileResultSchema),
481
+ vidMap: import_zod4.z.record(import_zod4.z.string(), import_zod4.z.string()),
482
+ applied: import_zod4.z.array(import_zod4.z.number().int().nonnegative()),
483
+ refused: import_zod4.z.array(RefusedOpSchema),
484
+ gateFindings: import_zod4.z.array(import_zod4.z.unknown()),
485
+ appliedTargets: import_zod4.z.array(AppliedTargetSchema).optional(),
486
+ stylesheetChanged: import_zod4.z.boolean().optional(),
487
+ propagation: ApplyOpsPropagationSchema.optional(),
488
+ detached: import_zod4.z.array(DetachedComponentSchema).optional()
489
+ }).strict();
490
+
491
+ // node_modules/@8base-archie/editor-protocol/dist/capabilities.js
492
+ var import_zod5 = require("zod");
493
+ var CapabilitiesSchema = import_zod5.z.object({
494
+ inspect: import_zod5.z.boolean(),
495
+ dndMove: import_zod5.z.boolean(),
496
+ dndResize: import_zod5.z.boolean(),
497
+ vidIdentity: import_zod5.z.boolean(),
498
+ nodeMeta: import_zod5.z.boolean(),
499
+ hostControlledHistory: import_zod5.z.boolean(),
500
+ refusals: import_zod5.z.boolean(),
501
+ selectByVid: import_zod5.z.boolean().optional()
502
+ }).strict();
503
+
504
+ // node_modules/@8base-archie/editor-protocol/dist/runtime-messages.js
505
+ var import_zod6 = require("zod");
506
+ var SourceSchema = import_zod6.z.enum(["archie-devtools", "archie-app"]);
507
+ var RectSchema = import_zod6.z.object({
508
+ x: import_zod6.z.number(),
509
+ y: import_zod6.z.number(),
510
+ width: import_zod6.z.number(),
511
+ height: import_zod6.z.number()
512
+ }).strict();
513
+ var helloMessageSchema = import_zod6.z.object({
514
+ source: SourceSchema,
515
+ type: import_zod6.z.literal("HELLO"),
516
+ protocolVersion: import_zod6.z.string().min(1),
517
+ devtoolsVersion: import_zod6.z.string().min(1),
518
+ capabilities: CapabilitiesSchema
519
+ }).strict();
520
+ var elementSelectedMessageSchema = import_zod6.z.object({
521
+ source: SourceSchema,
522
+ type: import_zod6.z.literal("ELEMENT_SELECTED"),
523
+ vid: Vid,
524
+ nodeMeta: NodeMetaSchema,
525
+ rect: RectSchema.optional()
526
+ }).strict();
527
+ var dragStartMessageSchema = import_zod6.z.object({
528
+ source: SourceSchema,
529
+ type: import_zod6.z.literal("DRAG_START"),
530
+ targetVid: Vid,
531
+ droppable: import_zod6.z.array(Vid)
532
+ }).strict();
533
+ var dropMessageSchema = import_zod6.z.object({
534
+ source: SourceSchema,
535
+ type: import_zod6.z.literal("DROP"),
536
+ targetVid: Vid,
537
+ containerVid: Vid,
538
+ screenRootFile: import_zod6.z.string().min(1).optional(),
539
+ index: import_zod6.z.number().int().nonnegative()
540
+ }).strict();
541
+ var refusedMessageSchema = import_zod6.z.object({
542
+ source: SourceSchema,
543
+ type: import_zod6.z.literal("REFUSED"),
544
+ code: import_zod6.z.union([RefusalCodeSchema, LockReasonSchema]),
545
+ cause: import_zod6.z.string(),
546
+ vid: Vid.optional()
547
+ }).strict();
548
+ var RuntimeMessageSchema = import_zod6.z.discriminatedUnion("type", [
549
+ helloMessageSchema,
550
+ elementSelectedMessageSchema,
551
+ dragStartMessageSchema,
552
+ dropMessageSchema,
553
+ refusedMessageSchema
554
+ ]);
555
+ var selectMessageSchema = import_zod6.z.object({
556
+ source: SourceSchema,
557
+ type: import_zod6.z.literal("SELECT"),
558
+ vid: Vid
559
+ }).strict();
560
+ var previewOpMessageSchema = import_zod6.z.object({
561
+ source: SourceSchema,
562
+ type: import_zod6.z.literal("PREVIEW_OP"),
563
+ op: OpSchema
564
+ }).strict();
565
+ var setModeMessageSchema = import_zod6.z.object({
566
+ source: SourceSchema,
567
+ type: import_zod6.z.literal("SET_MODE"),
568
+ mode: import_zod6.z.enum(["inspect", "design", "off"])
569
+ }).strict();
570
+ var HostMessageSchema = import_zod6.z.discriminatedUnion("type", [
571
+ selectMessageSchema,
572
+ previewOpMessageSchema,
573
+ setModeMessageSchema
574
+ ]);
575
+
576
+ // node_modules/@8base-archie/editor-protocol/dist/style-capabilities.js
577
+ function stripImportant(cls) {
578
+ if (cls.endsWith("!"))
579
+ return cls.slice(0, -1);
580
+ if (cls.startsWith("!"))
581
+ return cls.slice(1);
582
+ return cls;
583
+ }
584
+ var SPACING_PX_TO_UNIT = {
585
+ 0: "0",
586
+ 1: "px",
587
+ 2: "0.5",
588
+ 4: "1",
589
+ 6: "1.5",
590
+ 8: "2",
591
+ 10: "2.5",
592
+ 12: "3",
593
+ 14: "3.5",
594
+ 16: "4",
595
+ 20: "5",
596
+ 24: "6",
597
+ 28: "7",
598
+ 32: "8",
599
+ 36: "9",
600
+ 40: "10",
601
+ 44: "11",
602
+ 48: "12",
603
+ 56: "14",
604
+ 64: "16",
605
+ 80: "20",
606
+ 96: "24"
607
+ };
608
+ var FONT_SIZE_PX = {
609
+ 12: "xs",
610
+ 14: "sm",
611
+ 16: "base",
612
+ 18: "lg",
613
+ 20: "xl",
614
+ 24: "2xl",
615
+ 30: "3xl",
616
+ 36: "4xl",
617
+ 48: "5xl"
618
+ };
619
+ var TEXT_SIZE_STEPS = /* @__PURE__ */ new Set(["xs", "sm", "base", "lg", "xl"]);
620
+ function isTextSizeClass(rawCls) {
621
+ const cls = stripImportant(rawCls);
622
+ if (!cls.startsWith("text-"))
623
+ return false;
624
+ const rest = cls.slice(5);
625
+ return TEXT_SIZE_STEPS.has(rest) || /^[0-9]+xl$/.test(rest) || /^\[[^\]]+px\]$/.test(rest);
626
+ }
627
+ var TEXT_ALIGN_STEPS = /* @__PURE__ */ new Set([
628
+ "left",
629
+ "center",
630
+ "right",
631
+ "justify",
632
+ "start",
633
+ "end"
634
+ ]);
635
+ function isTextAlignClass(rawCls) {
636
+ const cls = stripImportant(rawCls);
637
+ return cls.startsWith("text-") && TEXT_ALIGN_STEPS.has(cls.slice(5));
638
+ }
639
+ var TEXT_OVERFLOW_STEPS = /* @__PURE__ */ new Set([
640
+ "ellipsis",
641
+ "clip",
642
+ "wrap",
643
+ "nowrap",
644
+ "balance",
645
+ "pretty"
646
+ ]);
647
+ function isTextColorClass(rawCls) {
648
+ const cls = stripImportant(rawCls);
649
+ return cls.startsWith("text-") && !isTextSizeClass(cls) && !isTextAlignClass(cls) && !TEXT_OVERFLOW_STEPS.has(cls.slice(5));
650
+ }
651
+ var BG_UTILITY_VALUES = /* @__PURE__ */ new Set([
652
+ "cover",
653
+ "contain",
654
+ "auto",
655
+ "center",
656
+ "top",
657
+ "bottom",
658
+ "left",
659
+ "right",
660
+ "repeat",
661
+ "no-repeat",
662
+ "repeat-x",
663
+ "repeat-y",
664
+ "fixed",
665
+ "local",
666
+ "scroll",
667
+ "none",
668
+ "clip-border",
669
+ "clip-padding",
670
+ "clip-content",
671
+ "clip-text",
672
+ "origin-border",
673
+ "origin-padding",
674
+ "origin-content"
675
+ ]);
676
+ function isBgUtilityClass(rawCls) {
677
+ const cls = stripImportant(rawCls);
678
+ return BG_UTILITY_VALUES.has(cls.slice(3)) || /^bg-\[url\(/.test(cls);
679
+ }
680
+ function isBgColorClass(rawCls) {
681
+ const cls = stripImportant(rawCls);
682
+ return cls.startsWith("bg-") && !isBgUtilityClass(cls);
683
+ }
684
+ var BORDER_STYLE_VALUES = /* @__PURE__ */ new Set(["solid", "dashed", "dotted", "double", "hidden", "none"]);
685
+ var BORDER_WIDTH_SIDE = /^([trblxy])(?:-(?:0|2|4|8))?$/;
686
+ function isBorderWidthClass(rawCls) {
687
+ const cls = stripImportant(rawCls);
688
+ if (!cls.startsWith("border-"))
689
+ return false;
690
+ const rest = cls.slice(7);
691
+ if (rest === "0" || rest === "2" || rest === "4" || rest === "8")
692
+ return true;
693
+ return BORDER_WIDTH_SIDE.test(rest);
694
+ }
695
+ function isBorderStyleClass(rawCls) {
696
+ const cls = stripImportant(rawCls);
697
+ return cls.startsWith("border-") && BORDER_STYLE_VALUES.has(cls.slice(7));
698
+ }
699
+ function isBorderColorClass(rawCls) {
700
+ const cls = stripImportant(rawCls);
701
+ return cls.startsWith("border-") && !isBorderWidthClass(cls) && !isBorderStyleClass(cls);
702
+ }
703
+ function prefixMatcher(prefix) {
704
+ return (cls) => stripImportant(cls).startsWith(prefix);
705
+ }
706
+ function exactMatcher(...values) {
707
+ const set = new Set(values);
708
+ return (cls) => set.has(stripImportant(cls));
709
+ }
710
+ function anyMatcher(...matchers) {
711
+ return (cls) => matchers.some((m) => m(cls));
712
+ }
713
+ var PROP_MATCHERS = {
714
+ color: isTextColorClass,
715
+ background: isBgColorClass,
716
+ backgroundColor: isBgColorClass,
717
+ padding: prefixMatcher("p-"),
718
+ paddingTop: prefixMatcher("pt-"),
719
+ paddingRight: prefixMatcher("pr-"),
720
+ paddingBottom: prefixMatcher("pb-"),
721
+ paddingLeft: prefixMatcher("pl-"),
722
+ // negative-margin classes are `-`-PREFIXED (`spacingClass` puts the sign
723
+ // ahead of the property, e.g. `-mt-4`), not `-`-suffixed on the property —
724
+ // a plain `prefixMatcher('mt-')` never matches `-mt-4`, so a subsequent
725
+ // clear left a dangling negative margin. Each margin matcher accepts both
726
+ // forms.
727
+ margin: anyMatcher(prefixMatcher("m-"), prefixMatcher("-m-")),
728
+ marginTop: anyMatcher(prefixMatcher("mt-"), prefixMatcher("-mt-")),
729
+ marginRight: anyMatcher(prefixMatcher("mr-"), prefixMatcher("-mr-")),
730
+ marginBottom: anyMatcher(prefixMatcher("mb-"), prefixMatcher("-mb-")),
731
+ marginLeft: anyMatcher(prefixMatcher("ml-"), prefixMatcher("-ml-")),
732
+ gap: prefixMatcher("gap-"),
733
+ width: prefixMatcher("w-"),
734
+ height: prefixMatcher("h-"),
735
+ fontSize: isTextSizeClass,
736
+ // exact, not prefix: `font-sans`/`font-serif`/`font-mono` share the same
737
+ // `font-` prefix for FAMILY, a property `mapStyleDeclToClass` never
738
+ // touches — a prefix match would sweep those off on a `fontWeight` clear.
739
+ fontWeight: exactMatcher("font-thin", "font-extralight", "font-light", "font-normal", "font-medium", "font-semibold", "font-bold", "font-extrabold", "font-black"),
740
+ borderColor: isBorderColorClass,
741
+ borderRadius: anyMatcher(exactMatcher("rounded"), prefixMatcher("rounded-")),
742
+ display: exactMatcher("block", "inline-block", "inline", "flex", "inline-flex", "grid", "hidden"),
743
+ flexDirection: exactMatcher("flex-col", "flex-row"),
744
+ alignItems: prefixMatcher("items-"),
745
+ justifyContent: prefixMatcher("justify-"),
746
+ textAlign: isTextAlignClass
747
+ };
748
+ var SPACING_PX_STEPS = Object.keys(SPACING_PX_TO_UNIT).map(Number).sort((a, b) => a - b);
749
+ var FONT_SIZE_PX_STEPS = Object.keys(FONT_SIZE_PX).map(Number).sort((a, b) => a - b);
750
+
751
+ // node_modules/@8base-archie/editor-protocol/dist/component-usages.js
752
+ var import_zod7 = require("zod");
753
+ var ComponentUsageSchema = import_zod7.z.object({
754
+ slug: import_zod7.z.string().min(1),
755
+ file: import_zod7.z.string().min(1),
756
+ vid: Vid
757
+ }).strict();
758
+ var ComponentUsagesSchema = import_zod7.z.object({
759
+ file: import_zod7.z.string().min(1),
760
+ component: import_zod7.z.string().min(1),
761
+ count: import_zod7.z.number().int().nonnegative(),
762
+ usages: import_zod7.z.array(ComponentUsageSchema)
763
+ }).strict();
764
+
765
+ // node_modules/@8base-archie/editor-protocol/dist/palette-catalog.js
766
+ var PALETTE_CATALOG = [
767
+ {
768
+ id: "button",
769
+ group: "common",
770
+ snippet: `<button className="inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground shadow hover:bg-primary/90 transition-colors">Button</button>`
771
+ },
772
+ {
773
+ id: "container",
774
+ group: "common",
775
+ snippet: `<div className="flex flex-col gap-4 p-4"></div>`
776
+ },
777
+ {
778
+ id: "heading-1",
779
+ group: "common",
780
+ snippet: `<h1 className="text-4xl font-bold tracking-tight text-foreground">Heading</h1>`
781
+ },
782
+ {
783
+ id: "heading-2",
784
+ group: "common",
785
+ snippet: `<h2 className="text-3xl font-semibold tracking-tight text-foreground">Heading</h2>`
786
+ },
787
+ {
788
+ id: "heading-3",
789
+ group: "common",
790
+ snippet: `<h3 className="text-2xl font-semibold text-foreground">Heading</h3>`
791
+ },
792
+ {
793
+ id: "paragraph",
794
+ group: "common",
795
+ snippet: `<p className="text-base leading-7 text-foreground">Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>`
796
+ },
797
+ {
798
+ id: "typography",
799
+ group: "common",
800
+ snippet: `<span className="text-sm leading-6 text-foreground">Text content</span>`
801
+ },
802
+ {
803
+ id: "link",
804
+ group: "common",
805
+ snippet: `<a href="#" className="text-primary underline-offset-4 hover:underline">Link text</a>`
806
+ },
807
+ {
808
+ id: "image",
809
+ group: "common",
810
+ snippet: `<img src="https://placehold.co/600x400" alt="Placeholder" className="h-auto w-full rounded-lg" />`
811
+ },
812
+ {
813
+ id: "divider",
814
+ group: "common",
815
+ snippet: `<hr className="my-6 border-t border-border" />`
816
+ },
817
+ {
818
+ id: "list-unordered",
819
+ group: "common",
820
+ snippet: `<ul className="list-disc space-y-2 pl-6 text-foreground"><li>First item</li><li>Second item</li><li>Third item</li></ul>`
821
+ },
822
+ {
823
+ id: "list-ordered",
824
+ group: "common",
825
+ snippet: `<ol className="list-decimal space-y-2 pl-6 text-foreground"><li>First item</li><li>Second item</li><li>Third item</li></ol>`
826
+ },
827
+ {
828
+ id: "badge",
829
+ group: "common",
830
+ snippet: `<span className="inline-flex items-center rounded-md border border-transparent bg-primary px-2.5 py-0.5 text-xs font-semibold text-primary-foreground shadow">Badge</span>`
831
+ },
832
+ {
833
+ id: "code",
834
+ group: "common",
835
+ snippet: `<code className="rounded bg-muted px-1.5 py-0.5 font-mono text-sm text-foreground">code</code>`
836
+ },
837
+ {
838
+ id: "blockquote",
839
+ group: "common",
840
+ snippet: `<blockquote className="border-l-4 border-border pl-4 italic text-muted-foreground">Quoted text goes here.</blockquote>`
841
+ },
842
+ {
843
+ id: "header",
844
+ group: "layout",
845
+ snippet: `<header className="flex items-center justify-between border-b border-border bg-background px-6 py-4">
846
+ <span className="text-lg font-bold text-foreground">Logo</span>
847
+ <nav className="flex gap-6 text-sm text-muted-foreground">
848
+ <a href="#" className="hover:text-foreground transition-colors">Home</a>
849
+ <a href="#" className="hover:text-foreground transition-colors">About</a>
850
+ </nav>
851
+ </header>`
852
+ },
853
+ {
854
+ id: "footer",
855
+ group: "layout",
856
+ snippet: `<footer className="border-t border-border bg-background px-6 py-12">
857
+ <div className="flex flex-col items-center gap-6 md:flex-row md:justify-between">
858
+ <p className="text-sm text-muted-foreground">\xA9 2025 Company Name. All rights reserved.</p>
859
+ <nav className="flex gap-6">
860
+ <a href="#" className="text-sm text-muted-foreground hover:text-foreground transition-colors">Privacy</a>
861
+ <a href="#" className="text-sm text-muted-foreground hover:text-foreground transition-colors">Terms</a>
862
+ <a href="#" className="text-sm text-muted-foreground hover:text-foreground transition-colors">Contact</a>
863
+ </nav>
864
+ </div>
865
+ </footer>`
866
+ },
867
+ {
868
+ id: "card",
869
+ group: "layout",
870
+ snippet: `<div className="rounded-xl border border-border bg-card text-card-foreground shadow">
871
+ <div className="flex flex-col space-y-1.5 p-6">
872
+ <h3 className="text-lg font-semibold leading-none tracking-tight">Card Title</h3>
873
+ <p className="text-sm text-muted-foreground">Card description goes here.</p>
874
+ </div>
875
+ </div>`
876
+ },
877
+ {
878
+ id: "paper",
879
+ group: "layout",
880
+ snippet: `<div className="rounded-lg bg-muted/50 p-6 shadow-sm"></div>`
881
+ },
882
+ {
883
+ id: "menu",
884
+ group: "layout",
885
+ snippet: `<ul className="flex flex-col rounded-md border border-border bg-popover py-1 text-sm text-popover-foreground shadow-md">
886
+ <li className="px-3 py-2 hover:bg-accent hover:text-accent-foreground cursor-pointer transition-colors">Item one</li>
887
+ <li className="px-3 py-2 hover:bg-accent hover:text-accent-foreground cursor-pointer transition-colors">Item two</li>
888
+ <li className="px-3 py-2 hover:bg-accent hover:text-accent-foreground cursor-pointer transition-colors">Item three</li>
889
+ </ul>`
890
+ },
891
+ {
892
+ id: "popper",
893
+ group: "layout",
894
+ snippet: `<div className="w-64 rounded-md border border-border bg-popover p-4 text-popover-foreground shadow-md">
895
+ <p className="text-sm font-medium">Popper title</p>
896
+ <p className="mt-1 text-xs text-muted-foreground">Floating content goes here.</p>
897
+ </div>`
898
+ },
899
+ {
900
+ id: "navbar",
901
+ group: "layout",
902
+ snippet: `<nav className="flex items-center justify-between border-b border-border bg-background px-6 py-4">
903
+ <span className="text-lg font-bold text-foreground">Logo</span>
904
+ <div className="flex items-center gap-6">
905
+ <a href="#" className="text-sm text-muted-foreground hover:text-foreground transition-colors">Home</a>
906
+ <a href="#" className="text-sm text-muted-foreground hover:text-foreground transition-colors">Features</a>
907
+ <a href="#" className="text-sm text-muted-foreground hover:text-foreground transition-colors">Pricing</a>
908
+ <button className="inline-flex items-center justify-center rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground shadow hover:bg-primary/90 transition-colors">Sign Up</button>
909
+ </div>
910
+ </nav>`
911
+ },
912
+ {
913
+ id: "grid-2",
914
+ group: "layout",
915
+ snippet: `<div className="grid grid-cols-1 gap-4 md:grid-cols-2"></div>`
916
+ },
917
+ {
918
+ id: "grid-3",
919
+ group: "layout",
920
+ snippet: `<div className="grid grid-cols-1 gap-4 md:grid-cols-3"></div>`
921
+ },
922
+ {
923
+ id: "table",
924
+ group: "layout",
925
+ snippet: `<table className="w-full border-collapse text-sm text-foreground">
926
+ <thead className="border-b border-border bg-muted/50">
927
+ <tr>
928
+ <th className="px-3 py-2 text-left font-medium text-muted-foreground">Name</th>
929
+ <th className="px-3 py-2 text-left font-medium text-muted-foreground">Status</th>
930
+ </tr>
931
+ </thead>
932
+ <tbody>
933
+ <tr className="border-b border-border">
934
+ <td className="px-3 py-2">Item one</td>
935
+ <td className="px-3 py-2 text-muted-foreground">Active</td>
936
+ </tr>
937
+ </tbody>
938
+ </table>`
939
+ },
940
+ {
941
+ id: "form-block",
942
+ group: "form",
943
+ snippet: `<form className="flex flex-col gap-4">
944
+ <div className="flex flex-col gap-1.5">
945
+ <label className="text-sm font-medium leading-none text-foreground">Label</label>
946
+ <input type="text" placeholder="Enter value" className="flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm text-foreground shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring" />
947
+ </div>
948
+ <button type="submit" className="inline-flex h-9 items-center justify-center self-start rounded-md bg-primary px-4 text-sm font-medium text-primary-foreground shadow hover:bg-primary/90 transition-colors">Submit</button>
949
+ </form>`
950
+ },
951
+ {
952
+ id: "form-text-field",
953
+ group: "form",
954
+ snippet: `<input type="text" placeholder="Enter text..." className="flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm text-foreground shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring" />`
955
+ },
956
+ {
957
+ id: "form-textarea",
958
+ group: "form",
959
+ snippet: `<textarea placeholder="Enter text..." rows="4" className="flex w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm text-foreground shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring"></textarea>`
960
+ },
961
+ {
962
+ id: "form-checkbox",
963
+ group: "form",
964
+ snippet: `<label className="inline-flex items-center gap-2 text-sm text-foreground">
965
+ <span className="peer flex h-4 w-4 shrink-0 items-center justify-center rounded-sm border border-primary bg-primary text-primary-foreground shadow"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="3" strokeLinecap="round" strokeLinejoin="round" className="h-3 w-3"><polyline points="20 6 9 17 4 12"></polyline></svg></span>
966
+ <span>Accept terms</span>
967
+ </label>`
968
+ },
969
+ {
970
+ id: "form-switch",
971
+ group: "form",
972
+ snippet: `<label className="inline-flex items-center gap-2 text-sm text-foreground">
973
+ <span className="peer inline-flex h-5 w-9 shrink-0 items-center rounded-full border-2 border-transparent bg-primary shadow-sm transition-colors">
974
+ <span className="pointer-events-none block h-4 w-4 translate-x-4 rounded-full bg-background shadow-lg ring-0 transition-transform"></span>
975
+ </span>
976
+ <span>Enable</span>
977
+ </label>`
978
+ },
979
+ {
980
+ id: "form-radio-group",
981
+ group: "form",
982
+ snippet: `<div className="flex flex-col gap-2 text-sm text-foreground" role="radiogroup">
983
+ <label className="inline-flex items-center gap-2">
984
+ <span className="aspect-square h-4 w-4 rounded-full border border-primary bg-background text-primary shadow flex items-center justify-center"><span className="h-2 w-2 rounded-full bg-primary"></span></span>
985
+ <span>Option A</span>
986
+ </label>
987
+ <label className="inline-flex items-center gap-2">
988
+ <span className="aspect-square h-4 w-4 rounded-full border border-primary bg-background shadow"></span>
989
+ <span>Option B</span>
990
+ </label>
991
+ <label className="inline-flex items-center gap-2">
992
+ <span className="aspect-square h-4 w-4 rounded-full border border-primary bg-background shadow"></span>
993
+ <span>Option C</span>
994
+ </label>
995
+ </div>`
996
+ },
997
+ {
998
+ id: "form-select",
999
+ group: "form",
1000
+ snippet: `<button type="button" className="flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm text-foreground shadow-sm focus:outline-none focus:ring-1 focus:ring-ring">
1001
+ <span>Option one</span>
1002
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" className="h-4 w-4 opacity-50"><path d="m6 9 6 6 6-6" /></svg>
1003
+ </button>`
1004
+ },
1005
+ {
1006
+ id: "form-slider",
1007
+ group: "form",
1008
+ snippet: `<span className="relative flex w-full touch-none select-none items-center">
1009
+ <span className="relative h-1.5 w-full grow overflow-hidden rounded-full bg-primary/20">
1010
+ <span className="absolute h-full bg-primary" style={{ width: '50%' }}></span>
1011
+ </span>
1012
+ <span className="block h-4 w-4 rounded-full border border-primary/50 bg-background shadow transition-colors" style={{ position: 'absolute', left: '50%', transform: 'translateX(-50%)' }}></span>
1013
+ </span>`
1014
+ },
1015
+ {
1016
+ id: "form-date-picker",
1017
+ group: "form",
1018
+ snippet: `<input type="date" className="flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm text-foreground shadow-sm focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring" />`
1019
+ },
1020
+ {
1021
+ id: "form-time-picker",
1022
+ group: "form",
1023
+ snippet: `<input type="time" className="flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm text-foreground shadow-sm focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring" />`
1024
+ },
1025
+ {
1026
+ id: "form-search",
1027
+ group: "form",
1028
+ snippet: `<input type="search" placeholder="Search..." className="flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm text-foreground shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring" />`
1029
+ },
1030
+ {
1031
+ id: "form-file-upload",
1032
+ group: "form",
1033
+ snippet: `<input type="file" className="flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm text-foreground shadow-sm file:mr-3 file:rounded-md file:border-0 file:bg-secondary file:px-3 file:py-1 file:text-sm file:font-medium file:text-secondary-foreground" />`
1034
+ },
1035
+ {
1036
+ id: "kit-hero",
1037
+ group: "archie-kit",
1038
+ snippet: `<section className="relative overflow-hidden rounded-2xl border border-border bg-card px-8 py-16 md:px-12 md:py-20 md:grid md:grid-cols-2 md:items-center md:gap-10">
1039
+ <div>
1040
+ <div className="mb-3 text-xs font-semibold uppercase tracking-[0.2em] text-primary">New Release</div>
1041
+ <h1 className="text-4xl font-extrabold leading-[1.05] tracking-tight text-foreground md:text-6xl">Launch products your team will love</h1>
1042
+ <p className="mt-5 max-w-xl text-lg leading-relaxed text-muted-foreground md:text-xl">A single workspace for planning, building, and shipping \u2014 without the busywork that usually gets in the way.</p>
1043
+ <div className="mt-8 flex flex-wrap gap-3">
1044
+ <button className="inline-flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm font-medium transition-colors bg-primary text-primary-foreground hover:bg-primary/90">Get started</button>
1045
+ <button className="inline-flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm font-medium transition-colors border border-border bg-transparent hover:bg-muted">Book a demo</button>
1046
+ </div>
1047
+ </div>
1048
+ <div className="mt-10 md:mt-0">
1049
+ <figure className="">
1050
+ <div className="relative overflow-hidden bg-muted rounded-lg" style={{ aspectRatio: '16/9', backgroundImage: 'linear-gradient(135deg, hsl(var(--chart-1) / 0.92), hsl(var(--chart-3) / 0.65))' }}></div>
1051
+ </figure>
1052
+ </div>
1053
+ </section>`
1054
+ },
1055
+ {
1056
+ id: "kit-page-header",
1057
+ group: "archie-kit",
1058
+ snippet: `<div className="flex items-end justify-between gap-4 mb-6">
1059
+ <div>
1060
+ <div className="text-xs font-medium uppercase tracking-wider text-muted-foreground">Projects</div>
1061
+ <h1 className="text-3xl font-extrabold tracking-tight">Acme Onboarding</h1>
1062
+ <p className="mt-1 text-muted-foreground">Track setup tasks and milestones for the Acme rollout.</p>
1063
+ </div>
1064
+ <div className="flex gap-2">
1065
+ <button className="inline-flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm font-medium transition-colors border border-border bg-transparent hover:bg-muted">Export</button>
1066
+ <button className="inline-flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm font-medium transition-colors bg-primary text-primary-foreground hover:bg-primary/90">New task</button>
1067
+ </div>
1068
+ </div>`
1069
+ },
1070
+ {
1071
+ id: "kit-section",
1072
+ group: "archie-kit",
1073
+ snippet: `<div className="rounded-lg border border-border bg-card text-card-foreground shadow-sm mb-6">
1074
+ <div className="flex flex-row items-center justify-between gap-1 px-5 pt-5 pb-3">
1075
+ <div>
1076
+ <h3 className="text-base font-semibold tracking-tight">Recent activity</h3>
1077
+ <p className="text-sm text-muted-foreground">The latest updates across this project.</p>
1078
+ </div>
1079
+ <button className="inline-flex items-center justify-center gap-2 rounded-md h-7 px-2 text-xs font-medium transition-colors hover:bg-muted">View all</button>
1080
+ </div>
1081
+ <div className="px-5 pb-5">
1082
+ <p className="text-sm text-muted-foreground">No activity has been logged in the last 24 hours.</p>
1083
+ </div>
1084
+ </div>`
1085
+ },
1086
+ {
1087
+ id: "kit-card",
1088
+ group: "archie-kit",
1089
+ snippet: `<div className="rounded-lg border border-border bg-card text-card-foreground shadow-sm">
1090
+ <div className="flex flex-col gap-1 px-5 pt-5 pb-3">
1091
+ <h3 className="text-base font-semibold tracking-tight">Storage usage</h3>
1092
+ <p className="text-sm text-muted-foreground">How much of your plan's storage is in use.</p>
1093
+ </div>
1094
+ <div className="px-5 pb-5">
1095
+ <p className="text-sm">42.3 GB of 100 GB used across 3 workspaces.</p>
1096
+ </div>
1097
+ </div>`
1098
+ },
1099
+ {
1100
+ id: "kit-status-badge",
1101
+ group: "archie-kit",
1102
+ snippet: `<span className="inline-flex items-center gap-1.5 rounded-full px-2.5 py-0.5 text-xs font-medium bg-success/15 text-success">
1103
+ <span className="h-1.5 w-1.5 rounded-full bg-current"></span>
1104
+ Active
1105
+ </span>`
1106
+ },
1107
+ {
1108
+ id: "kit-data-table",
1109
+ group: "archie-kit",
1110
+ snippet: `<div>
1111
+ <div className="mb-3 flex items-center justify-between gap-2">
1112
+ <div className="relative">
1113
+ <svg className="pointer-events-none absolute left-2.5 top-2.5 text-muted-foreground" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"><circle cx="11" cy="11" r="8"></circle><path d="m21 21-4.3-4.3"></path></svg>
1114
+ <input value="" placeholder="Search\u2026" className="w-64 rounded-md border border-input bg-background py-1.5 pl-8 pr-3 text-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring" />
1115
+ </div>
1116
+ <button className="inline-flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm font-medium transition-colors bg-primary text-primary-foreground hover:bg-primary/90">
1117
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"><path d="M5 12h14"></path><path d="M12 5v14"></path></svg>
1118
+ New order
1119
+ </button>
1120
+ </div>
1121
+ <div className="overflow-x-auto">
1122
+ <table className="w-full text-sm">
1123
+ <thead>
1124
+ <tr className="border-b border-border text-left text-xs uppercase tracking-wider text-muted-foreground">
1125
+ <th scope="col" className="pb-2 font-medium cursor-pointer select-none">Order</th>
1126
+ <th scope="col" className="pb-2 font-medium cursor-pointer select-none">Customer</th>
1127
+ <th scope="col" className="pb-2 font-medium cursor-pointer select-none">Status</th>
1128
+ <th scope="col" className="pb-2 font-medium cursor-pointer select-none text-right">Amount</th>
1129
+ <th scope="col" className="pb-2 font-medium text-right">Actions</th>
1130
+ </tr>
1131
+ </thead>
1132
+ <tbody>
1133
+ <tr className="border-b border-border/60 transition-colors hover:bg-muted/40">
1134
+ <td className="py-3 font-mono tabular-nums">ORD-1044</td>
1135
+ <td className="py-3">Acme Corp</td>
1136
+ <td className="py-3"><span className="inline-flex items-center gap-1.5 rounded-full px-2.5 py-0.5 text-xs font-medium bg-success/15 text-success"><span className="h-1.5 w-1.5 rounded-full bg-current"></span>Paid</span></td>
1137
+ <td className="py-3 font-mono tabular-nums text-right">$1,240.00</td>
1138
+ <td className="py-3 text-right"><div className="inline-flex gap-1"><button className="inline-flex items-center justify-center gap-2 rounded-md h-7 px-2 text-xs font-medium transition-colors hover:bg-muted">View</button></div></td>
1139
+ </tr>
1140
+ <tr className="border-b border-border/60 transition-colors hover:bg-muted/40">
1141
+ <td className="py-3 font-mono tabular-nums">ORD-1043</td>
1142
+ <td className="py-3">Globex Inc</td>
1143
+ <td className="py-3"><span className="inline-flex items-center gap-1.5 rounded-full px-2.5 py-0.5 text-xs font-medium bg-primary/15 text-primary"><span className="h-1.5 w-1.5 rounded-full bg-current"></span>Pending</span></td>
1144
+ <td className="py-3 font-mono tabular-nums text-right">$860.00</td>
1145
+ <td className="py-3 text-right"><div className="inline-flex gap-1"><button className="inline-flex items-center justify-center gap-2 rounded-md h-7 px-2 text-xs font-medium transition-colors hover:bg-muted">View</button></div></td>
1146
+ </tr>
1147
+ <tr className="border-b border-border/60 transition-colors hover:bg-muted/40">
1148
+ <td className="py-3 font-mono tabular-nums">ORD-1042</td>
1149
+ <td className="py-3">Initech</td>
1150
+ <td className="py-3"><span className="inline-flex items-center gap-1.5 rounded-full px-2.5 py-0.5 text-xs font-medium bg-destructive/15 text-destructive"><span className="h-1.5 w-1.5 rounded-full bg-current"></span>Overdue</span></td>
1151
+ <td className="py-3 font-mono tabular-nums text-right">$2,150.00</td>
1152
+ <td className="py-3 text-right"><div className="inline-flex gap-1"><button className="inline-flex items-center justify-center gap-2 rounded-md h-7 px-2 text-xs font-medium transition-colors hover:bg-muted">View</button></div></td>
1153
+ </tr>
1154
+ <tr className="border-b border-border/60 transition-colors hover:bg-muted/40">
1155
+ <td className="py-3 font-mono tabular-nums">ORD-1041</td>
1156
+ <td className="py-3">Umbrella LLC</td>
1157
+ <td className="py-3"><span className="inline-flex items-center gap-1.5 rounded-full px-2.5 py-0.5 text-xs font-medium bg-success/15 text-success"><span className="h-1.5 w-1.5 rounded-full bg-current"></span>Paid</span></td>
1158
+ <td className="py-3 font-mono tabular-nums text-right">$430.00</td>
1159
+ <td className="py-3 text-right"><div className="inline-flex gap-1"><button className="inline-flex items-center justify-center gap-2 rounded-md h-7 px-2 text-xs font-medium transition-colors hover:bg-muted">View</button></div></td>
1160
+ </tr>
1161
+ </tbody>
1162
+ </table>
1163
+ </div>
1164
+ </div>`
1165
+ },
1166
+ {
1167
+ id: "kit-spec-grid",
1168
+ group: "archie-kit",
1169
+ snippet: `<div className="rounded-lg border border-border bg-card text-card-foreground shadow-sm">
1170
+ <div className="p-5">
1171
+ <dl className="grid grid-cols-1 gap-x-6 gap-y-4 sm:grid-cols-2 lg:grid-cols-3">
1172
+ <div>
1173
+ <dt className="text-xs uppercase tracking-wider text-muted-foreground">Order ID</dt>
1174
+ <dd className="mt-1 font-mono tabular-nums">ORD-1044</dd>
1175
+ </div>
1176
+ <div>
1177
+ <dt className="text-xs uppercase tracking-wider text-muted-foreground">Customer</dt>
1178
+ <dd className="mt-1 font-medium">Acme Corp</dd>
1179
+ </div>
1180
+ <div>
1181
+ <dt className="text-xs uppercase tracking-wider text-muted-foreground">Amount</dt>
1182
+ <dd className="mt-1 font-mono tabular-nums">$1,240.00</dd>
1183
+ </div>
1184
+ <div>
1185
+ <dt className="text-xs uppercase tracking-wider text-muted-foreground">Placed on</dt>
1186
+ <dd className="mt-1 font-medium">Mar 4, 2026</dd>
1187
+ </div>
1188
+ </dl>
1189
+ </div>
1190
+ </div>`
1191
+ },
1192
+ {
1193
+ id: "kit-timeline",
1194
+ group: "archie-kit",
1195
+ snippet: `<div className="rounded-lg border border-border bg-card text-card-foreground shadow-sm">
1196
+ <div className="p-5">
1197
+ <ol className="space-y-4">
1198
+ <li className="flex gap-3">
1199
+ <span className="mt-1.5 h-2 w-2 shrink-0 rounded-full bg-primary"></span>
1200
+ <div>
1201
+ <div className="text-xs text-muted-foreground">Mar 4, 2026 \xB7 Sarah Chen</div>
1202
+ <div className="text-sm">Marked the order as paid.</div>
1203
+ </div>
1204
+ </li>
1205
+ <li className="flex gap-3">
1206
+ <span className="mt-1.5 h-2 w-2 shrink-0 rounded-full bg-primary"></span>
1207
+ <div>
1208
+ <div className="text-xs text-muted-foreground">Mar 3, 2026 \xB7 System</div>
1209
+ <div className="text-sm">Invoice #4471 sent to customer.</div>
1210
+ </div>
1211
+ </li>
1212
+ <li className="flex gap-3">
1213
+ <span className="mt-1.5 h-2 w-2 shrink-0 rounded-full bg-primary"></span>
1214
+ <div>
1215
+ <div className="text-xs text-muted-foreground">Mar 1, 2026 \xB7 Diego Ramirez</div>
1216
+ <div className="text-sm">Order created from quote Q-2201.</div>
1217
+ </div>
1218
+ </li>
1219
+ </ol>
1220
+ </div>
1221
+ </div>`
1222
+ },
1223
+ {
1224
+ id: "kit-form-field",
1225
+ group: "archie-kit",
1226
+ snippet: `<label className="block text-sm">
1227
+ <span className="font-medium">Email address</span>
1228
+ <input type="email" placeholder="you@company.com" className="mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring" />
1229
+ <span className="mt-1 block text-xs text-muted-foreground">We'll never share your email with anyone else.</span>
1230
+ </label>`
1231
+ },
1232
+ {
1233
+ id: "kit-dialog",
1234
+ group: "archie-kit",
1235
+ snippet: `<div className="fixed inset-0 z-[1050] flex items-center justify-center" role="dialog" aria-modal="true">
1236
+ <div className="absolute inset-0 bg-black/50"></div>
1237
+ <div className="relative w-full max-w-md rounded-lg border border-border bg-card shadow-lg p-6">
1238
+ <h2 className="text-lg font-semibold">Create contact</h2>
1239
+ <p className="mt-1 text-sm text-muted-foreground">Add a new contact to this project.</p>
1240
+ <div className="mt-4 space-y-3">
1241
+ <label className="block text-sm">
1242
+ <span className="font-medium">Full name</span>
1243
+ <input className="mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring" value="" />
1244
+ </label>
1245
+ <label className="block text-sm">
1246
+ <span className="font-medium">Email</span>
1247
+ <input className="mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring" value="" />
1248
+ </label>
1249
+ </div>
1250
+ <div className="mt-5 flex justify-end gap-2">
1251
+ <button className="inline-flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm font-medium transition-colors border border-border bg-transparent hover:bg-muted">Cancel</button>
1252
+ <button className="inline-flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm font-medium transition-colors bg-primary text-primary-foreground hover:bg-primary/90">Create</button>
1253
+ </div>
1254
+ </div>
1255
+ </div>`
1256
+ },
1257
+ {
1258
+ id: "kit-figure",
1259
+ group: "archie-kit",
1260
+ snippet: `<figure>
1261
+ <div className="relative overflow-hidden bg-muted rounded-lg" style={{ aspectRatio: '16/9', backgroundImage: 'linear-gradient(135deg, hsl(var(--chart-2) / 0.92), hsl(var(--chart-4) / 0.65))' }}></div>
1262
+ <figcaption className="mt-2 text-sm text-muted-foreground">Product screenshot, dashboard overview.</figcaption>
1263
+ </figure>`
1264
+ },
1265
+ {
1266
+ id: "kit-article",
1267
+ group: "archie-kit",
1268
+ snippet: `<article className="max-w-[65ch] text-[1.0625rem] leading-[1.75] text-foreground">
1269
+ <div className="mb-2 text-xs font-semibold uppercase tracking-[0.2em] text-primary">Engineering</div>
1270
+ <h1 className="mb-4 text-3xl font-extrabold tracking-tight text-foreground md:text-4xl">Why we rebuilt our onboarding flow</h1>
1271
+ <p className="mb-6 text-xl leading-relaxed text-muted-foreground">A look at the research, the tradeoffs, and what shipped after three months of iteration.</p>
1272
+
1273
+ <p className="mb-5 first-letter:float-left first-letter:mr-3 first-letter:text-[3.4em] first-letter:font-bold first-letter:leading-[0.72] first-letter:text-primary">Onboarding is the first real conversation a new customer has with a product, and for years ours said the wrong things. Teams dropped off before ever seeing the value we'd promised them.</p>
1274
+ <p className="mb-5">We started by mapping every step a customer took in their first week, then cut anything that didn't lead directly to their first success moment.</p>
1275
+
1276
+ <h2 className="mt-8 mb-2 text-2xl font-bold tracking-tight text-foreground">What changed</h2>
1277
+ <p className="mb-5">The new flow leans on progressive disclosure: ask for less up front, and surface advanced options only once a team is ready for them.</p>
1278
+ <ul className="mb-5 list-disc pl-6">
1279
+ <li className="my-1.5">Reduced required setup fields from 12 to 4</li>
1280
+ <li className="my-1.5">Replaced the tour modal with inline, contextual tips</li>
1281
+ <li className="my-1.5">Added a visible progress indicator across every step</li>
1282
+ </ul>
1283
+
1284
+ <blockquote className="my-7 border-l-[3px] border-primary py-1 pl-5 text-[1.375rem] italic leading-normal text-foreground">
1285
+ The best onboarding doesn't feel like onboarding \u2014 it feels like the product already worked.
1286
+ <cite className="mt-2 block text-sm not-italic text-muted-foreground">\u2014 Head of Product</cite>
1287
+ </blockquote>
1288
+ </article>`
1289
+ },
1290
+ {
1291
+ id: "kit-empty-state",
1292
+ group: "archie-kit",
1293
+ snippet: `<div className="py-10 text-center">
1294
+ <div className="text-sm font-medium">No records</div>
1295
+ <div className="mt-1 text-sm text-muted-foreground">Nothing here yet \u2014 new items will show up as they're created.</div>
1296
+ </div>`
1297
+ },
1298
+ {
1299
+ id: "kit-doc-nav",
1300
+ group: "archie-kit",
1301
+ snippet: `<nav aria-label="Documentation" className="text-sm">
1302
+ <div className="mb-3 px-2 text-xs font-semibold uppercase tracking-wider text-muted-foreground">Documentation</div>
1303
+ <div className="mb-4">
1304
+ <div className="px-2 pb-1 text-xs font-semibold uppercase tracking-wider text-muted-foreground">Getting Started</div>
1305
+ <a href="#" aria-current="page" className="block rounded-md px-2 py-1.5 bg-primary/10 font-medium text-primary transition-colors">Introduction</a>
1306
+ <a href="#" className="block rounded-md px-2 py-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground">Installation</a>
1307
+ <a href="#" className="block rounded-md px-2 py-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground">Quick Start</a>
1308
+ </div>
1309
+ <div className="mb-4">
1310
+ <div className="px-2 pb-1 text-xs font-semibold uppercase tracking-wider text-muted-foreground">Guides</div>
1311
+ <a href="#" className="block rounded-md px-2 py-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground">Authentication</a>
1312
+ <a href="#" className="block rounded-md px-2 py-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground">Deployment</a>
1313
+ <a href="#" className="block rounded-md px-2 py-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground">Webhooks</a>
1314
+ </div>
1315
+ </nav>`
1316
+ },
1317
+ {
1318
+ id: "hero-section",
1319
+ group: "templates",
1320
+ snippet: `<section className="flex flex-col items-center justify-center gap-6 bg-background px-6 py-24 text-center">
1321
+ <h1 className="text-5xl font-bold tracking-tight text-foreground">Welcome to Our Platform</h1>
1322
+ <p className="max-w-2xl text-lg text-muted-foreground">A brief description of your product or service that captures attention and drives action.</p>
1323
+ <div className="flex gap-4">
1324
+ <button className="inline-flex h-11 items-center justify-center rounded-md bg-primary px-8 text-sm font-medium text-primary-foreground shadow hover:bg-primary/90 transition-colors">Get Started</button>
1325
+ <button className="inline-flex h-11 items-center justify-center rounded-md border border-input bg-background px-8 text-sm font-medium text-foreground shadow-sm hover:bg-accent hover:text-accent-foreground transition-colors">Learn More</button>
1326
+ </div>
1327
+ </section>`
1328
+ },
1329
+ {
1330
+ id: "feature-card",
1331
+ group: "templates",
1332
+ snippet: `<div className="overflow-hidden rounded-xl border border-border bg-card text-card-foreground shadow-sm">
1333
+ <img src="https://placehold.co/400x200" alt="Card image" className="h-48 w-full object-cover" />
1334
+ <div className="p-6">
1335
+ <h3 className="text-lg font-semibold leading-none tracking-tight">Card Title</h3>
1336
+ <p className="mt-2 text-sm text-muted-foreground">A short description that provides context about this card's content.</p>
1337
+ </div>
1338
+ </div>`
1339
+ },
1340
+ {
1341
+ id: "feature-grid",
1342
+ group: "templates",
1343
+ snippet: `<section className="bg-background px-6 py-16">
1344
+ <h2 className="mb-12 text-center text-3xl font-bold text-foreground">Features</h2>
1345
+ <div className="grid grid-cols-1 gap-8 md:grid-cols-3">
1346
+ <div className="flex flex-col items-center text-center">
1347
+ <div className="mb-4 flex h-12 w-12 items-center justify-center rounded-full bg-primary/10 text-primary">\u2726</div>
1348
+ <h3 className="text-lg font-semibold text-foreground">Feature One</h3>
1349
+ <p className="mt-2 text-sm text-muted-foreground">Brief description of this feature and its benefits.</p>
1350
+ </div>
1351
+ <div className="flex flex-col items-center text-center">
1352
+ <div className="mb-4 flex h-12 w-12 items-center justify-center rounded-full bg-primary/10 text-primary">\u2726</div>
1353
+ <h3 className="text-lg font-semibold text-foreground">Feature Two</h3>
1354
+ <p className="mt-2 text-sm text-muted-foreground">Brief description of this feature and its benefits.</p>
1355
+ </div>
1356
+ <div className="flex flex-col items-center text-center">
1357
+ <div className="mb-4 flex h-12 w-12 items-center justify-center rounded-full bg-primary/10 text-primary">\u2726</div>
1358
+ <h3 className="text-lg font-semibold text-foreground">Feature Three</h3>
1359
+ <p className="mt-2 text-sm text-muted-foreground">Brief description of this feature and its benefits.</p>
1360
+ </div>
1361
+ </div>
1362
+ </section>`
1363
+ },
1364
+ {
1365
+ id: "cta-banner",
1366
+ group: "templates",
1367
+ snippet: `<section className="rounded-2xl bg-primary px-6 py-16 text-center text-primary-foreground">
1368
+ <h2 className="text-3xl font-bold">Ready to Get Started?</h2>
1369
+ <p className="mx-auto mt-4 max-w-xl text-lg opacity-90">Join thousands of users who are already building amazing things.</p>
1370
+ <button className="mt-8 inline-flex h-11 items-center justify-center rounded-md bg-background px-8 text-sm font-medium text-foreground shadow hover:bg-background/90 transition-colors">Start Free Trial</button>
1371
+ </section>`
1372
+ },
1373
+ {
1374
+ id: "pricing-card",
1375
+ group: "templates",
1376
+ snippet: `<div className="rounded-xl border border-border bg-card p-8 text-card-foreground shadow-sm">
1377
+ <h3 className="text-lg font-semibold">Pro Plan</h3>
1378
+ <div className="mt-4 flex items-baseline gap-1">
1379
+ <span className="text-4xl font-bold text-foreground">$29</span>
1380
+ <span className="text-muted-foreground">/month</span>
1381
+ </div>
1382
+ <ul className="mt-6 space-y-3 text-sm text-muted-foreground">
1383
+ <li className="flex items-center gap-2"><span className="text-primary">\u2713</span> Unlimited projects</li>
1384
+ <li className="flex items-center gap-2"><span className="text-primary">\u2713</span> Priority support</li>
1385
+ <li className="flex items-center gap-2"><span className="text-primary">\u2713</span> Advanced analytics</li>
1386
+ <li className="flex items-center gap-2"><span className="text-primary">\u2713</span> Custom integrations</li>
1387
+ </ul>
1388
+ <button className="mt-8 inline-flex h-11 w-full items-center justify-center rounded-md bg-primary text-sm font-medium text-primary-foreground shadow hover:bg-primary/90 transition-colors">Choose Plan</button>
1389
+ </div>`
1390
+ },
1391
+ {
1392
+ id: "testimonial",
1393
+ group: "templates",
1394
+ snippet: `<div className="rounded-xl border border-border bg-card p-8 text-card-foreground">
1395
+ <p className="italic text-foreground">"This product has completely transformed how we work. The team is more productive and our clients are happier."</p>
1396
+ <div className="mt-6 flex items-center gap-3">
1397
+ <div className="h-10 w-10 rounded-full bg-muted"></div>
1398
+ <div>
1399
+ <p className="text-sm font-semibold text-foreground">Jane Smith</p>
1400
+ <p className="text-xs text-muted-foreground">CEO, Acme Corp</p>
1401
+ </div>
1402
+ </div>
1403
+ </div>`
1404
+ },
1405
+ {
1406
+ id: "footer-template",
1407
+ group: "templates",
1408
+ snippet: `<footer className="border-t border-border bg-background px-6 py-12">
1409
+ <div className="flex flex-col items-center gap-6 md:flex-row md:justify-between">
1410
+ <p className="text-sm text-muted-foreground">\xA9 2025 Company Name. All rights reserved.</p>
1411
+ <nav className="flex gap-6">
1412
+ <a href="#" className="text-sm text-muted-foreground hover:text-foreground transition-colors">Privacy</a>
1413
+ <a href="#" className="text-sm text-muted-foreground hover:text-foreground transition-colors">Terms</a>
1414
+ <a href="#" className="text-sm text-muted-foreground hover:text-foreground transition-colors">Contact</a>
1415
+ </nav>
1416
+ </div>
1417
+ </footer>`
1418
+ },
1419
+ {
1420
+ id: "navbar-template",
1421
+ group: "templates",
1422
+ snippet: `<nav className="flex items-center justify-between border-b border-border bg-background px-6 py-4">
1423
+ <span className="text-lg font-bold text-foreground">Logo</span>
1424
+ <div className="flex items-center gap-6">
1425
+ <a href="#" className="text-sm text-muted-foreground hover:text-foreground transition-colors">Home</a>
1426
+ <a href="#" className="text-sm text-muted-foreground hover:text-foreground transition-colors">Features</a>
1427
+ <a href="#" className="text-sm text-muted-foreground hover:text-foreground transition-colors">Pricing</a>
1428
+ <button className="inline-flex h-9 items-center justify-center rounded-md bg-primary px-4 text-sm font-medium text-primary-foreground shadow hover:bg-primary/90 transition-colors">Sign Up</button>
1429
+ </div>
1430
+ </nav>`
1431
+ },
1432
+ {
1433
+ id: "shadcn-button",
1434
+ group: "shadcn",
1435
+ snippet: "<Button>Button</Button>",
1436
+ importRequirements: [{ module: "@/components/ui/button", named: ["Button"] }]
1437
+ },
1438
+ {
1439
+ id: "shadcn-icon-button-delete",
1440
+ group: "shadcn",
1441
+ snippet: '<Button variant="outline" size="icon"><Trash2 className="h-4 w-4" /></Button>',
1442
+ importRequirements: [
1443
+ { module: "@/components/ui/button", named: ["Button"] },
1444
+ { module: "lucide-react", named: ["Trash2"] }
1445
+ ]
1446
+ },
1447
+ {
1448
+ id: "shadcn-badge",
1449
+ group: "shadcn",
1450
+ snippet: `<Badge>Badge</Badge>`,
1451
+ importRequirements: [
1452
+ { module: "@/components/ui/badge", named: ["Badge"] }
1453
+ ]
1454
+ },
1455
+ {
1456
+ id: "shadcn-card",
1457
+ group: "shadcn",
1458
+ snippet: `<Card>
1459
+ <CardHeader>
1460
+ <CardTitle>Card Title</CardTitle>
1461
+ <CardDescription>Card description goes here.</CardDescription>
1462
+ </CardHeader>
1463
+ </Card>`,
1464
+ importRequirements: [
1465
+ { module: "@/components/ui/card", named: ["Card", "CardHeader", "CardTitle", "CardDescription"] }
1466
+ ]
1467
+ },
1468
+ {
1469
+ id: "shadcn-form-text-field",
1470
+ group: "shadcn",
1471
+ snippet: `<Input type="text" placeholder="Enter text..." />`,
1472
+ importRequirements: [
1473
+ { module: "@/components/ui/input", named: ["Input"] }
1474
+ ]
1475
+ },
1476
+ {
1477
+ id: "shadcn-form-textarea",
1478
+ group: "shadcn",
1479
+ snippet: `<Textarea placeholder="Enter text..." rows={4} />`,
1480
+ importRequirements: [
1481
+ { module: "@/components/ui/textarea", named: ["Textarea"] }
1482
+ ]
1483
+ },
1484
+ {
1485
+ id: "shadcn-form-checkbox",
1486
+ group: "shadcn",
1487
+ snippet: `<div className="flex items-center gap-2">
1488
+ <Checkbox id="terms" defaultChecked />
1489
+ <label htmlFor="terms" className="text-sm font-medium leading-none">Accept terms</label>
1490
+ </div>`,
1491
+ importRequirements: [
1492
+ { module: "@/components/ui/checkbox", named: ["Checkbox"] }
1493
+ ]
1494
+ },
1495
+ {
1496
+ id: "shadcn-form-switch",
1497
+ group: "shadcn",
1498
+ snippet: `<div className="flex items-center gap-2">
1499
+ <Switch id="enable" defaultChecked />
1500
+ <label htmlFor="enable" className="text-sm font-medium leading-none">Enable</label>
1501
+ </div>`,
1502
+ importRequirements: [
1503
+ { module: "@/components/ui/switch", named: ["Switch"] }
1504
+ ]
1505
+ },
1506
+ {
1507
+ id: "shadcn-form-radio-group",
1508
+ group: "shadcn",
1509
+ snippet: `<RadioGroup defaultValue="a" className="flex flex-col gap-2">
1510
+ <div className="flex items-center gap-2">
1511
+ <RadioGroupItem value="a" id="opt-a" />
1512
+ <label htmlFor="opt-a" className="text-sm font-medium leading-none">Option A</label>
1513
+ </div>
1514
+ <div className="flex items-center gap-2">
1515
+ <RadioGroupItem value="b" id="opt-b" />
1516
+ <label htmlFor="opt-b" className="text-sm font-medium leading-none">Option B</label>
1517
+ </div>
1518
+ <div className="flex items-center gap-2">
1519
+ <RadioGroupItem value="c" id="opt-c" />
1520
+ <label htmlFor="opt-c" className="text-sm font-medium leading-none">Option C</label>
1521
+ </div>
1522
+ </RadioGroup>`,
1523
+ importRequirements: [
1524
+ { module: "@/components/ui/radio-group", named: ["RadioGroup", "RadioGroupItem"] }
1525
+ ]
1526
+ },
1527
+ {
1528
+ id: "shadcn-form-select",
1529
+ group: "shadcn",
1530
+ snippet: `<Select defaultValue="one">
1531
+ <SelectTrigger className="w-full">
1532
+ <SelectValue placeholder="Select an option" />
1533
+ </SelectTrigger>
1534
+ <SelectContent>
1535
+ <SelectItem value="one">Option one</SelectItem>
1536
+ <SelectItem value="two">Option two</SelectItem>
1537
+ <SelectItem value="three">Option three</SelectItem>
1538
+ </SelectContent>
1539
+ </Select>`,
1540
+ importRequirements: [
1541
+ { module: "@/components/ui/select", named: ["Select", "SelectContent", "SelectItem", "SelectTrigger", "SelectValue"] }
1542
+ ]
1543
+ },
1544
+ {
1545
+ id: "shadcn-form-slider",
1546
+ group: "shadcn",
1547
+ snippet: `<Slider defaultValue={[50]} max={100} step={1} />`,
1548
+ importRequirements: [
1549
+ { module: "@/components/ui/slider", named: ["Slider"] }
1550
+ ]
1551
+ },
1552
+ {
1553
+ id: "shadcn-form-search",
1554
+ group: "shadcn",
1555
+ snippet: `<Input type="search" placeholder="Search..." />`,
1556
+ importRequirements: [
1557
+ { module: "@/components/ui/input", named: ["Input"] }
1558
+ ]
1559
+ },
1560
+ {
1561
+ id: "shadcn-form-file-upload",
1562
+ group: "shadcn",
1563
+ snippet: `<Input type="file" />`,
1564
+ importRequirements: [
1565
+ { module: "@/components/ui/input", named: ["Input"] }
1566
+ ]
1567
+ }
1568
+ ];
1569
+ var byId = new Map(PALETTE_CATALOG.map((e) => [e.id, e]));
1570
+
207
1571
  // src/babel-plugin-editor-meta.ts
208
- var import_editor_protocol = require("@8base-archie/editor-protocol");
209
1572
  var nodePath = __toESM(require("path"));
210
1573
  function meaningfulChildren(t, children) {
211
1574
  return children.filter((child) => {
@@ -315,7 +1678,7 @@ function babelPluginEditorMeta({ types: t }, opts = {}) {
315
1678
  function readVidAttr(attrs) {
316
1679
  for (const attr of attrs) {
317
1680
  if (!t.isJSXAttribute(attr)) continue;
318
- if (!t.isJSXIdentifier(attr.name, { name: import_editor_protocol.VID_ATTR })) continue;
1681
+ if (!t.isJSXIdentifier(attr.name, { name: VID_ATTR })) continue;
319
1682
  const { value } = attr;
320
1683
  let raw = null;
321
1684
  if (t.isStringLiteral(value)) {
@@ -323,7 +1686,7 @@ function babelPluginEditorMeta({ types: t }, opts = {}) {
323
1686
  } else if (t.isJSXExpressionContainer(value) && t.isStringLiteral(value.expression)) {
324
1687
  raw = value.expression.value;
325
1688
  }
326
- if (raw !== null && import_editor_protocol.VID_PATTERN.test(raw)) return raw;
1689
+ if (raw !== null && VID_PATTERN.test(raw)) return raw;
327
1690
  return null;
328
1691
  }
329
1692
  return null;
@@ -1212,10 +2575,9 @@ function babelPluginEditorMeta({ types: t }, opts = {}) {
1212
2575
  }
1213
2576
 
1214
2577
  // src/babel-plugin-strip-data-vid.ts
1215
- var import_editor_protocol2 = require("@8base-archie/editor-protocol");
1216
2578
  function isStaticDataVidAttribute(t, attr) {
1217
2579
  if (!t.isJSXAttribute(attr)) return false;
1218
- if (!t.isJSXIdentifier(attr.name, { name: import_editor_protocol2.VID_ATTR })) return false;
2580
+ if (!t.isJSXIdentifier(attr.name, { name: VID_ATTR })) return false;
1219
2581
  const { value } = attr;
1220
2582
  if (t.isStringLiteral(value)) return true;
1221
2583
  if (t.isJSXExpressionContainer(value) && t.isStringLiteral(value.expression)) return true;