pro-editor-schema 0.0.1-alpha.1 → 0.0.1-alpha.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/dist/index.d.mts +98 -3
- package/dist/index.d.ts +98 -3
- package/dist/index.js +111 -17
- package/dist/index.mjs +106 -9
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -21,17 +21,112 @@ type Schema<TRequiredAttributes extends readonly AttributeDefinition[] = readonl
|
|
|
21
21
|
allowedChildTagNames: ReadonlySet<string>;
|
|
22
22
|
};
|
|
23
23
|
|
|
24
|
-
|
|
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
|
+
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
|
+
}
|
|
25
89
|
|
|
26
90
|
declare const IGNORED_ATTRIBUTES: string[];
|
|
27
91
|
|
|
92
|
+
declare const ignoredAttributes_IGNORED_ATTRIBUTES: typeof IGNORED_ATTRIBUTES;
|
|
93
|
+
declare namespace ignoredAttributes {
|
|
94
|
+
export { ignoredAttributes_IGNORED_ATTRIBUTES as IGNORED_ATTRIBUTES };
|
|
95
|
+
}
|
|
96
|
+
|
|
28
97
|
declare const isIgnoredAttribute: (attribute: string) => boolean;
|
|
29
98
|
declare const isIgnoredElement: (element: Element) => boolean;
|
|
30
|
-
declare const findSchemaByTag: (
|
|
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
|
+
}
|
|
31
107
|
|
|
32
108
|
declare const IGNORED_ELEMENT_SELECTORS: string[];
|
|
33
109
|
|
|
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
|
+
}
|
|
114
|
+
|
|
115
|
+
declare const TRACK_CHANGES_ATTR_DATA_USERNAME = "data-username";
|
|
116
|
+
declare const TRACK_CHANGES_ATTR_DATA_USERID = "data-userid";
|
|
117
|
+
declare const TRACK_CHANGES_ATTR_DATA_TIME = "data-time";
|
|
118
|
+
declare const TRACK_CHANGES_ATTR_DATA_DATE = "data-date";
|
|
34
119
|
declare const TRACK_CHANGES_ATTRS: readonly ["data-username", "data-userid", "data-time", "data-date"];
|
|
35
120
|
declare const ID_ATTRS: readonly ["store", "ele-id"];
|
|
36
121
|
|
|
37
|
-
|
|
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
|
+
}
|
|
131
|
+
|
|
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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -21,17 +21,112 @@ type Schema<TRequiredAttributes extends readonly AttributeDefinition[] = readonl
|
|
|
21
21
|
allowedChildTagNames: ReadonlySet<string>;
|
|
22
22
|
};
|
|
23
23
|
|
|
24
|
-
|
|
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
|
+
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
|
+
}
|
|
25
89
|
|
|
26
90
|
declare const IGNORED_ATTRIBUTES: string[];
|
|
27
91
|
|
|
92
|
+
declare const ignoredAttributes_IGNORED_ATTRIBUTES: typeof IGNORED_ATTRIBUTES;
|
|
93
|
+
declare namespace ignoredAttributes {
|
|
94
|
+
export { ignoredAttributes_IGNORED_ATTRIBUTES as IGNORED_ATTRIBUTES };
|
|
95
|
+
}
|
|
96
|
+
|
|
28
97
|
declare const isIgnoredAttribute: (attribute: string) => boolean;
|
|
29
98
|
declare const isIgnoredElement: (element: Element) => boolean;
|
|
30
|
-
declare const findSchemaByTag: (
|
|
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
|
+
}
|
|
31
107
|
|
|
32
108
|
declare const IGNORED_ELEMENT_SELECTORS: string[];
|
|
33
109
|
|
|
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
|
+
}
|
|
114
|
+
|
|
115
|
+
declare const TRACK_CHANGES_ATTR_DATA_USERNAME = "data-username";
|
|
116
|
+
declare const TRACK_CHANGES_ATTR_DATA_USERID = "data-userid";
|
|
117
|
+
declare const TRACK_CHANGES_ATTR_DATA_TIME = "data-time";
|
|
118
|
+
declare const TRACK_CHANGES_ATTR_DATA_DATE = "data-date";
|
|
34
119
|
declare const TRACK_CHANGES_ATTRS: readonly ["data-username", "data-userid", "data-time", "data-date"];
|
|
35
120
|
declare const ID_ATTRS: readonly ["store", "ele-id"];
|
|
36
121
|
|
|
37
|
-
|
|
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
|
+
}
|
|
131
|
+
|
|
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 };
|
package/dist/index.js
CHANGED
|
@@ -20,17 +20,34 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// src/index.ts
|
|
21
21
|
var index_exports = {};
|
|
22
22
|
__export(index_exports, {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
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
|
|
31
34
|
});
|
|
32
35
|
module.exports = __toCommonJS(index_exports);
|
|
33
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
|
+
ATOM_SCHEMAS: () => ATOM_SCHEMAS,
|
|
48
|
+
atomSchemas: () => atomSchemas
|
|
49
|
+
});
|
|
50
|
+
|
|
34
51
|
// src/schema/shared/createSchema.ts
|
|
35
52
|
var createSchema = ({
|
|
36
53
|
kind,
|
|
@@ -51,6 +68,15 @@ var createSchema = ({
|
|
|
51
68
|
};
|
|
52
69
|
|
|
53
70
|
// 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
|
+
});
|
|
54
80
|
var TRACK_CHANGES_ATTR_DATA_USERNAME = "data-username";
|
|
55
81
|
var TRACK_CHANGES_ATTR_DATA_USERID = "data-userid";
|
|
56
82
|
var TRACK_CHANGES_ATTR_DATA_TIME = "data-time";
|
|
@@ -98,6 +124,19 @@ var B_SCHEMA = createSchema({
|
|
|
98
124
|
allowedChildTagNames: ATOM_TAGS
|
|
99
125
|
});
|
|
100
126
|
|
|
127
|
+
// src/schema/schema.types.ts
|
|
128
|
+
var schema_types_exports = {};
|
|
129
|
+
__export(schema_types_exports, {
|
|
130
|
+
ELEMENT_ROLE: () => ELEMENT_ROLE
|
|
131
|
+
});
|
|
132
|
+
var ELEMENT_ROLE = /* @__PURE__ */ ((ELEMENT_ROLE2) => {
|
|
133
|
+
ELEMENT_ROLE2["QUERYCOMMENTSWRAPPER"] = "QUERYCOMMENTSWRAPPER";
|
|
134
|
+
ELEMENT_ROLE2["HEADING"] = "HEADING";
|
|
135
|
+
ELEMENT_ROLE2["INS"] = "INS";
|
|
136
|
+
ELEMENT_ROLE2["DEL"] = "DEL";
|
|
137
|
+
return ELEMENT_ROLE2;
|
|
138
|
+
})(ELEMENT_ROLE || {});
|
|
139
|
+
|
|
101
140
|
// src/schema/elementSchemas/atoms/commentQuerySection.ts
|
|
102
141
|
var COMMENT_QUERY_SECTION_SCHEMA = createSchema({
|
|
103
142
|
kind: "atom",
|
|
@@ -222,6 +261,16 @@ var ATOM_SCHEMAS = [
|
|
|
222
261
|
INSERTION_SCHEMA,
|
|
223
262
|
DELETION_SCHEMA
|
|
224
263
|
];
|
|
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
|
+
});
|
|
225
274
|
|
|
226
275
|
// src/schema/elementSchemas/inlineElements/inlineElementsTags.ts
|
|
227
276
|
var COMMENT_TAG = "COMMENT";
|
|
@@ -277,6 +326,16 @@ var ELEMENT_SCHEMAS = [
|
|
|
277
326
|
PARA_SCHEMA,
|
|
278
327
|
TITLE_SCHEMA
|
|
279
328
|
];
|
|
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
|
+
});
|
|
280
339
|
|
|
281
340
|
// src/schema/elementSchemas/groupElements/groupElementsTags.ts
|
|
282
341
|
var SECTION_TAG = "SECTION1";
|
|
@@ -301,6 +360,16 @@ var SECTION_SCHEMA = createSchema({
|
|
|
301
360
|
|
|
302
361
|
// src/schema/elementSchemas/groupElements/index.ts
|
|
303
362
|
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
|
+
});
|
|
304
373
|
|
|
305
374
|
// src/schema/elementSchemas/inlineElements/comment.ts
|
|
306
375
|
var COMMENT_SCHEMA = createSchema({
|
|
@@ -424,6 +493,9 @@ var INLINE_ELEMENT_SCHEMAS = [
|
|
|
424
493
|
CONTENT_SCHEMA,
|
|
425
494
|
REPLY_SCHEMA
|
|
426
495
|
];
|
|
496
|
+
var inlineElementSchemas = Object.fromEntries(
|
|
497
|
+
INLINE_ELEMENT_SCHEMAS.map((schema) => [schema.tag, schema])
|
|
498
|
+
);
|
|
427
499
|
|
|
428
500
|
// src/schema/schemas.ts
|
|
429
501
|
var SCHEMAS = [
|
|
@@ -432,8 +504,15 @@ var SCHEMAS = [
|
|
|
432
504
|
...GROUP_ELEMENT_SCHEMAS,
|
|
433
505
|
...INLINE_ELEMENT_SCHEMAS
|
|
434
506
|
];
|
|
507
|
+
var schemas = Object.fromEntries(
|
|
508
|
+
SCHEMAS.map((schema) => [schema.tag, schema])
|
|
509
|
+
);
|
|
435
510
|
|
|
436
511
|
// src/schema/shared/ignoredAttributes.ts
|
|
512
|
+
var ignoredAttributes_exports = {};
|
|
513
|
+
__export(ignoredAttributes_exports, {
|
|
514
|
+
IGNORED_ATTRIBUTES: () => IGNORED_ATTRIBUTES
|
|
515
|
+
});
|
|
437
516
|
var IGNORED_ATTRIBUTES = [
|
|
438
517
|
// Styling & layout
|
|
439
518
|
"class",
|
|
@@ -450,7 +529,19 @@ var IGNORED_ATTRIBUTES = [
|
|
|
450
529
|
"hidden"
|
|
451
530
|
];
|
|
452
531
|
|
|
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
|
+
|
|
453
540
|
// src/schema/shared/ignoredElements.ts
|
|
541
|
+
var ignoredElements_exports = {};
|
|
542
|
+
__export(ignoredElements_exports, {
|
|
543
|
+
IGNORED_ELEMENT_SELECTORS: () => IGNORED_ELEMENT_SELECTORS
|
|
544
|
+
});
|
|
454
545
|
var IGNORED_ELEMENT_SELECTORS = [
|
|
455
546
|
"span.rhlabel",
|
|
456
547
|
"span.abstractlabel",
|
|
@@ -462,15 +553,18 @@ var IGNORED_ELEMENT_SELECTORS = [
|
|
|
462
553
|
// src/schema/shared/utils.ts
|
|
463
554
|
var isIgnoredAttribute = (attribute) => IGNORED_ATTRIBUTES.includes(attribute);
|
|
464
555
|
var isIgnoredElement = (element) => IGNORED_ELEMENT_SELECTORS.some((selector) => element.matches(selector));
|
|
465
|
-
var findSchemaByTag = (
|
|
556
|
+
var findSchemaByTag = (tagName) => SCHEMAS.find((schema) => schema.tag === tagName.toLowerCase());
|
|
466
557
|
// Annotate the CommonJS export names for ESM import in node:
|
|
467
558
|
0 && (module.exports = {
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
559
|
+
GlobalAttributes,
|
|
560
|
+
GlobalAttributesTypes,
|
|
561
|
+
IgnoredAttributes,
|
|
562
|
+
IgnoredElements,
|
|
563
|
+
SchemaTypes,
|
|
564
|
+
Schemas,
|
|
565
|
+
SchemasAtoms,
|
|
566
|
+
SchemasElements,
|
|
567
|
+
SchemasGroupElements,
|
|
568
|
+
SchemasInlineElements,
|
|
569
|
+
Utils
|
|
476
570
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -1,3 +1,23 @@
|
|
|
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
|
+
|
|
1
21
|
// src/schema/shared/createSchema.ts
|
|
2
22
|
var createSchema = ({
|
|
3
23
|
kind,
|
|
@@ -18,6 +38,15 @@ var createSchema = ({
|
|
|
18
38
|
};
|
|
19
39
|
|
|
20
40
|
// 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
|
+
});
|
|
21
50
|
var TRACK_CHANGES_ATTR_DATA_USERNAME = "data-username";
|
|
22
51
|
var TRACK_CHANGES_ATTR_DATA_USERID = "data-userid";
|
|
23
52
|
var TRACK_CHANGES_ATTR_DATA_TIME = "data-time";
|
|
@@ -65,6 +94,19 @@ var B_SCHEMA = createSchema({
|
|
|
65
94
|
allowedChildTagNames: ATOM_TAGS
|
|
66
95
|
});
|
|
67
96
|
|
|
97
|
+
// src/schema/schema.types.ts
|
|
98
|
+
var schema_types_exports = {};
|
|
99
|
+
__export(schema_types_exports, {
|
|
100
|
+
ELEMENT_ROLE: () => ELEMENT_ROLE
|
|
101
|
+
});
|
|
102
|
+
var ELEMENT_ROLE = /* @__PURE__ */ ((ELEMENT_ROLE2) => {
|
|
103
|
+
ELEMENT_ROLE2["QUERYCOMMENTSWRAPPER"] = "QUERYCOMMENTSWRAPPER";
|
|
104
|
+
ELEMENT_ROLE2["HEADING"] = "HEADING";
|
|
105
|
+
ELEMENT_ROLE2["INS"] = "INS";
|
|
106
|
+
ELEMENT_ROLE2["DEL"] = "DEL";
|
|
107
|
+
return ELEMENT_ROLE2;
|
|
108
|
+
})(ELEMENT_ROLE || {});
|
|
109
|
+
|
|
68
110
|
// src/schema/elementSchemas/atoms/commentQuerySection.ts
|
|
69
111
|
var COMMENT_QUERY_SECTION_SCHEMA = createSchema({
|
|
70
112
|
kind: "atom",
|
|
@@ -189,6 +231,16 @@ var ATOM_SCHEMAS = [
|
|
|
189
231
|
INSERTION_SCHEMA,
|
|
190
232
|
DELETION_SCHEMA
|
|
191
233
|
];
|
|
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
|
+
});
|
|
192
244
|
|
|
193
245
|
// src/schema/elementSchemas/inlineElements/inlineElementsTags.ts
|
|
194
246
|
var COMMENT_TAG = "COMMENT";
|
|
@@ -244,6 +296,16 @@ var ELEMENT_SCHEMAS = [
|
|
|
244
296
|
PARA_SCHEMA,
|
|
245
297
|
TITLE_SCHEMA
|
|
246
298
|
];
|
|
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
|
+
});
|
|
247
309
|
|
|
248
310
|
// src/schema/elementSchemas/groupElements/groupElementsTags.ts
|
|
249
311
|
var SECTION_TAG = "SECTION1";
|
|
@@ -268,6 +330,16 @@ var SECTION_SCHEMA = createSchema({
|
|
|
268
330
|
|
|
269
331
|
// src/schema/elementSchemas/groupElements/index.ts
|
|
270
332
|
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
|
+
});
|
|
271
343
|
|
|
272
344
|
// src/schema/elementSchemas/inlineElements/comment.ts
|
|
273
345
|
var COMMENT_SCHEMA = createSchema({
|
|
@@ -391,6 +463,9 @@ var INLINE_ELEMENT_SCHEMAS = [
|
|
|
391
463
|
CONTENT_SCHEMA,
|
|
392
464
|
REPLY_SCHEMA
|
|
393
465
|
];
|
|
466
|
+
var inlineElementSchemas = Object.fromEntries(
|
|
467
|
+
INLINE_ELEMENT_SCHEMAS.map((schema) => [schema.tag, schema])
|
|
468
|
+
);
|
|
394
469
|
|
|
395
470
|
// src/schema/schemas.ts
|
|
396
471
|
var SCHEMAS = [
|
|
@@ -399,8 +474,15 @@ var SCHEMAS = [
|
|
|
399
474
|
...GROUP_ELEMENT_SCHEMAS,
|
|
400
475
|
...INLINE_ELEMENT_SCHEMAS
|
|
401
476
|
];
|
|
477
|
+
var schemas = Object.fromEntries(
|
|
478
|
+
SCHEMAS.map((schema) => [schema.tag, schema])
|
|
479
|
+
);
|
|
402
480
|
|
|
403
481
|
// src/schema/shared/ignoredAttributes.ts
|
|
482
|
+
var ignoredAttributes_exports = {};
|
|
483
|
+
__export(ignoredAttributes_exports, {
|
|
484
|
+
IGNORED_ATTRIBUTES: () => IGNORED_ATTRIBUTES
|
|
485
|
+
});
|
|
404
486
|
var IGNORED_ATTRIBUTES = [
|
|
405
487
|
// Styling & layout
|
|
406
488
|
"class",
|
|
@@ -417,7 +499,19 @@ var IGNORED_ATTRIBUTES = [
|
|
|
417
499
|
"hidden"
|
|
418
500
|
];
|
|
419
501
|
|
|
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
|
+
|
|
420
510
|
// src/schema/shared/ignoredElements.ts
|
|
511
|
+
var ignoredElements_exports = {};
|
|
512
|
+
__export(ignoredElements_exports, {
|
|
513
|
+
IGNORED_ELEMENT_SELECTORS: () => IGNORED_ELEMENT_SELECTORS
|
|
514
|
+
});
|
|
421
515
|
var IGNORED_ELEMENT_SELECTORS = [
|
|
422
516
|
"span.rhlabel",
|
|
423
517
|
"span.abstractlabel",
|
|
@@ -429,14 +523,17 @@ var IGNORED_ELEMENT_SELECTORS = [
|
|
|
429
523
|
// src/schema/shared/utils.ts
|
|
430
524
|
var isIgnoredAttribute = (attribute) => IGNORED_ATTRIBUTES.includes(attribute);
|
|
431
525
|
var isIgnoredElement = (element) => IGNORED_ELEMENT_SELECTORS.some((selector) => element.matches(selector));
|
|
432
|
-
var findSchemaByTag = (
|
|
526
|
+
var findSchemaByTag = (tagName) => SCHEMAS.find((schema) => schema.tag === tagName.toLowerCase());
|
|
433
527
|
export {
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
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
|
|
442
539
|
};
|