@crewlethq/ui 0.17.1 → 0.19.0
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 +55 -3
- package/dist/AccessDeniedCard/AccessDeniedCard.d.ts +39 -0
- package/dist/AccessDeniedCard/index.d.ts +3 -0
- package/dist/AccessDeniedCard/index.js +8 -0
- package/dist/AccessDeniedCard-WXM5DBDZ.css +8 -0
- package/dist/AppShell/index.js +2 -2
- package/dist/ArrangeBoard/ArrangeBoard.d.ts +32 -0
- package/dist/ArrangeBoard/index.d.ts +3 -0
- package/dist/ArrangeBoard/index.js +2 -0
- package/dist/ArrangeBoard-MQE35P6Z.css +80 -0
- package/dist/ArrangeFrame/ArrangeFrame.d.ts +82 -0
- package/dist/ArrangeFrame/index.d.ts +5 -0
- package/dist/ArrangeFrame/index.js +5 -0
- package/dist/ArrangeFrame/useGridResize.d.ts +66 -0
- package/dist/ArrangeFrame-3PLZAG22.css +329 -0
- package/dist/ArrangeGroup/ArrangeGroup.d.ts +42 -0
- package/dist/ArrangeGroup/index.d.ts +3 -0
- package/dist/ArrangeGroup/index.js +4 -0
- package/dist/ArrangeGroup-SHFHA7BE.css +170 -0
- package/dist/ArrangeList/ArrangeList.d.ts +64 -0
- package/dist/ArrangeList/index.d.ts +3 -0
- package/dist/ArrangeList/index.js +10 -0
- package/dist/ArrangeList-NNRTDFI5.css +94 -0
- package/dist/ArtifactCard/ArtifactCard.d.ts +61 -0
- package/dist/ArtifactCard/index.d.ts +3 -0
- package/dist/ArtifactCard/index.js +12 -0
- package/dist/ArtifactCard-EXVAEBV6.css +109 -0
- package/dist/AuthLayout/index.js +2 -2
- package/dist/AvatarPicker/index.js +5 -5
- package/dist/Canvas/index.js +2 -2
- package/dist/Card/index.js +1 -1
- package/dist/ChangeMark/ChangeMark.d.ts +26 -0
- package/dist/ChangeMark/index.d.ts +3 -0
- package/dist/ChangeMark/index.js +8 -0
- package/dist/ChangeMark-3VMTW7MT.css +22 -0
- package/dist/Checkbox/index.js +3 -3
- package/dist/Combobox/index.js +3 -3
- package/dist/CommandPalette/index.js +5 -5
- package/dist/Composer/index.js +3 -3
- package/dist/ConfirmField/index.js +3 -3
- package/dist/CursorFlag/CursorFlag.d.ts +34 -0
- package/dist/CursorFlag/index.d.ts +3 -0
- package/dist/CursorFlag/index.js +3 -0
- package/dist/CursorFlag-AJQJBUGY.css +61 -0
- package/dist/DataTable/index.js +7 -7
- package/dist/DataView/index.js +13 -13
- package/dist/DateTimePicker/index.js +2 -2
- package/dist/Divider/Divider.d.ts +15 -0
- package/dist/Divider/index.d.ts +3 -0
- package/dist/Divider/index.js +2 -0
- package/dist/Divider-3Z77ZAJH.css +37 -0
- package/dist/FollowBanner/FollowBanner.d.ts +35 -0
- package/dist/FollowBanner/index.d.ts +2 -0
- package/dist/FollowBanner/index.js +7 -0
- package/dist/FrameProtocol/index.d.ts +2 -0
- package/dist/FrameProtocol/index.js +2 -0
- package/dist/FrameProtocol/protocol.d.ts +164 -0
- package/dist/HuePicker/HuePicker.d.ts +16 -4
- package/dist/HuePicker/index.js +3 -3
- package/dist/{HuePicker-5QIUR6L7.css → HuePicker-PAIGH6LR.css} +6 -0
- package/dist/IconTile/IconTile.d.ts +23 -0
- package/dist/IconTile/index.d.ts +3 -0
- package/dist/IconTile/index.js +2 -0
- package/dist/IconTile-4GNWTLAW.css +30 -0
- package/dist/Input/index.js +2 -2
- package/dist/LinkInterstitial/LinkInterstitial.d.ts +41 -0
- package/dist/LinkInterstitial/index.d.ts +3 -0
- package/dist/LinkInterstitial/index.js +11 -0
- package/dist/LinkInterstitial-ET4MSVSV.css +34 -0
- package/dist/ListInput/index.js +4 -4
- package/dist/LiveCursor/LiveCursor.d.ts +34 -0
- package/dist/LiveCursor/index.d.ts +3 -0
- package/dist/LiveCursor/index.js +4 -0
- package/dist/LiveCursor-DZHGIYWE.css +47 -0
- package/dist/MarkdownEditor/index.js +3 -3
- package/dist/Menu/index.js +2 -2
- package/dist/Modal/Modal.d.ts +20 -0
- package/dist/Modal/index.js +2 -2
- package/dist/{Modal-RQAYGG4L.css → Modal-XOSV6FAH.css} +14 -0
- package/dist/Note/Note.d.ts +23 -0
- package/dist/Note/index.d.ts +3 -0
- package/dist/Note/index.js +2 -0
- package/dist/Note-RT4L6VUT.css +58 -0
- package/dist/OrgTable/index.js +5 -5
- package/dist/PinTile/PinTile.d.ts +37 -0
- package/dist/PinTile/index.d.ts +3 -0
- package/dist/PinTile/index.js +4 -0
- package/dist/PinTile-IIA25MNZ.css +141 -0
- package/dist/PresenceModel/index.d.ts +2 -0
- package/dist/PresenceModel/index.js +3 -0
- package/dist/PresenceModel/presence.d.ts +80 -0
- package/dist/PresenceRing/PresenceRing.d.ts +31 -0
- package/dist/PresenceRing/index.d.ts +3 -0
- package/dist/PresenceRing/index.js +2 -0
- package/dist/PresenceRing-M4C22Q6U.css +68 -0
- package/dist/PresenceStack/PresenceStack.d.ts +36 -0
- package/dist/PresenceStack/index.d.ts +3 -0
- package/dist/PresenceStack/index.js +9 -0
- package/dist/PresenceStack-QSXQJND5.css +59 -0
- package/dist/PricingCard/index.js +2 -2
- package/dist/Principal/Principal.d.ts +35 -0
- package/dist/Principal/index.d.ts +2 -0
- package/dist/Principal/index.js +4 -0
- package/dist/PrincipalPicker/PrincipalPicker.d.ts +45 -0
- package/dist/PrincipalPicker/index.d.ts +3 -0
- package/dist/PrincipalPicker/index.js +12 -0
- package/dist/PrincipalPicker-7NNZTGUP.css +41 -0
- package/dist/Reorder/index.d.ts +2 -0
- package/dist/Reorder/index.js +4 -0
- package/dist/Reorder/useReorder.d.ts +138 -0
- package/dist/SandboxedFrame/SandboxedFrame.d.ts +142 -0
- package/dist/SandboxedFrame/index.d.ts +3 -0
- package/dist/SandboxedFrame/index.js +8 -0
- package/dist/SandboxedFrame-L6HBQZCD.css +50 -0
- package/dist/ShareDialog/ShareDialog.d.ts +101 -0
- package/dist/ShareDialog/index.d.ts +5 -0
- package/dist/ShareDialog/index.js +19 -0
- package/dist/ShareDialog/roles.d.ts +10 -0
- package/dist/ShareDialog-YZ4F37MW.css +146 -0
- package/dist/SheetGrid/SheetGrid.d.ts +78 -0
- package/dist/SheetGrid/cells.d.ts +117 -0
- package/dist/SheetGrid/index.d.ts +5 -0
- package/dist/SheetGrid/index.js +18 -0
- package/dist/SheetGrid-4HOXDVIB.css +595 -0
- package/dist/SheetModel/clipboard.d.ts +37 -0
- package/dist/SheetModel/edits.d.ts +68 -0
- package/dist/SheetModel/index.d.ts +14 -0
- package/dist/SheetModel/index.js +3 -0
- package/dist/SheetModel/labels.d.ts +71 -0
- package/dist/SheetModel/navigation.d.ts +79 -0
- package/dist/SheetModel/options.d.ts +28 -0
- package/dist/SheetModel/types.d.ts +126 -0
- package/dist/SheetModel/values.d.ts +76 -0
- package/dist/SheetModel/view.d.ts +32 -0
- package/dist/StatGroup/StatGroup.d.ts +7 -1
- package/dist/StatGroup/index.js +1 -1
- package/dist/{StatGroup-HVG6O62W.css → StatGroup-PADTJCUQ.css} +7 -0
- package/dist/Switcher/index.js +8 -8
- package/dist/Tag/Tag.d.ts +13 -0
- package/dist/Tag/index.js +1 -1
- package/dist/{Tag-4BRQS6GN.css → Tag-SRGTK5KI.css} +42 -0
- package/dist/TagsInput/index.js +4 -4
- package/dist/ThemeSwitcher/apply.d.ts +43 -0
- package/dist/ThemeSwitcher/index.d.ts +4 -2
- package/dist/ThemeSwitcher/index.js +3 -2
- package/dist/ThemeSwitcher/preferences.d.ts +2 -19
- package/dist/ThemeToggle/index.js +3 -2
- package/dist/TimeWindowPicker/index.js +4 -4
- package/dist/Timeline/Timeline.d.ts +7 -2
- package/dist/Timeline/index.js +1 -1
- package/dist/TreeCanvas/index.js +3 -3
- package/dist/TreeGrid/index.js +2 -2
- package/dist/VersionTimeline/VersionTimeline.d.ts +76 -0
- package/dist/VersionTimeline/index.d.ts +3 -0
- package/dist/VersionTimeline/index.js +10 -0
- package/dist/VersionTimeline-EBJ6MIPJ.css +108 -0
- package/dist/{chunk-SBRE7IML.js → chunk-2ONWEDQT.js} +1 -1
- package/dist/chunk-35XVR5JQ.js +81 -0
- package/dist/chunk-3BYIWOTV.js +29 -0
- package/dist/chunk-4KP4RC3O.js +25 -0
- package/dist/chunk-5XACKNYR.js +53 -0
- package/dist/chunk-63WJLRB2.js +24 -0
- package/dist/{chunk-L4ZLXYPO.js → chunk-6A7P6II6.js} +1 -1
- package/dist/chunk-6KWNXIDE.js +18 -0
- package/dist/chunk-6MIXD6IW.js +49 -0
- package/dist/{chunk-FA2V2VT6.js → chunk-7FQEUNHX.js} +4 -4
- package/dist/{chunk-DEEVA6TV.js → chunk-7IJARUIF.js} +17 -4
- package/dist/{chunk-JCO3SIST.js → chunk-7ZNKEPLN.js} +2 -2
- package/dist/chunk-AIVZVKYZ.js +126 -0
- package/dist/{chunk-FSKTOIYC.js → chunk-AJESMWJS.js} +5 -5
- package/dist/{chunk-O67VF5MS.js → chunk-AUQPBL4O.js} +2 -2
- package/dist/chunk-CENOOTAV.js +1 -0
- package/dist/chunk-DEJHAOC5.js +279 -0
- package/dist/{chunk-UCYIRDND.js → chunk-DQSXWQMJ.js} +1 -1
- package/dist/{chunk-JF7X673Z.js → chunk-EIGEIT4O.js} +2 -2
- package/dist/chunk-F6V2PTN6.js +142 -0
- package/dist/chunk-FFMCMSJB.js +1 -0
- package/dist/chunk-FW7HN6AP.js +40 -0
- package/dist/chunk-G3EEUNZQ.js +46 -0
- package/dist/{chunk-LOECRMHA.js → chunk-GFV4LJHH.js} +4 -3
- package/dist/chunk-HTCJSUIZ.js +216 -0
- package/dist/{chunk-75CLJNDQ.js → chunk-I6NZKJGK.js} +1 -1
- package/dist/chunk-I6POAB4V.js +20 -0
- package/dist/chunk-IXJHTFXG.js +17 -0
- package/dist/chunk-JEDWC3GI.js +98 -0
- package/dist/{chunk-QVAFL2LE.js → chunk-JXRI5YD2.js} +3 -3
- package/dist/{chunk-ZFH7H7GS.js → chunk-LOLELDBW.js} +1 -1
- package/dist/{chunk-6TSZCBID.js → chunk-NP2C4Y4E.js} +1 -1
- package/dist/{chunk-6NN2F7GM.js → chunk-OIMAK5AE.js} +6 -6
- package/dist/chunk-PPAQFGS2.js +12 -0
- package/dist/chunk-PUQY4WXR.js +1235 -0
- package/dist/chunk-QO7QEQKV.js +24 -0
- package/dist/chunk-RT323I4I.js +49 -0
- package/dist/chunk-S35G6PNC.js +80 -0
- package/dist/{chunk-HENOTGUV.js → chunk-T7ICFXEC.js} +2 -2
- package/dist/{chunk-2OLCUNG7.js → chunk-TBIZSQHB.js} +1 -1
- package/dist/chunk-TODND5AD.js +99 -0
- package/dist/{chunk-PQ63NLFC.js → chunk-UXELEORU.js} +3 -3
- package/dist/{chunk-6NIMZ5XC.js → chunk-VJLYGPPE.js} +1 -1
- package/dist/chunk-VYDFB6PJ.js +243 -0
- package/dist/{chunk-7QFAORCY.js → chunk-WHZFDS62.js} +1 -1
- package/dist/chunk-WXAULPBH.js +135 -0
- package/dist/chunk-XJ2QEBMM.js +277 -0
- package/dist/{chunk-NXDEPUVG.js → chunk-XU4ZUGLE.js} +20 -5
- package/dist/chunk-YM3GJHGW.js +69 -0
- package/dist/{chunk-T3ZWBZ65.js → chunk-YSJYWQSP.js} +2 -2
- package/dist/{chunk-CXBAIVYZ.js → chunk-YSY6UJ4F.js} +1 -1
- package/dist/chunk-YYZRLLLY.js +822 -0
- package/dist/{chunk-EG6NYWVK.js → chunk-YZCJ63JF.js} +1 -1
- package/dist/{chunk-K3OWD7BJ.js → chunk-Z24ZUSTX.js} +4 -19
- package/dist/chunk-ZXXDZJQN.js +36 -0
- package/dist/generated/index.d.ts +27 -0
- package/dist/generated/index.js +98 -69
- package/dist/index.js +98 -69
- package/dist/styles.css +13625 -11206
- package/dist/utils/index.js +1 -1
- package/package.json +3 -3
- package/dist/chunk-EXHQ2QVW.js +0 -1
- package/dist/{chunk-CRVETI5L.js → chunk-4Z7PW3L6.js} +0 -0
- package/dist/{chunk-OYOQU7O5.js → chunk-EDGCPVVD.js} +1 -1
- package/dist/{chunk-NS7BVLL3.js → chunk-JULMZNGT.js} +1 -1
- package/dist/{chunk-2UU5IGZI.js → chunk-L4H7SSWF.js} +1 -1
- package/dist/{chunk-4GB57WIT.js → chunk-Q55TXPA3.js} +1 -1
- package/dist/{chunk-77IEHFY4.js → chunk-QQGWES46.js} +1 -1
- package/dist/{chunk-B2Z2CDM5.js → chunk-T5TFZ2JB.js} +1 -1
- package/dist/{chunk-AMH67MLM.js → chunk-TXAFKH2A.js} +1 -1
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'react';
|
|
2
|
+
export interface DividerProps extends HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
/** Words on the rule, for a divider that names what follows: "History". */
|
|
4
|
+
label?: string | undefined;
|
|
5
|
+
/** Where the words sit: at the start, as a section's name, or centred. */
|
|
6
|
+
align?: 'start' | 'center' | undefined;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* A rule between parts of a page, with or without a name.
|
|
10
|
+
*
|
|
11
|
+
* A SEPARATOR TO A SCREEN READER, and a named one says its name, so a reader
|
|
12
|
+
* moving through the page hears where one part ends and "History" begins
|
|
13
|
+
* rather than nothing at all.
|
|
14
|
+
*/
|
|
15
|
+
export declare function Divider({ label, align, className, ...rest }: DividerProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/* Divider: a rule across its space, with its name at its start or in its middle. */
|
|
2
|
+
|
|
3
|
+
.crewlet-divider {
|
|
4
|
+
display: flex;
|
|
5
|
+
align-items: center;
|
|
6
|
+
gap: var(--spacing-3);
|
|
7
|
+
min-height: var(--size-row-sm);
|
|
8
|
+
min-width: 0;
|
|
9
|
+
}
|
|
10
|
+
.crewlet-divider::before,
|
|
11
|
+
.crewlet-divider::after {
|
|
12
|
+
content: '';
|
|
13
|
+
flex: 1 1 auto;
|
|
14
|
+
border-top: 1px solid var(--color-border-strong);
|
|
15
|
+
}
|
|
16
|
+
/* One rule unless the words sit in the middle of it. */
|
|
17
|
+
.crewlet-divider:not(.crewlet-divider--center)::before {
|
|
18
|
+
display: none;
|
|
19
|
+
}
|
|
20
|
+
.crewlet-divider:not(.crewlet-divider--labelled)::before {
|
|
21
|
+
display: block;
|
|
22
|
+
}
|
|
23
|
+
.crewlet-divider:not(.crewlet-divider--labelled)::after {
|
|
24
|
+
display: none;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.crewlet-divider__label {
|
|
28
|
+
flex: 0 1 auto;
|
|
29
|
+
overflow: hidden;
|
|
30
|
+
font-size: var(--font-size-xs);
|
|
31
|
+
font-weight: var(--font-weight-medium);
|
|
32
|
+
letter-spacing: var(--font-letter-spacing-wide);
|
|
33
|
+
color: var(--color-text-tertiary);
|
|
34
|
+
text-transform: uppercase;
|
|
35
|
+
text-overflow: ellipsis;
|
|
36
|
+
white-space: nowrap;
|
|
37
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/** Following somebody, or the moment they left and following stopped. */
|
|
2
|
+
export type FollowBannerState = 'following' | 'left';
|
|
3
|
+
export interface FollowBannerLabels {
|
|
4
|
+
following: (name: string) => string;
|
|
5
|
+
left: (name: string) => string;
|
|
6
|
+
stop: string;
|
|
7
|
+
dismiss: string;
|
|
8
|
+
}
|
|
9
|
+
export interface FollowBannerProps {
|
|
10
|
+
/** The followed collaborator's full name in the sentence: "Maya Ortiz", or the first name once they left. */
|
|
11
|
+
name: string;
|
|
12
|
+
state?: FollowBannerState | undefined;
|
|
13
|
+
/** Stop following: the Stop control, or Escape anywhere in the document while following. */
|
|
14
|
+
onStop: () => void;
|
|
15
|
+
/** Takes the banner down once it has said the followed person left. */
|
|
16
|
+
onDismiss?: (() => void) | undefined;
|
|
17
|
+
className?: string | undefined;
|
|
18
|
+
labels?: Partial<FollowBannerLabels> | undefined;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* The strip across the top of an artifact while its reader follows somebody:
|
|
22
|
+
* the view moves with theirs (tab, version, scroll, active cell) until the
|
|
23
|
+
* reader takes it back.
|
|
24
|
+
*
|
|
25
|
+
* ESCAPE STOPS IT FROM ANYWHERE, because following moves the reader's view
|
|
26
|
+
* under them and the way out has to be one key wherever focus happens to be.
|
|
27
|
+
* A key a composition is using, and one a nearer surface (an open menu, a
|
|
28
|
+
* dialog) already handled, are left alone. Scrolling or any own move of the
|
|
29
|
+
* view stops it too; that is the host's to call `onStop` for, since only the
|
|
30
|
+
* host knows which scroll is the reader's and which is the follow.
|
|
31
|
+
*
|
|
32
|
+
* ANNOUNCED POLITELY when it appears and when its sentence changes, so a
|
|
33
|
+
* screen reader user is told they are following and told when it stopped.
|
|
34
|
+
*/
|
|
35
|
+
export declare function FollowBanner({ name, state, onStop, onDismiss, className, labels }: FollowBannerProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { applyFrameTheme, checkFrameSandbox, DEFAULT_FRAME_THEME, EXTERNAL_URL_MAX, externalUrl, FRAME_BRIDGE, FRAME_MESSAGE, FRAME_ORIGIN_MODES, FRAME_SANDBOX_TOKENS, frameFragment, frameOriginMatches, frameThemeMessage, httpOrigin, isFocusExit, isFrameNonce, negotiateBridge, parseFrameFragment, portTargetOrigin, readFrameHello, readFramePortMessage, readFrameTheme, readOpenLink, } from './protocol.js';
|
|
2
|
+
export type { FrameBridgeRange, FrameFragment, FrameHello, FrameOpenLinkMessage, FrameOriginMode, FramePortMessage, FrameSandboxVerdict, FrameTheme, FrameThemeMessage, } from './protocol.js';
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { DEFAULT_FRAME_THEME, EXTERNAL_URL_MAX, FRAME_BRIDGE, FRAME_MESSAGE, FRAME_ORIGIN_MODES, FRAME_SANDBOX_TOKENS, applyFrameTheme, checkFrameSandbox, externalUrl, frameFragment, frameOriginMatches, frameThemeMessage, httpOrigin, isFocusExit, isFrameNonce, negotiateBridge, parseFrameFragment, portTargetOrigin, readFrameHello, readFramePortMessage, readFrameTheme, readOpenLink } from '../chunk-F6V2PTN6.js';
|
|
2
|
+
import '../chunk-ZXXDZJQN.js';
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import { type ThemeId } from '@crewlethq/tokens';
|
|
2
|
+
import { type DensityPreference, type ThemePreference } from '../ThemeSwitcher/apply.js';
|
|
3
|
+
/** The message names, on the window before the handshake and on the port after it. */
|
|
4
|
+
export declare const FRAME_MESSAGE: {
|
|
5
|
+
/** Frame to host, on the window: "I am the document you embedded, here is your nonce". */
|
|
6
|
+
readonly hello: "crewlet.hello";
|
|
7
|
+
/** Host to frame, on the window, carrying the transferred port. */
|
|
8
|
+
readonly port: "crewlet.port";
|
|
9
|
+
/** Host to frame, on the port: the reader's appearance changed. */
|
|
10
|
+
readonly theme: "crewlet.theme";
|
|
11
|
+
/** Frame to host, on the port: open this link outside the frame. */
|
|
12
|
+
readonly openLink: "crewlet.openLink";
|
|
13
|
+
/** Frame to host, on the port: give keyboard focus back to the page around the frame. */
|
|
14
|
+
readonly focusExit: "crewlet.focusExit";
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* The bridge protocol versions this host speaks, negotiated in the hello.
|
|
18
|
+
*
|
|
19
|
+
* The page-facing contract (`window.crewlet`) and the host-facing bridge are
|
|
20
|
+
* versioned apart: a page pins its contract for as long as it is published,
|
|
21
|
+
* while the bridge moves with the host, which supports the current version and
|
|
22
|
+
* the one before it.
|
|
23
|
+
*/
|
|
24
|
+
export declare const FRAME_BRIDGE: {
|
|
25
|
+
readonly min: 1;
|
|
26
|
+
readonly max: 1;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* How the engine isolated the artifact, as its `Frame.mode` says.
|
|
30
|
+
*
|
|
31
|
+
* `per_artifact` serves every artifact from an origin of its own, so its
|
|
32
|
+
* messages arrive from that origin. `shared` serves every artifact from one
|
|
33
|
+
* host with an opaque origin, so its messages arrive from `"null"` and only
|
|
34
|
+
* the source window and the nonce bind them to this frame.
|
|
35
|
+
*/
|
|
36
|
+
export type FrameOriginMode = 'per_artifact' | 'shared';
|
|
37
|
+
export declare const FRAME_ORIGIN_MODES: readonly ["per_artifact", "shared"];
|
|
38
|
+
/** The reader's appearance, as the page around the frame resolved it. */
|
|
39
|
+
export interface FrameTheme {
|
|
40
|
+
mode: ThemePreference;
|
|
41
|
+
/** A theme id from `@crewlethq/tokens`. */
|
|
42
|
+
palette: ThemeId;
|
|
43
|
+
density: DensityPreference;
|
|
44
|
+
}
|
|
45
|
+
/** What a frame paints before the host has said anything: the system, the default theme, the unscaled step. */
|
|
46
|
+
export declare const DEFAULT_FRAME_THEME: FrameTheme;
|
|
47
|
+
/**
|
|
48
|
+
* The fragment the host appends to the engine's frame URL.
|
|
49
|
+
*
|
|
50
|
+
* A FRAGMENT, NEVER A QUERY. A browser never sends a fragment to a server and
|
|
51
|
+
* never writes it to a log, so the handshake nonce and the reader's appearance
|
|
52
|
+
* stay between the two documents. The theme is in it so the frame paints in
|
|
53
|
+
* the reader's palette on its first frame, before any message can arrive.
|
|
54
|
+
*/
|
|
55
|
+
export declare function frameFragment(nonce: string, theme: FrameTheme): string;
|
|
56
|
+
/** What a frame reads back from its own fragment. Each value is checked; a bad one falls back. */
|
|
57
|
+
export interface FrameFragment {
|
|
58
|
+
/** The handshake nonce, or null when the fragment carries none. */
|
|
59
|
+
nonce: string | null;
|
|
60
|
+
theme: FrameTheme;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Reads a frame's own `location.hash`.
|
|
64
|
+
*
|
|
65
|
+
* A value that is not one of the allowed ones is dropped for its default
|
|
66
|
+
* rather than applied, because the fragment is a string anybody can edit by
|
|
67
|
+
* hand in the address of a page opened on its own.
|
|
68
|
+
*/
|
|
69
|
+
export declare function parseFrameFragment(hash: string): FrameFragment;
|
|
70
|
+
/** Whether a nonce is the shape the engine mints. */
|
|
71
|
+
export declare function isFrameNonce(value: unknown): value is string;
|
|
72
|
+
/**
|
|
73
|
+
* The origin of an absolute http or https URL, or null.
|
|
74
|
+
*
|
|
75
|
+
* Only those two schemes: a frame served from `data:`, `blob:` or
|
|
76
|
+
* `javascript:` would inherit or forge an origin, and the frame policy has no
|
|
77
|
+
* answer for any of them.
|
|
78
|
+
*/
|
|
79
|
+
export declare function httpOrigin(raw: string): string | null;
|
|
80
|
+
/** Whether a message's origin is the one this mode says the frame's document has. */
|
|
81
|
+
export declare function frameOriginMatches(mode: FrameOriginMode, expected: string, actual: string): boolean;
|
|
82
|
+
/**
|
|
83
|
+
* The `targetOrigin` the host posts the port with.
|
|
84
|
+
*
|
|
85
|
+
* Per artifact, the artifact's own origin: if the frame has navigated
|
|
86
|
+
* anywhere else in the meantime, the browser drops the message. An opaque
|
|
87
|
+
* origin cannot be named, so `"*"` is the only value that reaches it, and the
|
|
88
|
+
* port is posted to the verified source window in the same task as the
|
|
89
|
+
* verified hello, so no navigation can come between the check and the send.
|
|
90
|
+
*/
|
|
91
|
+
export declare function portTargetOrigin(mode: FrameOriginMode, origin: string): string;
|
|
92
|
+
/**
|
|
93
|
+
* Every sandbox token a frame may carry, and when.
|
|
94
|
+
*
|
|
95
|
+
* The engine computes the attribute and the host sets it VERBATIM; this is a
|
|
96
|
+
* second check, so a host never embeds a policy the engine would never have
|
|
97
|
+
* written. There is no `allow-popups` at all: an external link goes through
|
|
98
|
+
* the bridge's `openLink`, which the page around the frame opens after an
|
|
99
|
+
* interstitial, with `noopener`.
|
|
100
|
+
*/
|
|
101
|
+
export declare const FRAME_SANDBOX_TOKENS: Readonly<Record<string, 'always' | 'per_artifact' | 'declared'>>;
|
|
102
|
+
export type FrameSandboxVerdict = {
|
|
103
|
+
ok: true;
|
|
104
|
+
value: string;
|
|
105
|
+
} | {
|
|
106
|
+
ok: false;
|
|
107
|
+
refused: string[];
|
|
108
|
+
};
|
|
109
|
+
/** Checks the engine's sandbox attribute against the tokens a frame in this mode may carry. */
|
|
110
|
+
export declare function checkFrameSandbox(sandbox: string, mode: FrameOriginMode): FrameSandboxVerdict;
|
|
111
|
+
/** The range of bridge versions a runtime speaks. */
|
|
112
|
+
export interface FrameBridgeRange {
|
|
113
|
+
min: number;
|
|
114
|
+
max: number;
|
|
115
|
+
}
|
|
116
|
+
/** Frame to host: the first message, posted on the window. */
|
|
117
|
+
export interface FrameHello {
|
|
118
|
+
type: typeof FRAME_MESSAGE.hello;
|
|
119
|
+
nonce: string;
|
|
120
|
+
/** The page-facing contract the runtime implements, `major.minor.patch`. */
|
|
121
|
+
contract: string;
|
|
122
|
+
bridge: FrameBridgeRange;
|
|
123
|
+
}
|
|
124
|
+
/** Reads a hello, or null for anything that is not exactly one. */
|
|
125
|
+
export declare function readFrameHello(data: unknown): FrameHello | null;
|
|
126
|
+
/** The highest bridge version both ends speak, or null when they share none. */
|
|
127
|
+
export declare function negotiateBridge(offered: FrameBridgeRange, supported?: FrameBridgeRange): number | null;
|
|
128
|
+
/** Host to frame: the port message, posted on the window with the port transferred. */
|
|
129
|
+
export interface FramePortMessage {
|
|
130
|
+
type: typeof FRAME_MESSAGE.port;
|
|
131
|
+
bridge: number;
|
|
132
|
+
}
|
|
133
|
+
/** Reads a port message, or null. The port itself is the event's `ports[0]`. */
|
|
134
|
+
export declare function readFramePortMessage(data: unknown): FramePortMessage | null;
|
|
135
|
+
/** Host to frame: the reader's appearance, on the port. */
|
|
136
|
+
export interface FrameThemeMessage extends FrameTheme {
|
|
137
|
+
type: typeof FRAME_MESSAGE.theme;
|
|
138
|
+
}
|
|
139
|
+
export declare function frameThemeMessage(theme: FrameTheme): FrameThemeMessage;
|
|
140
|
+
/** Reads a theme message, or null when any of its three values is not an allowed one. */
|
|
141
|
+
export declare function readFrameTheme(data: unknown): FrameTheme | null;
|
|
142
|
+
/** Writes the three appearance attributes on a root element, the same way the application writes its own. */
|
|
143
|
+
export declare function applyFrameTheme(theme: FrameTheme, root?: Element | null): void;
|
|
144
|
+
/** Frame to host: open a link outside the frame. */
|
|
145
|
+
export interface FrameOpenLinkMessage {
|
|
146
|
+
type: typeof FRAME_MESSAGE.openLink;
|
|
147
|
+
url: string;
|
|
148
|
+
}
|
|
149
|
+
/** Reads an open-link request's raw URL, or null. Use `externalUrl` to decide whether it may be opened. */
|
|
150
|
+
export declare function readOpenLink(data: unknown): string | null;
|
|
151
|
+
/** Whether a port message asks for focus back. */
|
|
152
|
+
export declare function isFocusExit(data: unknown): boolean;
|
|
153
|
+
/** The longest link an artifact may ask the host to open. */
|
|
154
|
+
export declare const EXTERNAL_URL_MAX = 2048;
|
|
155
|
+
/**
|
|
156
|
+
* A link an artifact may ask to open, parsed, or null.
|
|
157
|
+
*
|
|
158
|
+
* Absolute `https:`, `http:` and `mailto:` only. `javascript:` and `data:`
|
|
159
|
+
* would run or render in the page that opens them; a relative link has no
|
|
160
|
+
* meaning outside the frame it was written in. A URL carrying a user name or
|
|
161
|
+
* password is refused too, because `https://bank.example@evil.example` is the
|
|
162
|
+
* classic way to make a destination read as somewhere it is not.
|
|
163
|
+
*/
|
|
164
|
+
export declare function externalUrl(raw: string): URL | null;
|
|
@@ -1,15 +1,26 @@
|
|
|
1
1
|
import { type SegmentedSize } from '../SegmentedControl/SegmentedControl.js';
|
|
2
2
|
import { type NodeHue } from '../utils/nodeHue.js';
|
|
3
|
-
|
|
3
|
+
interface HuePickerBase {
|
|
4
4
|
/** The group's name, said on entering it: "Color". */
|
|
5
5
|
label: string;
|
|
6
|
-
value: NodeHue;
|
|
7
|
-
onValueChange: (hue: NodeHue) => void;
|
|
8
6
|
size?: SegmentedSize | undefined;
|
|
9
7
|
/** Nothing can be chosen, and the row says so. */
|
|
10
8
|
disabled?: boolean | undefined;
|
|
11
9
|
className?: string | undefined;
|
|
12
10
|
}
|
|
11
|
+
/**
|
|
12
|
+
* The six hues, or the six and NO HUE first, named by `none` ("Plain"): a
|
|
13
|
+
* surface that may carry a colour (a group's band, a note) but need not.
|
|
14
|
+
*/
|
|
15
|
+
export type HuePickerProps = HuePickerBase & ({
|
|
16
|
+
none?: undefined;
|
|
17
|
+
value: NodeHue;
|
|
18
|
+
onValueChange: (hue: NodeHue) => void;
|
|
19
|
+
} | {
|
|
20
|
+
none: string;
|
|
21
|
+
value: NodeHue | 'none';
|
|
22
|
+
onValueChange: (hue: NodeHue | 'none') => void;
|
|
23
|
+
});
|
|
13
24
|
/**
|
|
14
25
|
* The choice of an entity's hue: the six node hues as a row of chips, each a
|
|
15
26
|
* swatch and the hue's name.
|
|
@@ -23,4 +34,5 @@ export interface HuePickerProps {
|
|
|
23
34
|
* row is still read and the chosen hue still shown, and nothing in it takes
|
|
24
35
|
* focus or a press.
|
|
25
36
|
*/
|
|
26
|
-
export declare function HuePicker(
|
|
37
|
+
export declare function HuePicker(props: HuePickerProps): import("react").JSX.Element;
|
|
38
|
+
export {};
|
package/dist/HuePicker/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import '../chunk-
|
|
2
|
-
export { HuePicker } from '../chunk-
|
|
3
|
-
import '../chunk-AYKXMIOR.js';
|
|
1
|
+
import '../chunk-FFMCMSJB.js';
|
|
2
|
+
export { HuePicker } from '../chunk-XU4ZUGLE.js';
|
|
4
3
|
import '../chunk-26PEPONN.js';
|
|
5
4
|
import '../chunk-4LDTQWS7.js';
|
|
5
|
+
import '../chunk-AYKXMIOR.js';
|
|
6
6
|
import '../chunk-CBOICT64.js';
|
|
7
7
|
import '../chunk-BHHIIK3M.js';
|
|
8
8
|
import '../chunk-BZFWDIV6.js';
|
|
@@ -16,3 +16,9 @@
|
|
|
16
16
|
.crewlet-hue-picker__swatch--amber { background: var(--color-node-amber); }
|
|
17
17
|
.crewlet-hue-picker__swatch--rose { background: var(--color-node-rose); }
|
|
18
18
|
.crewlet-hue-picker__swatch--blue { background: var(--color-node-blue); }
|
|
19
|
+
|
|
20
|
+
/* No hue: a ring in the hairline, so the row still reads as swatches. */
|
|
21
|
+
.crewlet-hue-picker__swatch--none {
|
|
22
|
+
box-sizing: border-box;
|
|
23
|
+
border: 1px solid var(--color-border-strong);
|
|
24
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import type { NodeHue } from '../utils/nodeHue.js';
|
|
3
|
+
export interface IconTileProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'children'> {
|
|
4
|
+
/** The glyph, at the size the tile is drawn at: `sm` in a `sm` or `md` tile, `md` in a `lg` one. */
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
/** The hue it is tinted in. Left out, the brand accent's soft fill and ink. */
|
|
7
|
+
hue?: NodeHue | undefined;
|
|
8
|
+
/** One of the row heights: `sm` 28px, `md` 36px, `lg` 48px. */
|
|
9
|
+
size?: 'sm' | 'md' | 'lg' | undefined;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* A glyph on a tinted square: what a choice in a library or a catalog is
|
|
13
|
+
* told apart by before its name is read. The widget tray draws one per widget
|
|
14
|
+
* it offers.
|
|
15
|
+
*
|
|
16
|
+
* A HUE PER KIND, NOT PER STATE. The tint is decorative and picked for the
|
|
17
|
+
* thing it marks (`NodeHue`), so a tile in rose says nothing is wrong; a state
|
|
18
|
+
* is a `StatusDot` or a `Tag`.
|
|
19
|
+
*
|
|
20
|
+
* DECORATION. The tile is hidden from assistive technology: the name beside it
|
|
21
|
+
* is what is read.
|
|
22
|
+
*/
|
|
23
|
+
export declare function IconTile({ children, hue, size, className, ...rest }: IconTileProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* IconTile: a glyph on a tinted square. Each hue pairs its fill and its ink
|
|
3
|
+
* from one measured family (`--color-node-*`); left out, the brand accent's
|
|
4
|
+
* soft fill and ink. No edge: the tile sits inside a card that has one.
|
|
5
|
+
*/
|
|
6
|
+
.crewlet-icon-tile {
|
|
7
|
+
--crewlet-icon-tile-fill: var(--color-brand-accent-soft);
|
|
8
|
+
--crewlet-icon-tile-ink: var(--color-brand-accent-ink);
|
|
9
|
+
--crewlet-icon-tile-size: var(--size-row-md);
|
|
10
|
+
|
|
11
|
+
display: inline-flex;
|
|
12
|
+
flex: none;
|
|
13
|
+
align-items: center;
|
|
14
|
+
justify-content: center;
|
|
15
|
+
width: var(--crewlet-icon-tile-size);
|
|
16
|
+
height: var(--crewlet-icon-tile-size);
|
|
17
|
+
border-radius: var(--radius-md);
|
|
18
|
+
background: var(--crewlet-icon-tile-fill);
|
|
19
|
+
color: var(--crewlet-icon-tile-ink);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.crewlet-icon-tile--sm { --crewlet-icon-tile-size: var(--size-row-sm); }
|
|
23
|
+
.crewlet-icon-tile--lg { --crewlet-icon-tile-size: var(--size-row-lg); border-radius: var(--radius-lg); }
|
|
24
|
+
|
|
25
|
+
.crewlet-icon-tile--purple { --crewlet-icon-tile-fill: var(--color-node-purple-fill); --crewlet-icon-tile-ink: var(--color-node-purple-ink); }
|
|
26
|
+
.crewlet-icon-tile--cyan { --crewlet-icon-tile-fill: var(--color-node-cyan-fill); --crewlet-icon-tile-ink: var(--color-node-cyan-ink); }
|
|
27
|
+
.crewlet-icon-tile--green { --crewlet-icon-tile-fill: var(--color-node-green-fill); --crewlet-icon-tile-ink: var(--color-node-green-ink); }
|
|
28
|
+
.crewlet-icon-tile--amber { --crewlet-icon-tile-fill: var(--color-node-amber-fill); --crewlet-icon-tile-ink: var(--color-node-amber-ink); }
|
|
29
|
+
.crewlet-icon-tile--rose { --crewlet-icon-tile-fill: var(--color-node-rose-fill); --crewlet-icon-tile-ink: var(--color-node-rose-ink); }
|
|
30
|
+
.crewlet-icon-tile--blue { --crewlet-icon-tile-fill: var(--color-node-blue-fill); --crewlet-icon-tile-ink: var(--color-node-blue-ink); }
|
package/dist/Input/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { FormField, FormRow, FormSection, Input, InputAffix, Label, ReadOnlyField, Textarea } from '../chunk-
|
|
2
|
-
import '../chunk-4FQT6ZAY.js';
|
|
1
|
+
export { FormField, FormRow, FormSection, Input, InputAffix, Label, ReadOnlyField, Textarea } from '../chunk-Q55TXPA3.js';
|
|
3
2
|
import '../chunk-PQADV6P6.js';
|
|
3
|
+
import '../chunk-4FQT6ZAY.js';
|
|
4
4
|
import '../chunk-BZFWDIV6.js';
|
|
5
5
|
import '../chunk-ODEQTPFM.js';
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export interface LinkInterstitialLabels {
|
|
2
|
+
title: string;
|
|
3
|
+
/** The line naming who asked. Given the source's name, or none when the caller names no source. */
|
|
4
|
+
intro: (source: string | undefined) => string;
|
|
5
|
+
destination: string;
|
|
6
|
+
insecure: string;
|
|
7
|
+
open: string;
|
|
8
|
+
cancel: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Opens a link in a new browsing context that cannot reach back.
|
|
12
|
+
*
|
|
13
|
+
* `noopener` severs `window.opener`, so the page that opens cannot navigate
|
|
14
|
+
* the dashboard that opened it; `noreferrer` keeps the dashboard's address out
|
|
15
|
+
* of the request. Exported so every place that opens an artifact's link opens
|
|
16
|
+
* it the same way.
|
|
17
|
+
*/
|
|
18
|
+
export declare function openExternal(url: URL): void;
|
|
19
|
+
export interface LinkInterstitialProps {
|
|
20
|
+
/** The link a page asked to open, already checked by `externalUrl`. The dialog is open while this is set. */
|
|
21
|
+
url: URL | null;
|
|
22
|
+
/** Who asked, in the words the reader knows it by: the artifact's title. */
|
|
23
|
+
source?: string | undefined;
|
|
24
|
+
/** Asked to close, after the link was opened or when the reader declined. */
|
|
25
|
+
onClose: () => void;
|
|
26
|
+
/** The link was opened. */
|
|
27
|
+
onOpened?: ((url: URL) => void) | undefined;
|
|
28
|
+
labels?: Partial<LinkInterstitialLabels> | undefined;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* The stop between an artifact's link and the open web.
|
|
32
|
+
*
|
|
33
|
+
* AN ARTIFACT NEVER OPENS A WINDOW. Its frame has no popup token at all, so a
|
|
34
|
+
* link reaches the page around it through the bridge, and this dialog names
|
|
35
|
+
* the destination before anything is opened: the host in large type, because
|
|
36
|
+
* the host is the claim a reader is deciding whether to trust, then the whole
|
|
37
|
+
* address. The host is the ASCII form the URL parser gives, so a name drawn in
|
|
38
|
+
* look-alike letters from another script shows as the `xn--` form it really
|
|
39
|
+
* is.
|
|
40
|
+
*/
|
|
41
|
+
export declare function LinkInterstitial({ url, source, onClose, onOpened, labels }: LinkInterstitialProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { LinkInterstitial, openExternal } from '../chunk-RT323I4I.js';
|
|
2
|
+
import '../chunk-7IJARUIF.js';
|
|
3
|
+
import '../chunk-5CLW2CXT.js';
|
|
4
|
+
import '../chunk-SVSCLHHI.js';
|
|
5
|
+
import '../chunk-OG6CL3EB.js';
|
|
6
|
+
import '../chunk-PQADV6P6.js';
|
|
7
|
+
import '../chunk-HMPFGIWM.js';
|
|
8
|
+
import '../chunk-R25RGPUB.js';
|
|
9
|
+
import '../chunk-4FQT6ZAY.js';
|
|
10
|
+
import '../chunk-BZFWDIV6.js';
|
|
11
|
+
import '../chunk-ODEQTPFM.js';
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* The destination, said twice: the host as the claim a reader decides on, in
|
|
3
|
+
* the title's register, then the whole address in mono for whoever wants to
|
|
4
|
+
* read it exactly. The address wraps anywhere, because a long URL that does
|
|
5
|
+
* not wrap pushes the dialog wider than a phone.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
.crewlet-link-interstitial {
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
gap: var(--spacing-2);
|
|
12
|
+
padding: var(--spacing-3);
|
|
13
|
+
border-radius: var(--radius-md);
|
|
14
|
+
background: var(--color-surface-inset);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.crewlet-link-interstitial__label {
|
|
18
|
+
color: var(--color-text-tertiary);
|
|
19
|
+
font-size: var(--font-size-xs);
|
|
20
|
+
font-weight: var(--font-weight-medium);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.crewlet-link-interstitial__host {
|
|
24
|
+
color: var(--color-text-primary);
|
|
25
|
+
font-size: var(--font-size-lg);
|
|
26
|
+
font-weight: var(--font-weight-semibold);
|
|
27
|
+
overflow-wrap: anywhere;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.crewlet-link-interstitial__href {
|
|
31
|
+
align-self: flex-start;
|
|
32
|
+
max-width: 100%;
|
|
33
|
+
overflow-wrap: anywhere;
|
|
34
|
+
}
|
package/dist/ListInput/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { ListInput } from '../chunk-
|
|
1
|
+
export { ListInput } from '../chunk-YSJYWQSP.js';
|
|
2
2
|
import '../chunk-SMBKXWML.js';
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import '../chunk-RSAQOKH3.js';
|
|
5
|
-
import '../chunk-4FQT6ZAY.js';
|
|
3
|
+
import '../chunk-Q55TXPA3.js';
|
|
6
4
|
import '../chunk-PQADV6P6.js';
|
|
7
5
|
import '../chunk-HMPFGIWM.js';
|
|
8
6
|
import '../chunk-R25RGPUB.js';
|
|
7
|
+
import '../chunk-RSAQOKH3.js';
|
|
8
|
+
import '../chunk-4FQT6ZAY.js';
|
|
9
9
|
import '../chunk-BZFWDIV6.js';
|
|
10
10
|
import '../chunk-ODEQTPFM.js';
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { NodeHue } from '../utils/nodeHue.js';
|
|
2
|
+
/** How long a cursor that stopped moving stays at full strength, and how long until it is hidden. */
|
|
3
|
+
export declare const LIVE_CURSOR_REST_MS = 5000;
|
|
4
|
+
export declare const LIVE_CURSOR_HIDE_MS = 30000;
|
|
5
|
+
export interface LiveCursorProps {
|
|
6
|
+
/** Position in px from the leading top corner of the nearest positioned ancestor. */
|
|
7
|
+
x: number;
|
|
8
|
+
y: number;
|
|
9
|
+
name: string;
|
|
10
|
+
hue: NodeHue;
|
|
11
|
+
kind?: 'human' | 'agent' | undefined;
|
|
12
|
+
/** Fades to 40% after this long without a move. */
|
|
13
|
+
idleAfterMs?: number | undefined;
|
|
14
|
+
/** Hidden after this long without a move. */
|
|
15
|
+
hideAfterMs?: number | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* Glides between positions. A reduced-motion preference always jumps
|
|
18
|
+
* instead, whatever this says; false jumps for everybody.
|
|
19
|
+
*/
|
|
20
|
+
interpolate?: boolean | undefined;
|
|
21
|
+
className?: string | undefined;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* A collaborator's pointer, with their name flag, at a point on a board or a
|
|
25
|
+
* page that shares cursors.
|
|
26
|
+
*
|
|
27
|
+
* IT FADES AS IT RESTS: full strength while it moves, 40% after five seconds
|
|
28
|
+
* still, hidden after thirty, so a pointer somebody left over a chart does not
|
|
29
|
+
* stand there all afternoon. Under a reduced-motion preference it jumps from
|
|
30
|
+
* point to point and never glides; the flag still appears. DECORATIVE to
|
|
31
|
+
* assistive technology, like every presence mark: where people are is said in
|
|
32
|
+
* words in the presence list.
|
|
33
|
+
*/
|
|
34
|
+
export declare function LiveCursor({ x, y, name, hue, kind, idleAfterMs, hideAfterMs, interpolate, className, }: LiveCursorProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* A collaborator's live pointer and its flag (LiveCursor.tsx). It stands at a
|
|
3
|
+
* point by transform, so a moving cursor repaints without a layout, and the
|
|
4
|
+
* flag hangs below and after the pointer's tip.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
.crewlet-live-cursor {
|
|
8
|
+
position: absolute;
|
|
9
|
+
top: 0;
|
|
10
|
+
left: 0;
|
|
11
|
+
z-index: var(--z-index-presence);
|
|
12
|
+
display: block;
|
|
13
|
+
pointer-events: none;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.crewlet-live-cursor__pointer {
|
|
17
|
+
display: block;
|
|
18
|
+
color: var(--crewlet-presence-hue);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.crewlet-live-cursor__flag {
|
|
22
|
+
position: absolute;
|
|
23
|
+
top: calc(var(--spacing-4) + var(--spacing-1));
|
|
24
|
+
left: var(--spacing-3);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.crewlet-live-cursor--resting {
|
|
28
|
+
opacity: 0.4;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.crewlet-live-cursor--gone {
|
|
32
|
+
display: none;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
36
|
+
.crewlet-live-cursor--glide {
|
|
37
|
+
transition:
|
|
38
|
+
transform var(--motion-duration-fast) linear,
|
|
39
|
+
opacity var(--motion-duration-base) var(--motion-easing-default);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
@media (forced-colors: active) {
|
|
44
|
+
.crewlet-live-cursor__pointer {
|
|
45
|
+
color: Highlight;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export { MARKDOWN_FORMATS, MarkdownEditor, formatMarkdown, insertMarkdown, markdownWords } from '../chunk-
|
|
1
|
+
export { MARKDOWN_FORMATS, MarkdownEditor, formatMarkdown, insertMarkdown, markdownWords } from '../chunk-QQGWES46.js';
|
|
2
2
|
import '../chunk-VYY56AMX.js';
|
|
3
3
|
import '../chunk-PGRPNDWM.js';
|
|
4
|
-
import '../chunk-4FQT6ZAY.js';
|
|
5
4
|
import '../chunk-26PEPONN.js';
|
|
6
5
|
import '../chunk-4LDTQWS7.js';
|
|
7
6
|
import '../chunk-CBOICT64.js';
|
|
7
|
+
import '../chunk-BHHIIK3M.js';
|
|
8
8
|
import '../chunk-HMPFGIWM.js';
|
|
9
9
|
import '../chunk-R25RGPUB.js';
|
|
10
|
-
import '../chunk-
|
|
10
|
+
import '../chunk-4FQT6ZAY.js';
|
|
11
11
|
import '../chunk-BZFWDIV6.js';
|
|
12
12
|
import '../chunk-ODEQTPFM.js';
|
package/dist/Menu/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { Menu } from '../chunk-
|
|
1
|
+
export { Menu } from '../chunk-JULMZNGT.js';
|
|
2
2
|
import '../chunk-OG6CL3EB.js';
|
|
3
|
-
import '../chunk-4FQT6ZAY.js';
|
|
4
3
|
import '../chunk-HMPFGIWM.js';
|
|
5
4
|
import '../chunk-R25RGPUB.js';
|
|
5
|
+
import '../chunk-4FQT6ZAY.js';
|
|
6
6
|
import '../chunk-BZFWDIV6.js';
|
|
7
7
|
import '../chunk-ODEQTPFM.js';
|