@atlaskit/adf-utils 19.0.22 → 19.0.24

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 (46) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/builders/package.json +1 -1
  3. package/dist/cjs/builders/types.js +1 -5
  4. package/dist/cjs/types/index.js +1 -5
  5. package/dist/cjs/validator/entry.js +1 -5
  6. package/dist/cjs/validator/validator.js +11 -10
  7. package/dist/es2019/builders/types.js +0 -1
  8. package/dist/es2019/types/index.js +0 -1
  9. package/dist/es2019/validator/entry.js +0 -1
  10. package/dist/es2019/validator/validator.js +13 -10
  11. package/dist/esm/builders/types.js +0 -1
  12. package/dist/esm/types/index.js +0 -1
  13. package/dist/esm/validator/entry.js +0 -1
  14. package/dist/esm/validator/validator.js +11 -10
  15. package/dist/types/builders/marks/annotation.d.ts +1 -1
  16. package/dist/types/builders/marks/border.d.ts +1 -1
  17. package/dist/types/builders/marks/code.d.ts +1 -1
  18. package/dist/types/builders/marks/em.d.ts +1 -1
  19. package/dist/types/builders/marks/link.d.ts +1 -1
  20. package/dist/types/builders/marks/strike.d.ts +1 -1
  21. package/dist/types/builders/marks/strong.d.ts +1 -1
  22. package/dist/types/builders/marks/subsup.d.ts +1 -1
  23. package/dist/types/builders/marks/text-color.d.ts +1 -1
  24. package/dist/types/builders/marks/underline.d.ts +1 -1
  25. package/dist/types/builders/utils/apply-mark.d.ts +1 -1
  26. package/dist/types/validator/utils.d.ts +1 -1
  27. package/dist/types-ts4.5/builders/marks/annotation.d.ts +1 -1
  28. package/dist/types-ts4.5/builders/marks/border.d.ts +1 -1
  29. package/dist/types-ts4.5/builders/marks/code.d.ts +1 -1
  30. package/dist/types-ts4.5/builders/marks/em.d.ts +1 -1
  31. package/dist/types-ts4.5/builders/marks/link.d.ts +1 -1
  32. package/dist/types-ts4.5/builders/marks/strike.d.ts +1 -1
  33. package/dist/types-ts4.5/builders/marks/strong.d.ts +1 -1
  34. package/dist/types-ts4.5/builders/marks/subsup.d.ts +1 -1
  35. package/dist/types-ts4.5/builders/marks/text-color.d.ts +1 -1
  36. package/dist/types-ts4.5/builders/marks/underline.d.ts +1 -1
  37. package/dist/types-ts4.5/builders/utils/apply-mark.d.ts +1 -1
  38. package/dist/types-ts4.5/validator/utils.d.ts +1 -1
  39. package/empty-adf/package.json +1 -1
  40. package/package.json +4 -4
  41. package/scrub/package.json +1 -1
  42. package/transforms/package.json +1 -1
  43. package/traverse/package.json +1 -1
  44. package/types/package.json +1 -1
  45. package/validator/package.json +1 -1
  46. package/validatorTypes/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/adf-utils
2
2
 
3
+ ## 19.0.24
4
+
5
+ ### Patch Changes
6
+
7
+ - [#83116](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/83116) [`8d4e99057fe0`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8d4e99057fe0) - Upgrade Typescript from `4.9.5` to `5.4.2`
8
+
9
+ ## 19.0.23
10
+
11
+ ### Patch Changes
12
+
13
+ - [#80679](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/80679) [`104eb9443b7e`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/104eb9443b7e) - ED-22553 Updating adf-schema version to 35.6.0
14
+
3
15
  ## 19.0.22
4
16
 
5
17
  ### Patch Changes
@@ -6,7 +6,7 @@
6
6
  "sideEffects": false,
7
7
  "types": "../dist/types/builders.d.ts",
8
8
  "typesVersions": {
9
- ">=4.5 <4.9": {
9
+ ">=4.5 <5.4": {
10
10
  "*": [
11
11
  "../dist/types-ts4.5/builders.d.ts"
12
12
  ]
@@ -1,5 +1 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
1
+ "use strict";
@@ -1,5 +1 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
1
+ "use strict";
@@ -1,5 +1 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
1
+ "use strict";
@@ -20,7 +20,6 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
20
20
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
21
21
  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; }
22
22
  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) { (0, _defineProperty2.default)(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; }
23
- var INLINE_NODES_SUPPORTING_COMMENTS = ['inlineCard'];
24
23
  function mapMarksItems(spec) {
25
24
  var fn = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (x) {
26
25
  return x;
@@ -57,18 +56,18 @@ var partitionObject = function partitionObject(obj, predicate) {
57
56
  * We denormalised the spec to save bundle size.
58
57
  */
59
58
  function createSpec(nodes, marks) {
60
- var allowCommentsOnInlineNodes = !!(0, _platformFeatureFlags.getBooleanFF)('platform.editor.allow-inline-comments-for-inline-nodes');
61
- return Object.keys(specs).reduce(function (newSpecs, k) {
62
- var spec = _objectSpread({}, specs[k]);
63
- if (INLINE_NODES_SUPPORTING_COMMENTS.includes(k) && allowCommentsOnInlineNodes) {
64
- spec.props = _inlineCardWithAnnotation.inlineCardWithAnnotation.props;
65
- }
59
+ var _specs = _objectSpread({}, specs);
60
+ if (!!(0, _platformFeatureFlags.getBooleanFF)('platform.editor.allow-inline-comments-for-inline-nodes')) {
61
+ _specs.inlineCard = _inlineCardWithAnnotation.inlineCardWithAnnotation;
62
+ }
63
+ return Object.keys(_specs).reduce(function (newSpecs, k) {
64
+ var spec = _objectSpread({}, _specs[k]);
66
65
  if (spec.props) {
67
66
  spec.props = _objectSpread({}, spec.props);
68
67
  if (spec.props.content) {
69
68
  // 'tableCell_content' => { type: 'array', items: [ ... ] }
70
69
  if ((0, _utils.isString)(spec.props.content)) {
71
- spec.props.content = specs[spec.props.content];
70
+ spec.props.content = _specs[spec.props.content];
72
71
  }
73
72
 
74
73
  // ['inline', 'emoji']
@@ -96,12 +95,12 @@ function createSpec(nodes, marks) {
96
95
  // ['inline'] => [['emoji', 'hr', ...]]
97
96
  // ['media'] => [['media']]
98
97
  .map(function (item) {
99
- return (0, _utils.isString)(item) ? Array.isArray(specs[item]) ? specs[item] : [item] : item;
98
+ return (0, _utils.isString)(item) ? Array.isArray(_specs[item]) ? _specs[item] : [item] : item;
100
99
  })
101
100
  // [['emoji', 'hr', 'inline_code']] => [['emoji', 'hr', ['text', { marks: {} }]]]
102
101
  .map(function (item) {
103
102
  return item.map(function (subItem) {
104
- return Array.isArray(specs[subItem]) ? specs[subItem] : (0, _utils.isString)(subItem) ? subItem :
103
+ return Array.isArray(_specs[subItem]) ? _specs[subItem] : (0, _utils.isString)(subItem) ? subItem :
105
104
  // Now `NoMark` produces `items: []`, should be fixed in generator
106
105
  ['text', subItem];
107
106
  })
@@ -179,6 +178,8 @@ function validateAttrs(spec, value) {
179
178
  }
180
179
  // extension_node parameters has no type
181
180
  if (!(0, _utils.isDefined)(spec.type)) {
181
+ // @ts-expect-error - property 'optional' does not exist on type 'never'
182
+ // This error was introduced after upgrading to TypeScript 5
182
183
  return !!spec.optional;
183
184
  }
184
185
  switch (spec.type) {
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -3,7 +3,6 @@ import * as specs from './specs';
3
3
  import { inlineCardWithAnnotation } from './custom-specs/inline-card-with-annotation';
4
4
  import { copy, isBoolean, isDefined, isInteger, isNumber, isPlainObject, isString, makeArray } from './utils';
5
5
  import { validatorFnMap } from './rules';
6
- const INLINE_NODES_SUPPORTING_COMMENTS = ['inlineCard'];
7
6
  function mapMarksItems(spec, fn = x => x) {
8
7
  if (spec.props && spec.props.marks) {
9
8
  const {
@@ -39,14 +38,16 @@ const partitionObject = (obj, predicate) => Object.keys(obj).reduce((acc, key) =
39
38
  * We denormalised the spec to save bundle size.
40
39
  */
41
40
  function createSpec(nodes, marks) {
42
- const allowCommentsOnInlineNodes = !!getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes');
43
- return Object.keys(specs).reduce((newSpecs, k) => {
41
+ let _specs = {
42
+ ...specs
43
+ };
44
+ if (!!getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes')) {
45
+ _specs.inlineCard = inlineCardWithAnnotation;
46
+ }
47
+ return Object.keys(_specs).reduce((newSpecs, k) => {
44
48
  const spec = {
45
- ...specs[k]
49
+ ..._specs[k]
46
50
  };
47
- if (INLINE_NODES_SUPPORTING_COMMENTS.includes(k) && allowCommentsOnInlineNodes) {
48
- spec.props = inlineCardWithAnnotation.props;
49
- }
50
51
  if (spec.props) {
51
52
  spec.props = {
52
53
  ...spec.props
@@ -54,7 +55,7 @@ function createSpec(nodes, marks) {
54
55
  if (spec.props.content) {
55
56
  // 'tableCell_content' => { type: 'array', items: [ ... ] }
56
57
  if (isString(spec.props.content)) {
57
- spec.props.content = specs[spec.props.content];
58
+ spec.props.content = _specs[spec.props.content];
58
59
  }
59
60
 
60
61
  // ['inline', 'emoji']
@@ -81,9 +82,9 @@ function createSpec(nodes, marks) {
81
82
 
82
83
  // ['inline'] => [['emoji', 'hr', ...]]
83
84
  // ['media'] => [['media']]
84
- .map(item => isString(item) ? Array.isArray(specs[item]) ? specs[item] : [item] : item)
85
+ .map(item => isString(item) ? Array.isArray(_specs[item]) ? _specs[item] : [item] : item)
85
86
  // [['emoji', 'hr', 'inline_code']] => [['emoji', 'hr', ['text', { marks: {} }]]]
86
- .map(item => item.map(subItem => Array.isArray(specs[subItem]) ? specs[subItem] : isString(subItem) ? subItem :
87
+ .map(item => item.map(subItem => Array.isArray(_specs[subItem]) ? _specs[subItem] : isString(subItem) ? subItem :
87
88
  // Now `NoMark` produces `items: []`, should be fixed in generator
88
89
  ['text', subItem])
89
90
  // Remove unsupported nodes & marks
@@ -148,6 +149,8 @@ export function validateAttrs(spec, value) {
148
149
  }
149
150
  // extension_node parameters has no type
150
151
  if (!isDefined(spec.type)) {
152
+ // @ts-expect-error - property 'optional' does not exist on type 'never'
153
+ // This error was introduced after upgrading to TypeScript 5
151
154
  return !!spec.optional;
152
155
  }
153
156
  switch (spec.type) {
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -9,7 +9,6 @@ import * as specs from './specs';
9
9
  import { inlineCardWithAnnotation } from './custom-specs/inline-card-with-annotation';
10
10
  import { copy, isBoolean, isDefined, isInteger, isNumber, isPlainObject, isString, makeArray } from './utils';
11
11
  import { validatorFnMap } from './rules';
12
- var INLINE_NODES_SUPPORTING_COMMENTS = ['inlineCard'];
13
12
  function mapMarksItems(spec) {
14
13
  var fn = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (x) {
15
14
  return x;
@@ -46,18 +45,18 @@ var partitionObject = function partitionObject(obj, predicate) {
46
45
  * We denormalised the spec to save bundle size.
47
46
  */
48
47
  function createSpec(nodes, marks) {
49
- var allowCommentsOnInlineNodes = !!getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes');
50
- return Object.keys(specs).reduce(function (newSpecs, k) {
51
- var spec = _objectSpread({}, specs[k]);
52
- if (INLINE_NODES_SUPPORTING_COMMENTS.includes(k) && allowCommentsOnInlineNodes) {
53
- spec.props = inlineCardWithAnnotation.props;
54
- }
48
+ var _specs = _objectSpread({}, specs);
49
+ if (!!getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes')) {
50
+ _specs.inlineCard = inlineCardWithAnnotation;
51
+ }
52
+ return Object.keys(_specs).reduce(function (newSpecs, k) {
53
+ var spec = _objectSpread({}, _specs[k]);
55
54
  if (spec.props) {
56
55
  spec.props = _objectSpread({}, spec.props);
57
56
  if (spec.props.content) {
58
57
  // 'tableCell_content' => { type: 'array', items: [ ... ] }
59
58
  if (isString(spec.props.content)) {
60
- spec.props.content = specs[spec.props.content];
59
+ spec.props.content = _specs[spec.props.content];
61
60
  }
62
61
 
63
62
  // ['inline', 'emoji']
@@ -85,12 +84,12 @@ function createSpec(nodes, marks) {
85
84
  // ['inline'] => [['emoji', 'hr', ...]]
86
85
  // ['media'] => [['media']]
87
86
  .map(function (item) {
88
- return isString(item) ? Array.isArray(specs[item]) ? specs[item] : [item] : item;
87
+ return isString(item) ? Array.isArray(_specs[item]) ? _specs[item] : [item] : item;
89
88
  })
90
89
  // [['emoji', 'hr', 'inline_code']] => [['emoji', 'hr', ['text', { marks: {} }]]]
91
90
  .map(function (item) {
92
91
  return item.map(function (subItem) {
93
- return Array.isArray(specs[subItem]) ? specs[subItem] : isString(subItem) ? subItem :
92
+ return Array.isArray(_specs[subItem]) ? _specs[subItem] : isString(subItem) ? subItem :
94
93
  // Now `NoMark` produces `items: []`, should be fixed in generator
95
94
  ['text', subItem];
96
95
  })
@@ -168,6 +167,8 @@ export function validateAttrs(spec, value) {
168
167
  }
169
168
  // extension_node parameters has no type
170
169
  if (!isDefined(spec.type)) {
170
+ // @ts-expect-error - property 'optional' does not exist on type 'never'
171
+ // This error was introduced after upgrading to TypeScript 5
171
172
  return !!spec.optional;
172
173
  }
173
174
  switch (spec.type) {
@@ -1,3 +1,3 @@
1
1
  import { AnnotationMarkAttributes } from '@atlaskit/adf-schema';
2
2
  import { WithMark } from '../types';
3
- export declare const annotation: (attrs: AnnotationMarkAttributes) => (maybeNode: WithMark | string) => WithMark;
3
+ export declare const annotation: (attrs: AnnotationMarkAttributes) => (maybeNode: WithMark | string) => WithMark | import("@atlaskit/adf-schema").TextDefinition;
@@ -1,3 +1,3 @@
1
1
  import { BorderMarkAttributes } from '@atlaskit/adf-schema';
2
2
  import { WithMark } from '../types';
3
- export declare const border: (attrs: BorderMarkAttributes) => (maybeNode: WithMark | string) => WithMark;
3
+ export declare const border: (attrs: BorderMarkAttributes) => (maybeNode: WithMark | string) => WithMark | import("@atlaskit/adf-schema").TextDefinition;
@@ -1,2 +1,2 @@
1
1
  import { WithMark } from '../types';
2
- export declare const code: (maybeNode: WithMark | string) => WithMark;
2
+ export declare const code: (maybeNode: WithMark | string) => WithMark | import("@atlaskit/adf-schema").TextDefinition;
@@ -1,2 +1,2 @@
1
1
  import { WithMark } from '../types';
2
- export declare const em: (maybeNode: WithMark | string) => WithMark;
2
+ export declare const em: (maybeNode: WithMark | string) => WithMark | import("@atlaskit/adf-schema").TextDefinition;
@@ -1,3 +1,3 @@
1
1
  import { LinkAttributes } from '@atlaskit/adf-schema';
2
2
  import { WithMark } from '../types';
3
- export declare const link: (attrs: LinkAttributes) => (maybeNode: WithMark | string) => WithMark;
3
+ export declare const link: (attrs: LinkAttributes) => (maybeNode: WithMark | string) => WithMark | import("@atlaskit/adf-schema").TextDefinition;
@@ -1,2 +1,2 @@
1
1
  import { WithMark } from '../types';
2
- export declare const strike: (maybeNode: WithMark | string) => WithMark;
2
+ export declare const strike: (maybeNode: WithMark | string) => WithMark | import("@atlaskit/adf-schema").TextDefinition;
@@ -1,2 +1,2 @@
1
1
  import { WithMark } from '../types';
2
- export declare const strong: (maybeNode: WithMark | string) => WithMark;
2
+ export declare const strong: (maybeNode: WithMark | string) => WithMark | import("@atlaskit/adf-schema").TextDefinition;
@@ -1,3 +1,3 @@
1
1
  import { SubSupAttributes } from '@atlaskit/adf-schema';
2
2
  import { WithMark } from '../types';
3
- export declare const subsup: (attrs: SubSupAttributes) => (maybeNode: WithMark | string) => WithMark;
3
+ export declare const subsup: (attrs: SubSupAttributes) => (maybeNode: WithMark | string) => WithMark | import("@atlaskit/adf-schema").TextDefinition;
@@ -1,3 +1,3 @@
1
1
  import { TextColorAttributes } from '@atlaskit/adf-schema';
2
2
  import { WithMark } from '../types';
3
- export declare const textColor: (attrs: TextColorAttributes) => (maybeNode: WithMark | string) => WithMark;
3
+ export declare const textColor: (attrs: TextColorAttributes) => (maybeNode: WithMark | string) => WithMark | import("@atlaskit/adf-schema").TextDefinition;
@@ -1,2 +1,2 @@
1
1
  import { WithMark } from '../types';
2
- export declare const underline: (maybeNode: WithMark | string) => WithMark;
2
+ export declare const underline: (maybeNode: WithMark | string) => WithMark | import("@atlaskit/adf-schema").TextDefinition;
@@ -1,4 +1,4 @@
1
1
  import { WithMark } from '../types';
2
2
  export declare function applyMark<T>(mark: T & {
3
3
  type: string;
4
- }, maybeNode: WithMark | string): WithMark;
4
+ }, maybeNode: WithMark | string): WithMark | import("@atlaskit/adf-schema").TextDefinition;
@@ -5,4 +5,4 @@ export declare const isBoolean: (x: unknown) => x is boolean;
5
5
  export declare const isString: (s: unknown) => s is string;
6
6
  export declare const isPlainObject: (x: unknown) => boolean;
7
7
  export declare const copy: <T extends Record<string | number, any> = Record<string | number, any>>(source: Record<string | number, any>, dest: T, key: string | number) => T;
8
- export declare const makeArray: <T>(maybeArray: T | T[]) => T[];
8
+ export declare const makeArray: <T>(maybeArray: T | Array<T>) => T[];
@@ -1,3 +1,3 @@
1
1
  import { AnnotationMarkAttributes } from '@atlaskit/adf-schema';
2
2
  import { WithMark } from '../types';
3
- export declare const annotation: (attrs: AnnotationMarkAttributes) => (maybeNode: WithMark | string) => WithMark;
3
+ export declare const annotation: (attrs: AnnotationMarkAttributes) => (maybeNode: WithMark | string) => WithMark | import("@atlaskit/adf-schema").TextDefinition;
@@ -1,3 +1,3 @@
1
1
  import { BorderMarkAttributes } from '@atlaskit/adf-schema';
2
2
  import { WithMark } from '../types';
3
- export declare const border: (attrs: BorderMarkAttributes) => (maybeNode: WithMark | string) => WithMark;
3
+ export declare const border: (attrs: BorderMarkAttributes) => (maybeNode: WithMark | string) => WithMark | import("@atlaskit/adf-schema").TextDefinition;
@@ -1,2 +1,2 @@
1
1
  import { WithMark } from '../types';
2
- export declare const code: (maybeNode: WithMark | string) => WithMark;
2
+ export declare const code: (maybeNode: WithMark | string) => WithMark | import("@atlaskit/adf-schema").TextDefinition;
@@ -1,2 +1,2 @@
1
1
  import { WithMark } from '../types';
2
- export declare const em: (maybeNode: WithMark | string) => WithMark;
2
+ export declare const em: (maybeNode: WithMark | string) => WithMark | import("@atlaskit/adf-schema").TextDefinition;
@@ -1,3 +1,3 @@
1
1
  import { LinkAttributes } from '@atlaskit/adf-schema';
2
2
  import { WithMark } from '../types';
3
- export declare const link: (attrs: LinkAttributes) => (maybeNode: WithMark | string) => WithMark;
3
+ export declare const link: (attrs: LinkAttributes) => (maybeNode: WithMark | string) => WithMark | import("@atlaskit/adf-schema").TextDefinition;
@@ -1,2 +1,2 @@
1
1
  import { WithMark } from '../types';
2
- export declare const strike: (maybeNode: WithMark | string) => WithMark;
2
+ export declare const strike: (maybeNode: WithMark | string) => WithMark | import("@atlaskit/adf-schema").TextDefinition;
@@ -1,2 +1,2 @@
1
1
  import { WithMark } from '../types';
2
- export declare const strong: (maybeNode: WithMark | string) => WithMark;
2
+ export declare const strong: (maybeNode: WithMark | string) => WithMark | import("@atlaskit/adf-schema").TextDefinition;
@@ -1,3 +1,3 @@
1
1
  import { SubSupAttributes } from '@atlaskit/adf-schema';
2
2
  import { WithMark } from '../types';
3
- export declare const subsup: (attrs: SubSupAttributes) => (maybeNode: WithMark | string) => WithMark;
3
+ export declare const subsup: (attrs: SubSupAttributes) => (maybeNode: WithMark | string) => WithMark | import("@atlaskit/adf-schema").TextDefinition;
@@ -1,3 +1,3 @@
1
1
  import { TextColorAttributes } from '@atlaskit/adf-schema';
2
2
  import { WithMark } from '../types';
3
- export declare const textColor: (attrs: TextColorAttributes) => (maybeNode: WithMark | string) => WithMark;
3
+ export declare const textColor: (attrs: TextColorAttributes) => (maybeNode: WithMark | string) => WithMark | import("@atlaskit/adf-schema").TextDefinition;
@@ -1,2 +1,2 @@
1
1
  import { WithMark } from '../types';
2
- export declare const underline: (maybeNode: WithMark | string) => WithMark;
2
+ export declare const underline: (maybeNode: WithMark | string) => WithMark | import("@atlaskit/adf-schema").TextDefinition;
@@ -1,4 +1,4 @@
1
1
  import { WithMark } from '../types';
2
2
  export declare function applyMark<T>(mark: T & {
3
3
  type: string;
4
- }, maybeNode: WithMark | string): WithMark;
4
+ }, maybeNode: WithMark | string): WithMark | import("@atlaskit/adf-schema").TextDefinition;
@@ -5,4 +5,4 @@ export declare const isBoolean: (x: unknown) => x is boolean;
5
5
  export declare const isString: (s: unknown) => s is string;
6
6
  export declare const isPlainObject: (x: unknown) => boolean;
7
7
  export declare const copy: <T extends Record<string | number, any> = Record<string | number, any>>(source: Record<string | number, any>, dest: T, key: string | number) => T;
8
- export declare const makeArray: <T>(maybeArray: T | T[]) => T[];
8
+ export declare const makeArray: <T>(maybeArray: T | Array<T>) => T[];
@@ -6,7 +6,7 @@
6
6
  "sideEffects": false,
7
7
  "types": "../dist/types/empty-adf.d.ts",
8
8
  "typesVersions": {
9
- ">=4.5 <4.9": {
9
+ ">=4.5 <5.4": {
10
10
  "*": [
11
11
  "../dist/types-ts4.5/empty-adf.d.ts"
12
12
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/adf-utils",
3
- "version": "19.0.22",
3
+ "version": "19.0.24",
4
4
  "description": "Set of utilities to traverse, modify and create ADF documents.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -41,7 +41,7 @@
41
41
  "generate:spec": "rm -rf ./src/validator/specs/ && yarn json-schema-generator --outDir=./src/validator/specs/ --mode=Spec --stage=0 ./src/validator/entry.ts"
42
42
  },
43
43
  "dependencies": {
44
- "@atlaskit/adf-schema": "^35.5.2",
44
+ "@atlaskit/adf-schema": "^35.6.0",
45
45
  "@atlaskit/codemod-utils": "^4.2.0",
46
46
  "@atlaskit/platform-feature-flags": "^0.2.0",
47
47
  "@babel/runtime": "^7.0.0"
@@ -52,7 +52,7 @@
52
52
  "@atlassian/feature-flags-test-utils": "*",
53
53
  "jscodeshift": "^0.13.0",
54
54
  "react": "^16.8.0",
55
- "typescript": "~4.9.5",
55
+ "typescript": "~5.4.2",
56
56
  "wait-for-expect": "^1.2.0"
57
57
  },
58
58
  "techstack": {
@@ -74,4 +74,4 @@
74
74
  "type": "boolean"
75
75
  }
76
76
  }
77
- }
77
+ }
@@ -6,7 +6,7 @@
6
6
  "sideEffects": false,
7
7
  "types": "../dist/types/scrub.d.ts",
8
8
  "typesVersions": {
9
- ">=4.5 <4.9": {
9
+ ">=4.5 <5.4": {
10
10
  "*": [
11
11
  "../dist/types-ts4.5/scrub.d.ts"
12
12
  ]
@@ -6,7 +6,7 @@
6
6
  "sideEffects": false,
7
7
  "types": "../dist/types/transforms.d.ts",
8
8
  "typesVersions": {
9
- ">=4.5 <4.9": {
9
+ ">=4.5 <5.4": {
10
10
  "*": [
11
11
  "../dist/types-ts4.5/transforms.d.ts"
12
12
  ]
@@ -6,7 +6,7 @@
6
6
  "sideEffects": false,
7
7
  "types": "../dist/types/traverse.d.ts",
8
8
  "typesVersions": {
9
- ">=4.5 <4.9": {
9
+ ">=4.5 <5.4": {
10
10
  "*": [
11
11
  "../dist/types-ts4.5/traverse.d.ts"
12
12
  ]
@@ -6,7 +6,7 @@
6
6
  "sideEffects": false,
7
7
  "types": "../dist/types/types/index.d.ts",
8
8
  "typesVersions": {
9
- ">=4.5 <4.9": {
9
+ ">=4.5 <5.4": {
10
10
  "*": [
11
11
  "../dist/types-ts4.5/types/index.d.ts"
12
12
  ]
@@ -6,7 +6,7 @@
6
6
  "sideEffects": false,
7
7
  "types": "../dist/types/validator.d.ts",
8
8
  "typesVersions": {
9
- ">=4.5 <4.9": {
9
+ ">=4.5 <5.4": {
10
10
  "*": [
11
11
  "../dist/types-ts4.5/validator.d.ts"
12
12
  ]
@@ -6,7 +6,7 @@
6
6
  "sideEffects": false,
7
7
  "types": "../dist/types/types/validatorTypes.d.ts",
8
8
  "typesVersions": {
9
- ">=4.5 <4.9": {
9
+ ">=4.5 <5.4": {
10
10
  "*": [
11
11
  "../dist/types-ts4.5/types/validatorTypes.d.ts"
12
12
  ]