timvir 0.1.45 → 0.2.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.
Files changed (38) hide show
  1. package/blocks/Arbitrary/Arbitrary.d.ts +1 -1
  2. package/blocks/Arbitrary/index.js +20 -10
  3. package/blocks/Code/index.js +19 -9
  4. package/blocks/Code/styles.css +1 -1
  5. package/blocks/ColorBar/index.js +19 -9
  6. package/blocks/ColorBook/index.js +19 -9
  7. package/blocks/Cover/index.js +19 -9
  8. package/blocks/Exhibit/Exhibit.d.ts +1 -1
  9. package/blocks/Exhibit/index.js +19 -9
  10. package/blocks/Font/index.js +19 -9
  11. package/blocks/Grid/Grid.d.ts +1 -1
  12. package/blocks/Grid/index.js +21 -11
  13. package/blocks/Icon/Icon.d.ts +1 -1
  14. package/blocks/Icon/index.js +19 -9
  15. package/blocks/Message/index.js +19 -9
  16. package/blocks/Swatch/index.js +19 -9
  17. package/blocks/Viewport/index.js +19 -9
  18. package/blocks/WebLink/index.js +19 -9
  19. package/blocks/styles.css +1 -1
  20. package/context/index.d.ts +2 -0
  21. package/core/components/Commands/Commands.d.ts +5 -0
  22. package/core/components/Commands/index.d.ts +1 -0
  23. package/core/components/Commands/internal/Action.d.ts +7 -0
  24. package/core/components/Commands/internal/Dialog.d.ts +8 -0
  25. package/core/components/Commands/internal/index.d.ts +2 -0
  26. package/core/components/Page/Page.d.ts +1 -1
  27. package/core/index.js +14910 -215
  28. package/core/layout.d.ts +2 -2
  29. package/core/styles.css +9 -0
  30. package/core/theme/detector.d.ts +1 -0
  31. package/core/theme/detector.js +1 -0
  32. package/package.json +3 -3
  33. package/search/Search/docs/index.mdx +1 -1
  34. package/search/SearchBoxInput/SearchBoxInput.d.ts +1 -1
  35. package/search/SearchBoxListItem/SearchBoxListItem.d.ts +1 -1
  36. package/search/SearchBoxListItem/docs/index.mdx +1 -1
  37. package/search/index.js +19 -9
  38. package/styles.css +10 -1
package/core/layout.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  export declare const noLayout: import("@linaria/core").LinariaClassName;
2
2
  export declare const grid: import("@linaria/core").LinariaClassName;
3
- export declare const extendedWidth: import("@linaria/core").LinariaClassName;
4
- export declare const fullWidth: import("@linaria/core").LinariaClassName;
3
+ export declare const extendedWidth: string;
4
+ export declare const fullWidth: string;
package/core/styles.css CHANGED
@@ -31,6 +31,7 @@
31
31
  .p1d7vdmn{margin:0 0 1rem;}
32
32
  .ugfnift{margin:0 0 1rem;}
33
33
  .o3pt2dg{margin:0 0 1rem;}
34
+ .rfei6z8{position:fixed;inset:0px;display:flex;z-index:900;align-items:flex-start;justify-content:center;padding:13vh 16px 16px;font-family:system-ui,sans-serif;font-feature-settings:"liga","kern";text-rendering:optimizelegibility;font-size:16px;line-height:1.725;}
34
35
  .re625n1{padding:50px 0;background:#282c34;color:white;display:grid;grid-auto-rows:min-content;grid-template-columns:[le] 16px [lex lc] 1fr [rc rex] 16px [re];}@media (min-width:48rem){.re625n1{grid-template-columns:[le] 24px [lex] 1fr [lc] minmax(0,48rem) [rc] 1fr [rex] 24px [re];}}@media (min-width:72rem){.re625n1{grid-template-columns:[le] 1fr 24px [lex] minmax(0,12rem) [lc] 48rem [rc] minmax(0,12rem) [rex] 24px 1fr [re];}}.re625n1 > *{grid-column:lc / rc;}
35
36
  .d19gj27w{display:flex;align-items:flex-start;justify-content:space-between;}
36
37
  .d15ohs1l{display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;text-align:left;}
@@ -46,3 +47,11 @@
46
47
  .s1f74255{padding:24px 3px 30px;overflow-y:auto;flex-grow:1;overscroll-behavior:contain;}
47
48
  .d5l3c45{font-family:system-ui;}
48
49
  .d15ju3pv{color:var(--timvir-text-color);font-size:14px;font-weight:500;line-height:1.725;cursor:pointer;padding:2px 24px;border-radius:3px;display:flex;align-items:center;}.d15ju3pv:hover{background:var(--timvir-sidebar-highlight-color);}.d15ju3pv > svg{display:block;margin-right:4px;}
50
+ .ru1mblv{background-color:transparent;color:rgb(214,214,214);white-space:nowrap;display:flex;flex:0 0 100%;align-items:center;transition:color 0.1s;height:46px;display:flex;flex-shrink:initial;flex-basis:initial;flex-direction:row;flex-grow:1;overflow:hidden;align-items:center;padding-inline:14px;border-left:none;cursor:default;}.ru1mblv:hover{background-color:rgb(55,55,60);}
51
+ .i1wyx06o{margin-right:12px;width:16px;}.i1wyx06o > svg{display:block;width:16px;height:16px;}
52
+ .legxg01{font-size:0.8125rem;color:rgb(247,248,248);}
53
+ .r1fo6voy{position:relative;display:flex;flex-direction:column;flex-shrink:1;flex-grow:1;min-width:min-content;will-change:transform;transform-origin:center center;background:linear-gradient(136.61deg,rgb(39,40,43) 13.72%,rgb(45,46,49) 74.3%);border-radius:8px;box-shadow:rgb(0 0 0 / 50%) 0px 16px 70px;max-width:640px;color:rgb(214,214,214);overflow:hidden;transition:opacity 0.2s,transform 0.2s;}
54
+ .c185xiij{margin:16px 16px 0px;height:25px;line-height:25px;padding:0px 8px;font-size:0.8em;flex-shrink:0;align-self:flex-start;color:rgb(138,143,152);background:rgb(49,50,54);border-radius:4px;max-width:calc(100vw - 60px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
55
+ .p1ky3ya3{border-bottom:1px solid rgb(49,50,54);display:grid;grid-template-columns:1fr;align-items:center;position:relative;flex-shrink:0;height:62px;}.p1ky3ya3 > input{padding:20px;grid-area:1 / 1 / auto / auto;margin:0px;border:none;appearance:none;font-size:inherit;height:62px;background:transparent;color:rgb(214,214,214);caret-color:rgb(110,94,210);outline:none;width:100%;}
56
+ .snq1o7g{background:rgba(247,247,248,0.03);height:24px;padding-inline:14px;font-size:0.75rem;color:rgb(129,128,142);}
57
+ .cchvluj{height:300px;overflow:auto;}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ const t=Object.fromEntries(["light","dark"].map((t=>[t,(()=>{const n=window.matchMedia(`(prefers-color-scheme: ${t})`);return n.addEventListener("change",e),n})()])));function e(){const e=function(){try{const t=localStorage.getItem("timvir-theme");if(t)return t}catch{}for(const[e,n]of Object.entries(t))if(n.matches)return e}();e&&function(t){document.documentElement.setAttribute("data-timvir-theme",t)}(e)}e();
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "timvir",
4
- "version": "0.1.45",
4
+ "version": "0.2.0",
5
5
  "license": "MIT",
6
6
  "sideEffects": false,
7
7
  "exports": {
8
- "./style.css": "./style.css",
8
+ "./styles.css": "./styles.css",
9
9
  "./blocks": "./blocks/index.js",
10
10
  "./blocks/*": "./blocks/*/index.js",
11
11
  "./bus": "./bus/index.js",
@@ -15,7 +15,7 @@
15
15
  "./search": "./search/index.js"
16
16
  },
17
17
  "dependencies": {
18
- "bytestring": "^0.0.5",
18
+ "bytestring": "^1",
19
19
  "downshift": "^6",
20
20
  "fuzzaldrin-plus": "^0.6.0",
21
21
  "immer": "^9",
@@ -1,6 +1,6 @@
1
1
  import { Search } from "..";
2
2
 
3
- import { Exhibit } from "@timvir/blocks";
3
+ import { Exhibit } from "timvir/blocks";
4
4
 
5
5
  # Search
6
6
 
@@ -7,5 +7,5 @@ interface Props extends React.ComponentProps<typeof Root> {
7
7
  value?: string;
8
8
  onChange?: (ev: React.ChangeEvent<HTMLInputElement>) => void;
9
9
  }
10
- declare const _default: React.ForwardRefExoticComponent<Pick<Props, "key" | "dir" | "onError" | "hidden" | "color" | "style" | "translate" | "prefix" | "slot" | "title" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "value" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & React.RefAttributes<HTMLDivElement>>;
10
+ declare const _default: React.ForwardRefExoticComponent<Pick<Props, "hidden" | "color" | "style" | "translate" | "prefix" | "slot" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "value" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & React.RefAttributes<HTMLDivElement>>;
11
11
  export default _default;
@@ -8,5 +8,5 @@ interface Props extends React.ComponentProps<typeof Root> {
8
8
  label: React.ReactNode;
9
9
  context?: React.ReactNode;
10
10
  }
11
- declare const _default: React.ForwardRefExoticComponent<Pick<Props, "key" | "dir" | "onError" | "hidden" | "color" | "style" | "icon" | "translate" | "prefix" | "label" | "slot" | "title" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "context" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & React.RefAttributes<HTMLDivElement>>;
11
+ declare const _default: React.ForwardRefExoticComponent<Pick<Props, "hidden" | "color" | "style" | "icon" | "translate" | "prefix" | "label" | "slot" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "context" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & React.RefAttributes<HTMLDivElement>>;
12
12
  export default _default;
@@ -1,5 +1,5 @@
1
1
  import { SearchBoxListItem } from "..";
2
- import { Exhibit } from "@timvir/blocks";
2
+ import { Exhibit } from "timvir/blocks";
3
3
 
4
4
  # SearchBoxListItem
5
5
 
package/search/index.js CHANGED
@@ -9,24 +9,34 @@ import { useCombobox } from 'downshift';
9
9
  * ```js
10
10
  * cx('red', isBig && 'big') // returns 'red big' if `isBig` is true, otherwise returns 'red'
11
11
  * ```
12
- * If arguments provided are objects, these objects are merged together, and the values are taken as class names:
12
+ * If space separated atomic styles are provided, they are deduplicated according to the first hashed valued:
13
13
  *
14
14
  * ```js
15
- * cx({ color: 'class1', textDecoration: 'class2'}, { color: 'class3' }) // returns `class3 class2`
15
+ * cx('atm_a_class1 atm_b_class2', 'atm_a_class3') // returns `atm_a_class3 atm_b_class2`
16
16
  * ```
17
17
  *
18
18
  * @returns the combined, space separated class names that can be applied directly to the class attribute
19
19
  */
20
20
  const cx = function cx() {
21
- const presentClassNames = Array.prototype.slice.call(arguments).filter(Boolean); // In the basic case, `cx` is passed all strings, and we simply need to join them together with space separators
21
+ const presentClassNames = Array.prototype.slice.call(arguments).filter(Boolean);
22
+ const atomicClasses = {};
23
+ const nonAtomicClasses = [];
22
24
 
23
- const classNamesResult = presentClassNames.filter(arg => typeof arg !== 'object'); // There might also be objects (eg. from the atomic API) such as cx('foo', {
24
- // key1: 'bar', key2: 'fizz'}, { key1: 'buzz' }) the desired behavior is to
25
- // deduplicate the values based on their properties. The object's values are
26
- // the class names
25
+ for (const className of presentClassNames) {
26
+ // className could be the output of a previous cx call, so split by ' ' first
27
+ const individualClassNames = className.split(' ');
27
28
 
28
- const styleCollectionResult = Object.values(Object.assign({}, ...presentClassNames.filter(arg => typeof arg === 'object')));
29
- return [...styleCollectionResult, ...classNamesResult].join(' ');
29
+ for (const className of individualClassNames) {
30
+ if (className.startsWith('atm_')) {
31
+ const [, keyHash] = className.split('_');
32
+ atomicClasses[keyHash] = className;
33
+ } else {
34
+ nonAtomicClasses.push(className);
35
+ }
36
+ }
37
+ }
38
+
39
+ return [...Object.values(atomicClasses), ...nonAtomicClasses].join(' ');
30
40
  };
31
41
 
32
42
  /**
package/styles.css CHANGED
@@ -5,7 +5,7 @@
5
5
  .i1dajnne{border:none;outline:none;font:inherit;background:transparent;align-self:stretch;padding:0;height:34px;width:100%;color:inherit;}
6
6
  .b128wsn{border:none;outline:none;height:36px;background:var(--timvir-accent-color);font:inherit;border-radius:2px;cursor:pointer;transition:background 0.2s;}.b128wsn:hover{background:var(--c-p-3);}.b128wsn:active{background:var(--c-p-4);}
7
7
  .d1513p2s{display:grid;grid-template-columns:1fr;padding-block:16px;}
8
- .b157mkz{--size:48px;z-index:1;position:absolute;top:0;right:0;width:var(--size);height:var(--size);display:flex;align-items:flex-start;justify-content:flex-end;outline:none;border:none;padding:6px;background:transparent;transition:all 0.2s;cursor:pointer;pointer-events:none;opacity:0;}.b157mkz:hover{color:white;}.b157mkz:hover svg:first-child{transform:translate(0,0);}.b157mkz:active svg:first-child{transform:translate(2px,-2px);}
8
+ .b157mkz{--size:48px;z-index:1;position:absolute;top:0;right:0;overflow:hidden;width:var(--size);height:var(--size);display:flex;align-items:flex-start;justify-content:flex-end;outline:none;border:none;padding:6px;background:transparent;transition:all 0.2s;cursor:pointer;pointer-events:none;opacity:0;}.b157mkz:hover{color:white;}.b157mkz:hover svg:first-child{transform:translate(0,0);}.b157mkz:active svg:first-child{transform:translate(2px,-2px);}
9
9
  .b10oxtfo{pointer-events:all;opacity:1;}
10
10
  .s1hdfi6o{position:absolute;z-index:-1;top:0;right:0;transition:all 0.2s;transform:translate(48px,-48px);}.s1hdfi6o path{fill:var(--c-p-4);}
11
11
  .d17pltln{padding:16px 24px 16px 0;}
@@ -112,6 +112,7 @@
112
112
  .p1d7vdmn{margin:0 0 1rem;}
113
113
  .ugfnift{margin:0 0 1rem;}
114
114
  .o3pt2dg{margin:0 0 1rem;}
115
+ .rfei6z8{position:fixed;inset:0px;display:flex;z-index:900;align-items:flex-start;justify-content:center;padding:13vh 16px 16px;font-family:system-ui,sans-serif;font-feature-settings:"liga","kern";text-rendering:optimizelegibility;font-size:16px;line-height:1.725;}
115
116
  .re625n1{padding:50px 0;background:#282c34;color:white;display:grid;grid-auto-rows:min-content;grid-template-columns:[le] 16px [lex lc] 1fr [rc rex] 16px [re];}@media (min-width:48rem){.re625n1{grid-template-columns:[le] 24px [lex] 1fr [lc] minmax(0,48rem) [rc] 1fr [rex] 24px [re];}}@media (min-width:72rem){.re625n1{grid-template-columns:[le] 1fr 24px [lex] minmax(0,12rem) [lc] 48rem [rc] minmax(0,12rem) [rex] 24px 1fr [re];}}.re625n1 > *{grid-column:lc / rc;}
116
117
  .d19gj27w{display:flex;align-items:flex-start;justify-content:space-between;}
117
118
  .d15ohs1l{display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;text-align:left;}
@@ -127,6 +128,14 @@
127
128
  .s1f74255{padding:24px 3px 30px;overflow-y:auto;flex-grow:1;overscroll-behavior:contain;}
128
129
  .d5l3c45{font-family:system-ui;}
129
130
  .d15ju3pv{color:var(--timvir-text-color);font-size:14px;font-weight:500;line-height:1.725;cursor:pointer;padding:2px 24px;border-radius:3px;display:flex;align-items:center;}.d15ju3pv:hover{background:var(--timvir-sidebar-highlight-color);}.d15ju3pv > svg{display:block;margin-right:4px;}
131
+ .ru1mblv{background-color:transparent;color:rgb(214,214,214);white-space:nowrap;display:flex;flex:0 0 100%;align-items:center;transition:color 0.1s;height:46px;display:flex;flex-shrink:initial;flex-basis:initial;flex-direction:row;flex-grow:1;overflow:hidden;align-items:center;padding-inline:14px;border-left:none;cursor:default;}.ru1mblv:hover{background-color:rgb(55,55,60);}
132
+ .i1wyx06o{margin-right:12px;width:16px;}.i1wyx06o > svg{display:block;width:16px;height:16px;}
133
+ .legxg01{font-size:0.8125rem;color:rgb(247,248,248);}
134
+ .r1fo6voy{position:relative;display:flex;flex-direction:column;flex-shrink:1;flex-grow:1;min-width:min-content;will-change:transform;transform-origin:center center;background:linear-gradient(136.61deg,rgb(39,40,43) 13.72%,rgb(45,46,49) 74.3%);border-radius:8px;box-shadow:rgb(0 0 0 / 50%) 0px 16px 70px;max-width:640px;color:rgb(214,214,214);overflow:hidden;transition:opacity 0.2s,transform 0.2s;}
135
+ .c185xiij{margin:16px 16px 0px;height:25px;line-height:25px;padding:0px 8px;font-size:0.8em;flex-shrink:0;align-self:flex-start;color:rgb(138,143,152);background:rgb(49,50,54);border-radius:4px;max-width:calc(100vw - 60px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
136
+ .p1ky3ya3{border-bottom:1px solid rgb(49,50,54);display:grid;grid-template-columns:1fr;align-items:center;position:relative;flex-shrink:0;height:62px;}.p1ky3ya3 > input{padding:20px;grid-area:1 / 1 / auto / auto;margin:0px;border:none;appearance:none;font-size:inherit;height:62px;background:transparent;color:rgb(214,214,214);caret-color:rgb(110,94,210);outline:none;width:100%;}
137
+ .snq1o7g{background:rgba(247,247,248,0.03);height:24px;padding-inline:14px;font-size:0.75rem;color:rgb(129,128,142);}
138
+ .cchvluj{height:300px;overflow:auto;}
130
139
  .r5ea8qd{position:fixed;top:0px;left:0px;right:0px;bottom:0px;z-index:999;pointer-events:none;overflow:hidden;font-family:system-ui,sans-serif;font-feature-settings:"liga","kern";text-rendering:optimizelegibility;font-size:14px;line-height:1.725;color:var(--timvir-text-color);}
131
140
  .dp0smwa{pointer-events:auto;position:relative;z-index:0;}
132
141
  .d1a28btb{width:100vw;height:100vh;position:fixed;top:0px;left:0px;display:flex;align-items:flex-start;justify-content:center;pointer-events:auto;}