lemma-sdk 0.2.18 → 0.2.19

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 CHANGED
@@ -181,6 +181,62 @@ import "lemma-sdk/react/styles.css";
181
181
 
182
182
  The stylesheet includes the SDK theme tokens and semantic assistant classes. You do not need the Lemma app's internal Tailwind setup just to render the assistant correctly.
183
183
 
184
+ #### Important for Tailwind apps
185
+
186
+ If your app uses Tailwind and installs `lemma-sdk` from npm, Tailwind must scan the SDK package too. Otherwise the assistant can look half-styled: native file inputs may appear, layouts can collapse, spacing disappears, and buttons/header chrome look wrong.
187
+
188
+ For Tailwind v3, add the SDK package to `content`:
189
+
190
+ ```js
191
+ // tailwind.config.js
192
+ export default {
193
+ content: [
194
+ "./index.html",
195
+ "./src/**/*.{js,ts,jsx,tsx}",
196
+ "./node_modules/lemma-sdk/dist/react/**/*.{js,mjs}",
197
+ ],
198
+ }
199
+ ```
200
+
201
+ If you are developing against a local checkout of the SDK source instead of the published npm package, scan the source files too:
202
+
203
+ ```js
204
+ // tailwind.config.js
205
+ export default {
206
+ content: [
207
+ "./index.html",
208
+ "./src/**/*.{js,ts,jsx,tsx}",
209
+ "../lemma-typescript/src/react/**/*.{ts,tsx}",
210
+ ],
211
+ }
212
+ ```
213
+
214
+ If you alias the package to local SDK source in Vite, make sure the alias points at the React source and stylesheet:
215
+
216
+ ```ts
217
+ // vite.config.ts
218
+ import path from "node:path";
219
+
220
+ export default {
221
+ resolve: {
222
+ alias: {
223
+ "lemma-sdk/react/styles.css": path.resolve(__dirname, "../lemma-typescript/src/react/styles.css"),
224
+ "lemma-sdk/react": path.resolve(__dirname, "../lemma-typescript/src/react/index.ts"),
225
+ "lemma-sdk": path.resolve(__dirname, "../lemma-typescript/src/index.ts"),
226
+ },
227
+ },
228
+ };
229
+ ```
230
+
231
+ Quick checklist for developers:
232
+
233
+ - import `lemma-sdk/react/styles.css` once
234
+ - give the assistant container a real height
235
+ - if the assistant is inside flex/grid, add `min-height: 0` on the relevant parent
236
+ - if you use Tailwind, scan the SDK package or SDK source
237
+ - if you use `AssistantEmbedded`, pass `theme` directly there
238
+ - if you use `AssistantExperienceView`, wrap it in `AssistantThemeScope`
239
+
184
240
  The assistant UI renders markdown by default:
185
241
 
186
242
  - GitHub-flavored markdown is enabled for assistant and user messages
@@ -86,6 +86,28 @@
86
86
  :where(.light, [data-theme="light"], [data-color-scheme="light"], [data-mode="light"]) .lemma-assistant-theme:not([data-lemma-theme="dark"]),
87
87
  .lemma-assistant-theme[data-lemma-theme="light"] {
88
88
  color-scheme: light;
89
+ --bg-canvas: #f6f2ea;
90
+ --bg-surface: #fffdf9;
91
+ --bg-subtle: #f1ebde;
92
+ --border-default: #ddd2bb;
93
+ --border-subtle: #ebe2d0;
94
+ --text-primary: #241f16;
95
+ --text-secondary: #5c5344;
96
+ --text-tertiary: #8a7f6f;
97
+ --text-inverse: #fffdf9;
98
+ --text-on-brand: #fffdf9;
99
+ --brand-primary: #202418;
100
+ --brand-secondary: #6e8c56;
101
+ --brand-accent: #c78a2c;
102
+ --brand-glow: #efe3c7;
103
+ --state-success: #3e7a3c;
104
+ --state-error: #b44d36;
105
+ --state-info: #2f6fb2;
106
+ --state-warning: #c78a2c;
107
+ --shadow-xs: 0 1px 2px rgba(36, 31, 22, 0.08);
108
+ --shadow-sm: 0 8px 24px rgba(36, 31, 22, 0.08);
109
+ --shadow-md: 0 18px 36px rgba(36, 31, 22, 0.1);
110
+ --shadow-lg: 0 24px 48px rgba(36, 31, 22, 0.14);
89
111
  }
90
112
 
91
113
  :where(.dark, [data-theme="dark"], [data-color-scheme="dark"], [data-mode="dark"]) .lemma-assistant-theme:not([data-lemma-theme="light"]),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lemma-sdk",
3
- "version": "0.2.18",
3
+ "version": "0.2.19",
4
4
  "description": "Official TypeScript SDK for Lemma pod-scoped APIs",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",