UNPKG

@atlaskit/adf-schema

Version:

Shared package that contains the ADF-schema (json) and ProseMirror node/mark specs

17 lines (16 loc) 931 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.table = void 0; var _adfSchemaGenerator = require("@atlaskit/adf-schema-generator"); // A bare `table` node stub, declared in an import-cycle-free leaf module so that other node // modules (e.g. `panel`) can reference `table` in their content WITHOUT importing the heavy // `tableNodes.ts` definition module. Importing `tableNodes.ts` from `panel.ts` would form a // module import cycle (panel -> tableNodes -> nestedExpand / tableCellContentPseudoGroup -> // panel) and crash at module-eval time. // // `tableNodes.ts` imports this same stub and calls `.define()` / `.variant()` on it, so the // object here is the one and only `table` node. Spec resolution is deferred to codegen traversal, // which is cycle-aware, so referencing this stub before it is defined is safe. var table = exports.table = (0, _adfSchemaGenerator.adfNode)('table');