json(['data' => $registry->components(), 'widgets' => $registry->widgets(), 'fields' => $registry->fields()]); } public function show(BuilderDocument $document): JsonResponse { return response()->json(['data' => $document]); } public function preview(BuilderDocument $document, BuilderRenderer $renderer): JsonResponse { return response()->json(['html' => $renderer->render($document->document ?? [])]); } }