cherry-styled-components 0.2.13 → 0.2.14

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.
@@ -21,14 +21,14 @@ var pulseGlow = keyframes([`0%,100%{opacity:0.5;filter:blur(16px);}50%{opacity:1
21
21
  var conicStops = (colors) => [...colors, colors[0]].join(", ");
22
22
  var StyledChatLauncher = styled.button.withConfig({
23
23
  displayName: "chat-launcher__StyledChatLauncher",
24
- componentId: "sc-2dd3d5f9-0"
24
+ componentId: "sc-64539cc0-0"
25
25
  })([
26
26
  ``,
27
- `;appearance:none;outline:none;cursor:pointer;background:`,
27
+ `;appearance:none;outline:none;cursor:pointer;box-sizing:border-box;height:30px;background:`,
28
28
  `;border:solid 1px `,
29
29
  `;color:`,
30
30
  `;border-radius:`,
31
- `;padding:0;font-size:12px;font-family:inherit;font-weight:600;& .chat-launcher-inner{padding:6px 8px;display:flex;align-items:center;gap:6px;background:`,
31
+ `;padding:0;font-size:12px;font-family:inherit;font-weight:600;& .chat-launcher-inner{padding:0 8px;height:100%;display:flex;align-items:center;gap:6px;background:`,
32
32
  `;border-radius:`,
33
33
  `;}& svg{width:16px;height:16px;color:inherit;}`,
34
34
  ``
@@ -3,6 +3,7 @@
3
3
  import { resolveShowcaseCommand } from "./chat-showcase.js";
4
4
  import { jsx } from "react/jsx-runtime";
5
5
  import { createContext, useCallback, useContext, useEffect, useRef, useState } from "react";
6
+ import { flushSync } from "react-dom";
6
7
  //#region src/lib/chat-provider.tsx
7
8
  var ChatContext = /*#__PURE__*/ createContext({
8
9
  isOpen: false,
@@ -82,7 +83,8 @@ function ChatProvider({ children, onSend, greeting, historyLimit = 20, shortcut
82
83
  openerRef.current = returnFocusTo?.isConnected === true ? returnFocusTo : pendingOpener?.isConnected === true ? pendingOpener : activeElement instanceof HTMLElement && activeElement !== document.body ? activeElement : null;
83
84
  }
84
85
  isOpenRef.current = true;
85
- setIsOpen(true);
86
+ flushSync(() => setIsOpen(true));
87
+ inputRef.current?.focus();
86
88
  if (focusTimeoutRef.current) clearTimeout(focusTimeoutRef.current);
87
89
  focusTimeoutRef.current = setTimeout(() => {
88
90
  focusTimeoutRef.current = null;
@@ -7,11 +7,11 @@ import styled from "styled-components";
7
7
  //#region src/lib/chat-sources.tsx
8
8
  var StyledChatSources = styled.div.withConfig({
9
9
  displayName: "chat-sources__StyledChatSources",
10
- componentId: "sc-7fa69b52-0"
11
- })([`display:flex;gap:16px;flex-wrap:wrap;`]);
10
+ componentId: "sc-f28b3c84-0"
11
+ })([`display:flex;gap:16px;flex-wrap:wrap;&:not(:first-child){margin-top:10px;}`]);
12
12
  var StyledChatSource = styled.a.withConfig({
13
13
  displayName: "chat-sources__StyledChatSource",
14
- componentId: "sc-7fa69b52-1"
14
+ componentId: "sc-f28b3c84-1"
15
15
  })([
16
16
  `position:relative;text-decoration:none;font-size:`,
17
17
  `;line-height:1;color:`,
package/dist/prose.js CHANGED
@@ -42,7 +42,8 @@ var accent = (theme) => theme.isDark ? theme.colors.primaryLight : theme.colors.
42
42
  `;padding:2px 4px;border-radius:`,
43
43
  `;font-family:`,
44
44
  `;white-space:pre;}& pre,& .hljs{margin:10px 0;overflow-x:auto;`,
45
- `;}& .code-wrapper pre{margin:0;}& blockquote{margin:`,
45
+ `;}& .code-wrapper{margin:`,
46
+ ` 0;}& .code-wrapper pre{margin:0;}& blockquote{margin:`,
46
47
  ` 0;padding:0 0 0 16px;border-left:solid 2px `,
47
48
  `;color:`,
48
49
  `;}& hr{margin:`,
@@ -57,11 +58,11 @@ var accent = (theme) => theme.isDark ? theme.colors.primaryLight : theme.colors.
57
58
  `;`,
58
59
  `;}}& img,& video,& iframe{max-width:100%;border-radius:`,
59
60
  `;margin:10px 0;display:block;}`
60
- ], theme.colors.dark, styledText(theme), block, styledText(theme), block, theme.colors.dark, ($compact ? styledH3 : styledH1)(theme), ($compact ? styledH4 : styledH2)(theme), ($compact ? styledH5 : styledH3)(theme), ($compact ? styledH6 : styledH4)(theme), ($compact ? styledH6 : styledH5)(theme), styledH6(theme), theme.colors.primary, accent(theme), theme.colors.primary, theme.spacing.radius.xs, theme.colors.primary, theme.colors.primaryLight, block, styledText(theme), theme.colors.primary, styledText(theme), theme.colors.primary, alpha(theme.colors.primaryLight, 20), theme.colors.dark, theme.spacing.radius.xs, theme.fonts.mono, thinScrollbar, block, theme.colors.grayLight, theme.colors.grayDark, block, theme.colors.grayLight, block, thinScrollbar, theme.colors.grayLight, styledSmall(theme), theme.colors.dark, theme.colors.grayLight, theme.colors.grayDark, styledSmall(theme), theme.spacing.radius.lg);
61
+ ], theme.colors.dark, styledText(theme), block, styledText(theme), block, theme.colors.dark, ($compact ? styledH3 : styledH1)(theme), ($compact ? styledH4 : styledH2)(theme), ($compact ? styledH5 : styledH3)(theme), ($compact ? styledH6 : styledH4)(theme), ($compact ? styledH6 : styledH5)(theme), styledH6(theme), theme.colors.primary, accent(theme), theme.colors.primary, theme.spacing.radius.xs, theme.colors.primary, theme.colors.primaryLight, block, styledText(theme), theme.colors.primary, styledText(theme), theme.colors.primary, alpha(theme.colors.primaryLight, 20), theme.colors.dark, theme.spacing.radius.xs, theme.fonts.mono, thinScrollbar, block, block, theme.colors.grayLight, theme.colors.grayDark, block, theme.colors.grayLight, block, thinScrollbar, theme.colors.grayLight, styledSmall(theme), theme.colors.dark, theme.colors.grayLight, theme.colors.grayDark, styledSmall(theme), theme.spacing.radius.lg);
61
62
  };
62
63
  var StyledProse = styled.div.withConfig({
63
64
  displayName: "prose__StyledProse",
64
- componentId: "sc-91bd953a-0"
65
+ componentId: "sc-c60056db-0"
65
66
  })([``, `;`], ({ theme, $compact }) => proseStyles(theme, $compact));
66
67
  function LocalProse({ children, ...props }, ref) {
67
68
  return /*#__PURE__*/ jsx(StyledProse, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cherry-styled-components",
3
- "version": "0.2.13",
3
+ "version": "0.2.14",
4
4
  "description": "Cherry is a design system for the modern web. Designed in Figma, built in React using Typescript.",
5
5
  "private": false,
6
6
  "type": "module",
@@ -20,7 +20,7 @@
20
20
  "homepage": "https://cherry.al",
21
21
  "repository": "https://github.com/cherry-design-system/styled-components",
22
22
  "license": "MIT",
23
- "packageManager": "pnpm@11.19.0",
23
+ "packageManager": "pnpm@11.20.0",
24
24
  "engines": {
25
25
  "node": ">=18.0.0"
26
26
  },
@@ -61,7 +61,7 @@
61
61
  "@vitejs/plugin-react-swc": "^4.3.3",
62
62
  "eslint-plugin-react-hooks": "^7.1.1",
63
63
  "eslint-plugin-react-refresh": "^0.5.3",
64
- "next": "^16.2.12",
64
+ "next": "^16.3.0",
65
65
  "playwright-core": "^1.62.1",
66
66
  "prettier": "^3.9.6",
67
67
  "react": "^19.2.8",