Other editor support

Sample documentation (demo only)
This is an incomplete, outdated docs snapshot shipped with the playground — screenshots were removed on purpose.
For the full, current manuals go to voodflow.com/docs.

Voodflow\Voodbuilder\Support\Editor\DemoEditorLanding

  • File: Support/Editor/DemoEditorLanding.php
  • Kind: class
  • Responsibility: Sample Editor landing payload used by voodbuilder:seed-demo-landing and as a Tailwind @source catalog for canvas utilities.

Methods

  • public static function payload(array $assetPaths = []): array
    • Payload.
  • protected static function html(string $heroUrl, string $splitUrl): string
    • Html.
  • protected static function css(): string
    • Css.
  • public static function writeUtilitiesCatalog(): void
    • Performs writeUtilitiesCatalog side effects.

Voodflow\Voodbuilder\Support\Editor\DynamicDataCollectionsBridge

  • File: Support/Editor/DynamicDataCollectionsBridge.php
  • Kind: class
  • Responsibility: Optional List-repeat hooks into voodflow/voodbuilder-dynamic-data.

Methods

  • public static function authoringEnabled(): bool
    • May the author create and configure List repeats?
  • public static function renderingEnabled(): bool
    • Can a repeat that is already stored in a page be expanded?
  • public static function renderRepeats(string $html, ?SitePage $page = null): string
    • Render Repeats.
  • public static function repeatSourcesCatalog(): array
    • Repeat Sources Catalog.

Voodflow\Voodbuilder\Support\Editor\EditorAssets

  • File: Support/Editor/EditorAssets.php
  • Kind: class
  • Responsibility: Editor Assets.

Methods

  • public static function editorScriptEntry(): string
    • Editor Script Entry.
  • public static function editorStyleEntry(): string
    • Editor Style Entry.
  • public static function blockPreviewStyleEntry(): string
    • Block Preview Style Entry.
  • public static function viteEntries(): array
    • Vite Entries.
  • public static function editorPageViteEntries(bool $chromeLayoutEditor = false, ?string $subTheme = null): array
    • Vite entries for visual editor pages (layout, page, popup). Excludes site runtime bundles that are unused while editing.
  • public static function pageViteEntries( bool $editorEditor = false, bool $chromeLayoutEditor = false, ?string $subTheme = null, ): array
    • Public page / editor host Vite entries.
  • public static function onlyResolvableViteEntries(array $entries): array
    • Drop entries missing from the Vite manifest so @vite does not 500 the public site when vite.config.js was patched before a new package entry existed.
  • public static function subThemeCssViteEntry(?string $subTheme): ?string
    • Active sub-theme CSS as a Vite entry (null when already bundled in theme.css = site, or when the theme is an app skin served at runtime — see RuntimeSubThemeStylesheet).
  • public static function optionalPublicCssViteInputs(): array
    • Known optional CSS inputs that should be listed in vite.config.js.
  • public static function isBuilt(): bool
    • Boolean predicate isBuilt.
  • public static function hostViteReady(): bool
    • Whether the host app has a Vite build (or npm run dev hot server). Public layouts must not call @vite when this is false — Laravel throws.
  • public static function buildInstructions(): string
    • Build Instructions.
  • protected static function withOptionalPublicCss( array $entries, ?string $subTheme, bool $includeTabsAndForms = true, ): array
    • With Optional Public Css.
  • protected static function canResolveViteEntry(string $entry): bool
    • Optional public CSS must exist in the Vite manifest (or Vite hot) so @vite does not throw. When no manifest exists yet, keep declaring the entry (same failure mode as required assets).
  • protected static function resolveSubThemeCssAbsolutePath(string $subThemeId): ?string
    • Resolve Sub Theme Css Absolute Path.
  • protected static function hasBuiltAsset(string $entry): bool
    • Boolean predicate hasBuiltAsset.

Voodflow\Voodbuilder\Support\Editor\EditorImportCompatibilityAnalyzer

  • File: Support/Editor/EditorImportCompatibilityAnalyzer.php
  • Kind: class
  • Responsibility: Editor Import Compatibility Analyzer.

Methods

  • public static function analyze(string $rawHtml, string $normalizedHtml, string $compiledCss, ?string $themeCss = null): array
    • status: 'excellent'|'good'|'partial'|'poor', totals: array{classes: int, ready: int, adapted: int, review: int, theme_ready: int},
  • public static function themeReferenceCss(): string
    • Theme Reference Css.
  • public static function detectChromeContext(string $html): array
    • Detect Chrome Context.
  • public static function isThemeCoveredUtility(string $class, string $themeCss): bool
    • Boolean predicate isThemeCoveredUtility.
  • public static function isStandardCanvasUtility(string $class): bool
    • Common Tailwind utilities that the canvas theme / page CSS already provide.
  • public static function isInternalPackageClass(string $class): bool
    • Voodbuilder / Editor chrome classes (vb-, voodbuilder-) are styled outside block JIT.
  • public static function cssIncludesUtility(string $css, string $class): bool
    • Css Includes Utility.
  • public static function escapeClassSelector(string $class): string
    • Escape Class Selector.

Voodflow\Voodbuilder\Support\Editor\EditorLinkTargets

  • File: Support/Editor/EditorLinkTargets.php
  • Kind: class
  • Responsibility: Editor Link Targets.

Methods

  • public static function catalog(): array
    • pages: list<array{id: string, label: string, url: string}>, menuItems: list<array{id: string, label: string, url: string}>,
  • public static function pages(): array
    • Pages.
  • public static function menuItems(): array
    • Menu Items.
  • public static function dynamicMenuChildId(NavigationMenuItem $parent, string $url): string
    • Stable synthetic id for ephemeral menu children (not stored in DB).
  • public static function menuItemLabel(NavigationMenuItem $item, ?NavigationMenuItem $child = null): string
    • Human label: "Main navigation · Docs · VoodBuilder".
  • public static function routes(): array
    • Routes.
  • public static function resolveRoute(string $routeName, array $parameters = []): string
    • Resolve Route.

Voodflow\Voodbuilder\Support\Editor\EditorPageTemplateBundle

  • File: Support/Editor/EditorPageTemplateBundle.php
  • Kind: class
  • Responsibility: Editor Page Template Bundle.

Methods

  • public static function buildExportPayload(array $templates): array
    • Build Export Payload.
  • public static function serializeTemplate(PageTemplate $template): array
    • Serialize Template.
  • public static function assertImportable(?array $meta): void
    • Performs assertImportable side effects.
  • public static function extractTemplates(array $payload): array
    • Extract Templates.
  • public static function extractCatalogEntries(array $payload): array
    • Extract Catalog Entries.

Voodflow\Voodbuilder\Support\Editor\EditorPageTemplateRemoteImporter

  • File: Support/Editor/EditorPageTemplateRemoteImporter.php
  • Kind: class
  • Responsibility: Editor Page Template Remote Importer.

Methods

  • public static function fetchBundle(string $url): array
    • Fetch Bundle.
  • public static function fetchCatalog(string $url): array
    • Fetch Catalog.
  • public static function normalizeUrl(string $url): string
    • Normalize Url.
  • protected static function catalogToken(): string
    • Catalog Token.
  • protected static function directoryOf(string $url): string
    • Directory Of.
  • protected static function toCatalogRelativePath(string $catalogUrl, string $absoluteUrl): ?string
    • Convert / serialize via toCatalogRelativePath.

Voodflow\Voodbuilder\Support\Editor\EditorSmartButtonAnnotator

  • File: Support/Editor/EditorSmartButtonAnnotator.php
  • Kind: class
  • Responsibility: Marks Tailblocks-style CTAs as smart buttons, and content anchors as Text links, without changing their visual classes.

Methods

  • public static function annotate(string $html): string
    • Annotate.

Voodflow\Voodbuilder\Support\Editor\Media\MediaCollectionConfig

  • File: Support/Editor/Media/MediaCollectionConfig.php
  • Kind: class
  • Responsibility: Normalized config for attached-media gallery blocks.

Methods

  • public static function normalize(array $config): array
    • collections: list, collection: string,
  • public static function normalizeCollections(array $config): array
    • Normalize Collections.
  • public static function defaults(): array
    • Defaults.

Voodflow\Voodbuilder\Support\Editor\PageTemplateCategories

  • File: Support/Editor/PageTemplateCategories.php
  • Kind: class
  • Responsibility: Page Template Categories.

Methods

  • public static function all(): array
    • Template categories (distinct from component / block categories).

Voodflow\Voodbuilder\Support\Editor\SitePageRevisionRecorder

  • File: Support/Editor/SitePageRevisionRecorder.php
  • Kind: class
  • Responsibility: Site Page Revision Recorder.

Methods

  • public function recordIfChanged(SitePage $page, array $previousPayload): void
    • Keep the state a deliberate save replaced.
  • public function recordAutosave(SitePage $page, array $payload): ?SitePageRevision
    • Park work in progress without publishing it.
  • public function latestAutosave(SitePage $page): ?SitePageRevision
    • Latest Autosave.
  • public function discardAutosaves(SitePage $page): void
    • Autosaves only describe work that is still unsaved.
  • protected function payloadDiffers(array $previous, array $current): bool
    • Payload Differs.
  • protected function trimOldRevisions(SitePage $page, SitePageRevisionKind $kind): void
    • Performs trimOldRevisions side effects.

Voodflow\Voodbuilder\Support\Editor\StarterPageTemplates

  • File: Support/Editor/StarterPageTemplates.php
  • Kind: class
  • Responsibility: Curated starter page templates (Landing 01–02 community thinners). Nav/footer are omitted — chrome-shell page editors already provide them. Landing 03 (cinematic kit) lives in the Elements companion.

Methods

  • public static function keepNames(): array
    • Keep Names.
  • public static function definitions(): array
    • Definitions.
  • public static function seed(): int
    • Seed.

Voodflow\Voodbuilder\Support\Editor\TemplateAuthoringBridge

  • File: Support/Editor/TemplateAuthoringBridge.php
  • Kind: class
  • Responsibility: Optional unlock for page-template authoring via voodflow/voodbuilder-templates.

Methods

  • public static function isEnabled(): bool
    • Boolean predicate isEnabled.
  • public static function canImportJson(): bool
    • Boolean predicate canImportJson.
  • public static function canExport(): bool
    • Boolean predicate canExport.
  • public static function pluginInstalled(): bool
    • Plugin Installed.
  • public static function authorizeAuthoring(): void
    • Performs authorizeAuthoring side effects.
  • public static function authorizeImportJson(): void
    • Performs authorizeImportJson side effects.
  • public static function authorizeExport(): void
    • Performs authorizeExport side effects.

Voodflow\Voodbuilder\Support\Editor\VoodbuilderThemeTokenMigrator

  • File: Support/Editor/VoodbuilderThemeTokenMigrator.php
  • Kind: class
  • Responsibility: Normalizes hardcoded Tailwind colors to Voodbuilder theme tokens so components adapt automatically to light/dark mode and backend palette overrides.

Methods

  • public static function migrateHtml(string $html): string
    • Migrate Html.
  • public static function migrateCss(string $css): string
    • Migrate Css.
  • public static function migratePublishedPageCss(string $css): string
    • Page-level Tailwind CSS: migrate legacy tokens, then keep palette var() references usable when --color-blue-* declarations were stripped from the compiled bundle.
  • public static function migrateComponentCss(string $css): string
    • Component Tailwind CSS keeps palette utilities (bg-blue-200, etc.) on instance HTML. Do not strip --color-blue-* declarations or bare var() references needed by those utilities.
  • public static function ensurePaletteVarFallbacks(string $css): string
    • Ensure Palette Var Fallbacks.
  • public static function migrateProject(array $project): array
    • Tailwind CSS v4 default oklch values for legacy palette utilities in pasted components.
  • public static function hasExplicitTextColorClass(string $classList): bool
    • Boolean predicate hasExplicitTextColorClass.
  • public static function migrateClassList(string $classList, bool $respectContentWidth = false): string
    • max-w-[var(--width-vp-layout)] — the data-voodbuilder-content-width toolbar owns measure.
  • public static function normalizeBrandBackgroundClasses(array $tokens): array
    • Normalize Brand Background Classes.
  • public static function migrateLegacyButtonClassesArray(array $tokens): array
    • Migrate Legacy Button Classes Array.
  • public static function migrateLegacyButtonClasses(array $tokens): string
    • Migrate Legacy Button Classes.
  • public static function migrateToken(string $token): string
    • Migrate Token.
Demo resets in 00:29:38