@celldl/editor 0.20260212.0 → 0.20260217.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/README.md +13 -0
  2. package/dist/CellDLEditor-VG5HM79L.js +13851 -0
  3. package/dist/CellDLEditor-VG5HM79L.js.map +1 -0
  4. package/dist/CellDLEditor.css +1 -1
  5. package/dist/CellDLEditor.es.js +6 -5
  6. package/dist/app/src/App.vue.d.ts +2 -0
  7. package/dist/app/src/common/common.d.ts +8 -0
  8. package/dist/app/src/common/constants.d.ts +5 -0
  9. package/dist/app/src/common/electron.d.ts +5 -0
  10. package/dist/app/src/common/electronApi.d.ts +8 -0
  11. package/dist/app/src/common/settings.d.ts +18 -0
  12. package/dist/app/src/common/version.d.ts +7 -0
  13. package/dist/app/src/common/vueCommon.d.ts +9 -0
  14. package/dist/app/src/main.d.ts +1 -0
  15. package/dist/{vendor-DFPLRrnP.js → index-DdfNP2Wo.js} +41637 -47600
  16. package/dist/index-DdfNP2Wo.js.map +1 -0
  17. package/dist/index.d.ts +54 -16
  18. package/dist/{index-DtCZg5ZV.js → oxigraph-Dx4bu2IN.js} +221 -843
  19. package/dist/oxigraph-Dx4bu2IN.js.map +1 -0
  20. package/dist/package.json.d.ts +106 -0
  21. package/dist/src/CellDL/SVGElements/boundedelement.d.ts +21 -0
  22. package/dist/src/CellDL/SVGElements/index.d.ts +66 -0
  23. package/dist/src/CellDL/SVGElements/linearpath.d.ts +11 -0
  24. package/dist/src/CellDL/SVGElements/pathelement.d.ts +53 -0
  25. package/dist/src/CellDL/SVGElements/rectilinearpath.d.ts +50 -0
  26. package/dist/src/CellDL/SVGElements/svgconnection.d.ts +22 -0
  27. package/dist/src/CellDL/celldlObjects/index.d.ts +151 -0
  28. package/dist/src/CellDL/components/index.d.ts +39 -0
  29. package/dist/src/CellDL/components/properties.d.ts +61 -0
  30. package/dist/src/CellDL/connections/index.d.ts +35 -0
  31. package/dist/src/CellDL/connections/pathmaker.d.ts +38 -0
  32. package/dist/src/CellDL/diagram/index.d.ts +45 -0
  33. package/dist/src/CellDL/editor/alerts.d.ts +27 -0
  34. package/dist/src/CellDL/editor/editguides.d.ts +31 -0
  35. package/dist/src/CellDL/editor/editorframe.d.ts +13 -0
  36. package/dist/src/CellDL/editor/index.d.ts +40 -0
  37. package/dist/src/CellDL/editor/panzoom.d.ts +30 -0
  38. package/dist/src/CellDL/editor/selectionbox.d.ts +17 -0
  39. package/dist/src/CellDL/editor/undoredo.d.ts +46 -0
  40. package/dist/src/CellDL/geometry/controls.d.ts +53 -0
  41. package/dist/src/CellDL/geometry/index.d.ts +92 -0
  42. package/dist/src/CellDL/geometry/intersections.d.ts +6 -0
  43. package/dist/src/CellDL/geometry/pathutils.d.ts +12 -0
  44. package/dist/src/CellDL/geometry/spatialindex.d.ts +22 -0
  45. package/dist/src/CellDL/geometry/transforms.d.ts +21 -0
  46. package/dist/src/CellDL/geometry/units.d.ts +23 -0
  47. package/dist/src/CellDL/utils.d.ts +6 -0
  48. package/dist/src/assets/oxigraph/web.d.ts +279 -0
  49. package/dist/src/common/EditorTypes.d.ts +39 -0
  50. package/dist/src/common/common.d.ts +7 -0
  51. package/dist/src/common/constants.d.ts +5 -0
  52. package/dist/src/common/points.d.ts +57 -0
  53. package/dist/src/common/styling.d.ts +36 -0
  54. package/dist/src/common/svgUtils.d.ts +48 -0
  55. package/dist/src/common/themeCssVariables.d.ts +9 -0
  56. package/dist/src/common/types.d.ts +23 -0
  57. package/dist/src/common/vueCommon.d.ts +9 -0
  58. package/dist/src/components/CellDLEditor.vue.d.ts +19 -0
  59. package/dist/src/components/WrappedEditor.vue.d.ts +19 -0
  60. package/dist/src/components/panels/FillStyle.vue.d.ts +20 -0
  61. package/dist/src/components/panels/PathStyle.vue.d.ts +20 -0
  62. package/dist/src/components/panels/PropertiesPanel.vue.d.ts +21 -0
  63. package/dist/src/components/popovers/ComponentPopover.vue.d.ts +19 -0
  64. package/dist/src/components/popovers/ConnectionStylePopover.vue.d.ts +19 -0
  65. package/dist/src/components/toolbar/EditorToolbar.vue.d.ts +23 -0
  66. package/dist/src/components/toolbar/ToolButton.vue.d.ts +26 -0
  67. package/dist/src/components/toolbar/ToolPanel.vue.d.ts +2 -0
  68. package/dist/src/components/toolbar/ToolPopover.vue.d.ts +3 -0
  69. package/dist/src/components/widgets/InputWidget.vue.d.ts +34 -0
  70. package/dist/src/libopencor/locUIJsonApi.d.ts +54 -0
  71. package/dist/src/mathjax/index.d.ts +2 -0
  72. package/dist/src/metadata/index.d.ts +50 -0
  73. package/dist/src/metadata/namespaces.d.ts +46 -0
  74. package/dist/src/metadata/oxigraphStore.d.ts +61 -0
  75. package/dist/src/metadata/oximock.d.ts +36 -0
  76. package/dist/src/metadata/store.d.ts +23 -0
  77. package/dist/src/plugins/bondgraph/definitions.d.ts +6 -0
  78. package/dist/src/plugins/bondgraph/index.d.ts +40 -0
  79. package/dist/src/plugins/bondgraph/utils.d.ts +27 -0
  80. package/dist/src/plugins/index.d.ts +75 -0
  81. package/dist/vite.config.d.ts +3 -0
  82. package/dist/vite.lib.config.d.ts +3 -0
  83. package/package.json +4 -3
  84. package/dist/CellDLEditor-CRG_Fjg2.js +0 -7262
  85. package/dist/CellDLEditor-CRG_Fjg2.js.map +0 -1
  86. package/dist/index-DtCZg5ZV.js.map +0 -1
  87. package/dist/vendor-DFPLRrnP.js.map +0 -1
@@ -0,0 +1,19 @@
1
+ import * as vue from 'vue';
2
+ type __VLS_Props = {
3
+ toolId: string;
4
+ };
5
+ declare const _default: vue.DefineComponent<__VLS_TypePropsToOption<__VLS_Props>, {}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
6
+ "popover-event": (...args: any[]) => void;
7
+ }, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<__VLS_TypePropsToOption<__VLS_Props>>> & {
8
+ "onPopover-event"?: ((...args: any[]) => any) | undefined;
9
+ }, {}, {}>;
10
+ export default _default;
11
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
12
+ type __VLS_TypePropsToOption<T> = {
13
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
14
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
15
+ } : {
16
+ type: import('vue').PropType<T[K]>;
17
+ required: true;
18
+ };
19
+ };
@@ -0,0 +1,23 @@
1
+ import { EditorToolButton } from '../../common/EditorTypes';
2
+ import * as vue from 'vue';
3
+ type __VLS_Props = {
4
+ type?: string;
5
+ buttons: EditorToolButton[];
6
+ };
7
+ declare const _default: vue.DefineComponent<__VLS_TypePropsToOption<__VLS_Props>, {}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
8
+ "button-event": (...args: any[]) => void;
9
+ "popover-event": (...args: any[]) => void;
10
+ }, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<__VLS_TypePropsToOption<__VLS_Props>>> & {
11
+ "onButton-event"?: ((...args: any[]) => any) | undefined;
12
+ "onPopover-event"?: ((...args: any[]) => any) | undefined;
13
+ }, {}, {}>;
14
+ export default _default;
15
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
16
+ type __VLS_TypePropsToOption<T> = {
17
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
18
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
19
+ } : {
20
+ type: import('vue').PropType<T[K]>;
21
+ required: true;
22
+ };
23
+ };
@@ -0,0 +1,26 @@
1
+ import * as vue from 'vue';
2
+ type __VLS_Props = {
3
+ toolId?: string;
4
+ active?: boolean;
5
+ icon?: string;
6
+ image?: string;
7
+ prompt?: string;
8
+ modal?: boolean;
9
+ type?: string;
10
+ panel?: vue.Raw<vue.Component>;
11
+ };
12
+ declare const _default: vue.DefineComponent<__VLS_TypePropsToOption<__VLS_Props>, {}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
13
+ "button-event": (...args: any[]) => void;
14
+ }, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<__VLS_TypePropsToOption<__VLS_Props>>> & {
15
+ "onButton-event"?: ((...args: any[]) => any) | undefined;
16
+ }, {}, {}>;
17
+ export default _default;
18
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
19
+ type __VLS_TypePropsToOption<T> = {
20
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
21
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
22
+ } : {
23
+ type: import('vue').PropType<T[K]>;
24
+ required: true;
25
+ };
26
+ };
@@ -0,0 +1,2 @@
1
+ declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{}>>, {}, {}>;
2
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import * as vue from 'vue';
2
+ declare const _default: vue.DefineComponent<{}, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{}>>, {}, {}>;
3
+ export default _default;
@@ -0,0 +1,34 @@
1
+ import * as vue from 'vue';
2
+ import type * as locApi from '../../libopencor/locUIJsonApi';
3
+ type ValueType = number | string | locApi.IUiJsonDiscreteInputPossibleValue;
4
+ type __VLS_Props = {
5
+ name: string;
6
+ value: ValueType;
7
+ maximumValue?: number;
8
+ minimumValue?: number;
9
+ itemId: string;
10
+ units?: string;
11
+ numeric?: boolean;
12
+ possibleValues?: locApi.IUiJsonDiscreteInputPossibleValue[];
13
+ stepValue?: number;
14
+ };
15
+ type __VLS_PublicProps = {
16
+ modelValue: ValueType;
17
+ } & __VLS_Props;
18
+ declare const _default: vue.DefineComponent<__VLS_TypePropsToOption<__VLS_PublicProps>, {}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
19
+ change: (...args: any[]) => void;
20
+ "update:modelValue": (value: ValueType) => void;
21
+ }, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<__VLS_TypePropsToOption<__VLS_PublicProps>>> & {
22
+ onChange?: ((...args: any[]) => any) | undefined;
23
+ "onUpdate:modelValue"?: ((value: ValueType) => any) | undefined;
24
+ }, {}, {}>;
25
+ export default _default;
26
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
27
+ type __VLS_TypePropsToOption<T> = {
28
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
29
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
30
+ } : {
31
+ type: import('vue').PropType<T[K]>;
32
+ required: true;
33
+ };
34
+ };
@@ -0,0 +1,54 @@
1
+ export interface IUiJson {
2
+ input: IUiJsonInput[];
3
+ output: IUiJsonOutput;
4
+ parameters: IUiJsonParameter[];
5
+ }
6
+ export type IUiJsonInput = IUiJsonDiscreteInput | IUiJsonScalarInput | IUiJsonTextInput;
7
+ export interface IUiJsonDiscreteInput {
8
+ defaultValue?: IUiJsonDiscreteInputPossibleValue;
9
+ id?: string;
10
+ name: string;
11
+ possibleValues: IUiJsonDiscreteInputPossibleValue[];
12
+ value?: IUiJsonDiscreteInputPossibleValue;
13
+ visible?: string;
14
+ }
15
+ export interface IUiJsonDiscreteInputPossibleValue {
16
+ name: string;
17
+ value: number | string;
18
+ emphasise?: boolean;
19
+ }
20
+ interface IUiJsonScalarInput {
21
+ defaultValue: number;
22
+ id?: string;
23
+ maximumValue: number;
24
+ minimumValue: number;
25
+ name: string;
26
+ stepValue?: number;
27
+ units?: string;
28
+ value?: number;
29
+ visible?: string;
30
+ }
31
+ export interface IUiJsonOutput {
32
+ data: IUiJsonOutputData[];
33
+ plots: IUiJsonOutputPlot[];
34
+ }
35
+ export interface IUiJsonOutputData {
36
+ id: string;
37
+ name: string;
38
+ }
39
+ export interface IUiJsonOutputPlot {
40
+ xAxisTitle: string;
41
+ xValue: string;
42
+ yAxisTitle: string;
43
+ yValue: string;
44
+ }
45
+ export interface IUiJsonParameter {
46
+ name: string;
47
+ value: string;
48
+ }
49
+ export interface IUiJsonTextInput {
50
+ defaultValue: string;
51
+ name: string;
52
+ value?: string;
53
+ }
54
+ export {};
@@ -0,0 +1,2 @@
1
+ export declare function latexAsSvgString(latex: string): string;
2
+ export declare function latexAsSvgDocument(latex: string): XMLDocument;
@@ -0,0 +1,50 @@
1
+ import { Literal, NamedNode, PredicateType } from './oxigraphStore';
2
+ /******************************************************************************
3
+
4
+ CellDL Editor
5
+
6
+ Copyright (c) 2022 - 2025 David Brooks
7
+
8
+ Licensed under the Apache License, Version 2.0 (the "License");
9
+ you may not use this file except in compliance with the License.
10
+ You may obtain a copy of the License at
11
+
12
+ http://www.apache.org/licenses/LICENSE-2.0
13
+
14
+ Unless required by applicable law or agreed to in writing, software
15
+ distributed under the License is distributed on an "AS IS" BASIS,
16
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
+ See the License for the specific language governing permissions and
18
+ limitations under the License.
19
+
20
+ ******************************************************************************/
21
+ export { blankNode, isBlankNode, literal, isLiteral, namedNode, isNamedNode, TurtleContentType, RdfStore } from './oxigraphStore';
22
+ export type { BlankNode, Literal, NamedNode, Statement, SubjectType, PredicateType, ObjectType, ContentType, Term } from './oxigraphStore';
23
+ export type { PredicateValue } from './store.ts';
24
+ export * from './namespaces.ts';
25
+ /**
26
+ * The type of the ``object`` of a ``predicate``
27
+ */
28
+ export type MetadataPropertyValue = Literal | NamedNode | MetadataCollection;
29
+ export type MetadataCollection = MetadataPropertyValue[] | Set<MetadataPropertyValue> | MetadataPropertiesMap;
30
+ /**
31
+ * A ``<predicate, object>`` pair
32
+ */
33
+ export type MetadataProperty = [NamedNode, MetadataPropertyValue];
34
+ export declare function fragment(uri: NamedNode | string): string;
35
+ /**
36
+ * An associative map with ``object`` values for a subject's ``predicate`` properties.
37
+ *
38
+ * We extend ``Map`` to add a ``copy()`` method.
39
+ */
40
+ export declare class MetadataPropertiesMap extends Map<string, MetadataPropertyValue> {
41
+ #private;
42
+ static fromProperties(properties: MetadataProperty[]): MetadataPropertiesMap;
43
+ get rdfTypes(): Set<string>;
44
+ copy(): MetadataPropertiesMap;
45
+ getProperty(predicate: PredicateType): MetadataPropertyValue | null;
46
+ getPropertyAsArray(predicate: PredicateType): MetadataPropertyValue[];
47
+ isA(type: NamedNode): boolean;
48
+ predicateValues(): IterableIterator<[NamedNode, MetadataPropertyValue]>;
49
+ setProperty(predicate: PredicateType, value: MetadataPropertyValue, multiValued?: boolean): void;
50
+ }
@@ -0,0 +1,46 @@
1
+ import { NamedNode } from '.';
2
+ export declare const CELLDL_URI = "http://celldl.org/ontologies/celldl#";
3
+ export declare const BG_URI = "https://bg-rdf.org/ontologies/bondgraph#";
4
+ export declare const BGF_URI = "https://bg-rdf.org/ontologies/bondgraph-framework#";
5
+ export declare const CDT_URI = "https://w3id.org/cdt/";
6
+ export declare const TPL_URI = "https://bg-rdf.org/templates/";
7
+ export declare const DCT_URI = "http://purl.org/dc/terms/";
8
+ export declare const OWL_URI = "http://www.w3.org/2002/07/owl#";
9
+ export declare const RDF_URI = "http://www.w3.org/1999/02/22-rdf-syntax-ns#";
10
+ export declare const RDFS_URI = "http://www.w3.org/2000/01/rdf-schema#";
11
+ export declare const XSD_URI = "http://www.w3.org/2001/XMLSchema#";
12
+ export declare const CELLDL_DECLARATIONS: {
13
+ celldl: string;
14
+ bg: string;
15
+ bgf: string;
16
+ cdt: string;
17
+ tpl: string;
18
+ };
19
+ export declare const WEB_DECLARATIONS: {
20
+ dcterms: string;
21
+ owl: string;
22
+ rdf: string;
23
+ rdfs: string;
24
+ svg: string;
25
+ xsd: string;
26
+ };
27
+ export declare const SPARQL_PREFIXES: string;
28
+ export type NamespaceType = (_: string) => NamedNode;
29
+ export declare class Namespace {
30
+ #private;
31
+ constructor(nsuri: string);
32
+ uri(ln: string): NamedNode;
33
+ }
34
+ export declare const CELLDL: Namespace;
35
+ export declare const BG: Namespace;
36
+ export declare const BGF: Namespace;
37
+ export declare const CDT: Namespace;
38
+ export declare const TPL: Namespace;
39
+ export declare const DCT: Namespace;
40
+ export declare const OWL: Namespace;
41
+ export declare const RDF: Namespace;
42
+ export declare const RDFS: Namespace;
43
+ export declare const XSD: Namespace;
44
+ export declare function curieSuffix(NS: Namespace, term: string | NamedNode): string;
45
+ export declare function getCurie(term: string | NamedNode): string;
46
+ export declare function expandCurie(curie: string): string;
@@ -0,0 +1,61 @@
1
+ import { BaseStore } from './store';
2
+ /******************************************************************************
3
+
4
+ CellDL Editor
5
+
6
+ Copyright (c) 2022 - 2026 David Brooks
7
+
8
+ Licensed under the Apache License, Version 2.0 (the "License");
9
+ you may not use this file except in compliance with the License.
10
+ You may obtain a copy of the License at
11
+
12
+ http://www.apache.org/licenses/LICENSE-2.0
13
+
14
+ Unless required by applicable law or agreed to in writing, software
15
+ distributed under the License is distributed on an "AS IS" BASIS,
16
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
+ See the License for the specific language governing permissions and
18
+ limitations under the License.
19
+
20
+ ******************************************************************************/
21
+ import type * as $oxigraph from '@oxigraph/web';
22
+ type Quad = $oxigraph.Quad;
23
+ type Variable = $oxigraph.Variable;
24
+ export type Term = $oxigraph.Term;
25
+ export type BlankNode = $oxigraph.BlankNode;
26
+ export declare function blankNode(value?: string | undefined): any;
27
+ export declare function isBlankNode(term: unknown): boolean;
28
+ export type Literal = $oxigraph.Literal;
29
+ export declare function literal(value: string | number | boolean, datatype?: NamedNode | undefined): any;
30
+ export declare function isLiteral(term: unknown): boolean;
31
+ export interface NamedNode extends $oxigraph.NamedNode {
32
+ uri: string;
33
+ id: () => string;
34
+ }
35
+ export declare function namedNode(value: string): NamedNode;
36
+ export declare function isNamedNode(term: unknown): boolean;
37
+ export type SubjectType = BlankNode | NamedNode | Quad | Variable;
38
+ export type PredicateType = NamedNode | Variable;
39
+ export type ObjectType = BlankNode | Literal | NamedNode | Quad | Variable;
40
+ export interface Statement extends Quad {
41
+ subject: SubjectType;
42
+ predicate: PredicateType;
43
+ object: ObjectType;
44
+ }
45
+ export type ContentType = string;
46
+ export declare const TurtleContentType: ContentType;
47
+ export declare class RdfStore extends BaseStore {
48
+ #private;
49
+ constructor();
50
+ statements(graph?: NamedNode | null): Statement[];
51
+ add(s: SubjectType, p: PredicateType, o: ObjectType, g?: NamedNode | null): Statement;
52
+ contains(s?: SubjectType | null, p?: PredicateType | null, o?: ObjectType | null, g?: NamedNode | null): boolean;
53
+ load(baseIri: string | null | undefined, rdf: string, contentType?: ContentType, graph?: NamedNode | null): void;
54
+ removeStatements(s?: SubjectType | null, p?: PredicateType | null, o?: ObjectType | null, g?: NamedNode | null): void;
55
+ serialise(baseIri: string, contentType?: ContentType, namespaces?: Record<string, string>, graph?: NamedNode | null): Promise<string>;
56
+ query(sparql: string, all_graphs?: boolean): Map<string, Term>[];
57
+ statementsMatching(s?: SubjectType | null, p?: PredicateType | null, o?: ObjectType | null, g?: NamedNode | null): Statement[];
58
+ subjectsOfType(parentType: NamedNode): [SubjectType, NamedNode][];
59
+ update(sparql: string): void;
60
+ }
61
+ export {};
@@ -0,0 +1,36 @@
1
+ /******************************************************************************
2
+
3
+ CellDL Editor
4
+
5
+ Copyright (c) 2022 - 2026 David Brooks
6
+
7
+ Licensed under the Apache License, Version 2.0 (the "License");
8
+ you may not use this file except in compliance with the License.
9
+ You may obtain a copy of the License at
10
+
11
+ http://www.apache.org/licenses/LICENSE-2.0
12
+
13
+ Unless required by applicable law or agreed to in writing, software
14
+ distributed under the License is distributed on an "AS IS" BASIS,
15
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ See the License for the specific language governing permissions and
17
+ limitations under the License.
18
+
19
+ ******************************************************************************/
20
+ import * as $rdf from '.';
21
+ type LiteralOptions = {
22
+ datatype?: $rdf.NamedNode | undefined;
23
+ };
24
+ /**
25
+ * Expose our RDF code as a `pyodide` JS module, to register as a Python package
26
+ */
27
+ export declare const oximockRdfModule: {
28
+ blankNode: typeof $rdf.blankNode;
29
+ literal: (value: string | number | boolean, options?: LiteralOptions) => any;
30
+ namedNode: typeof $rdf.namedNode;
31
+ isBlankNode: typeof $rdf.isBlankNode;
32
+ isLiteral: typeof $rdf.isLiteral;
33
+ isNamedNode: typeof $rdf.isNamedNode;
34
+ RdfStore: () => $rdf.RdfStore;
35
+ };
36
+ export {};
@@ -0,0 +1,23 @@
1
+ import { MetadataPropertiesMap, ContentType, NamedNode, Statement, SubjectType, PredicateType, ObjectType } from './index';
2
+ export interface PredicateValue {
3
+ predicate: PredicateType;
4
+ object: ObjectType;
5
+ }
6
+ export declare abstract class BaseStore {
7
+ #private;
8
+ abstract add(s: SubjectType, p: PredicateType, o: ObjectType, g: NamedNode | null): Statement;
9
+ abstract contains(s: SubjectType | null, p: PredicateType | null, o: ObjectType | null, g: NamedNode | null): boolean;
10
+ abstract load(baseIri: string | null, rdf: string, contentType: ContentType, graph: NamedNode | null): void;
11
+ abstract removeStatements(s: SubjectType | null, p: PredicateType | null, o: ObjectType | null, g: NamedNode | null): void;
12
+ abstract serialise(baseIri: string, contentType: ContentType, namespaces: Record<string, string>, graph: NamedNode | null): Promise<string>;
13
+ abstract query(sparql: string, all_graphs: boolean): Map<string, unknown>[];
14
+ abstract statements(graph: NamedNode | null): Statement[];
15
+ abstract statementsMatching(s: SubjectType | null, p: PredicateType | null, o: ObjectType | null, g: NamedNode | null): Statement[];
16
+ abstract subjectsOfType(parentType: NamedNode): [SubjectType, NamedNode][];
17
+ abstract update(sparql: string): void;
18
+ addMetadataPropertiesForSubject(subject: SubjectType, properties: MetadataPropertiesMap): Statement[];
19
+ addStatementList(statements: Statement[]): void;
20
+ metadataFromPredicates(predicateValues: PredicateValue[]): MetadataPropertiesMap;
21
+ metadataPropertiesForSubject(subject: SubjectType): MetadataPropertiesMap;
22
+ removeStatementList(statements: Statement[]): void;
23
+ }
@@ -0,0 +1,6 @@
1
+ import { BGComponentDefinition, BGLibraryComponentTemplate, BGElementStyle } from './utils';
2
+ export declare const DEFAULT_SPECIES = "i";
3
+ export declare const DEFAULT_LOCATION = "j";
4
+ export declare const BONDGRAPH_COMPONENT_DEFINITIONS: BGComponentDefinition[];
5
+ export declare function svgImage(symbol: string, species: string | undefined, location: string | undefined, elementStyle: BGElementStyle, background: string[] | undefined): string;
6
+ export declare function definitionToLibraryTemplate(defn: BGComponentDefinition): BGLibraryComponentTemplate;
@@ -0,0 +1,40 @@
1
+ import { CellDLConnection, CellDLObject } from '../../CellDL/celldlObjects';
2
+ import { ComponentLibrary, ObjectTemplate } from '../../CellDL/components';
3
+ import { PropertyGroup, StyleObject, ValueChange } from '../../CellDL/components/properties';
4
+ import { ConnectionStatus, PluginInterface } from '..';
5
+ import { BGLibraryComponentTemplate, BGElementStyle } from './utils';
6
+ import * as $rdf from '@renderer/metadata';
7
+ export declare const BONDGRAPH_PLUGIN_ID = "bondgraph-components";
8
+ export declare class BGBaseComponent {
9
+ #private;
10
+ constructor(template: BGLibraryComponentTemplate, name: string, nodeType: string);
11
+ get isBondElement(): boolean;
12
+ get isJunctionStructure(): boolean;
13
+ get name(): string | undefined;
14
+ get numPorts(): number;
15
+ get style(): BGElementStyle;
16
+ get symbol(): string;
17
+ get type(): string;
18
+ }
19
+ export declare class BondgraphPlugin implements PluginInterface {
20
+ #private;
21
+ readonly id: string;
22
+ constructor();
23
+ rdfStatements(): $rdf.Statement[];
24
+ get componentLibrary(): ComponentLibrary;
25
+ getPluginData(celldlObject: CellDLObject, rdfStore: $rdf.RdfStore): object;
26
+ getTemplateName(rdfType: string): string | undefined;
27
+ getObjectTemplateById(id: string): ObjectTemplate | undefined;
28
+ getPropertyGroups(): PropertyGroup[];
29
+ newDocument(uri: string, rdfStore: $rdf.RdfStore): void;
30
+ addDocumentMetadataToStore(rdfStore: $rdf.RdfStore): void;
31
+ addNewConnection(connection: CellDLConnection, rdfStore: $rdf.RdfStore): void;
32
+ checkConnectionValid(startObject: CellDLObject, endObject: CellDLObject): ConnectionStatus | undefined;
33
+ deleteConnection(connection: CellDLConnection, rdfStore: $rdf.RdfStore): void;
34
+ getMaxConnections(celldlObject: CellDLObject): number;
35
+ updateComponentProperties(celldlObject: CellDLObject, componentProperties: PropertyGroup[], rdfStore: $rdf.RdfStore): void;
36
+ updateObjectProperties(celldlObject: CellDLObject, itemId: string, value: ValueChange, componentProperties: PropertyGroup[], rdfStore: $rdf.RdfStore): Promise<void>;
37
+ updateComponentStyling(celldlObject: CellDLObject, objectType: string, styling: StyleObject): Promise<void>;
38
+ styleRules(): string;
39
+ svgDefinitions(): string;
40
+ }
@@ -0,0 +1,27 @@
1
+ import { ComponentLibrary, LibraryComponentTemplate } from '../../CellDL/components/index';
2
+ import { BGBaseComponent } from './index';
3
+ export interface BGElementStyle {
4
+ text: string;
5
+ background: string | string[];
6
+ border?: string;
7
+ }
8
+ export interface BGComponentDefinition {
9
+ id: string;
10
+ type: string;
11
+ name: string;
12
+ symbol: string;
13
+ style: BGElementStyle;
14
+ noSpeciesLocation?: boolean;
15
+ numPorts: number;
16
+ }
17
+ export type BGLibraryComponentTemplate = LibraryComponentTemplate & {
18
+ type: string;
19
+ symbol: string;
20
+ noSpeciesLocation?: boolean;
21
+ numPorts: number;
22
+ style: BGElementStyle;
23
+ component?: BGBaseComponent;
24
+ };
25
+ export type BGComponentLibrary = ComponentLibrary & {
26
+ templates: BGLibraryComponentTemplate[];
27
+ };
@@ -0,0 +1,75 @@
1
+ import { CellDLConnection, CellDLObject } from '../CellDL/celldlObjects/index';
2
+ import { ComponentLibrary, LibraryComponentTemplate, ObjectTemplate } from '../CellDL/components/index';
3
+ import { PropertyGroup, StyleObject, ValueChange } from '../CellDL/components/properties';
4
+ import { MetadataPropertiesMap, RdfStore, Statement, SubjectType } from '../metadata/index';
5
+ /******************************************************************************
6
+
7
+ CellDL Editor
8
+
9
+ Copyright (c) 2022 - 2025 David Brooks
10
+
11
+ Licensed under the Apache License, Version 2.0 (the "License");
12
+ you may not use this file except in compliance with the License.
13
+ You may obtain a copy of the License at
14
+
15
+ http://www.apache.org/licenses/LICENSE-2.0
16
+
17
+ Unless required by applicable law or agreed to in writing, software
18
+ distributed under the License is distributed on an "AS IS" BASIS,
19
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20
+ See the License for the specific language governing permissions and
21
+ limitations under the License.
22
+
23
+ ******************************************************************************/
24
+ /** biome-ignore-all lint/style/noNonNullAssertion: <keys exist in Map> */
25
+ import * as vue from 'vue';
26
+ export interface ConnectionStatus {
27
+ alert?: string;
28
+ domain?: string;
29
+ }
30
+ export interface PluginInterface {
31
+ id: string;
32
+ componentLibrary: ComponentLibrary;
33
+ getPropertyGroups: () => PropertyGroup[];
34
+ rdfStatements: () => Statement[];
35
+ styleRules: () => string;
36
+ svgDefinitions: () => string;
37
+ newDocument: (uri: string, rdfStore: RdfStore) => void;
38
+ addDocumentMetadataToStore: (rdfStore: RdfStore) => void;
39
+ getPluginData: (celldlObject: CellDLObject, rdfStore: RdfStore) => object;
40
+ addNewConnection: (connection: CellDLConnection, rdfStore: RdfStore) => void;
41
+ checkConnectionValid: (startObject: CellDLObject, endObject: CellDLObject) => ConnectionStatus | undefined;
42
+ deleteConnection: (connection: CellDLConnection, rdfStore: RdfStore) => void;
43
+ getMaxConnections: (celldlObject: CellDLObject) => number;
44
+ getObjectTemplateById: (id: string) => ObjectTemplate | undefined;
45
+ getTemplateName: (rdfType: string) => string | undefined;
46
+ updateComponentProperties: (celldlObject: CellDLObject, componentProperties: PropertyGroup[], rdfStore: RdfStore) => void;
47
+ updateObjectProperties: (celldlObject: CellDLObject, itemId: string, value: ValueChange, componentProperties: PropertyGroup[], rdfStore: RdfStore) => Promise<void>;
48
+ updateComponentStyling: (celldlObject: CellDLObject, objectType: string, styling: StyleObject) => Promise<void>;
49
+ }
50
+ export declare class ComponentLibraryPlugin {
51
+ #private;
52
+ private constructor();
53
+ static get instance(): ComponentLibraryPlugin;
54
+ install(app: vue.App, _options: object): void;
55
+ rdfStatements(pluginId: string): Statement[];
56
+ registerPlugin(plugin: PluginInterface): void;
57
+ getSelectedTemplate(): LibraryComponentTemplate | undefined;
58
+ newDocument(uri: string, rdfStore: RdfStore): void;
59
+ addDocumentMetadataToStore(rdfStore: RdfStore): void;
60
+ addNewConnection(connection: CellDLConnection, rdfStore: RdfStore): void;
61
+ checkConnectionValid(startObject: CellDLObject, endObject: CellDLObject): ConnectionStatus | undefined;
62
+ deleteConnection(connection: CellDLConnection, rdfStore: RdfStore): void;
63
+ getMaxConnections(celldlObject: CellDLObject): number;
64
+ getPluginData(celldlObject: CellDLObject, rdfStore: RdfStore): Map<string, object>;
65
+ getObjectTemplate(uri: SubjectType, metadata: MetadataPropertiesMap, rdfStore: RdfStore): ObjectTemplate | undefined;
66
+ getObjectTemplateById(fullId: string): ObjectTemplate | undefined;
67
+ updateComponentProperties(celldlObject: CellDLObject, componentProperties: PropertyGroup[], rdfStore: RdfStore): void;
68
+ updateComponentStyling(celldlObject: CellDLObject, objectType: string, styling: StyleObject): Promise<void>;
69
+ updateObjectProperties(celldlObject: CellDLObject, itemId: string, value: ValueChange, componentProperties: PropertyGroup[], rdfStore: RdfStore): Promise<void>;
70
+ getPropertyGroups(): PropertyGroup[];
71
+ getStylingGroup(): PropertyGroup;
72
+ styleRules(): string;
73
+ svgDefinitions(): string;
74
+ }
75
+ export declare const componentLibraryPlugin: ComponentLibraryPlugin;
@@ -0,0 +1,3 @@
1
+ import * as vite from 'vite';
2
+ declare const _default: vite.UserConfig;
3
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import * as vite from 'vite';
2
+ declare const _default: vite.UserConfig;
3
+ export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@celldl/editor",
3
- "version": "0.20260212.0",
3
+ "version": "0.20260217.1",
4
4
  "author": {
5
5
  "name": "David Brooks",
6
6
  "email": "d.brooks@auckland.ac.nz"
@@ -39,7 +39,7 @@
39
39
  "scripts": {
40
40
  "build": "vite --config vite.config.ts build app && bun scripts/generate.version.js",
41
41
  "build:dev": "vite --config vite.config.ts build app --base / && bun scripts/generate.version.js",
42
- "build:lib": "vite build --config vite.lib.config.ts && cp index.d.ts dist/index.d.ts",
42
+ "build:lib": "vite build --config vite.lib.config.ts",
43
43
  "clean": "bun scripts/clean.js",
44
44
  "dev": "vite --config vite.config.ts app",
45
45
  "format": "bunx --bun biome format --fix --max-diagnostics=none",
@@ -97,6 +97,7 @@
97
97
  "tailwindcss": "^4.1.18",
98
98
  "tailwindcss-primeui": "^0.6.1",
99
99
  "unplugin-vue-components": "^31.0.0",
100
- "vite": "^7.2.7"
100
+ "vite": "^7.2.7",
101
+ "vite-plugin-dts": "^4.5.4"
101
102
  }
102
103
  }