Releases: CasualOffice/sheets
@schnsrw/casual-sheets@0.8.0
Minor Changes
-
Sheet toolbar v0.8: number formats, freeze, wrap.
Adds to the
casual.command.executeunion:numfmt-currency,numfmt-percent— single-tap applynumfmt-add-decimal,numfmt-subtract-decimal— decimal steppernumfmt-custom { args.pattern }— Excel-style pattern (e.g."d-mmm-yy","#,##0.00")wrap-toggle— flip text wrap on the selectionfreeze-first-row,freeze-first-column,freeze-none— header freezing
All map onto canonical Univer command ids (
sheet.command.numfmt.set.currency,sheet.command.set-text-wrap,sheet.command.set-first-row-frozen, etc.). No new format-state read-back yet — the host knows what it just dispatched, which is enough for v0.8's UX.
@schnsrw/casual-sheets@0.7.0
Minor Changes
-
Sheet toolbar v0.7: rich format commands + read-back
Adds to the
casual.command.executeunion (host → editor):set-font-family({ args.family })set-font-size({ args.size })set-text-color/reset-text-color({ args.color })set-bg-color/reset-bg-color({ args.color })merge/unmerge
Widens
SelectionFormatStateData(editor → host) withfontFamily,
fontSize,textColor,bgColorread off the active cell so hosts
can keep font / size pickers + colour swatches in sync without polling
Univer directly.Fixes the v0.6 strikethrough command id (the bad
set-range-strike-through
which doesn't exist; the canonical id isset-range-stroke).
@schnsrw/casual-sheets@0.6.0
Minor Changes
-
Host-controlled toolbar wire (UX-EDITOR-1):
New protocol envelopes
casual.command.execute { command }— host → editor. Initial union:undo | redo | bold | italic | underline | strikethrough | align-left | align-center | align-right. Maps to the corresponding Univer command ids inside the iframe.casual.selection.format-state { bold, italic, underline, strikethrough, align }— editor → host. Emitted on a 200 ms poll while the workbook is mounted so hosts can mirror the active cell's format flags in their toolbar's pressed state.
CasualSheetsIframe ref gains
executeCommand(command). CasualSheetsIframeProps gainsonSelectionFormatState(data). Drive (or any host) can now render its own toolbar above the iframe and dispatch commands without needing Univer's built-in ribbon (which the SDK can't ship because the ribbon plugins require IRPCChannelService and no worker is bundled).Font / size / colour / fill / merge / row+column ops are intentionally NOT in v0.6 — they need a richer command-execute payload shape we haven't locked yet.
@schnsrw/casual-sheets@0.5.7
Patch Changes
- embed-runtime: viewMode='editor' enables Univer's formula bar + menubar (A1 ref, fx, X/✓) so the embed is visually distinct from preview mode. Toolbar + footer stay off because their workbench-mount path resolves IRPCChannelService at construction (no worker bundled). Cells remain editable via direct keyboard input.
@schnsrw/casual-sheets@0.5.6
Patch Changes
-
Drop
UniverSheetsFormulaPlugin+UniverSheetsFormulaUIPluginfrom
the CasualSheets plugin chain — they resolveIRPCChannelService
via Univer's DI at construction, and with no
UniverRPCMainThreadPluginregistered (the SDK doesn't bundle a
formula worker) the resolve fails with the visible console error
"[redi]: Expect 1 dependency item(s) for id IRPCChannelService".Cells stay editable; formula computation is the lost capability
(already disabled in 0.5.x vianotExecuteFormula: true). A future
revision can let consumers opt in to a bundled formula worker.Also: embed-runtime passes a UI preset to
<CasualSheets ui={...}>
based on theviewModeURL param so preview mode renders just the
canvas. Editor mode currently uses the same preset (the toolbar
chrome requires sheets-ui plugins not yet bundled into the embed
runtime — tracked for 0.6.x).
@schnsrw/casual-sheets@0.5.5
Patch Changes
- Three fixes for end-to-end iframe rendering:
- embed-runtime imports
../styles(Univer CSS) so injectStyle bundles
Univer's stylesheet into the runtime. Without this the workbench
mounted but rendered unstyled (canvas at 0×0). - Emit
parser.worker.jsdirectly from the embedRuntimeConfig
(alongside embed-runtime.js) instead of relying on a post-build
copy from mainConfig — the configs run in parallel so the copy
races and silently fails. - CasualSheets passes
notExecuteFormula: trueto the formula
plugins so the bundle doesn't hang waiting for an
UniverRPCMainThreadPlugin formula worker that the SDK never
registers.
- embed-runtime imports
@schnsrw/casual-sheets@0.5.4
Patch Changes
noExternal: ['exceljs', /^@univerjs\//]so the parser worker
bundles @univerjs/core (it imports LocaleType + CustomRangeType).
0.5.3 only added exceljs to noExternal; the worker still had
import { ... } from "@univerjs/core"as a bare specifier and
closed silently at load. The "OOM" error message the embed-runtime
emitted was misleading — it was just an unresolvable bare import
in a module-script worker.
@schnsrw/casual-sheets@0.5.3
Patch Changes
- Three fixes to make the iframe embed actually render:
platform: 'browser'on the main tsup config so the parser worker
bundles exceljs's browser fork (no Nodestream/buffer/util
requires that broke worker init).- embed-runtime calls
transport.sendReady()aftersendHello(). The
host (CasualSheetsIframe) only sends its hello inside
onEditorReady; without an eagercasual.readyfrom the iframe,
the handshake deadlocked and bytes never loaded. - New tsup plugin copies
dist/parser.worker.jsintodist/embed/
so thenew URL('./parser.worker.js', import.meta.url)resolution
inside the runtime finds the worker under{embedBasePath}/.
@schnsrw/casual-sheets@0.5.2
Patch Changes
- Add
platform: 'browser'to the embed-runtime tsup config so esbuild
picks the browser variant of dual-target deps (nanoid, etc.). 0.5.1
bundled everything but still grabbedimport { ... } from 'crypto'
from the Node fork of nanoid, which the browser can't resolve. The
runtime now lands fully clean.
@schnsrw/casual-sheets@0.5.1
Patch Changes
-
Bundle React + Univer + all deps into the embed-runtime instead of
leaving them as external imports. The previous build expected the
consumer to provide an importmap; consumers like Casual Drive that
embed via<iframe src="…/embed.html">had no way to do that, and
the bareimport 'react'failed at runtime in the browser.The runtime now ships ~11MB self-contained (cached after first load).