graphwise-reactodia 0.0.1-TR2 → 0.0.1-TR20

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 (117) hide show
  1. package/COPYING +674 -0
  2. package/COPYING.LESSER +165 -0
  3. package/NOTICE +41 -0
  4. package/README.md +225 -1
  5. package/dist/cjs/graphwise-reactodia.cjs.entry.js +28519 -41232
  6. package/dist/cjs/graphwise-reactodia.cjs.js +2 -2
  7. package/dist/cjs/{index-CII9aUQC.js → index-DtzCybH4.js} +16 -0
  8. package/dist/cjs/index.cjs.js +29 -0
  9. package/dist/cjs/loader.cjs.js +2 -2
  10. package/dist/cjs/node-action-DkJ5ct17.js +96 -0
  11. package/dist/collection/components/graphwise-reactodia/graphwise-reactodia.css +57 -1
  12. package/dist/collection/components/graphwise-reactodia/graphwise-reactodia.js +135 -40
  13. package/dist/collection/components/graphwise-reactodia/i18n/language-key.js +5 -0
  14. package/dist/collection/components/graphwise-reactodia/i18n/translations.js +6 -1
  15. package/dist/collection/components/graphwise-reactodia/menu/export-diagram-action.js +19 -0
  16. package/dist/collection/components/graphwise-reactodia/menu/graphwise-menu.js +24 -0
  17. package/dist/collection/components/graphwise-reactodia/menu/import-diagram-action.js +31 -0
  18. package/dist/collection/components/graphwise-reactodia/models/clear-diagram-storage-event.js +5 -0
  19. package/dist/collection/components/graphwise-reactodia/models/error/error-cause.js +1 -0
  20. package/dist/collection/components/graphwise-reactodia/models/error/error-code.js +20 -0
  21. package/dist/collection/components/graphwise-reactodia/models/error/error-report.js +1 -0
  22. package/dist/collection/components/graphwise-reactodia/models/event/event-callback.js +1 -0
  23. package/dist/collection/components/graphwise-reactodia/models/event/event-detail.js +4 -0
  24. package/dist/collection/components/graphwise-reactodia/models/event/event-type.js +8 -0
  25. package/dist/collection/components/graphwise-reactodia/models/reactodia-config.js +1 -0
  26. package/dist/collection/components/graphwise-reactodia/models/sparql/sparql-query-function.js +1 -0
  27. package/dist/collection/components/graphwise-reactodia/models/sparql/sparql-query-params.js +1 -0
  28. package/dist/collection/components/graphwise-reactodia/models/subscription-list.js +35 -0
  29. package/dist/collection/components/graphwise-reactodia/models/subscription.js +1 -0
  30. package/dist/collection/components/graphwise-reactodia/models/triple.js +1 -0
  31. package/dist/collection/components/graphwise-reactodia/models/ui/menu-config.js +1 -0
  32. package/dist/collection/components/graphwise-reactodia/models/ui/menu-item.js +18 -0
  33. package/dist/collection/components/graphwise-reactodia/models/ui/node-action.js +22 -0
  34. package/dist/collection/components/graphwise-reactodia/models/ui/resolved-toolbar-position.js +1 -0
  35. package/dist/collection/components/graphwise-reactodia/models/ui/resolved-ui-config.js +1 -0
  36. package/dist/collection/components/graphwise-reactodia/models/ui/toolbar-dock.js +14 -0
  37. package/dist/collection/components/graphwise-reactodia/models/ui/toolbar-position.js +1 -0
  38. package/dist/collection/components/graphwise-reactodia/models/ui/ui-config.js +1 -0
  39. package/dist/collection/components/graphwise-reactodia/node-action/node-actions.js +22 -0
  40. package/dist/collection/components/graphwise-reactodia/providers/service/service-inject.js +15 -0
  41. package/dist/collection/components/graphwise-reactodia/providers/service/service.js +19 -0
  42. package/dist/collection/components/graphwise-reactodia/providers/service/service.provider.js +20 -0
  43. package/dist/collection/components/graphwise-reactodia/reactodia-app.js +188 -26
  44. package/dist/collection/components/graphwise-reactodia/services/diagram/diagram.service.js +71 -0
  45. package/dist/collection/components/graphwise-reactodia/services/diagram-file/diagram-file.service.js +68 -0
  46. package/dist/collection/components/graphwise-reactodia/services/diagram-storage/diagram-storage.service.js +71 -0
  47. package/dist/collection/components/graphwise-reactodia/services/error/error.service.js +78 -0
  48. package/dist/collection/components/graphwise-reactodia/services/event/event.service.js +58 -0
  49. package/dist/collection/components/graphwise-reactodia/services/window/window.service.js +24 -0
  50. package/dist/collection/components/graphwise-reactodia/styles/type-style.resolver.js +52 -0
  51. package/dist/collection/components/graphwise-reactodia/testing/storage.mock.js +35 -0
  52. package/dist/collection/components/graphwise-reactodia/ui-config/default-ui-config.js +30 -0
  53. package/dist/collection/components/graphwise-reactodia/ui-config/ui-config-mapper.js +51 -0
  54. package/dist/collection/components/graphwise-reactodia/utils/object-util.js +30 -0
  55. package/dist/collection/index.js +7 -1
  56. package/dist/collection/pages/graphwise-reactodia/main.js +157 -0
  57. package/dist/collection/pages/graphwise-reactodia/owl-rdfs-settings.js +195 -0
  58. package/dist/esm/graphwise-reactodia.entry.js +28519 -41232
  59. package/dist/esm/graphwise-reactodia.js +3 -3
  60. package/dist/esm/{index-Cypw7ydc.js → index-DpCR6zMg.js} +16 -1
  61. package/dist/esm/index.js +7 -0
  62. package/dist/esm/loader.js +3 -3
  63. package/dist/esm/node-action-fwJ3Zupw.js +94 -0
  64. package/dist/graphwise-reactodia/graphwise-reactodia.esm.js +1 -1
  65. package/dist/graphwise-reactodia/index.esm.js +1 -0
  66. package/dist/graphwise-reactodia/p-DpCR6zMg.js +2 -0
  67. package/dist/graphwise-reactodia/p-c3d8a69a.entry.js +1 -0
  68. package/dist/graphwise-reactodia/p-fwJ3Zupw.js +1 -0
  69. package/dist/types/components/graphwise-reactodia/graphwise-reactodia.d.ts +44 -16
  70. package/dist/types/components/graphwise-reactodia/i18n/language-key.d.ts +4 -0
  71. package/dist/types/components/graphwise-reactodia/i18n/translations.d.ts +2 -343
  72. package/dist/types/components/graphwise-reactodia/menu/export-diagram-action.d.ts +4 -0
  73. package/dist/types/components/graphwise-reactodia/menu/graphwise-menu.d.ts +6 -0
  74. package/dist/types/components/graphwise-reactodia/menu/import-diagram-action.d.ts +4 -0
  75. package/dist/types/components/graphwise-reactodia/models/clear-diagram-storage-event.d.ts +5 -0
  76. package/dist/types/components/graphwise-reactodia/models/error/error-cause.d.ts +10 -0
  77. package/dist/types/components/graphwise-reactodia/models/error/error-code.d.ts +19 -0
  78. package/dist/types/components/graphwise-reactodia/models/error/error-report.d.ts +13 -0
  79. package/dist/types/components/graphwise-reactodia/models/event/event-callback.d.ts +5 -0
  80. package/dist/types/components/graphwise-reactodia/models/event/event-detail.d.ts +55 -0
  81. package/dist/types/components/graphwise-reactodia/models/event/event-type.d.ts +7 -0
  82. package/dist/types/components/graphwise-reactodia/models/reactodia-app-props.d.ts +20 -15
  83. package/dist/types/components/graphwise-reactodia/models/reactodia-config.d.ts +36 -0
  84. package/dist/types/components/graphwise-reactodia/models/sparql/sparql-query-function.d.ts +6 -0
  85. package/dist/types/components/graphwise-reactodia/models/sparql/sparql-query-params.d.ts +12 -0
  86. package/dist/types/components/graphwise-reactodia/models/subscription-list.d.ts +26 -0
  87. package/dist/types/components/graphwise-reactodia/models/subscription.d.ts +4 -0
  88. package/dist/types/components/graphwise-reactodia/models/triple.d.ts +19 -0
  89. package/dist/types/components/graphwise-reactodia/models/ui/menu-config.d.ts +8 -0
  90. package/dist/types/components/graphwise-reactodia/models/ui/menu-item.d.ts +17 -0
  91. package/dist/types/components/graphwise-reactodia/models/ui/node-action.d.ts +21 -0
  92. package/dist/types/components/graphwise-reactodia/models/ui/resolved-toolbar-position.d.ts +8 -0
  93. package/dist/types/components/graphwise-reactodia/models/ui/resolved-ui-config.d.ts +12 -0
  94. package/dist/types/components/graphwise-reactodia/models/ui/toolbar-dock.d.ts +13 -0
  95. package/dist/types/components/graphwise-reactodia/models/ui/toolbar-position.d.ts +11 -0
  96. package/dist/types/components/graphwise-reactodia/models/ui/ui-config.d.ts +17 -0
  97. package/dist/types/components/graphwise-reactodia/node-action/node-actions.d.ts +6 -0
  98. package/dist/types/components/graphwise-reactodia/providers/service/service-inject.d.ts +13 -0
  99. package/dist/types/components/graphwise-reactodia/providers/service/service.d.ts +28 -0
  100. package/dist/types/components/graphwise-reactodia/providers/service/service.provider.d.ts +16 -0
  101. package/dist/types/components/graphwise-reactodia/reactodia-app.d.ts +3 -2
  102. package/dist/types/components/graphwise-reactodia/services/diagram/diagram.service.d.ts +36 -0
  103. package/dist/types/components/graphwise-reactodia/services/diagram-file/diagram-file.service.d.ts +24 -0
  104. package/dist/types/components/graphwise-reactodia/services/diagram-storage/diagram-storage.service.d.ts +27 -0
  105. package/dist/types/components/graphwise-reactodia/services/error/error.service.d.ts +41 -0
  106. package/dist/types/components/graphwise-reactodia/services/event/event.service.d.ts +30 -0
  107. package/dist/types/components/graphwise-reactodia/services/window/window.service.d.ts +7 -0
  108. package/dist/types/components/graphwise-reactodia/styles/type-style.resolver.d.ts +11 -0
  109. package/dist/types/components/graphwise-reactodia/testing/storage.mock.d.ts +18 -0
  110. package/dist/types/components/graphwise-reactodia/ui-config/default-ui-config.d.ts +5 -0
  111. package/dist/types/components/graphwise-reactodia/ui-config/ui-config-mapper.d.ts +14 -0
  112. package/dist/types/components/graphwise-reactodia/utils/object-util.d.ts +15 -0
  113. package/dist/types/components.d.ts +60 -27
  114. package/dist/types/index.d.ts +15 -1
  115. package/package.json +39 -10
  116. package/dist/graphwise-reactodia/p-Cypw7ydc.js +0 -2
  117. package/dist/graphwise-reactodia/p-bafd6be5.entry.js +0 -1
@@ -5,49 +5,74 @@
5
5
  * It contains typing information for all components that exist in this project.
6
6
  */
7
7
  import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
8
- import { SparqlDataProviderSettings, SparqlQueryFunction } from "@reactodia/workspace";
9
- export { SparqlDataProviderSettings, SparqlQueryFunction } from "@reactodia/workspace";
8
+ import { ReactodiaConfig } from "./components/graphwise-reactodia/models/reactodia-config";
9
+ import { LanguageKey } from "./components/graphwise-reactodia/i18n/language-key";
10
+ import { SparqlDataProviderSettings } from "@reactodia/workspace";
11
+ import { EventDetail } from "./components/graphwise-reactodia/models/event/event-detail";
12
+ export { ReactodiaConfig } from "./components/graphwise-reactodia/models/reactodia-config";
13
+ export { LanguageKey } from "./components/graphwise-reactodia/i18n/language-key";
14
+ export { SparqlDataProviderSettings } from "@reactodia/workspace";
15
+ export { EventDetail } from "./components/graphwise-reactodia/models/event/event-detail";
10
16
  export namespace Components {
11
17
  /**
12
18
  * A web component that renders a graph with the Reactodia workspace.
13
19
  * The component is backed by a SPARQL endpoint but is endpoint-agnostic: the host passes
14
- * the active repository's endpoint via `current-repository` and a `queryFunction` that
15
- * performs the actual HTTP request. Reactodia fetches all node, link and type data lazily
16
- * through them; the canvas starts empty and the user populates it via the search bar.
20
+ * the active repository's endpoint via `current-repository` and a `config.queryFunction`
21
+ * that performs the actual HTTP request. Reactodia fetches all node, link and type data
22
+ * lazily through them; the canvas starts empty and the user populates it via the search bar.
17
23
  * The component is a thin wrapper around Reactodia: query configuration lives outside the
18
24
  * wrapper and is supplied through the `providerSettings` prop.
19
25
  */
20
26
  interface GraphwiseReactodia {
21
27
  /**
22
- * The active repository id. Appended to {@link queryFunction} as the request `url`; changing it re-points the graph at the new repository (and resets the canvas), which is how runtime repository changes are handled.
28
+ * Host-supplied configuration: the SPARQL `queryFunction` transport, an optional `seed` set of entities to pre-populate the canvas with and an optional `ui` configuration. A DOM property (an object, not an attribute) passed in from outside the wrapper. Read once on mount; not watched, as it only sets up the data source and initial canvas.
23
29
  */
24
- "currentRepository": string;
30
+ "config"?: ReactodiaConfig;
31
+ /**
32
+ * The active repository id. Appended to {@link queryFunction } as the request `url`; changing it re-points the graph at the new repository (and resets the canvas), which is how runtime repository changes are handled.
33
+ */
34
+ "currentRepository"?: string;
25
35
  /**
26
36
  * UI language code (e.g. `en`, `fr`) for the Reactodia interface. Defaults to English.
27
- * @default 'en'
37
+ * @default LanguageKey.EN
28
38
  */
29
- "language": string;
39
+ "language": LanguageKey;
30
40
  /**
31
- * Query preset for the SPARQL data provider, owned and configured by the host. A DOM property (an object, not an attribute) passed in from outside the wrapper. When omitted, the data provider falls back to Reactodia's generic OWL/RDFS preset. Changing it rebuilds the data provider and resets the canvas.
41
+ * Query preset for the SPARQL data provider, owned and configured by the host. A DOM property (an object, not an attribute) passed in from outside the wrapper. Required: the wrapper has no default preset and throws when it is missing. Changing it rebuilds the data provider and reloads the graph with it, keeping the current diagram.
32
42
  */
33
43
  "providerSettings"?: SparqlDataProviderSettings;
34
44
  /**
35
- * HTTP transport for the SPARQL requests. Set by the host so requests go through the host's HTTP layer (auth, interceptors) instead of a built-in `fetch`.
45
+ * The reactodia theme to use
36
46
  */
37
- "queryFunction": SparqlQueryFunction;
47
+ "theme"?: 'light' | 'dark';
38
48
  }
39
49
  }
50
+ export interface GraphwiseReactodiaCustomEvent<T> extends CustomEvent<T> {
51
+ detail: T;
52
+ target: HTMLGraphwiseReactodiaElement;
53
+ }
40
54
  declare global {
55
+ interface HTMLGraphwiseReactodiaElementEventMap {
56
+ "graphwiseReactodiaEvent": EventDetail;
57
+ }
41
58
  /**
42
59
  * A web component that renders a graph with the Reactodia workspace.
43
60
  * The component is backed by a SPARQL endpoint but is endpoint-agnostic: the host passes
44
- * the active repository's endpoint via `current-repository` and a `queryFunction` that
45
- * performs the actual HTTP request. Reactodia fetches all node, link and type data lazily
46
- * through them; the canvas starts empty and the user populates it via the search bar.
61
+ * the active repository's endpoint via `current-repository` and a `config.queryFunction`
62
+ * that performs the actual HTTP request. Reactodia fetches all node, link and type data
63
+ * lazily through them; the canvas starts empty and the user populates it via the search bar.
47
64
  * The component is a thin wrapper around Reactodia: query configuration lives outside the
48
65
  * wrapper and is supplied through the `providerSettings` prop.
49
66
  */
50
67
  interface HTMLGraphwiseReactodiaElement extends Components.GraphwiseReactodia, HTMLStencilElement {
68
+ addEventListener<K extends keyof HTMLGraphwiseReactodiaElementEventMap>(type: K, listener: (this: HTMLGraphwiseReactodiaElement, ev: GraphwiseReactodiaCustomEvent<HTMLGraphwiseReactodiaElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
69
+ addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
70
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
71
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
72
+ removeEventListener<K extends keyof HTMLGraphwiseReactodiaElementEventMap>(type: K, listener: (this: HTMLGraphwiseReactodiaElement, ev: GraphwiseReactodiaCustomEvent<HTMLGraphwiseReactodiaElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
73
+ removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
74
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
75
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
51
76
  }
52
77
  var HTMLGraphwiseReactodiaElement: {
53
78
  prototype: HTMLGraphwiseReactodiaElement;
@@ -61,30 +86,38 @@ declare namespace LocalJSX {
61
86
  /**
62
87
  * A web component that renders a graph with the Reactodia workspace.
63
88
  * The component is backed by a SPARQL endpoint but is endpoint-agnostic: the host passes
64
- * the active repository's endpoint via `current-repository` and a `queryFunction` that
65
- * performs the actual HTTP request. Reactodia fetches all node, link and type data lazily
66
- * through them; the canvas starts empty and the user populates it via the search bar.
89
+ * the active repository's endpoint via `current-repository` and a `config.queryFunction`
90
+ * that performs the actual HTTP request. Reactodia fetches all node, link and type data
91
+ * lazily through them; the canvas starts empty and the user populates it via the search bar.
67
92
  * The component is a thin wrapper around Reactodia: query configuration lives outside the
68
93
  * wrapper and is supplied through the `providerSettings` prop.
69
94
  */
70
95
  interface GraphwiseReactodia {
71
96
  /**
72
- * The active repository id. Appended to {@link queryFunction} as the request `url`; changing it re-points the graph at the new repository (and resets the canvas), which is how runtime repository changes are handled.
97
+ * Host-supplied configuration: the SPARQL `queryFunction` transport, an optional `seed` set of entities to pre-populate the canvas with and an optional `ui` configuration. A DOM property (an object, not an attribute) passed in from outside the wrapper. Read once on mount; not watched, as it only sets up the data source and initial canvas.
98
+ */
99
+ "config"?: ReactodiaConfig;
100
+ /**
101
+ * The active repository id. Appended to {@link queryFunction } as the request `url`; changing it re-points the graph at the new repository (and resets the canvas), which is how runtime repository changes are handled.
73
102
  */
74
103
  "currentRepository"?: string;
75
104
  /**
76
105
  * UI language code (e.g. `en`, `fr`) for the Reactodia interface. Defaults to English.
77
- * @default 'en'
106
+ * @default LanguageKey.EN
107
+ */
108
+ "language"?: LanguageKey;
109
+ /**
110
+ * Fires for every event to the host, differentiated by `detail.type`.
78
111
  */
79
- "language"?: string;
112
+ "onGraphwiseReactodiaEvent"?: (event: GraphwiseReactodiaCustomEvent<EventDetail>) => void;
80
113
  /**
81
- * Query preset for the SPARQL data provider, owned and configured by the host. A DOM property (an object, not an attribute) passed in from outside the wrapper. When omitted, the data provider falls back to Reactodia's generic OWL/RDFS preset. Changing it rebuilds the data provider and resets the canvas.
114
+ * Query preset for the SPARQL data provider, owned and configured by the host. A DOM property (an object, not an attribute) passed in from outside the wrapper. Required: the wrapper has no default preset and throws when it is missing. Changing it rebuilds the data provider and reloads the graph with it, keeping the current diagram.
82
115
  */
83
116
  "providerSettings"?: SparqlDataProviderSettings;
84
117
  /**
85
- * HTTP transport for the SPARQL requests. Set by the host so requests go through the host's HTTP layer (auth, interceptors) instead of a built-in `fetch`.
118
+ * The reactodia theme to use
86
119
  */
87
- "queryFunction"?: SparqlQueryFunction;
120
+ "theme"?: 'light' | 'dark';
88
121
  }
89
122
  interface IntrinsicElements {
90
123
  "graphwise-reactodia": GraphwiseReactodia;
@@ -97,9 +130,9 @@ declare module "@stencil/core" {
97
130
  /**
98
131
  * A web component that renders a graph with the Reactodia workspace.
99
132
  * The component is backed by a SPARQL endpoint but is endpoint-agnostic: the host passes
100
- * the active repository's endpoint via `current-repository` and a `queryFunction` that
101
- * performs the actual HTTP request. Reactodia fetches all node, link and type data lazily
102
- * through them; the canvas starts empty and the user populates it via the search bar.
133
+ * the active repository's endpoint via `current-repository` and a `config.queryFunction`
134
+ * that performs the actual HTTP request. Reactodia fetches all node, link and type data
135
+ * lazily through them; the canvas starts empty and the user populates it via the search bar.
103
136
  * The component is a thin wrapper around Reactodia: query configuration lives outside the
104
137
  * wrapper and is supplied through the `providerSettings` prop.
105
138
  */
@@ -1 +1,15 @@
1
- export {};
1
+ export { CLEAR_DIAGRAM_STORAGE_EVENT } from './components/graphwise-reactodia/models/clear-diagram-storage-event';
2
+ export { GRAPHWISE_REACTODIA_EVENT } from './components/graphwise-reactodia/models/event/event-detail';
3
+ export { EventType } from './components/graphwise-reactodia/models/event/event-type';
4
+ export type { EventDetail } from './components/graphwise-reactodia/models/event/event-detail';
5
+ export { ErrorCode } from './components/graphwise-reactodia/models/error/error-code';
6
+ export type { ErrorReport } from './components/graphwise-reactodia/models/error/error-report';
7
+ export type { ReactodiaConfig } from './components/graphwise-reactodia/models/reactodia-config';
8
+ export type { Triple } from './components/graphwise-reactodia/models/triple';
9
+ export type { SparqlQueryFunction } from './components/graphwise-reactodia/models/sparql/sparql-query-function';
10
+ export type { SparqlQueryParams } from './components/graphwise-reactodia/models/sparql/sparql-query-params';
11
+ export type { UiConfig } from './components/graphwise-reactodia/models/ui/ui-config';
12
+ export type { ToolbarPosition } from './components/graphwise-reactodia/models/ui/toolbar-position';
13
+ export { ToolbarDock } from './components/graphwise-reactodia/models/ui/toolbar-dock';
14
+ export { MenuItem } from './components/graphwise-reactodia/models/ui/menu-item';
15
+ export { NodeAction } from './components/graphwise-reactodia/models/ui/node-action';
package/package.json CHANGED
@@ -1,30 +1,59 @@
1
1
  {
2
2
  "name": "graphwise-reactodia",
3
- "version": "0.0.1-TR2",
3
+ "version": "0.0.1-TR20",
4
4
  "description": "Graphwise wrapper around the Reactodia graph explorer.",
5
- "license": "Apache-2.0",
5
+ "license": "LGPL-3.0-or-later",
6
6
  "author": "Ontotext AD",
7
7
  "main": "dist/index.cjs.js",
8
+ "module": "dist/esm/index.js",
8
9
  "collection": "dist/collection/collection-manifest.json",
10
+ "exports": {
11
+ ".": {
12
+ "types": "./dist/types/index.d.ts",
13
+ "import": "./dist/esm/index.js",
14
+ "require": "./dist/index.cjs.js"
15
+ },
16
+ "./loader": {
17
+ "import": "./loader/index.js",
18
+ "require": "./loader/index.cjs.js",
19
+ "types": "./loader/index.d.ts"
20
+ }
21
+ },
9
22
  "files": [
10
23
  "dist/",
11
- "loader/"
24
+ "loader/",
25
+ "COPYING",
26
+ "COPYING.LESSER",
27
+ "NOTICE"
12
28
  ],
13
29
  "scripts": {
14
- "build": "stencil build",
15
- "start": "stencil build --dev --watch --serve"
16
- },
17
- "dependencies": {
18
- "@reactodia/workspace": "^0.34.1",
19
- "react": "^18.3.1",
20
- "react-dom": "^18.3.1"
30
+ "reactodia:install": "cd reactodia-workspace && npm ci",
31
+ "reactodia:compile": "cd reactodia-workspace && npm run build && npm run typings",
32
+ "reactodia:build": "npm run reactodia:install && npm run reactodia:compile",
33
+ "build": "npm run reactodia:build && stencil build",
34
+ "start": "npm run reactodia:build && stencil build --dev --watch --serve",
35
+ "cy:open": "cypress open",
36
+ "cy:run": "cypress run",
37
+ "cy:run:ci": "docker compose --ansi never up --exit-code-from cypress",
38
+ "test": "stencil test --spec",
39
+ "test.watch": "stencil test --spec --watchAll"
21
40
  },
22
41
  "devDependencies": {
23
42
  "@rdfjs/types": "^2.0.1",
43
+ "@reactodia/workspace": "file:./reactodia-workspace",
24
44
  "@stencil/core": "4.35.1",
25
45
  "@stencil/sass": "^3.2.3",
46
+ "@types/jest": "^29.5.14",
26
47
  "@types/react": "^18.3.12",
27
48
  "@types/react-dom": "^18.3.1",
49
+ "cypress": "15.17.0",
50
+ "jest": "^29.7.0",
51
+ "jest-cli": "^29.7.0",
52
+ "react": "^18.3.1",
53
+ "react-dom": "^18.3.1",
28
54
  "rollup-plugin-node-polyfills": "^0.2.1"
55
+ },
56
+ "overrides": {
57
+ "vitest": "^4.1.12"
29
58
  }
30
59
  }
@@ -1,2 +0,0 @@
1
- var t=Object.defineProperty,e=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},n=(t,e)=>{t.__stencil__getHostRef=()=>e,e.t=t},o=(t,e)=>(0,console.error)(t,e),l=new Map,i=new Map,s="slot-fb{display:contents}slot-fb[hidden]{display:none}",r="undefined"!=typeof window?window:{},c={o:0,l:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,o)=>t.addEventListener(e,n,o),rel:(t,e,n,o)=>t.removeEventListener(e,n,o),ce:(t,e)=>new CustomEvent(t,e)},u=t=>Promise.resolve(t),a=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(t){}return!1})(),f=!1,d=[],h=[],p=(t,e)=>n=>{t.push(n),f||(f=!0,e&&4&c.o?y(v):c.raf(v))},m=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){o(t)}t.length=0},v=()=>{m(d),m(h),(f=d.length>0)&&c.raf(v)},y=t=>u().then(t),$=p(h,!0),w=t=>"object"==(t=typeof t)||"function"===t;function b(t){var e,n,o;return null!=(o=null==(n=null==(e=t.head)?void 0:e.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?o:void 0}((e,n)=>{for(var o in n)t(e,o,{get:n[o],enumerable:!0})})({},{err:()=>S,map:()=>j,ok:()=>g,unwrap:()=>k,unwrapErr:()=>O});var g=t=>({isOk:!0,isErr:!1,value:t}),S=t=>({isOk:!1,isErr:!0,value:t});function j(t,e){if(t.isOk){const n=e(t.value);return n instanceof Promise?n.then((t=>g(t))):g(n)}if(t.isErr)return S(t.value);throw"should never get here"}var k=t=>{if(t.isOk)return t.value;throw t.value},O=t=>{if(t.isErr)return t.value;throw t.value},E=(t,e,...n)=>{let o=null,l=null,i=!1,s=!1;const r=[],c=e=>{for(let n=0;n<e.length;n++)o=e[n],Array.isArray(o)?c(o):null!=o&&"boolean"!=typeof o&&((i="function"!=typeof t&&!w(o))&&(o+=""),i&&s?r[r.length-1].i+=o:r.push(i?C(null,o):o),s=i)};c(n),e&&e.key&&(l=e.key);const u=C(t,null);return u.u=e,r.length>0&&(u.h=r),u.p=l,u},C=(t,e)=>({o:0,m:t,i:e,v:null,h:null,u:null,p:null}),M={},P=t=>{const e=(t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"))(t);return RegExp(`(^|[^@]|@(?!supports\\s+selector\\s*\\([^{]*?${e}))(${e}\\b)`,"g")};P("::slotted"),P(":host"),P(":host-context");var x,D=(t,e)=>null==t||w(t)?t:1&e?t+"":t,R=t=>e(t).$hostElement$,W=new WeakMap,A=t=>"sc-"+t.$,N=(t,e,n,o)=>{n!==o&&e.toLowerCase()},U=(t,e)=>{const n=t&&t.u||{},o=e.u||{};for(const t of H(Object.keys(n)))t in o||N(0,t,n[t],void 0);for(const t of H(Object.keys(o)))N(0,t,n[t],o[t])};function H(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var L=(t,e,n)=>{const o=e.h[n];let l,i,s=0;if(!r.document)throw Error("You are trying to render a Stencil component in an environment that doesn't support the DOM. Make sure to populate the [`window`](https://developer.mozilla.org/en-US/docs/Web/API/Window/window) object before rendering a component.");if(l=o.v=r.document.createElement(o.m),U(null,o),o.h)for(s=0;s<o.h.length;++s)i=L(t,o,s),i&&l.appendChild(i);return l["s-hn"]=x,l},T=(t,e,n,o,l,i)=>{let s,r=t;for(;l<=i;++l)o[l]&&(s=L(null,n,l),s&&(o[l].v=s,G(r,s,e)))},z=(t,e,n)=>{for(let o=e;o<=n;++o){const e=t[o];if(e){const t=e.v;t&&t.remove()}}},F=(t,e,n=!1)=>t.m===e.m&&(n?(n&&!t.p&&e.p&&(t.p=e.p),!0):t.p===e.p),q=(t,e,n=!1)=>{const o=e.v=t.v,l=t.h,i=e.h;U(t,e),null!==l&&null!==i?((t,e,n,o,l=!1)=>{let i,s,r=0,c=0,u=0,a=0,f=e.length-1,d=e[0],h=e[f],p=o.length-1,m=o[0],v=o[p];for(;r<=f&&c<=p;)if(null==d)d=e[++r];else if(null==h)h=e[--f];else if(null==m)m=o[++c];else if(null==v)v=o[--p];else if(F(d,m,l))q(d,m,l),d=e[++r],m=o[++c];else if(F(h,v,l))q(h,v,l),h=e[--f],v=o[--p];else if(F(d,v,l))q(d,v,l),G(t,d.v,h.v.nextSibling),d=e[++r],v=o[--p];else if(F(h,m,l))q(h,m,l),G(t,h.v,d.v),h=e[--f],m=o[++c];else{for(u=-1,a=r;a<=f;++a)if(e[a]&&null!==e[a].p&&e[a].p===m.p){u=a;break}u>=0?(s=e[u],s.m!==m.m?i=L(e&&e[c],n,u):(q(s,m,l),e[u]=void 0,i=s.v),m=o[++c]):(i=L(e&&e[c],n,c),m=o[++c]),i&&G(d.v.parentNode,i,d.v)}r>f?T(t,null==o[p+1]?null:o[p+1].v,n,o,c,p):c>p&&z(e,r,f)})(o,l,e,i,n):null!==i?T(o,null,e,i,0,i.length-1):!n&&null!==l&&z(l,0,l.length-1)},G=(t,e,n)=>null==t?void 0:t.insertBefore(e,n),I=(t,e)=>{if(e&&!t.S&&e["s-p"]){const n=e["s-p"].push(new Promise((o=>t.S=()=>{e["s-p"].splice(n-1,1),o()})))}},V=(t,e)=>{if(t.o|=16,!(4&t.o))return I(t,t.j),$((()=>Y(t,e)));t.o|=512},Y=(t,e)=>{const n=t.$hostElement$,o=t.t;if(!o)throw Error(`Can't render component <${n.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let l;return l=Z(o,e?"componentWillLoad":"componentWillUpdate",void 0,n),l=_(l,(()=>Z(o,"componentWillRender",void 0,n))),_(l,(()=>J(t,o,e)))},_=(t,e)=>B(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),B=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,J=async(t,e,n)=>{var o;const l=t.$hostElement$,u=l["s-rc"];n&&(t=>{const e=t.k;((t,e)=>{var n;const o=A(e),l=i.get(o);if(!r.document)return o;if(t=11===t.nodeType?t:r.document,l)if("string"==typeof l){let i,u=W.get(t=t.head||t);if(u||W.set(t,u=new Set),!u.has(o)){{i=r.document.createElement("style"),i.innerHTML=l;const o=null!=(n=c.O)?n:b(r.document);if(null!=o&&i.setAttribute("nonce",o),!(1&e.o))if("HEAD"===t.nodeName){const e=t.querySelectorAll("link[rel=preconnect]"),n=e.length>0?e[e.length-1].nextSibling:t.querySelector("style");t.insertBefore(i,(null==n?void 0:n.parentNode)===t?n:null)}else if("host"in t)if(a){const e=new CSSStyleSheet;e.replaceSync(l),t.adoptedStyleSheets=[e,...t.adoptedStyleSheets]}else{const e=t.querySelector("style");e?e.innerHTML=l+e.innerHTML:t.prepend(i)}else t.append(i);1&e.o&&t.insertBefore(i,null)}4&e.o&&(i.innerHTML+=s),u&&u.add(o)}}else t.adoptedStyleSheets.includes(l)||(t.adoptedStyleSheets=[...t.adoptedStyleSheets,l])})(t.$hostElement$.getRootNode(),e)})(t);K(t,e,l,n),u&&(u.map((t=>t())),l["s-rc"]=void 0);{const e=null!=(o=l["s-p"])?o:[],n=()=>Q(t);0===e.length?n():(Promise.all(e).then(n),t.o|=4,e.length=0)}},K=(t,e,n,l)=>{try{e=e.render(),t.o&=-17,t.o|=2,((t,e,n=!1)=>{const o=t.$hostElement$,l=t.C||C(null,null),i=(t=>t&&t.m===M)(e)?e:E(null,null,e);if(x=o.tagName,n&&i.u)for(const t of Object.keys(i.u))o.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(i.u[t]=o[t]);i.m=null,i.o|=4,t.C=i,i.v=l.v=o,q(l,i,n)})(t,e,l)}catch(e){o(e,t.$hostElement$)}return null},Q=t=>{const e=t.$hostElement$,n=t.t,o=t.j;Z(n,"componentDidRender",void 0,e),64&t.o?Z(n,"componentDidUpdate",void 0,e):(t.o|=64,tt(e),Z(n,"componentDidLoad",void 0,e),t.M(e),o||X()),t.S&&(t.S(),t.S=void 0),512&t.o&&y((()=>V(t,!1))),t.o&=-517},X=()=>{y((()=>(t=>{const e=c.ce("appload",{detail:{namespace:"graphwise-reactodia"}});return t.dispatchEvent(e),e})(r)))},Z=(t,e,n,l)=>{if(t&&t[e])try{return t[e](n)}catch(t){o(t,l)}},tt=t=>t.classList.add("hydrated"),et=(t,n,l,i)=>{const s=e(t);if(!s)throw Error(`Couldn't find host element for "${i.$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`);const r=s.$hostElement$,c=s.P.get(n),u=s.o,a=s.t;if(l=D(l,i.D[n][0]),(!(8&u)||void 0===c)&&l!==c&&(!Number.isNaN(c)||!Number.isNaN(l))&&(s.P.set(n,l),a)){if(i.R&&128&u){const t=i.R[n];t&&t.map((t=>{try{a[t](l,c,n)}catch(t){o(t,r)}}))}if(2==(18&u)){if(a.componentShouldUpdate&&!1===a.componentShouldUpdate(l,c,n))return;V(s,!1)}}},nt=(t,n,o)=>{var l,i;const s=t.prototype;if(n.D||n.R||t.watchers){t.watchers&&!n.R&&(n.R=t.watchers);const r=Object.entries(null!=(l=n.D)?l:{});if(r.map((([t,[l]])=>{if(31&l||2&o&&32&l){const{get:i,set:r}=Object.getOwnPropertyDescriptor(s,t)||{};i&&(n.D[t][0]|=2048),r&&(n.D[t][0]|=4096),(1&o||!i)&&Object.defineProperty(s,t,{get(){{if(!(2048&n.D[t][0]))return((t,n)=>e(this).P.get(n))(0,t);const o=e(this),l=o?o.t:s;if(!l)return;return l[t]}},configurable:!0,enumerable:!0}),Object.defineProperty(s,t,{set(i){const s=e(this);if(r){const e=32&l?this[t]:s.$hostElement$[t];return void 0===e&&s.P.get(t)?i=s.P.get(t):!s.P.get(t)&&e&&s.P.set(t,e),r.call(this,D(i,l)),void et(this,t,i=32&l?this[t]:s.$hostElement$[t],n)}{if(!(1&o&&4096&n.D[t][0]))return et(this,t,i,n),void(1&o&&!s.t&&s.W.then((()=>{4096&n.D[t][0]&&s.t[t]!==s.P.get(t)&&(s.t[t]=i)})));const e=()=>{const e=s.t[t];!s.P.get(t)&&e&&s.P.set(t,e),s.t[t]=D(i,l),et(this,t,s.t[t],n)};s.t?e():s.W.then((()=>e()))}}})}})),1&o){const o=new Map;s.attributeChangedCallback=function(t,l,i){c.jmp((()=>{var r;const c=o.get(t);if(this.hasOwnProperty(c))i=this[c],delete this[c];else{if(s.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==i)return;if(null==c){const o=e(this),s=null==o?void 0:o.o;if(s&&!(8&s)&&128&s&&i!==l){const e=o.t,s=null==(r=n.R)?void 0:r[t];null==s||s.forEach((n=>{null!=e[n]&&e[n].call(e,i,l,t)}))}return}}const u=Object.getOwnPropertyDescriptor(s,c);(i=(null!==i||"boolean"!=typeof this[c])&&i)===this[c]||u.get&&!u.set||(this[c]=i)}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(i=n.R)?i:{}),...r.filter((([t,e])=>15&e[0])).map((([t,e])=>{const n=e[1]||t;return o.set(n,t),n}))]))}}return t},ot=(t,e)=>{Z(t,"connectedCallback",void 0,e)},lt=(t,e)=>{Z(t,"disconnectedCallback",void 0,e||t)},it=(t,n={})=>{var u;if(!r.document)return void console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");const f=[],d=n.exclude||[],h=r.customElements,p=r.document.head,m=p.querySelector("meta[charset]"),v=r.document.createElement("style"),y=[];let $,w=!0;Object.assign(c,n),c.l=new URL(n.resourcesUrl||"./",r.document.baseURI).href;let g=!1;if(t.map((t=>{t[1].map((n=>{var s;const r={o:n[0],$:n[1],D:n[2],A:n[3]};4&r.o&&(g=!0),r.D=n[2],r.R=null!=(s=n[4])?s:{};const u=r.$,p=class extends HTMLElement{constructor(t){super(t),this.hasRegisteredEventListeners=!1,((t,e)=>{const n={o:0,$hostElement$:t,k:e,P:new Map};n.W=new Promise((t=>n.M=t)),t["s-p"]=[],t["s-rc"]=[];const o=n;t.__stencil__getHostRef=()=>o})(t=this,r)}connectedCallback(){this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),$&&(clearTimeout($),$=null),w?y.push(this):c.jmp((()=>(t=>{if(!(1&c.o)){const n=e(t),s=n.k,r=()=>{};if(1&n.o)(null==n?void 0:n.t)?ot(n.t,t):(null==n?void 0:n.W)&&n.W.then((()=>ot(n.t,t)));else{n.o|=1;{let e=t;for(;e=e.parentNode||e.host;)if(e["s-p"]){I(n,n.j=e);break}}s.D&&Object.entries(s.D).map((([e,[n]])=>{if(31&n&&t.hasOwnProperty(e)){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n)=>{let s;if(!(32&e.o)){if(e.o|=32,n.N){const i=((t,e)=>{const n=t.$.replace(/-/g,"_"),i=t.N;if(!i)return;const s=l.get(i);return s?s[n]:import(`./${i}.entry.js`).then((t=>(l.set(i,t),t[n])),(t=>{o(t,e.$hostElement$)}))
2
- /*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n,e);if(i&&"then"in i){const t=()=>{};s=await i,t()}else s=i;if(!s)throw Error(`Constructor for "${n.$}#${e.U}" was not found`);s.isProxied||(n.R=s.watchers,nt(s,n,2),s.isProxied=!0);const r=()=>{};e.o|=8;try{new s(e)}catch(e){o(e,t)}e.o&=-9,e.o|=128,r(),ot(e.t,t)}else s=t.constructor,customElements.whenDefined(t.localName).then((()=>e.o|=128));if(s&&s.style){let t;"string"==typeof s.style&&(t=s.style);const e=A(n);if(!i.has(e)){const o=()=>{};((t,e,n)=>{let o=i.get(t);a&&n?(o=o||new CSSStyleSheet,"string"==typeof o?o=e:o.replaceSync(e)):o=e,i.set(t,o)})(e,t,!!(1&n.o)),o()}}}const r=e.j,c=()=>V(e,!0);r&&r["s-rc"]?r["s-rc"].push(c):c()})(t,n,s)}r()}})(this)))}disconnectedCallback(){c.jmp((()=>(async t=>{if(!(1&c.o)){const n=e(t);(null==n?void 0:n.t)?lt(n.t,t):(null==n?void 0:n.W)&&n.W.then((()=>lt(n.t,t)))}W.has(t)&&W.delete(t),t.shadowRoot&&W.has(t.shadowRoot)&&W.delete(t.shadowRoot)})(this))),c.raf((()=>{var t;const n=e(this),o=y.findIndex((t=>t===this));o>-1&&y.splice(o,1),(null==(t=null==n?void 0:n.C)?void 0:t.v)instanceof Node&&!n.C.v.isConnected&&delete n.C.v}))}componentOnReady(){return e(this).W}};r.N=t[0],d.includes(u)||h.get(u)||(f.push(u),h.define(u,nt(p,r,1)))}))})),f.length>0&&(g&&(v.textContent+=s),v.textContent+=f.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",v.innerHTML.length)){v.setAttribute("data-styles","");const t=null!=(u=c.O)?u:b(r.document);null!=t&&v.setAttribute("nonce",t),p.insertBefore(v,m?m.nextSibling:p.firstChild)}w=!1,y.length?y.map((t=>t.connectedCallback())):c.jmp((()=>$=setTimeout(X,30)))},st=t=>c.O=t;export{M as H,it as b,R as g,E as h,u as p,n as r,st as s}