@copilotz/directory 1.0.0-rc.80 → 1.0.0-rc.82

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 (68) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +9 -68
  3. package/contract.d.ts +1 -8
  4. package/contract.js +1 -8
  5. package/mod.d.ts +2 -67
  6. package/mod.js +2 -122
  7. package/package.json +9 -35
  8. package/web.d.ts +2 -36
  9. package/web.js +2 -57
  10. package/WORDS.md +0 -198
  11. package/actions/code.d.ts +0 -4
  12. package/actions/code.js +0 -135
  13. package/actions/host.d.ts +0 -2
  14. package/actions/host.js +0 -55
  15. package/actions/invite.d.ts +0 -5
  16. package/actions/invite.js +0 -129
  17. package/actions/org.d.ts +0 -10
  18. package/actions/org.js +0 -273
  19. package/collections/credit-code.d.ts +0 -107
  20. package/collections/credit-code.js +0 -28
  21. package/collections/invite.d.ts +0 -74
  22. package/collections/invite.js +0 -20
  23. package/collections/membership.d.ts +0 -65
  24. package/collections/membership.js +0 -22
  25. package/collections/org-host.d.ts +0 -55
  26. package/collections/org-host.js +0 -30
  27. package/collections/org.d.ts +0 -134
  28. package/collections/org.js +0 -58
  29. package/collections/staff.d.ts +0 -35
  30. package/collections/staff.js +0 -12
  31. package/routes/console.d.ts +0 -26
  32. package/routes/console.js +0 -129
  33. package/routes/enter.d.ts +0 -18
  34. package/routes/enter.js +0 -47
  35. package/routes/forward.d.ts +0 -35
  36. package/routes/forward.js +0 -119
  37. package/routes/orgs.d.ts +0 -25
  38. package/routes/orgs.js +0 -113
  39. package/routes/signout.d.ts +0 -11
  40. package/routes/signout.js +0 -36
  41. package/shared/enter.d.ts +0 -36
  42. package/shared/enter.js +0 -82
  43. package/shared/http.d.ts +0 -42
  44. package/shared/http.js +0 -77
  45. package/shared/member.d.ts +0 -21
  46. package/shared/member.js +0 -73
  47. package/shared/settings.d.ts +0 -53
  48. package/shared/settings.js +0 -16
  49. package/shared/state.d.ts +0 -74
  50. package/shared/state.js +0 -101
  51. package/views/web/codes.d.ts +0 -27
  52. package/views/web/codes.js +0 -50
  53. package/views/web/console-codes.d.ts +0 -37
  54. package/views/web/console-codes.js +0 -166
  55. package/views/web/console.d.ts +0 -37
  56. package/views/web/console.js +0 -224
  57. package/views/web/lists.d.ts +0 -48
  58. package/views/web/lists.js +0 -42
  59. package/views/web/org.d.ts +0 -12
  60. package/views/web/org.js +0 -62
  61. package/views/web/orgs.d.ts +0 -148
  62. package/views/web/orgs.js +0 -253
  63. package/views/web/style.d.ts +0 -6
  64. package/views/web/style.js +0 -197
  65. package/views/web/switcher.d.ts +0 -81
  66. package/views/web/switcher.js +0 -367
  67. package/views/web/words.d.ts +0 -10
  68. package/views/web/words.js +0 -206
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2024 Copilotz Contributors
3
+ Copyright (c) 2024 Pairz Contributors
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -1,72 +1,13 @@
1
- # @copilotz/directory
1
+ # @copilotz/directory (deprecated: now @pairz/directory)
2
2
 
3
- Many orgs behind one address, for [Copilotz](https://github.com/copilotzhq/copilotz): who signs in,
4
- which orgs each belongs to, invitations to orgs by email, where each org lives, the hosts orgs
5
- claimed, and platform staff. An app that serves one org doesn't need it.
3
+ Copilotz is now **Pairz**. This package re-exports [`@pairz/directory`](https://pairz.ai) at the same
4
+ version (1.0.0-rc.82), so code that imports `@copilotz/directory` keeps working. It gets no features of its own
5
+ and goes away in 2.0.
6
6
 
7
- ```sh
8
- npm install @copilotz/directory copilotz # Node 24+, Bun
9
- deno add jsr:@copilotz/directory jsr:@copilotz/copilotz
10
- ```
7
+ Move to the new name when you can:
11
8
 
12
- It goes with Copilotz at the same version (they're released together): `@copilotz/directory@x.y.z`
13
- with `copilotz@x.y.z`.
9
+ 1. `npm install @pairz/directory`, and remove `@copilotz/directory`.
10
+ 2. Replace `@copilotz/directory` with `@pairz/directory` in your imports.
14
11
 
15
- The directory is a runtime of its own, in front of every org's: its `fetch` is the app's. It answers
16
- what's its own (signing in, `/orgs`, staff's `/console`) and hands everything else, sockets
17
- included, to the org's runtime, each opened when first used and closed when idle:
18
-
19
- ```ts
20
- import { createRuntime, definePlugin, runtimes } from "copilotz";
21
- import { googleSignIn, identity } from "copilotz/plugins/access";
22
- import { directory } from "@copilotz/directory";
23
-
24
- const dir = await createRuntime({
25
- store,
26
- plugins: [
27
- identity,
28
- googleSignIn,
29
- directory,
30
- definePlugin({
31
- name: "d",
32
- resources: { directory: { staff: ["you@example.com"], orgs, lobby } },
33
- }),
34
- ],
35
- });
36
- const orgs = runtimes(async (id) => {
37
- const org = await dir.query("org.info", { org: id });
38
- return org &&
39
- await createRuntime({ store: storeOf(org), plugins: [...app, directory.member(dir, org)] });
40
- });
41
- Deno.serve(dir.fetch);
42
- ```
43
-
44
- In the browser, `directoryWeb` fills the web shell's `orgs` slot: the org switcher at the top of the
45
- sidebar (on the rail, the sidebar folded, the org's face under the app's mark), going between orgs,
46
- the org's page (`/org`, its sections the `orgSettings` resource's) and staff's console (`/console`).
47
- Without it, the shell has no switcher:
48
-
49
- ```ts
50
- import { directoryWeb } from "@copilotz/directory/web";
51
-
52
- await web({ plugins: [webShell, chatWeb, spacesWeb, directoryWeb], root });
53
- ```
54
-
55
- | Import | What it has |
56
- | ------------------------------ | ---------------------------------------------------------------------------------------------------------- |
57
- | `@copilotz/directory` | `directory` (and `directory.member(dir, org)`, what each org's runtime gets of it) |
58
- | `@copilotz/directory/web` | `directoryWeb`, and the browser half: `useOrgs`, `enterOrg`, `createOrg`, `refreshOrgs`, `consoleOrgs`… |
59
- | `@copilotz/directory/contract` | the browser half, for other plugins' front ends: `useOrgs`, `orgName`, `asStaff`, `type Orgs`, `GiftCode`… |
60
-
61
- Its collections are `org`, `membership`, `invite`, `staff`, `orgHost` and `creditCode`; its cookies,
62
- `dir` (`__Host-dir`), `org` and `s_<org>`. The roles in an org (owner, admin, member, guest) are the
63
- spaces plugin's, in each org. Its front end's words keep the keys they had in the web shell
64
- (`shell.<key>`): see
65
- [WORDS.md](https://github.com/copilotzhq/copilotz/blob/main/packages/directory/WORDS.md).
66
-
67
- Through 1.0.0-rc.32 this was `directory` in `copilotz/plugins/access`, its browser half in
68
- `copilotz/plugins/access/web`, and the switcher was the web shell's own. Its names (collections,
69
- Actions, events, Views, routes, resources) are the same, so an app's data stays as it is: only its
70
- imports change, and the page adds `directoryWeb`. See
71
- [design/plugins.md](https://github.com/copilotzhq/copilotz/blob/main/design/plugins.md) and
72
- [design/tenancy.md](https://github.com/copilotzhq/copilotz/blob/main/design/tenancy.md).
12
+ Your data, sign-ins and the installed computer program are untouched. See the changelog:
13
+ https://github.com/pairzhq/pairz/blob/main/CHANGELOG.md
package/contract.d.ts CHANGED
@@ -1,8 +1 @@
1
- /**
2
- * The directory plugin's contract: what other plugins' front ends use of it
3
- * in the browser, its browser half (views/web/orgs.ts): the person's orgs
4
- * and invitations, going between them, and staff's console. They reach the
5
- * rest over HTTP, at the directory's routes (`/orgs`, `/console/orgs`,
6
- * `/console/codes`). Its own front end (web.tsx) is built on the same.
7
- */
8
- export { answerOrgInvite, arrived, asStaff, type ConsoleOrg, consoleOrgs, createGiftCode, createOrg, currentOrg, deleteOrg, enterOrg, exportOrgUrl, type GiftCode, giftCodes, loadOrgs, moveOrg, type Org, type OrgInvite, orgName, type Orgs, type OrgsState, reenter, refreshOrgs, revokeGiftCode, type Switching, updateOrg, useOrgs, useSwitching, } from "./views/web/orgs.js";
1
+ export * from "@pairz/directory/contract";
package/contract.js CHANGED
@@ -1,8 +1 @@
1
- /**
2
- * The directory plugin's contract: what other plugins' front ends use of it
3
- * in the browser, its browser half (views/web/orgs.ts): the person's orgs
4
- * and invitations, going between them, and staff's console. They reach the
5
- * rest over HTTP, at the directory's routes (`/orgs`, `/console/orgs`,
6
- * `/console/codes`). Its own front end (web.tsx) is built on the same.
7
- */
8
- export { answerOrgInvite, arrived, asStaff, consoleOrgs, createGiftCode, createOrg, currentOrg, deleteOrg, enterOrg, exportOrgUrl, giftCodes, loadOrgs, moveOrg, orgName, reenter, refreshOrgs, revokeGiftCode, updateOrg, useOrgs, useSwitching, } from "./views/web/orgs.js";
1
+ export * from "@pairz/directory/contract";
package/mod.d.ts CHANGED
@@ -1,67 +1,2 @@
1
- /**
2
- * The directory (`@copilotz/directory`), for apps that serve many orgs behind
3
- * one address (see design/tenancy.md): a runtime of its own, beside identity and the ways to
4
- * sign in, in front of every org's. It knows who signs in (the identity
5
- * plugin's people, by their sign-in method), which orgs each belongs to,
6
- * invitations to orgs by email, where each org lives, the hosts orgs claimed
7
- * (a preview's, an app's: `orgHost.resolve` says whose), and platform staff.
8
- * An org's own data (its people's roles, spaces, conversations) lives in the
9
- * org: each is a runtime of its own, opened on its first use and closed when
10
- * idle (the app's `runtimes(open)`, in `directory.orgs`), with
11
- * `directory.member(dir, org)` among its plugins.
12
- *
13
- * Its runtime is the app's `fetch`: its routes answer what's the
14
- * directory's, and hand everything else, untouched, to the org's runtime
15
- * (routes/forward.ts):
16
- *
17
- * - `/o/<org>/…`: that org, by its address (its page's `/connect` and
18
- * socket, its API, its webhooks, its computers);
19
- * - anything else: the org the browser is in (its `org` cookie), going in
20
- * first when a page needs it to; for someone signed in nowhere, the
21
- * lobby (`directory.lobby`: the sign-in page);
22
- * - a host an org claimed (with the app's own named, `hosts`): that
23
- * org's routes by host alone; `GET /__copilotz/hosts/resolve` says whose
24
- * a host is, for the app's front.
25
- *
26
- * Its own: `GET /orgs`, `POST /orgs`, `POST /orgs/enter`, `POST
27
- * /orgs/invites/answer` (routes/orgs.ts), `POST /signout` out of every org
28
- * (routes/signout.ts), and staff's `/console/orgs…` and `/console/codes…`
29
- * (routes/console.ts). People sign in at the directory, with its plugins'
30
- * routes (`/signin/google`, `/signin/dev`); its session is identity's, in the
31
- * `dir` cookie (`__Host-dir` wherever it's Secure); which org a browser is in,
32
- * `org`; each org's session, `s_<org>`. Today's names, so nobody signs in
33
- * again.
34
- *
35
- * ```ts
36
- * import { identity, googleSignIn } from "copilotz/plugins/access";
37
- * import { directory } from "@copilotz/directory";
38
- *
39
- * const dir = await createRuntime({ store, plugins: [identity, googleSignIn, directory,
40
- * definePlugin({ name: "d", resources: {
41
- * directory: { staff: ["you@example.com"], orgs, lobby },
42
- * hosts: { "app.example.com": true },
43
- * } })] });
44
- * const orgs = runtimes(async (id) => {
45
- * const org = await dir.query("org.info", { org: id });
46
- * return org && await createRuntime({ store: storeOf(org), plugins: [...app, directory.member(dir, org)] });
47
- * });
48
- * Deno.serve(dir.fetch);
49
- * ```
50
- */
51
- import { type Plugin } from "copilotz";
52
- import { member } from "./shared/member.js";
53
- export type { Org } from "./collections/org.js";
54
- export type { Membership } from "./collections/membership.js";
55
- export type { Invite } from "./collections/invite.js";
56
- export type { OrgHost } from "./collections/org-host.js";
57
- export type { CreditCode } from "./collections/credit-code.js";
58
- export type { DirectorySettings, Operations, OrgInfo } from "./shared/settings.js";
59
- /**
60
- * The directory plugin, and what each org's runtime gets of it:
61
- * `directory.member(dir, org)` (see shared/member.ts), with the org as
62
- * `org.info` says it.
63
- */
64
- export declare const directory: Plugin & {
65
- member: typeof member;
66
- };
67
- export default directory;
1
+ export * from "@pairz/directory";
2
+ export { default } from "@pairz/directory";
package/mod.js CHANGED
@@ -1,122 +1,2 @@
1
- /**
2
- * The directory (`@copilotz/directory`), for apps that serve many orgs behind
3
- * one address (see design/tenancy.md): a runtime of its own, beside identity and the ways to
4
- * sign in, in front of every org's. It knows who signs in (the identity
5
- * plugin's people, by their sign-in method), which orgs each belongs to,
6
- * invitations to orgs by email, where each org lives, the hosts orgs claimed
7
- * (a preview's, an app's: `orgHost.resolve` says whose), and platform staff.
8
- * An org's own data (its people's roles, spaces, conversations) lives in the
9
- * org: each is a runtime of its own, opened on its first use and closed when
10
- * idle (the app's `runtimes(open)`, in `directory.orgs`), with
11
- * `directory.member(dir, org)` among its plugins.
12
- *
13
- * Its runtime is the app's `fetch`: its routes answer what's the
14
- * directory's, and hand everything else, untouched, to the org's runtime
15
- * (routes/forward.ts):
16
- *
17
- * - `/o/<org>/…`: that org, by its address (its page's `/connect` and
18
- * socket, its API, its webhooks, its computers);
19
- * - anything else: the org the browser is in (its `org` cookie), going in
20
- * first when a page needs it to; for someone signed in nowhere, the
21
- * lobby (`directory.lobby`: the sign-in page);
22
- * - a host an org claimed (with the app's own named, `hosts`): that
23
- * org's routes by host alone; `GET /__copilotz/hosts/resolve` says whose
24
- * a host is, for the app's front.
25
- *
26
- * Its own: `GET /orgs`, `POST /orgs`, `POST /orgs/enter`, `POST
27
- * /orgs/invites/answer` (routes/orgs.ts), `POST /signout` out of every org
28
- * (routes/signout.ts), and staff's `/console/orgs…` and `/console/codes…`
29
- * (routes/console.ts). People sign in at the directory, with its plugins'
30
- * routes (`/signin/google`, `/signin/dev`); its session is identity's, in the
31
- * `dir` cookie (`__Host-dir` wherever it's Secure); which org a browser is in,
32
- * `org`; each org's session, `s_<org>`. Today's names, so nobody signs in
33
- * again.
34
- *
35
- * ```ts
36
- * import { identity, googleSignIn } from "copilotz/plugins/access";
37
- * import { directory } from "@copilotz/directory";
38
- *
39
- * const dir = await createRuntime({ store, plugins: [identity, googleSignIn, directory,
40
- * definePlugin({ name: "d", resources: {
41
- * directory: { staff: ["you@example.com"], orgs, lobby },
42
- * hosts: { "app.example.com": true },
43
- * } })] });
44
- * const orgs = runtimes(async (id) => {
45
- * const org = await dir.query("org.info", { org: id });
46
- * return org && await createRuntime({ store: storeOf(org), plugins: [...app, directory.member(dir, org)] });
47
- * });
48
- * Deno.serve(dir.fetch);
49
- * ```
50
- */
51
- import { definePlugin } from "copilotz";
52
- import { answerInviteRoute, enterOrgRoute, orgsRoute } from "./routes/orgs.js";
53
- import { signOutRoute } from "./routes/signout.js";
54
- import { codesRoute, consoleOrgsRoute, operateRoute, revokeCodeRoute } from "./routes/console.js";
55
- import { addressedRoute, claimedRoute, currentRoute, resolveRoute } from "./routes/forward.js";
56
- import { RESOLVE } from "./shared/http.js";
57
- import { member } from "./shared/member.js";
58
- import { createOrgAction, deleteOrgAction, enterOrgAction, leaveOrgAction, listOrgsAction, myOrgsAction, placeOrgAction, renameOrgAction, reportOrgAction, suspendOrgAction, } from "./actions/org.js";
59
- import { answerInviteAction, cancelInviteAction, myInvitesAction, orgInvitesAction, sendInviteAction, } from "./actions/invite.js";
60
- import { claimHostAction, releaseHostAction } from "./actions/host.js";
61
- import { claimCodeAction, createCodeAction, listCodesAction, revokeCodeAction, } from "./actions/code.js";
62
- import { creditCode } from "./collections/credit-code.js";
63
- import { invite } from "./collections/invite.js";
64
- import { membership } from "./collections/membership.js";
65
- import { org } from "./collections/org.js";
66
- import { orgHost } from "./collections/org-host.js";
67
- import { staff } from "./collections/staff.js";
68
- const plugin = definePlugin({
69
- name: "directory",
70
- requires: ["identity"],
71
- collections: { org, membership, invite, staff, orgHost, creditCode },
72
- actions: {
73
- "org.create": createOrgAction,
74
- "org.mine": myOrgsAction,
75
- "org.enter": enterOrgAction,
76
- "org.leave": leaveOrgAction,
77
- "org.rename": renameOrgAction,
78
- "org.suspend": suspendOrgAction,
79
- "org.report": reportOrgAction,
80
- "org.list": listOrgsAction,
81
- "org.place": placeOrgAction,
82
- "org.delete": deleteOrgAction,
83
- "invite.send": sendInviteAction,
84
- "invite.mine": myInvitesAction,
85
- "invite.org": orgInvitesAction,
86
- "invite.answer": answerInviteAction,
87
- "invite.cancel": cancelInviteAction,
88
- "host.claim": claimHostAction,
89
- "host.release": releaseHostAction,
90
- "code.create": createCodeAction,
91
- "code.claim": claimCodeAction,
92
- "code.list": listCodesAction,
93
- "code.revoke": revokeCodeAction,
94
- },
95
- routes: {
96
- "/orgs": orgsRoute,
97
- "/orgs/enter": enterOrgRoute,
98
- "/orgs/invites/answer": answerInviteRoute,
99
- // Out of every org, in place of identity's own.
100
- "/signout": signOutRoute,
101
- "/console/orgs": consoleOrgsRoute,
102
- "/console/orgs/:org": operateRoute,
103
- "/console/orgs/:org/:what": operateRoute,
104
- "/console/codes": codesRoute,
105
- "/console/codes/revoke": revokeCodeRoute,
106
- [RESOLVE]: resolveRoute,
107
- "/o/:org": addressedRoute,
108
- "/o/:org/*": addressedRoute,
109
- "/*": currentRoute,
110
- // Every host but the app's own (`hosts`): those orgs claimed.
111
- "*://*:*/*": claimedRoute,
112
- },
113
- // Its session is identity's, in today's cookie: `dir` (`__Host-dir` wherever it's Secure).
114
- resources: { cookies: { names: { session: "dir" } } },
115
- });
116
- /**
117
- * The directory plugin, and what each org's runtime gets of it:
118
- * `directory.member(dir, org)` (see shared/member.ts), with the org as
119
- * `org.info` says it.
120
- */
121
- export const directory = Object.assign(plugin, { member });
122
- export default directory;
1
+ export * from "@pairz/directory";
2
+ export { default } from "@pairz/directory";
package/package.json CHANGED
@@ -1,19 +1,17 @@
1
1
  {
2
2
  "name": "@copilotz/directory",
3
- "version": "1.0.0-rc.80",
4
- "description": "Many orgs behind one address: who signs in, which orgs they belong to, and going between them. A Copilotz plugin.",
3
+ "version": "1.0.0-rc.82",
4
+ "description": "Deprecated: Copilotz is now Pairz. This package re-exports @pairz/directory@1.0.0-rc.82; install @pairz/directory instead.",
5
5
  "keywords": [
6
6
  "copilotz",
7
- "agents",
8
- "ai",
9
- "plugin"
7
+ "pairz",
8
+ "deprecated"
10
9
  ],
11
- "homepage": "https://github.com/copilotzhq/copilotz/tree/main/packages/directory#readme",
12
- "bugs": "https://github.com/copilotzhq/copilotz/issues",
10
+ "homepage": "https://pairz.ai",
11
+ "bugs": "https://github.com/pairzhq/pairz/issues",
13
12
  "repository": {
14
13
  "type": "git",
15
- "url": "git+https://github.com/copilotzhq/copilotz.git",
16
- "directory": "packages/directory"
14
+ "url": "git+https://github.com/pairzhq/pairz.git"
17
15
  },
18
16
  "license": "MIT",
19
17
  "type": "module",
@@ -37,31 +35,7 @@
37
35
  },
38
36
  "./package.json": "./package.json"
39
37
  },
40
- "files": [
41
- "LICENSE",
42
- "README.md",
43
- "WORDS.md",
44
- "actions",
45
- "collections",
46
- "contract.d.ts",
47
- "contract.js",
48
- "mod.d.ts",
49
- "mod.js",
50
- "routes",
51
- "shared",
52
- "views",
53
- "web.d.ts",
54
- "web.js"
55
- ],
56
- "dependencies": {},
57
- "peerDependencies": {
58
- "@types/react": "^19.3.0",
59
- "copilotz": "1.0.0-rc.80",
60
- "react": "^19.3.1"
61
- },
62
- "peerDependenciesMeta": {
63
- "@types/react": {
64
- "optional": true
65
- }
38
+ "dependencies": {
39
+ "@pairz/directory": "1.0.0-rc.82"
66
40
  }
67
41
  }
package/web.d.ts CHANGED
@@ -1,36 +1,2 @@
1
- /**
2
- * The directory's web front end, for apps that serve many orgs behind one
3
- * address: it fills the web shell's `orgs` slot, and draws the org's pages.
4
- * Add it beside the web shell's, in the browser; without it, the shell has no
5
- * org switcher.
6
- *
7
- * - **The switcher** (`orgs.switcher`), at the top of the sidebar beside the
8
- * app's mark: the org you're in and your standing there; opened, your orgs
9
- * (Personal first), invitations to join or decline in place, a new org, the
10
- * org's settings, and for staff, every org. On the rail, the sidebar folded
11
- * (`orgs.rail`), the org's face under the app's mark, opening the same.
12
- * - **Beside every page** (`orgs.overlay`): the dialog that makes an org, the
13
- * short transition while the page goes into another and the word once it's
14
- * there, and, while in an org as platform staff, a line along the top.
15
- * - **The shell's menu and palette** (`useShellOrgs`, the slot's hook): the
16
- * person's email, the org's page and (for staff) every org, and orgs to
17
- * switch to, invitations and a new org in the palette.
18
- * - **The org's page** (`org`, at `/org`): its name, your standing, and the
19
- * sections front ends add (the shell's `orgSettings` resource: spaces'
20
- * About and Members, usage's Usage), each for the roles it names.
21
- * - **Staff's console** (`console`, at `/console`): every org, to enter,
22
- * rename, suspend, move, export or delete, and gift codes of credits.
23
- *
24
- * Its browser half (`useOrgs`, `enterOrg`, `refreshOrgs`…) is here too, and in
25
- * its contract.ts for other plugins' front ends. Its words keep the keys they
26
- * had in the shell (`shell.<key>`; see views/web/words.ts).
27
- *
28
- * ```ts
29
- * await web({ plugins: [webShell, chatWeb, spacesWeb, directoryWeb], root });
30
- * ```
31
- */
32
- import { type Plugin } from "copilotz";
33
- export * from "./views/web/orgs.js";
34
- export { openNewOrg, useShellOrgs } from "./views/web/switcher.js";
35
- export declare const directoryWeb: Plugin;
36
- export default directoryWeb;
1
+ export * from "@pairz/directory/web";
2
+ export { default } from "@pairz/directory/web";
package/web.js CHANGED
@@ -1,57 +1,2 @@
1
- /**
2
- * The directory's web front end, for apps that serve many orgs behind one
3
- * address: it fills the web shell's `orgs` slot, and draws the org's pages.
4
- * Add it beside the web shell's, in the browser; without it, the shell has no
5
- * org switcher.
6
- *
7
- * - **The switcher** (`orgs.switcher`), at the top of the sidebar beside the
8
- * app's mark: the org you're in and your standing there; opened, your orgs
9
- * (Personal first), invitations to join or decline in place, a new org, the
10
- * org's settings, and for staff, every org. On the rail, the sidebar folded
11
- * (`orgs.rail`), the org's face under the app's mark, opening the same.
12
- * - **Beside every page** (`orgs.overlay`): the dialog that makes an org, the
13
- * short transition while the page goes into another and the word once it's
14
- * there, and, while in an org as platform staff, a line along the top.
15
- * - **The shell's menu and palette** (`useShellOrgs`, the slot's hook): the
16
- * person's email, the org's page and (for staff) every org, and orgs to
17
- * switch to, invitations and a new org in the palette.
18
- * - **The org's page** (`org`, at `/org`): its name, your standing, and the
19
- * sections front ends add (the shell's `orgSettings` resource: spaces'
20
- * About and Members, usage's Usage), each for the roles it names.
21
- * - **Staff's console** (`console`, at `/console`): every org, to enter,
22
- * rename, suspend, move, export or delete, and gift codes of credits.
23
- *
24
- * Its browser half (`useOrgs`, `enterOrg`, `refreshOrgs`…) is here too, and in
25
- * its contract.ts for other plugins' front ends. Its words keep the keys they
26
- * had in the shell (`shell.<key>`; see views/web/words.ts).
27
- *
28
- * ```ts
29
- * await web({ plugins: [webShell, chatWeb, spacesWeb, directoryWeb], root });
30
- * ```
31
- */
32
- import { definePlugin } from "copilotz";
33
- import { consoleView } from "./views/web/console.js";
34
- import { orgView } from "./views/web/org.js";
35
- import { overlayView, switcherRailView, switcherView, useShellOrgs, } from "./views/web/switcher.js";
36
- export * from "./views/web/orgs.js";
37
- export { openNewOrg, useShellOrgs } from "./views/web/switcher.js";
38
- export const directoryWeb = definePlugin({
39
- name: "directory-web",
40
- requires: ["web-shell"],
41
- views: {
42
- "orgs.switcher": switcherView,
43
- "orgs.rail": switcherRailView,
44
- "orgs.overlay": overlayView,
45
- org: orgView,
46
- console: consoleView,
47
- },
48
- resources: {
49
- orgs: {
50
- switcher: "orgs.switcher",
51
- rail: "orgs.rail",
52
- overlay: "orgs.overlay",
53
- use: useShellOrgs,
54
- },
55
- },
56
- });
57
- export default directoryWeb;
1
+ export * from "@pairz/directory/web";
2
+ export { default } from "@pairz/directory/web";