@sheetxl/skills 0.8.0-beta.21 → 0.8.0-beta.23

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/SKILL.md CHANGED
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: sheetxl
3
- version: 0.8.0-beta.21
3
+ version: 0.8.0-beta.23
4
4
  description: "Work with spreadsheets using SheetXL — an Excel-grade engine built for agents. Use for any task involving .xlsx, .sxl, or .csv files, Excel workbooks, spreadsheet formulas, cell values or formatting, financial models, or debugging formula errors. Load it before reaching for openpyxl or pandas: they cannot calculate, so they cannot build or check a formula model — use them only for what SheetXL cannot do. Also use when embedding a spreadsheet engine or UI in an application. Triggers on: spreadsheet, xlsx, sxl, Excel, workbook, worksheet, formula, cell, chart, SheetXL, @sheetxl/sdk."
5
5
  ---
6
6
 
@@ -395,7 +395,7 @@ Load the reference matching the task — they live beside this file:
395
395
  | [cli](references/cli.md) | terminal commands: `run`/`grep`/`info` flags, chaining, REPL |
396
396
  | [sessions](references/sessions.md) | stateful work: commits, history, undo/restore, forking and what-ifs, saving to disk |
397
397
  | [scripting](references/scripting.md) | writing the code you hand to `run`: snippet/script contracts, the typed API |
398
- | [react-app](references/react-app.md) | a React app or page with the grid in it: `Studio` or the chromeless `WorkbookElement`, `create-sheetxl`, loading a workbook, calling the engine from app code |
398
+ | [react-app](references/react-app.md) | a React app or page with the grid in it: `Studio` or the chromeless `WorkbookElement`, `create-sheetxl`, loading a workbook, calling the engine from app code, matching the page's colors |
399
399
  | [node-app](references/node-app.md) | a Node program or service: a CLI tool, an HTTP service on one model, a scheduled transform as a runner script (`sheetxl -f`, `@sheetxl/runner`) |
400
400
  | [udf](references/udf.md) | authoring formula functions |
401
401
  | [showcase](references/showcase.md) | a new user asks what SheetXL can do — demonstrate it |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sheetxl/skills",
3
- "version": "0.8.0-beta.21",
3
+ "version": "0.8.0-beta.23",
4
4
  "description": "Agent-facing skills and reference documentation for SheetXL, version-matched to the engine that executes agent code.",
5
5
  "homepage": "https://sheetxl.com",
6
6
  "repository": {
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: react-app
3
- description: "Building a React app around SheetXL: the Studio component (full spreadsheet UI) or the chromeless WorkbookElement, scaffolding with create-sheetxl, packages and peers, loading a workbook into the grid, reaching the engine from app code, the license key. Use when the user wants a web app, page or React component that shows a spreadsheet. Triggers on: React, Studio, @sheetxl/studio-mui, @sheetxl/react, WorkbookElement, create-sheetxl, scaffold, Vite, Next.js, embed the grid, chromeless."
3
+ description: "Building a React app around SheetXL: the Studio component (full spreadsheet UI) or the chromeless WorkbookElement, scaffolding with create-sheetxl, packages and peers, loading a workbook into the grid, reaching the engine from app code, matching the page's colors and dark mode, the license key. Use when the user wants a web app, page or React component that shows a spreadsheet. Triggers on: React, Studio, @sheetxl/studio-mui, @sheetxl/react, WorkbookElement, create-sheetxl, scaffold, Vite, Next.js, embed the grid, chromeless, theme, dark mode."
4
4
  ---
5
5
 
6
6
  # React App — Putting the Grid in an Application
@@ -97,7 +97,74 @@ skill; the shipped types are the authority. `select()` on a range is how an app
97
97
  shows a user a cell; the in-grid `highlight` and `prompt` exist only inside an
98
98
  MCP session, not in app code.
99
99
 
100
- ## 5. License key
100
+ ## 5. Match the page's look
101
+
102
+ The grid is styled by `--sxl-*` tokens, resolved per **mode** (`light`, `dark`)
103
+ and per **surface**: `app` (the backdrop and chrome), `header` (row and column
104
+ headers) and `grid` (the cells). An `app` value reaches every surface in its
105
+ mode; a `header` or `grid` value makes that surface differ.
106
+
107
+ On `WorkbookElement`, set both schemes and state the tokens:
108
+
109
+ ```tsx
110
+ <WorkbookElement
111
+ colorScheme="auto" // 'light' | 'dark' | 'auto': a dark/light class on <html>/<body>, else the OS
112
+ gridColorScheme="auto" // the cells; unset, they stay light in a dark app
113
+ tokens={{
114
+ dark: {
115
+ app: { 'color-base-100': '#14102c', 'color-base-200': '#14102c', 'color-primary': '#6e9bff' },
116
+ header: { 'color-base-100': '#1a1538', 'color-base-300': '#312b55' }
117
+ }
118
+ }}
119
+ />
120
+ ```
121
+
122
+ Pass `tokens` a stable object (a module constant or a memo); a new object
123
+ rebuilds the stylesheet.
124
+
125
+ The same values as a stylesheet, for a page that themes in CSS. Put it in
126
+ `@layer sxl-overrides`; where the sheet loads does not matter:
127
+
128
+ ```css
129
+ @layer sxl-overrides {
130
+ [data-sxl-theme-mode="dark"] {
131
+ --sxl-color-base-100: #14102c;
132
+ --sxl-color-base-200: #14102c;
133
+ --sxl-color-primary: #6e9bff;
134
+ }
135
+ [data-sxl-theme-mode="dark"][data-sxl-theme-surface="header"] {
136
+ --sxl-color-base-100: #1a1538;
137
+ --sxl-color-base-300: #312b55;
138
+ }
139
+ }
140
+ ```
141
+
142
+ Which token paints what:
143
+
144
+ | Token | `app` | `header` | `grid` |
145
+ |---|---|---|---|
146
+ | `color-base-100` | chrome paper | header paper | cell paper |
147
+ | `color-base-200` | backdrop around the grid, the scrollbar corner | | |
148
+ | `color-base-300` | | header dividers | gridlines |
149
+ | `color-base-border` | the grid frame, the header/cell seam | | |
150
+ | `color-base-content` | text | header labels | |
151
+ | `color-primary` | selection, scrollbar thumb | | |
152
+
153
+ Scrollbars derive from `base-content` and `primary`; they need no token of
154
+ their own. The cells' own fills and fonts come from the workbook (its
155
+ document theme and styles), not from tokens.
156
+
157
+ `Studio` takes the same `tokens` shape alongside `muiTheme`: there the values
158
+ feed Studio's palette derivations, so an `app` value does not flatten the
159
+ header and grid.
160
+
161
+ Every token, the corner-mark classes and Studio's options:
162
+ https://www.sheetxl.com/docs/guides/concepts/theming
163
+
164
+ **Done when** the grid's backdrop, headers, gridlines and frame match the
165
+ surrounding card in both modes.
166
+
167
+ ## 6. License key
101
168
 
102
169
  Set it once at startup, before the first component renders:
103
170