Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .dagger/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export class AtomicServer {
.withMountedDirectory('/docs', actualDocsDirectory)
.withWorkdir('/docs')
.withExec(['mdbook', 'build'])
.directory('/docs/build/html');
.directory('/docs/build');
}

@func()
Expand Down
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ See [STATUS.md](server/STATUS.md) to learn more about which features will remain

## UNRELEASED

- We changed the binary format in which resources are stored. This means your data will be migrated the first time you run the server. This could take some time depending on the size of your database.
- [#1048](https://github.com/atomicdata-dev/atomic-server/issues/1048) Fix search index not removing old versions of resources.
- [#1056](https://github.com/atomicdata-dev/atomic-server/issues/1056) Switched from Earthly to Dagger for CI. Also made improvements to E2E test publishing and building docker images.
- [#979](https://github.com/atomicdata-dev/atomic-server/issues/979) Fix nested resource deletion, use transactions
Expand All @@ -16,8 +17,9 @@ See [STATUS.md](server/STATUS.md) to learn more about which features will remain
- [#958](https://github.com/atomicdata-dev/atomic-server/issues/958) Fix search in CLI / atomic_lib
- [#658](https://github.com/atomicdata-dev/atomic-server/issues/658) Added JSON datatype.
- [#1024](https://github.com/atomicdata-dev/atomic-server/issues/1024) Added URI datatype.
- [#998](https://github.com/atomicdata-dev/atomic-server/issues/998) Added YJS datatype.
BREAKING: [#1107](https://github.com/atomicdata-dev/atomic-server/issues/1107) Named nested resources are no longer supported. Value::Resource and SubResource::Resource have been removed. If you need to include multiple resources in a response use an array.
BREAKING: `store.get_resource_extended()` now returns a `ResourceResponse` instead of a `Resource` due to the removal of named nested resources.
BREAKING: `store.get_resource_extended()` now returns a `ResourceResponse` instead of a `Resource` due to the removal of named nested resources. Use `.into()` or `.to_single()` to convert to a `Resource`.

## [v0.40.2]

Expand Down
10 changes: 5 additions & 5 deletions browser/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ data-browser/coverage
.DS_Store
**/.trunk/*

**/tomic-lib-**.tgz
**/tomic-react-**.tgz
**/tomic-svelte-**.tgz
**/tomic-cli-**.tgz
**/tomic-create-template-**.tgz
**/tomic-lib**.tgz
**/tomic-react**.tgz
**/tomic-svelte**.tgz
**/tomic-cli**.tgz
**/tomic-create-template**.tgz

data-browser/src/locales/.wuchale
data-browser/src/locales/data.js
Expand Down
9 changes: 5 additions & 4 deletions browser/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ This changelog covers all five packages, as they are (for now) updated as a whol

### Atomic Browser

- [#741](https://github.com/atomicdata-dev/atomic-server/issues/741) New feature: A brand new document editor with realtime collaboration and a fast and efficient editing experience.
- [#951](https://github.com/atomicdata-dev/atomic-server/issues/951) New feature: Atomic Assistant, AI chat interface with support for custom agents, MCP servers and more. Bring your own OpenRouter key or use Ollama to host your own models.
- [#459](https://github.com/atomicdata-dev/atomic-server/issues/459) New feature: Add tags to your resources to better organize your data. Search for resources with specific tags in the search bar with `tag:[name]`.
- [#1118](https://github.com/atomicdata-dev/atomic-server/issues/1118) New feature: AtomicServer is now also available in German, Spanish and French. Change your language on the settings page.
- [#981](https://github.com/atomicdata-dev/atomic-server/issues/981) Fix bug where the service worker would not update cache with updated code.
- [#989](https://github.com/atomicdata-dev/atomic-server/issues/989) Added an edit button to the resource selector inputs.
- [#992](https://github.com/atomicdata-dev/atomic-server/issues/992) Fix Searchbox overflowing when displaying long names.
Expand All @@ -17,9 +21,6 @@ This changelog covers all five packages, as they are (for now) updated as a whol
- [#1008](https://github.com/atomicdata-dev/atomic-server/issues/1008) Add 'open' option to classes and properties in the ontology edit view.
- [#1008](https://github.com/atomicdata-dev/atomic-server/issues/1008) Updated the look of the resource selector and made it more responsive.
- [#1008](https://github.com/atomicdata-dev/atomic-server/issues/1008) Add info dropdowns to different sections of the ontology editor for more information about the section.
- [#459](https://github.com/atomicdata-dev/atomic-server/issues/459) New feature: Add tags to your resources to better organize your data. Search for resources with specific tags in the search bar with `tag:[name]`.
- [#951](https://github.com/atomicdata-dev/atomic-server/issues/951) New feature: Atomic Assistant, AI chat interface with support for custom agents, MCP servers and more. Bring your own OpenRouter key or use Ollama to host your own models.
- [#1118](https://github.com/atomicdata-dev/atomic-server/issues/1118) New feature: AtomicServer is now also available in German, Spanish and French. Change your language on the settings page.

### @tomic/lib

Expand All @@ -32,7 +33,7 @@ This changelog covers all five packages, as they are (for now) updated as a whol
- Added `ResourceEvents.LoadingChange` event on `Resource` to listen for changes to the loading state of the resource.
- Added `resource.stable` property to `Resource` to get a stable reference to the resource, even when it is proxied.
- Added `resource.merge()` method to merge a resource into another resource while preserving local changes on the current resource.
- `store.addResources()` now merges incoming resources with resources already present in the store.
- `store.addResources()` now merges incoming resources with resources already present in the store instead of replacing them.
- SEMI BREAKING CHANGE: When using generated types by cli, @tomic/lib now requires them to be generated by @tomic/cli v0.41.0 or above.
- BREAKING CHANGE: The `StoreEvents.ResourceRemoved` event callback now only receives the subject of the resource instead of the resource itself.

Expand Down
4 changes: 2 additions & 2 deletions browser/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ pnpm start # run the server!

Library with `Store`, `Commit`, `JSON-AD` parsing, and more.

[**docs**](https://atomic-lib.netlify.app/modules/_tomic_lib)
[**docs**](https://docs.atomicdata.dev/js.html)

[→ Read more](lib/README.md)

Expand All @@ -59,7 +59,7 @@ React library with many useful hooks for rendering and editing Atomic Data.

[**demo + template on codesandbox**](https://codesandbox.io/s/atomic-data-react-template-4y9qu?file=/src/MyResource.tsx:0-1223)

[**docs**](https://atomic-lib.netlify.app/modules/_tomic_react)
[**docs**](https://docs.atomicdata.dev/usecases/react.html)

[→ Read more](react/README.md)

Expand Down
2 changes: 1 addition & 1 deletion browser/data-browser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"@emoji-mart/react": "^1.1.1",
"@emotion/is-prop-valid": "^1.4.0",
"@floating-ui/dom": "^1.7.4",
"@modelcontextprotocol/sdk": "^1.22.0",
"@modelcontextprotocol/sdk": "^1.23.0",
"@oddbird/css-anchor-positioning": "^0.6.1",
"@openrouter/ai-sdk-provider": "^1.2.5",
"@radix-ui/react-popover": "^1.1.15",
Expand Down
41 changes: 22 additions & 19 deletions browser/data-browser/src/components/Toaster.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@ import toast, {
type Toast,
ToastBar,
Toaster as ReactHotToast,
resolveValue,
type Renderable,
} from 'react-hot-toast';
import { FaCopy, FaTimes } from 'react-icons/fa';
import { useTheme } from 'styled-components';
import styled, { useTheme } from 'styled-components';
import { zIndex } from '../styling';
import { Row } from './Row';
import { IconButton } from './IconButton/IconButton';

import type { JSX } from 'react';
import { useRef, type JSX } from 'react';

/**
* Makes themed toast notifications available in the Context. Render this
Expand Down Expand Up @@ -59,31 +60,28 @@ interface ToastMessageProps {
}

function ToastMessage({ icon, message, t }: ToastMessageProps) {
let text: string;

if (typeof message === 'string') {
text = message;
} else if (message && 'props' in message) {
// children can technically still be a react node but we never do that in our code so we'll just assume it to be a string.
text = message.props.children;
} else {
text = '';
}
const textRef = useRef<HTMLDivElement>(null);

function handleCopy() {
const text = textRef.current?.textContent;

if (text === undefined) {
toast.error('Nothing to copy.');

return;
}

toast.success('Copied error to clipboard');
navigator.clipboard.writeText(text);
toast.dismiss(t.id);
}

if (text.length > 100) {
text = text.substring(0, 100) + '...';
}

return (
<Row gap='1ch' center>
<StyledRow gap='1ch' center>
{icon}
{text}
<div ref={textRef} style={{ display: 'contents' }}>
{resolveValue(message, t)}
</div>
{t.type !== 'loading' && (
<div
style={{
Expand All @@ -101,6 +99,11 @@ function ToastMessage({ icon, message, t }: ToastMessageProps) {
)}
</div>
)}
</Row>
</StyledRow>
);
}

const StyledRow = styled(Row)`
max-height: 10rem;
overflow-y: auto;
`;
1 change: 1 addition & 0 deletions browser/data-browser/src/helpers/loggingHandlers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@ export function initBugsnag(apiKey: string): BugsnagErrorBoundary {
autoDetectErrors: !isDev(),
});

// @ts-expect-error - BugsnagPluginReact types do not match React 19.2 types.
return Bugsnag.getPlugin('react')!.createErrorBoundary(React);
}
4 changes: 4 additions & 0 deletions browser/data-browser/src/locales/de.po
Original file line number Diff line number Diff line change
Expand Up @@ -3151,3 +3151,7 @@ msgstr "Wähle ein Bild <0/>"
#: src/chunks/RTE/ImagePicker.tsx
msgid "Inline"
msgstr "Fließtext"

#: src/components/Toaster.tsx
msgid "Nothing to copy."
msgstr "Nichts zum Kopieren."
4 changes: 4 additions & 0 deletions browser/data-browser/src/locales/en.po
Original file line number Diff line number Diff line change
Expand Up @@ -3159,3 +3159,7 @@ msgstr "Choose an image <0/>"
#: src/chunks/RTE/ImagePicker.tsx
msgid "Inline"
msgstr "Inline"

#: src/components/Toaster.tsx
msgid "Nothing to copy."
msgstr "Nothing to copy."
4 changes: 4 additions & 0 deletions browser/data-browser/src/locales/es.po
Original file line number Diff line number Diff line change
Expand Up @@ -3129,3 +3129,7 @@ msgstr "Elegir una imagen <0/>"
#: src/chunks/RTE/ImagePicker.tsx
msgid "Inline"
msgstr "En línea"

#: src/components/Toaster.tsx
msgid "Nothing to copy."
msgstr "Nada para copiar."
4 changes: 4 additions & 0 deletions browser/data-browser/src/locales/fr.po
Original file line number Diff line number Diff line change
Expand Up @@ -3148,3 +3148,7 @@ msgstr "Choisir une image <0/>"
#: src/chunks/RTE/ImagePicker.tsx
msgid "Inline"
msgstr "En ligne"

#: src/components/Toaster.tsx
msgid "Nothing to copy."
msgstr "Rien à copier."
2 changes: 1 addition & 1 deletion browser/data-browser/src/routes/PruneTestsRoute.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@ const PruneTestsRoute: React.FC = () => {
);
};

export const pruneTestRouteLazy = createLazyRoute('/$')({
export const pruneTestRouteLazy = createLazyRoute('/app/prunetests')({
component: PruneTestsRoute,
});
2 changes: 2 additions & 0 deletions browser/data-browser/src/routes/Router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import { LinkOpenRouter } from './LinkOpenRouter';
const PruneTestsRoute = createRoute({
getParentRoute: () => appRoute,
path: pathNames.pruneTests,
// @ts-expect-error - Mismatch between unavailable route name and prune route name, not sure how to fix this.
}).lazy(() => {
if (isDev()) {
return import('./PruneTestsRoute').then(mod => mod.pruneTestRouteLazy);
Expand All @@ -33,6 +34,7 @@ const PruneTestsRoute = createRoute({
const SandboxRoute = createRoute({
getParentRoute: () => appRoute,
path: pathNames.sandbox,
// @ts-expect-error - Mismatch between unavailable route name and sandbox route name, not sure how to fix this.
}).lazy(() => {
if (isDev()) {
return import('./Sandbox').then(mod => mod.sandboxRouteLazy);
Expand Down
2 changes: 1 addition & 1 deletion browser/data-browser/src/routes/Sandbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ function Sandbox(): JSX.Element {
);
}

export const sandboxRouteLazy = createLazyRoute('/$')({
export const sandboxRouteLazy = createLazyRoute('/app/sandbox')({
component: Sandbox,
});
2 changes: 1 addition & 1 deletion browser/lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
"typecheck": "pnpm exec tsc --noEmit",
"watch": "pnpm exec tsup --watch",
"publint": "pnpm dlx publint",
"attw": "pnpm exec attw $(pnpm pack)"
"attw": "pnpm pack --out tomic-lib.tgz && pnpm exec attw tomic-lib.tgz"
},
"source": "src/index.ts",
"type": "module",
Expand Down
4 changes: 2 additions & 2 deletions browser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"eslint-plugin-react-hooks": "7.0.1",
"globals": "^15.11.0",
"husky": "^8.0.3",
"netlify-cli": "17.37.1",
"netlify-cli": "23.11.1",
"prettier": "3.6.2",
"prettier-plugin-jsdoc": "^1.3.0",
"prettier-plugin-svelte": "^3.2.7",
Expand All @@ -39,7 +39,7 @@
"test-query": "pnpm run --filter @tomic/e2e test-query",
"start": "pnpm run -r --parallel start",
"typedoc": "typedoc --options ./typedoc.json",
"typedoc-publish": "pnpm run typedoc && netlify deploy --dir data-browser/publish/docs/ --prod --auth $NETLIFY_AUTH_TOKEN --site atomic-lib",
"typedoc-publish": "pnpm run typedoc && netlify deploy --dir data-browser/publish/docs/ --prod --auth $NETLIFY_AUTH_TOKEN --site a628f703-2dc1-4305-93d2-4ddc16c13f75",
"typecheck": "pnpm run -r --parallel typecheck"
},
"husky": {
Expand Down
Loading
Loading