@gogitcms/design-system 0.16.0-next.14 → 0.16.0-next.15
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/README.md +1 -2
- package/package.json +2 -2
- package/src/__tests__/documentDrafts.test.ts +2 -2
- package/src/components/ContentBrowser.tsx +6 -6
- package/src/components/Notifications.tsx +1 -1
- package/src/components/ProjectMenu.tsx +4 -4
- package/src/components/WorkspaceMenu.tsx +3 -4
- package/src/history.ts +1 -1
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@ Authored once against React Native primitives and consumed as source, so the
|
|
|
5
5
|
same components render:
|
|
6
6
|
|
|
7
7
|
- **natively** in the Expo mobile app (`react-native`),
|
|
8
|
-
- **on the web** in the
|
|
8
|
+
- **on the web** in the SPA frontend (`react-native-web`).
|
|
9
9
|
|
|
10
10
|
## Foundations
|
|
11
11
|
|
|
@@ -65,7 +65,6 @@ import { ThemeProvider, ContentBrowser } from "@gogitcms/design-system";
|
|
|
65
65
|
```
|
|
66
66
|
|
|
67
67
|
- **Mobile app** — the viewport is always narrow → native mobile drill-down.
|
|
68
|
-
- **Desktop app** — a wide window → the multi-pane power layout.
|
|
69
68
|
- **SPA frontend** — switches between the two live as the browser resizes.
|
|
70
69
|
|
|
71
70
|
## Fonts
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gogitcms/design-system",
|
|
3
|
-
"version": "0.16.0-next.
|
|
3
|
+
"version": "0.16.0-next.15",
|
|
4
4
|
"main": "src/index.ts",
|
|
5
5
|
"types": "src/index.ts",
|
|
6
|
-
"// exports": "The root entry is the react-native source the SPAs
|
|
6
|
+
"// exports": "The root entry is the react-native source the SPAs and mobile app consume. ./web is the plain-DOM build for server-rendered surfaces (the Astro docs site) that don't run react-native-web, and ./css ships the tokens as custom properties. The trailing wildcard keeps deep paths resolvable — plugin bundling and the Vite aliases reach into src/ directly.",
|
|
7
7
|
"exports": {
|
|
8
8
|
".": "./src/index.ts",
|
|
9
9
|
"./web": "./src/web/index.ts",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
// The drafts store is shared by every page of an origin
|
|
2
|
-
//
|
|
1
|
+
// The drafts store is shared by every page of an origin, such as two editor
|
|
2
|
+
// tabs. What one page does to it must not set the other off.
|
|
3
3
|
|
|
4
4
|
const PROBE = "gitcms.draft.v1:probe";
|
|
5
5
|
|
|
@@ -350,7 +350,7 @@ export type ContentBrowserProps = {
|
|
|
350
350
|
// owns which docs are open, each column's loaded data + loading state, and its
|
|
351
351
|
// per-tab collection context). `entries` then only needs the list's display
|
|
352
352
|
// fields — each tab loads its own document. Absent → the internal (self-owned)
|
|
353
|
-
// columns behavior
|
|
353
|
+
// columns behavior. Mobile is unaffected.
|
|
354
354
|
openTabs?: OpenTab[];
|
|
355
355
|
activeTabId?: string | null;
|
|
356
356
|
// A content-list row was opened: newColumn (shift/⌘-click) → open in a new
|
|
@@ -523,7 +523,7 @@ export type ContentBrowserProps = {
|
|
|
523
523
|
projectLocked?: boolean;
|
|
524
524
|
|
|
525
525
|
// ---- an app window (all optional; the web and mobile apps pass none) -----
|
|
526
|
-
//
|
|
526
|
+
// For a host that is a window per project, moving between workspaces rather
|
|
527
527
|
// than being addressed to one by a URL. These are what that needs of the
|
|
528
528
|
// desktop layout's top bar; the mobile layout ignores them.
|
|
529
529
|
/**
|
|
@@ -537,8 +537,8 @@ export type ContentBrowserProps = {
|
|
|
537
537
|
projectMenuActions?: ProjectMenuAction[];
|
|
538
538
|
/**
|
|
539
539
|
* Room for the platform's window controls, and the top bar marked as the
|
|
540
|
-
* window's drag region, for a host drawing its own window chrome (
|
|
541
|
-
*
|
|
540
|
+
* window's drag region, for a host drawing its own window chrome (a
|
|
541
|
+
* chromeless macOS window).
|
|
542
542
|
*/
|
|
543
543
|
windowChrome?: WindowChrome;
|
|
544
544
|
// Omitted → no "New branch" row. Rejecting a name should throw so the inline
|
|
@@ -5511,8 +5511,8 @@ function PressableRow({ children, onPress, active }: { children: React.ReactNode
|
|
|
5511
5511
|
|
|
5512
5512
|
/**
|
|
5513
5513
|
* Responsive CMS content browser. Renders the desktop multi-pane layout at/above
|
|
5514
|
-
* the desktop breakpoint and the mobile drill-down below it
|
|
5515
|
-
* drives the
|
|
5514
|
+
* the desktop breakpoint and the mobile drill-down below it. The same component
|
|
5515
|
+
* drives the native mobile app and the responsive web SPA.
|
|
5516
5516
|
*/
|
|
5517
5517
|
export function ContentBrowser(props: ContentBrowserProps) {
|
|
5518
5518
|
const { isDesktop } = useResponsive();
|
|
@@ -8,7 +8,7 @@ import type { IconName } from "../icons";
|
|
|
8
8
|
import { Spinner } from "./Spinner";
|
|
9
9
|
|
|
10
10
|
// One notification, shaped for display. Transport-agnostic: the frontend/mobile
|
|
11
|
-
// apps map GraphQL rows and the
|
|
11
|
+
// apps map GraphQL rows and the dashboard maps REST rows into this.
|
|
12
12
|
export type NotificationItem = {
|
|
13
13
|
id: string;
|
|
14
14
|
title: string;
|
|
@@ -11,9 +11,9 @@ export type ProjectRef = {
|
|
|
11
11
|
label: string;
|
|
12
12
|
/**
|
|
13
13
|
* Identifies the project within the list. Defaults to the name, which is
|
|
14
|
-
* unique within one repository; a list spanning repositories (
|
|
15
|
-
*
|
|
16
|
-
*
|
|
14
|
+
* unique within one repository; a list spanning repositories (one covering
|
|
15
|
+
* a whole workspace) sets its own, since two of them may each have a
|
|
16
|
+
* "docs".
|
|
17
17
|
*/
|
|
18
18
|
key?: string;
|
|
19
19
|
/**
|
|
@@ -52,7 +52,7 @@ export type ProjectMenuProps = {
|
|
|
52
52
|
locked?: boolean;
|
|
53
53
|
/**
|
|
54
54
|
* Offers each project in a window of its own, beside switching this one to
|
|
55
|
-
* it. Only a host with windows to open
|
|
55
|
+
* it. Only a host with windows to open passes it.
|
|
56
56
|
*/
|
|
57
57
|
onOpenInNewWindow?: (project: ProjectRef) => void;
|
|
58
58
|
/** Rows under the list, divided from it. */
|
|
@@ -27,7 +27,7 @@ export type WorkspaceMenuProps = {
|
|
|
27
27
|
actions?: WorkspaceMenuAction[];
|
|
28
28
|
/**
|
|
29
29
|
* What the menu is of. "folder" is a folder on disk standing where a
|
|
30
|
-
* workspace would (
|
|
30
|
+
* workspace would (an app's local mode): drawn with a folder
|
|
31
31
|
* rather than a monogram, its path (given as the slug) under its name.
|
|
32
32
|
*/
|
|
33
33
|
kind?: "workspace" | "folder";
|
|
@@ -45,9 +45,8 @@ export function workspaceInitials(name: string): string {
|
|
|
45
45
|
/**
|
|
46
46
|
* The top bar's workspace switcher: the workspace's monogram and name, which
|
|
47
47
|
* opens the list of every workspace the user belongs to. It takes the place of
|
|
48
|
-
* the static workspace tag for a host that can move between workspaces
|
|
49
|
-
*
|
|
50
|
-
* keeps the tag.
|
|
48
|
+
* the static workspace tag for a host that can move between workspaces; the
|
|
49
|
+
* web editor is addressed to one workspace by its URL and keeps the tag.
|
|
51
50
|
*
|
|
52
51
|
* It is a menu even with one workspace: the list confirms where you are, and
|
|
53
52
|
* the actions below it still apply.
|
package/src/history.ts
CHANGED
|
@@ -29,7 +29,7 @@ export type DocumentVersion = {
|
|
|
29
29
|
* split MediaApi and FormsApi use: the DS owns the version browser's UI and its
|
|
30
30
|
* (ephemeral) open/selected state, the host owns fetching. Omitting it from
|
|
31
31
|
* ContentBrowser hides the history affordance entirely, which is what a
|
|
32
|
-
* deployment with no provider
|
|
32
|
+
* deployment with no provider (local mode) should look like.
|
|
33
33
|
*/
|
|
34
34
|
export interface HistoryApi {
|
|
35
35
|
/**
|