@atlaskit/adf-schema 36.8.5 → 36.9.1
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 +12 -0
- package/dist/cjs/next-schema/groups/inlineGroup.js +3 -1
- package/dist/cjs/next-schema/marks/link.js +7 -3
- package/dist/cjs/schema/nodes/mention.js +2 -1
- package/dist/es2019/next-schema/groups/inlineGroup.js +3 -1
- package/dist/es2019/next-schema/marks/link.js +7 -3
- package/dist/es2019/schema/nodes/mention.js +2 -1
- package/dist/esm/next-schema/groups/inlineGroup.js +3 -1
- package/dist/esm/next-schema/marks/link.js +7 -3
- package/dist/esm/schema/nodes/mention.js +2 -1
- package/package.json +3 -3
- package/schema-generators/pm-full-schema.ts +4 -4
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,17 @@
|
|
1
1
|
# @atlaskit/adf-schema
|
2
2
|
|
3
|
+
## 36.9.1
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- c55acf7: fix circlue deps issue in link mark | minor dsl update
|
8
|
+
|
9
|
+
## 36.9.0
|
10
|
+
|
11
|
+
### Minor Changes
|
12
|
+
|
13
|
+
- c8ecca1: Generate new uuid to support copy paste in mentionNode
|
14
|
+
|
3
15
|
## 36.8.5
|
4
16
|
|
5
17
|
### Patch Changes
|
@@ -15,4 +15,6 @@ var _text = require("../nodes/text");
|
|
15
15
|
var _status = require("../nodes/status");
|
16
16
|
var _inlineExtension = require("../nodes/inlineExtension");
|
17
17
|
var _mediaInline = require("../nodes/mediaInline");
|
18
|
-
var inlineGroup = exports.inlineGroup = (0, _adfSchemaGenerator.adfNodeGroup)('inline', [
|
18
|
+
var inlineGroup = exports.inlineGroup = (0, _adfSchemaGenerator.adfNodeGroup)('inline', [
|
19
|
+
// text,
|
20
|
+
_text.text.use('formatted'), _text.text.use('code_inline'), _date.date, _emoji.emoji, _hardBreak.hardBreak, _inlineCard.inlineCard, _mention.mention, _placeholder.placeholder, _status.status, _inlineExtension.inlineExtension, _inlineExtension.inlineExtension.use('with_marks'), _mediaInline.mediaInline]);
|
@@ -5,9 +5,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
});
|
6
6
|
exports.link = void 0;
|
7
7
|
var _adfSchemaGenerator = require("@atlaskit/adf-schema-generator");
|
8
|
-
var
|
9
|
-
|
10
|
-
|
8
|
+
var link = exports.link = (0, _adfSchemaGenerator.adfMark)('link');
|
9
|
+
|
10
|
+
// import { linkMarketGroup } from '../groups/linkMarkGroup' would cause circular deps issue
|
11
|
+
var linkMarkGroup = (0, _adfSchemaGenerator.adfMarkGroup)('link', [link]);
|
12
|
+
link.define({
|
13
|
+
// it seems unnessary to have it here?
|
14
|
+
excludes: [linkMarkGroup],
|
11
15
|
inclusive: false,
|
12
16
|
attrs: {
|
13
17
|
href: {
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
});
|
7
7
|
exports.toJSON = exports.mention = exports.USER_TYPES = void 0;
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
9
|
+
var _utils = require("../../utils");
|
9
10
|
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; }
|
10
11
|
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; }
|
11
12
|
var USER_TYPES = exports.USER_TYPES = /*#__PURE__*/function (USER_TYPES) {
|
@@ -46,7 +47,7 @@ var mention = exports.mention = {
|
|
46
47
|
id: dom.getAttribute('data-mention-id') || mention.attrs.id.default,
|
47
48
|
text: dom.textContent || mention.attrs.text.default,
|
48
49
|
accessLevel: dom.getAttribute('data-access-level') || mention.attrs.accessLevel.default,
|
49
|
-
localId:
|
50
|
+
localId: _utils.uuid.generate()
|
50
51
|
};
|
51
52
|
var userType = dom.getAttribute('data-user-type');
|
52
53
|
if (USER_TYPES[userType]) {
|
@@ -9,4 +9,6 @@ import { text } from '../nodes/text';
|
|
9
9
|
import { status } from '../nodes/status';
|
10
10
|
import { inlineExtension } from '../nodes/inlineExtension';
|
11
11
|
import { mediaInline } from '../nodes/mediaInline';
|
12
|
-
export const inlineGroup = adfNodeGroup('inline', [
|
12
|
+
export const inlineGroup = adfNodeGroup('inline', [
|
13
|
+
// text,
|
14
|
+
text.use('formatted'), text.use('code_inline'), date, emoji, hardBreak, inlineCard, mention, placeholder, status, inlineExtension, inlineExtension.use('with_marks'), mediaInline]);
|
@@ -1,6 +1,10 @@
|
|
1
|
-
import { adfMark } from '@atlaskit/adf-schema-generator';
|
2
|
-
|
3
|
-
|
1
|
+
import { adfMark, adfMarkGroup } from '@atlaskit/adf-schema-generator';
|
2
|
+
export const link = adfMark('link');
|
3
|
+
|
4
|
+
// import { linkMarketGroup } from '../groups/linkMarkGroup' would cause circular deps issue
|
5
|
+
const linkMarkGroup = adfMarkGroup('link', [link]);
|
6
|
+
link.define({
|
7
|
+
// it seems unnessary to have it here?
|
4
8
|
excludes: [linkMarkGroup],
|
5
9
|
inclusive: false,
|
6
10
|
attrs: {
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import { uuid } from '../../utils';
|
1
2
|
export let USER_TYPES = /*#__PURE__*/function (USER_TYPES) {
|
2
3
|
USER_TYPES["DEFAULT"] = "DEFAULT";
|
3
4
|
USER_TYPES["SPECIAL"] = "SPECIAL";
|
@@ -38,7 +39,7 @@ export const mention = {
|
|
38
39
|
id: dom.getAttribute('data-mention-id') || mention.attrs.id.default,
|
39
40
|
text: dom.textContent || mention.attrs.text.default,
|
40
41
|
accessLevel: dom.getAttribute('data-access-level') || mention.attrs.accessLevel.default,
|
41
|
-
localId:
|
42
|
+
localId: uuid.generate()
|
42
43
|
};
|
43
44
|
const userType = dom.getAttribute('data-user-type');
|
44
45
|
if (USER_TYPES[userType]) {
|
@@ -9,4 +9,6 @@ import { text } from '../nodes/text';
|
|
9
9
|
import { status } from '../nodes/status';
|
10
10
|
import { inlineExtension } from '../nodes/inlineExtension';
|
11
11
|
import { mediaInline } from '../nodes/mediaInline';
|
12
|
-
export var inlineGroup = adfNodeGroup('inline', [
|
12
|
+
export var inlineGroup = adfNodeGroup('inline', [
|
13
|
+
// text,
|
14
|
+
text.use('formatted'), text.use('code_inline'), date, emoji, hardBreak, inlineCard, mention, placeholder, status, inlineExtension, inlineExtension.use('with_marks'), mediaInline]);
|
@@ -1,6 +1,10 @@
|
|
1
|
-
import { adfMark } from '@atlaskit/adf-schema-generator';
|
2
|
-
|
3
|
-
|
1
|
+
import { adfMark, adfMarkGroup } from '@atlaskit/adf-schema-generator';
|
2
|
+
export var link = adfMark('link');
|
3
|
+
|
4
|
+
// import { linkMarketGroup } from '../groups/linkMarkGroup' would cause circular deps issue
|
5
|
+
var linkMarkGroup = adfMarkGroup('link', [link]);
|
6
|
+
link.define({
|
7
|
+
// it seems unnessary to have it here?
|
4
8
|
excludes: [linkMarkGroup],
|
5
9
|
inclusive: false,
|
6
10
|
attrs: {
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
2
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
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; }
|
4
|
+
import { uuid } from '../../utils';
|
4
5
|
export var USER_TYPES = /*#__PURE__*/function (USER_TYPES) {
|
5
6
|
USER_TYPES["DEFAULT"] = "DEFAULT";
|
6
7
|
USER_TYPES["SPECIAL"] = "SPECIAL";
|
@@ -41,7 +42,7 @@ export var mention = {
|
|
41
42
|
id: dom.getAttribute('data-mention-id') || mention.attrs.id.default,
|
42
43
|
text: dom.textContent || mention.attrs.text.default,
|
43
44
|
accessLevel: dom.getAttribute('data-access-level') || mention.attrs.accessLevel.default,
|
44
|
-
localId:
|
45
|
+
localId: uuid.generate()
|
45
46
|
};
|
46
47
|
var userType = dom.getAttribute('data-user-type');
|
47
48
|
if (USER_TYPES[userType]) {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@atlaskit/adf-schema",
|
3
|
-
"version": "36.
|
3
|
+
"version": "36.9.1",
|
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/"
|
@@ -28,7 +28,7 @@
|
|
28
28
|
"build:jsontypes": "mkdir -p dist/types/json-schema && cp src/json-schema/index.ts dist/types/json-schema/index.d.ts",
|
29
29
|
"build:all": "yarn build:cjs && yarn build:esm && yarn build:es2019 && yarn build:types",
|
30
30
|
"build": "yarn workspace @atlaskit/editor-prosemirror build && yarn workspace @atlaskit/adf-schema-generator build && yarn run build:all && yarn run generate:json-schema && yarn run build:json-schema",
|
31
|
-
"build:pm:full": "yarn ts-node ./schema-generators/pm-full-schema.ts",
|
31
|
+
"build:pm:full": "yarn ts-node ./schema-generators/pm-full-schema.ts && prettier --write '../adf-schema-generator/src/generated/**/*.ts'",
|
32
32
|
"build:json:full": "yarn ts-node ./schema-generators/json-full-schema.ts",
|
33
33
|
"clean": "../../scripts/build-clean.sh",
|
34
34
|
"link:afe": "yarn build:all && node ./copy-dist-to-afe.js"
|
@@ -44,7 +44,7 @@
|
|
44
44
|
},
|
45
45
|
"devDependencies": {
|
46
46
|
"@atlassian/adf-schema-json": "^1.15.0",
|
47
|
-
"@atlaskit/adf-schema-generator": "^1.7.
|
47
|
+
"@atlaskit/adf-schema-generator": "^1.7.5",
|
48
48
|
"@babel/cli": "^7.22.9",
|
49
49
|
"@babel/core": "^7.22.9",
|
50
50
|
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
@@ -1,13 +1,13 @@
|
|
1
1
|
import { adfToPm } from '@atlaskit/adf-schema-generator';
|
2
2
|
import adfNode from 'src/next-schema/full-schema.adf';
|
3
|
+
import { writeToFile } from '../../adf-schema-generator/src/transforms/codeGenHelpers';
|
3
4
|
|
4
5
|
function main() {
|
5
6
|
const output = adfToPm(adfNode);
|
6
7
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
});
|
8
|
+
writeToFile('nodeTypes', output.pmNodes);
|
9
|
+
writeToFile('markTypes', output.pmMarks);
|
10
|
+
writeToFile('nodeGroupTypes', output.pmNodeGroups);
|
11
11
|
}
|
12
12
|
|
13
13
|
main();
|