Skip to content

Releases: CasualOffice/sheets

@schnsrw/casual-sheets@0.8.0

17 Jun 20:12

Choose a tag to compare

Minor Changes

  • Sheet toolbar v0.8: number formats, freeze, wrap.

    Adds to the casual.command.execute union:

    • numfmt-currency, numfmt-percent — single-tap apply
    • numfmt-add-decimal, numfmt-subtract-decimal — decimal stepper
    • numfmt-custom { args.pattern } — Excel-style pattern (e.g. "d-mmm-yy", "#,##0.00")
    • wrap-toggle — flip text wrap on the selection
    • freeze-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

17 Jun 18:28

Choose a tag to compare

Minor Changes

  • Sheet toolbar v0.7: rich format commands + read-back

    Adds to the casual.command.execute union (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) with fontFamily,
    fontSize, textColor, bgColor read 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 is set-range-stroke).

@schnsrw/casual-sheets@0.6.0

16 Jun 22:31

Choose a tag to compare

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 gains onSelectionFormatState(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

15 Jun 23:28

Choose a tag to compare

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

15 Jun 19:10

Choose a tag to compare

Patch Changes

  • Drop UniverSheetsFormulaPlugin + UniverSheetsFormulaUIPlugin from
    the CasualSheets plugin chain — they resolve IRPCChannelService
    via Univer's DI at construction, and with no
    UniverRPCMainThreadPlugin registered (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 via notExecuteFormula: 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 the viewMode URL 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

12 Jun 00:54

Choose a tag to compare

Patch Changes

  • Three fixes for end-to-end iframe rendering:
    1. 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).
    2. Emit parser.worker.js directly 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.
    3. CasualSheets passes notExecuteFormula: true to the formula
      plugins so the bundle doesn't hang waiting for an
      UniverRPCMainThreadPlugin formula worker that the SDK never
      registers.

@schnsrw/casual-sheets@0.5.4

12 Jun 00:29

Choose a tag to compare

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

12 Jun 00:15

Choose a tag to compare

Patch Changes

  • Three fixes to make the iframe embed actually render:
    1. platform: 'browser' on the main tsup config so the parser worker
      bundles exceljs's browser fork (no Node stream / buffer / util
      requires that broke worker init).
    2. embed-runtime calls transport.sendReady() after sendHello(). The
      host (CasualSheetsIframe) only sends its hello inside
      onEditorReady; without an eager casual.ready from the iframe,
      the handshake deadlocked and bytes never loaded.
    3. New tsup plugin copies dist/parser.worker.js into dist/embed/
      so the new URL('./parser.worker.js', import.meta.url) resolution
      inside the runtime finds the worker under {embedBasePath}/.

@schnsrw/casual-sheets@0.5.2

11 Jun 23:40

Choose a tag to compare

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 grabbed import { ... } 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

11 Jun 23:07

Choose a tag to compare

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 bare import 'react' failed at runtime in the browser.

    The runtime now ships ~11MB self-contained (cached after first load).