@volter/world-ui 0.1.1 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/index.js +3 -3
- package/package.json +2 -2
- package/src/index.ts +3 -3
package/dist/src/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { renderToStaticMarkup } from 'react-dom/server';
|
|
2
|
-
import { brandTokensResponse, bundleClient, fileResponse, serveHttp } from '@volter/world-core';
|
|
3
|
-
const KIT_CSS = () => new URL('../client/kit.css', import.meta.url)
|
|
2
|
+
import { brandTokensResponse, bundleClient, fileResponse, serveHttp, filePathOf } from '@volter/world-core';
|
|
3
|
+
const KIT_CSS = () => filePathOf(new URL('../client/kit.css', import.meta.url));
|
|
4
4
|
/** The brand's tokens and faces the kit's roles read (company decision 0018), fetched at build into client/brand/ (gitignored). */
|
|
5
|
-
const BRAND_DIR = () => new URL('../client/brand', import.meta.url)
|
|
5
|
+
const BRAND_DIR = () => filePathOf(new URL('../client/brand', import.meta.url));
|
|
6
6
|
export function twinUiHtml(title) {
|
|
7
7
|
const safe = title.replace(/[<>&"]/g, '');
|
|
8
8
|
return `<!doctype html>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@volter/world-ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Shared pieces and serving for derived packs' screens (hosted flows and workspaces), through each pack's own API; see docs/contributing/architecture.md, Screens.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Volter (https://github.com/volter-ai)",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"dist"
|
|
30
30
|
],
|
|
31
31
|
"peerDependencies": {
|
|
32
|
-
"@volter/world-core": "2.0.
|
|
32
|
+
"@volter/world-core": "2.0.3",
|
|
33
33
|
"react": "^19.2.7",
|
|
34
34
|
"react-dom": "^19.2.7"
|
|
35
35
|
},
|
package/src/index.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
// its title, its client entry and stylesheet, and its fetch; nothing here knows a vendor.
|
|
5
5
|
import type { ReactElement } from 'react';
|
|
6
6
|
import { renderToStaticMarkup } from 'react-dom/server';
|
|
7
|
-
import { brandTokensResponse, bundleClient, fileResponse, serveHttp } from '@volter/world-core';
|
|
7
|
+
import { brandTokensResponse, bundleClient, fileResponse, serveHttp, filePathOf } from '@volter/world-core';
|
|
8
8
|
|
|
9
9
|
export type TwinUiOptions = {
|
|
10
10
|
title: string;
|
|
@@ -16,9 +16,9 @@ export type TwinUiOptions = {
|
|
|
16
16
|
api: (request: Request) => Promise<Response>;
|
|
17
17
|
};
|
|
18
18
|
|
|
19
|
-
const KIT_CSS = (): string => new URL('../client/kit.css', import.meta.url)
|
|
19
|
+
const KIT_CSS = (): string => filePathOf(new URL('../client/kit.css', import.meta.url));
|
|
20
20
|
/** The brand's tokens and faces the kit's roles read (company decision 0018), fetched at build into client/brand/ (gitignored). */
|
|
21
|
-
const BRAND_DIR = (): string => new URL('../client/brand', import.meta.url)
|
|
21
|
+
const BRAND_DIR = (): string => filePathOf(new URL('../client/brand', import.meta.url));
|
|
22
22
|
|
|
23
23
|
export function twinUiHtml(title: string): string {
|
|
24
24
|
const safe = title.replace(/[<>&"]/g, '');
|