@copilotz/directory 0.0.0-stage → 1.0.0-rc.34
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/LICENSE +21 -0
- package/README.md +70 -2
- package/WORDS.md +197 -0
- package/actions/code.d.ts +4 -0
- package/actions/code.js +135 -0
- package/actions/host.d.ts +2 -0
- package/actions/host.js +55 -0
- package/actions/invite.d.ts +5 -0
- package/actions/invite.js +129 -0
- package/actions/org.d.ts +10 -0
- package/actions/org.js +273 -0
- package/collections/credit-code.d.ts +114 -0
- package/collections/credit-code.js +28 -0
- package/collections/invite.d.ts +81 -0
- package/collections/invite.js +20 -0
- package/collections/membership.d.ts +72 -0
- package/collections/membership.js +22 -0
- package/collections/org-host.d.ts +62 -0
- package/collections/org-host.js +30 -0
- package/collections/org.d.ts +141 -0
- package/collections/org.js +58 -0
- package/collections/staff.d.ts +42 -0
- package/collections/staff.js +12 -0
- package/contract.d.ts +8 -0
- package/contract.js +8 -0
- package/mod.d.ts +67 -0
- package/mod.js +122 -0
- package/package.json +65 -4
- package/routes/console.d.ts +26 -0
- package/routes/console.js +129 -0
- package/routes/enter.d.ts +18 -0
- package/routes/enter.js +47 -0
- package/routes/forward.d.ts +35 -0
- package/routes/forward.js +119 -0
- package/routes/orgs.d.ts +25 -0
- package/routes/orgs.js +113 -0
- package/routes/signout.d.ts +11 -0
- package/routes/signout.js +36 -0
- package/shared/enter.d.ts +36 -0
- package/shared/enter.js +82 -0
- package/shared/http.d.ts +42 -0
- package/shared/http.js +77 -0
- package/shared/member.d.ts +21 -0
- package/shared/member.js +73 -0
- package/shared/settings.d.ts +53 -0
- package/shared/settings.js +16 -0
- package/shared/state.d.ts +74 -0
- package/shared/state.js +101 -0
- package/views/web/codes.d.ts +27 -0
- package/views/web/codes.js +50 -0
- package/views/web/console-codes.d.ts +37 -0
- package/views/web/console-codes.js +166 -0
- package/views/web/console.d.ts +37 -0
- package/views/web/console.js +224 -0
- package/views/web/lists.d.ts +48 -0
- package/views/web/lists.js +42 -0
- package/views/web/org.d.ts +12 -0
- package/views/web/org.js +62 -0
- package/views/web/orgs.d.ts +148 -0
- package/views/web/orgs.js +253 -0
- package/views/web/style.d.ts +6 -0
- package/views/web/style.js +196 -0
- package/views/web/switcher.d.ts +72 -0
- package/views/web/switcher.js +354 -0
- package/views/web/words.d.ts +10 -0
- package/views/web/words.js +201 -0
- package/web.d.ts +35 -0
- package/web.js +50 -0
package/web.d.ts
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
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.
|
|
11
|
+
* - **Beside every page** (`orgs.overlay`): the dialog that makes an org, the
|
|
12
|
+
* short transition while the page goes into another and the word once it's
|
|
13
|
+
* there, and, while in an org as platform staff, a line along the top.
|
|
14
|
+
* - **The shell's menu and palette** (`useShellOrgs`, the slot's hook): the
|
|
15
|
+
* person's email, the org's page and (for staff) every org, and orgs to
|
|
16
|
+
* switch to, invitations and a new org in the palette.
|
|
17
|
+
* - **The org's page** (`org`, at `/org`): its name, your standing, and the
|
|
18
|
+
* sections front ends add (the shell's `orgSettings` resource: spaces'
|
|
19
|
+
* About and Members, usage's Usage), each for the roles it names.
|
|
20
|
+
* - **Staff's console** (`console`, at `/console`): every org, to enter,
|
|
21
|
+
* rename, suspend, move, export or delete, and gift codes of credits.
|
|
22
|
+
*
|
|
23
|
+
* Its browser half (`useOrgs`, `enterOrg`, `refreshOrgs`…) is here too, and in
|
|
24
|
+
* its contract.ts for other plugins' front ends. Its words keep the keys they
|
|
25
|
+
* had in the shell (`shell.<key>`; see views/web/words.ts).
|
|
26
|
+
*
|
|
27
|
+
* ```ts
|
|
28
|
+
* await web({ plugins: [webShell, chatWeb, spacesWeb, directoryWeb], root });
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
import { type Plugin } from "copilotz";
|
|
32
|
+
export * from "./views/web/orgs.js";
|
|
33
|
+
export { openNewOrg, useShellOrgs } from "./views/web/switcher.js";
|
|
34
|
+
export declare const directoryWeb: Plugin;
|
|
35
|
+
export default directoryWeb;
|
package/web.js
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
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.
|
|
11
|
+
* - **Beside every page** (`orgs.overlay`): the dialog that makes an org, the
|
|
12
|
+
* short transition while the page goes into another and the word once it's
|
|
13
|
+
* there, and, while in an org as platform staff, a line along the top.
|
|
14
|
+
* - **The shell's menu and palette** (`useShellOrgs`, the slot's hook): the
|
|
15
|
+
* person's email, the org's page and (for staff) every org, and orgs to
|
|
16
|
+
* switch to, invitations and a new org in the palette.
|
|
17
|
+
* - **The org's page** (`org`, at `/org`): its name, your standing, and the
|
|
18
|
+
* sections front ends add (the shell's `orgSettings` resource: spaces'
|
|
19
|
+
* About and Members, usage's Usage), each for the roles it names.
|
|
20
|
+
* - **Staff's console** (`console`, at `/console`): every org, to enter,
|
|
21
|
+
* rename, suspend, move, export or delete, and gift codes of credits.
|
|
22
|
+
*
|
|
23
|
+
* Its browser half (`useOrgs`, `enterOrg`, `refreshOrgs`…) is here too, and in
|
|
24
|
+
* its contract.ts for other plugins' front ends. Its words keep the keys they
|
|
25
|
+
* had in the shell (`shell.<key>`; see views/web/words.ts).
|
|
26
|
+
*
|
|
27
|
+
* ```ts
|
|
28
|
+
* await web({ plugins: [webShell, chatWeb, spacesWeb, directoryWeb], root });
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
import { definePlugin } from "copilotz";
|
|
32
|
+
import { consoleView } from "./views/web/console.js";
|
|
33
|
+
import { orgView } from "./views/web/org.js";
|
|
34
|
+
import { overlayView, switcherView, useShellOrgs } from "./views/web/switcher.js";
|
|
35
|
+
export * from "./views/web/orgs.js";
|
|
36
|
+
export { openNewOrg, useShellOrgs } from "./views/web/switcher.js";
|
|
37
|
+
export const directoryWeb = definePlugin({
|
|
38
|
+
name: "directory-web",
|
|
39
|
+
requires: ["web-shell"],
|
|
40
|
+
views: {
|
|
41
|
+
"orgs.switcher": switcherView,
|
|
42
|
+
"orgs.overlay": overlayView,
|
|
43
|
+
org: orgView,
|
|
44
|
+
console: consoleView,
|
|
45
|
+
},
|
|
46
|
+
resources: {
|
|
47
|
+
orgs: { switcher: "orgs.switcher", overlay: "orgs.overlay", use: useShellOrgs },
|
|
48
|
+
},
|
|
49
|
+
});
|
|
50
|
+
export default directoryWeb;
|