pro-editor-schema 0.0.1-alpha.2 → 0.0.1-alpha.5

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/dist/index.d.mts CHANGED
@@ -6,13 +6,13 @@ declare enum ELEMENT_ROLE {
6
6
  }
7
7
  type SchemaKind = "element" | "atom" | "inline" | "group";
8
8
  type FreeAttribute = string;
9
- type RestrictedAttribute<T extends readonly string[] = readonly string[]> = {
9
+ type RestrictedAttribute<T = readonly string[]> = {
10
10
  name: string;
11
11
  values: T;
12
12
  defaultValue: string;
13
13
  };
14
- type AttributeDefinition<T extends readonly string[] = readonly string[]> = FreeAttribute | RestrictedAttribute<T>;
15
- type Schema<TRequiredAttributes extends readonly AttributeDefinition[] = readonly AttributeDefinition[], TOptionalAttributes extends readonly AttributeDefinition[] = readonly AttributeDefinition[]> = {
14
+ type AttributeDefinition<T = readonly string[]> = FreeAttribute | RestrictedAttribute<T>;
15
+ type Schema<TRequiredAttributes = readonly AttributeDefinition[], TOptionalAttributes = readonly AttributeDefinition[]> = {
16
16
  kind: SchemaKind;
17
17
  tag: string;
18
18
  role?: ELEMENT_ROLE;
@@ -21,96 +21,19 @@ type Schema<TRequiredAttributes extends readonly AttributeDefinition[] = readonl
21
21
  allowedChildTagNames: ReadonlySet<string>;
22
22
  };
23
23
 
24
- type schema_types_AttributeDefinition<T extends readonly string[] = readonly string[]> = AttributeDefinition<T>;
25
- type schema_types_ELEMENT_ROLE = ELEMENT_ROLE;
26
- declare const schema_types_ELEMENT_ROLE: typeof ELEMENT_ROLE;
27
- type schema_types_FreeAttribute = FreeAttribute;
28
- type schema_types_RestrictedAttribute<T extends readonly string[] = readonly string[]> = RestrictedAttribute<T>;
29
- type schema_types_Schema<TRequiredAttributes extends readonly AttributeDefinition[] = readonly AttributeDefinition[], TOptionalAttributes extends readonly AttributeDefinition[] = readonly AttributeDefinition[]> = Schema<TRequiredAttributes, TOptionalAttributes>;
30
- type schema_types_SchemaKind = SchemaKind;
31
- declare namespace schema_types {
32
- export { type schema_types_AttributeDefinition as AttributeDefinition, schema_types_ELEMENT_ROLE as ELEMENT_ROLE, type schema_types_FreeAttribute as FreeAttribute, type schema_types_RestrictedAttribute as RestrictedAttribute, type schema_types_Schema as Schema, type schema_types_SchemaKind as SchemaKind };
33
- }
34
-
35
24
  declare const SCHEMAS: ReadonlyArray<Schema>;
36
- declare const schemas: {
37
- [k: string]: Schema;
38
- };
39
-
40
- declare const schemas$1_SCHEMAS: typeof SCHEMAS;
41
- declare const schemas$1_schemas: typeof schemas;
42
- declare namespace schemas$1 {
43
- export { schemas$1_SCHEMAS as SCHEMAS, schemas$1_schemas as schemas };
44
- }
45
-
46
- declare const ELEMENT_SCHEMAS: ReadonlyArray<Schema>;
47
- declare const elementSchemas: {
48
- [k: string]: Schema;
49
- };
50
-
51
- declare const index$3_ELEMENT_SCHEMAS: typeof ELEMENT_SCHEMAS;
52
- declare const index$3_elementSchemas: typeof elementSchemas;
53
- declare namespace index$3 {
54
- export { index$3_ELEMENT_SCHEMAS as ELEMENT_SCHEMAS, index$3_elementSchemas as elementSchemas };
55
- }
56
-
57
- declare const GROUP_ELEMENT_SCHEMAS: ReadonlyArray<Schema>;
58
- declare const groupElementSchemas: {
59
- [k: string]: Schema;
60
- };
61
-
62
- declare const index$2_GROUP_ELEMENT_SCHEMAS: typeof GROUP_ELEMENT_SCHEMAS;
63
- declare const index$2_groupElementSchemas: typeof groupElementSchemas;
64
- declare namespace index$2 {
65
- export { index$2_GROUP_ELEMENT_SCHEMAS as GROUP_ELEMENT_SCHEMAS, index$2_groupElementSchemas as groupElementSchemas };
66
- }
67
-
68
- declare const INLINE_ELEMENT_SCHEMAS: ReadonlyArray<Schema>;
69
- declare const inlineElementSchemas: {
70
- [k: string]: Schema;
71
- };
72
-
73
- declare const index$1_INLINE_ELEMENT_SCHEMAS: typeof INLINE_ELEMENT_SCHEMAS;
74
- declare const index$1_inlineElementSchemas: typeof inlineElementSchemas;
75
- declare namespace index$1 {
76
- export { index$1_INLINE_ELEMENT_SCHEMAS as INLINE_ELEMENT_SCHEMAS, index$1_inlineElementSchemas as inlineElementSchemas };
77
- }
78
-
79
- declare const ATOM_SCHEMAS: ReadonlyArray<Schema>;
80
- declare const atomSchemas: {
81
- [k: string]: Schema;
82
- };
83
-
84
- declare const index_ATOM_SCHEMAS: typeof ATOM_SCHEMAS;
85
- declare const index_atomSchemas: typeof atomSchemas;
86
- declare namespace index {
87
- export { index_ATOM_SCHEMAS as ATOM_SCHEMAS, index_atomSchemas as atomSchemas };
88
- }
89
-
90
- declare const IGNORED_ATTRIBUTES: string[];
91
-
92
- declare const ignoredAttributes_IGNORED_ATTRIBUTES: typeof IGNORED_ATTRIBUTES;
93
- declare namespace ignoredAttributes {
94
- export { ignoredAttributes_IGNORED_ATTRIBUTES as IGNORED_ATTRIBUTES };
95
- }
25
+ declare const SCHEMA_MAP: Map<string, Schema>;
96
26
 
97
27
  declare const isIgnoredAttribute: (attribute: string) => boolean;
98
28
  declare const isIgnoredElement: (element: Element) => boolean;
99
- declare const findSchemaByTag: (tagName: string) => Schema | undefined;
100
-
101
- declare const utils_findSchemaByTag: typeof findSchemaByTag;
102
- declare const utils_isIgnoredAttribute: typeof isIgnoredAttribute;
103
- declare const utils_isIgnoredElement: typeof isIgnoredElement;
104
- declare namespace utils {
105
- export { utils_findSchemaByTag as findSchemaByTag, utils_isIgnoredAttribute as isIgnoredAttribute, utils_isIgnoredElement as isIgnoredElement };
106
- }
29
+ declare const findSchemaByTag: (element: Element) => Schema | undefined;
30
+ declare const isAttributeRestricted: (attr: AttributeDefinition) => attr is RestrictedAttribute;
31
+ declare const getAttributeName: (attribute: AttributeDefinition) => string;
32
+ declare const findAttributeDefinitionByName: (definitions: readonly AttributeDefinition[], name: string) => AttributeDefinition | undefined;
107
33
 
108
34
  declare const IGNORED_ELEMENT_SELECTORS: string[];
109
35
 
110
- declare const ignoredElements_IGNORED_ELEMENT_SELECTORS: typeof IGNORED_ELEMENT_SELECTORS;
111
- declare namespace ignoredElements {
112
- export { ignoredElements_IGNORED_ELEMENT_SELECTORS as IGNORED_ELEMENT_SELECTORS };
113
- }
36
+ declare const IGNORED_ATTRIBUTES: string[];
114
37
 
115
38
  declare const TRACK_CHANGES_ATTR_DATA_USERNAME = "data-username";
116
39
  declare const TRACK_CHANGES_ATTR_DATA_USERID = "data-userid";
@@ -119,14 +42,26 @@ declare const TRACK_CHANGES_ATTR_DATA_DATE = "data-date";
119
42
  declare const TRACK_CHANGES_ATTRS: readonly ["data-username", "data-userid", "data-time", "data-date"];
120
43
  declare const ID_ATTRS: readonly ["store", "ele-id"];
121
44
 
122
- declare const globalAttributes_ID_ATTRS: typeof ID_ATTRS;
123
- declare const globalAttributes_TRACK_CHANGES_ATTRS: typeof TRACK_CHANGES_ATTRS;
124
- declare const globalAttributes_TRACK_CHANGES_ATTR_DATA_DATE: typeof TRACK_CHANGES_ATTR_DATA_DATE;
125
- declare const globalAttributes_TRACK_CHANGES_ATTR_DATA_TIME: typeof TRACK_CHANGES_ATTR_DATA_TIME;
126
- declare const globalAttributes_TRACK_CHANGES_ATTR_DATA_USERID: typeof TRACK_CHANGES_ATTR_DATA_USERID;
127
- declare const globalAttributes_TRACK_CHANGES_ATTR_DATA_USERNAME: typeof TRACK_CHANGES_ATTR_DATA_USERNAME;
128
- declare namespace globalAttributes {
129
- export { globalAttributes_ID_ATTRS as ID_ATTRS, globalAttributes_TRACK_CHANGES_ATTRS as TRACK_CHANGES_ATTRS, globalAttributes_TRACK_CHANGES_ATTR_DATA_DATE as TRACK_CHANGES_ATTR_DATA_DATE, globalAttributes_TRACK_CHANGES_ATTR_DATA_TIME as TRACK_CHANGES_ATTR_DATA_TIME, globalAttributes_TRACK_CHANGES_ATTR_DATA_USERID as TRACK_CHANGES_ATTR_DATA_USERID, globalAttributes_TRACK_CHANGES_ATTR_DATA_USERNAME as TRACK_CHANGES_ATTR_DATA_USERNAME };
130
- }
45
+ declare const ELEMENT_SCHEMAS: ReadonlyArray<Schema>;
46
+
47
+ declare const PARA_SCHEMA: Schema<readonly ["store", "ele-id"], readonly ["data-username", "data-userid", "data-time", "data-date"]>;
48
+
49
+ declare const TITLE_SCHEMA: Schema<readonly ["store", "ele-id", {
50
+ readonly name: "title";
51
+ readonly values: readonly ["H1", "H2", "H3", "H4", "H5", "H6"];
52
+ readonly defaultValue: "H1";
53
+ }], readonly ["data-username", "data-userid", "data-time", "data-date"]>;
54
+
55
+ declare const GROUP_ELEMENT_SCHEMAS: ReadonlyArray<Schema>;
56
+
57
+ declare const SECTION_SCHEMA: Schema<readonly ["store", "ele-id", "xmlid", {
58
+ readonly name: "role";
59
+ readonly values: readonly ["H1", "H2", "H3", "H4", "H5", "H6"];
60
+ readonly defaultValue: "H1";
61
+ }], readonly ["data-username", "data-userid", "data-time", "data-date"]>;
62
+
63
+ declare const INLINE_ELEMENT_SCHEMAS: ReadonlyArray<Schema>;
64
+
65
+ declare const ATOM_SCHEMAS: ReadonlyArray<Schema>;
131
66
 
132
- export { globalAttributes as GlobalAttributes, globalAttributes as GlobalAttributesTypes, ignoredAttributes as IgnoredAttributes, ignoredElements as IgnoredElements, schema_types as SchemaTypes, schemas$1 as Schemas, index as SchemasAtoms, index$3 as SchemasElements, index$2 as SchemasGroupElements, index$1 as SchemasInlineElements, utils as Utils };
67
+ export { ATOM_SCHEMAS, type AttributeDefinition, ELEMENT_ROLE, ELEMENT_SCHEMAS, type FreeAttribute, GROUP_ELEMENT_SCHEMAS, ID_ATTRS, IGNORED_ATTRIBUTES, IGNORED_ELEMENT_SELECTORS, INLINE_ELEMENT_SCHEMAS, PARA_SCHEMA, type RestrictedAttribute, SCHEMAS, SCHEMA_MAP, SECTION_SCHEMA, type Schema, type SchemaKind, TITLE_SCHEMA, TRACK_CHANGES_ATTRS, TRACK_CHANGES_ATTR_DATA_DATE, TRACK_CHANGES_ATTR_DATA_TIME, TRACK_CHANGES_ATTR_DATA_USERID, TRACK_CHANGES_ATTR_DATA_USERNAME, findAttributeDefinitionByName, findSchemaByTag, getAttributeName, isAttributeRestricted, isIgnoredAttribute, isIgnoredElement };
package/dist/index.d.ts CHANGED
@@ -6,13 +6,13 @@ declare enum ELEMENT_ROLE {
6
6
  }
7
7
  type SchemaKind = "element" | "atom" | "inline" | "group";
8
8
  type FreeAttribute = string;
9
- type RestrictedAttribute<T extends readonly string[] = readonly string[]> = {
9
+ type RestrictedAttribute<T = readonly string[]> = {
10
10
  name: string;
11
11
  values: T;
12
12
  defaultValue: string;
13
13
  };
14
- type AttributeDefinition<T extends readonly string[] = readonly string[]> = FreeAttribute | RestrictedAttribute<T>;
15
- type Schema<TRequiredAttributes extends readonly AttributeDefinition[] = readonly AttributeDefinition[], TOptionalAttributes extends readonly AttributeDefinition[] = readonly AttributeDefinition[]> = {
14
+ type AttributeDefinition<T = readonly string[]> = FreeAttribute | RestrictedAttribute<T>;
15
+ type Schema<TRequiredAttributes = readonly AttributeDefinition[], TOptionalAttributes = readonly AttributeDefinition[]> = {
16
16
  kind: SchemaKind;
17
17
  tag: string;
18
18
  role?: ELEMENT_ROLE;
@@ -21,96 +21,19 @@ type Schema<TRequiredAttributes extends readonly AttributeDefinition[] = readonl
21
21
  allowedChildTagNames: ReadonlySet<string>;
22
22
  };
23
23
 
24
- type schema_types_AttributeDefinition<T extends readonly string[] = readonly string[]> = AttributeDefinition<T>;
25
- type schema_types_ELEMENT_ROLE = ELEMENT_ROLE;
26
- declare const schema_types_ELEMENT_ROLE: typeof ELEMENT_ROLE;
27
- type schema_types_FreeAttribute = FreeAttribute;
28
- type schema_types_RestrictedAttribute<T extends readonly string[] = readonly string[]> = RestrictedAttribute<T>;
29
- type schema_types_Schema<TRequiredAttributes extends readonly AttributeDefinition[] = readonly AttributeDefinition[], TOptionalAttributes extends readonly AttributeDefinition[] = readonly AttributeDefinition[]> = Schema<TRequiredAttributes, TOptionalAttributes>;
30
- type schema_types_SchemaKind = SchemaKind;
31
- declare namespace schema_types {
32
- export { type schema_types_AttributeDefinition as AttributeDefinition, schema_types_ELEMENT_ROLE as ELEMENT_ROLE, type schema_types_FreeAttribute as FreeAttribute, type schema_types_RestrictedAttribute as RestrictedAttribute, type schema_types_Schema as Schema, type schema_types_SchemaKind as SchemaKind };
33
- }
34
-
35
24
  declare const SCHEMAS: ReadonlyArray<Schema>;
36
- declare const schemas: {
37
- [k: string]: Schema;
38
- };
39
-
40
- declare const schemas$1_SCHEMAS: typeof SCHEMAS;
41
- declare const schemas$1_schemas: typeof schemas;
42
- declare namespace schemas$1 {
43
- export { schemas$1_SCHEMAS as SCHEMAS, schemas$1_schemas as schemas };
44
- }
45
-
46
- declare const ELEMENT_SCHEMAS: ReadonlyArray<Schema>;
47
- declare const elementSchemas: {
48
- [k: string]: Schema;
49
- };
50
-
51
- declare const index$3_ELEMENT_SCHEMAS: typeof ELEMENT_SCHEMAS;
52
- declare const index$3_elementSchemas: typeof elementSchemas;
53
- declare namespace index$3 {
54
- export { index$3_ELEMENT_SCHEMAS as ELEMENT_SCHEMAS, index$3_elementSchemas as elementSchemas };
55
- }
56
-
57
- declare const GROUP_ELEMENT_SCHEMAS: ReadonlyArray<Schema>;
58
- declare const groupElementSchemas: {
59
- [k: string]: Schema;
60
- };
61
-
62
- declare const index$2_GROUP_ELEMENT_SCHEMAS: typeof GROUP_ELEMENT_SCHEMAS;
63
- declare const index$2_groupElementSchemas: typeof groupElementSchemas;
64
- declare namespace index$2 {
65
- export { index$2_GROUP_ELEMENT_SCHEMAS as GROUP_ELEMENT_SCHEMAS, index$2_groupElementSchemas as groupElementSchemas };
66
- }
67
-
68
- declare const INLINE_ELEMENT_SCHEMAS: ReadonlyArray<Schema>;
69
- declare const inlineElementSchemas: {
70
- [k: string]: Schema;
71
- };
72
-
73
- declare const index$1_INLINE_ELEMENT_SCHEMAS: typeof INLINE_ELEMENT_SCHEMAS;
74
- declare const index$1_inlineElementSchemas: typeof inlineElementSchemas;
75
- declare namespace index$1 {
76
- export { index$1_INLINE_ELEMENT_SCHEMAS as INLINE_ELEMENT_SCHEMAS, index$1_inlineElementSchemas as inlineElementSchemas };
77
- }
78
-
79
- declare const ATOM_SCHEMAS: ReadonlyArray<Schema>;
80
- declare const atomSchemas: {
81
- [k: string]: Schema;
82
- };
83
-
84
- declare const index_ATOM_SCHEMAS: typeof ATOM_SCHEMAS;
85
- declare const index_atomSchemas: typeof atomSchemas;
86
- declare namespace index {
87
- export { index_ATOM_SCHEMAS as ATOM_SCHEMAS, index_atomSchemas as atomSchemas };
88
- }
89
-
90
- declare const IGNORED_ATTRIBUTES: string[];
91
-
92
- declare const ignoredAttributes_IGNORED_ATTRIBUTES: typeof IGNORED_ATTRIBUTES;
93
- declare namespace ignoredAttributes {
94
- export { ignoredAttributes_IGNORED_ATTRIBUTES as IGNORED_ATTRIBUTES };
95
- }
25
+ declare const SCHEMA_MAP: Map<string, Schema>;
96
26
 
97
27
  declare const isIgnoredAttribute: (attribute: string) => boolean;
98
28
  declare const isIgnoredElement: (element: Element) => boolean;
99
- declare const findSchemaByTag: (tagName: string) => Schema | undefined;
100
-
101
- declare const utils_findSchemaByTag: typeof findSchemaByTag;
102
- declare const utils_isIgnoredAttribute: typeof isIgnoredAttribute;
103
- declare const utils_isIgnoredElement: typeof isIgnoredElement;
104
- declare namespace utils {
105
- export { utils_findSchemaByTag as findSchemaByTag, utils_isIgnoredAttribute as isIgnoredAttribute, utils_isIgnoredElement as isIgnoredElement };
106
- }
29
+ declare const findSchemaByTag: (element: Element) => Schema | undefined;
30
+ declare const isAttributeRestricted: (attr: AttributeDefinition) => attr is RestrictedAttribute;
31
+ declare const getAttributeName: (attribute: AttributeDefinition) => string;
32
+ declare const findAttributeDefinitionByName: (definitions: readonly AttributeDefinition[], name: string) => AttributeDefinition | undefined;
107
33
 
108
34
  declare const IGNORED_ELEMENT_SELECTORS: string[];
109
35
 
110
- declare const ignoredElements_IGNORED_ELEMENT_SELECTORS: typeof IGNORED_ELEMENT_SELECTORS;
111
- declare namespace ignoredElements {
112
- export { ignoredElements_IGNORED_ELEMENT_SELECTORS as IGNORED_ELEMENT_SELECTORS };
113
- }
36
+ declare const IGNORED_ATTRIBUTES: string[];
114
37
 
115
38
  declare const TRACK_CHANGES_ATTR_DATA_USERNAME = "data-username";
116
39
  declare const TRACK_CHANGES_ATTR_DATA_USERID = "data-userid";
@@ -119,14 +42,26 @@ declare const TRACK_CHANGES_ATTR_DATA_DATE = "data-date";
119
42
  declare const TRACK_CHANGES_ATTRS: readonly ["data-username", "data-userid", "data-time", "data-date"];
120
43
  declare const ID_ATTRS: readonly ["store", "ele-id"];
121
44
 
122
- declare const globalAttributes_ID_ATTRS: typeof ID_ATTRS;
123
- declare const globalAttributes_TRACK_CHANGES_ATTRS: typeof TRACK_CHANGES_ATTRS;
124
- declare const globalAttributes_TRACK_CHANGES_ATTR_DATA_DATE: typeof TRACK_CHANGES_ATTR_DATA_DATE;
125
- declare const globalAttributes_TRACK_CHANGES_ATTR_DATA_TIME: typeof TRACK_CHANGES_ATTR_DATA_TIME;
126
- declare const globalAttributes_TRACK_CHANGES_ATTR_DATA_USERID: typeof TRACK_CHANGES_ATTR_DATA_USERID;
127
- declare const globalAttributes_TRACK_CHANGES_ATTR_DATA_USERNAME: typeof TRACK_CHANGES_ATTR_DATA_USERNAME;
128
- declare namespace globalAttributes {
129
- export { globalAttributes_ID_ATTRS as ID_ATTRS, globalAttributes_TRACK_CHANGES_ATTRS as TRACK_CHANGES_ATTRS, globalAttributes_TRACK_CHANGES_ATTR_DATA_DATE as TRACK_CHANGES_ATTR_DATA_DATE, globalAttributes_TRACK_CHANGES_ATTR_DATA_TIME as TRACK_CHANGES_ATTR_DATA_TIME, globalAttributes_TRACK_CHANGES_ATTR_DATA_USERID as TRACK_CHANGES_ATTR_DATA_USERID, globalAttributes_TRACK_CHANGES_ATTR_DATA_USERNAME as TRACK_CHANGES_ATTR_DATA_USERNAME };
130
- }
45
+ declare const ELEMENT_SCHEMAS: ReadonlyArray<Schema>;
46
+
47
+ declare const PARA_SCHEMA: Schema<readonly ["store", "ele-id"], readonly ["data-username", "data-userid", "data-time", "data-date"]>;
48
+
49
+ declare const TITLE_SCHEMA: Schema<readonly ["store", "ele-id", {
50
+ readonly name: "title";
51
+ readonly values: readonly ["H1", "H2", "H3", "H4", "H5", "H6"];
52
+ readonly defaultValue: "H1";
53
+ }], readonly ["data-username", "data-userid", "data-time", "data-date"]>;
54
+
55
+ declare const GROUP_ELEMENT_SCHEMAS: ReadonlyArray<Schema>;
56
+
57
+ declare const SECTION_SCHEMA: Schema<readonly ["store", "ele-id", "xmlid", {
58
+ readonly name: "role";
59
+ readonly values: readonly ["H1", "H2", "H3", "H4", "H5", "H6"];
60
+ readonly defaultValue: "H1";
61
+ }], readonly ["data-username", "data-userid", "data-time", "data-date"]>;
62
+
63
+ declare const INLINE_ELEMENT_SCHEMAS: ReadonlyArray<Schema>;
64
+
65
+ declare const ATOM_SCHEMAS: ReadonlyArray<Schema>;
131
66
 
132
- export { globalAttributes as GlobalAttributes, globalAttributes as GlobalAttributesTypes, ignoredAttributes as IgnoredAttributes, ignoredElements as IgnoredElements, schema_types as SchemaTypes, schemas$1 as Schemas, index as SchemasAtoms, index$3 as SchemasElements, index$2 as SchemasGroupElements, index$1 as SchemasInlineElements, utils as Utils };
67
+ export { ATOM_SCHEMAS, type AttributeDefinition, ELEMENT_ROLE, ELEMENT_SCHEMAS, type FreeAttribute, GROUP_ELEMENT_SCHEMAS, ID_ATTRS, IGNORED_ATTRIBUTES, IGNORED_ELEMENT_SELECTORS, INLINE_ELEMENT_SCHEMAS, PARA_SCHEMA, type RestrictedAttribute, SCHEMAS, SCHEMA_MAP, SECTION_SCHEMA, type Schema, type SchemaKind, TITLE_SCHEMA, TRACK_CHANGES_ATTRS, TRACK_CHANGES_ATTR_DATA_DATE, TRACK_CHANGES_ATTR_DATA_TIME, TRACK_CHANGES_ATTR_DATA_USERID, TRACK_CHANGES_ATTR_DATA_USERNAME, findAttributeDefinitionByName, findSchemaByTag, getAttributeName, isAttributeRestricted, isIgnoredAttribute, isIgnoredElement };
package/dist/index.js CHANGED
@@ -20,33 +20,32 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  // src/index.ts
21
21
  var index_exports = {};
22
22
  __export(index_exports, {
23
- GlobalAttributes: () => globalAttributes_exports,
24
- GlobalAttributesTypes: () => globalAttributes_exports,
25
- IgnoredAttributes: () => ignoredAttributes_exports,
26
- IgnoredElements: () => ignoredElements_exports,
27
- SchemaTypes: () => schema_types_exports,
28
- Schemas: () => schemas_exports,
29
- SchemasAtoms: () => atoms_exports,
30
- SchemasElements: () => elements_exports,
31
- SchemasGroupElements: () => groupElements_exports,
32
- SchemasInlineElements: () => inlineElements_exports,
33
- Utils: () => utils_exports
34
- });
35
- module.exports = __toCommonJS(index_exports);
36
-
37
- // src/schema/schemas.ts
38
- var schemas_exports = {};
39
- __export(schemas_exports, {
40
- SCHEMAS: () => SCHEMAS,
41
- schemas: () => schemas
42
- });
43
-
44
- // src/schema/elementSchemas/atoms/index.ts
45
- var atoms_exports = {};
46
- __export(atoms_exports, {
47
23
  ATOM_SCHEMAS: () => ATOM_SCHEMAS,
48
- atomSchemas: () => atomSchemas
24
+ ELEMENT_ROLE: () => ELEMENT_ROLE,
25
+ ELEMENT_SCHEMAS: () => ELEMENT_SCHEMAS,
26
+ GROUP_ELEMENT_SCHEMAS: () => GROUP_ELEMENT_SCHEMAS,
27
+ ID_ATTRS: () => ID_ATTRS,
28
+ IGNORED_ATTRIBUTES: () => IGNORED_ATTRIBUTES,
29
+ IGNORED_ELEMENT_SELECTORS: () => IGNORED_ELEMENT_SELECTORS,
30
+ INLINE_ELEMENT_SCHEMAS: () => INLINE_ELEMENT_SCHEMAS,
31
+ PARA_SCHEMA: () => PARA_SCHEMA,
32
+ SCHEMAS: () => SCHEMAS,
33
+ SCHEMA_MAP: () => SCHEMA_MAP,
34
+ SECTION_SCHEMA: () => SECTION_SCHEMA,
35
+ TITLE_SCHEMA: () => TITLE_SCHEMA,
36
+ TRACK_CHANGES_ATTRS: () => TRACK_CHANGES_ATTRS,
37
+ TRACK_CHANGES_ATTR_DATA_DATE: () => TRACK_CHANGES_ATTR_DATA_DATE,
38
+ TRACK_CHANGES_ATTR_DATA_TIME: () => TRACK_CHANGES_ATTR_DATA_TIME,
39
+ TRACK_CHANGES_ATTR_DATA_USERID: () => TRACK_CHANGES_ATTR_DATA_USERID,
40
+ TRACK_CHANGES_ATTR_DATA_USERNAME: () => TRACK_CHANGES_ATTR_DATA_USERNAME,
41
+ findAttributeDefinitionByName: () => findAttributeDefinitionByName,
42
+ findSchemaByTag: () => findSchemaByTag,
43
+ getAttributeName: () => getAttributeName,
44
+ isAttributeRestricted: () => isAttributeRestricted,
45
+ isIgnoredAttribute: () => isIgnoredAttribute,
46
+ isIgnoredElement: () => isIgnoredElement
49
47
  });
48
+ module.exports = __toCommonJS(index_exports);
50
49
 
51
50
  // src/schema/shared/createSchema.ts
52
51
  var createSchema = ({
@@ -68,15 +67,6 @@ var createSchema = ({
68
67
  };
69
68
 
70
69
  // src/schema/shared/globalAttributes.ts
71
- var globalAttributes_exports = {};
72
- __export(globalAttributes_exports, {
73
- ID_ATTRS: () => ID_ATTRS,
74
- TRACK_CHANGES_ATTRS: () => TRACK_CHANGES_ATTRS,
75
- TRACK_CHANGES_ATTR_DATA_DATE: () => TRACK_CHANGES_ATTR_DATA_DATE,
76
- TRACK_CHANGES_ATTR_DATA_TIME: () => TRACK_CHANGES_ATTR_DATA_TIME,
77
- TRACK_CHANGES_ATTR_DATA_USERID: () => TRACK_CHANGES_ATTR_DATA_USERID,
78
- TRACK_CHANGES_ATTR_DATA_USERNAME: () => TRACK_CHANGES_ATTR_DATA_USERNAME
79
- });
80
70
  var TRACK_CHANGES_ATTR_DATA_USERNAME = "data-username";
81
71
  var TRACK_CHANGES_ATTR_DATA_USERID = "data-userid";
82
72
  var TRACK_CHANGES_ATTR_DATA_TIME = "data-time";
@@ -125,10 +115,6 @@ var B_SCHEMA = createSchema({
125
115
  });
126
116
 
127
117
  // src/schema/schema.types.ts
128
- var schema_types_exports = {};
129
- __export(schema_types_exports, {
130
- ELEMENT_ROLE: () => ELEMENT_ROLE
131
- });
132
118
  var ELEMENT_ROLE = /* @__PURE__ */ ((ELEMENT_ROLE2) => {
133
119
  ELEMENT_ROLE2["QUERYCOMMENTSWRAPPER"] = "QUERYCOMMENTSWRAPPER";
134
120
  ELEMENT_ROLE2["HEADING"] = "HEADING";
@@ -261,16 +247,6 @@ var ATOM_SCHEMAS = [
261
247
  INSERTION_SCHEMA,
262
248
  DELETION_SCHEMA
263
249
  ];
264
- var atomSchemas = Object.fromEntries(
265
- ATOM_SCHEMAS.map((schema) => [schema.tag, schema])
266
- );
267
-
268
- // src/schema/elementSchemas/elements/index.ts
269
- var elements_exports = {};
270
- __export(elements_exports, {
271
- ELEMENT_SCHEMAS: () => ELEMENT_SCHEMAS,
272
- elementSchemas: () => elementSchemas
273
- });
274
250
 
275
251
  // src/schema/elementSchemas/inlineElements/inlineElementsTags.ts
276
252
  var COMMENT_TAG = "COMMENT";
@@ -326,16 +302,6 @@ var ELEMENT_SCHEMAS = [
326
302
  PARA_SCHEMA,
327
303
  TITLE_SCHEMA
328
304
  ];
329
- var elementSchemas = Object.fromEntries(
330
- ELEMENT_SCHEMAS.map((schema) => [schema.tag, schema])
331
- );
332
-
333
- // src/schema/elementSchemas/groupElements/index.ts
334
- var groupElements_exports = {};
335
- __export(groupElements_exports, {
336
- GROUP_ELEMENT_SCHEMAS: () => GROUP_ELEMENT_SCHEMAS,
337
- groupElementSchemas: () => groupElementSchemas
338
- });
339
305
 
340
306
  // src/schema/elementSchemas/groupElements/groupElementsTags.ts
341
307
  var SECTION_TAG = "SECTION1";
@@ -360,16 +326,6 @@ var SECTION_SCHEMA = createSchema({
360
326
 
361
327
  // src/schema/elementSchemas/groupElements/index.ts
362
328
  var GROUP_ELEMENT_SCHEMAS = [SECTION_SCHEMA];
363
- var groupElementSchemas = Object.fromEntries(
364
- GROUP_ELEMENT_SCHEMAS.map((schema) => [schema.tag, schema])
365
- );
366
-
367
- // src/schema/elementSchemas/inlineElements/index.ts
368
- var inlineElements_exports = {};
369
- __export(inlineElements_exports, {
370
- INLINE_ELEMENT_SCHEMAS: () => INLINE_ELEMENT_SCHEMAS,
371
- inlineElementSchemas: () => inlineElementSchemas
372
- });
373
329
 
374
330
  // src/schema/elementSchemas/inlineElements/comment.ts
375
331
  var COMMENT_SCHEMA = createSchema({
@@ -493,9 +449,6 @@ var INLINE_ELEMENT_SCHEMAS = [
493
449
  CONTENT_SCHEMA,
494
450
  REPLY_SCHEMA
495
451
  ];
496
- var inlineElementSchemas = Object.fromEntries(
497
- INLINE_ELEMENT_SCHEMAS.map((schema) => [schema.tag, schema])
498
- );
499
452
 
500
453
  // src/schema/schemas.ts
501
454
  var SCHEMAS = [
@@ -504,15 +457,20 @@ var SCHEMAS = [
504
457
  ...GROUP_ELEMENT_SCHEMAS,
505
458
  ...INLINE_ELEMENT_SCHEMAS
506
459
  ];
507
- var schemas = Object.fromEntries(
508
- SCHEMAS.map((schema) => [schema.tag, schema])
460
+ var SCHEMA_MAP = new Map(
461
+ SCHEMAS.map((schema) => [schema.tag + schema.role, schema])
509
462
  );
510
463
 
464
+ // src/schema/shared/ignoredElements.ts
465
+ var IGNORED_ELEMENT_SELECTORS = [
466
+ "span.rhlabel",
467
+ "span.abstractlabel",
468
+ "span.refIcon",
469
+ "span.missLink",
470
+ "span.ref-drag"
471
+ ];
472
+
511
473
  // src/schema/shared/ignoredAttributes.ts
512
- var ignoredAttributes_exports = {};
513
- __export(ignoredAttributes_exports, {
514
- IGNORED_ATTRIBUTES: () => IGNORED_ATTRIBUTES
515
- });
516
474
  var IGNORED_ATTRIBUTES = [
517
475
  // Styling & layout
518
476
  "class",
@@ -529,42 +487,64 @@ var IGNORED_ATTRIBUTES = [
529
487
  "hidden"
530
488
  ];
531
489
 
532
- // src/schema/shared/utils.ts
533
- var utils_exports = {};
534
- __export(utils_exports, {
535
- findSchemaByTag: () => findSchemaByTag,
536
- isIgnoredAttribute: () => isIgnoredAttribute,
537
- isIgnoredElement: () => isIgnoredElement
538
- });
539
-
540
- // src/schema/shared/ignoredElements.ts
541
- var ignoredElements_exports = {};
542
- __export(ignoredElements_exports, {
543
- IGNORED_ELEMENT_SELECTORS: () => IGNORED_ELEMENT_SELECTORS
544
- });
545
- var IGNORED_ELEMENT_SELECTORS = [
546
- "span.rhlabel",
547
- "span.abstractlabel",
548
- "span.refIcon",
549
- "span.missLink",
550
- "span.ref-drag"
551
- ];
552
-
553
490
  // src/schema/shared/utils.ts
554
491
  var isIgnoredAttribute = (attribute) => IGNORED_ATTRIBUTES.includes(attribute);
555
492
  var isIgnoredElement = (element) => IGNORED_ELEMENT_SELECTORS.some((selector) => element.matches(selector));
556
- var findSchemaByTag = (tagName) => SCHEMAS.find((schema) => schema.tag === tagName.toLowerCase());
493
+ var findSchemaByTag = (element) => {
494
+ const isInsertion = element.classList.contains("ins");
495
+ const isDeletion = element.classList.contains("del");
496
+ const isQueryComment = element.classList.contains("cmtQurySection");
497
+ const isHeading = element.getAttribute("role")?.startsWith("H");
498
+ if (isHeading) {
499
+ return SCHEMA_MAP.get(element.tagName.toUpperCase() + "HEADING" /* HEADING */);
500
+ }
501
+ if (isInsertion) {
502
+ return SCHEMA_MAP.get(element.tagName.toUpperCase() + "INS" /* INS */);
503
+ }
504
+ if (isDeletion) {
505
+ return SCHEMA_MAP.get(element.tagName.toUpperCase() + "DEL" /* DEL */);
506
+ }
507
+ if (isQueryComment) {
508
+ return SCHEMA_MAP.get(
509
+ element.tagName.toUpperCase() + "QUERYCOMMENTSWRAPPER" /* QUERYCOMMENTSWRAPPER */
510
+ );
511
+ }
512
+ return SCHEMA_MAP.get(element.tagName.toUpperCase());
513
+ };
514
+ var isAttributeRestricted = (attr) => typeof attr !== "string";
515
+ var getAttributeName = (attribute) => typeof attribute === "string" ? attribute : attribute.name;
516
+ var findAttributeDefinitionByName = (definitions, name) => {
517
+ for (const def of definitions) {
518
+ if (getAttributeName(def) === name) {
519
+ return def;
520
+ }
521
+ }
522
+ return void 0;
523
+ };
557
524
  // Annotate the CommonJS export names for ESM import in node:
558
525
  0 && (module.exports = {
559
- GlobalAttributes,
560
- GlobalAttributesTypes,
561
- IgnoredAttributes,
562
- IgnoredElements,
563
- SchemaTypes,
564
- Schemas,
565
- SchemasAtoms,
566
- SchemasElements,
567
- SchemasGroupElements,
568
- SchemasInlineElements,
569
- Utils
526
+ ATOM_SCHEMAS,
527
+ ELEMENT_ROLE,
528
+ ELEMENT_SCHEMAS,
529
+ GROUP_ELEMENT_SCHEMAS,
530
+ ID_ATTRS,
531
+ IGNORED_ATTRIBUTES,
532
+ IGNORED_ELEMENT_SELECTORS,
533
+ INLINE_ELEMENT_SCHEMAS,
534
+ PARA_SCHEMA,
535
+ SCHEMAS,
536
+ SCHEMA_MAP,
537
+ SECTION_SCHEMA,
538
+ TITLE_SCHEMA,
539
+ TRACK_CHANGES_ATTRS,
540
+ TRACK_CHANGES_ATTR_DATA_DATE,
541
+ TRACK_CHANGES_ATTR_DATA_TIME,
542
+ TRACK_CHANGES_ATTR_DATA_USERID,
543
+ TRACK_CHANGES_ATTR_DATA_USERNAME,
544
+ findAttributeDefinitionByName,
545
+ findSchemaByTag,
546
+ getAttributeName,
547
+ isAttributeRestricted,
548
+ isIgnoredAttribute,
549
+ isIgnoredElement
570
550
  });
package/dist/index.mjs CHANGED
@@ -1,23 +1,3 @@
1
- var __defProp = Object.defineProperty;
2
- var __export = (target, all) => {
3
- for (var name in all)
4
- __defProp(target, name, { get: all[name], enumerable: true });
5
- };
6
-
7
- // src/schema/schemas.ts
8
- var schemas_exports = {};
9
- __export(schemas_exports, {
10
- SCHEMAS: () => SCHEMAS,
11
- schemas: () => schemas
12
- });
13
-
14
- // src/schema/elementSchemas/atoms/index.ts
15
- var atoms_exports = {};
16
- __export(atoms_exports, {
17
- ATOM_SCHEMAS: () => ATOM_SCHEMAS,
18
- atomSchemas: () => atomSchemas
19
- });
20
-
21
1
  // src/schema/shared/createSchema.ts
22
2
  var createSchema = ({
23
3
  kind,
@@ -38,15 +18,6 @@ var createSchema = ({
38
18
  };
39
19
 
40
20
  // src/schema/shared/globalAttributes.ts
41
- var globalAttributes_exports = {};
42
- __export(globalAttributes_exports, {
43
- ID_ATTRS: () => ID_ATTRS,
44
- TRACK_CHANGES_ATTRS: () => TRACK_CHANGES_ATTRS,
45
- TRACK_CHANGES_ATTR_DATA_DATE: () => TRACK_CHANGES_ATTR_DATA_DATE,
46
- TRACK_CHANGES_ATTR_DATA_TIME: () => TRACK_CHANGES_ATTR_DATA_TIME,
47
- TRACK_CHANGES_ATTR_DATA_USERID: () => TRACK_CHANGES_ATTR_DATA_USERID,
48
- TRACK_CHANGES_ATTR_DATA_USERNAME: () => TRACK_CHANGES_ATTR_DATA_USERNAME
49
- });
50
21
  var TRACK_CHANGES_ATTR_DATA_USERNAME = "data-username";
51
22
  var TRACK_CHANGES_ATTR_DATA_USERID = "data-userid";
52
23
  var TRACK_CHANGES_ATTR_DATA_TIME = "data-time";
@@ -95,10 +66,6 @@ var B_SCHEMA = createSchema({
95
66
  });
96
67
 
97
68
  // src/schema/schema.types.ts
98
- var schema_types_exports = {};
99
- __export(schema_types_exports, {
100
- ELEMENT_ROLE: () => ELEMENT_ROLE
101
- });
102
69
  var ELEMENT_ROLE = /* @__PURE__ */ ((ELEMENT_ROLE2) => {
103
70
  ELEMENT_ROLE2["QUERYCOMMENTSWRAPPER"] = "QUERYCOMMENTSWRAPPER";
104
71
  ELEMENT_ROLE2["HEADING"] = "HEADING";
@@ -231,16 +198,6 @@ var ATOM_SCHEMAS = [
231
198
  INSERTION_SCHEMA,
232
199
  DELETION_SCHEMA
233
200
  ];
234
- var atomSchemas = Object.fromEntries(
235
- ATOM_SCHEMAS.map((schema) => [schema.tag, schema])
236
- );
237
-
238
- // src/schema/elementSchemas/elements/index.ts
239
- var elements_exports = {};
240
- __export(elements_exports, {
241
- ELEMENT_SCHEMAS: () => ELEMENT_SCHEMAS,
242
- elementSchemas: () => elementSchemas
243
- });
244
201
 
245
202
  // src/schema/elementSchemas/inlineElements/inlineElementsTags.ts
246
203
  var COMMENT_TAG = "COMMENT";
@@ -296,16 +253,6 @@ var ELEMENT_SCHEMAS = [
296
253
  PARA_SCHEMA,
297
254
  TITLE_SCHEMA
298
255
  ];
299
- var elementSchemas = Object.fromEntries(
300
- ELEMENT_SCHEMAS.map((schema) => [schema.tag, schema])
301
- );
302
-
303
- // src/schema/elementSchemas/groupElements/index.ts
304
- var groupElements_exports = {};
305
- __export(groupElements_exports, {
306
- GROUP_ELEMENT_SCHEMAS: () => GROUP_ELEMENT_SCHEMAS,
307
- groupElementSchemas: () => groupElementSchemas
308
- });
309
256
 
310
257
  // src/schema/elementSchemas/groupElements/groupElementsTags.ts
311
258
  var SECTION_TAG = "SECTION1";
@@ -330,16 +277,6 @@ var SECTION_SCHEMA = createSchema({
330
277
 
331
278
  // src/schema/elementSchemas/groupElements/index.ts
332
279
  var GROUP_ELEMENT_SCHEMAS = [SECTION_SCHEMA];
333
- var groupElementSchemas = Object.fromEntries(
334
- GROUP_ELEMENT_SCHEMAS.map((schema) => [schema.tag, schema])
335
- );
336
-
337
- // src/schema/elementSchemas/inlineElements/index.ts
338
- var inlineElements_exports = {};
339
- __export(inlineElements_exports, {
340
- INLINE_ELEMENT_SCHEMAS: () => INLINE_ELEMENT_SCHEMAS,
341
- inlineElementSchemas: () => inlineElementSchemas
342
- });
343
280
 
344
281
  // src/schema/elementSchemas/inlineElements/comment.ts
345
282
  var COMMENT_SCHEMA = createSchema({
@@ -463,9 +400,6 @@ var INLINE_ELEMENT_SCHEMAS = [
463
400
  CONTENT_SCHEMA,
464
401
  REPLY_SCHEMA
465
402
  ];
466
- var inlineElementSchemas = Object.fromEntries(
467
- INLINE_ELEMENT_SCHEMAS.map((schema) => [schema.tag, schema])
468
- );
469
403
 
470
404
  // src/schema/schemas.ts
471
405
  var SCHEMAS = [
@@ -474,15 +408,20 @@ var SCHEMAS = [
474
408
  ...GROUP_ELEMENT_SCHEMAS,
475
409
  ...INLINE_ELEMENT_SCHEMAS
476
410
  ];
477
- var schemas = Object.fromEntries(
478
- SCHEMAS.map((schema) => [schema.tag, schema])
411
+ var SCHEMA_MAP = new Map(
412
+ SCHEMAS.map((schema) => [schema.tag + schema.role, schema])
479
413
  );
480
414
 
415
+ // src/schema/shared/ignoredElements.ts
416
+ var IGNORED_ELEMENT_SELECTORS = [
417
+ "span.rhlabel",
418
+ "span.abstractlabel",
419
+ "span.refIcon",
420
+ "span.missLink",
421
+ "span.ref-drag"
422
+ ];
423
+
481
424
  // src/schema/shared/ignoredAttributes.ts
482
- var ignoredAttributes_exports = {};
483
- __export(ignoredAttributes_exports, {
484
- IGNORED_ATTRIBUTES: () => IGNORED_ATTRIBUTES
485
- });
486
425
  var IGNORED_ATTRIBUTES = [
487
426
  // Styling & layout
488
427
  "class",
@@ -499,41 +438,63 @@ var IGNORED_ATTRIBUTES = [
499
438
  "hidden"
500
439
  ];
501
440
 
502
- // src/schema/shared/utils.ts
503
- var utils_exports = {};
504
- __export(utils_exports, {
505
- findSchemaByTag: () => findSchemaByTag,
506
- isIgnoredAttribute: () => isIgnoredAttribute,
507
- isIgnoredElement: () => isIgnoredElement
508
- });
509
-
510
- // src/schema/shared/ignoredElements.ts
511
- var ignoredElements_exports = {};
512
- __export(ignoredElements_exports, {
513
- IGNORED_ELEMENT_SELECTORS: () => IGNORED_ELEMENT_SELECTORS
514
- });
515
- var IGNORED_ELEMENT_SELECTORS = [
516
- "span.rhlabel",
517
- "span.abstractlabel",
518
- "span.refIcon",
519
- "span.missLink",
520
- "span.ref-drag"
521
- ];
522
-
523
441
  // src/schema/shared/utils.ts
524
442
  var isIgnoredAttribute = (attribute) => IGNORED_ATTRIBUTES.includes(attribute);
525
443
  var isIgnoredElement = (element) => IGNORED_ELEMENT_SELECTORS.some((selector) => element.matches(selector));
526
- var findSchemaByTag = (tagName) => SCHEMAS.find((schema) => schema.tag === tagName.toLowerCase());
444
+ var findSchemaByTag = (element) => {
445
+ const isInsertion = element.classList.contains("ins");
446
+ const isDeletion = element.classList.contains("del");
447
+ const isQueryComment = element.classList.contains("cmtQurySection");
448
+ const isHeading = element.getAttribute("role")?.startsWith("H");
449
+ if (isHeading) {
450
+ return SCHEMA_MAP.get(element.tagName.toUpperCase() + "HEADING" /* HEADING */);
451
+ }
452
+ if (isInsertion) {
453
+ return SCHEMA_MAP.get(element.tagName.toUpperCase() + "INS" /* INS */);
454
+ }
455
+ if (isDeletion) {
456
+ return SCHEMA_MAP.get(element.tagName.toUpperCase() + "DEL" /* DEL */);
457
+ }
458
+ if (isQueryComment) {
459
+ return SCHEMA_MAP.get(
460
+ element.tagName.toUpperCase() + "QUERYCOMMENTSWRAPPER" /* QUERYCOMMENTSWRAPPER */
461
+ );
462
+ }
463
+ return SCHEMA_MAP.get(element.tagName.toUpperCase());
464
+ };
465
+ var isAttributeRestricted = (attr) => typeof attr !== "string";
466
+ var getAttributeName = (attribute) => typeof attribute === "string" ? attribute : attribute.name;
467
+ var findAttributeDefinitionByName = (definitions, name) => {
468
+ for (const def of definitions) {
469
+ if (getAttributeName(def) === name) {
470
+ return def;
471
+ }
472
+ }
473
+ return void 0;
474
+ };
527
475
  export {
528
- globalAttributes_exports as GlobalAttributes,
529
- globalAttributes_exports as GlobalAttributesTypes,
530
- ignoredAttributes_exports as IgnoredAttributes,
531
- ignoredElements_exports as IgnoredElements,
532
- schema_types_exports as SchemaTypes,
533
- schemas_exports as Schemas,
534
- atoms_exports as SchemasAtoms,
535
- elements_exports as SchemasElements,
536
- groupElements_exports as SchemasGroupElements,
537
- inlineElements_exports as SchemasInlineElements,
538
- utils_exports as Utils
476
+ ATOM_SCHEMAS,
477
+ ELEMENT_ROLE,
478
+ ELEMENT_SCHEMAS,
479
+ GROUP_ELEMENT_SCHEMAS,
480
+ ID_ATTRS,
481
+ IGNORED_ATTRIBUTES,
482
+ IGNORED_ELEMENT_SELECTORS,
483
+ INLINE_ELEMENT_SCHEMAS,
484
+ PARA_SCHEMA,
485
+ SCHEMAS,
486
+ SCHEMA_MAP,
487
+ SECTION_SCHEMA,
488
+ TITLE_SCHEMA,
489
+ TRACK_CHANGES_ATTRS,
490
+ TRACK_CHANGES_ATTR_DATA_DATE,
491
+ TRACK_CHANGES_ATTR_DATA_TIME,
492
+ TRACK_CHANGES_ATTR_DATA_USERID,
493
+ TRACK_CHANGES_ATTR_DATA_USERNAME,
494
+ findAttributeDefinitionByName,
495
+ findSchemaByTag,
496
+ getAttributeName,
497
+ isAttributeRestricted,
498
+ isIgnoredAttribute,
499
+ isIgnoredElement
539
500
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pro-editor-schema",
3
- "version": "0.0.1-alpha.2",
3
+ "version": "0.0.1-alpha.5",
4
4
  "description": "Pro Editor XML schemas",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",