@atlaskit/adf-schema 36.9.0 → 36.9.2
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/utils/uuid.js +2 -7
- package/dist/es2019/next-schema/groups/inlineGroup.js +3 -1
- package/dist/es2019/next-schema/marks/link.js +7 -3
- package/dist/es2019/utils/uuid.js +4 -7
- package/dist/esm/next-schema/groups/inlineGroup.js +3 -1
- package/dist/esm/next-schema/marks/link.js +7 -3
- package/dist/esm/utils/uuid.js +2 -7
- package/dist/types/utils/uuid.d.ts +2 -2
- package/package.json +5 -4
- 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.2
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- 6e9e5d6: migrated uuid function to use uuid npm package instead of custom random logic
|
8
|
+
|
9
|
+
## 36.9.1
|
10
|
+
|
11
|
+
### Patch Changes
|
12
|
+
|
13
|
+
- c55acf7: fix circlue deps issue in link mark | minor dsl update
|
14
|
+
|
3
15
|
## 36.9.0
|
4
16
|
|
5
17
|
### Minor 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: {
|
package/dist/cjs/utils/uuid.js
CHANGED
@@ -4,15 +4,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
5
5
|
});
|
6
6
|
exports.uuid = exports.generateUuid = void 0;
|
7
|
-
|
7
|
+
var _uuid = require("uuid");
|
8
8
|
var generateUuid = exports.generateUuid = function generateUuid() {
|
9
|
-
return
|
10
|
-
var r = Math.random() * 16 | 0;
|
11
|
-
return (c === 'x' ? r : r & 0x3 | 0x8).toString(16);
|
12
|
-
});
|
9
|
+
return (0, _uuid.v4)();
|
13
10
|
};
|
14
|
-
/* eslint-enable no-bitwise */
|
15
|
-
|
16
11
|
var staticValue = false;
|
17
12
|
var uuid = exports.uuid = {
|
18
13
|
setStatic: function setStatic(value) {
|
@@ -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,10 +1,7 @@
|
|
1
|
-
|
2
|
-
export const generateUuid = () =>
|
3
|
-
|
4
|
-
|
5
|
-
});
|
6
|
-
/* eslint-enable no-bitwise */
|
7
|
-
|
1
|
+
import { v4 as uuidGen } from 'uuid';
|
2
|
+
export const generateUuid = () => {
|
3
|
+
return uuidGen();
|
4
|
+
};
|
8
5
|
let staticValue = false;
|
9
6
|
export const uuid = {
|
10
7
|
setStatic(value) {
|
@@ -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: {
|
package/dist/esm/utils/uuid.js
CHANGED
@@ -1,12 +1,7 @@
|
|
1
|
-
|
1
|
+
import { v4 as uuidGen } from 'uuid';
|
2
2
|
export var generateUuid = function generateUuid() {
|
3
|
-
return
|
4
|
-
var r = Math.random() * 16 | 0;
|
5
|
-
return (c === 'x' ? r : r & 0x3 | 0x8).toString(16);
|
6
|
-
});
|
3
|
+
return uuidGen();
|
7
4
|
};
|
8
|
-
/* eslint-enable no-bitwise */
|
9
|
-
|
10
5
|
var staticValue = false;
|
11
6
|
export var uuid = {
|
12
7
|
setStatic: function setStatic(value) {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@atlaskit/adf-schema",
|
3
|
-
"version": "36.9.
|
3
|
+
"version": "36.9.2",
|
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"
|
@@ -40,11 +40,12 @@
|
|
40
40
|
"@babel/runtime": "^7.0.0",
|
41
41
|
"css-color-names": "0.0.4",
|
42
42
|
"linkify-it": "^2.0.3",
|
43
|
-
"memoize-one": "^6.0.0"
|
43
|
+
"memoize-one": "^6.0.0",
|
44
|
+
"uuid": "^9.0.1"
|
44
45
|
},
|
45
46
|
"devDependencies": {
|
46
47
|
"@atlassian/adf-schema-json": "^1.15.0",
|
47
|
-
"@atlaskit/adf-schema-generator": "^1.7.
|
48
|
+
"@atlaskit/adf-schema-generator": "^1.7.5",
|
48
49
|
"@babel/cli": "^7.22.9",
|
49
50
|
"@babel/core": "^7.22.9",
|
50
51
|
"@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();
|