@cloudgrid-io/ui 0.31.4 → 0.31.5
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 +32 -0
- package/dist/badge/brand.d.ts +8 -0
- package/dist/badge/brand.d.ts.map +1 -0
- package/dist/badge/brand.js +22 -0
- package/dist/badge/brand.js.map +1 -0
- package/dist/badge/css-base.d.ts +25 -0
- package/dist/badge/css-base.d.ts.map +1 -0
- package/dist/badge/css-base.js +103 -0
- package/dist/badge/css-base.js.map +1 -0
- package/dist/badge/css-owner.d.ts +7 -0
- package/dist/badge/css-owner.d.ts.map +1 -0
- package/dist/badge/css-owner.js +128 -0
- package/dist/badge/css-owner.js.map +1 -0
- package/dist/badge/css-visitor.d.ts +7 -0
- package/dist/badge/css-visitor.d.ts.map +1 -0
- package/dist/badge/css-visitor.js +75 -0
- package/dist/badge/css-visitor.js.map +1 -0
- package/dist/badge/html.d.ts +26 -0
- package/dist/badge/html.d.ts.map +1 -0
- package/dist/badge/html.js +55 -0
- package/dist/badge/html.js.map +1 -0
- package/dist/badge/index.d.ts +43 -0
- package/dist/badge/index.d.ts.map +1 -0
- package/dist/badge/index.js +46 -0
- package/dist/badge/index.js.map +1 -0
- package/dist/badge/marks.d.ts +45 -0
- package/dist/badge/marks.d.ts.map +1 -0
- package/dist/badge/marks.js +126 -0
- package/dist/badge/marks.js.map +1 -0
- package/dist/badge/owner.d.ts +213 -0
- package/dist/badge/owner.d.ts.map +1 -0
- package/dist/badge/owner.js +309 -0
- package/dist/badge/owner.js.map +1 -0
- package/dist/badge/palette.d.ts +23 -0
- package/dist/badge/palette.d.ts.map +1 -0
- package/dist/badge/palette.js +86 -0
- package/dist/badge/palette.js.map +1 -0
- package/dist/badge/root.d.ts +24 -0
- package/dist/badge/root.d.ts.map +1 -0
- package/dist/badge/root.js +11 -0
- package/dist/badge/root.js.map +1 -0
- package/dist/badge/shared.d.ts +56 -0
- package/dist/badge/shared.d.ts.map +1 -0
- package/dist/badge/shared.js +53 -0
- package/dist/badge/shared.js.map +1 -0
- package/dist/badge/visitor.d.ts +96 -0
- package/dist/badge/visitor.d.ts.map +1 -0
- package/dist/badge/visitor.js +119 -0
- package/dist/badge/visitor.js.map +1 -0
- package/dist/blocks/entity-status.d.ts +44 -1
- package/dist/blocks/entity-status.d.ts.map +1 -1
- package/dist/blocks/entity-status.js +26 -1
- package/dist/blocks/entity-status.js.map +1 -1
- package/dist/blocks/expiry-notice.d.ts +86 -0
- package/dist/blocks/expiry-notice.d.ts.map +1 -0
- package/dist/blocks/expiry-notice.js +81 -0
- package/dist/blocks/expiry-notice.js.map +1 -0
- package/dist/blocks/icons.d.ts +22 -0
- package/dist/blocks/icons.d.ts.map +1 -1
- package/dist/blocks/icons.js +22 -0
- package/dist/blocks/icons.js.map +1 -1
- package/dist/blocks/notification-row.d.ts +88 -0
- package/dist/blocks/notification-row.d.ts.map +1 -0
- package/dist/blocks/notification-row.js +32 -0
- package/dist/blocks/notification-row.js.map +1 -0
- package/dist/blocks/phosphor-marks.d.ts +10 -0
- package/dist/blocks/phosphor-marks.d.ts.map +1 -1
- package/dist/blocks/phosphor-marks.js +15 -0
- package/dist/blocks/phosphor-marks.js.map +1 -1
- package/dist/brand/badge/manrope-latin-wght-normal.woff2 +0 -0
- package/dist/brand/badge/space-grotesk-latin-wght-normal.woff2 +0 -0
- package/dist/brand/email/headline-activity.png +0 -0
- package/dist/brand/email/headline-expired.png +0 -0
- package/dist/brand/email/headline-expires-tomorrow.png +0 -0
- package/dist/brand/email/headline-expiring-soon.png +0 -0
- package/dist/brand/email/headline-invited.png +0 -0
- package/dist/brand/email/headline-sign-in-code.png +0 -0
- package/dist/brand/email/mesh.png +0 -0
- package/dist/brand/email/wordmark.png +0 -0
- package/dist/email/assets.d.ts +50 -0
- package/dist/email/assets.d.ts.map +1 -0
- package/dist/email/assets.js +16 -0
- package/dist/email/assets.js.map +1 -0
- package/dist/email/index.d.ts +204 -0
- package/dist/email/index.d.ts.map +1 -0
- package/dist/email/index.js +429 -0
- package/dist/email/index.js.map +1 -0
- package/dist/email/palette.d.ts +40 -0
- package/dist/email/palette.d.ts.map +1 -0
- package/dist/email/palette.js +44 -0
- package/dist/email/palette.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/ui/dropdown-menu.d.ts +8 -1
- package/dist/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/ui/dropdown-menu.js +9 -2
- package/dist/ui/dropdown-menu.js.map +1 -1
- package/package.json +17 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/badge/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAMH,cAAc,cAAc,CAAA;AAC5B,cAAc,YAAY,CAAA;AAC1B,cAAc,YAAY,CAAA;AAC1B,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,aAAa,EAAE,wBAAwB,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AACvH,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,iBAAiB,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAEtG,qDAAqD;AACrD,eAAO,MAAM,SAAS,EAAE,MAA6D,CAAA"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* THE ON-PAGE BADGE'S LOOK, FRAMEWORK-FREE (ui#299).
|
|
3
|
+
*
|
|
4
|
+
* The platform's badge (`packages/badge`) is vanilla TypeScript in a closed
|
|
5
|
+
* shadow root, running inside other people's apps. It builds from this module
|
|
6
|
+
* as a devDependency, inlined at build time, so there is no runtime dependency
|
|
7
|
+
* and no React anywhere in the badge's path. This module supplies:
|
|
8
|
+
*
|
|
9
|
+
* the stylesheet `BADGE_BASE_CSS`, `BADGE_VISITOR_CSS`, `BADGE_OWNER_CSS`,
|
|
10
|
+
* strings for a `<style>` in the shadow root, generated from
|
|
11
|
+
* the library's tokens (`palette.ts`)
|
|
12
|
+
* the markup builders that return HTML strings: the owner tab and panel
|
|
13
|
+
* (main, edit, share), the feedback bubble and panel, the
|
|
14
|
+
* sign-in step, and the Select, switch and `PromptBlock`
|
|
15
|
+
* looks they use
|
|
16
|
+
* the glyphs Phosphor path data, generated with the library's marks
|
|
17
|
+
* the type the two family stacks and the font files the badge needs;
|
|
18
|
+
* the platform hosts and registers the files, this module
|
|
19
|
+
* never loads a font
|
|
20
|
+
*
|
|
21
|
+
* ```ts
|
|
22
|
+
* import { BADGE_BASE_CSS, BADGE_VISITOR_CSS, badgeRoot, bubble } from "@cloudgrid-io/ui/badge/visitor"
|
|
23
|
+
* shadow.innerHTML = `<style>${BADGE_BASE_CSS}${BADGE_VISITOR_CSS}</style>` + badgeRoot(bubble())
|
|
24
|
+
* ```
|
|
25
|
+
*
|
|
26
|
+
* Three entries, so each of the badge's two files takes only its half:
|
|
27
|
+
* `@cloudgrid-io/ui/badge/visitor` for the main file (25 KB gzip budget),
|
|
28
|
+
* `@cloudgrid-io/ui/badge/owner` for the owner file it lazy-loads, and this one,
|
|
29
|
+
* which carries both. Every export is side-effect free and every glyph is its
|
|
30
|
+
* own export, so a bundler keeps only what a file draws.
|
|
31
|
+
*
|
|
32
|
+
* Behaviour is the badge's. Each control carries a `data-action` and the ARIA
|
|
33
|
+
* state the badge keeps in step, so one delegated listener per panel is enough
|
|
34
|
+
* and the first paint is already correct.
|
|
35
|
+
*/
|
|
36
|
+
import { BADGE_BASE_CSS } from "./css-base.js";
|
|
37
|
+
import { BADGE_OWNER_CSS } from "./css-owner.js";
|
|
38
|
+
import { BADGE_VISITOR_CSS } from "./css-visitor.js";
|
|
39
|
+
export * from "./visitor.js";
|
|
40
|
+
export * from "./owner.js";
|
|
41
|
+
export * from "./marks.js";
|
|
42
|
+
export { BADGE_FONT_BODY, BADGE_FONT_FACES, BADGE_FONT_UI, BADGE_TOKEN_DECLARATIONS, BADGE_TOKENS } from "./palette.js";
|
|
43
|
+
export { WORDMARK_PATHS, SIGN_BOX, SIGN_GLYPH_OFFSET, SIGN_GLYPH_PATH, SIGN_RADIUS } from "./brand.js";
|
|
44
|
+
/** The whole stylesheet: base, visitor and owner. */
|
|
45
|
+
export const BADGE_CSS = BADGE_BASE_CSS + BADGE_VISITOR_CSS + BADGE_OWNER_CSS;
|
|
46
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/badge/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAEpD,cAAc,cAAc,CAAA;AAC5B,cAAc,YAAY,CAAA;AAC1B,cAAc,YAAY,CAAA;AAC1B,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,aAAa,EAAE,wBAAwB,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AACvH,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,iBAAiB,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAEtG,qDAAqD;AACrD,MAAM,CAAC,MAAM,SAAS,GAAW,cAAc,GAAG,iBAAiB,GAAG,eAAe,CAAA"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/** Phosphor `thumbs-up`, regular. */
|
|
2
|
+
export declare const THUMBS_UP: readonly string[];
|
|
3
|
+
/** Phosphor `thumbs-down`, regular. */
|
|
4
|
+
export declare const THUMBS_DOWN: readonly string[];
|
|
5
|
+
/** Phosphor `wrench`, regular. */
|
|
6
|
+
export declare const WRENCH: readonly string[];
|
|
7
|
+
/** Phosphor `chat-circle`, regular. */
|
|
8
|
+
export declare const CHAT_CIRCLE: readonly string[];
|
|
9
|
+
/** Phosphor `lightbulb-filament`, regular. */
|
|
10
|
+
export declare const LIGHTBULB_FILAMENT: readonly string[];
|
|
11
|
+
/** Phosphor `rocket-launch`, regular. */
|
|
12
|
+
export declare const ROCKET_LAUNCH: readonly string[];
|
|
13
|
+
/** Phosphor `bug`, regular. */
|
|
14
|
+
export declare const BUG: readonly string[];
|
|
15
|
+
/** Phosphor `arrow-up-right`, regular. */
|
|
16
|
+
export declare const ARROW_UP_RIGHT: readonly string[];
|
|
17
|
+
/** Phosphor `caret-down`, regular. */
|
|
18
|
+
export declare const CARET_DOWN: readonly string[];
|
|
19
|
+
/** Phosphor `caret-left`, regular. */
|
|
20
|
+
export declare const CARET_LEFT: readonly string[];
|
|
21
|
+
/** Phosphor `chart-line-up`, regular. */
|
|
22
|
+
export declare const CHART_LINE_UP: readonly string[];
|
|
23
|
+
/** Phosphor `check`, regular. */
|
|
24
|
+
export declare const CHECK: readonly string[];
|
|
25
|
+
/** Phosphor `check-circle`, regular. */
|
|
26
|
+
export declare const CHECK_CIRCLE: readonly string[];
|
|
27
|
+
/** Phosphor `copy`, regular. */
|
|
28
|
+
export declare const COPY: readonly string[];
|
|
29
|
+
/** Phosphor `globe`, regular. */
|
|
30
|
+
export declare const GLOBE: readonly string[];
|
|
31
|
+
/** Phosphor `lock-simple`, regular. */
|
|
32
|
+
export declare const LOCK_SIMPLE: readonly string[];
|
|
33
|
+
/** Phosphor `pencil-simple`, regular. */
|
|
34
|
+
export declare const PENCIL_SIMPLE: readonly string[];
|
|
35
|
+
/** Phosphor `users`, regular. */
|
|
36
|
+
export declare const USERS: readonly string[];
|
|
37
|
+
/** Phosphor `x`, regular. */
|
|
38
|
+
export declare const X: readonly string[];
|
|
39
|
+
/** Phosphor `share-network`, regular. */
|
|
40
|
+
export declare const SHARE_NETWORK: readonly string[];
|
|
41
|
+
/** Phosphor `google-logo`, regular. */
|
|
42
|
+
export declare const GOOGLE_LOGO: readonly string[];
|
|
43
|
+
/** Where each glyph above came from. Read by the tests and the gallery, not by the badge. */
|
|
44
|
+
export declare const BADGE_MARK_SOURCES: Record<string, string>;
|
|
45
|
+
//# sourceMappingURL=marks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"marks.d.ts","sourceRoot":"","sources":["../../src/badge/marks.ts"],"names":[],"mappings":"AAkBA,qCAAqC;AACrC,eAAO,MAAM,SAAS,EAAE,SAAS,MAAM,EAEtC,CAAA;AAED,uCAAuC;AACvC,eAAO,MAAM,WAAW,EAAE,SAAS,MAAM,EAExC,CAAA;AAED,kCAAkC;AAClC,eAAO,MAAM,MAAM,EAAE,SAAS,MAAM,EAEnC,CAAA;AAED,uCAAuC;AACvC,eAAO,MAAM,WAAW,EAAE,SAAS,MAAM,EAExC,CAAA;AAED,8CAA8C;AAC9C,eAAO,MAAM,kBAAkB,EAAE,SAAS,MAAM,EAE/C,CAAA;AAED,yCAAyC;AACzC,eAAO,MAAM,aAAa,EAAE,SAAS,MAAM,EAE1C,CAAA;AAED,+BAA+B;AAC/B,eAAO,MAAM,GAAG,EAAE,SAAS,MAAM,EAEhC,CAAA;AAED,0CAA0C;AAC1C,eAAO,MAAM,cAAc,EAAE,SAAS,MAAM,EAE3C,CAAA;AAED,sCAAsC;AACtC,eAAO,MAAM,UAAU,EAAE,SAAS,MAAM,EAEvC,CAAA;AAED,sCAAsC;AACtC,eAAO,MAAM,UAAU,EAAE,SAAS,MAAM,EAEvC,CAAA;AAED,yCAAyC;AACzC,eAAO,MAAM,aAAa,EAAE,SAAS,MAAM,EAE1C,CAAA;AAED,iCAAiC;AACjC,eAAO,MAAM,KAAK,EAAE,SAAS,MAAM,EAElC,CAAA;AAED,wCAAwC;AACxC,eAAO,MAAM,YAAY,EAAE,SAAS,MAAM,EAEzC,CAAA;AAED,gCAAgC;AAChC,eAAO,MAAM,IAAI,EAAE,SAAS,MAAM,EAEjC,CAAA;AAED,iCAAiC;AACjC,eAAO,MAAM,KAAK,EAAE,SAAS,MAAM,EAElC,CAAA;AAED,uCAAuC;AACvC,eAAO,MAAM,WAAW,EAAE,SAAS,MAAM,EAExC,CAAA;AAED,yCAAyC;AACzC,eAAO,MAAM,aAAa,EAAE,SAAS,MAAM,EAE1C,CAAA;AAED,iCAAiC;AACjC,eAAO,MAAM,KAAK,EAAE,SAAS,MAAM,EAElC,CAAA;AAED,6BAA6B;AAC7B,eAAO,MAAM,CAAC,EAAE,SAAS,MAAM,EAE9B,CAAA;AAED,yCAAyC;AACzC,eAAO,MAAM,aAAa,EAAE,SAAS,MAAM,EAE1C,CAAA;AAED,uCAAuC;AACvC,eAAO,MAAM,WAAW,EAAE,SAAS,MAAM,EAExC,CAAA;AAED,6FAA6F;AAC7F,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAsBrD,CAAA"}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
// GENERATED by scripts/generate-phosphor-marks.mjs — do not hand-edit.
|
|
2
|
+
//
|
|
3
|
+
// The on-page badge's glyphs as plain path data, for a framework-free consumer
|
|
4
|
+
// (#299). Each is the same Phosphor asset, read by the same code, as the library
|
|
5
|
+
// mark of the same slug in blocks/phosphor-marks.tsx; the generator refuses a
|
|
6
|
+
// slug the library does not already carry. Draw one inside
|
|
7
|
+
// `<svg viewBox="0 0 256 256" fill="currentColor">`.
|
|
8
|
+
//
|
|
9
|
+
// Source: @phosphor-icons/core (MIT), read programmatically.
|
|
10
|
+
//
|
|
11
|
+
// Copyright (c) 2023 Phosphor Icons
|
|
12
|
+
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
13
|
+
// of this software and associated documentation files (the "Software"), to deal
|
|
14
|
+
// in the Software without restriction. The above copyright notice and this
|
|
15
|
+
// permission notice shall be included in all copies.
|
|
16
|
+
//
|
|
17
|
+
// One export per glyph, so a bundle keeps only what it draws.
|
|
18
|
+
/** Phosphor `thumbs-up`, regular. */
|
|
19
|
+
export const THUMBS_UP = [
|
|
20
|
+
"M234,80.12A24,24,0,0,0,216,72H160V56a40,40,0,0,0-40-40,8,8,0,0,0-7.16,4.42L75.06,96H32a16,16,0,0,0-16,16v88a16,16,0,0,0,16,16H204a24,24,0,0,0,23.82-21l12-96A24,24,0,0,0,234,80.12ZM32,112H72v88H32ZM223.94,97l-12,96a8,8,0,0,1-7.94,7H88V105.89l36.71-73.43A24,24,0,0,1,144,56V80a8,8,0,0,0,8,8h64a8,8,0,0,1,7.94,9Z"
|
|
21
|
+
];
|
|
22
|
+
/** Phosphor `thumbs-down`, regular. */
|
|
23
|
+
export const THUMBS_DOWN = [
|
|
24
|
+
"M239.82,157l-12-96A24,24,0,0,0,204,40H32A16,16,0,0,0,16,56v88a16,16,0,0,0,16,16H75.06l37.78,75.58A8,8,0,0,0,120,240a40,40,0,0,0,40-40V184h56a24,24,0,0,0,23.82-27ZM72,144H32V56H72Zm150,21.29a7.88,7.88,0,0,1-6,2.71H152a8,8,0,0,0-8,8v24a24,24,0,0,1-19.29,23.54L88,150.11V56H204a8,8,0,0,1,7.94,7l12,96A7.87,7.87,0,0,1,222,165.29Z"
|
|
25
|
+
];
|
|
26
|
+
/** Phosphor `wrench`, regular. */
|
|
27
|
+
export const WRENCH = [
|
|
28
|
+
"M226.76,69a8,8,0,0,0-12.84-2.88l-40.3,37.19-17.23-3.7-3.7-17.23,37.19-40.3A8,8,0,0,0,187,29.24,72,72,0,0,0,88,96,72.34,72.34,0,0,0,94,124.94L33.79,177c-.15.12-.29.26-.43.39a32,32,0,0,0,45.26,45.26c.13-.13.27-.28.39-.42L131.06,162A72,72,0,0,0,232,96,71.56,71.56,0,0,0,226.76,69ZM160,152a56.14,56.14,0,0,1-27.07-7,8,8,0,0,0-9.92,1.77L67.11,211.51a16,16,0,0,1-22.62-22.62L109.18,133a8,8,0,0,0,1.77-9.93,56,56,0,0,1,58.36-82.31l-31.2,33.81a8,8,0,0,0-1.94,7.1L141.83,108a8,8,0,0,0,6.14,6.14l26.35,5.66a8,8,0,0,0,7.1-1.94l33.81-31.2A56.06,56.06,0,0,1,160,152Z"
|
|
29
|
+
];
|
|
30
|
+
/** Phosphor `chat-circle`, regular. */
|
|
31
|
+
export const CHAT_CIRCLE = [
|
|
32
|
+
"M128,24A104,104,0,0,0,36.18,176.88L24.83,210.93a16,16,0,0,0,20.24,20.24l34.05-11.35A104,104,0,1,0,128,24Zm0,192a87.87,87.87,0,0,1-44.06-11.81,8,8,0,0,0-6.54-.67L40,216,52.47,178.6a8,8,0,0,0-.66-6.54A88,88,0,1,1,128,216Z"
|
|
33
|
+
];
|
|
34
|
+
/** Phosphor `lightbulb-filament`, regular. */
|
|
35
|
+
export const LIGHTBULB_FILAMENT = [
|
|
36
|
+
"M176,232a8,8,0,0,1-8,8H88a8,8,0,0,1,0-16h80A8,8,0,0,1,176,232Zm40-128a87.55,87.55,0,0,1-33.64,69.21A16.24,16.24,0,0,0,176,186v6a16,16,0,0,1-16,16H96a16,16,0,0,1-16-16v-6a16,16,0,0,0-6.23-12.66A87.59,87.59,0,0,1,40,104.5C39.74,56.83,78.26,17.15,125.88,16A88,88,0,0,1,216,104Zm-16,0a72,72,0,0,0-73.74-72c-39,.92-70.47,33.39-70.26,72.39a71.64,71.64,0,0,0,27.64,56.3h0A32,32,0,0,1,96,186v6h24V147.31L90.34,117.66a8,8,0,0,1,11.32-11.32L128,132.69l26.34-26.35a8,8,0,0,1,11.32,11.32L136,147.31V192h24v-6a32.12,32.12,0,0,1,12.47-25.35A71.65,71.65,0,0,0,200,104Z"
|
|
37
|
+
];
|
|
38
|
+
/** Phosphor `rocket-launch`, regular. */
|
|
39
|
+
export const ROCKET_LAUNCH = [
|
|
40
|
+
"M223.85,47.12a16,16,0,0,0-15-15c-12.58-.75-44.73.4-71.41,27.07L132.69,64H74.36A15.91,15.91,0,0,0,63,68.68L28.7,103a16,16,0,0,0,9.07,27.16l38.47,5.37,44.21,44.21,5.37,38.49a15.94,15.94,0,0,0,10.78,12.92,16.11,16.11,0,0,0,5.1.83A15.91,15.91,0,0,0,153,227.3L187.32,193A15.91,15.91,0,0,0,192,181.64V123.31l4.77-4.77C223.45,91.86,224.6,59.71,223.85,47.12ZM74.36,80h42.33L77.16,119.52,40,114.34Zm74.41-9.45a76.65,76.65,0,0,1,59.11-22.47,76.46,76.46,0,0,1-22.42,59.16L128,164.68,91.32,128ZM176,181.64,141.67,216l-5.19-37.17L176,139.31Zm-74.16,9.5C97.34,201,82.29,224,40,224a8,8,0,0,1-8-8c0-42.29,23-57.34,32.86-61.85a8,8,0,0,1,6.64,14.56c-6.43,2.93-20.62,12.36-23.12,38.91,26.55-2.5,36-16.69,38.91-23.12a8,8,0,1,1,14.56,6.64Z"
|
|
41
|
+
];
|
|
42
|
+
/** Phosphor `bug`, regular. */
|
|
43
|
+
export const BUG = [
|
|
44
|
+
"M144,92a12,12,0,1,1,12,12A12,12,0,0,1,144,92ZM100,80a12,12,0,1,0,12,12A12,12,0,0,0,100,80Zm116,64A87.76,87.76,0,0,1,213,167l22.24,9.72A8,8,0,0,1,232,192a7.89,7.89,0,0,1-3.2-.67L207.38,182a88,88,0,0,1-158.76,0L27.2,191.33A7.89,7.89,0,0,1,24,192a8,8,0,0,1-3.2-15.33L43,167A87.76,87.76,0,0,1,40,144v-8H16a8,8,0,0,1,0-16H40v-8a87.76,87.76,0,0,1,3-23L20.8,79.33a8,8,0,1,1,6.4-14.66L48.62,74a88,88,0,0,1,158.76,0l21.42-9.36a8,8,0,0,1,6.4,14.66L213,89.05a87.76,87.76,0,0,1,3,23v8h24a8,8,0,0,1,0,16H216ZM56,120H200v-8a72,72,0,0,0-144,0Zm64,95.54V136H56v8A72.08,72.08,0,0,0,120,215.54ZM200,144v-8H136v79.54A72.08,72.08,0,0,0,200,144Z"
|
|
45
|
+
];
|
|
46
|
+
/** Phosphor `arrow-up-right`, regular. */
|
|
47
|
+
export const ARROW_UP_RIGHT = [
|
|
48
|
+
"M200,64V168a8,8,0,0,1-16,0V83.31L69.66,197.66a8,8,0,0,1-11.32-11.32L172.69,72H88a8,8,0,0,1,0-16H192A8,8,0,0,1,200,64Z"
|
|
49
|
+
];
|
|
50
|
+
/** Phosphor `caret-down`, regular. */
|
|
51
|
+
export const CARET_DOWN = [
|
|
52
|
+
"M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z"
|
|
53
|
+
];
|
|
54
|
+
/** Phosphor `caret-left`, regular. */
|
|
55
|
+
export const CARET_LEFT = [
|
|
56
|
+
"M165.66,202.34a8,8,0,0,1-11.32,11.32l-80-80a8,8,0,0,1,0-11.32l80-80a8,8,0,0,1,11.32,11.32L91.31,128Z"
|
|
57
|
+
];
|
|
58
|
+
/** Phosphor `chart-line-up`, regular. */
|
|
59
|
+
export const CHART_LINE_UP = [
|
|
60
|
+
"M232,208a8,8,0,0,1-8,8H32a8,8,0,0,1-8-8V48a8,8,0,0,1,16,0V156.69l50.34-50.35a8,8,0,0,1,11.32,0L128,132.69,180.69,80H160a8,8,0,0,1,0-16h40a8,8,0,0,1,8,8v40a8,8,0,0,1-16,0V91.31l-58.34,58.35a8,8,0,0,1-11.32,0L96,123.31l-56,56V200H224A8,8,0,0,1,232,208Z"
|
|
61
|
+
];
|
|
62
|
+
/** Phosphor `check`, regular. */
|
|
63
|
+
export const CHECK = [
|
|
64
|
+
"M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z"
|
|
65
|
+
];
|
|
66
|
+
/** Phosphor `check-circle`, regular. */
|
|
67
|
+
export const CHECK_CIRCLE = [
|
|
68
|
+
"M173.66,98.34a8,8,0,0,1,0,11.32l-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35A8,8,0,0,1,173.66,98.34ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z"
|
|
69
|
+
];
|
|
70
|
+
/** Phosphor `copy`, regular. */
|
|
71
|
+
export const COPY = [
|
|
72
|
+
"M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32ZM160,208H48V96H160Zm48-48H176V88a8,8,0,0,0-8-8H96V48H208Z"
|
|
73
|
+
];
|
|
74
|
+
/** Phosphor `globe`, regular. */
|
|
75
|
+
export const GLOBE = [
|
|
76
|
+
"M128,24h0A104,104,0,1,0,232,128,104.12,104.12,0,0,0,128,24Zm88,104a87.61,87.61,0,0,1-3.33,24H174.16a157.44,157.44,0,0,0,0-48h38.51A87.61,87.61,0,0,1,216,128ZM102,168H154a115.11,115.11,0,0,1-26,45A115.27,115.27,0,0,1,102,168Zm-3.9-16a140.84,140.84,0,0,1,0-48h59.88a140.84,140.84,0,0,1,0,48ZM40,128a87.61,87.61,0,0,1,3.33-24H81.84a157.44,157.44,0,0,0,0,48H43.33A87.61,87.61,0,0,1,40,128ZM154,88H102a115.11,115.11,0,0,1,26-45A115.27,115.27,0,0,1,154,88Zm52.33,0H170.71a135.28,135.28,0,0,0-22.3-45.6A88.29,88.29,0,0,1,206.37,88ZM107.59,42.4A135.28,135.28,0,0,0,85.29,88H49.63A88.29,88.29,0,0,1,107.59,42.4ZM49.63,168H85.29a135.28,135.28,0,0,0,22.3,45.6A88.29,88.29,0,0,1,49.63,168Zm98.78,45.6a135.28,135.28,0,0,0,22.3-45.6h35.66A88.29,88.29,0,0,1,148.41,213.6Z"
|
|
77
|
+
];
|
|
78
|
+
/** Phosphor `lock-simple`, regular. */
|
|
79
|
+
export const LOCK_SIMPLE = [
|
|
80
|
+
"M208,80H176V56a48,48,0,0,0-96,0V80H48A16,16,0,0,0,32,96V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V96A16,16,0,0,0,208,80ZM96,56a32,32,0,0,1,64,0V80H96ZM208,208H48V96H208V208Z"
|
|
81
|
+
];
|
|
82
|
+
/** Phosphor `pencil-simple`, regular. */
|
|
83
|
+
export const PENCIL_SIMPLE = [
|
|
84
|
+
"M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM92.69,208H48V163.31l88-88L180.69,120ZM192,108.68,147.31,64l24-24L216,84.68Z"
|
|
85
|
+
];
|
|
86
|
+
/** Phosphor `users`, regular. */
|
|
87
|
+
export const USERS = [
|
|
88
|
+
"M117.25,157.92a60,60,0,1,0-66.5,0A95.83,95.83,0,0,0,3.53,195.63a8,8,0,1,0,13.4,8.74,80,80,0,0,1,134.14,0,8,8,0,0,0,13.4-8.74A95.83,95.83,0,0,0,117.25,157.92ZM40,108a44,44,0,1,1,44,44A44.05,44.05,0,0,1,40,108Zm210.14,98.7a8,8,0,0,1-11.07-2.33A79.83,79.83,0,0,0,172,168a8,8,0,0,1,0-16,44,44,0,1,0-16.34-84.87,8,8,0,1,1-5.94-14.85,60,60,0,0,1,55.53,105.64,95.83,95.83,0,0,1,47.22,37.71A8,8,0,0,1,250.14,206.7Z"
|
|
89
|
+
];
|
|
90
|
+
/** Phosphor `x`, regular. */
|
|
91
|
+
export const X = [
|
|
92
|
+
"M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"
|
|
93
|
+
];
|
|
94
|
+
/** Phosphor `share-network`, regular. */
|
|
95
|
+
export const SHARE_NETWORK = [
|
|
96
|
+
"M176,160a39.89,39.89,0,0,0-28.62,12.09l-46.1-29.63a39.8,39.8,0,0,0,0-28.92l46.1-29.63a40,40,0,1,0-8.66-13.45l-46.1,29.63a40,40,0,1,0,0,55.82l46.1,29.63A40,40,0,1,0,176,160Zm0-128a24,24,0,1,1-24,24A24,24,0,0,1,176,32ZM64,152a24,24,0,1,1,24-24A24,24,0,0,1,64,152Zm112,72a24,24,0,1,1,24-24A24,24,0,0,1,176,224Z"
|
|
97
|
+
];
|
|
98
|
+
/** Phosphor `google-logo`, regular. */
|
|
99
|
+
export const GOOGLE_LOGO = [
|
|
100
|
+
"M224,128a96,96,0,1,1-21.95-61.09,8,8,0,1,1-12.33,10.18A80,80,0,1,0,207.6,136H128a8,8,0,0,1,0-16h88A8,8,0,0,1,224,128Z"
|
|
101
|
+
];
|
|
102
|
+
/** Where each glyph above came from. Read by the tests and the gallery, not by the badge. */
|
|
103
|
+
export const BADGE_MARK_SOURCES = {
|
|
104
|
+
THUMBS_UP: "thumbs-up",
|
|
105
|
+
THUMBS_DOWN: "thumbs-down",
|
|
106
|
+
WRENCH: "wrench",
|
|
107
|
+
CHAT_CIRCLE: "chat-circle",
|
|
108
|
+
LIGHTBULB_FILAMENT: "lightbulb-filament",
|
|
109
|
+
ROCKET_LAUNCH: "rocket-launch",
|
|
110
|
+
BUG: "bug",
|
|
111
|
+
ARROW_UP_RIGHT: "arrow-up-right",
|
|
112
|
+
CARET_DOWN: "caret-down",
|
|
113
|
+
CARET_LEFT: "caret-left",
|
|
114
|
+
CHART_LINE_UP: "chart-line-up",
|
|
115
|
+
CHECK: "check",
|
|
116
|
+
CHECK_CIRCLE: "check-circle",
|
|
117
|
+
COPY: "copy",
|
|
118
|
+
GLOBE: "globe",
|
|
119
|
+
LOCK_SIMPLE: "lock-simple",
|
|
120
|
+
PENCIL_SIMPLE: "pencil-simple",
|
|
121
|
+
USERS: "users",
|
|
122
|
+
X: "x",
|
|
123
|
+
SHARE_NETWORK: "share-network",
|
|
124
|
+
GOOGLE_LOGO: "google-logo",
|
|
125
|
+
};
|
|
126
|
+
//# sourceMappingURL=marks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"marks.js","sourceRoot":"","sources":["../../src/badge/marks.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,EAAE;AACF,+EAA+E;AAC/E,iFAAiF;AACjF,8EAA8E;AAC9E,2DAA2D;AAC3D,qDAAqD;AACrD,EAAE;AACF,6DAA6D;AAC7D,EAAE;AACF,sCAAsC;AACtC,iFAAiF;AACjF,kFAAkF;AAClF,6EAA6E;AAC7E,uDAAuD;AACvD,EAAE;AACF,8DAA8D;AAE9D,qCAAqC;AACrC,MAAM,CAAC,MAAM,SAAS,GAAsB;IAC1C,uTAAuT;CACxT,CAAA;AAED,uCAAuC;AACvC,MAAM,CAAC,MAAM,WAAW,GAAsB;IAC5C,uUAAuU;CACxU,CAAA;AAED,kCAAkC;AAClC,MAAM,CAAC,MAAM,MAAM,GAAsB;IACvC,2iBAA2iB;CAC5iB,CAAA;AAED,uCAAuC;AACvC,MAAM,CAAC,MAAM,WAAW,GAAsB;IAC5C,6NAA6N;CAC9N,CAAA;AAED,8CAA8C;AAC9C,MAAM,CAAC,MAAM,kBAAkB,GAAsB;IACnD,2iBAA2iB;CAC5iB,CAAA;AAED,yCAAyC;AACzC,MAAM,CAAC,MAAM,aAAa,GAAsB;IAC9C,gtBAAgtB;CACjtB,CAAA;AAED,+BAA+B;AAC/B,MAAM,CAAC,MAAM,GAAG,GAAsB;IACpC,knBAAknB;CACnnB,CAAA;AAED,0CAA0C;AAC1C,MAAM,CAAC,MAAM,cAAc,GAAsB;IAC/C,uHAAuH;CACxH,CAAA;AAED,sCAAsC;AACtC,MAAM,CAAC,MAAM,UAAU,GAAsB;IAC3C,oHAAoH;CACrH,CAAA;AAED,sCAAsC;AACtC,MAAM,CAAC,MAAM,UAAU,GAAsB;IAC3C,sGAAsG;CACvG,CAAA;AAED,yCAAyC;AACzC,MAAM,CAAC,MAAM,aAAa,GAAs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AAE,OAAO;IACd,WAAW,EAAE,aAAa;IAC1B,aAAa,EAAE,eAAe;IAC9B,KAAK,EAAE,OAAO;IACd,CAAC,EAAE,GAAG;IACN,aAAa,EAAE,eAAe;IAC9B,WAAW,EAAE,aAAa;CAC3B,CAAA"}
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The owner's half of the badge: the tab on the edge of the page and the owner
|
|
3
|
+
* panel's three steps (main, edit, share). Markup only; the badge wires the
|
|
4
|
+
* behaviour, the API supplies the data, and the server builds every Console URL.
|
|
5
|
+
*
|
|
6
|
+
* Import from `@cloudgrid-io/ui/badge/owner` in the owner file the badge
|
|
7
|
+
* lazy-loads for the app's owner only. Its stylesheet is `BADGE_OWNER_CSS`,
|
|
8
|
+
* added to a shadow root that already carries `BADGE_BASE_CSS`.
|
|
9
|
+
*
|
|
10
|
+
* The access model is Decision 060's, under the Console's own names
|
|
11
|
+
* (`lib/v2/visibility.ts`): who inside the grid (`shareScope`), who outside it
|
|
12
|
+
* (`externalAccess`), and whether the link needs a sign-in (`requireSignin`).
|
|
13
|
+
* The panel offers three buttons over it; anything finer is done in the
|
|
14
|
+
* Console, behind the "More options" link beside the heading (founder, 2026-10-12).
|
|
15
|
+
*/
|
|
16
|
+
import { type BadgeSide } from "./shared.js";
|
|
17
|
+
export { BADGE_OWNER_CSS } from "./css-owner.js";
|
|
18
|
+
export type OwnerTabState = "rest" | "open" | "peek";
|
|
19
|
+
export interface OwnerTabOptions {
|
|
20
|
+
/** Which edge it sits on. The panel opens from the same side. */
|
|
21
|
+
side?: BadgeSide;
|
|
22
|
+
/**
|
|
23
|
+
* `rest`: the sign alone. `open`: the label out, as on hover (the stylesheet
|
|
24
|
+
* does hover and focus by itself; `open` is for a frozen frame). `peek`: the
|
|
25
|
+
* first visit on a browser, when the same label slides out once for three
|
|
26
|
+
* seconds.
|
|
27
|
+
*/
|
|
28
|
+
state?: OwnerTabState;
|
|
29
|
+
/** While a drag is in progress. */
|
|
30
|
+
dragging?: boolean;
|
|
31
|
+
/** Its position along the edge, as a CSS length (the centre of the tab). Default 50%. */
|
|
32
|
+
top?: string;
|
|
33
|
+
/** While the panel is open the tab steps out of the way. */
|
|
34
|
+
hidden?: boolean;
|
|
35
|
+
}
|
|
36
|
+
/** The tab's label, on hover and on the first-visit peek alike. */
|
|
37
|
+
export declare const TAB_LABEL = "On your grid";
|
|
38
|
+
/**
|
|
39
|
+
* The owner tab: a white tab on the edge with the CloudGrid sign and a green
|
|
40
|
+
* dot; on hover "On your grid" slides out. The badge makes it draggable along
|
|
41
|
+
* either edge (it snaps to the nearer one) and moves it with the arrow keys.
|
|
42
|
+
*
|
|
43
|
+
* Action: `open-owner`.
|
|
44
|
+
*/
|
|
45
|
+
export declare function ownerTab({ side, state, dragging, top, hidden }?: OwnerTabOptions): string;
|
|
46
|
+
export type ShareScope = "private" | "spaces" | "grid";
|
|
47
|
+
export type ExternalAccess = "none" | "link" | "public";
|
|
48
|
+
export interface AccessState {
|
|
49
|
+
shareScope: ShareScope;
|
|
50
|
+
externalAccess: ExternalAccess;
|
|
51
|
+
requireSignin: boolean;
|
|
52
|
+
}
|
|
53
|
+
/** The three buttons. `null` when the current setting is none of them: no button is highlighted. */
|
|
54
|
+
export type AccessPreset = "private" | "grid" | "public";
|
|
55
|
+
export declare function accessPreset(a: AccessState): AccessPreset | null;
|
|
56
|
+
/** What a click on one of the three buttons asks for. Grid keeps "selected spaces" if that is set. */
|
|
57
|
+
export declare function presetAccess(preset: AccessPreset, current: AccessState): AccessState;
|
|
58
|
+
/**
|
|
59
|
+
* True when `next` lets fewer people in than `current`: a smaller outside
|
|
60
|
+
* audience, a smaller inside audience at the same outside one, or a sign-in
|
|
61
|
+
* newly required. Narrowing asks first; widening saves at once.
|
|
62
|
+
*/
|
|
63
|
+
export declare function isNarrowing(current: AccessState, next: AccessState): boolean;
|
|
64
|
+
/** The one-line confirm a narrowing shows in the panel. */
|
|
65
|
+
export declare function narrowingMessage(current: AccessState, next: AccessState, gridName: string): string;
|
|
66
|
+
export interface OwnerSpace {
|
|
67
|
+
id: string;
|
|
68
|
+
name: string;
|
|
69
|
+
/** In the "selected spaces" set. */
|
|
70
|
+
selected?: boolean;
|
|
71
|
+
}
|
|
72
|
+
export interface OwnerMainOptions {
|
|
73
|
+
/** The app's name. */
|
|
74
|
+
name: string;
|
|
75
|
+
/** The status pill's word. Default "Live"; `null` for none. */
|
|
76
|
+
status?: string | null;
|
|
77
|
+
/** "Atomic Labs". */
|
|
78
|
+
gridName: string;
|
|
79
|
+
/** The app's own page in the Console, built by the server. Opens in a new tab. */
|
|
80
|
+
appPageUrl: string;
|
|
81
|
+
/**
|
|
82
|
+
* Views this week: the total and the last seven days, oldest first. `0` reads
|
|
83
|
+
* "No views yet this week" with no bars. `null` (analytics failed) hides the
|
|
84
|
+
* line and keeps the row.
|
|
85
|
+
*/
|
|
86
|
+
views?: {
|
|
87
|
+
total: number;
|
|
88
|
+
daily: readonly number[];
|
|
89
|
+
} | null;
|
|
90
|
+
/** All-time totals, and the app's Feedback page in the Console. */
|
|
91
|
+
feedback: {
|
|
92
|
+
reactions: number;
|
|
93
|
+
notes: number;
|
|
94
|
+
url: string;
|
|
95
|
+
};
|
|
96
|
+
/** "Show to visitors": the feedback bubble for visitors. */
|
|
97
|
+
showToVisitors: boolean;
|
|
98
|
+
access: AccessState;
|
|
99
|
+
/** The grid's spaces, for "Selected spaces". */
|
|
100
|
+
spaces?: readonly OwnerSpace[];
|
|
101
|
+
/**
|
|
102
|
+
* The app's access page in the Console, built by the server: "More options",
|
|
103
|
+
* beside the heading, opens it in a new tab.
|
|
104
|
+
*/
|
|
105
|
+
accessPageUrl: string;
|
|
106
|
+
/**
|
|
107
|
+
* One line describing the current access when none of the three buttons
|
|
108
|
+
* matches it, shown in the row under them. Written by the caller, which knows
|
|
109
|
+
* the full setting ("Everyone in the grid, and anyone with the link (sign-in
|
|
110
|
+
* required).").
|
|
111
|
+
*/
|
|
112
|
+
customDescription?: string;
|
|
113
|
+
/** Render the Grid row's menu open (a frozen frame). */
|
|
114
|
+
scopeMenuOpen?: boolean;
|
|
115
|
+
/**
|
|
116
|
+
* A narrowing waiting for Confirm: the setting it would move to. The button
|
|
117
|
+
* that setting belongs to is shaded grey (`data-pending`) while the current
|
|
118
|
+
* one keeps its purple; Confirm moves the selection, Cancel clears it.
|
|
119
|
+
*/
|
|
120
|
+
pending?: AccessState | null;
|
|
121
|
+
/** The save line beside "Who can open this". */
|
|
122
|
+
saveState?: "saving" | "saved" | null;
|
|
123
|
+
}
|
|
124
|
+
/** The Grid row's menu: everyone in the grid, or the selected spaces. */
|
|
125
|
+
export declare const GRID_SCOPE_OPTIONS: readonly [{
|
|
126
|
+
readonly value: "grid";
|
|
127
|
+
readonly label: "Everyone";
|
|
128
|
+
}, {
|
|
129
|
+
readonly value: "spaces";
|
|
130
|
+
readonly label: "Selected spaces…";
|
|
131
|
+
}];
|
|
132
|
+
/**
|
|
133
|
+
* The main step: name and status, the grid row, Edit and Share, the feedback
|
|
134
|
+
* box, who can open this, and at the foot, under a hairline, "Only you see this panel."
|
|
135
|
+
*
|
|
136
|
+
* Actions: `open-app-page`, `open-feedback-page` and `open-access-page` (links,
|
|
137
|
+
* new tab), `go-edit`, `go-share`, `show-to-visitors` and `access-findable`
|
|
138
|
+
* (switches), `access-preset` (`data-value`), `access-scope` (the Grid menu's
|
|
139
|
+
* trigger) and `access-scope-pick` (`data-value` `grid` or `spaces`),
|
|
140
|
+
* `access-space` (checkboxes), `confirm-ok`, `confirm-cancel`.
|
|
141
|
+
*/
|
|
142
|
+
export declare function ownerMain(o: OwnerMainOptions): string;
|
|
143
|
+
/**
|
|
144
|
+
* The prompt the edit step offers, with the library's prompt grammar: a
|
|
145
|
+
* backticked run is a literal (accent on screen) and the fences are never
|
|
146
|
+
* copied. Fill it with `editPrompt`; copy it with `promptCopyText`.
|
|
147
|
+
*/
|
|
148
|
+
export declare const EDIT_PROMPT_TEMPLATE: string;
|
|
149
|
+
/** The words at the end of the prompt the owner replaces. Dimmed on screen, copied as written. */
|
|
150
|
+
export declare const EDIT_PROMPT_PLACEHOLDER = "describe it here";
|
|
151
|
+
/** The edit prompt for one app, in the prompt grammar. A backtick in the name or URL is dropped. */
|
|
152
|
+
export declare function editPrompt(name: string, url: string): string;
|
|
153
|
+
/**
|
|
154
|
+
* The prompt grammar's backtick runs, as `PromptBlock` parses them
|
|
155
|
+
* (`promptSegments` in blocks/prompt-block.tsx): a closed pair is a literal and
|
|
156
|
+
* its fences are delimiters; an unclosed backtick is literal text. Asserted
|
|
157
|
+
* equal to the library's parser in the node suite.
|
|
158
|
+
*/
|
|
159
|
+
export declare function promptRuns(line: string): Array<{
|
|
160
|
+
text: string;
|
|
161
|
+
code: boolean;
|
|
162
|
+
}>;
|
|
163
|
+
/** What the clipboard gets: the fences consumed, trailing blank lines dropped. Same as `PromptBlock`. */
|
|
164
|
+
export declare function promptCopyText(prompt: string): string;
|
|
165
|
+
/** The prompt in `PromptBlock`'s look, with its icon-only copy control. Action: `copy-prompt`. */
|
|
166
|
+
export declare function promptBlock(prompt: string, { copied, placeholder }?: {
|
|
167
|
+
copied?: boolean | undefined;
|
|
168
|
+
placeholder?: string | undefined;
|
|
169
|
+
}): string;
|
|
170
|
+
export interface OwnerEditOptions {
|
|
171
|
+
name: string;
|
|
172
|
+
/** The app's public URL, from `entityUrl(...)`. */
|
|
173
|
+
url: string;
|
|
174
|
+
/** The copy control just succeeded. */
|
|
175
|
+
copied?: boolean;
|
|
176
|
+
}
|
|
177
|
+
/** The edit step: why it is safe, the two ways, and the prompt. Actions: `go-main`, `copy-prompt`. */
|
|
178
|
+
export declare function ownerEdit({ name, url, copied }: OwnerEditOptions): string;
|
|
179
|
+
export interface OwnerShareOptions {
|
|
180
|
+
name: string;
|
|
181
|
+
/** The app's public URL, from `entityUrl(...)`. Shown without its scheme. */
|
|
182
|
+
url: string;
|
|
183
|
+
access: AccessState;
|
|
184
|
+
gridName: string;
|
|
185
|
+
/** "Copy link" just succeeded. */
|
|
186
|
+
copied?: boolean;
|
|
187
|
+
}
|
|
188
|
+
/** Who can open it, in one line, for the share step. */
|
|
189
|
+
export declare function whoCanOpen(a: AccessState, gridName: string): string;
|
|
190
|
+
/**
|
|
191
|
+
* The share step: the link and Copy link, and who can open it. No invite.
|
|
192
|
+
*
|
|
193
|
+
* On a phone it is the fallback: the badge sends the main panel's Share
|
|
194
|
+
* (`go-share`) straight to the phone's own share sheet (`navigator.share`
|
|
195
|
+
* with the app's name and URL) when the pointer is coarse and the API exists
|
|
196
|
+
* (founder, 2026-10-12). Desktop, and a phone without it, open this step.
|
|
197
|
+
*
|
|
198
|
+
* Actions: `go-main`, `copy-link`, and `go-main` again on "Change who can open
|
|
199
|
+
* it" when the app is private.
|
|
200
|
+
*/
|
|
201
|
+
export declare function ownerShare({ name, url, access, gridName, copied }: OwnerShareOptions): string;
|
|
202
|
+
export type OwnerStep = ({
|
|
203
|
+
step: "main";
|
|
204
|
+
} & OwnerMainOptions) | ({
|
|
205
|
+
step: "edit";
|
|
206
|
+
} & OwnerEditOptions) | ({
|
|
207
|
+
step: "share";
|
|
208
|
+
} & OwnerShareOptions);
|
|
209
|
+
/** The owner panel around one step, opening from the tab's side. */
|
|
210
|
+
export declare function ownerPanel(o: OwnerStep & {
|
|
211
|
+
side?: BadgeSide;
|
|
212
|
+
}): string;
|
|
213
|
+
//# sourceMappingURL=owner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"owner.d.ts","sourceRoot":"","sources":["../../src/badge/owner.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAiBH,OAAO,EAA4B,KAAK,SAAS,EAAE,MAAM,aAAa,CAAA;AAEtE,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAIhD,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAA;AAEpD,MAAM,WAAW,eAAe;IAC9B,iEAAiE;IACjE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