@atlaskit/adf-schema 56.0.2 → 56.0.4

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.
Files changed (71) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/cjs/entry-points/panel.js +12 -0
  3. package/dist/cjs/entry-points/rule.js +6 -0
  4. package/dist/cjs/entry-points/schema-next-nodeTypes.js +12 -0
  5. package/dist/cjs/entry-points/schema-panel.js +12 -0
  6. package/dist/cjs/entry-points/schema-rule.js +6 -0
  7. package/dist/cjs/next-schema/full-schema.adf.js +3 -1
  8. package/dist/cjs/next-schema/generated/nodeTypes.js +34 -2
  9. package/dist/cjs/next-schema/nodes/panel.js +16 -0
  10. package/dist/cjs/next-schema/nodes/rule.js +8 -0
  11. package/dist/cjs/schema/default-schema.js +5 -1
  12. package/dist/cjs/schema/index.js +12 -0
  13. package/dist/cjs/schema/marks/background-color.js +9 -2
  14. package/dist/cjs/schema/marks/text-color.js +10 -3
  15. package/dist/cjs/schema/nodes/index.js +18 -0
  16. package/dist/cjs/schema/nodes/panel.js +17 -1
  17. package/dist/cjs/schema/nodes/rule.js +8 -1
  18. package/dist/cjs/validator-schema/generated/validatorSpec.js +20 -2
  19. package/dist/es2019/entry-points/panel.js +1 -1
  20. package/dist/es2019/entry-points/rule.js +1 -1
  21. package/dist/es2019/entry-points/schema-next-nodeTypes.js +1 -1
  22. package/dist/es2019/entry-points/schema-panel.js +1 -1
  23. package/dist/es2019/entry-points/schema-rule.js +1 -1
  24. package/dist/es2019/next-schema/full-schema.adf.js +3 -1
  25. package/dist/es2019/next-schema/generated/nodeTypes.js +33 -1
  26. package/dist/es2019/next-schema/nodes/panel.js +16 -0
  27. package/dist/es2019/next-schema/nodes/rule.js +8 -0
  28. package/dist/es2019/schema/default-schema.js +5 -1
  29. package/dist/es2019/schema/index.js +1 -1
  30. package/dist/es2019/schema/marks/background-color.js +9 -2
  31. package/dist/es2019/schema/marks/text-color.js +10 -3
  32. package/dist/es2019/schema/nodes/index.js +2 -2
  33. package/dist/es2019/schema/nodes/panel.js +19 -1
  34. package/dist/es2019/schema/nodes/rule.js +5 -1
  35. package/dist/es2019/validator-schema/generated/validatorSpec.js +19 -1
  36. package/dist/esm/entry-points/panel.js +1 -1
  37. package/dist/esm/entry-points/rule.js +1 -1
  38. package/dist/esm/entry-points/schema-next-nodeTypes.js +1 -1
  39. package/dist/esm/entry-points/schema-panel.js +1 -1
  40. package/dist/esm/entry-points/schema-rule.js +1 -1
  41. package/dist/esm/next-schema/full-schema.adf.js +3 -1
  42. package/dist/esm/next-schema/generated/nodeTypes.js +33 -1
  43. package/dist/esm/next-schema/nodes/panel.js +16 -0
  44. package/dist/esm/next-schema/nodes/rule.js +8 -0
  45. package/dist/esm/schema/default-schema.js +5 -1
  46. package/dist/esm/schema/index.js +1 -1
  47. package/dist/esm/schema/marks/background-color.js +9 -2
  48. package/dist/esm/schema/marks/text-color.js +10 -3
  49. package/dist/esm/schema/nodes/index.js +2 -2
  50. package/dist/esm/schema/nodes/panel.js +16 -0
  51. package/dist/esm/schema/nodes/rule.js +6 -0
  52. package/dist/esm/validator-schema/generated/validatorSpec.js +19 -1
  53. package/dist/json-schema/v1/stage-0.json +3271 -3191
  54. package/dist/types/entry-points/background-color.d.ts +1 -1
  55. package/dist/types/entry-points/panel.d.ts +1 -1
  56. package/dist/types/entry-points/rule.d.ts +1 -1
  57. package/dist/types/entry-points/schema-background-color.d.ts +1 -1
  58. package/dist/types/entry-points/schema-next-nodeTypes.d.ts +2 -2
  59. package/dist/types/entry-points/schema-panel.d.ts +1 -1
  60. package/dist/types/entry-points/schema-rule.d.ts +1 -1
  61. package/dist/types/next-schema/generated/nodeTypes.d.ts +25 -1
  62. package/dist/types/next-schema/nodes/panel.d.ts +1 -1
  63. package/dist/types/next-schema/nodes/rule.d.ts +1 -1
  64. package/dist/types/schema/index.d.ts +1 -1
  65. package/dist/types/schema/marks/index.d.ts +1 -1
  66. package/dist/types/schema/nodes/index.d.ts +2 -2
  67. package/dist/types/schema/nodes/panel.d.ts +5 -0
  68. package/dist/types/schema/nodes/rule.d.ts +1 -0
  69. package/dist/types/validator-schema/generated/validatorSpec.d.ts +18 -0
  70. package/json-schema/v1/stage-0.json +3271 -3191
  71. package/package.json +3 -3
@@ -1,4 +1,5 @@
1
1
  import { $onePlus, $or, adfNode } from '@atlaskit/adf-schema-generator';
2
+ import { breakout } from '../marks/breakout';
2
3
  import { unsupportedMark } from '../marks/unsupportedMark';
3
4
  import { unsupportedNodeAttribute } from '../marks/unsupportedNodeAttribute';
4
5
  import { blockCard } from './blockCard';
@@ -56,4 +57,19 @@ export const panel = adfNode('panel').define({
56
57
  content: [$onePlus($or(...panelContent, extension.use('with_marks')))],
57
58
  ignore: ['json-schema', 'validator-spec'],
58
59
  preserveVariantNameInPm: true
60
+ })
61
+ // this variant is used to support breakout resizing for panel nodes at the document root
62
+ .variant('root_only', {
63
+ stage0: true,
64
+ marks: [breakout, unsupportedMark, unsupportedNodeAttribute]
65
+ })
66
+ // this variant is used to support breakout resizing for panel_c1 nodes at the document root
67
+ .variant('c1_root_only', {
68
+ stage0: true,
69
+ marks: [breakout, unsupportedMark, unsupportedNodeAttribute],
70
+ // panel_c1 allows all standard panel content plus table (wired via addContent
71
+ // in full-schema.adf.ts to avoid a circular module import).
72
+ content: [$onePlus($or(...panelContent, extension.use('with_marks')))],
73
+ ignore: ['json-schema', 'validator-spec'],
74
+ preserveVariantNameInPm: true
59
75
  });
@@ -1,4 +1,7 @@
1
1
  import { adfNode } from '@atlaskit/adf-schema-generator';
2
+ import { breakout } from '../marks/breakout';
3
+ import { unsupportedMark } from '../marks/unsupportedMark';
4
+ import { unsupportedNodeAttribute } from '../marks/unsupportedNodeAttribute';
2
5
  export const rule = adfNode('rule').define({
3
6
  attrs: {
4
7
  localId: {
@@ -7,4 +10,9 @@ export const rule = adfNode('rule').define({
7
10
  optional: true
8
11
  }
9
12
  }
13
+ })
14
+ // this variant is used to support breakout resizing for rule nodes at the document root
15
+ .variant('root_only', {
16
+ stage0: true,
17
+ marks: [breakout, unsupportedMark, unsupportedNodeAttribute]
10
18
  });
@@ -1,5 +1,7 @@
1
1
  import memoizeOne from 'memoize-one';
2
2
  import { extensionFrame, layoutSectionWithSingleColumn, multiBodiedExtension, expandWithNestedExpand, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTableStage0, tableHeaderWithNestedTableStage0 } from './nodes';
3
+ import { ruleRootOnlyStage0 } from './nodes/rule';
4
+ import { extendedPanelRootOnlyStage0 } from './nodes/panel';
3
5
  import { createSchema } from './create-schema';
4
6
  const getDefaultSchemaConfig = () => {
5
7
  const defaultSchemaConfig = {
@@ -26,7 +28,9 @@ export const getSchemaBasedOnStage = memoizeOne(
26
28
  table: tableWithNestedTable,
27
29
  tableRow: tableRowWithNestedTable,
28
30
  tableCell: tableCellWithNestedTableStage0,
29
- tableHeader: tableHeaderWithNestedTableStage0
31
+ tableHeader: tableHeaderWithNestedTableStage0,
32
+ panel: extendedPanelRootOnlyStage0(true),
33
+ rule: ruleRootOnlyStage0
30
34
  };
31
35
  }
32
36
  return createSchema(defaultSchemaConfig);
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable @atlaskit/editor/no-re-export */
2
- export { PanelType, blockCard, blockCardWithLocalId, blockquote, extendedBlockquote, extendedBlockquoteWithLocalId, bodiedExtension, bulletList, bulletListSelector, bulletListWithLocalId, caption, captionWithLocalId, codeBlock, codeBlockWithLocalId, codeBlockToJSON, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, date, dateWithLocalId, decisionItem, decisionList, decisionListSelector, doc, embedCard, embedCardWithLocalId, emoji, emojiWithLocalId, expandWithNestedExpand, expandWithNestedExpandLocalId, expandToJSON, extension, hardBreak, heading, image, inlineCard, inlineCardWithLocalId, inlineExtension, layoutColumn, layoutColumnStage0, layoutColumnWithLocalId, layoutSection, layoutSectionWithLocalId, layoutSectionWithSingleColumn, layoutSectionWithSingleColumnLocalId, listItem, listItemWithLocalId, media, mediaGroup, mediaSingle, mediaSingleSpec, mediaInline, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleFullWithLocalId, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, nestedExpandWithLocalId, orderedList, orderedListSelector, orderedListWithLocalId, orderedListWithOrder, orderedListWithOrderAndLocalId, extendedPanel, extendedPanelC1, extendedPanelC1WithLocalId, extendedPanelWithLocalId, paragraph, placeholder, placeholderWithLocalId, rule, ruleWithLocalId, getCellAttrs, getCellDomAttrs, status, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, blockTaskItem, taskList, taskListSelector, text, toJSONTableCell, toJSONTableHeader, unknownBlock, unsupportedBlock, unsupportedInline, extensionFrame, multiBodiedExtension, syncBlock, bodiedSyncBlock, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable, tableCellStage0, tableHeaderStage0, tableCellWithNestedTableStage0, tableHeaderWithNestedTableStage0, tableRowWithLocalId, tableCellWithLocalId, tableHeaderWithLocalId, tableRowWithNestedTableWithLocalId, tableCellWithNestedTableWithLocalId, tableHeaderWithNestedTableWithLocalId } from './nodes';
2
+ export { PanelType, blockCard, blockCardWithLocalId, blockquote, extendedBlockquote, extendedBlockquoteWithLocalId, bodiedExtension, bulletList, bulletListSelector, bulletListWithLocalId, caption, captionWithLocalId, codeBlock, codeBlockWithLocalId, codeBlockToJSON, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, date, dateWithLocalId, decisionItem, decisionList, decisionListSelector, doc, embedCard, embedCardWithLocalId, emoji, emojiWithLocalId, expandWithNestedExpand, expandWithNestedExpandLocalId, expandToJSON, extension, hardBreak, heading, image, inlineCard, inlineCardWithLocalId, inlineExtension, layoutColumn, layoutColumnStage0, layoutColumnWithLocalId, layoutSection, layoutSectionWithLocalId, layoutSectionWithSingleColumn, layoutSectionWithSingleColumnLocalId, listItem, listItemWithLocalId, media, mediaGroup, mediaSingle, mediaSingleSpec, mediaInline, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleFullWithLocalId, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, nestedExpandWithLocalId, orderedList, orderedListSelector, orderedListWithLocalId, orderedListWithOrder, orderedListWithOrderAndLocalId, extendedPanel, extendedPanelC1, extendedPanelC1WithLocalId, extendedPanelRootOnlyStage0, extendedPanelC1RootOnlyStage0, extendedPanelWithLocalId, paragraph, placeholder, placeholderWithLocalId, rule, ruleWithLocalId, getCellAttrs, getCellDomAttrs, status, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, blockTaskItem, taskList, taskListSelector, text, toJSONTableCell, toJSONTableHeader, unknownBlock, unsupportedBlock, unsupportedInline, extensionFrame, multiBodiedExtension, syncBlock, bodiedSyncBlock, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable, tableCellStage0, tableHeaderStage0, tableCellWithNestedTableStage0, tableHeaderWithNestedTableStage0, tableRowWithLocalId, tableCellWithLocalId, tableHeaderWithLocalId, tableRowWithNestedTableWithLocalId, tableCellWithNestedTableWithLocalId, tableHeaderWithNestedTableWithLocalId } from './nodes';
3
3
  export { AnnotationTypes, alignment, alignmentPositionMap, annotation, fontSize, breakout, code, colorPalette, colorPaletteNew,
4
4
  // eslint-disable-next-line @repo/internal/deprecations/deprecation-ticket-required
5
5
  /** @deprecated [ED-15849] The extended palette is now rolled into the main one. Use `colorPalette` instead. */
@@ -1,3 +1,4 @@
1
+ import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
1
2
  import { backgroundColor as backgroundColorFactory } from '../../next-schema/generated/markTypes';
2
3
  import { B75, G75, L200, M200, Neutral300, O200, P200, rgbToHex, T200, Yellow200 } from '../../utils/colors';
3
4
  import { hexToEditorTextBackgroundPaletteColor } from '../../utils/editor-palette';
@@ -49,6 +50,12 @@ colorArrayPalette.forEach(([color, label]) => backgroundColorPalette.set(color.t
49
50
  const RGB_PREFIX_BG_COLOR_REGEX = /^rgb/iu;
50
51
  export const backgroundColorPaletteNew = new Map();
51
52
  colorArrayPaletteNew.forEach(([color, label]) => backgroundColorPaletteNew.set(color.toLowerCase(), label));
53
+ const isSupportedBackgroundColor = hexColor => {
54
+ if (backgroundColorPalette.has(hexColor)) {
55
+ return true;
56
+ }
57
+ return expValEqualsNoExposure('platform_editor_lovability_text_bg_color', 'isEnabled', true) && backgroundColorPaletteNew.has(hexColor);
58
+ };
52
59
  export const backgroundColor = backgroundColorFactory({
53
60
  parseDOM: [{
54
61
  style: 'background-color',
@@ -61,7 +68,7 @@ export const backgroundColor = backgroundColorFactory({
61
68
  hexColor = value.toLowerCase();
62
69
  }
63
70
  // else handle other colour formats
64
- return hexColor && backgroundColorPalette.has(hexColor) ? {
71
+ return hexColor && isSupportedBackgroundColor(hexColor) ? {
65
72
  color: hexColor
66
73
  } : false;
67
74
  }
@@ -79,7 +86,7 @@ export const backgroundColor = backgroundColorFactory({
79
86
  return false;
80
87
  }
81
88
  const hexColor = maybeElement.dataset.backgroundCustomColor;
82
- return hexColor && backgroundColorPalette.has(hexColor) ? {
89
+ return hexColor && isSupportedBackgroundColor(hexColor) ? {
83
90
  color: hexColor
84
91
  } : false;
85
92
  }
@@ -1,3 +1,4 @@
1
+ import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
1
2
  import { textColor as textColorFactory } from '../../next-schema/generated/markTypes';
2
3
  import { hexToEditorTextPaletteColor } from '../../utils/editor-palette';
3
4
  import { rgbToHex, N0, N80, P50, P300, P500, T75, T300, T500, G75, G300, G500, R75, R300, R500, Y75, Y200, Y400, B75, B100, B500, Orange200, O600, O800, M200, M600, M800, L200, L600, L800, Y600, Y800 } from '../../utils/colors';
@@ -65,7 +66,7 @@ const colorArrayPaletteNew = [
65
66
  [L800, 'Dark lime'], [Y800, 'Dark yellow'], [O800, 'Dark orange'], [R500, 'Dark red'],
66
67
  // Dragon's blood
67
68
  [M800, 'Dark magenta'], [P500, 'Dark purple'],
68
- // Prince
69
+ // Prince
69
70
  // row 2
70
71
  [N80, 'Light gray'],
71
72
  // Spooky ghost
@@ -104,6 +105,12 @@ export const colorPaletteNew = new Map();
104
105
  export const colorPaletteExtended = colorPalette;
105
106
  colorArrayPalette.forEach(([color, label]) => colorPalette.set(color.toLowerCase(), label));
106
107
  colorArrayPaletteNew.forEach(([color, label]) => colorPaletteNew.set(color.toLowerCase(), label));
108
+ const isSupportedTextColor = hexColor => {
109
+ if (colorPalette.has(hexColor)) {
110
+ return true;
111
+ }
112
+ return expValEqualsNoExposure('platform_editor_lovability_text_bg_color', 'isEnabled', true) && colorPaletteNew.has(hexColor);
113
+ };
107
114
 
108
115
  // these are for test only
109
116
  let testGlobalTheme;
@@ -143,7 +150,7 @@ export const textColor = textColorFactory({
143
150
  hexColor = value.toLowerCase();
144
151
  }
145
152
  // else handle other colour formats
146
- return hexColor && colorPalette.has(hexColor) ? {
153
+ return hexColor && isSupportedTextColor(hexColor) ? {
147
154
  color: hexColor
148
155
  } : false;
149
156
  }
@@ -163,7 +170,7 @@ export const textColor = textColorFactory({
163
170
  return false;
164
171
  }
165
172
  const hexColor = maybeElement.dataset.textCustomColor;
166
- return hexColor && colorPalette.has(hexColor) ? {
173
+ return hexColor && isSupportedTextColor(hexColor) ? {
167
174
  color: hexColor
168
175
  } : false;
169
176
  }
@@ -9,14 +9,14 @@ export { bulletList, bulletListSelector, bulletListWithLocalId } from './bullet-
9
9
  export { codeBlock, codeBlockWithLocalId, toJSON as codeBlockToJSON } from './code-block';
10
10
  export { hardBreak } from './hard-break';
11
11
  export { heading } from './heading';
12
- export { rule, ruleWithLocalId } from './rule';
12
+ export { rule, ruleWithLocalId, ruleRootOnlyStage0 } from './rule';
13
13
  export { orderedList, orderedListSelector, orderedListWithLocalId, orderedListWithOrder, orderedListWithOrderAndLocalId } from './ordered-list';
14
14
  export { paragraph } from './paragraph';
15
15
  export { emoji, emojiWithLocalId } from './emoji';
16
16
  export { image } from './image';
17
17
  export { mention, toJSON as mentionToJSON } from './mention';
18
18
  export { listItem, listItemWithLocalId } from './list-item';
19
- export { extendedPanel, extendedPanelWithLocalId, extendedPanelC1, extendedPanelC1WithLocalId, PanelType } from './panel';
19
+ export { extendedPanel, extendedPanelWithLocalId, extendedPanelRootOnlyStage0, extendedPanelC1RootOnlyStage0, extendedPanelC1, extendedPanelC1WithLocalId, PanelType } from './panel';
20
20
  export { text } from './text';
21
21
  export { default as unknownBlock } from './unknown-block';
22
22
  export { caption, captionWithLocalId } from './caption';
@@ -89,4 +89,22 @@ export const extendedPanelWithLocalId = allowCustomPanel => panelFactory(createP
89
89
  * and generateLocalId propagate identically.
90
90
  */
91
91
  export const extendedPanelC1 = allowCustomPanel => panelC1Factory(createPanelNodeSpecOptions(allowCustomPanel));
92
- export const extendedPanelC1WithLocalId = allowCustomPanel => panelC1Factory(createPanelNodeSpecOptions(allowCustomPanel, true));
92
+ export const extendedPanelC1WithLocalId = allowCustomPanel => panelC1Factory(createPanelNodeSpecOptions(allowCustomPanel, true));
93
+
94
+ /**
95
+ * @name extended_panel_root_only
96
+ */
97
+ export const extendedPanelRootOnlyStage0 = allowCustomPanel => {
98
+ const panelNodeSpec = extendedPanelWithLocalId(allowCustomPanel);
99
+ return {
100
+ ...panelNodeSpec,
101
+ marks: `breakout ${panelNodeSpec.marks}`
102
+ };
103
+ };
104
+ export const extendedPanelC1RootOnlyStage0 = allowCustomPanel => {
105
+ const panelNodeSpec = extendedPanelC1WithLocalId(allowCustomPanel);
106
+ return {
107
+ ...panelNodeSpec,
108
+ marks: `breakout ${panelNodeSpec.marks}`
109
+ };
110
+ };
@@ -27,4 +27,8 @@ export const ruleWithLocalId = ruleFactory({
27
27
  'data-local-id': (node === null || node === void 0 ? void 0 : (_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.localId) || undefined
28
28
  }];
29
29
  }
30
- });
30
+ });
31
+ export const ruleRootOnlyStage0 = {
32
+ ...ruleWithLocalId,
33
+ marks: 'breakout unsupportedMark unsupportedNodeAttribute'
34
+ };
@@ -513,7 +513,7 @@ export const doc = {
513
513
  props: {
514
514
  content: {
515
515
  allowUnsupportedBlock: true,
516
- items: [['blockCard', 'paragraph_with_no_marks', 'paragraph_with_alignment', 'paragraph_with_indentation', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock', 'taskList', 'bulletList', 'orderedList', 'heading_with_no_marks', 'heading_with_alignment', 'heading_with_indentation', 'mediaGroup', 'decisionList', 'rule', 'panel', 'blockquote', 'extension_with_marks', 'embedCard', 'table', 'expand', 'bodiedExtension_with_marks', 'codeBlock_root_only', 'layoutSection_with_single_column', 'layoutSection_full', 'multiBodiedExtension', 'expand_root_only', 'syncBlock', 'bodiedSyncBlock']],
516
+ items: [['blockCard', 'paragraph_with_no_marks', 'paragraph_with_alignment', 'paragraph_with_indentation', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock', 'taskList', 'bulletList', 'orderedList', 'heading_with_no_marks', 'heading_with_alignment', 'heading_with_indentation', 'mediaGroup', 'decisionList', 'rule', 'panel', 'blockquote', 'extension_with_marks', 'embedCard', 'table', 'expand', 'bodiedExtension_with_marks', 'codeBlock_root_only', 'panel_root_only', 'rule_root_only', 'layoutSection_with_single_column', 'layoutSection_full', 'multiBodiedExtension', 'expand_root_only', 'syncBlock', 'bodiedSyncBlock']],
517
517
  type: 'array'
518
518
  },
519
519
  type: {
@@ -1520,6 +1520,15 @@ export const panel = {
1520
1520
  }
1521
1521
  }
1522
1522
  };
1523
+ export const panel_root_only = ['panel', {
1524
+ props: {
1525
+ marks: {
1526
+ items: ['breakout'],
1527
+ optional: true,
1528
+ type: 'array'
1529
+ }
1530
+ }
1531
+ }];
1523
1532
  export const paragraph = {
1524
1533
  props: {
1525
1534
  attrs: {
@@ -1621,6 +1630,15 @@ export const rule = {
1621
1630
  }
1622
1631
  }
1623
1632
  };
1633
+ export const rule_root_only = ['rule', {
1634
+ props: {
1635
+ marks: {
1636
+ items: ['breakout'],
1637
+ optional: true,
1638
+ type: 'array'
1639
+ }
1640
+ }
1641
+ }];
1624
1642
  export const status = {
1625
1643
  props: {
1626
1644
  attrs: {
@@ -1,2 +1,2 @@
1
1
  /* eslint-disable @atlaskit/editor/no-re-export */
2
- export { PanelType, extendedPanel, extendedPanelWithLocalId } from '../schema/nodes/panel';
2
+ export { PanelType, extendedPanel, extendedPanelRootOnlyStage0, extendedPanelC1RootOnlyStage0, extendedPanelWithLocalId } from '../schema/nodes/panel';
@@ -1,2 +1,2 @@
1
1
  /* eslint-disable @atlaskit/editor/no-re-export */
2
- export { rule, ruleWithLocalId } from '../schema/nodes/rule';
2
+ export { rule, ruleRootOnlyStage0, ruleWithLocalId } from '../schema/nodes/rule';
@@ -1,2 +1,2 @@
1
1
  /* eslint-disable @atlaskit/editor/no-re-export */
2
- export { blockCard, blockquote, blockquoteLegacy, blockTaskItem, bodiedExtension, bodiedExtensionWithMarks, bodiedSyncBlock, bulletList, caption, codeBlock, codeBlockRootOnly, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, date, dateStage0, decisionItem, decisionList, doc, embedCard, emoji, emojiStage0, expand, expandRootOnly, extension, extensionWithMarks, extensionFrameStage0, hardBreak, heading, headingWithAlignment, headingWithIndentation, headingWithNoMarks, image, inlineCard, inlineCardStage0, inlineExtension, inlineExtensionWithMarks, layoutColumn, layoutColumn as layoutColumnStage0, layoutSection, layoutSectionFull, layoutSectionWithSingleColumnStage0, listItem, media, mediaGroup, mediaInline, mediaSingle, mediaSingleCaption, mediaSingleFull, mediaSingleWidthType, mention, mentionStage0, multiBodiedExtensionStage0, nestedExpand, nestedExpandWithNoMarks, orderedList, panel, paragraph, paragraphWithAlignment, paragraphWithFontSize, paragraphWithIndentation, paragraphWithNoMarks, placeholder, rule, status, statusStage0, syncBlock, table, tableWithNestedTable, tableCell, tableCell as tableCellStage0, tableCellWithNestedTable, tableCellWithNestedTable as tableCellWithNestedTableStage0, tableHeader, tableHeader as tableHeaderStage0, tableHeaderWithNestedTable, tableHeaderWithNestedTable as tableHeaderWithNestedTableStage0, tableRow, tableRowWithNestedTable, taskItem, taskList, text, textCodeInline, textFormatted, textWithNoMarks, unsupportedBlock, unsupportedInline } from '../next-schema/generated/nodeTypes';
2
+ export { blockCard, blockquote, blockquoteLegacy, blockTaskItem, bodiedExtension, bodiedExtensionWithMarks, bodiedSyncBlock, bulletList, caption, codeBlock, codeBlockRootOnly, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, date, dateStage0, decisionItem, decisionList, doc, embedCard, emoji, emojiStage0, expand, expandRootOnly, extension, extensionWithMarks, extensionFrameStage0, hardBreak, heading, headingWithAlignment, headingWithIndentation, headingWithNoMarks, image, inlineCard, inlineCardStage0, inlineExtension, inlineExtensionWithMarks, layoutColumn, layoutColumn as layoutColumnStage0, layoutSection, layoutSectionFull, layoutSectionWithSingleColumnStage0, listItem, media, mediaGroup, mediaInline, mediaSingle, mediaSingleCaption, mediaSingleFull, mediaSingleWidthType, mention, mentionStage0, multiBodiedExtensionStage0, nestedExpand, nestedExpandWithNoMarks, orderedList, panel, panelRootOnlyStage0, paragraph, paragraphWithAlignment, paragraphWithFontSize, paragraphWithIndentation, paragraphWithNoMarks, placeholder, rule, ruleRootOnlyStage0, status, statusStage0, syncBlock, table, tableWithNestedTable, tableCell, tableCell as tableCellStage0, tableCellWithNestedTable, tableCellWithNestedTable as tableCellWithNestedTableStage0, tableHeader, tableHeader as tableHeaderStage0, tableHeaderWithNestedTable, tableHeaderWithNestedTable as tableHeaderWithNestedTableStage0, tableRow, tableRowWithNestedTable, taskItem, taskList, text, textCodeInline, textFormatted, textWithNoMarks, unsupportedBlock, unsupportedInline } from '../next-schema/generated/nodeTypes';
@@ -1,2 +1,2 @@
1
1
  /* eslint-disable @atlaskit/editor/no-re-export */
2
- export { PanelType, extendedPanel, extendedPanelWithLocalId } from '../schema/nodes/panel';
2
+ export { PanelType, extendedPanel, extendedPanelRootOnlyStage0, extendedPanelC1RootOnlyStage0, extendedPanelWithLocalId } from '../schema/nodes/panel';
@@ -1,2 +1,2 @@
1
1
  /* eslint-disable @atlaskit/editor/no-re-export */
2
- export { rule, ruleWithLocalId } from '../schema/nodes/rule';
2
+ export { rule, ruleRootOnlyStage0, ruleWithLocalId } from '../schema/nodes/rule';
@@ -8,15 +8,17 @@ import { codeBlock } from './nodes/codeBlock';
8
8
  import { syncBlock } from './nodes/syncBlock';
9
9
  import { bodiedSyncBlock } from './nodes/bodiedSyncBlock';
10
10
  import { panel } from './nodes/panel';
11
+ import { rule } from './nodes/rule';
11
12
  import { table } from './nodes/tableNodes';
12
13
 
13
14
  // Wire cross-container content after all node modules are fully evaluated,
14
15
  // so neither import is undefined when the $or() expression is constructed.
15
16
  panel.use('c1').addContent(table);
17
+ panel.use('c1_root_only').addContent(table);
16
18
  var doc = adfNode('doc').define({
17
19
  root: true,
18
20
  version: 1,
19
- content: [$onePlus($or(blockGroup, blockContentGroup, codeBlock.use('root_only'), layoutSection, layoutSection.use('with_single_column'), layoutSection.use('full'), blockRootOnlyGroup, expand.use('root_only'), syncBlock, bodiedSyncBlock))],
21
+ content: [$onePlus($or(blockGroup, blockContentGroup, codeBlock.use('root_only'), panel.use('root_only'), rule.use('root_only'), layoutSection, layoutSection.use('with_single_column'), layoutSection.use('full'), blockRootOnlyGroup, expand.use('root_only'), syncBlock, bodiedSyncBlock))],
20
22
  DANGEROUS_MANUAL_OVERRIDE: {
21
23
  'validator-spec': {
22
24
  'props.content.minItems': {
@@ -298,7 +298,7 @@ export var decisionList = createPMNodeSpecFactory({
298
298
  defining: true
299
299
  });
300
300
  export var doc = createPMNodeSpecFactory({
301
- content: '(block | codeBlock | layoutSection | blockRootOnly | expand | syncBlock | bodiedSyncBlock)+',
301
+ content: '(block | codeBlock | panel | rule | layoutSection | blockRootOnly | expand | syncBlock | bodiedSyncBlock)+',
302
302
  marks: 'unsupportedMark unsupportedNodeAttribute fontSize alignment indentation dataConsumer fragment breakout'
303
303
  });
304
304
  export var embedCard = createPMNodeSpecFactory({
@@ -1036,6 +1036,31 @@ export var panelC1 = createPMNodeSpecFactory({
1036
1036
  },
1037
1037
  selectable: true
1038
1038
  });
1039
+ export var panelRootOnlyStage0 = createPMNodeSpecFactory({
1040
+ content: '(paragraph | heading | bulletList | orderedList | blockCard | mediaGroup | mediaSingle | codeBlock | taskList | rule | decisionList | unsupportedBlock | extension)+',
1041
+ marks: 'fontSize unsupportedMark unsupportedNodeAttribute dataConsumer fragment',
1042
+ attrs: {
1043
+ panelType: {
1044
+ default: 'info'
1045
+ },
1046
+ panelIcon: {
1047
+ default: null
1048
+ },
1049
+ panelIconId: {
1050
+ default: null
1051
+ },
1052
+ panelIconText: {
1053
+ default: null
1054
+ },
1055
+ panelColor: {
1056
+ default: null
1057
+ },
1058
+ localId: {
1059
+ default: null
1060
+ }
1061
+ },
1062
+ selectable: true
1063
+ });
1039
1064
  export var paragraph = createPMNodeSpecFactory({
1040
1065
  content: 'inline*',
1041
1066
  marks: 'link em strong strike subsup underline textColor annotation backgroundColor typeAheadQuery confluenceInlineComment unsupportedNodeAttribute unsupportedMark code dataConsumer fragment border',
@@ -1104,6 +1129,13 @@ export var rule = createPMNodeSpecFactory({
1104
1129
  }
1105
1130
  }
1106
1131
  });
1132
+ export var ruleRootOnlyStage0 = createPMNodeSpecFactory({
1133
+ attrs: {
1134
+ localId: {
1135
+ default: null
1136
+ }
1137
+ }
1138
+ });
1107
1139
  export var status = createPMNodeSpecFactory({
1108
1140
  group: 'inline',
1109
1141
  inline: true,
@@ -1,4 +1,5 @@
1
1
  import { $onePlus, $or, adfNode } from '@atlaskit/adf-schema-generator';
2
+ import { breakout } from '../marks/breakout';
2
3
  import { unsupportedMark } from '../marks/unsupportedMark';
3
4
  import { unsupportedNodeAttribute } from '../marks/unsupportedNodeAttribute';
4
5
  import { blockCard } from './blockCard';
@@ -56,4 +57,19 @@ export var panel = adfNode('panel').define({
56
57
  content: [$onePlus($or.apply(void 0, panelContent.concat([extension.use('with_marks')])))],
57
58
  ignore: ['json-schema', 'validator-spec'],
58
59
  preserveVariantNameInPm: true
60
+ })
61
+ // this variant is used to support breakout resizing for panel nodes at the document root
62
+ .variant('root_only', {
63
+ stage0: true,
64
+ marks: [breakout, unsupportedMark, unsupportedNodeAttribute]
65
+ })
66
+ // this variant is used to support breakout resizing for panel_c1 nodes at the document root
67
+ .variant('c1_root_only', {
68
+ stage0: true,
69
+ marks: [breakout, unsupportedMark, unsupportedNodeAttribute],
70
+ // panel_c1 allows all standard panel content plus table (wired via addContent
71
+ // in full-schema.adf.ts to avoid a circular module import).
72
+ content: [$onePlus($or.apply(void 0, panelContent.concat([extension.use('with_marks')])))],
73
+ ignore: ['json-schema', 'validator-spec'],
74
+ preserveVariantNameInPm: true
59
75
  });
@@ -1,4 +1,7 @@
1
1
  import { adfNode } from '@atlaskit/adf-schema-generator';
2
+ import { breakout } from '../marks/breakout';
3
+ import { unsupportedMark } from '../marks/unsupportedMark';
4
+ import { unsupportedNodeAttribute } from '../marks/unsupportedNodeAttribute';
2
5
  export var rule = adfNode('rule').define({
3
6
  attrs: {
4
7
  localId: {
@@ -7,4 +10,9 @@ export var rule = adfNode('rule').define({
7
10
  optional: true
8
11
  }
9
12
  }
13
+ })
14
+ // this variant is used to support breakout resizing for rule nodes at the document root
15
+ .variant('root_only', {
16
+ stage0: true,
17
+ marks: [breakout, unsupportedMark, unsupportedNodeAttribute]
10
18
  });
@@ -1,5 +1,7 @@
1
1
  import memoizeOne from 'memoize-one';
2
2
  import { extensionFrame, layoutSectionWithSingleColumn, multiBodiedExtension, expandWithNestedExpand, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTableStage0, tableHeaderWithNestedTableStage0 } from './nodes';
3
+ import { ruleRootOnlyStage0 } from './nodes/rule';
4
+ import { extendedPanelRootOnlyStage0 } from './nodes/panel';
3
5
  import { createSchema } from './create-schema';
4
6
  var getDefaultSchemaConfig = function getDefaultSchemaConfig() {
5
7
  var defaultSchemaConfig = {
@@ -27,7 +29,9 @@ function () {
27
29
  table: tableWithNestedTable,
28
30
  tableRow: tableRowWithNestedTable,
29
31
  tableCell: tableCellWithNestedTableStage0,
30
- tableHeader: tableHeaderWithNestedTableStage0
32
+ tableHeader: tableHeaderWithNestedTableStage0,
33
+ panel: extendedPanelRootOnlyStage0(true),
34
+ rule: ruleRootOnlyStage0
31
35
  };
32
36
  }
33
37
  return createSchema(defaultSchemaConfig);
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable @atlaskit/editor/no-re-export */
2
- export { PanelType, blockCard, blockCardWithLocalId, blockquote, extendedBlockquote, extendedBlockquoteWithLocalId, bodiedExtension, bulletList, bulletListSelector, bulletListWithLocalId, caption, captionWithLocalId, codeBlock, codeBlockWithLocalId, codeBlockToJSON, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, date, dateWithLocalId, decisionItem, decisionList, decisionListSelector, doc, embedCard, embedCardWithLocalId, emoji, emojiWithLocalId, expandWithNestedExpand, expandWithNestedExpandLocalId, expandToJSON, extension, hardBreak, heading, image, inlineCard, inlineCardWithLocalId, inlineExtension, layoutColumn, layoutColumnStage0, layoutColumnWithLocalId, layoutSection, layoutSectionWithLocalId, layoutSectionWithSingleColumn, layoutSectionWithSingleColumnLocalId, listItem, listItemWithLocalId, media, mediaGroup, mediaSingle, mediaSingleSpec, mediaInline, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleFullWithLocalId, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, nestedExpandWithLocalId, orderedList, orderedListSelector, orderedListWithLocalId, orderedListWithOrder, orderedListWithOrderAndLocalId, extendedPanel, extendedPanelC1, extendedPanelC1WithLocalId, extendedPanelWithLocalId, paragraph, placeholder, placeholderWithLocalId, rule, ruleWithLocalId, getCellAttrs, getCellDomAttrs, status, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, blockTaskItem, taskList, taskListSelector, text, toJSONTableCell, toJSONTableHeader, unknownBlock, unsupportedBlock, unsupportedInline, extensionFrame, multiBodiedExtension, syncBlock, bodiedSyncBlock, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable, tableCellStage0, tableHeaderStage0, tableCellWithNestedTableStage0, tableHeaderWithNestedTableStage0, tableRowWithLocalId, tableCellWithLocalId, tableHeaderWithLocalId, tableRowWithNestedTableWithLocalId, tableCellWithNestedTableWithLocalId, tableHeaderWithNestedTableWithLocalId } from './nodes';
2
+ export { PanelType, blockCard, blockCardWithLocalId, blockquote, extendedBlockquote, extendedBlockquoteWithLocalId, bodiedExtension, bulletList, bulletListSelector, bulletListWithLocalId, caption, captionWithLocalId, codeBlock, codeBlockWithLocalId, codeBlockToJSON, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, date, dateWithLocalId, decisionItem, decisionList, decisionListSelector, doc, embedCard, embedCardWithLocalId, emoji, emojiWithLocalId, expandWithNestedExpand, expandWithNestedExpandLocalId, expandToJSON, extension, hardBreak, heading, image, inlineCard, inlineCardWithLocalId, inlineExtension, layoutColumn, layoutColumnStage0, layoutColumnWithLocalId, layoutSection, layoutSectionWithLocalId, layoutSectionWithSingleColumn, layoutSectionWithSingleColumnLocalId, listItem, listItemWithLocalId, media, mediaGroup, mediaSingle, mediaSingleSpec, mediaInline, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleFullWithLocalId, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, nestedExpandWithLocalId, orderedList, orderedListSelector, orderedListWithLocalId, orderedListWithOrder, orderedListWithOrderAndLocalId, extendedPanel, extendedPanelC1, extendedPanelC1WithLocalId, extendedPanelRootOnlyStage0, extendedPanelC1RootOnlyStage0, extendedPanelWithLocalId, paragraph, placeholder, placeholderWithLocalId, rule, ruleWithLocalId, getCellAttrs, getCellDomAttrs, status, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, blockTaskItem, taskList, taskListSelector, text, toJSONTableCell, toJSONTableHeader, unknownBlock, unsupportedBlock, unsupportedInline, extensionFrame, multiBodiedExtension, syncBlock, bodiedSyncBlock, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable, tableCellStage0, tableHeaderStage0, tableCellWithNestedTableStage0, tableHeaderWithNestedTableStage0, tableRowWithLocalId, tableCellWithLocalId, tableHeaderWithLocalId, tableRowWithNestedTableWithLocalId, tableCellWithNestedTableWithLocalId, tableHeaderWithNestedTableWithLocalId } from './nodes';
3
3
  export { AnnotationTypes, alignment, alignmentPositionMap, annotation, fontSize, breakout, code, colorPalette, colorPaletteNew,
4
4
  // eslint-disable-next-line @repo/internal/deprecations/deprecation-ticket-required
5
5
  /** @deprecated [ED-15849] The extended palette is now rolled into the main one. Use `colorPalette` instead. */
@@ -1,5 +1,6 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
+ import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
3
4
  import { backgroundColor as backgroundColorFactory } from '../../next-schema/generated/markTypes';
4
5
  import { B75, G75, L200, M200, Neutral300, O200, P200, rgbToHex, T200, Yellow200 } from '../../utils/colors';
5
6
  import { hexToEditorTextBackgroundPaletteColor } from '../../utils/editor-palette';
@@ -61,6 +62,12 @@ colorArrayPaletteNew.forEach(function (_ref3) {
61
62
  label = _ref4[1];
62
63
  return backgroundColorPaletteNew.set(color.toLowerCase(), label);
63
64
  });
65
+ var isSupportedBackgroundColor = function isSupportedBackgroundColor(hexColor) {
66
+ if (backgroundColorPalette.has(hexColor)) {
67
+ return true;
68
+ }
69
+ return expValEqualsNoExposure('platform_editor_lovability_text_bg_color', 'isEnabled', true) && backgroundColorPaletteNew.has(hexColor);
70
+ };
64
71
  export var backgroundColor = backgroundColorFactory({
65
72
  parseDOM: [{
66
73
  style: 'background-color',
@@ -73,7 +80,7 @@ export var backgroundColor = backgroundColorFactory({
73
80
  hexColor = value.toLowerCase();
74
81
  }
75
82
  // else handle other colour formats
76
- return hexColor && backgroundColorPalette.has(hexColor) ? {
83
+ return hexColor && isSupportedBackgroundColor(hexColor) ? {
77
84
  color: hexColor
78
85
  } : false;
79
86
  }
@@ -91,7 +98,7 @@ export var backgroundColor = backgroundColorFactory({
91
98
  return false;
92
99
  }
93
100
  var hexColor = maybeElement.dataset.backgroundCustomColor;
94
- return hexColor && backgroundColorPalette.has(hexColor) ? {
101
+ return hexColor && isSupportedBackgroundColor(hexColor) ? {
95
102
  color: hexColor
96
103
  } : false;
97
104
  }
@@ -1,5 +1,6 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
+ import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
3
4
  import { textColor as textColorFactory } from '../../next-schema/generated/markTypes';
4
5
  import { hexToEditorTextPaletteColor } from '../../utils/editor-palette';
5
6
  import { rgbToHex, N0, N80, P50, P300, P500, T75, T300, T500, G75, G300, G500, R75, R300, R500, Y75, Y200, Y400, B75, B100, B500, Orange200, O600, O800, M200, M600, M800, L200, L600, L800, Y600, Y800 } from '../../utils/colors';
@@ -67,7 +68,7 @@ var colorArrayPaletteNew = [
67
68
  [L800, 'Dark lime'], [Y800, 'Dark yellow'], [O800, 'Dark orange'], [R500, 'Dark red'],
68
69
  // Dragon's blood
69
70
  [M800, 'Dark magenta'], [P500, 'Dark purple'],
70
- // Prince
71
+ // Prince
71
72
  // row 2
72
73
  [N80, 'Light gray'],
73
74
  // Spooky ghost
@@ -116,6 +117,12 @@ colorArrayPaletteNew.forEach(function (_ref3) {
116
117
  label = _ref4[1];
117
118
  return colorPaletteNew.set(color.toLowerCase(), label);
118
119
  });
120
+ var isSupportedTextColor = function isSupportedTextColor(hexColor) {
121
+ if (colorPalette.has(hexColor)) {
122
+ return true;
123
+ }
124
+ return expValEqualsNoExposure('platform_editor_lovability_text_bg_color', 'isEnabled', true) && colorPaletteNew.has(hexColor);
125
+ };
119
126
 
120
127
  // these are for test only
121
128
  var testGlobalTheme;
@@ -155,7 +162,7 @@ export var textColor = textColorFactory({
155
162
  hexColor = value.toLowerCase();
156
163
  }
157
164
  // else handle other colour formats
158
- return hexColor && colorPalette.has(hexColor) ? {
165
+ return hexColor && isSupportedTextColor(hexColor) ? {
159
166
  color: hexColor
160
167
  } : false;
161
168
  }
@@ -175,7 +182,7 @@ export var textColor = textColorFactory({
175
182
  return false;
176
183
  }
177
184
  var hexColor = maybeElement.dataset.textCustomColor;
178
- return hexColor && colorPalette.has(hexColor) ? {
185
+ return hexColor && isSupportedTextColor(hexColor) ? {
179
186
  color: hexColor
180
187
  } : false;
181
188
  }
@@ -9,14 +9,14 @@ export { bulletList, bulletListSelector, bulletListWithLocalId } from './bullet-
9
9
  export { codeBlock, codeBlockWithLocalId, toJSON as codeBlockToJSON } from './code-block';
10
10
  export { hardBreak } from './hard-break';
11
11
  export { heading } from './heading';
12
- export { rule, ruleWithLocalId } from './rule';
12
+ export { rule, ruleWithLocalId, ruleRootOnlyStage0 } from './rule';
13
13
  export { orderedList, orderedListSelector, orderedListWithLocalId, orderedListWithOrder, orderedListWithOrderAndLocalId } from './ordered-list';
14
14
  export { paragraph } from './paragraph';
15
15
  export { emoji, emojiWithLocalId } from './emoji';
16
16
  export { image } from './image';
17
17
  export { mention, toJSON as mentionToJSON } from './mention';
18
18
  export { listItem, listItemWithLocalId } from './list-item';
19
- export { extendedPanel, extendedPanelWithLocalId, extendedPanelC1, extendedPanelC1WithLocalId, PanelType } from './panel';
19
+ export { extendedPanel, extendedPanelWithLocalId, extendedPanelRootOnlyStage0, extendedPanelC1RootOnlyStage0, extendedPanelC1, extendedPanelC1WithLocalId, PanelType } from './panel';
20
20
  export { text } from './text';
21
21
  export { default as unknownBlock } from './unknown-block';
22
22
  export { caption, captionWithLocalId } from './caption';
@@ -103,4 +103,20 @@ export var extendedPanelC1 = function extendedPanelC1(allowCustomPanel) {
103
103
  };
104
104
  export var extendedPanelC1WithLocalId = function extendedPanelC1WithLocalId(allowCustomPanel) {
105
105
  return panelC1Factory(createPanelNodeSpecOptions(allowCustomPanel, true));
106
+ };
107
+
108
+ /**
109
+ * @name extended_panel_root_only
110
+ */
111
+ export var extendedPanelRootOnlyStage0 = function extendedPanelRootOnlyStage0(allowCustomPanel) {
112
+ var panelNodeSpec = extendedPanelWithLocalId(allowCustomPanel);
113
+ return _objectSpread(_objectSpread({}, panelNodeSpec), {}, {
114
+ marks: "breakout ".concat(panelNodeSpec.marks)
115
+ });
116
+ };
117
+ export var extendedPanelC1RootOnlyStage0 = function extendedPanelC1RootOnlyStage0(allowCustomPanel) {
118
+ var panelNodeSpec = extendedPanelC1WithLocalId(allowCustomPanel);
119
+ return _objectSpread(_objectSpread({}, panelNodeSpec), {}, {
120
+ marks: "breakout ".concat(panelNodeSpec.marks)
121
+ });
106
122
  };
@@ -1,3 +1,6 @@
1
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
1
4
  import { rule as ruleFactory } from '../../next-schema/generated/nodeTypes';
2
5
  import { uuid } from '../../utils/uuid';
3
6
 
@@ -29,4 +32,7 @@ export var ruleWithLocalId = ruleFactory({
29
32
  'data-local-id': (node === null || node === void 0 ? void 0 : (_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.localId) || undefined
30
33
  }];
31
34
  }
35
+ });
36
+ export var ruleRootOnlyStage0 = _objectSpread(_objectSpread({}, ruleWithLocalId), {}, {
37
+ marks: 'breakout unsupportedMark unsupportedNodeAttribute'
32
38
  });
@@ -513,7 +513,7 @@ export var doc = {
513
513
  props: {
514
514
  content: {
515
515
  allowUnsupportedBlock: true,
516
- items: [['blockCard', 'paragraph_with_no_marks', 'paragraph_with_alignment', 'paragraph_with_indentation', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock', 'taskList', 'bulletList', 'orderedList', 'heading_with_no_marks', 'heading_with_alignment', 'heading_with_indentation', 'mediaGroup', 'decisionList', 'rule', 'panel', 'blockquote', 'extension_with_marks', 'embedCard', 'table', 'expand', 'bodiedExtension_with_marks', 'codeBlock_root_only', 'layoutSection_with_single_column', 'layoutSection_full', 'multiBodiedExtension', 'expand_root_only', 'syncBlock', 'bodiedSyncBlock']],
516
+ items: [['blockCard', 'paragraph_with_no_marks', 'paragraph_with_alignment', 'paragraph_with_indentation', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock', 'taskList', 'bulletList', 'orderedList', 'heading_with_no_marks', 'heading_with_alignment', 'heading_with_indentation', 'mediaGroup', 'decisionList', 'rule', 'panel', 'blockquote', 'extension_with_marks', 'embedCard', 'table', 'expand', 'bodiedExtension_with_marks', 'codeBlock_root_only', 'panel_root_only', 'rule_root_only', 'layoutSection_with_single_column', 'layoutSection_full', 'multiBodiedExtension', 'expand_root_only', 'syncBlock', 'bodiedSyncBlock']],
517
517
  type: 'array'
518
518
  },
519
519
  type: {
@@ -1520,6 +1520,15 @@ export var panel = {
1520
1520
  }
1521
1521
  }
1522
1522
  };
1523
+ export var panel_root_only = ['panel', {
1524
+ props: {
1525
+ marks: {
1526
+ items: ['breakout'],
1527
+ optional: true,
1528
+ type: 'array'
1529
+ }
1530
+ }
1531
+ }];
1523
1532
  export var paragraph = {
1524
1533
  props: {
1525
1534
  attrs: {
@@ -1621,6 +1630,15 @@ export var rule = {
1621
1630
  }
1622
1631
  }
1623
1632
  };
1633
+ export var rule_root_only = ['rule', {
1634
+ props: {
1635
+ marks: {
1636
+ items: ['breakout'],
1637
+ optional: true,
1638
+ type: 'array'
1639
+ }
1640
+ }
1641
+ }];
1624
1642
  export var status = {
1625
1643
  props: {
1626
1644
  attrs: {