univer-integrate
БесплатноЗапускает вложенные скриптыНе проверенIntegrate Univer Sheets, Docs, or Slides into React, Vue 3, HTML, or Node.js projects. Use when embedding Univer, choosing preset or plugin mode, initializing…
от dream-num★ 83 звезды на GitHubОб этом скилле
Univer Integrate
Embed Univer in an application and operate it through the public Facade API.
Source baseline: Univer
1.0.0-beta.0, synchronized with the currentdream-num/universource. First inspect the user's installed@univerjs/*version and existing setup; preserve that version when modifying an existing project.
1.0 product boundary
The product matrix represented by UniverInstanceType now covers Sheets, Docs, Slides, Bases, Boards, and PDFs. This OSS skill owns Sheets and Docs preset integration plus the OSS Slides package boundary. Use univer-pro-integrate for the current licensed Slides product and for Bases, Boards, or PDFs; those products use separate Pro plugins, Facade entries, CSS, and unit snapshots.
Choose an integration mode
- Use Preset Mode for a new application or ordinary integration. Presets compose the required plugins and Facade registrations; browser styles and locale bundles remain explicit imports.
- Use Plugin Mode only when the application needs custom loading, smaller bundles, plugin replacement, or exact registration control. Read
references/plugin-registry.mdbefore composing plugins manually. - Use
univer-node-backendfor a dedicated headless Node.js workflow.
Quick start: Sheets preset
Keep every @univerjs/* dependency on one exact version:
npm install @univerjs/[email protected] @univerjs/[email protected] [email protected] [email protected] [email protected]
import { UniverSheetsCorePreset } from '@univerjs/preset-sheets-core';
import UniverPresetSheetsCoreEnUS from '@univerjs/preset-sheets-core/locales/en-US';
import { createUniver, defaultTheme, LocaleType, mergeLocales } from '@univerjs/presets';
import '@univerjs/preset-sheets-core/lib/index.css';
const { univer, univerAPI } = createUniver({
locale: LocaleType.EN_US,
locales: {
[LocaleType.EN_US]: mergeLocales(UniverPresetSheetsCoreEnUS),
},
theme: defaultTheme,
presets: [
UniverSheetsCorePreset({
container: 'app',
}),
],
});
const workbook = univerAPI.createWorkbook({
id: 'workbook-1',
name: 'Demo',
sheetOrder: ['sheet-1'],
sheets: {
'sheet-1': {
id: 'sheet-1',
name: 'Sheet1',
rowCount: 100,
columnCount: 20,
},
},
});
workbook.getActiveSheet()!.getRange('A1:B2').setValues([
['Hello', 'Univer'],
[1, 2],
]);
window.addEventListener('pagehide', () => univer.dispose(), { once: true });
In a component framework, call univer.dispose() from the component's own teardown instead.
The page needs a sized container:
<div id="app" style="height: 100vh"></div>
Add features with presets
Install each feature at the same version as @univerjs/presets, import its locale, and append its preset:
import { UniverSheetsDataValidationPreset } from '@univerjs/preset-sheets-data-validation';
import UniverPresetSheetsDataValidationEnUS from '@univerjs/preset-sheets-data-validation/locales/en-US';
import '@univerjs/preset-sheets-data-validation/lib/index.css';
const { univerAPI } = createUniver({
locale: LocaleType.EN_US,
locales: {
[LocaleType.EN_US]: mergeLocales(
UniverPresetSheetsCoreEnUS,
UniverPresetSheetsDataValidationEnUS,
),
},
presets: [
UniverSheetsCorePreset({ container: 'app' }),
UniverSheetsDataValidationPreset(),
],
});
Available OSS presets are listed in references/plugin-registry.md. Import the stylesheet owned by every browser preset. Do not register both a preset and the same underlying plugin.
Facade API rules
Preset packages register their Facade extensions. In Plugin Mode, explicitly import the /facade entry for every capability used:
import { FUniver } from '@univerjs/core/facade';
import '@univerjs/engine-formula/facade';
import '@univerjs/sheets/facade';
import '@univerjs/sheets-formula/facade';
import '@univerjs/ui/facade';
const univerAPI = FUniver.newAPI(univer);
Prefer feature-level Facade methods and builders over internal services:
const workbook = univerAPI.getActiveWorkbook();
if (!workbook) throw new Error('No active workbook');
const worksheet = workbook.getActiveSheet();
if (!worksheet) throw new Error('No active worksheet');
worksheet.getRange('A1')
.setValue('Hello')
.setBackground('#ff0000')
.setFontColor('#ffffff');
const snapshot = workbook.save();
Read references/facade-api-guide.md for the current method names and feature import map.
Version policy
- Inspect
package.json, the lockfile, ornode_modules/@univerjs/core/package.json. - Reuse the project's exact installed version for every
@univerjs/*package. - For a new project targeting this source baseline, use
1.0.0-beta.0. - Do not mix OSS or preset package versions. If Pro is present, align
@univerjs-pro/*to the same release line too.
Runtime compatibility
Current Univer targets Edge 88+, Firefox 90+, Chrome 88+, Safari 14.1+, and Electron 12+. Headles
Установить univer-integrate в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл univer-integrate?
Integrate Univer Sheets, Docs, or Slides into React, Vue 3, HTML, or Node.js projects. Use when embedding Univer, choosing preset or plugin mode, initializing instances, configuring themes/locales/workers, or manipulating workbooks, worksheets, ranges, formulas, permissions, and events through the Facade API.
Как установить скилл univer-integrate?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл univer-integrate запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic