@atlaskit/adf-schema 25.3.2 → 25.5.0

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 (129) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/cjs/index.js +12 -0
  3. package/dist/cjs/schema/create-schema.js +3 -0
  4. package/dist/cjs/schema/default-schema.js +4 -0
  5. package/dist/cjs/schema/index.js +12 -0
  6. package/dist/cjs/schema/jira-schema.js +4 -0
  7. package/dist/cjs/schema/marks/alignment.js +4 -0
  8. package/dist/cjs/schema/marks/border.js +58 -0
  9. package/dist/cjs/schema/marks/breakout.js +5 -0
  10. package/dist/cjs/schema/marks/code.js +4 -0
  11. package/dist/cjs/schema/marks/data-consumer.js +17 -0
  12. package/dist/cjs/schema/marks/em.js +4 -0
  13. package/dist/cjs/schema/marks/fragment.js +6 -0
  14. package/dist/cjs/schema/marks/indentation.js +4 -0
  15. package/dist/cjs/schema/marks/index.js +14 -1
  16. package/dist/cjs/schema/marks/link.js +4 -0
  17. package/dist/cjs/schema/marks/strike.js +4 -0
  18. package/dist/cjs/schema/marks/strong.js +4 -0
  19. package/dist/cjs/schema/marks/subsup.js +4 -0
  20. package/dist/cjs/schema/marks/text-color.js +4 -0
  21. package/dist/cjs/schema/marks/underline.js +4 -0
  22. package/dist/cjs/schema/nodes/bodied-extension.js +8 -0
  23. package/dist/cjs/schema/nodes/code-block.js +12 -0
  24. package/dist/cjs/schema/nodes/decision-item.js +4 -0
  25. package/dist/cjs/schema/nodes/decision-list.js +4 -0
  26. package/dist/cjs/schema/nodes/emoji.js +4 -0
  27. package/dist/cjs/schema/nodes/extension.js +8 -0
  28. package/dist/cjs/schema/nodes/inline-extension.js +8 -0
  29. package/dist/cjs/schema/nodes/media-group.js +4 -1
  30. package/dist/cjs/schema/nodes/media-inline.js +4 -0
  31. package/dist/cjs/schema/nodes/media-single.js +1 -1
  32. package/dist/cjs/schema/nodes/media.js +4 -0
  33. package/dist/cjs/schema/nodes/mention.js +3 -0
  34. package/dist/cjs/schema/nodes/panel.js +3 -0
  35. package/dist/cjs/schema/nodes/paragraph.js +0 -3
  36. package/dist/cjs/schema/nodes/status.js +4 -0
  37. package/dist/cjs/schema/nodes/tableNodes.js +23 -0
  38. package/dist/cjs/schema/nodes/task-item.js +4 -0
  39. package/dist/cjs/schema/nodes/task-list.js +4 -0
  40. package/dist/cjs/steps/link-meta-step.js +112 -0
  41. package/dist/cjs/steps/table/utils/cells-at-column.js +4 -4
  42. package/dist/cjs/steps.js +8 -1
  43. package/dist/cjs/utils/colors.js +7 -1
  44. package/dist/cjs/version.json +1 -1
  45. package/dist/es2019/index.js +1 -1
  46. package/dist/es2019/schema/create-schema.js +4 -1
  47. package/dist/es2019/schema/default-schema.js +4 -0
  48. package/dist/es2019/schema/index.js +1 -1
  49. package/dist/es2019/schema/jira-schema.js +5 -0
  50. package/dist/es2019/schema/marks/alignment.js +5 -0
  51. package/dist/es2019/schema/marks/border.js +44 -0
  52. package/dist/es2019/schema/marks/breakout.js +5 -0
  53. package/dist/es2019/schema/marks/data-consumer.js +6 -0
  54. package/dist/es2019/schema/marks/fragment.js +7 -0
  55. package/dist/es2019/schema/marks/indentation.js +5 -0
  56. package/dist/es2019/schema/marks/index.js +2 -1
  57. package/dist/es2019/schema/marks/link.js +5 -0
  58. package/dist/es2019/schema/marks/subsup.js +5 -0
  59. package/dist/es2019/schema/marks/text-color.js +5 -0
  60. package/dist/es2019/schema/nodes/bodied-extension.js +9 -0
  61. package/dist/es2019/schema/nodes/code-block.js +13 -0
  62. package/dist/es2019/schema/nodes/decision-item.js +5 -0
  63. package/dist/es2019/schema/nodes/extension.js +9 -0
  64. package/dist/es2019/schema/nodes/heading.js +0 -2
  65. package/dist/es2019/schema/nodes/inline-extension.js +9 -0
  66. package/dist/es2019/schema/nodes/layout-section.js +0 -3
  67. package/dist/es2019/schema/nodes/media-group.js +4 -1
  68. package/dist/es2019/schema/nodes/media-inline.js +5 -0
  69. package/dist/es2019/schema/nodes/media-single.js +1 -1
  70. package/dist/es2019/schema/nodes/media.js +5 -0
  71. package/dist/es2019/schema/nodes/mention.js +3 -0
  72. package/dist/es2019/schema/nodes/panel.js +3 -0
  73. package/dist/es2019/schema/nodes/paragraph.js +0 -3
  74. package/dist/es2019/schema/nodes/tableNodes.js +23 -0
  75. package/dist/es2019/schema/nodes/task-item.js +5 -0
  76. package/dist/es2019/schema/nodes/task-list.js +5 -0
  77. package/dist/es2019/steps/link-meta-step.js +71 -0
  78. package/dist/es2019/steps.js +2 -1
  79. package/dist/es2019/utils/colors.js +3 -0
  80. package/dist/es2019/version.json +1 -1
  81. package/dist/esm/index.js +1 -1
  82. package/dist/esm/schema/create-schema.js +4 -1
  83. package/dist/esm/schema/default-schema.js +4 -0
  84. package/dist/esm/schema/index.js +1 -1
  85. package/dist/esm/schema/jira-schema.js +5 -0
  86. package/dist/esm/schema/marks/alignment.js +5 -0
  87. package/dist/esm/schema/marks/border.js +50 -0
  88. package/dist/esm/schema/marks/breakout.js +5 -0
  89. package/dist/esm/schema/marks/data-consumer.js +6 -0
  90. package/dist/esm/schema/marks/fragment.js +7 -0
  91. package/dist/esm/schema/marks/indentation.js +5 -0
  92. package/dist/esm/schema/marks/index.js +2 -1
  93. package/dist/esm/schema/marks/link.js +5 -0
  94. package/dist/esm/schema/marks/subsup.js +5 -0
  95. package/dist/esm/schema/marks/text-color.js +5 -0
  96. package/dist/esm/schema/nodes/bodied-extension.js +9 -0
  97. package/dist/esm/schema/nodes/code-block.js +13 -0
  98. package/dist/esm/schema/nodes/decision-item.js +5 -0
  99. package/dist/esm/schema/nodes/extension.js +9 -0
  100. package/dist/esm/schema/nodes/heading.js +0 -2
  101. package/dist/esm/schema/nodes/inline-extension.js +9 -0
  102. package/dist/esm/schema/nodes/layout-section.js +0 -3
  103. package/dist/esm/schema/nodes/media-group.js +4 -1
  104. package/dist/esm/schema/nodes/media-inline.js +5 -0
  105. package/dist/esm/schema/nodes/media-single.js +1 -1
  106. package/dist/esm/schema/nodes/media.js +5 -0
  107. package/dist/esm/schema/nodes/mention.js +3 -0
  108. package/dist/esm/schema/nodes/panel.js +3 -0
  109. package/dist/esm/schema/nodes/paragraph.js +0 -3
  110. package/dist/esm/schema/nodes/tableNodes.js +23 -0
  111. package/dist/esm/schema/nodes/task-item.js +5 -0
  112. package/dist/esm/schema/nodes/task-list.js +5 -0
  113. package/dist/esm/steps/link-meta-step.js +103 -0
  114. package/dist/esm/steps/table/utils/cells-at-column.js +4 -3
  115. package/dist/esm/steps.js +2 -1
  116. package/dist/esm/utils/colors.js +3 -0
  117. package/dist/esm/version.json +1 -1
  118. package/dist/json-schema/v1/stage-0.json +42 -1
  119. package/dist/types/index.d.ts +2 -2
  120. package/dist/types/schema/index.d.ts +2 -2
  121. package/dist/types/schema/marks/border.d.ts +24 -0
  122. package/dist/types/schema/marks/index.d.ts +2 -0
  123. package/dist/types/schema/nodes/media.d.ts +2 -1
  124. package/dist/types/steps/link-meta-step.d.ts +51 -0
  125. package/dist/types/steps.d.ts +2 -0
  126. package/dist/types/utils/colors.d.ts +3 -0
  127. package/json-schema/v1/stage-0.json +42 -1
  128. package/package.json +4 -4
  129. package/report.api.md +24 -1
@@ -0,0 +1,103 @@
1
+ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
2
+ import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
3
+ import _createClass from "@babel/runtime/helpers/createClass";
4
+ import _inherits from "@babel/runtime/helpers/inherits";
5
+ import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
6
+ import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
7
+ var _excluded = ["sourceEvent"];
8
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
9
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
10
+ import { Slice } from 'prosemirror-model';
11
+ import { ReplaceStep, Step, StepMap, StepResult } from 'prosemirror-transform';
12
+ export var stepType = 'editor-linking-meta';
13
+ export var invertStepType = 'editor-linking-meta-invert';
14
+ /**
15
+ * Custom Prosemirror Step to attach metadata about user interactions with links
16
+ * Using a Step means that it will work with prosemirror-history and we get utilise when
17
+ * firing events on history change
18
+ */
19
+ export var LinkMetaStep = /*#__PURE__*/function (_Step) {
20
+ _inherits(LinkMetaStep, _Step);
21
+ var _super = _createSuper(LinkMetaStep);
22
+ function LinkMetaStep(pos, metadata) {
23
+ var _this;
24
+ var isInverted = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
25
+ _classCallCheck(this, LinkMetaStep);
26
+ _this = _super.call(this);
27
+ _this.pos = pos;
28
+ _this.metadata = metadata;
29
+ _this.isInverted = isInverted;
30
+ return _this;
31
+ }
32
+ _createClass(LinkMetaStep, [{
33
+ key: "getMetadata",
34
+ value: function getMetadata() {
35
+ return this.metadata;
36
+ }
37
+
38
+ /**
39
+ * Generate new undo/redo analytics event when step is inverted
40
+ */
41
+ }, {
42
+ key: "invert",
43
+ value: function invert() {
44
+ /**
45
+ * Omit sourceEvent in history
46
+ */
47
+ var _this$metadata = this.metadata,
48
+ sourceEvent = _this$metadata.sourceEvent,
49
+ metadata = _objectWithoutProperties(_this$metadata, _excluded);
50
+ return new LinkMetaStep(this.pos, metadata, true);
51
+ }
52
+
53
+ // Should make no modifications to the doc
54
+ }, {
55
+ key: "apply",
56
+ value: function apply(doc) {
57
+ return StepResult.ok(doc);
58
+ }
59
+ }, {
60
+ key: "map",
61
+ value: function map(mapping) {
62
+ var newPos = this.pos;
63
+ if (typeof newPos === 'number') {
64
+ newPos = mapping.map(newPos);
65
+ }
66
+ // Return the same events, this step will never be removed
67
+ return new LinkMetaStep(newPos, this.metadata, this.isInverted);
68
+ }
69
+ }, {
70
+ key: "getMap",
71
+ value: function getMap() {
72
+ return new StepMap([this.pos || 0, 0, 0]);
73
+ }
74
+
75
+ // Return null to avoid merging events
76
+ }, {
77
+ key: "merge",
78
+ value: function merge() {
79
+ return null;
80
+ }
81
+ }, {
82
+ key: "toJSON",
83
+ value: function toJSON() {
84
+ // When serialized we should create a noop Replace step
85
+ return {
86
+ stepType: 'replace',
87
+ from: 0,
88
+ to: 0
89
+ };
90
+ }
91
+ }], [{
92
+ key: "fromJSON",
93
+ value: function fromJSON(_, __) {
94
+ // This is a "local custom step" once serialized
95
+ // we need to transform it in a no-operation action
96
+ return new ReplaceStep(0, 0, Slice.empty);
97
+ }
98
+ }]);
99
+ return LinkMetaStep;
100
+ }(Step);
101
+
102
+ /** Register this step with Prosemirror */
103
+ Step.jsonID(stepType, LinkMetaStep);
@@ -1,5 +1,6 @@
1
- import _regeneratorRuntime from "@babel/runtime/regenerator";
2
- var _marked = /*#__PURE__*/_regeneratorRuntime.mark(cellsAtColumn);
1
+ import _typeof from "@babel/runtime/helpers/typeof";
2
+ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
3
+ var _marked = /*#__PURE__*/_regeneratorRuntime().mark(cellsAtColumn);
3
4
  import { columnIsHeader, tableNodeTypes } from '@atlaskit/editor-tables/utils';
4
5
  import { getCellIndex, hasMergedColumns, isRootRow } from './table-map';
5
6
  /**
@@ -11,7 +12,7 @@ import { getCellIndex, hasMergedColumns, isRootRow } from './table-map';
11
12
  */
12
13
  export function cellsAtColumn(rect, col) {
13
14
  var map, tableStart, table, refColumn, row, index, pos, hasMergedCells, type, cell, cellInfo, skippedRows;
14
- return _regeneratorRuntime.wrap(function cellsAtColumn$(_context) {
15
+ return _regeneratorRuntime().wrap(function cellsAtColumn$(_context) {
15
16
  while (1) {
16
17
  switch (_context.prev = _context.next) {
17
18
  case 0:
package/dist/esm/steps.js CHANGED
@@ -3,4 +3,5 @@ export { TableSortStep } from './steps/table/sort-column';
3
3
  export { InsertTypeAheadStages, InsertTypeAheadStep } from './steps/type-ahead';
4
4
  export { AddColumnStep } from './steps/table/add-column';
5
5
  export { SetAttrsStep } from './steps/set-attrs';
6
- export { AnalyticsStep } from './steps/analytics';
6
+ export { AnalyticsStep } from './steps/analytics';
7
+ export { LinkMetaStep } from './steps/link-meta-step';
@@ -40,8 +40,11 @@ export var N80 = '#97A0AF';
40
40
  export var N90 = '#8993A4';
41
41
  export var N200 = '#6B778C';
42
42
  export var N300 = '#5E6C84';
43
+ export var N300A = '#091E4224';
43
44
  export var N500 = '#42526E';
45
+ export var N600 = '#758195';
44
46
  export var N800 = '#172B4D';
47
+ export var N1000 = '#172B4D';
45
48
  export var P50 = '#EAE6FF';
46
49
  export var P75 = '#C0B6F2';
47
50
  export var P100 = '#998DD9';
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/adf-schema",
3
- "version": "25.3.2",
3
+ "version": "25.5.0",
4
4
  "sideEffects": false
5
5
  }
@@ -458,6 +458,40 @@
458
458
  ],
459
459
  "additionalProperties": false
460
460
  },
461
+ "border_mark": {
462
+ "type": "object",
463
+ "properties": {
464
+ "type": {
465
+ "enum": [
466
+ "border"
467
+ ]
468
+ },
469
+ "attrs": {
470
+ "type": "object",
471
+ "properties": {
472
+ "size": {
473
+ "type": "number",
474
+ "minimum": 1,
475
+ "maximum": 3
476
+ },
477
+ "color": {
478
+ "type": "string",
479
+ "pattern": "^#[0-9a-fA-F]{8}$|^#[0-9a-fA-F]{6}$"
480
+ }
481
+ },
482
+ "required": [
483
+ "size",
484
+ "color"
485
+ ],
486
+ "additionalProperties": false
487
+ }
488
+ },
489
+ "required": [
490
+ "type",
491
+ "attrs"
492
+ ],
493
+ "additionalProperties": false
494
+ },
461
495
  "hardBreak_node": {
462
496
  "type": "object",
463
497
  "properties": {
@@ -887,7 +921,14 @@
887
921
  "marks": {
888
922
  "type": "array",
889
923
  "items": {
890
- "$ref": "#/definitions/link_mark"
924
+ "anyOf": [
925
+ {
926
+ "$ref": "#/definitions/link_mark"
927
+ },
928
+ {
929
+ "$ref": "#/definitions/border_mark"
930
+ }
931
+ ]
891
932
  }
892
933
  }
893
934
  },
@@ -1,6 +1,6 @@
1
1
  export { PanelType, AnnotationTypes, alignment, alignmentPositionMap, annotation, blockCard, blockquote, bodiedExtension, breakout, bulletList, bulletListSelector, caption, code, codeBlock, codeBlockToJSON, colorPalette,
2
2
  /** @deprecated [ED-15849] The extended palette is now rolled into the main one. Use `colorPalette` instead. */
3
- colorPaletteExtended, confluenceInlineComment, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, createSchema, dataConsumer, dataConsumerToJSON, date, decisionItem, decisionList, decisionListSelector, doc, em, embedCard, emoji, expand, expandToJSON, extension, fragment, fragmentToJSON, hardBreak, heading, image, indentation, inlineCard, inlineExtension, inlineNodes, layoutColumn, layoutSection, link, linkToJSON, listItem, media, mediaGroup, mediaSingle, mediaSingleWithCaption, mediaInline, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, orderedList, orderedListSelector, orderedListWithOrder, panel, paragraph, placeholder, rule, sanitizeNodes, getCellAttrs, getCellDomAttrs, status, strike, strong, subsup, table, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, taskList, taskListSelector, text, textColor, toJSONTableCell, toJSONTableHeader, typeAheadQuery, underline, unknownBlock, unsupportedBlock, unsupportedInline, unsupportedNodeTypesForMediaCards, buildAnnotationMarkDataAttributes, AnnotationMarkStates, unsupportedMark, unsupportedNodeAttribute, } from './schema';
4
- export type { AlignmentAttributes, AlignmentMarkDefinition, AnnotationMarkAttributes, AnnotationMarkDefinition, BlockCardDefinition, BlockContent, BlockQuoteDefinition, BodiedExtensionDefinition, BreakoutMarkAttrs, BreakoutMarkDefinition, BulletListDefinition, CaptionDefinition, CardAttributes, CellAttributes, CodeBlockAttrs, CodeBlockBaseDefinition, CodeBlockDefinition, CodeBlockWithMarksDefinition, CodeDefinition, DataConsumerAttributes, DataConsumerDefinition, DataType, DateDefinition, DecisionItemDefinition, DecisionListDefinition, DocNode, EmbedCardDefinition, EmbedCardAttributes, EmDefinition, EmojiAttributes, EmojiDefinition, ExpandDefinition, ExtensionDefinition, ExtensionLayout, ExternalMediaAttributes, FragmentAttributes, FragmentDefinition, HardBreakDefinition, HeadingBaseDefinition, HeadingDefinition, HeadingWithAlignmentDefinition, HeadingWithIndentationDefinition, HeadingWithMarksDefinition, IndentationMarkAttributes, IndentationMarkDefinition, Inline, InlineAtomic, InlineCardDefinition, InlineCode, InlineExtensionDefinition, InlineFormattedText, InlineLinkText, LayoutColumnDefinition, LayoutSectionDefinition, LayoutSectionFullDefinition, LayoutSectionWithSingleColumnDefinition, LinkAttributes, LinkDefinition, ListItemArray, ListItemDefinition, MarksObject, MediaADFAttrs, MediaAttributes, MediaInlineAttributes, MediaInlineDefinition, MediaBaseAttributes, MediaDefinition, MediaDisplayType, MediaGroupDefinition, MediaSingleDefinition, MediaType, MentionAttributes, MentionDefinition, MentionUserType, NestedExpandContent, NestedExpandDefinition, NoMark, NonNestableBlockContent, OrderedListDefinition, PanelAttributes, PanelDefinition, ParagraphBaseDefinition, ParagraphDefinition, ParagraphWithAlignmentDefinition, ParagraphWithIndentationDefinition, ParagraphWithMarksDefinition, PlaceholderDefinition, RuleDefinition, StatusDefinition, StrikeDefinition, StrongDefinition, SubSupAttributes, SubSupDefinition, TableAttributes, TableCellDefinition, TableDefinition, TableHeaderDefinition, TableLayout, TableRowDefinition, TaskItemDefinition, TaskListContent, TaskListDefinition, TextColorAttributes, TextColorDefinition, TextDefinition, UnderlineDefinition, UrlType, AnnotationId, RichMediaAttributes, RichMediaLayout, AnnotationDataAttributes, CellDomAttrs, } from './schema';
3
+ colorPaletteExtended, confluenceInlineComment, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, createSchema, dataConsumer, dataConsumerToJSON, date, decisionItem, decisionList, decisionListSelector, doc, em, embedCard, emoji, expand, expandToJSON, extension, fragment, fragmentToJSON, hardBreak, heading, image, indentation, inlineCard, inlineExtension, inlineNodes, layoutColumn, layoutSection, link, linkToJSON, listItem, media, mediaGroup, mediaSingle, mediaSingleWithCaption, mediaInline, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, orderedList, orderedListSelector, orderedListWithOrder, panel, paragraph, placeholder, rule, sanitizeNodes, getCellAttrs, getCellDomAttrs, status, strike, strong, subsup, table, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, taskList, taskListSelector, text, textColor, toJSONTableCell, toJSONTableHeader, typeAheadQuery, underline, unknownBlock, unsupportedBlock, unsupportedInline, unsupportedNodeTypesForMediaCards, buildAnnotationMarkDataAttributes, AnnotationMarkStates, unsupportedMark, unsupportedNodeAttribute, border, borderColorPalette, } from './schema';
4
+ export type { AlignmentAttributes, AlignmentMarkDefinition, AnnotationMarkAttributes, AnnotationMarkDefinition, BlockCardDefinition, BlockContent, BlockQuoteDefinition, BodiedExtensionDefinition, BreakoutMarkAttrs, BreakoutMarkDefinition, BulletListDefinition, CaptionDefinition, CardAttributes, CellAttributes, CodeBlockAttrs, CodeBlockBaseDefinition, CodeBlockDefinition, CodeBlockWithMarksDefinition, CodeDefinition, DataConsumerAttributes, DataConsumerDefinition, DataType, DateDefinition, DecisionItemDefinition, DecisionListDefinition, DocNode, EmbedCardDefinition, EmbedCardAttributes, EmDefinition, EmojiAttributes, EmojiDefinition, ExpandDefinition, ExtensionDefinition, ExtensionLayout, ExternalMediaAttributes, FragmentAttributes, FragmentDefinition, HardBreakDefinition, HeadingBaseDefinition, HeadingDefinition, HeadingWithAlignmentDefinition, HeadingWithIndentationDefinition, HeadingWithMarksDefinition, IndentationMarkAttributes, IndentationMarkDefinition, Inline, InlineAtomic, InlineCardDefinition, InlineCode, InlineExtensionDefinition, InlineFormattedText, InlineLinkText, LayoutColumnDefinition, LayoutSectionDefinition, LayoutSectionFullDefinition, LayoutSectionWithSingleColumnDefinition, LinkAttributes, LinkDefinition, ListItemArray, ListItemDefinition, MarksObject, MediaADFAttrs, MediaAttributes, MediaInlineAttributes, MediaInlineDefinition, MediaBaseAttributes, MediaDefinition, MediaDisplayType, MediaGroupDefinition, MediaSingleDefinition, MediaType, MentionAttributes, MentionDefinition, MentionUserType, NestedExpandContent, NestedExpandDefinition, NoMark, NonNestableBlockContent, OrderedListDefinition, PanelAttributes, PanelDefinition, ParagraphBaseDefinition, ParagraphDefinition, ParagraphWithAlignmentDefinition, ParagraphWithIndentationDefinition, ParagraphWithMarksDefinition, PlaceholderDefinition, RuleDefinition, StatusDefinition, StrikeDefinition, StrongDefinition, SubSupAttributes, SubSupDefinition, TableAttributes, TableCellDefinition, TableDefinition, TableHeaderDefinition, TableLayout, TableRowDefinition, TaskItemDefinition, TaskListContent, TaskListDefinition, TextColorAttributes, TextColorDefinition, TextDefinition, UnderlineDefinition, UrlType, AnnotationId, RichMediaAttributes, RichMediaLayout, AnnotationDataAttributes, CellDomAttrs, BorderMarkAttributes, BorderMarkDefinition, } from './schema';
5
5
  export { B100, B400, B50, B500, B75, G200, G300, G400, G50, G500, G75, N0, N20, N200, N30, N300, N40, N50, N500, N60, N80, N800, N90, P100, P300, P400, P50, P500, P75, R100, R300, R400, R50, R500, R75, T100, T300, T50, T500, T75, Y200, Y400, Y50, Y500, Y75, acNameToEmoji, acShortcutToEmoji, emojiIdToAcName, generateUuid, getEmojiAcName, getLinkMatch, hexToRgb, hexToRgba, isHex, isRgb, isSafeUrl, linkify, linkifyMatch, normalizeHexColor, normalizeUrl, rgbToHex, uuid, } from './utils';
6
6
  export type { Match, NameToEmoji } from './utils';
@@ -2,8 +2,8 @@ export { PanelType, blockCard, blockquote, bodiedExtension, bulletList, bulletLi
2
2
  export type { BlockCardDefinition, BlockContent, BlockQuoteDefinition, BodiedExtensionDefinition, BulletListDefinition, CaptionDefinition, CardAttributes, CellAttributes, CodeBlockAttrs, CodeBlockBaseDefinition, CodeBlockDefinition, CodeBlockWithMarksDefinition, DataType, DateDefinition, DecisionItemDefinition, DecisionListDefinition, DocNode, EmbedCardDefinition, EmbedCardAttributes, EmojiAttributes, EmojiDefinition, ExpandDefinition, ExtensionDefinition, ExtensionLayout, ExternalMediaAttributes, HardBreakDefinition, HeadingBaseDefinition, HeadingDefinition, HeadingWithAlignmentDefinition, HeadingWithIndentationDefinition, HeadingWithMarksDefinition, Inline, InlineAtomic, InlineCardDefinition, InlineCode, InlineExtensionDefinition, InlineFormattedText, InlineLinkText, LayoutColumnDefinition, LayoutSectionDefinition, LayoutSectionBaseDefinition, LayoutSectionFullDefinition, LayoutSectionWithSingleColumnDefinition, ListItemArray, ListItemDefinition, MarksObject, MediaADFAttrs, MediaAttributes, MediaInlineAttributes, MediaInlineDefinition, MediaBaseAttributes, MediaDefinition, MediaDisplayType, MediaGroupDefinition, MediaSingleDefinition, MediaType, MentionAttributes, MentionDefinition, MentionUserType, NestedExpandContent, NestedExpandDefinition, NoMark, NonNestableBlockContent, OrderedListDefinition, PanelAttributes, PanelDefinition, ParagraphBaseDefinition, ParagraphDefinition, ParagraphWithAlignmentDefinition, ParagraphWithIndentationDefinition, ParagraphWithMarksDefinition, PlaceholderDefinition, RuleDefinition, StatusDefinition, TableAttributes, TableCellDefinition, TableDefinition, TableHeaderDefinition, TableLayout, TableRowDefinition, TaskItemDefinition, TaskListContent, TaskListDefinition, TextDefinition, UrlType, RichMediaAttributes, RichMediaLayout, CellDomAttrs, } from './nodes';
3
3
  export { AnnotationTypes, alignment, alignmentPositionMap, annotation, breakout, code, colorPalette,
4
4
  /** @deprecated [ED-15849] The extended palette is now rolled into the main one. Use `colorPalette` instead. */
5
- colorPaletteExtended, confluenceInlineComment, dataConsumer, dataConsumerToJSON, em, fragment, fragmentToJSON, indentation, link, linkToJSON, strike, strong, subsup, textColor, typeAheadQuery, underline, buildAnnotationMarkDataAttributes, AnnotationMarkStates, unsupportedMark, unsupportedNodeAttribute, } from './marks';
6
- export type { AlignmentAttributes, AlignmentMarkDefinition, AnnotationMarkAttributes, AnnotationMarkDefinition, BreakoutMarkAttrs, BreakoutMarkDefinition, CodeDefinition, EmDefinition, FragmentAttributes, FragmentDefinition, IndentationMarkAttributes, IndentationMarkDefinition, LinkAttributes, LinkDefinition, StrikeDefinition, StrongDefinition, SubSupAttributes, SubSupDefinition, TextColorAttributes, TextColorDefinition, UnderlineDefinition, AnnotationId, AnnotationDataAttributes, DataConsumerAttributes, DataConsumerDefinition, } from './marks';
5
+ colorPaletteExtended, confluenceInlineComment, dataConsumer, dataConsumerToJSON, em, fragment, fragmentToJSON, indentation, link, linkToJSON, strike, strong, subsup, textColor, typeAheadQuery, underline, buildAnnotationMarkDataAttributes, AnnotationMarkStates, unsupportedMark, unsupportedNodeAttribute, border, borderColorPalette, } from './marks';
6
+ export type { AlignmentAttributes, AlignmentMarkDefinition, AnnotationMarkAttributes, AnnotationMarkDefinition, BreakoutMarkAttrs, BreakoutMarkDefinition, CodeDefinition, EmDefinition, FragmentAttributes, FragmentDefinition, IndentationMarkAttributes, IndentationMarkDefinition, LinkAttributes, LinkDefinition, StrikeDefinition, StrongDefinition, SubSupAttributes, SubSupDefinition, TextColorAttributes, TextColorDefinition, UnderlineDefinition, AnnotationId, AnnotationDataAttributes, DataConsumerAttributes, DataConsumerDefinition, BorderMarkAttributes, BorderMarkDefinition, } from './marks';
7
7
  export { unsupportedNodeTypesForMediaCards } from './unsupported';
8
8
  export { inlineNodes } from './inline-nodes';
9
9
  export { sanitizeNodes, createSchema } from './create-schema';
@@ -0,0 +1,24 @@
1
+ import { MarkSpec } from 'prosemirror-model';
2
+ export declare type BorderMarkAttributes = {
3
+ /**
4
+ * @minimum 1
5
+ * @maximum 3
6
+ */
7
+ size: number;
8
+ /**
9
+ * @pattern "^#[0-9a-fA-F]{8}$|^#[0-9a-fA-F]{6}$"
10
+ */
11
+ color: string;
12
+ };
13
+ /**
14
+ * @name border_mark
15
+ * @stage 0
16
+ * @description This mark adds decoration to an element, and any element decorated with it will also have a border style.
17
+ */
18
+ export interface BorderMarkDefinition {
19
+ type: 'border';
20
+ attrs: BorderMarkAttributes;
21
+ }
22
+ export declare type BorderColorKey = 'Subtle gray' | 'Gray' | 'Bold gray';
23
+ export declare const borderColorPalette: Map<string, BorderColorKey>;
24
+ export declare const border: MarkSpec;
@@ -30,3 +30,5 @@ export type { DataConsumerAttributes, DataConsumerDefinition, } from './data-con
30
30
  export { dataConsumer, toJSON as dataConsumerToJSON } from './data-consumer';
31
31
  export type { FragmentAttributes, FragmentDefinition, LocalId, } from './fragment';
32
32
  export { fragment, toJSON as fragmentToJSON } from './fragment';
33
+ export { border, borderColorPalette } from './border';
34
+ export type { BorderMarkAttributes, BorderMarkDefinition } from './border';
@@ -1,4 +1,5 @@
1
1
  import { NodeSpec, Node as PMNode } from 'prosemirror-model';
2
+ import { BorderMarkDefinition } from '../marks/border';
2
3
  import { LinkDefinition } from '../marks/link';
3
4
  export declare type MediaType = 'file' | 'link' | 'external';
4
5
  export declare type DisplayType = 'file' | 'thumbnail';
@@ -16,7 +17,7 @@ export interface MediaDefinition {
16
17
  * @minItems 1
17
18
  */
18
19
  attrs: MediaADFAttrs;
19
- marks?: Array<LinkDefinition>;
20
+ marks?: Array<LinkDefinition | BorderMarkDefinition>;
20
21
  }
21
22
  export interface MediaBaseAttributes {
22
23
  /**
@@ -0,0 +1,51 @@
1
+ import { Node as PMNode, Schema } from 'prosemirror-model';
2
+ import { ReplaceStep, Step, StepMap, StepResult, Mappable } from 'prosemirror-transform';
3
+ export declare const stepType = "editor-linking-meta";
4
+ export declare const invertStepType = "editor-linking-meta-invert";
5
+ export declare type LinkStepMetadata = {
6
+ /**
7
+ * Editor action performed
8
+ */
9
+ action?: string;
10
+ /**
11
+ * Editor input method that triggered the transaction
12
+ */
13
+ inputMethod?: string;
14
+ /**
15
+ * The applicable card action for this step
16
+ * if is RESOLVE then the undo/redo steps should be considered "updates" of a link
17
+ */
18
+ cardAction?: 'RESOLVE';
19
+ /**
20
+ * Source UI that tiggered this step, if available/applicable
21
+ */
22
+ sourceEvent?: unknown;
23
+ };
24
+ /**
25
+ * Custom Prosemirror Step to attach metadata about user interactions with links
26
+ * Using a Step means that it will work with prosemirror-history and we get utilise when
27
+ * firing events on history change
28
+ */
29
+ export declare class LinkMetaStep extends Step {
30
+ private pos;
31
+ private metadata;
32
+ private isInverted;
33
+ constructor(pos: number | null, metadata: LinkStepMetadata, isInverted?: boolean);
34
+ getMetadata(): LinkStepMetadata;
35
+ /**
36
+ * Generate new undo/redo analytics event when step is inverted
37
+ */
38
+ invert(): LinkMetaStep;
39
+ apply(doc: PMNode): StepResult<any>;
40
+ map(mapping: Mappable): LinkMetaStep;
41
+ getMap(): StepMap;
42
+ merge(): null;
43
+ toJSON(): {
44
+ stepType: string;
45
+ from: number;
46
+ to: number;
47
+ };
48
+ static fromJSON<S extends Schema = any>(_: S, __: {
49
+ [key: string]: any;
50
+ }): ReplaceStep<any>;
51
+ }
@@ -6,3 +6,5 @@ export { SetAttrsStep } from './steps/set-attrs';
6
6
  export { AnalyticsStep } from './steps/analytics';
7
7
  export type { TableColumnOrdering } from './steps/table/types';
8
8
  export type { AnalyticsInvertStep, AnalyticsWithChannel, AnalyticsPayload, } from './steps/analytics';
9
+ export { LinkMetaStep } from './steps/link-meta-step';
10
+ export type { LinkStepMetadata } from './steps/link-meta-step';
@@ -36,8 +36,11 @@ export declare const N80 = "#97A0AF";
36
36
  export declare const N90 = "#8993A4";
37
37
  export declare const N200 = "#6B778C";
38
38
  export declare const N300 = "#5E6C84";
39
+ export declare const N300A = "#091E4224";
39
40
  export declare const N500 = "#42526E";
41
+ export declare const N600 = "#758195";
40
42
  export declare const N800 = "#172B4D";
43
+ export declare const N1000 = "#172B4D";
41
44
  export declare const P50 = "#EAE6FF";
42
45
  export declare const P75 = "#C0B6F2";
43
46
  export declare const P100 = "#998DD9";
@@ -458,6 +458,40 @@
458
458
  ],
459
459
  "additionalProperties": false
460
460
  },
461
+ "border_mark": {
462
+ "type": "object",
463
+ "properties": {
464
+ "type": {
465
+ "enum": [
466
+ "border"
467
+ ]
468
+ },
469
+ "attrs": {
470
+ "type": "object",
471
+ "properties": {
472
+ "size": {
473
+ "type": "number",
474
+ "minimum": 1,
475
+ "maximum": 3
476
+ },
477
+ "color": {
478
+ "type": "string",
479
+ "pattern": "^#[0-9a-fA-F]{8}$|^#[0-9a-fA-F]{6}$"
480
+ }
481
+ },
482
+ "required": [
483
+ "size",
484
+ "color"
485
+ ],
486
+ "additionalProperties": false
487
+ }
488
+ },
489
+ "required": [
490
+ "type",
491
+ "attrs"
492
+ ],
493
+ "additionalProperties": false
494
+ },
461
495
  "hardBreak_node": {
462
496
  "type": "object",
463
497
  "properties": {
@@ -887,7 +921,14 @@
887
921
  "marks": {
888
922
  "type": "array",
889
923
  "items": {
890
- "$ref": "#/definitions/link_mark"
924
+ "anyOf": [
925
+ {
926
+ "$ref": "#/definitions/link_mark"
927
+ },
928
+ {
929
+ "$ref": "#/definitions/border_mark"
930
+ }
931
+ ]
891
932
  }
892
933
  }
893
934
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/adf-schema",
3
- "version": "25.3.2",
3
+ "version": "25.5.0",
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
  },
41
41
  "dependencies": {
42
42
  "@atlaskit/codemod-utils": "^4.1.0",
43
- "@atlaskit/editor-palette": "1.1.0",
43
+ "@atlaskit/editor-palette": "1.3.0",
44
44
  "@atlaskit/editor-tables": "^2.2.0",
45
45
  "@atlaskit/tokens": "^1.2.1",
46
46
  "@babel/runtime": "^7.0.0",
@@ -54,9 +54,9 @@
54
54
  "prosemirror-transform": "1.3.2"
55
55
  },
56
56
  "devDependencies": {
57
- "@atlaskit/adf-utils": "^18.0.0",
57
+ "@atlaskit/adf-utils": "^18.1.0",
58
58
  "@atlaskit/editor-json-transformer": "^8.8.0",
59
- "@atlaskit/editor-test-helpers": "^18.1.0",
59
+ "@atlaskit/editor-test-helpers": "^18.2.0",
60
60
  "@atlaskit/json-schema-generator": "^3.3.0",
61
61
  "@atlassian/adf-sample": "^1.1.0",
62
62
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
package/report.api.md CHANGED
@@ -206,6 +206,29 @@ interface BodiedExtensionBaseDefinition {
206
206
  export type BodiedExtensionDefinition = BodiedExtensionBaseDefinition &
207
207
  MarksObject<DataConsumerDefinition | FragmentDefinition>;
208
208
 
209
+ // @public (undocumented)
210
+ export const border: MarkSpec;
211
+
212
+ // @public (undocumented)
213
+ type BorderColorKey = 'Bold gray' | 'Gray' | 'Subtle gray';
214
+
215
+ // @public (undocumented)
216
+ export const borderColorPalette: Map<string, BorderColorKey>;
217
+
218
+ // @public (undocumented)
219
+ export type BorderMarkAttributes = {
220
+ size: number;
221
+ color: string;
222
+ };
223
+
224
+ // @public
225
+ export interface BorderMarkDefinition {
226
+ // (undocumented)
227
+ attrs: BorderMarkAttributes;
228
+ // (undocumented)
229
+ type: 'border';
230
+ }
231
+
209
232
  // @public (undocumented)
210
233
  export const breakout: MarkSpec;
211
234
 
@@ -1027,7 +1050,7 @@ export interface MediaDefinition {
1027
1050
  // (undocumented)
1028
1051
  attrs: MediaADFAttrs;
1029
1052
  // (undocumented)
1030
- marks?: Array<LinkDefinition>;
1053
+ marks?: Array<BorderMarkDefinition | LinkDefinition>;
1031
1054
  // (undocumented)
1032
1055
  type: 'media';
1033
1056
  }