@lostgradient/cinder 0.13.0 → 0.15.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 (57) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/README.md +6 -6
  3. package/components.json +49 -1
  4. package/dist/components/chat/conversation-model.d.ts +1 -1
  5. package/dist/components/chat/index.d.ts +5 -3
  6. package/dist/components/chat/index.js +110 -96
  7. package/dist/components/chat-conversation-header/index.js +3 -3
  8. package/dist/components/diff-viewer/index.js +32 -32
  9. package/dist/components/json-schema-editor/index.js +32 -32
  10. package/dist/components/markdown-editor/index.js +20 -20
  11. package/dist/components/review-editor/index.js +88 -88
  12. package/dist/components/selectable-row/index.d.ts +5 -0
  13. package/dist/components/selectable-row/index.js +288 -0
  14. package/dist/components/selectable-row/selectable-row.css +128 -0
  15. package/dist/components/selectable-row/selectable-row.css.d.ts +1 -0
  16. package/dist/components/selectable-row/selectable-row.schema.d.ts +3 -0
  17. package/dist/components/selectable-row/selectable-row.schema.js +155 -0
  18. package/dist/components/selectable-row/selectable-row.svelte.d.ts +24 -0
  19. package/dist/components/selectable-row/selectable-row.types.d.ts +84 -0
  20. package/dist/components/selectable-row/selectable-row.variables.d.ts +2 -0
  21. package/dist/components/selectable-row/selectable-row.variables.js +68 -0
  22. package/dist/index.d.ts +2 -0
  23. package/dist/index.js +3946 -3712
  24. package/dist/server/components/chat/index.js +14 -4
  25. package/dist/server/components/chat-conversation-header/index.js +2 -2
  26. package/dist/server/components/diff-viewer/index.js +2 -2
  27. package/dist/server/components/json-schema-editor/index.js +2 -2
  28. package/dist/server/components/markdown-editor/index.js +1 -1
  29. package/dist/server/components/review-editor/index.js +51 -51
  30. package/dist/server/components/selectable-row/index.js +12 -0
  31. package/dist/server/components/side-navigation/index.js +2 -2
  32. package/dist/server/index.js +32 -27
  33. package/dist/server/{index.server-3w72dxz7.js → index.server-0jhra85x.js} +4 -4
  34. package/dist/server/index.server-1gzbrhhh.js +151 -0
  35. package/dist/server/{index.server-ck3fwrab.js → index.server-46cjwcqw.js} +1 -1
  36. package/dist/server/{index.server-2zdbz3rj.js → index.server-8rmtb8vx.js} +4 -4
  37. package/dist/server/{index.server-grgv455a.js → index.server-9ra3xv88.js} +26 -26
  38. package/dist/server/{index.server-4x4hgvqe.js → index.server-czf35aba.js} +127 -116
  39. package/dist/server/{index.server-2s5h1d05.js → index.server-nphtb2ey.js} +1 -1
  40. package/dist/server/{index.server-p071e531.js → index.server-t1x9h8cb.js} +1 -1
  41. package/dist/server/{index.server-v3arexq8.js → index.server-vhyjjx9z.js} +32 -32
  42. package/package.json +37 -6
  43. package/src/components/chat/chat.examples.json +6 -0
  44. package/src/components/chat/container/chat.svelte +1 -1
  45. package/src/components/chat/conversation-model.ts +11 -0
  46. package/src/components/chat/index.ts +25 -3
  47. package/src/components/selectable-row/index.ts +12 -0
  48. package/src/components/selectable-row/selectable-row.css +128 -0
  49. package/src/components/selectable-row/selectable-row.examples.json +13 -0
  50. package/src/components/selectable-row/selectable-row.schema.json +95 -0
  51. package/src/components/selectable-row/selectable-row.schema.ts +104 -0
  52. package/src/components/selectable-row/selectable-row.svelte +95 -0
  53. package/src/components/selectable-row/selectable-row.types.ts +97 -0
  54. package/src/components/selectable-row/selectable-row.variables.json +8 -0
  55. package/src/components/selectable-row/selectable-row.variables.ts +10 -0
  56. package/src/index.ts +9 -0
  57. package/src/styles/components.css +1 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # @lostgradient/cinder
2
2
 
3
+ ## 0.15.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#757](https://github.com/stevekinney/cinder/pull/757) [`792a36d`](https://github.com/stevekinney/cinder/commit/792a36dcf267dcc3f5362f2716b5ab8060b34b5b) Thanks [@stevekinney](https://github.com/stevekinney)! - Improve Chat dependency ownership, streaming exports, and automatic component CSS imports.
8
+
9
+ ### Patch Changes
10
+
11
+ - [#759](https://github.com/stevekinney/cinder/pull/759) [`278ed74`](https://github.com/stevekinney/cinder/commit/278ed74bc6125daa4be3fdfaaa41c78114c6d009) Thanks [@stevekinney](https://github.com/stevekinney)! - Fix Chat SSR hydration stability for empty conversations.
12
+
13
+ ## 0.14.0
14
+
15
+ ### Minor Changes
16
+
17
+ - [#747](https://github.com/stevekinney/cinder/pull/747) [`fd1f5dc`](https://github.com/stevekinney/cinder/commit/fd1f5dcc73f279450523deae2b4aed3641581cb7) Thanks [@stevekinney](https://github.com/stevekinney)! - Add SelectableRow with a native primary button or link and independent trailing actions.
18
+
19
+ ### Patch Changes
20
+
21
+ - [#748](https://github.com/stevekinney/cinder/pull/748) [`f2d7f43`](https://github.com/stevekinney/cinder/commit/f2d7f43b054aee08e57ddc477cc6b5473ba6655b) Thanks [@stevekinney](https://github.com/stevekinney)! - Keep published Svelte source and server bundles on the same scoped-style identity so SSR component trees hydrate without mismatches.
22
+
3
23
  ## 0.13.0
4
24
 
5
25
  ### Minor Changes
package/README.md CHANGED
@@ -32,27 +32,25 @@ import '@lostgradient/cinder/styles';
32
32
  import '@lostgradient/cinder/styles/guard';
33
33
  ```
34
34
 
35
- `@lostgradient/cinder/styles` is the base stylesheet. Import it once at your app entry before any component stylesheet. It declares cinder's cascade-layer order, design tokens, foundation rules, utilities, and shared internal chrome.
35
+ `@lostgradient/cinder/styles` is the base stylesheet. Import it once at your app entry before importing any cinder component. It declares cinder's cascade-layer order, design tokens, foundation rules, utilities, and shared internal chrome.
36
36
 
37
37
  `@lostgradient/cinder/styles/guard` is development-only. It warns if the base stylesheet is missing or loaded too late.
38
38
 
39
- Then import components and their styles from matching subpaths:
39
+ Then import the components you use. In browser/Svelte-aware builds, component entry points automatically include their co-located CSS; no matching `/styles` import is required:
40
40
 
41
41
  ```svelte
42
42
  <script lang="ts">
43
43
  import Button from '@lostgradient/cinder/button';
44
- import '@lostgradient/cinder/button/styles';
45
44
  </script>
46
45
 
47
46
  <Button variant="primary" label="Save changes" />
48
47
  ```
49
48
 
50
- Component styles are separate so bundlers can include only what you use:
49
+ The same applies to other components:
51
50
 
52
51
  ```svelte
53
52
  <script lang="ts">
54
53
  import Modal from '@lostgradient/cinder/modal';
55
- import '@lostgradient/cinder/modal/styles';
56
54
  </script>
57
55
 
58
56
  <Modal open title="Edit project" />
@@ -64,7 +62,9 @@ You can also import the component module from TypeScript:
64
62
  import Modal from '@lostgradient/cinder/modal';
65
63
  ```
66
64
 
67
- Compound components include their leaf styles from the parent stylesheet. For example, `@lostgradient/cinder/tabs/styles` covers `Tabs`, `Tabs.List`, `Tabs.Trigger`, and `Tabs.Panel`.
65
+ Compound components include their leaf styles from the parent entry. For example, importing `@lostgradient/cinder/tabs` covers `Tabs`, `Tabs.List`, `Tabs.Trigger`, and `Tabs.Panel`.
66
+
67
+ The `/styles` subpaths remain published for explicit CSS composition and advanced bundler setups. Use `@lostgradient/cinder/styles/all` when you want one stylesheet with every component, or the base stylesheet plus specific `/styles` sidecars when you intentionally manage CSS imports yourself.
68
68
 
69
69
  If you want one stylesheet with everything, use:
70
70
 
package/components.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "manifestVersion": 1,
4
4
  "package": {
5
5
  "name": "@lostgradient/cinder",
6
- "version": "0.13.0",
6
+ "version": "0.15.0",
7
7
  "framework": "svelte",
8
8
  "frameworkVersionRange": ">=5.56.0 <6",
9
9
  "classPrefix": "cinder-",
@@ -4461,6 +4461,54 @@
4461
4461
  "examples": "@lostgradient/cinder/select/examples"
4462
4462
  }
4463
4463
  },
4464
+ {
4465
+ "name": "SelectableRow",
4466
+ "id": "selectable-row",
4467
+ "import": "@lostgradient/cinder/selectable-row",
4468
+ "exportName": "SelectableRow",
4469
+ "category": "action",
4470
+ "status": "beta",
4471
+ "purpose": "Full-width row with a native button or link primary action and independent sibling trailing actions.",
4472
+ "tags": ["row", "list", "selection", "navigation"],
4473
+ "useWhen": [
4474
+ "The main row body must activate as one native action while rename, menu, or external-link controls remain independently focusable.",
4475
+ "A rich row needs leading, title, description, and metadata regions plus multiple trailing controls."
4476
+ ],
4477
+ "avoidWhen": [
4478
+ {
4479
+ "reason": "The entire row is one button with no interactive trailing content.",
4480
+ "alternative": "action-row"
4481
+ },
4482
+ {
4483
+ "reason": "Only the title links and the rest of the row is static record content.",
4484
+ "alternative": "stacked-list-item"
4485
+ }
4486
+ ],
4487
+ "related": ["action-row", "stacked-list-item", "button"],
4488
+ "hasConstraints": false,
4489
+ "hasExamples": true,
4490
+ "artifacts": {
4491
+ "schema": "@lostgradient/cinder/selectable-row/schema",
4492
+ "variables": "@lostgradient/cinder/selectable-row/variables",
4493
+ "examples": "@lostgradient/cinder/selectable-row/examples"
4494
+ },
4495
+ "a11y": {
4496
+ "pattern": "Native button or link",
4497
+ "keyboard": [
4498
+ {
4499
+ "keys": "Enter",
4500
+ "action": "Activates the primary button or link."
4501
+ },
4502
+ {
4503
+ "keys": "Space",
4504
+ "action": "Activates the primary action when it is a button."
4505
+ }
4506
+ ],
4507
+ "notes": [
4508
+ "The primary action and trailing controls are siblings, so trailing activation never bubbles through the primary action."
4509
+ ]
4510
+ }
4511
+ },
4464
4512
  {
4465
4513
  "name": "SelectionPopover",
4466
4514
  "id": "selection-popover",
@@ -8,7 +8,7 @@
8
8
  * @module
9
9
  */
10
10
  import type { ToMarkdownOptions as ConversationalistToMarkdownOptions } from 'conversationalist/markdown';
11
- export type { AssistantMessage, ContainerUploadContent, ConversationEnvironment, ConversationHistory, ConversationStatus, ImageContent, JSONValue, Message, MessageInput, MessageRole, MultiModalContent, RedactedThinkingContent, ServerToolResultContent, ServerToolResultType, ServerToolUseContent, TextContent, ThinkingContent, TokenUsage, ToolAction, ToolCall, ToolError, ToolErrorCategory, ToolResult, WebSearchToolResultContent, } from 'conversationalist';
11
+ export type { AssistantMessage, ContainerUploadContent, Conversation, ConversationActionType, ConversationEnvironment, ConversationEvent, ConversationEventMap, ConversationEventType, ConversationHistory, ConversationHistoryDraft, ConversationNodeSnapshot, ConversationSnapshot, ConversationStatus, ImageContent, JSONValue, Message, MessageInput, MessageRole, MultiModalContent, RedactedThinkingContent, ServerToolResultContent, ServerToolResultType, ServerToolUseContent, TextContent, ThinkingContent, TokenUsage, ToolAction, ToolCall, ToolCallInput, ToolError, ToolErrorCategory, ToolInteraction, ToolResult, ToolResultInput, WebSearchToolResultContent, } from 'conversationalist';
12
12
  export type { ToolCallPair } from 'conversationalist/utilities';
13
13
  /** Base options shared by all transcript export operations. */
14
14
  export type ExportOptions = Omit<ConversationalistToMarkdownOptions, 'includeMetadata'>;
@@ -5,19 +5,21 @@
5
5
  *
6
6
  * @module
7
7
  */
8
+ import { CURRENT_SCHEMA_VERSION } from 'conversationalist/versioning';
8
9
  import './chat.css';
9
10
  import Chat from './chat.svelte';
10
11
  export default Chat;
11
12
  export type { ChatAnnounceLevel, ChatCapabilities, ChatProps, ReadReceipt, TypingParticipant, } from './chat.types.ts';
12
- export { Chat };
13
+ export { Chat, CURRENT_SCHEMA_VERSION };
13
14
  export type { ChatAdapter, ChatAdapterErrorEvent, ChatCommand, ChatPushHandlers, ChatReadReceiptEvent, } from './adapter';
14
15
  export { appendAssistantMessage, appendMessages, appendUserMessage, createConversation, } from './builders.ts';
15
- export type { AssistantMessage, ContainerUploadContent, ConversationEnvironment, ConversationHistory, ConversationStatus, ExportOptions, ImageContent, JSONValue, Message, MessageInput, MessageRole, MultiModalContent, RedactedThinkingContent, ServerToolResultContent, ServerToolResultType, ServerToolUseContent, TextContent, ThinkingContent, ToMarkdownOptions, TokenUsage, ToolAction, ToolCall, ToolCallPair, ToolError, ToolErrorCategory, ToolResult, WebSearchToolResultContent, } from './conversation-model.ts';
16
+ export { appendStreamingMessage, cancelStreamingMessage, finalizeStreamingMessage, updateStreamingMessage, } from 'conversationalist/streaming';
17
+ export type { AssistantMessage, ContainerUploadContent, Conversation, ConversationActionType, ConversationEnvironment, ConversationEvent, ConversationEventMap, ConversationEventType, ConversationHistory, ConversationHistoryDraft, ConversationNodeSnapshot, ConversationSnapshot, ConversationStatus, ExportOptions, ImageContent, JSONValue, Message, MessageInput, MessageRole, MultiModalContent, RedactedThinkingContent, ServerToolResultContent, ServerToolResultType, ServerToolUseContent, TextContent, ThinkingContent, TokenUsage, ToMarkdownOptions, ToolAction, ToolCall, ToolCallInput, ToolCallPair, ToolError, ToolErrorCategory, ToolInteraction, ToolResult, ToolResultInput, WebSearchToolResultContent, } from './conversation-model.ts';
16
18
  export { formatMessageAsMarkdown, getMessageRoleLabel, getMessageText, messagesToMarkdown, type ChatExportOptions, type DeliveryStatus, } from './utilities';
17
19
  export { ChatAttachmentPreview, ChatInput, deriveAttachmentKind, serializeChatAttachment, serializeChatAttachments, } from './input';
18
20
  export type { AttachmentKind, ChatAttachment, SerializedChatAttachment } from './input';
19
21
  export { ChatDateSeparator, ChatMessage, MessageAttachments, MessageContent, ToolCallGroup, } from './message';
20
- export { DEFAULT_SCROLL_CONFIGURATION, calculateScrollToBottom, calculateUnreadCount, extractTimestamp, findUnreadBoundaryIndex, isAtBottom, shouldShowJumpToLatest, } from './container';
22
+ export { calculateScrollToBottom, calculateUnreadCount, DEFAULT_SCROLL_CONFIGURATION, extractTimestamp, findUnreadBoundaryIndex, isAtBottom, shouldShowJumpToLatest, } from './container';
21
23
  export type { ChatScrollStateChangeEvent, ChatStopGeneratingEvent, ChatSubmitEvent, ChatUnreadIndicatorChangeEvent, ScrollConfiguration, ScrollState, } from './container';
22
24
  export { ConversationExportActions } from './export';
23
25
  export { ArtifactPanel, ArtifactViewer, ChatArtifactLayout } from './artifact';