@lblod/ember-rdfa-editor 13.1.1 → 13.2.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.
- package/README.md +12 -9
- package/declarations/components/_private/common/configurable-rdfa-display.d.ts +4 -4
- package/declarations/components/editor.d.ts +2 -0
- package/declarations/components/toolbar/button.d.ts +1 -1
- package/declarations/core/say-controller.d.ts +11 -4
- package/declarations/core/say-data-factory/blank-node.d.ts +1 -1
- package/declarations/core/say-data-factory/default-graph.d.ts +1 -1
- package/declarations/core/say-data-factory/literal.d.ts +1 -1
- package/declarations/core/say-data-factory/named-node.d.ts +1 -1
- package/declarations/core/say-data-factory/prosemirror-terms/content-literal.d.ts +1 -1
- package/declarations/core/say-data-factory/prosemirror-terms/literal-node.d.ts +1 -1
- package/declarations/core/say-data-factory/prosemirror-terms/resource-node.d.ts +1 -1
- package/declarations/core/say-data-factory/quad.d.ts +1 -1
- package/declarations/core/say-data-factory/variable.d.ts +1 -1
- package/declarations/core/say-editor.d.ts +1 -0
- package/declarations/core/say-view.d.ts +7 -1
- package/declarations/utils/_private/rdfa-parser/util.d.ts +1 -1
- package/dist/commands/_private/rdfa-commands/remove-backlink.js +1 -1
- package/dist/commands/_private/rdfa-commands/select-node-by-rdfa-id.js +1 -1
- package/dist/commands/_private/rdfa-commands/select-node-by-subject.js +1 -1
- package/dist/commands/_private/rdfa-commands/wrap-inline-resource.js +1 -1
- package/dist/commands/_private/rdfa-commands/wrap-literal.js +1 -1
- package/dist/commands/_private/rdfa-commands/wrap-resource.js +1 -1
- package/dist/commands/rdfa-commands/add-property.js +1 -1
- package/dist/commands/rdfa-commands/remove-property.js +1 -1
- package/dist/components/_private/attribute-editor/index.js +1 -1
- package/dist/components/_private/attribute-editor/index.js.map +1 -1
- package/dist/components/_private/common/configurable-rdfa-display.js +1 -1
- package/dist/components/_private/common/configurable-rdfa-display.js.map +1 -1
- package/dist/components/_private/common/property-details.js +1 -1
- package/dist/components/_private/node-controls/wrapping-utils.js +2 -2
- package/dist/components/_private/node-controls/wrapping-utils.js.map +1 -1
- package/dist/components/_private/rdfa-visualiser/rdfa-explorer.js +1 -1
- package/dist/components/_private/rdfa-visualiser/resource-info.js +1 -1
- package/dist/components/_private/rdfa-visualiser/visualiser-card.js +1 -1
- package/dist/components/collapsible.js +1 -1
- package/dist/components/collapsible.js.map +1 -1
- package/dist/components/editor.js +7 -1
- package/dist/components/editor.js.map +1 -1
- package/dist/components/ember-node/embedded-editor.js +4 -1
- package/dist/components/ember-node/embedded-editor.js.map +1 -1
- package/dist/components/plugins/history/redo.js +1 -1
- package/dist/components/plugins/history/undo.js +1 -1
- package/dist/components/plugins/list/ordered.js +1 -1
- package/dist/components/plugins/list/unordered.js +1 -1
- package/dist/components/toolbar/mark.js +1 -1
- package/dist/core/keymap.js +2 -2
- package/dist/core/rdfa-types.js +1 -1
- package/dist/core/say-controller.js +41 -5
- package/dist/core/say-controller.js.map +1 -1
- package/dist/core/say-data-factory/blank-node.js +2 -2
- package/dist/core/say-data-factory/blank-node.js.map +1 -1
- package/dist/core/say-data-factory/default-graph.js +2 -2
- package/dist/core/say-data-factory/default-graph.js.map +1 -1
- package/dist/core/say-data-factory/literal.js +2 -2
- package/dist/core/say-data-factory/literal.js.map +1 -1
- package/dist/core/say-data-factory/named-node.js +2 -2
- package/dist/core/say-data-factory/named-node.js.map +1 -1
- package/dist/core/say-data-factory/prosemirror-terms/content-literal.js +2 -2
- package/dist/core/say-data-factory/prosemirror-terms/content-literal.js.map +1 -1
- package/dist/core/say-data-factory/prosemirror-terms/literal-node.js +2 -2
- package/dist/core/say-data-factory/prosemirror-terms/literal-node.js.map +1 -1
- package/dist/core/say-data-factory/prosemirror-terms/resource-node.js +2 -2
- package/dist/core/say-data-factory/prosemirror-terms/resource-node.js.map +1 -1
- package/dist/core/say-data-factory/quad.js +2 -2
- package/dist/core/say-data-factory/quad.js.map +1 -1
- package/dist/core/say-data-factory/variable.js +2 -2
- package/dist/core/say-data-factory/variable.js.map +1 -1
- package/dist/core/say-editor.js +4 -2
- package/dist/core/say-editor.js.map +1 -1
- package/dist/core/say-view.js +2 -1
- package/dist/core/say-view.js.map +1 -1
- package/dist/index-CxRqg5Kr.js +671 -0
- package/dist/index-CxRqg5Kr.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/{main-dUbkrxFL.js → main-DFf-0En3.js} +7988 -8105
- package/dist/main-DFf-0En3.js.map +1 -0
- package/dist/nodes/invisible-rdfa.js +1 -1
- package/dist/plugins/history/index.js +1 -1
- package/dist/plugins/list/commands/lift-out-of-nested-lists.js +1 -1
- package/dist/plugins/rdfa-info/index.js +1 -1
- package/dist/plugins/rdfa-info/types.js +1 -1
- package/dist/plugins/remove-properties-of-deleted-nodes/index.js +1 -1
- package/dist/utils/_private/datastore/graphy-dataset.js +1 -1
- package/dist/utils/_private/ember-node.js +0 -2
- package/dist/utils/_private/ember-node.js.map +1 -1
- package/dist/utils/_private/rdfa-parser/util.js +1 -8
- package/dist/utils/_private/rdfa-parser/util.js.map +1 -1
- package/package.json +8 -7
- package/declarations/components/toolbar.d.ts +0 -1
- package/dist/main-dUbkrxFL.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"named-node.js","sources":["../../../src/core/say-data-factory/named-node.ts"],"sourcesContent":["import type * as RDF from '@rdfjs/types';\nimport type { SayTerm } from './term.ts';\nimport type { Option } from '#root/utils/_private/option.ts';\n\n/**\n * A term that contains an IRI.\n */\nexport class SayNamedNode<\n Iri extends string = string,\n> implements RDF.NamedNode<Iri> {\n public readonly termType = 'NamedNode';\n public readonly value: Iri;\n\n public constructor(value: Iri) {\n this.value = value;\n }\n\n equals
|
|
1
|
+
{"version":3,"file":"named-node.js","sources":["../../../src/core/say-data-factory/named-node.ts"],"sourcesContent":["import type * as RDF from '@rdfjs/types';\nimport type { SayTerm } from './term.ts';\nimport type { Option } from '#root/utils/_private/option.ts';\n\n/**\n * A term that contains an IRI.\n */\nexport class SayNamedNode<\n Iri extends string = string,\n> implements RDF.NamedNode<Iri> {\n public readonly termType = 'NamedNode';\n public readonly value: Iri;\n\n public constructor(value: Iri) {\n this.value = value;\n }\n\n equals(other?: Option<SayTerm>) {\n return (\n !!other && other.termType === 'NamedNode' && other.value === this.value\n );\n }\n\n toJSON() {\n return {\n termType: this.termType,\n value: this.value,\n };\n }\n}\n"],"names":["SayNamedNode","termType","value","constructor","equals","other","toJSON"],"mappings":"AAIA;AACA;AACA;AACO,MAAMA,YAAY,CAEO;AACdC,EAAAA,QAAQ,GAAG,WAAW;EACtBC,KAAK;EAEdC,WAAWA,CAACD,KAAU,EAAE;IAC7B,IAAI,CAACA,KAAK,GAAGA,KAAK;AACpB,EAAA;EAEAE,MAAMA,CAACC,KAAuB,EAAE;AAC9B,IAAA,OACE,CAAC,CAACA,KAAK,IAAIA,KAAK,CAACJ,QAAQ,KAAK,WAAW,IAAII,KAAK,CAACH,KAAK,KAAK,IAAI,CAACA,KAAK;AAE3E,EAAA;AAEAI,EAAAA,MAAMA,GAAG;IACP,OAAO;MACLL,QAAQ,EAAE,IAAI,CAACA,QAAQ;MACvBC,KAAK,EAAE,IAAI,CAACA;KACb;AACH,EAAA;AACF;;;;"}
|
|
@@ -22,9 +22,9 @@ class ContentLiteralTerm {
|
|
|
22
22
|
this.datatype = ContentLiteralTerm.XSD_STRING;
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
-
equals
|
|
25
|
+
equals(other) {
|
|
26
26
|
return !!other && other.termType === 'ContentLiteral' && other.language === this.language && this.datatype.equals(other.datatype);
|
|
27
|
-
}
|
|
27
|
+
}
|
|
28
28
|
toJSON() {
|
|
29
29
|
return {
|
|
30
30
|
termType: this.termType,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content-literal.js","sources":["../../../../src/core/say-data-factory/prosemirror-terms/content-literal.ts"],"sourcesContent":["import type * as RDF from '@rdfjs/types';\nimport { SayNamedNode } from '../named-node.ts';\nimport type { Option } from '#root/utils/_private/option.ts';\nimport type { SayTerm } from '../term.ts';\n\n/**\n * A term that represents an RDF literal, containing a string with an optional language tag or datatype.\n */\nexport class ContentLiteralTerm {\n public readonly termType = 'ContentLiteral';\n public readonly language: string;\n public readonly datatype: RDF.NamedNode;\n public readonly value = '';\n\n public static readonly RDF_LANGUAGE_STRING = new SayNamedNode(\n 'http://www.w3.org/1999/02/22-rdf-syntax-ns#langString',\n );\n\n public static readonly XSD_STRING = new SayNamedNode(\n 'http://www.w3.org/2001/XMLSchema#string',\n );\n\n public constructor(languageOrDatatype?: string | RDF.NamedNode) {\n if (typeof languageOrDatatype === 'string') {\n this.language = languageOrDatatype;\n this.datatype = ContentLiteralTerm.RDF_LANGUAGE_STRING;\n } else if (languageOrDatatype) {\n this.language = '';\n this.datatype = languageOrDatatype;\n } else {\n this.language = '';\n this.datatype = ContentLiteralTerm.XSD_STRING;\n }\n }\n\n equals
|
|
1
|
+
{"version":3,"file":"content-literal.js","sources":["../../../../src/core/say-data-factory/prosemirror-terms/content-literal.ts"],"sourcesContent":["import type * as RDF from '@rdfjs/types';\nimport { SayNamedNode } from '../named-node.ts';\nimport type { Option } from '#root/utils/_private/option.ts';\nimport type { SayTerm } from '../term.ts';\n\n/**\n * A term that represents an RDF literal, containing a string with an optional language tag or datatype.\n */\nexport class ContentLiteralTerm {\n public readonly termType = 'ContentLiteral';\n public readonly language: string;\n public readonly datatype: RDF.NamedNode;\n public readonly value = '';\n\n public static readonly RDF_LANGUAGE_STRING = new SayNamedNode(\n 'http://www.w3.org/1999/02/22-rdf-syntax-ns#langString',\n );\n\n public static readonly XSD_STRING = new SayNamedNode(\n 'http://www.w3.org/2001/XMLSchema#string',\n );\n\n public constructor(languageOrDatatype?: string | RDF.NamedNode) {\n if (typeof languageOrDatatype === 'string') {\n this.language = languageOrDatatype;\n this.datatype = ContentLiteralTerm.RDF_LANGUAGE_STRING;\n } else if (languageOrDatatype) {\n this.language = '';\n this.datatype = languageOrDatatype;\n } else {\n this.language = '';\n this.datatype = ContentLiteralTerm.XSD_STRING;\n }\n }\n\n equals(other?: Option<SayTerm>) {\n return (\n !!other &&\n other.termType === 'ContentLiteral' &&\n other.language === this.language &&\n this.datatype.equals(other.datatype)\n );\n }\n\n toJSON() {\n return {\n termType: this.termType,\n value: this.value,\n language: this.language,\n datatype: {\n termType: this.datatype.termType,\n value: this.datatype.value,\n },\n };\n }\n}\n"],"names":["ContentLiteralTerm","termType","language","datatype","value","RDF_LANGUAGE_STRING","SayNamedNode","XSD_STRING","constructor","languageOrDatatype","equals","other","toJSON"],"mappings":";;AAKA;AACA;AACA;AACO,MAAMA,kBAAkB,CAAC;AACdC,EAAAA,QAAQ,GAAG,gBAAgB;EAC3BC,QAAQ;EACRC,QAAQ;AACRC,EAAAA,KAAK,GAAG,EAAE;AAE1B,EAAA,OAAuBC,mBAAmB,GAAG,IAAIC,YAAY,CAC3D,uDACF,CAAC;AAED,EAAA,OAAuBC,UAAU,GAAG,IAAID,YAAY,CAClD,yCACF,CAAC;EAEME,WAAWA,CAACC,kBAA2C,EAAE;AAC9D,IAAA,IAAI,OAAOA,kBAAkB,KAAK,QAAQ,EAAE;MAC1C,IAAI,CAACP,QAAQ,GAAGO,kBAAkB;AAClC,MAAA,IAAI,CAACN,QAAQ,GAAGH,kBAAkB,CAACK,mBAAmB;IACxD,CAAC,MAAM,IAAII,kBAAkB,EAAE;MAC7B,IAAI,CAACP,QAAQ,GAAG,EAAE;MAClB,IAAI,CAACC,QAAQ,GAAGM,kBAAkB;AACpC,IAAA,CAAC,MAAM;MACL,IAAI,CAACP,QAAQ,GAAG,EAAE;AAClB,MAAA,IAAI,CAACC,QAAQ,GAAGH,kBAAkB,CAACO,UAAU;AAC/C,IAAA;AACF,EAAA;EAEAG,MAAMA,CAACC,KAAuB,EAAE;IAC9B,OACE,CAAC,CAACA,KAAK,IACPA,KAAK,CAACV,QAAQ,KAAK,gBAAgB,IACnCU,KAAK,CAACT,QAAQ,KAAK,IAAI,CAACA,QAAQ,IAChC,IAAI,CAACC,QAAQ,CAACO,MAAM,CAACC,KAAK,CAACR,QAAQ,CAAC;AAExC,EAAA;AAEAS,EAAAA,MAAMA,GAAG;IACP,OAAO;MACLX,QAAQ,EAAE,IAAI,CAACA,QAAQ;MACvBG,KAAK,EAAE,IAAI,CAACA,KAAK;MACjBF,QAAQ,EAAE,IAAI,CAACA,QAAQ;AACvBC,MAAAA,QAAQ,EAAE;AACRF,QAAAA,QAAQ,EAAE,IAAI,CAACE,QAAQ,CAACF,QAAQ;AAChCG,QAAAA,KAAK,EAAE,IAAI,CAACD,QAAQ,CAACC;AACvB;KACD;AACH,EAAA;AACF;;;;"}
|
|
@@ -7,9 +7,9 @@ class LiteralNodeTerm {
|
|
|
7
7
|
constructor(value) {
|
|
8
8
|
this.value = value;
|
|
9
9
|
}
|
|
10
|
-
equals
|
|
10
|
+
equals(other) {
|
|
11
11
|
return !!other && other.termType === 'LiteralNode' && other.value === this.value;
|
|
12
|
-
}
|
|
12
|
+
}
|
|
13
13
|
toJSON() {
|
|
14
14
|
return {
|
|
15
15
|
termType: this.termType,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"literal-node.js","sources":["../../../../src/core/say-data-factory/prosemirror-terms/literal-node.ts"],"sourcesContent":["import type { Option } from '#root/utils/_private/option.ts';\nimport type { SayTerm } from '../term.ts';\n\n/**\n * A term that represents an RDF literal, containing a string with an optional language tag or datatype.\n */\nexport class LiteralNodeTerm {\n public readonly termType = 'LiteralNode';\n public readonly value: string;\n\n public constructor(value: string) {\n this.value = value;\n }\n\n equals
|
|
1
|
+
{"version":3,"file":"literal-node.js","sources":["../../../../src/core/say-data-factory/prosemirror-terms/literal-node.ts"],"sourcesContent":["import type { Option } from '#root/utils/_private/option.ts';\nimport type { SayTerm } from '../term.ts';\n\n/**\n * A term that represents an RDF literal, containing a string with an optional language tag or datatype.\n */\nexport class LiteralNodeTerm {\n public readonly termType = 'LiteralNode';\n public readonly value: string;\n\n public constructor(value: string) {\n this.value = value;\n }\n\n equals(other?: Option<SayTerm>) {\n return (\n !!other && other.termType === 'LiteralNode' && other.value === this.value\n );\n }\n\n toJSON() {\n return {\n termType: this.termType,\n value: this.value,\n };\n }\n}\n"],"names":["LiteralNodeTerm","termType","value","constructor","equals","other","toJSON"],"mappings":"AAGA;AACA;AACA;AACO,MAAMA,eAAe,CAAC;AACXC,EAAAA,QAAQ,GAAG,aAAa;EACxBC,KAAK;EAEdC,WAAWA,CAACD,KAAa,EAAE;IAChC,IAAI,CAACA,KAAK,GAAGA,KAAK;AACpB,EAAA;EAEAE,MAAMA,CAACC,KAAuB,EAAE;AAC9B,IAAA,OACE,CAAC,CAACA,KAAK,IAAIA,KAAK,CAACJ,QAAQ,KAAK,aAAa,IAAII,KAAK,CAACH,KAAK,KAAK,IAAI,CAACA,KAAK;AAE7E,EAAA;AAEAI,EAAAA,MAAMA,GAAG;IACP,OAAO;MACLL,QAAQ,EAAE,IAAI,CAACA,QAAQ;MACvBC,KAAK,EAAE,IAAI,CAACA;KACb;AACH,EAAA;AACF;;;;"}
|
|
@@ -7,9 +7,9 @@ class ResourceNodeTerm {
|
|
|
7
7
|
constructor(value) {
|
|
8
8
|
this.value = value;
|
|
9
9
|
}
|
|
10
|
-
equals
|
|
10
|
+
equals(other) {
|
|
11
11
|
return !!other && other.termType === 'ResourceNode' && other.value === this.value;
|
|
12
|
-
}
|
|
12
|
+
}
|
|
13
13
|
toJSON() {
|
|
14
14
|
return {
|
|
15
15
|
termType: this.termType,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resource-node.js","sources":["../../../../src/core/say-data-factory/prosemirror-terms/resource-node.ts"],"sourcesContent":["import type { Option } from '#root/utils/_private/option.ts';\nimport type { SayTerm } from '../term.ts';\n\n/**\n * A term that contains an IRI.\n */\nexport class ResourceNodeTerm<Iri extends string = string> {\n public readonly termType = 'ResourceNode';\n public readonly value: Iri;\n\n public constructor(value: Iri) {\n this.value = value;\n }\n\n equals
|
|
1
|
+
{"version":3,"file":"resource-node.js","sources":["../../../../src/core/say-data-factory/prosemirror-terms/resource-node.ts"],"sourcesContent":["import type { Option } from '#root/utils/_private/option.ts';\nimport type { SayTerm } from '../term.ts';\n\n/**\n * A term that contains an IRI.\n */\nexport class ResourceNodeTerm<Iri extends string = string> {\n public readonly termType = 'ResourceNode';\n public readonly value: Iri;\n\n public constructor(value: Iri) {\n this.value = value;\n }\n\n equals(other?: Option<SayTerm>) {\n return (\n !!other && other.termType === 'ResourceNode' && other.value === this.value\n );\n }\n\n toJSON() {\n return {\n termType: this.termType,\n value: this.value,\n };\n }\n}\n"],"names":["ResourceNodeTerm","termType","value","constructor","equals","other","toJSON"],"mappings":"AAGA;AACA;AACA;AACO,MAAMA,gBAAgB,CAA8B;AACzCC,EAAAA,QAAQ,GAAG,cAAc;EACzBC,KAAK;EAEdC,WAAWA,CAACD,KAAU,EAAE;IAC7B,IAAI,CAACA,KAAK,GAAGA,KAAK;AACpB,EAAA;EAEAE,MAAMA,CAACC,KAAuB,EAAE;AAC9B,IAAA,OACE,CAAC,CAACA,KAAK,IAAIA,KAAK,CAACJ,QAAQ,KAAK,cAAc,IAAII,KAAK,CAACH,KAAK,KAAK,IAAI,CAACA,KAAK;AAE9E,EAAA;AAEAI,EAAAA,MAAMA,GAAG;IACP,OAAO;MACLL,QAAQ,EAAE,IAAI,CAACA,QAAQ;MACvBC,KAAK,EAAE,IAAI,CAACA;KACb;AACH,EAAA;AACF;;;;"}
|
|
@@ -11,10 +11,10 @@ class SayQuad {
|
|
|
11
11
|
this.object = object;
|
|
12
12
|
this.graph = graph;
|
|
13
13
|
}
|
|
14
|
-
equals
|
|
14
|
+
equals(other) {
|
|
15
15
|
// `|| !other.termType` is for backwards-compatibility with old factories without RDF* support.
|
|
16
16
|
return !!other && (other.termType === 'Quad' || !other.termType) && this.subject.equals(other.subject) && this.predicate.equals(other.predicate) && this.object.equals(other.object) && this.graph.equals(other.graph);
|
|
17
|
-
}
|
|
17
|
+
}
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
export { SayQuad };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quad.js","sources":["../../../src/core/say-data-factory/quad.ts"],"sourcesContent":["import type * as RDF from '@rdfjs/types';\nimport type { Option } from '#root/utils/_private/option.ts';\nimport type { SayTerm } from './term.ts';\n\n/**\n * An instance of DefaultGraph represents the default graph.\n * It's only allowed to assign a DefaultGraph to the .graph property of a Quad.\n */\nexport class SayQuad implements RDF.BaseQuad {\n public readonly termType = 'Quad';\n public readonly value = '';\n\n public constructor(\n public readonly subject: RDF.Term,\n public readonly predicate: RDF.Term,\n public readonly object: RDF.Term,\n public readonly graph: RDF.Term,\n ) {}\n\n equals
|
|
1
|
+
{"version":3,"file":"quad.js","sources":["../../../src/core/say-data-factory/quad.ts"],"sourcesContent":["import type * as RDF from '@rdfjs/types';\nimport type { Option } from '#root/utils/_private/option.ts';\nimport type { SayTerm } from './term.ts';\n\n/**\n * An instance of DefaultGraph represents the default graph.\n * It's only allowed to assign a DefaultGraph to the .graph property of a Quad.\n */\nexport class SayQuad implements RDF.BaseQuad {\n public readonly termType = 'Quad';\n public readonly value = '';\n\n public constructor(\n public readonly subject: RDF.Term,\n public readonly predicate: RDF.Term,\n public readonly object: RDF.Term,\n public readonly graph: RDF.Term,\n ) {}\n\n equals(other?: Option<SayTerm>) {\n // `|| !other.termType` is for backwards-compatibility with old factories without RDF* support.\n return (\n !!other &&\n (other.termType === 'Quad' || !other.termType) &&\n this.subject.equals(other.subject) &&\n this.predicate.equals(other.predicate) &&\n this.object.equals(other.object) &&\n this.graph.equals(other.graph)\n );\n }\n}\n"],"names":["SayQuad","termType","value","constructor","subject","predicate","object","graph","equals","other"],"mappings":"AAIA;AACA;AACA;AACA;AACO,MAAMA,OAAO,CAAyB;AAC3BC,EAAAA,QAAQ,GAAG,MAAM;AACjBC,EAAAA,KAAK,GAAG,EAAE;EAEnBC,WAAWA,CACAC,OAAiB,EACjBC,SAAmB,EACnBC,MAAgB,EAChBC,KAAe,EAC/B;IAAA,IAAA,CAJgBH,OAAiB,GAAjBA,OAAiB;IAAA,IAAA,CACjBC,SAAmB,GAAnBA,SAAmB;IAAA,IAAA,CACnBC,MAAgB,GAAhBA,MAAgB;IAAA,IAAA,CAChBC,KAAe,GAAfA,KAAe;AAC9B,EAAA;EAEHC,MAAMA,CAACC,KAAuB,EAAE;AAC9B;IACA,OACE,CAAC,CAACA,KAAK,KACNA,KAAK,CAACR,QAAQ,KAAK,MAAM,IAAI,CAACQ,KAAK,CAACR,QAAQ,CAAC,IAC9C,IAAI,CAACG,OAAO,CAACI,MAAM,CAACC,KAAK,CAACL,OAAO,CAAC,IAClC,IAAI,CAACC,SAAS,CAACG,MAAM,CAACC,KAAK,CAACJ,SAAS,CAAC,IACtC,IAAI,CAACC,MAAM,CAACE,MAAM,CAACC,KAAK,CAACH,MAAM,CAAC,IAChC,IAAI,CAACC,KAAK,CAACC,MAAM,CAACC,KAAK,CAACF,KAAK,CAAC;AAElC,EAAA;AACF;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"variable.js","sources":["../../../src/core/say-data-factory/variable.ts"],"sourcesContent":["import type { Option } from '#root/utils/_private/option.ts';\nimport type * as RDF from '@rdfjs/types';\nimport type { SayTerm } from './term.ts';\n\n/**\n * A term that represents a variable.\n */\nexport class SayVariable implements RDF.Variable {\n public readonly termType = 'Variable';\n public readonly value: string;\n\n public constructor(value: string) {\n this.value = value;\n }\n\n equals
|
|
1
|
+
{"version":3,"file":"variable.js","sources":["../../../src/core/say-data-factory/variable.ts"],"sourcesContent":["import type { Option } from '#root/utils/_private/option.ts';\nimport type * as RDF from '@rdfjs/types';\nimport type { SayTerm } from './term.ts';\n\n/**\n * A term that represents a variable.\n */\nexport class SayVariable implements RDF.Variable {\n public readonly termType = 'Variable';\n public readonly value: string;\n\n public constructor(value: string) {\n this.value = value;\n }\n\n equals(other?: Option<SayTerm>) {\n return (\n !!other && other.termType === 'Variable' && other.value === this.value\n );\n }\n\n toJSON() {\n return {\n termType: this.termType,\n value: this.value,\n };\n }\n}\n"],"names":["SayVariable","termType","value","constructor","equals","other","toJSON"],"mappings":"AAIA;AACA;AACA;AACO,MAAMA,WAAW,CAAyB;AAC/BC,EAAAA,QAAQ,GAAG,UAAU;EACrBC,KAAK;EAEdC,WAAWA,CAACD,KAAa,EAAE;IAChC,IAAI,CAACA,KAAK,GAAGA,KAAK;AACpB,EAAA;EAEAE,MAAMA,CAACC,KAAuB,EAAE;AAC9B,IAAA,OACE,CAAC,CAACA,KAAK,IAAIA,KAAK,CAACJ,QAAQ,KAAK,UAAU,IAAII,KAAK,CAACH,KAAK,KAAK,IAAI,CAACA,KAAK;AAE1E,EAAA;AAEAI,EAAAA,MAAMA,GAAG;IACP,OAAO;MACLL,QAAQ,EAAE,IAAI,CAACA,QAAQ;MACvBC,KAAK,EAAE,IAAI,CAACA;KACb;AACH,EAAA;AACF;;;;"}
|
package/dist/core/say-editor.js
CHANGED
|
@@ -3,7 +3,7 @@ import { DOMParser } from 'prosemirror-model';
|
|
|
3
3
|
import { getPathFromRoot, tagName, isElement } from '../utils/_private/dom-helpers.js';
|
|
4
4
|
import { v4 } from 'uuid';
|
|
5
5
|
import { keymap } from 'prosemirror-keymap';
|
|
6
|
-
import { history } from '
|
|
6
|
+
import { h as history } from '../index-CxRqg5Kr.js';
|
|
7
7
|
import { baseKeymap } from './keymap.js';
|
|
8
8
|
import { dropCursor } from 'prosemirror-dropcursor';
|
|
9
9
|
import { createLogger } from '../utils/_private/logging-utils.js';
|
|
@@ -61,7 +61,8 @@ class SayEditor {
|
|
|
61
61
|
return {};
|
|
62
62
|
},
|
|
63
63
|
defaultAttrGenerators = [],
|
|
64
|
-
keyMapOptions
|
|
64
|
+
keyMapOptions,
|
|
65
|
+
editable
|
|
65
66
|
}) {
|
|
66
67
|
this.logger = createLogger(this.constructor.name);
|
|
67
68
|
this.owner = owner;
|
|
@@ -103,6 +104,7 @@ class SayEditor {
|
|
|
103
104
|
class: 'say-editor__inner say-content'
|
|
104
105
|
},
|
|
105
106
|
nodeViews: nodeViews(new SayController(this)),
|
|
107
|
+
editable,
|
|
106
108
|
dispatchTransaction: tr => {
|
|
107
109
|
const newState = this.mainView.state.apply(tr);
|
|
108
110
|
this.mainView.updateState(newState);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"say-editor.js","sources":["../../src/core/say-editor.ts"],"sourcesContent":["import { EditorState, Plugin } from 'prosemirror-state';\nimport type { NodeViewConstructor } from 'prosemirror-view';\nimport { Schema } from 'prosemirror-model';\nimport {\n getPathFromRoot,\n isElement,\n tagName,\n} from '#root/utils/_private/dom-helpers.ts';\n\nimport { v4 as uuidv4 } from 'uuid';\nimport { keymap } from 'prosemirror-keymap';\nimport { history } from 'prosemirror-history';\nimport { baseKeymap, type KeymapOptions } from '#root/core/keymap.ts';\nimport { dropCursor } from 'prosemirror-dropcursor';\nimport { createLogger, type Logger } from '../utils/_private/logging-utils.ts';\nimport { ReferenceManager } from '#root/utils/_private/reference-manager.ts';\nimport { datastore, isElementPNode } from '#root/plugins/datastore/index.ts';\n\nimport type { DatastoreResolvedPNode } from '#root/plugins/datastore/datastore-node-types.ts';\nimport { tracked } from 'tracked-built-ins';\nimport recreateUuidsOnPaste, {\n recreateUuidsOnPasteKey,\n} from '../plugins/recreateUuidsOnPaste.ts';\nimport type Owner from '@ember/owner';\nimport {\n type DefaultAttrGenPuginOptions,\n defaultAttributeValueGeneration,\n} from '#root/plugins/default-attribute-value-generation/index.ts';\nimport SayView from '#root/core/say-view.ts';\nimport SayController from '#root/core/say-controller.ts';\nimport SaySerializer from '#root/core/say-serializer.ts';\nimport { rdfaInfoPlugin } from '../plugins/rdfa-info/index.ts';\nimport { gapCursor } from '../plugins/gap-cursor/index.ts';\nimport { removePropertiesOfDeletedNodes } from '#root/plugins/remove-properties-of-deleted-nodes/index.ts';\nimport HTMLInputParser from '#root/utils/_private/html-input-parser.ts';\nimport { preprocessRDFa } from '#root/core/rdfa-processor.ts';\nimport { ProseParser } from '#root/prosemirror-aliases.ts';\nimport { onChangedPlugin } from '#root/plugins/on-changed/plugin.ts';\n\nexport type PluginConfig = Plugin[] | { plugins: Plugin[]; override?: boolean };\n\nexport interface SayEditorArgs {\n owner: Owner;\n target: Element;\n schema: Schema;\n baseIRI: string;\n plugins?: PluginConfig;\n nodeViews?: (\n controller: SayController,\n ) => Record<string, NodeViewConstructor>;\n defaultAttrGenerators?: DefaultAttrGenPuginOptions;\n}\n\nexport default class SayEditor {\n @tracked mainView: SayView;\n @tracked activeView: SayView;\n owner: Owner;\n root: Element;\n baseIRI: string;\n pathFromRoot: Node[];\n schema: Schema;\n serializer: SaySerializer;\n\n private logger: Logger;\n parser: ProseParser;\n\n constructor(options: SayEditorArgs);\n /**\n *\n * @deprecated providing the `options` option when instantiating a `SayEditor` object is deprecated.\n * The behaviour of `selectBlockRdfaNode` is included by default.\n */\n constructor(options: SayEditorArgs & { keyMapOptions?: KeymapOptions });\n constructor({\n owner,\n target,\n schema,\n baseIRI,\n plugins = [],\n nodeViews = () => {\n return {};\n },\n defaultAttrGenerators = [],\n keyMapOptions,\n }: SayEditorArgs & { keyMapOptions?: KeymapOptions }) {\n this.logger = createLogger(this.constructor.name);\n this.owner = owner;\n this.root = target;\n this.pathFromRoot = getPathFromRoot(this.root, false);\n this.baseIRI = baseIRI;\n this.schema = schema;\n\n const pluginArr = plugins instanceof Array ? plugins : plugins.plugins;\n let pluginConf;\n\n if ('override' in plugins && plugins.override) {\n pluginConf = pluginArr;\n } else {\n const recreateUuidsOnPastePlugin = pluginArr.find(\n (plugin) => plugin.spec.key === recreateUuidsOnPasteKey,\n );\n\n const filteredPluginArr = pluginArr.filter(\n (plugin) => plugin.spec.key !== recreateUuidsOnPasteKey,\n );\n\n pluginConf = [\n datastore({ pathFromRoot: this.pathFromRoot, baseIRI }),\n ...filteredPluginArr,\n dropCursor(),\n gapCursor(),\n keymap(baseKeymap(schema, keyMapOptions)),\n history(),\n recreateUuidsOnPastePlugin ?? recreateUuidsOnPaste,\n defaultAttributeValueGeneration([\n {\n attribute: '__guid',\n generator() {\n return uuidv4();\n },\n },\n {\n attribute: '__rdfaId',\n generator() {\n return uuidv4();\n },\n },\n ...defaultAttrGenerators,\n ]),\n removePropertiesOfDeletedNodes(),\n rdfaInfoPlugin(),\n onChangedPlugin,\n ];\n }\n\n this.parser = ProseParser.fromSchema(this.schema);\n\n const state = EditorState.create({\n doc: this.parser.parse(target),\n plugins: pluginConf,\n });\n this.serializer = SaySerializer.fromSchema(\n this.schema,\n () => this.mainView.state,\n );\n this.mainView = new SayView(target, {\n state,\n attributes: { class: 'say-editor__inner say-content' },\n nodeViews: nodeViews(new SayController(this)),\n dispatchTransaction: (tr) => {\n const newState = this.mainView.state.apply(tr);\n this.mainView.updateState(newState);\n },\n handleDOMEvents: {\n focus: () => {\n this.setActiveView(this.mainView);\n },\n },\n domParser: this.parser,\n transformPastedHTML: (html, editorView) => {\n const htmlCleaner = new HTMLInputParser();\n const cleanedHTMLNode = htmlCleaner.prepareHTML(html, true);\n\n preprocessRDFa(\n cleanedHTMLNode,\n editorView ? getPathFromRoot(editorView.dom, false) : [],\n );\n\n return cleanedHTMLNode.innerHTML;\n },\n clipboardSerializer: this.serializer,\n });\n this.activeView = this.mainView;\n }\n\n setActiveView(view: SayView) {\n this.activeView = view;\n }\n\n get htmlContent(): string {\n return this.mainView.htmlContent;\n }\n}\n\nexport class ProseReferenceManager extends ReferenceManager<\n DatastoreResolvedPNode,\n DatastoreResolvedPNode\n> {\n constructor() {\n super(\n (node: DatastoreResolvedPNode) => node,\n (bundle: DatastoreResolvedPNode) => {\n if (isElementPNode(bundle)) {\n const { from, to, node } = bundle;\n const name = node?.type.name || '';\n const attrs = JSON.stringify(node?.attrs);\n return `${from} - ${to} - ${name} - ${attrs}`;\n } else {\n const { from, to, domNode } = bundle;\n let domNodeTag = '';\n let domNodeAttrs = '';\n if (domNode) {\n domNodeTag = tagName(domNode);\n domNodeAttrs = isElement(domNode)\n ? JSON.stringify(domNode.attributes)\n : '';\n }\n return `${from} - ${to} - ${domNodeTag} - ${domNodeAttrs}`;\n }\n },\n );\n }\n}\n"],"names":["SayEditor","g","prototype","tracked","i","owner","root","baseIRI","pathFromRoot","schema","serializer","logger","parser","constructor","target","plugins","nodeViews","defaultAttrGenerators","keyMapOptions","createLogger","name","getPathFromRoot","pluginArr","Array","pluginConf","override","recreateUuidsOnPastePlugin","find","plugin","spec","key","recreateUuidsOnPasteKey","filteredPluginArr","filter","datastore","dropCursor","gapCursor","keymap","baseKeymap","history","recreateUuidsOnPaste","defaultAttributeValueGeneration","attribute","generator","uuidv4","removePropertiesOfDeletedNodes","rdfaInfoPlugin","onChangedPlugin","ProseParser","fromSchema","state","EditorState","create","doc","parse","SaySerializer","mainView","SayView","attributes","class","SayController","dispatchTransaction","tr","newState","apply","updateState","handleDOMEvents","focus","setActiveView","domParser","transformPastedHTML","html","editorView","htmlCleaner","HTMLInputParser","cleanedHTMLNode","prepareHTML","preprocessRDFa","dom","innerHTML","clipboardSerializer","activeView","view","htmlContent","ProseReferenceManager","ReferenceManager","node","bundle","isElementPNode","from","to","type","attrs","JSON","stringify","domNode","domNodeTag","domNodeAttrs","tagName","isElement"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqDe,MAAMA,SAAS,CAAC;AAAA,EAAA;IAAAC,CAAA,CAAA,IAAA,CAAAC,SAAA,EAAA,UAAA,EAAA,CAC5BC,OAAO,CAAA,CAAA;AAAA;EAAA,SAAA,IAAAC,CAAA,CAAA,IAAA,EAAA,UAAA,CAAA,EAAA,MAAA;AAAA,EAAA;IAAAH,CAAA,CAAA,IAAA,CAAAC,SAAA,EAAA,YAAA,EAAA,CACPC,OAAO,CAAA,CAAA;AAAA;EAAA,WAAA,IAAAC,CAAA,CAAA,IAAA,EAAA,YAAA,CAAA,EAAA,MAAA;EACRC,KAAK;EACLC,IAAI;EACJC,OAAO;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,CAACvE,IAAI,IAAI,EAAE;QAClC,MAAMwE,KAAK,GAAGC,IAAI,CAACC,SAAS,CAACR,IAAI,EAAEM,KAAK,CAAC;QACzC,OAAO,CAAA,EAAGH,IAAI,CAAA,GAAA,EAAMC,EAAE,MAAMtE,IAAI,CAAA,GAAA,EAAMwE,KAAK,CAAA,CAAE;AAC/C,MAAA,CAAC,MAAM;QACL,MAAM;UAAEH,IAAI;UAAEC,EAAE;AAAEK,UAAAA;AAAQ,SAAC,GAAGR,MAAM;QACpC,IAAIS,UAAU,GAAG,EAAE;QACnB,IAAIC,YAAY,GAAG,EAAE;AACrB,QAAA,IAAIF,OAAO,EAAE;AACXC,UAAAA,UAAU,GAAGE,OAAO,CAACH,OAAO,CAAC;AAC7BE,UAAAA,YAAY,GAAGE,SAAS,CAACJ,OAAO,CAAC,GAC7BF,IAAI,CAACC,SAAS,CAACC,OAAO,CAACrC,UAAU,CAAC,GAClC,EAAE;AACR,QAAA;QACA,OAAO,CAAA,EAAG+B,IAAI,CAAA,GAAA,EAAMC,EAAE,MAAMM,UAAU,CAAA,GAAA,EAAMC,YAAY,CAAA,CAAE;AAC5D,MAAA;AACF,IAAA,CACF,CAAC;AACH,EAAA;AACF;;;;"}
|
|
1
|
+
{"version":3,"file":"say-editor.js","sources":["../../src/core/say-editor.ts"],"sourcesContent":["import { EditorState, Plugin } from 'prosemirror-state';\nimport type { NodeViewConstructor } from 'prosemirror-view';\nimport { Schema } from 'prosemirror-model';\nimport {\n getPathFromRoot,\n isElement,\n tagName,\n} from '#root/utils/_private/dom-helpers.ts';\n\nimport { v4 as uuidv4 } from 'uuid';\nimport { keymap } from 'prosemirror-keymap';\nimport { history } from 'prosemirror-history';\nimport { baseKeymap, type KeymapOptions } from '#root/core/keymap.ts';\nimport { dropCursor } from 'prosemirror-dropcursor';\nimport { createLogger, type Logger } from '../utils/_private/logging-utils.ts';\nimport { ReferenceManager } from '#root/utils/_private/reference-manager.ts';\nimport { datastore, isElementPNode } from '#root/plugins/datastore/index.ts';\n\nimport type { DatastoreResolvedPNode } from '#root/plugins/datastore/datastore-node-types.ts';\nimport { tracked } from 'tracked-built-ins';\nimport recreateUuidsOnPaste, {\n recreateUuidsOnPasteKey,\n} from '../plugins/recreateUuidsOnPaste.ts';\nimport type Owner from '@ember/owner';\nimport {\n type DefaultAttrGenPuginOptions,\n defaultAttributeValueGeneration,\n} from '#root/plugins/default-attribute-value-generation/index.ts';\nimport SayView from '#root/core/say-view.ts';\nimport SayController from '#root/core/say-controller.ts';\nimport SaySerializer from '#root/core/say-serializer.ts';\nimport { rdfaInfoPlugin } from '../plugins/rdfa-info/index.ts';\nimport { gapCursor } from '../plugins/gap-cursor/index.ts';\nimport { removePropertiesOfDeletedNodes } from '#root/plugins/remove-properties-of-deleted-nodes/index.ts';\nimport HTMLInputParser from '#root/utils/_private/html-input-parser.ts';\nimport { preprocessRDFa } from '#root/core/rdfa-processor.ts';\nimport { ProseParser } from '#root/prosemirror-aliases.ts';\nimport { onChangedPlugin } from '#root/plugins/on-changed/plugin.ts';\n\nexport type PluginConfig = Plugin[] | { plugins: Plugin[]; override?: boolean };\n\nexport interface SayEditorArgs {\n owner: Owner;\n target: Element;\n schema: Schema;\n baseIRI: string;\n plugins?: PluginConfig;\n nodeViews?: (\n controller: SayController,\n ) => Record<string, NodeViewConstructor>;\n defaultAttrGenerators?: DefaultAttrGenPuginOptions;\n editable?: SayView['props']['editable'];\n}\n\nexport default class SayEditor {\n @tracked mainView: SayView;\n @tracked activeView: SayView;\n owner: Owner;\n root: Element;\n baseIRI: string;\n pathFromRoot: Node[];\n schema: Schema;\n serializer: SaySerializer;\n\n private logger: Logger;\n parser: ProseParser;\n\n constructor(options: SayEditorArgs);\n /**\n *\n * @deprecated providing the `options` option when instantiating a `SayEditor` object is deprecated.\n * The behaviour of `selectBlockRdfaNode` is included by default.\n */\n constructor(options: SayEditorArgs & { keyMapOptions?: KeymapOptions });\n constructor({\n owner,\n target,\n schema,\n baseIRI,\n plugins = [],\n nodeViews = () => {\n return {};\n },\n defaultAttrGenerators = [],\n keyMapOptions,\n editable,\n }: SayEditorArgs & { keyMapOptions?: KeymapOptions }) {\n this.logger = createLogger(this.constructor.name);\n this.owner = owner;\n this.root = target;\n this.pathFromRoot = getPathFromRoot(this.root, false);\n this.baseIRI = baseIRI;\n this.schema = schema;\n\n const pluginArr = plugins instanceof Array ? plugins : plugins.plugins;\n let pluginConf;\n\n if ('override' in plugins && plugins.override) {\n pluginConf = pluginArr;\n } else {\n const recreateUuidsOnPastePlugin = pluginArr.find(\n (plugin) => plugin.spec.key === recreateUuidsOnPasteKey,\n );\n\n const filteredPluginArr = pluginArr.filter(\n (plugin) => plugin.spec.key !== recreateUuidsOnPasteKey,\n );\n\n pluginConf = [\n datastore({ pathFromRoot: this.pathFromRoot, baseIRI }),\n ...filteredPluginArr,\n dropCursor(),\n gapCursor(),\n keymap(baseKeymap(schema, keyMapOptions)),\n history(),\n recreateUuidsOnPastePlugin ?? recreateUuidsOnPaste,\n defaultAttributeValueGeneration([\n {\n attribute: '__guid',\n generator() {\n return uuidv4();\n },\n },\n {\n attribute: '__rdfaId',\n generator() {\n return uuidv4();\n },\n },\n ...defaultAttrGenerators,\n ]),\n removePropertiesOfDeletedNodes(),\n rdfaInfoPlugin(),\n onChangedPlugin,\n ];\n }\n\n this.parser = ProseParser.fromSchema(this.schema);\n\n const state = EditorState.create({\n doc: this.parser.parse(target),\n plugins: pluginConf,\n });\n this.serializer = SaySerializer.fromSchema(\n this.schema,\n () => this.mainView.state,\n );\n this.mainView = new SayView(target, {\n state,\n attributes: { class: 'say-editor__inner say-content' },\n nodeViews: nodeViews(new SayController(this)),\n editable,\n dispatchTransaction: (tr) => {\n const newState = this.mainView.state.apply(tr);\n this.mainView.updateState(newState);\n },\n handleDOMEvents: {\n focus: () => {\n this.setActiveView(this.mainView);\n },\n },\n domParser: this.parser,\n transformPastedHTML: (html, editorView) => {\n const htmlCleaner = new HTMLInputParser();\n const cleanedHTMLNode = htmlCleaner.prepareHTML(html, true);\n\n preprocessRDFa(\n cleanedHTMLNode,\n editorView ? getPathFromRoot(editorView.dom, false) : [],\n );\n\n return cleanedHTMLNode.innerHTML;\n },\n clipboardSerializer: this.serializer,\n });\n this.activeView = this.mainView;\n }\n\n setActiveView(view: SayView) {\n this.activeView = view;\n }\n\n get htmlContent(): string {\n return this.mainView.htmlContent;\n }\n}\n\nexport class ProseReferenceManager extends ReferenceManager<\n DatastoreResolvedPNode,\n DatastoreResolvedPNode\n> {\n constructor() {\n super(\n (node: DatastoreResolvedPNode) => node,\n (bundle: DatastoreResolvedPNode) => {\n if (isElementPNode(bundle)) {\n const { from, to, node } = bundle;\n const name = node?.type.name || '';\n const attrs = JSON.stringify(node?.attrs);\n return `${from} - ${to} - ${name} - ${attrs}`;\n } else {\n const { from, to, domNode } = bundle;\n let domNodeTag = '';\n let domNodeAttrs = '';\n if (domNode) {\n domNodeTag = tagName(domNode);\n domNodeAttrs = isElement(domNode)\n ? JSON.stringify(domNode.attributes)\n : '';\n }\n return `${from} - ${to} - ${domNodeTag} - ${domNodeAttrs}`;\n }\n },\n );\n }\n}\n"],"names":["SayEditor","g","prototype","tracked","i","owner","root","baseIRI","pathFromRoot","schema","serializer","logger","parser","constructor","target","plugins","nodeViews","defaultAttrGenerators","keyMapOptions","editable","createLogger","name","getPathFromRoot","pluginArr","Array","pluginConf","override","recreateUuidsOnPastePlugin","find","plugin","spec","key","recreateUuidsOnPasteKey","filteredPluginArr","filter","datastore","dropCursor","gapCursor","keymap","baseKeymap","history","recreateUuidsOnPaste","defaultAttributeValueGeneration","attribute","generator","uuidv4","removePropertiesOfDeletedNodes","rdfaInfoPlugin","onChangedPlugin","ProseParser","fromSchema","state","EditorState","create","doc","parse","SaySerializer","mainView","SayView","attributes","class","SayController","dispatchTransaction","tr","newState","apply","updateState","handleDOMEvents","focus","setActiveView","domParser","transformPastedHTML","html","editorView","htmlCleaner","HTMLInputParser","cleanedHTMLNode","prepareHTML","preprocessRDFa","dom","innerHTML","clipboardSerializer","activeView","view","htmlContent","ProseReferenceManager","ReferenceManager","node","bundle","isElementPNode","from","to","type","attrs","JSON","stringify","domNode","domNodeTag","domNodeAttrs","tagName","isElement"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsDe,MAAMA,SAAS,CAAC;AAAA,EAAA;IAAAC,CAAA,CAAA,IAAA,CAAAC,SAAA,EAAA,UAAA,EAAA,CAC5BC,OAAO,CAAA,CAAA;AAAA;EAAA,SAAA,IAAAC,CAAA,CAAA,IAAA,EAAA,UAAA,CAAA,EAAA,MAAA;AAAA,EAAA;IAAAH,CAAA,CAAA,IAAA,CAAAC,SAAA,EAAA,YAAA,EAAA,CACPC,OAAO,CAAA,CAAA;AAAA;EAAA,WAAA,IAAAC,CAAA,CAAA,IAAA,EAAA,YAAA,CAAA,EAAA,MAAA;EACRC,KAAK;EACLC,IAAI;EACJC,OAAO;EACPC,YAAY;EACZC,MAAM;EACNC,UAAU;EAEFC,MAAM;EACdC,MAAM;;AAGN;AACF;AACA;AACA;AACA;;AAEEC,EAAAA,WAAWA,CAAC;IACVR,KAAK;IACLS,MAAM;IACNL,MAAM;IACNF,OAAO;AACPQ,IAAAA,OAAO,GAAG,EAAE;IACZC,SAAS,GAAGA,MAAM;AAChB,MAAA,OAAO,EAAE;IACX,CAAC;AACDC,IAAAA,qBAAqB,GAAG,EAAE;IAC1BC,aAAa;AACbC,IAAAA;AACiD,GAAC,EAAE;IACpD,IAAI,CAACR,MAAM,GAAGS,YAAY,CAAC,IAAI,CAACP,WAAW,CAACQ,IAAI,CAAC;IACjD,IAAI,CAAChB,KAAK,GAAGA,KAAK;IAClB,IAAI,CAACC,IAAI,GAAGQ,MAAM;IAClB,IAAI,CAACN,YAAY,GAAGc,eAAe,CAAC,IAAI,CAAChB,IAAI,EAAE,KAAK,CAAC;IACrD,IAAI,CAACC,OAAO,GAAGA,OAAO;IACtB,IAAI,CAACE,MAAM,GAAGA,MAAM;IAEpB,MAAMc,SA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AA,EAAMC,EAAE,MAAMM,UAAU,CAAA,GAAA,EAAMC,YAAY,CAAA,CAAE;AAC5D,MAAA;AACF,IAAA,CACF,CAAC;AACH,EAAA;AACF;;;;"}
|
package/dist/core/say-view.js
CHANGED
|
@@ -26,7 +26,8 @@ class SayView extends EditorView {
|
|
|
26
26
|
/**
|
|
27
27
|
* Replaces the state (and current document) with a parsed version of the provided `html` string.
|
|
28
28
|
* This method creates a new `doc` node and parses it correctly based on the provided html.
|
|
29
|
-
* Note: plugin state is
|
|
29
|
+
* Note: plugin state is preserved but a new transaction setting the new content will be
|
|
30
|
+
* dispatched.
|
|
30
31
|
*/
|
|
31
32
|
setHtmlContent(content, options = {}) {
|
|
32
33
|
const {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"say-view.js","sources":["../../src/core/say-view.ts"],"sourcesContent":["import { AllSelection, EditorState, Selection } from 'prosemirror-state';\nimport { type DirectEditorProps, EditorView } from 'prosemirror-view';\nimport { tracked } from '@glimmer/tracking';\nimport { htmlToDoc, htmlToFragment } from '../utils/_private/html-utils.ts';\nimport { SetDocAttributesStep } from '../utils/steps.ts';\nimport { ProseParser } from '#root/prosemirror-aliases.ts';\nimport { DOMSerializer } from 'prosemirror-model';\n\nexport interface SetHtmlOptions {\n shouldFocus?: boolean;\n range?: DocumentRange;\n /**\n * Do not clean, only sanitize the input. This leaves empty elements and proprietary tags intact,\n * so is only suitable for HTML produced by the editor or otherwise known to be understood by it.\n * Defaults to false.\n */\n doNotClean?: boolean;\n}\nexport type DocumentRange = {\n from: number;\n to: number;\n};\n\nexport default class SayView extends EditorView {\n isSayView = true;\n @tracked declare state: EditorState;\n @tracked parent?: SayView;\n domParser: ProseParser;\n\n constructor(\n place:\n | Node\n | ((editor: HTMLElement) => void)\n | {\n mount: HTMLElement;\n }\n | null,\n props: DirectEditorProps,\n parent?: SayView,\n ) {\n super(place, props);\n this.domParser =\n props.domParser ?? ProseParser.fromSchema(this.state.schema);\n this.parent = parent;\n }\n\n /**\n * Replaces the state (and current document) with a parsed version of the provided `html` string.\n * This method creates a new `doc` node and parses it correctly based on the provided html.\n * Note: plugin state is
|
|
1
|
+
{"version":3,"file":"say-view.js","sources":["../../src/core/say-view.ts"],"sourcesContent":["import { AllSelection, EditorState, Selection } from 'prosemirror-state';\nimport { type DirectEditorProps, EditorView } from 'prosemirror-view';\nimport { tracked } from '@glimmer/tracking';\nimport { htmlToDoc, htmlToFragment } from '../utils/_private/html-utils.ts';\nimport { SetDocAttributesStep } from '../utils/steps.ts';\nimport { ProseParser } from '#root/prosemirror-aliases.ts';\nimport { DOMSerializer } from 'prosemirror-model';\n\nexport interface SetHtmlOptions {\n shouldFocus?: boolean;\n range?: DocumentRange;\n /**\n * Do not clean, only sanitize the input. This leaves empty elements and proprietary tags intact,\n * so is only suitable for HTML produced by the editor or otherwise known to be understood by it.\n * Defaults to false.\n */\n doNotClean?: boolean;\n /**\n * Whether the initial state should be considered as a 'dirty' state e.g. if this is a new\n * document that has not yet been saved.\n */\n startsDirty?: boolean;\n}\nexport type DocumentRange = {\n from: number;\n to: number;\n};\n\nexport default class SayView extends EditorView {\n isSayView = true;\n @tracked declare state: EditorState;\n @tracked parent?: SayView;\n domParser: ProseParser;\n\n constructor(\n place:\n | Node\n | ((editor: HTMLElement) => void)\n | {\n mount: HTMLElement;\n }\n | null,\n props: DirectEditorProps,\n parent?: SayView,\n ) {\n super(place, props);\n this.domParser =\n props.domParser ?? ProseParser.fromSchema(this.state.schema);\n this.parent = parent;\n }\n\n /**\n * Replaces the state (and current document) with a parsed version of the provided `html` string.\n * This method creates a new `doc` node and parses it correctly based on the provided html.\n * Note: plugin state is preserved but a new transaction setting the new content will be\n * dispatched.\n */\n setHtmlContent(content: string, options: SetHtmlOptions = {}) {\n const { shouldFocus = true, doNotClean } = options;\n if (shouldFocus) {\n this.focus();\n }\n const { range } = options;\n const tr = this.state.tr;\n if (range) {\n const fragment = htmlToFragment(content, {\n parser: this.domParser,\n editorView: this,\n doNotClean,\n });\n tr.replaceRange(range.from, range.to, fragment);\n } else {\n const doc = htmlToDoc(content, {\n schema: this.state.schema,\n parser: this.domParser,\n editorView: this,\n doNotClean,\n });\n tr.step(new SetDocAttributesStep(doc.attrs));\n tr.replaceWith(0, tr.doc.nodeSize - 2, doc);\n tr.setSelection(Selection.atEnd(tr.doc));\n }\n this.dispatch(tr);\n }\n\n get htmlContent(): string {\n const serializer =\n this.props.clipboardSerializer ??\n DOMSerializer.fromSchema(this.state.schema);\n const div = document.createElement('div');\n const doc = serializer.serializeNode(this.state.doc, undefined);\n div.appendChild(doc);\n return div.innerHTML;\n }\n\n updateState(state: EditorState): void {\n super.updateState(state);\n const { selection } = state;\n this.dom.classList.toggle(\n 'say-selection-all',\n selection instanceof AllSelection,\n );\n }\n}\n"],"names":["SayView","EditorView","isSayView","g","prototype","tracked","i","domParser","constructor","place","props","parent","ProseParser","fromSchema","state","schema","setHtmlContent","content","options","shouldFocus","doNotClean","focus","range","tr","fragment","htmlToFragment","parser","editorView","replaceRange","from","to","doc","htmlToDoc","step","SetDocAttributesStep","attrs","replaceWith","nodeSize","setSelection","Selection","atEnd","dispatch","htmlContent","serializer","clipboardSerializer","DOMSerializer","div","document","createElement","serializeNode","undefined","appendChild","innerHTML","updateState","selection","dom","classList","toggle","AllSelection"],"mappings":";;;;;;;;AA4Be,MAAMA,OAAO,SAASC,UAAU,CAAC;AAC9CC,EAAAA,SAAS,GAAG,IAAI;AAAC,EAAA;IAAAC,CAAA,CAAA,IAAA,CAAAC,SAAA,EAAA,OAAA,EAAA,CAChBC,OAAO,CAAA,CAAA;AAAA;EAAA,MAAA,IAAAC,CAAA,CAAA,IAAA,EAAA,OAAA,CAAA,EAAA,MAAA;AAAA,EAAA;IAAAH,CAAA,CAAA,IAAA,CAAAC,SAAA,EAAA,QAAA,EAAA,CACPC,OAAO,CAAA,CAAA;AAAA;EAAA,OAAA,IAAAC,CAAA,CAAA,IAAA,EAAA,QAAA,CAAA,EAAA,MAAA;EAC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