import type { AnyNodeDefinition, Plugin } from '@pascal-app/core' import { fenceDefinition } from './fence' import { shelfDefinition } from './shelf' import { slabDefinition } from './slab' import { spawnDefinition } from './spawn' import { wallDefinition } from './wall' /** * Built-in plugin bundling every node kind shipped with the Pascal editor. * * Apps load this once at bootstrap (`loadPlugin(builtinPlugin)`) before * mounting the viewer. New built-in nodes are added by creating a folder * here under `src//` and appending its `NodeDefinition` below. * * External plugins follow the exact same shape — same `Plugin` type, same * `loadPlugin` call path. This is intentional: the API is stress-tested * by built-ins before any third-party plugin lands. * * All four current kinds are registered unconditionally. Parity is * verified by comparing against deployed production rather than an * in-app env-var flag toggle. Legacy paths still exist in `viewer/` and * `editor/` for kinds undergoing migration; they short-circuit via the * Phase 0 `` wrapper + `NodeRenderer`'s registry-first * dispatch. Phase 6 deletes the legacy paths. */ export const builtinPlugin: Plugin = { id: 'pascal:core', apiVersion: 1, nodes: [ shelfDefinition as unknown as AnyNodeDefinition, spawnDefinition as unknown as AnyNodeDefinition, wallDefinition as unknown as AnyNodeDefinition, fenceDefinition as unknown as AnyNodeDefinition, slabDefinition as unknown as AnyNodeDefinition, ], } export { fenceDefinition } from './fence' export { shelfDefinition } from './shelf' export { slabDefinition } from './slab' export { spawnDefinition } from './spawn' export { wallDefinition } from './wall'