@atlaskit/adf-schema 56.1.4 → 56.1.6

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # @atlaskit/adf-schema
2
2
 
3
+ ## 56.1.6
4
+
5
+ ### Patch Changes
6
+
7
+ - [`ba8c317b7b604`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ba8c317b7b604) -
8
+ Add breakout mark width and root-only panel/rule typing
9
+
10
+ ## 56.1.5
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies
15
+
3
16
  ## 56.1.4
4
17
 
5
18
  ### Patch Changes
@@ -26,6 +26,9 @@ var PanelType = exports.PanelType = /*#__PURE__*/function (PanelType) {
26
26
  /**
27
27
  * @name panel_c1_node
28
28
  */
29
+ /**
30
+ * @name panel_root_only_node
31
+ */
29
32
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
30
33
  var getDomAttrs = function getDomAttrs(nodeAttrs) {
31
34
  var attrs = {
@@ -14,6 +14,10 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
14
14
  * @name rule_node
15
15
  */
16
16
 
17
+ /**
18
+ * @name rule_root_only_node
19
+ */
20
+
17
21
  var hrDOM = ['hr'];
18
22
  var rule = exports.rule = (0, _nodeTypes.rule)({
19
23
  parseDOM: [{
@@ -18,7 +18,7 @@ var clamp = function clamp(i, min, max) {
18
18
  return Math.round(Math.min(Math.max(i, min), max));
19
19
  };
20
20
  var expandShorthandHex = function expandShorthandHex(input) {
21
- return input.replace(SHORTHAND_HEX_REGEX, function (m, r, g, b) {
21
+ return input.replace(SHORTHAND_HEX_REGEX, function (_m, r, g, b) {
22
22
  return r + r + g + g + b + b;
23
23
  });
24
24
  };
@@ -19,6 +19,10 @@ export let PanelType = /*#__PURE__*/function (PanelType) {
19
19
  * @name panel_c1_node
20
20
  */
21
21
 
22
+ /**
23
+ * @name panel_root_only_node
24
+ */
25
+
22
26
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
23
27
  const getDomAttrs = nodeAttrs => {
24
28
  const attrs = {
@@ -5,6 +5,10 @@ import { uuid } from '../../utils/uuid';
5
5
  * @name rule_node
6
6
  */
7
7
 
8
+ /**
9
+ * @name rule_root_only_node
10
+ */
11
+
8
12
  const hrDOM = ['hr'];
9
13
  export const rule = ruleFactory({
10
14
  parseDOM: [{
@@ -9,7 +9,7 @@ const SHORTHAND_HEX_REGEX = /^#?([a-f\d])([a-f\d])([a-f\d])$/iu;
9
9
  // @ts-ignore TS1501: This regular expression flag is only available when targeting 'es6' or later.
10
10
  const FULL_HEX_REGEX = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/iu;
11
11
  const clamp = (i, min, max) => Math.round(Math.min(Math.max(i, min), max));
12
- const expandShorthandHex = input => input.replace(SHORTHAND_HEX_REGEX, (m, r, g, b) => r + r + g + g + b + b);
12
+ const expandShorthandHex = input => input.replace(SHORTHAND_HEX_REGEX, (_m, r, g, b) => r + r + g + g + b + b);
13
13
  const rgbFromHex = input => {
14
14
  const fullHex = expandShorthandHex(input);
15
15
  const result = FULL_HEX_REGEX.exec(fullHex);
@@ -22,6 +22,10 @@ export var PanelType = /*#__PURE__*/function (PanelType) {
22
22
  * @name panel_c1_node
23
23
  */
24
24
 
25
+ /**
26
+ * @name panel_root_only_node
27
+ */
28
+
25
29
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
26
30
  var getDomAttrs = function getDomAttrs(nodeAttrs) {
27
31
  var attrs = {
@@ -8,6 +8,10 @@ import { uuid } from '../../utils/uuid';
8
8
  * @name rule_node
9
9
  */
10
10
 
11
+ /**
12
+ * @name rule_root_only_node
13
+ */
14
+
11
15
  var hrDOM = ['hr'];
12
16
  export var rule = ruleFactory({
13
17
  parseDOM: [{
@@ -12,7 +12,7 @@ var clamp = function clamp(i, min, max) {
12
12
  return Math.round(Math.min(Math.max(i, min), max));
13
13
  };
14
14
  var expandShorthandHex = function expandShorthandHex(input) {
15
- return input.replace(SHORTHAND_HEX_REGEX, function (m, r, g, b) {
15
+ return input.replace(SHORTHAND_HEX_REGEX, function (_m, r, g, b) {
16
16
  return r + r + g + g + b + b;
17
17
  });
18
18
  };
@@ -1,6 +1,7 @@
1
1
  import type { MarkSpec } from '@atlaskit/editor-prosemirror/model';
2
2
  export type BreakoutMarkAttrs = {
3
3
  mode: 'wide' | 'full-width';
4
+ width?: number;
4
5
  };
5
6
  /**
6
7
  * @name breakout_mark
@@ -4,6 +4,8 @@ import type { LayoutSectionDefinition as LayoutSection } from './layout-section'
4
4
  import type { ParagraphWithIndentationDefinition } from './paragraph';
5
5
  import type { BlockContent } from './types/block-content';
6
6
  import type { MultiBodiedExtensionDefinition as MultiBodiedExtension } from './multi-bodied-extension';
7
+ import type { PanelRootOnlyDefinition as PanelRootOnly } from './panel';
8
+ import type { RuleRootOnlyDefinition as RuleRootOnly } from './rule';
7
9
  import type { SyncBlockDefinition as SyncBlock } from './sync-block';
8
10
  import type { BodiedSyncBlockDefinition as BodiedSyncBlock } from './bodied-sync-block';
9
11
  import type { NodeSpec } from '@atlaskit/editor-prosemirror/model';
@@ -15,7 +17,7 @@ export interface DocNode {
15
17
  // eslint-disable-next-line eslint-plugin-jsdoc/check-tag-names
16
18
  * @allowUnsupportedBlock true
17
19
  */
18
- content: Array<BlockContent | LayoutSection | CodeBlockWithMarks | ExpandRootOnly | ParagraphWithIndentationDefinition | MultiBodiedExtension | BodiedSyncBlock | SyncBlock>;
20
+ content: Array<BlockContent | LayoutSection | CodeBlockWithMarks | ExpandRootOnly | PanelRootOnly | RuleRootOnly | ParagraphWithIndentationDefinition | MultiBodiedExtension | BodiedSyncBlock | SyncBlock>;
19
21
  type: 'doc';
20
22
  version: 1;
21
23
  }
@@ -9,6 +9,8 @@ import type { DecisionListDefinition as DecisionList } from './decision-list';
9
9
  import type { TaskListDefinition as TaskList } from './task-list';
10
10
  import type { RuleDefinition as Rule } from './rule';
11
11
  import type { TableDefinition as Table } from './tableNodes';
12
+ import type { BreakoutMarkDefinition } from '../marks';
13
+ import type { MarksObject } from './types/mark';
12
14
  import type { NodeSpec } from '@atlaskit/editor-prosemirror/model';
13
15
  export declare enum PanelType {
14
16
  INFO = "info",
@@ -55,6 +57,10 @@ export interface PanelC1Definition {
55
57
  content: Array<Paragraph | Heading | OrderedList | BulletList | BlockCard | CodeBlock | MediaGroup | MediaSingle | DecisionList | TaskList | Rule | Table>;
56
58
  type: 'panel';
57
59
  }
60
+ /**
61
+ * @name panel_root_only_node
62
+ */
63
+ export type PanelRootOnlyDefinition = PanelDefinition & MarksObject<BreakoutMarkDefinition>;
58
64
  export interface DOMAttributes {
59
65
  [propName: string]: string;
60
66
  }
@@ -1,4 +1,6 @@
1
1
  import type { NodeSpec } from '@atlaskit/editor-prosemirror/model';
2
+ import type { BreakoutMarkDefinition } from '../marks';
3
+ import type { MarksObject } from './types/mark';
2
4
  /**
3
5
  * @name rule_node
4
6
  */
@@ -8,6 +10,10 @@ export interface RuleDefinition {
8
10
  };
9
11
  type: 'rule';
10
12
  }
13
+ /**
14
+ * @name rule_root_only_node
15
+ */
16
+ export type RuleRootOnlyDefinition = RuleDefinition & MarksObject<BreakoutMarkDefinition>;
11
17
  export declare const rule: NodeSpec;
12
18
  export declare const ruleWithLocalId: NodeSpec;
13
19
  export declare const ruleRootOnlyStage0: NodeSpec;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/adf-schema",
3
- "version": "56.1.4",
3
+ "version": "56.1.6",
4
4
  "description": "Shared package that contains the ADF-schema (json) and ProseMirror node/mark specs",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -40,7 +40,7 @@
40
40
  "@atlaskit/adf-schema-generator": "^3.1.0",
41
41
  "@atlaskit/editor-prosemirror": "^8.0.0",
42
42
  "@atlaskit/platform-feature-flags": "^2.0.0",
43
- "@atlaskit/tmp-editor-statsig": "^125.0.0",
43
+ "@atlaskit/tmp-editor-statsig": "^126.1.0",
44
44
  "@babel/runtime": "^7.0.0",
45
45
  "css-color-names": "0.0.4",
46
46
  "linkify-it": "^3.0.3",