You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/concepts/data-provider.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ sidebar_position: 2
4
4
5
5
# Data Provider
6
6
7
-
Reactodia defines a contract ([`DataProvider`](/docs/api/workspace/interfaces/DataProvider) interface) to query a subset of data from external source ([data graph](./graph-model.md#data-graph)) to provide means for incremental data loading when exploring the graph.
7
+
Reactodia defines a contract ([`DataProvider`](/docs/api/workspace/interfaces/DataProvider) interface) to query a subset of data from external source ([data graph](/docs/concepts/graph-model#data-graph)) to provide means for incremental data loading when exploring the graph.
For interoperability with other RDF-based libraries for JavaScript, the property values for entities and relations are stored as either **named node** or **literal** values using commonly used [RDF/JS](https://rdf.js.org/) representation.
19
19
20
-
To provide improved type-safety with TypeScript when dealing with various kinds of IRIs from the [data graph](./graph-model.md#data-graph), the library uses the following [branded string types](https://www.learningtypescript.com/articles/branded-types):
20
+
To provide improved type-safety with TypeScript when dealing with various kinds of IRIs from the [data graph](/docs/concepts/graph-model#data-graph), the library uses the following [branded string types](https://www.learningtypescript.com/articles/branded-types):
Color-scheme specific gray colors gradient from 0 (same as schema color) to 1000 (opposite to schema color) in increments of 100:
55
56
```css
@@ -58,15 +59,15 @@ Color-scheme specific gray colors gradient from 0 (same as schema color) to 1000
58
59
59
60
### Content and Background
60
61
61
-
<Reactodia.WorkspaceRoot>
62
+
<WithReactodiaStyles>
62
63
<ColorBoxes
63
64
colors={[
64
65
'var(--reactodia-color-content)',
65
66
'var(--reactodia-color-content-inverse)',
66
67
'var(--reactodia-color-content-contrast)',
67
68
]}
68
69
/>
69
-
</Reactodia.WorkspaceRoot>
70
+
</WithReactodiaStyles>
70
71
71
72
Color-scheme specific color for a text-like content, pure inverse for the background, and a contrast (which is suitable for content on top of a background of the named color):
72
73
```css
@@ -75,14 +76,14 @@ Color-scheme specific color for a text-like content, pure inverse for the backgr
75
76
--reactodia-color-content-contrast
76
77
```
77
78
78
-
<Reactodia.WorkspaceRoot>
79
+
<WithReactodiaStyles>
79
80
<ColorBoxes
80
81
colors={[
81
82
'var(--reactodia-background-color)',
82
83
'var(--reactodia-background-color-surface)',
83
84
]}
84
85
/>
85
-
</Reactodia.WorkspaceRoot>
86
+
</WithReactodiaStyles>
86
87
87
88
Color-scheme specific color for abackground-like layers, and a surface one which can be used for layers placed on top of the main background:
88
89
```css
@@ -133,39 +134,39 @@ Additionally, each color has a contrast foreground (to put on the named color) a
Copy file name to clipboardExpand all lines: docs/concepts/graph-model.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,17 +10,17 @@ The central part of the Reactodia state is the diagram content which is a mutabl
10
10
11
11
The diagram is composed of *abstract*[elements](/docs/api/workspace/classes/Element.md) and [links](/docs/api/workspace/classes/Link.md) and can be though of as collection of graph nodes and edges drawn on the canvas surface.
12
12
13
-
Each **element** is identified by a [generated ID](/docs/api/workspace/classes/Element.md#generateid), stores a [position](/docs/api/workspace/classes/Element.md#position) (in [paper coordinates](./canvas-coordinates.md)) and an arbitrary persisted [element state](/docs/api/workspace/classes/Element.md#elementstate).
13
+
Each **element** is identified by a [generated ID](/docs/api/workspace/classes/Element.md#generateid), stores a [position](/docs/api/workspace/classes/Element.md#position) (in [paper coordinates](/docs/concepts/canvas-coordinates)) and an arbitrary persisted [element state](/docs/api/workspace/classes/Element.md#elementstate).
14
14
15
-
Each **link** is identified by a [generated ID](/docs/api/workspace/classes/Link.md#generateid), has source and target element IDs, and a [link type IRI](/docs/api/workspace/type-aliases/LinkTypeIri.md). In its state it stores path geometry as a [collection of points](/docs/api/workspace/classes/Link.md#vertices) (in [paper coordinates](./canvas-coordinates.md)) and an arbitrary persisted [link state](/docs/api/workspace/classes/Link.md#linkstate).
15
+
Each **link** is identified by a [generated ID](/docs/api/workspace/classes/Link.md#generateid), has source and target element IDs, and a [link type IRI](/docs/api/workspace/type-aliases/LinkTypeIri.md). In its state it stores path geometry as a [collection of points](/docs/api/workspace/classes/Link.md#vertices) (in [paper coordinates](/docs/concepts/canvas-coordinates)) and an arbitrary persisted [link state](/docs/api/workspace/classes/Link.md#linkstate).
16
16
17
17
:::note
18
18
Currently there is only one concrete element type besides the data graph ones: [`VoidElement`](/docs/api/workspace/classes/VoidElement.md) which is displayed as nothing (empty point) but can be connected to with the links.
19
19
:::
20
20
21
21
## Data graph
22
22
23
-
While elements and links are considered to be diagram graph nodes and edges, some of them can represent entities and relations from (external) data graph defined by the [`DataProvider`](./data-provider.md):
23
+
While elements and links are considered to be diagram graph nodes and edges, some of them can represent entities and relations from (external) data graph defined by the [`DataProvider`](/docs/concepts/data-provider):
24
24
25
25
| Cell type | Description |
26
26
|-----------|-------------|
@@ -32,16 +32,16 @@ While elements and links are considered to be diagram graph nodes and edges, som
32
32
:::note
33
33
An IRI is [Internationalized Resource Identifier](https://en.wikipedia.org/wiki/Internationalized_Resource_Identifier) which is basically a URI but may additionally contain most unicode characters.
34
34
35
-
See how the library uses [IRIs and RDF](./data-provider.md#iri-and-rdf) for more details.
35
+
See how the library uses [IRIs and RDF](/docs/concepts/data-provider#iri-and-rdf) for more details.
36
36
:::
37
37
38
38
Basically, a sub-graph of a full external data graph composed of entities and relations forms a diagram on the canvas. By exploring that graph, other entities and relation are added to the diagram content, expanding the view of the data graph and presenting more interconnections throughout the data.
39
39
40
-
Using the [graph authoring](./graph-authoring.md) feature it is possible to work on the changes to the data graph and apply it once ready.
40
+
Using the [graph authoring](/docs/concepts/graph-authoring) feature it is possible to work on the changes to the data graph and apply it once ready.
41
41
42
42
## Manipulating the diagram
43
43
44
-
To access and manipulate the diagram one can use [diagram model](/docs/api/workspace/classes/DataDiagramModel.md) from [`WorkspaceContext`](./workspace-context.md):
44
+
To access and manipulate the diagram one can use [diagram model](/docs/api/workspace/classes/DataDiagramModel.md) from [`WorkspaceContext`](/docs/concepts/workspace-context):
45
45
```ts
46
46
function WorkingWithDiagramModel() {
47
47
const {model} =Reactodia.useWorkspace();
@@ -92,7 +92,7 @@ function WorkingWithDiagramModel() {
92
92
93
93
## Link visibility
94
94
95
-
Some links can be hidden from the canvas by setting its link type visibility with [`setLinkVisibility()`](/docs/api/workspace/classes/DataDiagramModel.md#setlinkvisibility) to `hidden`. The hidden links are invisible and would not affect the [graph layout](./layout-workers.md).
95
+
Some links can be hidden from the canvas by setting its link type visibility with [`setLinkVisibility()`](/docs/api/workspace/classes/DataDiagramModel.md#setlinkvisibility) to `hidden`. The hidden links are invisible and would not affect the [graph layout](/docs/concepts/layout-workers).
96
96
97
97
Alternatively, a link type visibility can be set to `withoutLabel` to display it as path (line) only without any additional labels.
Copy file name to clipboardExpand all lines: docs/concepts/i18n.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ sidebar_position: 9
6
6
7
7
Reactodia has a built-in support for UI text strings localization.
8
8
Each UI component in the library that displays text labels or descriptions resolves
9
-
them from [translation bundles](#translation-bundle) via [Translation interface](#translation-interface-and-hooks).
9
+
them from [translation bundles](#translation-bundle) via [Translation interface](#custom-translation).
10
10
11
11
## Translation bundle
12
12
@@ -71,7 +71,7 @@ function MultipleTranslations() {
71
71
}
72
72
```
73
73
74
-
## Using translation in the custom components
74
+
## Using translation in the custom components {#custom-translation}
75
75
76
76
The localization mechanism can be used for a custom component nested inside the [`Workspace`](/docs/components/workspace.md) by getting a [`Translation`](/docs/api/workspace/interfaces/Translation.md) instance which can be used to format localizable strings.
Copy file name to clipboardExpand all lines: docs/concepts/workspace-context.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,19 +4,19 @@ sidebar_position: 5
4
4
5
5
# Workspace Context
6
6
7
-
Reactodia uses a common context to connect its components with the [graph model](./graph-model.md) and other services such as [graph layout](./layout-workers.md), [i18n](./i18n.md) and [visual graph authoring](./graph-authoring.md).
7
+
Reactodia uses a common context to connect its components with the [graph model](/docs/concepts/graph-model) and other services such as [graph layout](/docs/concepts/layout-workers), [i18n](/docs/concepts/i18n) and [visual graph authoring](/docs/concepts/graph-authoring).
8
8
9
9
## Services and stores in the context
10
10
11
11
The [`WorkspaceContext`](/docs/api/workspace/interfaces/WorkspaceContext) contains references to different services and state stores, here is the important ones:
|`model`|[`DataDiagramModel`](/docs/api/workspace/classes/DataDiagramModel.md)| Stores the diagram content and asynchronously fetches from a data provider.<br/>See [graph model](./graph-model.md). |
15
+
|`model`|[`DataDiagramModel`](/docs/api/workspace/classes/DataDiagramModel.md)| Stores the diagram content and asynchronously fetches from a data provider.<br/>See [graph model](/docs/concepts/graph-model). |
16
16
|`view`|[`SharedCanvasState`](/docs/api/workspace/classes/SharedCanvasState.md)| Stores common state and settings for all [canvases](/docs/components/canvas.md) in the workspace. |
17
-
|`editor`|[`EditorController`](/docs/api/workspace/classes/EditorController.md)| Stores, modifies and validates changes from the visual graph authoring.<br/>See [graph authoring](./graph-authoring.md). |
17
+
|`editor`|[`EditorController`](/docs/api/workspace/classes/EditorController.md)| Stores, modifies and validates changes from the visual graph authoring.<br/>See [graph authoring](/docs/concepts/graph-authoring). |
18
18
|`overlay`|[`OverlayController`](/docs/api/workspace/classes/OverlayController.md)| Controls UI overlays for the canvases, including dialogs and tasks. |
19
-
|`translation`|[`Translation`](/docs/api/workspace/interfaces/Translation.md)| Provides a translation for UI text strings.<br/>See [i18n](./i18n.md). |
19
+
|`translation`|[`Translation`](/docs/api/workspace/interfaces/Translation.md)| Provides a translation for UI text strings.<br/>See [i18n](/docs/concepts/i18n). |
20
20
21
21
## Getting the workspace context
22
22
@@ -70,5 +70,5 @@ function Example() {
70
70
```
71
71
72
72
:::note
73
-
The library also uses separate context for [i18n](./i18n.md) (which is accessible by [`useTranslation()`](/docs/api/workspace/functions/useTranslation.md) hook and `translation` property of the workspace context) and a nested context for the [`Canvas`](/docs/components/canvas.md).
73
+
The library also uses separate context for [i18n](/docs/concepts/i18n) (which is accessible by [`useTranslation()`](/docs/api/workspace/functions/useTranslation.md) hook and `translation` property of the workspace context) and a nested context for the [`Canvas`](/docs/components/canvas.md).
0 commit comments