@thinkfree.dev/tfo-sdk 0.2.0 → 0.2.2

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/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/types.ts","../src/registerWith.ts","../src/systemPrompt.ts","../src/proxyConstants.ts","../src/cellNavigation.ts","../src/postMessage.ts","../src/execute.ts","../src/proxyClient.ts","../src/init.ts","../src/app.ts","../src/builtin/common-api.generated.ts","../src/builtin/word-api.generated.ts","../src/builtin/cell-api.generated.ts","../src/builtin/show-api.generated.ts"],"sourcesContent":["/**\n * Foundation types and constants shared across all SDK layers.\n *\n * Defines:\n * - ThinkfreeWeboffice message envelope (TfoMessage, TfoMessageBody)\n * - OfficeModule ('word' | 'cell' | 'show')\n * - Constants: MODULE_APP_ID, API_NAMESPACE, API_VERSION\n * - Error codes: RESULT_CODE, SDK_ERROR_CODE\n * - SDKError class\n * - ToolSchema (server-side 카탈로그 schema)\n * - OfficeHandle (createOffice 반환; 공개명 Office<M>)\n *\n * See: tf-ai/docs/tfo_sdk_architecture.md §4 (Message Protocol), §6 (execute), §7 (registerTool), §9 (Errors)\n */\n\n// ⚠ import 순서 유지 (word → cell → show): 이 파일이 번들 진입에서 모듈 타입을 처음\n// 참조하므로, 여기 순서가 곧 번들 d.ts 의 모듈 섹션 순서가 된다 (tsup dts 롤업의\n// 최초 도달 순서). biome organizeImports 는 이 파일에서 예외 처리되어 있다.\nimport type { Word } from './builtin/word-api.generated.js';\nimport type { Cell } from './builtin/cell-api.generated.js';\nimport type { Show } from './builtin/show-api.generated.js';\n\n// ============================================================\n// 모듈 타입\n// ============================================================\n\n/** 오피스 모듈 식별자 — word(문서) · cell(스프레드시트) · show(프레젠테이션) */\nexport type OfficeModule = 'word' | 'cell' | 'show';\n\n/**\n * 모듈 → `getDocument()` 최상위 핸들 타입 매핑.\n *\n * `createOffice({ module: 'cell', ... })` 처럼 module 리터럴이 추론되면\n * `getDocument()` 가 캐스트 없이 모듈별 정확한 핸들 타입을 반환한다.\n *\n * word/cell/show 모두 배선됨 — 세 모듈 모두 office 측 `SDK.proxyInvoke` 브리지로 동작\n * (word: webword `wordProxies.js`, cell: webCell `cellProxies.js`, show: webShow `showProxies.js`).\n */\nexport interface DocumentHandleByModule {\n word: Word.WordDocument;\n cell: Cell.Workbook;\n show: Show.Document;\n}\n\n/**\n * 모듈별 app ID — office 측 앱 식별 상수(`MSG_API_APP_NAME`)와 일치해야 한다.\n * 수신측(framework `apiCmdMsgManager`)이 `msgBody.app` 비교로 메시지를 검증하므로 임의 변경 금지.\n *\n * 정본 (이 표와 수동 동기화 쌍):\n * - word: webword/src/main/webapp/js/define/defineAPI.js (MSG_API_APP_NAME)\n * - cell: webcell/src/main/webapp/js/common/constants.js (MSG_API_APP_NAME)\n * - show: webShow/src/main/webapp/js/constant/commonConstants.js (MSG_API_APP_NAME)\n */\nexport const MODULE_APP_ID = {\n word: 'HWriteApp',\n cell: 'HCalcApp',\n show: 'webshowApp',\n} as const satisfies Record<OfficeModule, string>;\n\n// ============================================================\n// API 네임스페이스 / 프로토콜 상수\n// ============================================================\n\nexport const API_NAMESPACE = 'ThinkfreeWeboffice' as const;\nexport const API_VERSION = 'v1.0' as const;\n\n/** 빌드 시 tsup define 이 package.json version 으로 치환하는 전역 (dev/test 실행은 미정의) */\ndeclare const __TFO_SDK_VERSION__: string | undefined;\n\n/**\n * tfo-sdk 패키지 버전 (package.json 단일 원천 — 빌드 시 주입).\n *\n * `API_VERSION`(프로토콜 버전, 수신부 등호 필터)과 다르다 — 이 값은 envelope 의\n * `sdkVersion` 필드로 매 호출에 실려, 모듈이 호출자 SDK 버전을 알고 API/도구별\n * 최소 버전 게이트(minSdkVersion)를 적용할 수 있게 한다. 자기 신고 값이므로\n * 보안 경계가 아니라 호환성 협상용이다.\n */\nexport const SDK_VERSION: string =\n typeof __TFO_SDK_VERSION__ === 'string' ? __TFO_SDK_VERSION__ : '0.0.0-dev';\n\n// ============================================================\n// 메시지 envelope (ThinkfreeWeboffice 프로토콜)\n// ============================================================\n\nexport type MessageType = 'cmd' | 'result' | 'event';\n\n/**\n * ThinkfreeWeboffice envelope의 내부 body.\n *\n * - cmd: 요청 메시지 (params 사용)\n * - result: 응답 메시지 (code, data 사용)\n * - event: framework → consumer 이벤트\n */\nexport interface TfoMessageBody {\n app: string;\n version: string;\n type: MessageType;\n method: string;\n params?: unknown[];\n code?: number;\n data?: unknown;\n id: string;\n /** 호출자 tfo-sdk 패키지 버전 (SDK→모듈 cmd 에만 실림 — 모듈측 minSdkVersion 게이트 입력) */\n sdkVersion?: string;\n}\n\n/**\n * postMessage로 송수신되는 최상위 envelope.\n * 네임스페이스 키(`ThinkfreeWeboffice`)로 다른 라이브러리 메시지와 구분.\n */\nexport type TfoMessage = {\n [K in typeof API_NAMESPACE]: TfoMessageBody;\n};\n\n// ============================================================\n// 결과 코드 (Framework 응답)\n// ============================================================\n\nexport const RESULT_CODE = {\n SUCCEED: 1,\n FAIL: -1,\n} as const;\n\nexport type ResultCode = (typeof RESULT_CODE)[keyof typeof RESULT_CODE];\n\n// ============================================================\n// API 응답 래퍼 (office 모듈 계약)\n// ============================================================\n\n/**\n * 실패 응답의 `error` — office 측 구조화 에러 코드(`OperationErrorCode`) 기반.\n *\n * `code` 는 `'SHEET_NOT_FOUND'` 같은 UPPERCASE_SNAKE 상수, `message` 는 사람이\n * 읽을 실패 사유(네비게이션 스텝 컨텍스트 포함)다.\n */\nexport interface ApiErrorInfo {\n code: string;\n message: string;\n}\n\n/** 성공 응답 — 반환값이 없는 동작은 `result` 를 생략한다. */\nexport interface ApiSuccessResponse<T = unknown> {\n success: true;\n result?: T;\n}\n\n/** 실패 응답 — `SDKError.data` 로 전파되는 shape. */\nexport interface ApiErrorResponse {\n success: false;\n error: ApiErrorInfo;\n}\n\n/**\n * office proxy 가 회신하는 API 응답. 전송 계층 envelope(`{code, data}` — `RESULT_CODE`)와\n * **별개 계층**이다:\n * - 성공(`code:1`): 래핑된 응답이 `data` 에 실려 오고 proxyClient 가 unwrap 해 `result` 만 resolve.\n * - 실패(`code:-1`): postMessage 계층이 먼저 reject 하므로 응답이 `SDKError.data` 로 노출.\n */\nexport type ApiResponse<T = unknown> = ApiSuccessResponse<T> | ApiErrorResponse;\n\n// ============================================================\n// SDK 에러 코드\n// ============================================================\n\nexport const SDK_ERROR_CODE = {\n /** options 검증 실패 (module/origin/target 등) */\n INVALID_ARGUMENT: 1001,\n /** sendCommand 응답 타임아웃 */\n TIMEOUT: 1002,\n /** disconnect() 호출 후 사용 시도 */\n DESTROYED: 1003,\n /** 응답 envelope 파싱·구조 오류 */\n INVALID_RESPONSE: 1004,\n /** postMessage 송신 자체 실패 */\n NETWORK_ERROR: 1005,\n /** Framework 측 비즈니스 에러 (RESULT_CODE.FAIL 등) — code는 그대로 전달 */\n FRAMEWORK_ERROR: 2000,\n} as const;\n\nexport type SdkErrorCode = (typeof SDK_ERROR_CODE)[keyof typeof SDK_ERROR_CODE] | number;\n\n/**\n * SDK·Framework 모두에서 발생한 오류를 표현.\n * Framework 측 비즈니스 오류는 `code`가 `FRAMEWORK_ERROR`가 아닌 Framework 코드 그대로 노출됨.\n *\n * `data` 는 framework result 의 `data` 필드 원문이라 실패 종류에 따라 shape 가 다르다:\n * - proxy 실패: 구조화 실패 응답 `ApiErrorResponse` — `err.data.error.code` /\n * `err.data.error.message` 로 분기한다.\n * - 그 외 cmd 실패: 실패 사유 문자열.\n */\nexport class SDKError extends Error {\n public readonly code: SdkErrorCode;\n /** framework `data` 원문 — proxy 실패 시 `ApiErrorResponse`, 그 외 cmd 는 문자열. */\n public readonly data?: unknown;\n\n constructor(message: string, code: SdkErrorCode, data?: unknown) {\n super(message);\n this.name = 'SDKError';\n this.code = code;\n this.data = data;\n\n // V8 stack capture (지원 시)\n if (typeof (Error as { captureStackTrace?: unknown }).captureStackTrace === 'function') {\n (\n Error as unknown as {\n captureStackTrace: (target: object, ctor: unknown) => void;\n }\n ).captureStackTrace(this, SDKError);\n }\n }\n}\n\n// ============================================================\n// JSON Schema 별칭 (ToolSchema 의 inputSchema 등에 사용)\n// ============================================================\n\n/**\n * JSON Schema 일부 — `ToolSchema.inputSchema` 의 타입.\n * 본 SDK 는 schema 를 검증하지 않으며 그대로 통과. 검증은 외부(LLM 측) 책임.\n */\nexport type JsonSchema = Record<string, unknown>;\n\n// ============================================================\n// SDK 함수 시그니처\n// ============================================================\n\n/**\n * `execute` 함수 시그니처 — 동적 dispatch API.\n *\n * Office Agent는 LLM이 호출한 tool name 문자열로 이 함수를 호출합니다.\n *\n * @example\n * ```ts\n * const result = await sdk.execute('Document.insertText', [{ text: 'Hi' }]);\n * ```\n *\n * @param method - `${Namespace}.${method}` 형식 (예: 'Document.insertText')\n * @param params - postMessage envelope의 `params` 배열로 그대로 전달\n * @returns Framework 응답의 `data` 필드. 실패 시 `SDKError`로 reject.\n */\nexport type ExecuteFn = (method: string, params?: unknown[]) => Promise<unknown>;\n\n// ============================================================\n// Server-side tool catalog\n// ============================================================\n\n/**\n * `SDK.toolList` 가 반환하는 도구 schema. execute/module/method 는 포함하지 않음.\n * WebOffice 모듈이 자기 도구 카탈로그를 server-side 로 제공(SSOT)하는 패턴.\n */\nexport interface ToolSchema {\n name: string;\n description?: string;\n inputSchema?: unknown;\n}\n\n/**\n * 실행 가능한 오피스 도구 — `office.getTools()` 의 원소.\n *\n * MCP 클라이언트 SDK 관례(Vercel AI SDK `client.tools()`, LangChain `client.getTools()`)와 같은 shape:\n * 스키마(`name`/`description`/`inputSchema` — JSON Schema)와 실행기(`execute`)가 한 객체에 있다.\n * `execute` 는 `SDK.toolExecute` 로 위임하며, 기본값으로 모듈이 회신한 응답을 **그대로** 돌려준다\n * (모듈이 최종 MCP `CallToolResult` `{content, isError?}` 를 소유 — ADR-033 contract #2).\n */\nexport interface OfficeTool {\n name: string;\n description?: string | undefined;\n inputSchema?: unknown;\n execute: (args: unknown) => Promise<unknown>;\n}\n\n/**\n * `getTools()` 옵션.\n *\n * - `include`: 허용 목록 — 도구 이름 배열 또는 predicate. 모델에 보내는 도구 수를 줄여 선택 품질을 높인다.\n * - `formatResult`/`formatError`: 실행 결과·오류 변환 훅. 기본은 **통과**(모듈 응답 그대로 / 오류는 reject).\n */\nexport interface GetToolsOptions {\n include?: string[] | ((tool: ToolSchema) => boolean);\n formatResult?: (result: unknown) => unknown;\n formatError?: (error: unknown) => unknown;\n}\n\n/**\n * Agent SDK modelContext 의 최소 계약 — `registerTools()` 가 사용하는 부분만.\n */\nexport interface ModelContextLike {\n registerTool(tool: {\n name: string;\n description?: string | undefined;\n inputSchema?: unknown;\n execute: (args: unknown) => Promise<unknown>;\n }): void;\n}\n\n/**\n * `registerTools()` 옵션 — 결과/에러를 LLM framework shape 로 변환하는 훅.\n * 기본값은 MCP-shape (`{ content: [{ type: 'text', text }] }`).\n */\nexport interface RegisterToolsOptions {\n formatResult?: (result: unknown) => unknown;\n formatError?: (error: unknown) => unknown;\n}\n\n\n/**\n * `createOffice()` 가 반환하는 **오피스 편집기 연결 핸들** — Office Agent·OfficeSuite Facade의 의존 계약.\n * 공개 표면에서는 같은 타입을 `Office<M>` 이름으로도 export 한다(app.ts — 값 `Office` 네임스페이스와 짝).\n *\n * 이미 떠 있는 편집기 iframe 에 postMessage 로 *연결* 된 객체다 (편집기를 생성하지 않는다).\n * `disconnect()` 는 연결만 끊고 문서·편집기에는 영향이 없다.\n *\n * @example\n * ```ts\n * // Office Agent 측 — server-side 카탈로그 자동 등록\n * const office = createOffice({ module: 'word', ... });\n * await office.registerTools(modelContext); // SDK.toolList 회수 + modelContext 등록\n *\n * // 또는 직접 dispatch\n * await office.execute('insert_text', [{ text: 'Hi' }]);\n *\n * office.disconnect();\n * ```\n */\nexport interface OfficeHandle<M extends OfficeModule = OfficeModule> {\n /** 현재 모듈 — 'word' | 'cell' | 'show' */\n readonly module: M;\n /**\n * 동적 dispatch — AI/Office Agent 진입점.\n *\n * LLM tool call dispatch처럼 method 이름이 런타임에 결정되는 경우 사용.\n */\n execute: ExecuteFn;\n /**\n * WebOffice server-side 카탈로그(`SDK.toolList`)에서 도구 schema 목록을 조회.\n * WebOffice 모듈이 자기 도구를 책임지는 SSOT 경로.\n */\n getToolSchemas: () => Promise<ToolSchema[]>;\n /**\n * WebOffice 모듈(`SDK.systemPrompt`)의 문서 모델 · API 사용 규약 프롬프트를 조회해 제공.\n *\n * @returns 최종 프롬프트. 모듈이 미구현이면 빈 문자열\n */\n getSystemPrompt: () => Promise<string>;\n /**\n * **실행 가능한 도구 목록** — 개발자가 자기 LLM 프레임워크에 직접 연결하는 기본 경로.\n * `SDK.toolList` 카탈로그 각 항목에 `execute(args)`(→ `SDK.toolExecute`)를 붙여 배열로 돌려준다.\n *\n * @example\n * ```ts\n * const tools = await office.getTools({ include: ['insert_text'] });\n * // OpenAI: tools.map(t => ({ type: 'function', function: { name: t.name, description: t.description, parameters: t.inputSchema } }))\n * // Anthropic: tools.map(t => ({ name: t.name, description: t.description, input_schema: t.inputSchema }))\n * const result = await tools.find(t => t.name === call.name)!.execute(call.arguments);\n * ```\n */\n getTools: (options?: GetToolsOptions) => Promise<OfficeTool[]>;\n /**\n * 모듈의 도구 카탈로그(`SDK.toolList`)를 modelContext 에 **도구로 등록**한다 (AI Agent 흐름).\n * `getTools()` 위의 편의 함수 — tf-agent-sdk 처럼 `registerTool` 콜백을 받는 프레임워크용.\n * 기본 포맷은 MCP-shape 래핑(`RegisterToolsOptions`).\n * 각 도구 실행은 `SDK.toolExecute` generic cmd 로 위임.\n *\n * @returns 등록한 도구 schema 원본 목록\n */\n registerTools: (\n modelContext: ModelContextLike,\n options?: RegisterToolsOptions,\n ) => Promise<ToolSchema[]>;\n /**\n * 개발자 API 진입점 — 문서 최상위 핸들을 반환한다. 모듈에 따라 알맞은 최상위\n * 핸들을 회신한다: word 는 `WordDocument`, cell 은 `Workbook`, show 는 `Document`.\n * `createOffice` 의 module 리터럴 추론(`DocumentHandleByModule`)으로 캐스트\n * 없이 정확한 타입이 반환된다.\n *\n * 반환 핸들의 메서드는 모두 postMessage 왕복이라 Promise를 반환하며, 다른 엔티티\n * 핸들(`Slide`/`Worksheet` 등)을 다시 반환한다. office `SDK.proxyInvoke` 계약 기반.\n *\n * cell 핸들은 **경로 참조(lazy)** 다: `getWorksheet`/`getRange` 등 네비게이션 메서드는\n * 통신 없이 하위 핸들을 즉시 반환하고(존재 확인 안 함), 실제 실행 메서드\n * (`getValues`/`setValues` 등)를 호출하는 시점에 1왕복으로 경로를 평가한다.\n * 경로 중간 대상이 없으면 그 실행 호출이 `SDKError` 로 reject 되고, `SDKError.data` 에\n * 구조화 실패 응답(`ApiErrorResponse` — `{success:false, error:{code, message}}`)이\n * 실린다. 소비자는 `err.data.error.code`(`'SHEET_NOT_FOUND'` 등)로 분기한다.\n * `getSelection`/`getUsedRange`(호출 시점 좌표로 확정된 anchored Range 회신 —\n * 빈 시트의 usedRange 는 A1 단일 셀)와 `addChart`/`addTable`(팩토리)은 eager 로\n * 즉시 1왕복한다.\n *\n * @example\n * ```ts\n * // show: Document\n * const office = createOffice({ module: 'show', ... });\n * const doc = office.getDocument();\n * const slides = await doc.getSlides();\n * await slides[0].insertShape('rect');\n *\n * // cell: Workbook — module 리터럴 추론, 캐스트 불필요\n * const office = createOffice({ module: 'cell', ... });\n * const wb = office.getDocument(); // 통신 0\n * const ws = await wb.getWorksheet('Sheet1'); // 통신 0 (동기 반환이나 await 호환)\n * const rg = await ws.getRange('A1:J10'); // 통신 0 (좌표 객체도 가능: { row1: 0, col1: 0, row2: 9, col2: 9 })\n * const values = await rg.getValues(); // 여기서 1왕복 + 존재 검증\n * ```\n */\n getDocument: () => DocumentHandleByModule[M];\n /**\n * 편집기와의 연결을 끊는다 — postMessage 리스너 제거, pending 요청 모두 SDKError(DESTROYED)로 reject.\n * 편집기·문서 자체에는 영향이 없다(iframe 은 그대로 남는다).\n *\n * 호출 후 `execute`·`getToolSchemas`·`registerTools` 모두 reject/throw.\n * 멱등(idempotent) — 두 번 호출해도 안전.\n */\n disconnect: () => void;\n}\n\n// ============================================================\n// createOffice 옵션\n// ============================================================\n\n/** `createOffice()` 옵션 */\nexport interface OfficeOptions<M extends OfficeModule = OfficeModule> {\n /** 모듈 식별자 — 리터럴로 주면 `getDocument()` 반환 타입이 모듈별로 추론됨 */\n module: M;\n /** 통신 대상 origin — '*' 금지 */\n frameworkOrigin: string;\n /** iframe 요소 (targetWindow와 택1) */\n iframeEl?: HTMLIFrameElement;\n /** 통신 대상 Window (iframeEl과 택1) */\n targetWindow?: Window;\n /** sendCommand 응답 타임아웃 (ms, 기본 5000) */\n timeoutMs?: number;\n}\n\n// ============================================================\n// 메시지 ID 생성 유틸 (재export 용 시그니처)\n// ============================================================\n\n/**\n * office 측 기존 메시지 ID 포맷(framework `apiMessageManager`)과 호환되는 생성기.\n * `${appId}Msg${timestamp}${counter}`\n */\nexport type MessageIdGenerator = (appId: string) => string;\n","/**\n * Server-side tool catalog 어댑터.\n *\n * office 모듈이 `SDK.toolList` 로 도구 카탈로그를 server-side 제공(SSOT)한다.\n * 본 SDK 는 `SDK.toolList` 로 schema 를 받아 modelContext 에 자동 등록하고,\n * 각 도구 실행은 `SDK.toolExecute` generic cmd 로 dispatch 한다.\n *\n * 이 경로는 office 측 `SDK.*` dispatcher(framework 공통 + 모듈 브리지 — 예: webShow `sdkBridge.js`)와 짝을 이룬다.\n */\n\nimport {\n type ExecuteFn,\n type GetToolsOptions,\n type ModelContextLike,\n type OfficeTool,\n type RegisterToolsOptions,\n SDKError,\n SDK_ERROR_CODE,\n SDK_VERSION,\n type ToolSchema,\n} from './types.js';\n\n/** WebOffice server-side 카탈로그 조회 cmd */\nexport const SDK_TOOL_LIST_METHOD = 'SDK.toolList';\n/** WebOffice server-side 도구 실행 cmd */\nexport const SDK_TOOL_EXECUTE_METHOD = 'SDK.toolExecute';\n\n/** 기본 결과 포맷 — MCP-shape */\nfunction defaultFormatResult(result: unknown): unknown {\n return { content: [{ type: 'text', text: JSON.stringify(result ?? null) }] };\n}\n\n/** 기본 에러 포맷 — MCP-shape (isError) */\nfunction defaultFormatError(error: unknown): unknown {\n const err = error as { code?: unknown; message?: unknown };\n const code =\n typeof err?.code === 'string' || typeof err?.code === 'number'\n ? err.code\n : 'TOOL_EXECUTE_ERROR';\n const message =\n typeof err?.message === 'string' ? err.message : '도구 실행 중 오류가 발생했습니다.';\n\n return { isError: true, content: [{ type: 'text', text: JSON.stringify({ code, message }) }] };\n}\n\n/** 응답을 ToolSchema 배열로 정규화 — `[...]` 또는 `{ tools: [...] }` 모두 수용 */\nfunction extractTools(schemas: unknown): ToolSchema[] {\n const isToolSchema = (t: unknown): t is ToolSchema => t !== null && typeof t === 'object';\n\n if (Array.isArray(schemas)) {\n return schemas.filter(isToolSchema);\n }\n\n if (\n schemas !== null &&\n typeof schemas === 'object' &&\n Array.isArray((schemas as { tools?: unknown }).tools)\n ) {\n return (schemas as { tools: unknown[] }).tools.filter(isToolSchema);\n }\n\n return [];\n}\n\n/**\n * WebOffice server-side 카탈로그(`SDK.toolList`)에서 도구 schema 목록을 조회.\n */\nexport async function getToolSchemas(execute: ExecuteFn): Promise<ToolSchema[]> {\n // 호출자 SDK 버전 전달 — 모듈이 minSdkVersion 미달 도구를 응답에서 필터링(사전 차단)할\n // 수 있게 한다. 현행 모듈 핸들러는 params 를 무시하므로 추가만으로 하위 호환.\n const schemas = await execute(SDK_TOOL_LIST_METHOD, [{ sdkVersion: SDK_VERSION }]);\n\n return extractTools(schemas);\n}\n\n/** `include` 옵션을 predicate 로 정규화 — 미지정이면 전부 통과 */\nfunction toIncludeFilter(include: GetToolsOptions['include']): (tool: ToolSchema) => boolean {\n if (include === undefined) {\n return () => true;\n }\n if (typeof include === 'function') {\n return include;\n }\n if (Array.isArray(include)) {\n const allowed = new Set(include);\n return (tool) => allowed.has(tool.name);\n }\n throw new SDKError(\n '[TFO-SDK] getTools(): options.include must be a string[] or a predicate function.',\n SDK_ERROR_CODE.INVALID_ARGUMENT,\n );\n}\n\n/**\n * **실행 가능한 도구 목록** — `SDK.toolList` 카탈로그 각 항목에 `execute(args)` 를 붙여 돌려준다.\n * `execute` 는 `SDK.toolExecute` generic cmd 로 위임한다.\n *\n * 기본 동작은 **통과**: 모듈이 회신한 결과(최종 MCP `CallToolResult`)를 그대로 resolve 하고,\n * 전송/framework 실패는 `SDKError` 로 reject 한다. 프레임워크가 다른 shape 를 원하면\n * `formatResult`/`formatError` 로 변환한다.\n *\n * 일반적으로는 인스턴스 메서드 `office.getTools()` 를 쓴다. 본 standalone 함수는 커스텀\n * `execute` 를 wrap 할 때 사용.\n */\nexport async function getTools(\n execute: ExecuteFn,\n options: GetToolsOptions = {},\n): Promise<OfficeTool[]> {\n const include = toIncludeFilter(options.include);\n const { formatResult, formatError } = options;\n const schemas = (await getToolSchemas(execute)).filter(include);\n\n // 카탈로그 원본을 spread 로 보존 — 모듈이 실어 보낸 여분 필드도 그대로 남는다\n // (재구성하면 여분 필드가 유실되고, 없던 키가 undefined 로 생기는 비대칭이 생긴다).\n return schemas.map((tool) => ({\n ...tool,\n execute: async (args: unknown) => {\n try {\n const result = await execute(SDK_TOOL_EXECUTE_METHOD, [{ name: tool.name, args }]);\n\n return formatResult ? formatResult(result) : result;\n } catch (error) {\n if (formatError) {\n return formatError(error);\n }\n throw error;\n }\n },\n }));\n}\n\n/**\n * 모듈의 도구 카탈로그(`SDK.toolList`)를 modelContext 에 **도구로 등록**한다 (AI Agent 흐름).\n * `getTools()` 위의 편의 함수 — `registerTool` 콜백을 받는 프레임워크(tf-agent-sdk 등)용.\n * 기본 포맷은 MCP-shape 래핑(결과 `{content:[{type:'text', text}]}`, 오류 `{isError:true, …}`).\n *\n * 일반적으로는 인스턴스 메서드 `office.registerTools(modelContext)` 를 쓴다. 본 standalone\n * 함수는 커스텀 `execute` 를 wrap 할 때 사용.\n *\n * @returns 등록한 도구 schema 원본 목록 — `SDK.toolList` 가 회신한 필드를 그대로 보존한다\n * (`execute` 만 제외. 모듈이 실어 보낸 여분 필드 포함).\n */\nexport async function registerTools(\n execute: ExecuteFn,\n modelContext: ModelContextLike,\n options: RegisterToolsOptions = {},\n): Promise<ToolSchema[]> {\n if (!modelContext || typeof modelContext.registerTool !== 'function') {\n throw new SDKError(\n '[TFO-SDK] registerTools() requires a modelContext with a registerTool() method.',\n SDK_ERROR_CODE.INVALID_ARGUMENT,\n );\n }\n\n const tools = await getTools(execute, {\n formatResult: options.formatResult ?? defaultFormatResult,\n formatError: options.formatError ?? defaultFormatError,\n });\n\n for (const tool of tools) {\n modelContext.registerTool(tool);\n }\n\n // 원본 보존 계약: getTools 가 만든 도구에서 execute 만 떼어내면 곧 카탈로그 원본이다.\n return tools.map(({ execute: _execute, ...schema }) => schema as ToolSchema);\n}\n","/**\n * Server-side system prompt 어댑터 (`SDK.toolList` 와 같은 경로).\n *\n * WebOffice 모듈이 `SDK.systemPrompt` 로 자기 문서 모델 · API 사용 규약을 제공(SSOT).\n * 미구현 모듈(현재 word/cell)은 빈 문자열.\n */\n\nimport type { ExecuteFn } from './types.js';\n\n/** WebOffice server-side system prompt 조회 cmd */\nexport const SDK_SYSTEM_PROMPT_METHOD = 'SDK.systemPrompt';\n\n/** 프롬프트 응답을 문자열로 정규화 — 미구현 모듈의 undefined/null 은 빈 문자열 */\nfunction normalizePrompt(value: unknown): string {\n return typeof value === 'string' ? value : '';\n}\n\n/**\n * WebOffice server-side 프롬프트(`SDK.systemPrompt`)에서 system prompt 를 조회.\n */\nexport async function getSystemPrompt(execute: ExecuteFn): Promise<string> {\n // 미구현 모듈에서 cmd 미등록으로 reject 될 수 있다. 프롬프트는 없어도 동작해야 하므로 삼킨다.\n let modulePrompt: unknown;\n\n try {\n modulePrompt = await execute(SDK_SYSTEM_PROMPT_METHOD, []);\n } catch {\n return '';\n }\n\n return normalizePrompt(modulePrompt);\n}\n","/**\n * 개발자 API(proxy) 관련 상수.\n *\n * office 모듈의 `SDK.proxyInvoke` 계약과 짝을 이룬다.\n */\n\n/**\n * proxy 엔티티 타입 — office 내부 `ProxyType` 상수(show: webShow `showProxies.js`,\n * cell: webCell `api/apiConstants.js`)와 동일해야 한다 (수동 동기화 쌍).\n * 직렬화 descriptor(`{__proxy, type, attrs}`)의 `type` 값으로 사용.\n * 내부 직렬화 어휘 — index.ts 에서 재수출하지 않는다 (개발자 판별은 가드 메서드로).\n *\n * attrs 계약은 모듈별로 다르다:\n * - show: identity-attrs — attrs = 식별자 스냅샷 (`{slideId}` 등)\n * - cell: path-attrs — attrs = `{root?, steps}` 네비게이션 경로 (proxyClient 의\n * navigationMap 옵션과 office 측 경로 resolver — webCell `api/cellProxies.js` — 가 짝). CHART/TABLE 문자열은\n * show와 공유하지만 dispatcher가 모듈(iframe)별 독립이라 충돌 없음.\n */\nexport const PROXY_TYPE = {\n // show 모듈 (webShow api/showProxies.js)\n DOCUMENT: 'Document',\n SLIDE: 'Slide',\n SHAPE: 'Shape',\n IMAGE: 'Image',\n LINE: 'Line',\n GROUP: 'Group',\n CHART: 'Chart',\n TABLE: 'Table',\n TABLE_CELL: 'TableCell',\n COMMENT: 'Comment',\n DIAGRAM: 'Diagram',\n OLE_OBJECT: 'OleObject',\n CONTROL: 'Control',\n // cell 모듈 (webCell api/apiConstants.js — CHART/TABLE 은 위 문자열 재사용)\n WORKBOOK: 'Workbook',\n WORKSHEET: 'Worksheet',\n RANGE: 'Range',\n FILTER: 'Filter',\n NAME: 'Name',\n} as const;\n\n/**\n * show 핸들의 타입 가드 메서드 맵 — `{ 가드명: 핸들 내부 판별값 }`.\n *\n * proxyClient 의 `guardMethods` 옵션으로 주입되어, 핸들에서 `s.isImage()` 처럼\n * 호출하면 postMessage 왕복 없이 내부 `type` 과 동기 비교한 boolean 을 돌려준다.\n * 생성물(show-api.generated.ts)의 `this is T` predicate 선언과 짝 —\n * scripts/show-api.dts.config.json 의 `typeGuards` 와 수동 동기화한다.\n *\n * ⚠️ 여기 등록된 이름은 show 모든 핸들에서 원격 메서드로 전달되지 않는다(예약어).\n * office 프록시에 동명 메서드가 생기면 generate-dts 가 생성 단계에서 충돌 에러를 낸다.\n */\nexport const SHOW_GUARD_METHODS = {\n isShape: PROXY_TYPE.SHAPE,\n isImage: PROXY_TYPE.IMAGE,\n isLine: PROXY_TYPE.LINE,\n isGroup: PROXY_TYPE.GROUP,\n isChart: PROXY_TYPE.CHART,\n isTable: PROXY_TYPE.TABLE,\n isDiagram: PROXY_TYPE.DIAGRAM,\n isOleObject: PROXY_TYPE.OLE_OBJECT,\n isControl: PROXY_TYPE.CONTROL,\n} as const;\n","/**\n * cell 모듈 lazy 네비게이션 맵 — path-attrs 핸들이 **통신 없이** 스텝을 누적하며\n * 하위 타입 핸들을 동기 반환하는 메서드 목록 (9종).\n *\n * ⚠️ office 측 cell 프록시의 스텝 allowlist(webCell `js/api/cellProxies.js` 의 `_NAV_STEPS`)와 **수동 동기화 쌍**.\n * 메서드 추가/제거 시 양쪽을 함께 갱신할 것 — 여기만 추가하면 office 가\n * METHOD_NOT_ALLOWED 를 회신하고, office 만 추가하면 eager 왕복으로 동작한다.\n *\n * 여기 없는 메서드는 전부 eager(호출 즉시 1왕복 실행). 특히 다음 5종은 의도적 제외:\n * - getSelection / getUsedRange : 상태 조회형 — 호출 시점 좌표를 확정해 anchored\n * Range 핸들(`root: {sheet, address}`)을 회신. 빈 시트의 getUsedRange 는\n * A1 단일 셀 Range 로 취급 (null 을 돌려주지 않는다).\n * - addChart / addTable / addDefinedName : 팩토리(문서 변경 부수효과) — 즉시 실행,\n * anchored 핸들 회신 (addDefinedName → anchored Name 핸들 `root: {name, sheet}`).\n * (Filter 는 getFilter 스텝으로 핸들을 얻은 뒤 create() 로 생성한다 — create 는\n * FILTER 핸들의 terminal 메서드라 스텝이 아니다.)\n *\n * lazy semantics: 네비게이션은 존재를 확인하지 않는다. 존재 검증은 실행 메서드 호출\n * 시점에 office 가 경로를 fresh resolve 하며 수행하고, 부재 시 `SDKError` 로 reject 된다\n * (`err.data.error.code` = SHEET_NOT_FOUND / CHART_NOT_FOUND / TABLE_NOT_FOUND /\n * NAME_NOT_FOUND / INVALID_ARGUMENT ..., `err.data.error.message` 에 스텝 컨텍스트).\n */\nimport { PROXY_TYPE } from './proxyConstants.js';\n\n/** 모듈별 lazy 네비게이션 맵 — `{ 핸들타입: { 메서드명: 하위 핸들타입 } }`. */\nexport type NavigationMap = Readonly<Record<string, Readonly<Record<string, string>>>>;\n\nexport const CELL_NAVIGATION_MAP: NavigationMap = {\n [PROXY_TYPE.WORKBOOK]: {\n getWorksheet: PROXY_TYPE.WORKSHEET,\n getObjectById: PROXY_TYPE.CHART,\n getTable: PROXY_TYPE.TABLE,\n getDefinedName: PROXY_TYPE.NAME,\n },\n [PROXY_TYPE.WORKSHEET]: {\n getRange: PROXY_TYPE.RANGE,\n getChart: PROXY_TYPE.CHART,\n getFilter: PROXY_TYPE.FILTER,\n },\n [PROXY_TYPE.TABLE]: {\n getRange: PROXY_TYPE.RANGE,\n getFilter: PROXY_TYPE.FILTER,\n },\n};\n","/**\n * postMessage transport layer.\n *\n * Responsibilities:\n * - Build TfoMessage envelope and send via target.postMessage()\n * - Listen for response messages with origin validation\n * - Match request-response by message ID (pending Map)\n * - Handle timeouts (default 5000ms)\n * - Clear pending on destroy (reject all in-flight)\n */\n\nimport {\n API_NAMESPACE,\n API_VERSION,\n type ApiErrorInfo,\n MODULE_APP_ID,\n type OfficeModule,\n RESULT_CODE,\n SDKError,\n SDK_ERROR_CODE,\n SDK_VERSION,\n type TfoMessage,\n type TfoMessageBody,\n} from './types.js';\n\n// ============================================================\n// 상수\n// ============================================================\n\nexport const DEFAULT_TIMEOUT_MS = 5000;\n\n// ============================================================\n// PostMessageContext\n// ============================================================\n\ninterface PendingEntry {\n resolve: (data: unknown) => void;\n reject: (err: SDKError) => void;\n method: string;\n timer: ReturnType<typeof setTimeout>;\n}\n\nexport interface PostMessageContext {\n readonly module: OfficeModule;\n readonly appId: string;\n readonly frameworkOrigin: string;\n readonly frameworkTarget: Window;\n readonly pending: Map<string, PendingEntry>;\n}\n\n/**\n * PostMessageContext를 생성한다.\n * @param module - 'word' | 'cell' | 'show'\n * @param frameworkOrigin - 통신 대상 origin (절대 '*' 금지)\n * @param frameworkTarget - postMessage 대상 Window (iframe.contentWindow 등)\n */\nexport function createPostMessageContext(\n module: OfficeModule,\n frameworkOrigin: string,\n frameworkTarget: Window,\n): PostMessageContext {\n return {\n module,\n appId: MODULE_APP_ID[module],\n frameworkOrigin,\n frameworkTarget,\n pending: new Map(),\n };\n}\n\n// ============================================================\n// 메시지 ID 생성\n// ============================================================\n\nlet _msgCounter = 0;\n\n/**\n * office 측 기존 메시지 ID 포맷(framework `apiMessageManager`)과 호환되는 생성.\n * `${appId}Msg${timestamp}${counter}`\n * 예: \"HWriteAppMsg17151234567891\"\n */\nexport function generateMessageId(appId: string): string {\n _msgCounter += 1;\n return `${appId}Msg${Date.now()}${_msgCounter}`;\n}\n\n// ============================================================\n// sendCommand\n// ============================================================\n\n/**\n * cmd 메시지를 framework에 송신하고 result를 기다린다.\n *\n * @param ctx - postMessage 컨텍스트\n * @param method - 'Document.insertText' 등\n * @param params - 메서드 파라미터 배열 (기본 [])\n * @param timeoutMs - 응답 타임아웃 (기본 5000ms)\n * @returns result.data 또는 reject(SDKError)\n */\nexport function sendCommand(\n ctx: PostMessageContext,\n method: string,\n params?: unknown[],\n timeoutMs: number = DEFAULT_TIMEOUT_MS,\n): Promise<unknown> {\n const id = generateMessageId(ctx.appId);\n\n return new Promise<unknown>((resolve, reject) => {\n const timer = setTimeout(() => {\n ctx.pending.delete(id);\n reject(\n new SDKError(\n `[TFO-SDK] Request timed out: ${method} (${id})`,\n SDK_ERROR_CODE.TIMEOUT,\n ),\n );\n }, timeoutMs);\n\n ctx.pending.set(id, {\n resolve: (data) => {\n clearTimeout(timer);\n resolve(data);\n },\n reject: (err) => {\n clearTimeout(timer);\n reject(err);\n },\n method,\n timer,\n });\n\n const message: TfoMessage = {\n [API_NAMESPACE]: {\n app: ctx.appId,\n version: API_VERSION,\n // 호출자 SDK 버전 자기 신고 — 모듈이 API/도구별 minSdkVersion 게이트에 사용.\n // 수신부 필터는 알려진 필드만 검사하므로 구 framework 에서도 무시되어 안전.\n sdkVersion: SDK_VERSION,\n type: 'cmd',\n method,\n params: params ?? [],\n id,\n },\n };\n\n try {\n ctx.frameworkTarget.postMessage(JSON.stringify(message), ctx.frameworkOrigin);\n } catch (err) {\n ctx.pending.delete(id);\n clearTimeout(timer);\n reject(\n new SDKError(\n `[TFO-SDK] Failed to send: ${method}`,\n SDK_ERROR_CODE.NETWORK_ERROR,\n err,\n ),\n );\n }\n });\n}\n\n// ============================================================\n// 응답 리스너\n// ============================================================\n\n/**\n * window 'message' 이벤트 리스너를 등록한다. origin 검증 후 envelope 파싱하여\n * pending Map에서 매칭되는 요청을 resolve/reject.\n *\n * @param ctx - postMessage 컨텍스트\n * @returns 리스너 해제 함수 (destroy 시 호출)\n */\nexport function createMessageListener(ctx: PostMessageContext): () => void {\n const listener = (event: MessageEvent): void => {\n // 1. origin 검증\n if (event.origin !== ctx.frameworkOrigin) {\n return;\n }\n\n // 2. envelope 파싱\n const msgBody = parseEnvelope(event.data);\n if (!msgBody) {\n return;\n }\n\n // 3. result 메시지만 처리 (cmd · event 는 무시)\n if (msgBody.type !== 'result' || !msgBody.id) {\n return;\n }\n\n // 4. pending 매칭\n const entry = ctx.pending.get(msgBody.id);\n if (!entry) {\n return;\n }\n ctx.pending.delete(msgBody.id);\n\n // 5. resolve / reject\n // `data` 는 framework result 원문을 그대로 전달한다 (해석은 상위 계층 몫).\n // proxy 는 래핑된 응답을 실어 보내므로 실패 시 `SDKError.data` 가\n // `ApiErrorResponse`(`{success:false, error:{code, message}}`) 가 되고,\n // 그 외 cmd 는 실패 사유 문자열이 된다.\n if (msgBody.code === RESULT_CODE.SUCCEED) {\n entry.resolve(msgBody.data);\n } else {\n // proxy 실패는 transport code:-1 과 payload({success:false, error})로 함께 온다.\n // payload 에 API 에러가 있으면 그 code/message 를 SDKError 메시지에 반영한다(원문은 data 에 보존).\n const data = msgBody.data as { success?: unknown; error?: ApiErrorInfo } | undefined;\n const apiError = data && data.success === false ? data.error : undefined;\n let message: string;\n if (apiError) {\n const detail = apiError.message\n ? `${apiError.code}: ${apiError.message}`\n : apiError.code;\n message = `[TFO-SDK] ${msgBody.method} failed: ${detail}`;\n } else {\n message = `[TFO-SDK] Command failed: ${msgBody.method} (code: ${msgBody.code})`;\n }\n entry.reject(\n new SDKError(message, msgBody.code ?? SDK_ERROR_CODE.FRAMEWORK_ERROR, msgBody.data),\n );\n }\n };\n\n window.addEventListener('message', listener);\n return () => window.removeEventListener('message', listener);\n}\n\n/**\n * event.data 를 TfoMessageBody 로 안전하게 파싱한다.\n * 문자열·객체 양쪽 지원. 잘못된 형식은 undefined 반환.\n */\nfunction parseEnvelope(data: unknown): TfoMessageBody | undefined {\n let parsed: unknown;\n\n if (typeof data === 'string') {\n try {\n parsed = JSON.parse(data);\n } catch {\n return undefined;\n }\n } else if (data !== null && typeof data === 'object') {\n parsed = data;\n } else {\n return undefined;\n }\n\n if (parsed === null || typeof parsed !== 'object') {\n return undefined;\n }\n\n const envelope = (parsed as Record<string, unknown>)[API_NAMESPACE];\n if (envelope === null || typeof envelope !== 'object') {\n return undefined;\n }\n\n return envelope as TfoMessageBody;\n}\n\n// ============================================================\n// clearPending — disconnect 시 호출\n// ============================================================\n\n/**\n * 대기 중인 모든 pending 요청을 SDKError(DESTROYED)로 reject 하고 정리한다.\n */\nexport function clearPending(ctx: PostMessageContext): void {\n for (const [, entry] of ctx.pending) {\n clearTimeout(entry.timer);\n entry.reject(\n new SDKError(\n `[TFO-SDK] Office handle disconnected while request pending: ${entry.method}`,\n SDK_ERROR_CODE.DESTROYED,\n ),\n );\n }\n ctx.pending.clear();\n}\n","/**\n * execute API — dynamic dispatch by method name string.\n *\n * 호출 흐름:\n * sdk.execute(\"Document.insertText\", [{text: \"Hi\"}])\n * → createExecute가 반환한 함수\n * → destroyed 검사 → sendCommand → postMessage → Framework\n */\n\nimport { type PostMessageContext, sendCommand } from './postMessage.js';\nimport { type ExecuteFn, SDKError, SDK_ERROR_CODE } from './types.js';\n\n/**\n * execute 함수를 생성한다.\n *\n * @param ctx - postMessage 컨텍스트\n * @param isDestroyed - destroyed 상태를 반환하는 getter (init.ts에서 closure로 관리)\n * @param timeoutMs - 응답 타임아웃 (옵션)\n */\nexport function createExecute(\n ctx: PostMessageContext,\n isDestroyed: () => boolean,\n timeoutMs?: number,\n): ExecuteFn {\n return function execute(method: string, params?: unknown[]): Promise<unknown> {\n if (isDestroyed()) {\n return Promise.reject(\n new SDKError(\n '[TFO-SDK] SDK instance has been destroyed.',\n SDK_ERROR_CODE.DESTROYED,\n ),\n );\n }\n return sendCommand(ctx, method, params, timeoutMs);\n };\n}\n","/**\n * 개발자 API host 클라이언트 — office `SDK.proxyInvoke` 계약의 거울상.\n *\n * office 모듈(webShow `showProxies.js` 등)은 가벼운 핸들(`{proxyType, attrs}`)로 메서드를\n * 동적 dispatch 한다. 본 모듈은 그 host 쪽 대칭 구현:\n * - 엔티티 핸들 = ES6 Proxy. 메서드 호출을 `execute(\"SDK.proxyInvoke\", [payload])`로 직렬화.\n * - 인자의 핸들 → `{__proxy, type, attrs}` descriptor (office 측 `_materializeArgs` 가 복원).\n * - 응답의 `{__proxy, type, attrs}` → 다시 핸들로 복원 (office 측 `_serializeResult` 의 역).\n *\n * 핸들 kind 2종 (모듈별 attrs 계약):\n * - identity (기본: show·word): attrs = 식별자 스냅샷. 모든 메서드 호출이 1왕복.\n * - path (opt-in, cell): `navigationMap` 옵션 지정 시. attrs = `{root?, steps}` 네비게이션\n * 경로. 맵에 등재된 네비게이션 메서드는 **통신 없이** 스텝을 누적한 하위 핸들을 동기\n * 반환하고(then-guard 로 `await` 호환 유지), 그 외(실행/eager) 메서드만 1왕복한다.\n * office 측(webCell `cellProxies.js`)이 실행 시점에 경로를 fresh resolve 한다.\n *\n * 응답 래핑: office 는 `{success, result/error}` 로 회신한다.\n * 성공 응답은 여기서 unwrap 해 `result` 만 노출하므로 **개발자 표면은 동일**하고,\n * 실패 응답은 transport code 가 FAIL 이라 postMessage 계층이 `SDKError.data` 에\n * 실어 reject 한다 (소비자는 `err.data.error.code` 로 분기).\n */\n\nimport type { NavigationMap } from './cellNavigation.js';\nimport { type ApiErrorResponse, type ExecuteFn, SDKError, SDK_ERROR_CODE } from './types.js';\n\n/** 핸들 식별용 내부 심볼 — 인자 직렬화 시 host 핸들을 구분한다. */\nconst HANDLE = Symbol('tfoProxyHandle');\n\n/** path-attrs 핸들의 네비게이션 스텝 — office 측(`_resolvePath`)이 순차 재생한다. */\ninterface PathStep {\n m: string;\n a: unknown[];\n}\n\n/** path kind 핸들의 attrs 형태. root 생략 시 루트는 office 측 최상위 싱글턴. */\ninterface PathAttrs extends Record<string, unknown> {\n root?: Record<string, unknown>;\n steps: PathStep[];\n}\n\n/** 핸들 내부 상태 — office에 보낼 식별자(identity) 또는 경로(path). */\ninterface HandleState {\n kind: 'identity' | 'path';\n type: string;\n attrs: Record<string, unknown>;\n [HANDLE]: true;\n}\n\n/** office가 보내는 직렬화된 proxy descriptor. */\ninterface ProxyDescriptor {\n __proxy: true;\n type: string;\n attrs: Record<string, unknown>;\n}\n\n/** createProxyClient 옵션. */\nexport interface ProxyClientOptions {\n /**\n * 모듈별 lazy 네비게이션 맵 (`{ 핸들타입: { 메서드명: 하위타입 } }`).\n * 지정 시 핸들이 path kind 로 동작한다 (cell — `CELL_NAVIGATION_MAP`).\n * 미지정 시 identity kind (show·word).\n */\n navigationMap?: NavigationMap;\n /**\n * 타입 가드 메서드 맵 (`{ 가드명: 핸들 내부 판별값 }` — show 는 `SHOW_GUARD_METHODS`).\n *\n * 등록된 이름을 핸들에서 호출하면 원격으로 가지 않고 내부 `type` 과 동기 비교한\n * boolean 을 반환한다 (생성물의 `this is T` predicate 선언과 짝, postMessage 왕복 없음).\n * 미지정 시 기존 동작 그대로 — 모든 프로퍼티가 원격 메서드로 위임된다 (cell/word 무변경).\n *\n * ⚠️ 등록된 이름은 원격 메서드로 전달되지 않는다(예약어) — office 프록시에 동명\n * 메서드를 추가하면 안 된다 (generate-dts 가 생성 단계에서 충돌을 검출).\n */\n guardMethods?: Record<string, string>;\n}\n\nfunction isProxyDescriptor(v: unknown): v is ProxyDescriptor {\n return v != null && typeof v === 'object' && (v as { __proxy?: unknown }).__proxy === true;\n}\n\nfunction isHandle(v: unknown): v is HandleState {\n return v != null && (typeof v === 'object' || typeof v === 'function') &&\n (v as { [HANDLE]?: unknown })[HANDLE] === true;\n}\n\n/**\n * proxy 클라이언트를 생성한다.\n *\n * @param execute - SDK 인스턴스의 execute (postMessage 왕복)\n * @param options - `navigationMap` 지정 시 path kind (cell). 미지정 시 identity (show·word).\n * @returns `makeHandle(type, attrs)` — 타입드 엔티티 핸들 팩토리\n */\nexport function createProxyClient(execute: ExecuteFn, options?: ProxyClientOptions): {\n makeHandle: (type: string, attrs: Record<string, unknown>) => unknown;\n} {\n const navigationMap = options?.navigationMap;\n const guardMethods = options?.guardMethods;\n const kind: HandleState['kind'] = navigationMap ? 'path' : 'identity';\n\n /**\n * 인자 직렬화 — 핸들을 descriptor로. **배열만 재귀**(office 측 `_materializeArgs` 와 동일 깊이).\n * 옵션 객체 안에 중첩된 핸들은 직렬화하지 않는다(office가 복원하지 않으므로).\n */\n function serializeArgs(value: unknown): unknown {\n if (Array.isArray(value)) {\n return value.map(serializeArgs);\n }\n if (isHandle(value)) {\n return { __proxy: true, type: value.type, attrs: value.attrs };\n }\n return value;\n }\n\n /**\n * 결과 역직렬화 — descriptor를 핸들로 (office 측 `_serializeResult` 의 역).\n * 배열/평범한 객체는 재귀, 원시값은 그대로.\n * path kind 에서는 descriptor(eager/팩토리 응답의 anchored 식별자)를\n * `{root: {type, ...attrs}, steps: []}` anchored 경로 핸들로 복원한다.\n */\n function deserializeResult(value: unknown): unknown {\n if (value == null || typeof value !== 'object') {\n return value;\n }\n if (Array.isArray(value)) {\n return value.map(deserializeResult);\n }\n if (isProxyDescriptor(value)) {\n if (kind === 'path') {\n return makeHandle(value.type, {\n root: { type: value.type, ...value.attrs },\n steps: [],\n } satisfies PathAttrs);\n }\n return makeHandle(value.type, value.attrs);\n }\n\n const out: Record<string, unknown> = {};\n for (const key of Object.keys(value)) {\n out[key] = deserializeResult((value as Record<string, unknown>)[key]);\n }\n return out;\n }\n\n /**\n * 래핑된 응답에서 개발자 표면 값을 꺼낸다.\n *\n * 실패 응답은 transport code 가 `FAIL` 이라 postMessage 계층이 먼저 reject 하므로\n * 정상 흐름에서는 여기 도달하지 않는다. 도달했다면 프로토콜 불일치이므로\n * resolve 대신 SDKError 로 전환해 \"resolve = 성공\" 계약을 지킨다.\n * 래핑되지 않은 응답은 그대로 통과시킨다.\n */\n function unwrapResponse(raw: unknown, method: string): unknown {\n if (raw == null || typeof raw !== 'object') {\n return raw;\n }\n const response = raw as { success?: unknown; result?: unknown };\n if (response.success === true) {\n return response.result;\n }\n if (response.success === false) {\n const { error } = raw as ApiErrorResponse;\n const detail = error?.message ? `${error.code}: ${error.message}` : (error?.code ?? 'UNKNOWN');\n throw new SDKError(\n `[TFO-SDK] ${method} failed: ${detail}`,\n SDK_ERROR_CODE.FRAMEWORK_ERROR,\n raw,\n );\n }\n return raw;\n }\n\n async function invoke(state: HandleState, method: string, args: unknown[]): Promise<unknown> {\n const payload = {\n proxyType: state.type,\n attrs: state.attrs,\n method,\n args: serializeArgs(args),\n };\n // office 개발자 proxy 메서드 실행 cmd\n const raw = await execute(\"SDK.proxyInvoke\", [payload]);\n return deserializeResult(unwrapResponse(raw, method));\n }\n\n /** path kind 네비게이션 — 통신 없이 스텝을 누적한 하위 타입 핸들을 동기 생성한다. */\n function makeChildHandle(state: HandleState, method: string, childType: string, args: unknown[]): unknown {\n const attrs = state.attrs as PathAttrs;\n const steps: PathStep[] = [\n ...(attrs.steps ?? []),\n { m: method, a: serializeArgs(args) as unknown[] },\n ];\n const childAttrs: PathAttrs =\n attrs.root !== undefined ? { root: attrs.root, steps } : { steps };\n return makeHandle(childType, childAttrs);\n }\n\n function makeHandle(type: string, attrs: Record<string, unknown>): unknown {\n const state: HandleState = { [HANDLE]: true, kind, type, attrs };\n\n return new Proxy(state, {\n get(target, prop) {\n // 내부 상태 / 핸들 마커는 그대로 노출 (직렬화에서 사용).\n if (prop === HANDLE) {\n return true;\n }\n if (prop === 'type') {\n return target.type;\n }\n if (prop === 'attrs') {\n return target.attrs;\n }\n // ⚠️ thenable 오인 방지 — 핸들은 await method() 결과로 반환되므로\n // then 조회 시 함수를 돌려주면 Promise가 무한 풀림에 빠진다.\n if (prop === 'then' || typeof prop === 'symbol') {\n return undefined;\n }\n // path kind: navigationMap 등재 메서드 = lazy 네비게이션 (통신 0, 동기 반환).\n if (navigationMap) {\n const typeNav = navigationMap[target.type];\n if (typeNav && Object.prototype.hasOwnProperty.call(typeNav, prop)) {\n const childType = typeNav[prop as string] as string;\n return (...args: unknown[]) =>\n makeChildHandle(target, String(prop), childType, args);\n }\n }\n // 타입 가드: 내부 판별값과 동기 비교 (통신 0). 원격 위임보다만 먼저 가로챈다.\n if (guardMethods && Object.prototype.hasOwnProperty.call(guardMethods, prop)) {\n return () => target.type === guardMethods[prop as string];\n }\n // 그 외 모든 prop = 원격 메서드. 인자를 직렬화해 proxyInvoke로 위임.\n return (...args: unknown[]) => invoke(target, String(prop), args);\n },\n });\n }\n\n return { makeHandle };\n}\n","/**\n * createOffice factory — SDK의 단일 저수준 진입점.\n *\n * 이미 떠 있는 오피스 편집기(iframe/window)에 postMessage 로 **연결**한다 — 편집기를\n * 생성하지 않으며, `disconnect()` 도 연결만 끊는다. iframe 요소만 있으면 상위 facade\n * `Office.word/cell/show(iframe)` (app.ts) 가 더 간편하다.\n *\n * Options (`OfficeOptions`):\n * - module: 'word' | 'cell' | 'show' (필수)\n * - frameworkOrigin: string (필수, '*' 금지)\n * - iframeEl?: HTMLIFrameElement (iframeEl 또는 targetWindow 중 1개 필수)\n * - targetWindow?: Window\n * - timeoutMs?: number (기본 5000ms)\n *\n * 반환 (`Office<M>` = `OfficeHandle<M>`):\n * - module: OfficeModule\n * - execute: (method, params) => Promise<unknown> AI/Office Agent 진입점\n * - getToolSchemas: () => Promise<ToolSchema[]> SDK.toolList 호출\n * - getSystemPrompt:() => Promise<string> SDK.systemPrompt 호출 (제공)\n * - getTools: (options?) => Promise<OfficeTool[]> 실행 가능한 도구 배열 (개발자 기본 경로)\n * - registerTools: (modelContext, options?) => Promise getTools 위의 콜백 등록 편의 함수\n * - getDocument: () => 모듈별 문서 최상위 핸들\n * - disconnect: () => void 리스너 제거 + pending reject\n *\n * Wires together:\n * - postMessage context (postMessage.ts)\n * - execute function (execute.ts)\n * - registerTools (registerWith.ts)\n *\n * server-only — LLM 이 `office.execute(\"도구이름\", [args])` 로 동적 dispatch. 옛 정적\n * 개발자 표면(`sdk.api.X.Y`) + 도구 큐(`registerTool`) 는 2026-06-01 폐기.\n */\n\nimport { CELL_NAVIGATION_MAP } from './cellNavigation.js';\nimport { createExecute } from './execute.js';\nimport { clearPending, createMessageListener, createPostMessageContext } from './postMessage.js';\nimport { createProxyClient } from './proxyClient.js';\nimport { PROXY_TYPE, SHOW_GUARD_METHODS } from './proxyConstants.js';\nimport { getToolSchemas, getTools, registerTools } from './registerWith.js';\nimport { getSystemPrompt } from './systemPrompt.js';\nimport {\n type DocumentHandleByModule,\n MODULE_APP_ID,\n type OfficeHandle,\n type OfficeModule,\n type OfficeOptions,\n SDKError,\n SDK_ERROR_CODE,\n} from './types.js';\n\n/**\n * 오피스 편집기에 연결된 `Office` 핸들을 만든다. 통신 컨텍스트·리스너를 wire-up.\n *\n * `module` 을 리터럴로 주면(`{ module: 'cell', ... }`) `getDocument()` 반환\n * 타입이 모듈별로 추론된다 (`DocumentHandleByModule` — cell→Workbook,\n * show→Document, word→WordDocument).\n *\n * @param options - 연결 옵션\n * @throws SDKError(INVALID_ARGUMENT) - 옵션 검증 실패 시\n */\nexport function createOffice<M extends OfficeModule>(options: OfficeOptions<M>): OfficeHandle<M> {\n // ─── 1. 입력 검증 ─────────────────────────────────────────\n if (!options || typeof options !== 'object') {\n throw new SDKError(\n '[TFO-SDK] createOffice() requires an options object.',\n SDK_ERROR_CODE.INVALID_ARGUMENT,\n );\n }\n\n const { module, frameworkOrigin, iframeEl, targetWindow, timeoutMs } = options;\n\n if (!module || !(module in MODULE_APP_ID)) {\n throw new SDKError(\n `[TFO-SDK] Invalid module: ${String(module)}. Expected 'word' | 'cell' | 'show'.`,\n SDK_ERROR_CODE.INVALID_ARGUMENT,\n );\n }\n\n if (!frameworkOrigin || frameworkOrigin === '*') {\n throw new SDKError(\n \"[TFO-SDK] frameworkOrigin is required and must not be '*'.\",\n SDK_ERROR_CODE.INVALID_ARGUMENT,\n );\n }\n\n const target: Window | null = targetWindow ?? iframeEl?.contentWindow ?? null;\n if (!target) {\n throw new SDKError(\n \"[TFO-SDK] No target window available. Provide either 'targetWindow' or an 'iframeEl' with a valid contentWindow.\",\n SDK_ERROR_CODE.INVALID_ARGUMENT,\n );\n }\n\n // ─── 2. 컨텍스트·리스너 생성 ───────────────────────────────\n const ctx = createPostMessageContext(module, frameworkOrigin, target);\n const removeListener = createMessageListener(ctx);\n\n let disconnected = false;\n const isDisconnected = (): boolean => disconnected;\n\n const execute = createExecute(ctx, isDisconnected, timeoutMs);\n // path-attrs(lazy 네비게이션)는 cell 만. 응답 래핑은 전 모듈 공통이라 proxyClient 가 항상 unwrap.\n // show 는 타입 가드 메서드(s.isImage() 등 동기 판별) opt-in.\n const { makeHandle } = createProxyClient(\n execute,\n module === 'cell' ? { navigationMap: CELL_NAVIGATION_MAP } :\n module === 'show' ? { guardMethods: SHOW_GUARD_METHODS } : undefined\n );\n\n const assertConnected = (): void => {\n if (disconnected) {\n throw new SDKError(\n '[TFO-SDK] Office handle has been disconnected.',\n SDK_ERROR_CODE.DESTROYED,\n );\n }\n };\n\n const disconnect = (): void => {\n if (disconnected) {\n return;\n }\n disconnected = true;\n removeListener();\n clearPending(ctx);\n };\n\n // ─── 3. Office 반환 ──────────────────────────────────────\n return {\n module,\n execute,\n getToolSchemas() {\n assertConnected();\n return getToolSchemas(execute);\n },\n getSystemPrompt() {\n assertConnected();\n return getSystemPrompt(execute);\n },\n getTools(options) {\n assertConnected();\n return getTools(execute, options);\n },\n registerTools(modelContext, registerOptions) {\n assertConnected();\n return registerTools(execute, modelContext, registerOptions);\n },\n // 반환 캐스트는 구현부 한정 — 공개 시그니처는 DocumentHandleByModule[M] 로 정확.\n getDocument(): DocumentHandleByModule[M] {\n assertConnected();\n if (module === 'show') {\n return makeHandle(PROXY_TYPE.DOCUMENT, {}) as DocumentHandleByModule[M];\n }\n if (module === 'cell') {\n // 빈 경로의 path 루트 핸들 — 통신 0회 (office 루트는 apiWorkbook 싱글턴).\n return makeHandle(PROXY_TYPE.WORKBOOK, { steps: [] }) as DocumentHandleByModule[M];\n }\n if (module === 'word') {\n // identity 루트 핸들 — 통신 0회 (office 루트는 wordDocument facade). navigationMap 미지정 = identity.\n return makeHandle(PROXY_TYPE.DOCUMENT, {}) as DocumentHandleByModule[M];\n }\n throw new SDKError(\n `[TFO-SDK] getDocument(): unsupported module '${module}'.`,\n SDK_ERROR_CODE.INVALID_ARGUMENT,\n );\n },\n disconnect,\n };\n}\n","/**\n * `Office` 앱 핸들 진입점 — iframe 요소에서 바로 시작하는 **권장 개발자 표면**.\n *\n * ```js\n * import { Office } from '@thinkfree.dev/tfo-sdk';\n *\n * const word1 = Office.word(document.getElementById('tfo_word_1'));\n * const word2 = Office.word(document.getElementById('tfo_word_2'));\n *\n * await word1.whenReady(); // 편집기 부팅 대기 (선택)\n * const body1 = await word1.getBody(); // 문서 메서드 직접 호출 (아래 위임 참고)\n * console.log(await body1.getText());\n *\n * word1.disconnect(); // 연결 해제 (편집기·문서는 그대로)\n * ```\n *\n * `createOffice` 위의 얇은 facade 다:\n * - **get-or-create 레지스트리** — 같은 iframe 요소로 다시 부르면 같은 앱 핸들을\n * 반환한다 (disconnect 전까지). disconnect 후 다시 부르면 새로 만든다.\n * - **frameworkOrigin 자동 유도** — 생략 시 iframe 의 `src` 에서 origin 을 읽는다.\n * src 가 없거나 데이터/블랍 URL 이면 `options.frameworkOrigin` 을 명시해야 한다.\n * - **whenReady(limitMs?)** — 편집기(SDK 브리지)가 응답할 때까지 짧은 타임아웃\n * probe 로 폴링한다. 문서는 보이는데 SDK 핸들러 등록이 늦는 부팅 구간을 흡수.\n * - **문서 메서드 위임** — 앱 핸들에 없는 프로퍼티는 `getDocument()` 핸들로\n * 위임된다. `app.getSlides()` === `app.getDocument().getSlides()`.\n * ⚠ `getDocument()` 를 대체하는 것이 아니다 — 기존 진입점은 그대로 유효하며,\n * 문서 핸들을 변수로 들고 다니거나 여러 번 재사용할 때는 여전히 getDocument() 를 쓴다.\n * 위임은 \"생략 가능\"이라는 편의만 더한다.\n *\n * 같은 페이지에 여러 iframe(여러 문서)을 띄워도 안전하다 — 인스턴스마다 pending\n * 맵이 분리되고 메시지 ID 가 페이지 전역 유니크라 응답이 섞이지 않는다.\n *\n * ⚠ iframe 의 src 를 다른 문서/모듈로 바꿀 때는 기존 핸들을 `disconnect()` 하고\n * 다시 얻는다 (레지스트리가 요소 기준이라 옛 핸들이 재사용되는 것 방지).\n *\n * ⚠ 이름 충돌 — MS Office.js 를 같은 페이지에서 쓰면 전역 `Office` 와 겹친다.\n * 그 경우 `import { Office as TfoOffice } from '@thinkfree.dev/tfo-sdk'` 로 별칭 import 한다.\n */\n\nimport { createOffice } from './init.js';\nimport {\n type DocumentHandleByModule,\n type OfficeHandle,\n type OfficeModule,\n type OfficeOptions,\n SDKError,\n SDK_ERROR_CODE,\n} from './types.js';\n\n// ============================================================\n// 상수\n// ============================================================\n\n/** whenReady probe 1회의 응답 타임아웃 (ms) */\nconst READY_PROBE_TIMEOUT_MS = 1000;\n/** whenReady probe 재시도 간격 (ms) */\nconst READY_PROBE_INTERVAL_MS = 300;\n/** whenReady 기본 대기 한도 (ms) */\nconst DEFAULT_READY_LIMIT_MS = 60000;\n\n// ============================================================\n// 타입\n// ============================================================\n\n/** `Office.word/cell/show(iframe, options?)` 옵션 — `OfficeOptions` 중 iframe 진입에서 선택인 것들 */\nexport interface OfficeAppOptions {\n /** 통신 대상 origin — 생략 시 iframe `src` 에서 유도. '*' 금지 */\n frameworkOrigin?: string;\n /** sendCommand 응답 타임아웃 (ms, 기본 5000) */\n timeoutMs?: number;\n}\n\n/** 앱 핸들 자체 멤버 — `Office` 연결 핸들 + 부팅 대기 `whenReady` */\ntype OfficeAppBase<M extends OfficeModule = OfficeModule> = OfficeHandle<M> & {\n /**\n * 편집기(SDK 브리지)가 응답할 때까지 기다린다.\n * 이미 준비된 상태면 1왕복으로 즉시 resolve 된다.\n *\n * @param limitMs - 최대 대기 시간 (ms, 기본 60000)\n * @throws SDKError(TIMEOUT) - 한도 안에 편집기가 응답하지 않으면\n */\n whenReady: (limitMs?: number) => Promise<void>;\n};\n\n/**\n * 앱 핸들 — 자체 멤버(`execute`/`getDocument`/`whenReady`/`disconnect` …)에 더해\n * 모듈별 문서 최상위 메서드가 위임으로 그대로 열린다.\n * `app.getSlides()` === `app.getDocument().getSlides()`.\n */\nexport type OfficeApp<M extends OfficeModule = OfficeModule> = OfficeAppBase<M> &\n DocumentHandleByModule[M];\n\n/** Word Processor 앱 핸들 (`Office.word()` 반환) */\nexport type WordApp = OfficeApp<'word'>;\n/** Spreadsheet 앱 핸들 (`Office.cell()` 반환) */\nexport type CellApp = OfficeApp<'cell'>;\n/** Presentation 앱 핸들 (`Office.show()` 반환) */\nexport type ShowApp = OfficeApp<'show'>;\n\ninterface AppRecord {\n module: OfficeModule;\n app: OfficeApp;\n}\n\n// ============================================================\n// 레지스트리\n// ============================================================\n\nconst registry = new WeakMap<HTMLIFrameElement, AppRecord>();\n\n/**\n * iframe `src` 에서 통신 대상 origin 을 유도한다.\n * @throws SDKError(INVALID_ARGUMENT) - src 가 없거나 origin 을 알 수 없는 URL 이면\n */\nfunction deriveFrameworkOrigin(iframeEl: HTMLIFrameElement): string {\n const src = iframeEl.getAttribute('src') ?? '';\n\n if (!src || src === 'about:blank') {\n throw new SDKError(\n \"[TFO-SDK] Cannot derive frameworkOrigin: the iframe has no 'src'. Pass options.frameworkOrigin explicitly.\",\n SDK_ERROR_CODE.INVALID_ARGUMENT,\n );\n }\n\n // blob: 은 new URL().origin 이 생성 주체의 origin 을 그대로 돌려줘(예: blob:https://host/uuid → https://host)\n // 아래 'null' 검사에 걸리지 않지만, 그 origin 은 blob 을 만든 문서의 것이지 편집기 프레임워크의\n // origin 이라는 보장이 없다. data: 와 동일하게 명시 지정을 요구한다.\n if (src.startsWith('blob:') || src.startsWith('data:')) {\n throw new SDKError(\n `[TFO-SDK] Cannot derive frameworkOrigin from a '${src.slice(0, src.indexOf(':') + 1)}' URL. Pass options.frameworkOrigin explicitly.`,\n SDK_ERROR_CODE.INVALID_ARGUMENT,\n );\n }\n\n let origin: string;\n try {\n origin = new URL(src, window.location.href).origin;\n } catch {\n throw new SDKError(\n `[TFO-SDK] Cannot derive frameworkOrigin from iframe src: ${src}. Pass options.frameworkOrigin explicitly.`,\n SDK_ERROR_CODE.INVALID_ARGUMENT,\n );\n }\n\n if (!origin || origin === 'null') {\n throw new SDKError(\n `[TFO-SDK] Iframe src has an opaque origin (${src}). Pass options.frameworkOrigin explicitly.`,\n SDK_ERROR_CODE.INVALID_ARGUMENT,\n );\n }\n\n return origin;\n}\n\n/**\n * 편집기(SDK 브리지)가 `SDK.ready` 에 응답할 때까지 짧은 타임아웃 probe 로 폴링한다.\n * probe 는 전용 인스턴스(1초 timeout)로 만들어 성공/실패와 무관하게 정리한다 — 브리지가\n * 뜨기 전에 보낸 요청은 응답 없이 유실되므로, 본 인스턴스(기본 5초)로 폴링하면 유실 1회당\n * 그만큼 블록되는 것을 피한다.\n *\n * `Office.word/cell/show(iframe).whenReady()` 가 내부에서 사용하는 것과 동일 루틴의\n * 공개 export — iframe 없이 `targetWindow` 로 붙는 소비자(office-agent headless 등)가\n * 같은 폴링을 중복 구현하지 않도록 제공한다.\n *\n * @param options - probe 인스턴스 생성 옵션 (module/frameworkOrigin + iframeEl 또는 targetWindow)\n * @param limitMs - 최대 대기 시간(ms, 기본 60000)\n * @throws SDKError(TIMEOUT) - 제한 시간 내 미응답\n */\nexport async function waitForOfficeReady(\n options: Omit<OfficeOptions, 'timeoutMs'>,\n limitMs: number = DEFAULT_READY_LIMIT_MS,\n): Promise<void> {\n const probe = createOffice({ ...options, timeoutMs: READY_PROBE_TIMEOUT_MS });\n const startedAt = Date.now();\n\n try {\n for (;;) {\n try {\n await probe.execute('SDK.ready', []);\n return;\n } catch {\n if (Date.now() - startedAt >= limitMs) {\n throw new SDKError(\n `[TFO-SDK] waitForOfficeReady(): editor did not become ready within ${limitMs}ms.`,\n SDK_ERROR_CODE.TIMEOUT,\n );\n }\n await new Promise((resolve) => setTimeout(resolve, READY_PROBE_INTERVAL_MS));\n }\n }\n } finally {\n probe.disconnect();\n }\n}\n\n/**\n * iframe 요소로 앱 핸들을 얻는다 (get-or-create).\n * @throws SDKError(INVALID_ARGUMENT) - iframe 이 아니거나, 같은 요소가 이미 다른\n * 모듈로 등록됐거나, origin 을 유도할 수 없으면\n */\nfunction getApp<M extends OfficeModule>(\n module: M,\n iframeEl: HTMLIFrameElement,\n options?: OfficeAppOptions,\n): OfficeApp<M> {\n if (!iframeEl || typeof iframeEl !== 'object' || iframeEl.tagName !== 'IFRAME') {\n throw new SDKError(\n '[TFO-SDK] Office.word/cell/show requires an <iframe> element.',\n SDK_ERROR_CODE.INVALID_ARGUMENT,\n );\n }\n\n const existing = registry.get(iframeEl);\n if (existing) {\n if (existing.module !== module) {\n throw new SDKError(\n `[TFO-SDK] This iframe is already bound to module '${existing.module}'. Call disconnect() on the existing app first.`,\n SDK_ERROR_CODE.INVALID_ARGUMENT,\n );\n }\n // 레지스트리는 모듈 무관 OfficeApp 으로 보관 — 위에서 module 일치를 검증했으므로 안전한 좁히기.\n return existing.app as unknown as OfficeApp<M>;\n }\n\n const frameworkOrigin = options?.frameworkOrigin ?? deriveFrameworkOrigin(iframeEl);\n const office = createOffice({\n module,\n frameworkOrigin,\n iframeEl,\n ...(options?.timeoutMs !== undefined ? { timeoutMs: options.timeoutMs } : {}),\n });\n\n const base: OfficeAppBase<M> = {\n ...office,\n whenReady(limitMs: number = DEFAULT_READY_LIMIT_MS): Promise<void> {\n return waitForOfficeReady({ module, frameworkOrigin, iframeEl }, limitMs);\n },\n disconnect(): void {\n registry.delete(iframeEl);\n office.disconnect();\n },\n };\n\n // 문서 메서드 위임 — 자체 멤버에 없는 프로퍼티는 getDocument() 핸들로 넘긴다.\n // app.getSlides() === app.getDocument().getSlides().\n // then/symbol 은 위임 전에 여기서 직접 undefined 로 끊는다:\n // - `await app` 이 무한 풀림에 빠지지 않게 (thenable 오인 가드)\n // - disconnect 후에도 introspection(console.log·심볼 조회)이 DESTROYED 를 던지지 않게\n // - 문서 프록시(proxyClient)의 동일 가드에 기대지 않아 한쪽 변경으로 조용히 깨질 일이 없게\n const app = new Proxy(base, {\n get(target, prop, receiver) {\n if (prop in target) {\n return Reflect.get(target, prop, receiver);\n }\n if (prop === 'then' || typeof prop === 'symbol') {\n return undefined;\n }\n return (target.getDocument() as unknown as Record<PropertyKey, unknown>)[prop];\n },\n }) as OfficeApp<M>;\n\n registry.set(iframeEl, { module, app: app as OfficeApp });\n return app;\n}\n\n// ============================================================\n// 공개 표면\n// ============================================================\n\n/**\n * Word Processor 편집기 iframe 의 앱 핸들을 얻는다 (get-or-create).\n * @example\n * const word = Office.word(document.getElementById('tfo_word_1'));\n * await word.whenReady();\n * const body = await word.getBody(); // = word.getDocument().getBody()\n */\nfunction word(iframeEl: HTMLIFrameElement, options?: OfficeAppOptions): WordApp {\n return getApp('word', iframeEl, options);\n}\n\n/**\n * Spreadsheet 편집기 iframe 의 앱 핸들을 얻는다 (get-or-create).\n * @example\n * const cell = Office.cell(document.getElementById('tfo_cell_1'));\n * await cell.getWorksheet(0).getRange('A1:B2').getValues();\n */\nfunction cell(iframeEl: HTMLIFrameElement, options?: OfficeAppOptions): CellApp {\n return getApp('cell', iframeEl, options);\n}\n\n/**\n * Presentation 편집기 iframe 의 앱 핸들을 얻는다 (get-or-create).\n * @example\n * const show = Office.show(document.getElementById('tfo_show_1'));\n * const slides = await show.getSlides();\n */\nfunction show(iframeEl: HTMLIFrameElement, options?: OfficeAppOptions): ShowApp {\n return getApp('show', iframeEl, options);\n}\n\n/**\n * 앱 핸들 진입점 네임스페이스 — `Office.word(iframeEl)` 형태로 사용 (모듈명과 동일: word/cell/show).\n *\n * 같은 이름의 타입 `Office<M>`(연결 핸들)과 값 `Office`(이 네임스페이스)는 이름 공간이 달라\n * 함께 export 된다 — `const office: Office<'word'> = Office.word(el)`.\n */\nexport const Office = {\n word,\n cell,\n show,\n} as const;\n\n/**\n * 연결 핸들 타입 — 값 `Office`(네임스페이스)와 같은 이름으로 짝을 이룬다.\n * `const office: Office<'word'> = Office.word(el)`. 본체는 types.ts 의 `OfficeHandle<M>`.\n */\nexport type Office<M extends OfficeModule = OfficeModule> = OfficeHandle<M>;\n","/* eslint-disable */\n/**\n * Thinkfree Office SDK Type Definitions\n *\n * ⚠️ AUTO-GENERATED — DO NOT EDIT.\n * 오피스 구현 저장소(비공개)의 API JSDoc 에서 생성된다 — 수정은 원본 JSDoc 에서.\n *\n * Generated: 2026-09-14\n */\n\n// Thinkfree Office SDK (Common)\n\n// =============================================================================\n// Constants / Enums\n// =============================================================================\n\n/** 선 대시(점선) 스타일 (OOXML a:prstDash). */\nexport const LineDash = {\n SOLID: \"solid\",\n DOT: \"dot\",\n DASH: \"dash\",\n LG_DASH: \"lgDash\",\n DASH_DOT: \"dashDot\",\n LG_DASH_DOT: \"lgDashDot\",\n LG_DASH_DOT_DOT: \"lgDashDotDot\",\n SYS_DASH: \"sysDash\",\n SYS_DOT: \"sysDot\",\n SYS_DASH_DOT: \"sysDashDot\",\n SYS_DASH_DOT_DOT: \"sysDashDotDot\",\n} as const;\nexport type LineDash = typeof LineDash[keyof typeof LineDash];\n\n/**\n * 클라이언트가 지원하는 OOXML preset geometry 전체 목록.\n * insertShape 의 preset 에 전달해 해당 모양의 도형을 만든다.\n */\nexport const ShapePreset = {\n LINE: \"line\",\n BENT_CONNECTOR: \"bentConnector3\",\n CURVED_CONNECTOR: \"curvedConnector3\",\n RECT: \"rect\",\n ROUND_RECT: \"roundRect\",\n SNIP_1_RECT: \"snip1Rect\",\n SNIP_2_SAME_RECT: \"snip2SameRect\",\n SNIP_2_DIAG_RECT: \"snip2DiagRect\",\n SNIP_ROUND_RECT: \"snipRoundRect\",\n ROUND_1_RECT: \"round1Rect\",\n ROUND_2_SAME_RECT: \"round2SameRect\",\n ROUND_2_DIAG_RECT: \"round2DiagRect\",\n ELLIPSE: \"ellipse\",\n TRIANGLE: \"triangle\",\n RT_TRIANGLE: \"rtTriangle\",\n PARALLELOGRAM: \"parallelogram\",\n TRAPEZOID: \"trapezoid\",\n DIAMOND: \"diamond\",\n PENTAGON: \"pentagon\",\n HEXAGON: \"hexagon\",\n HEPTAGON: \"heptagon\",\n OCTAGON: \"octagon\",\n DECAGON: \"decagon\",\n DODECAGON: \"dodecagon\",\n PIE_WEDGE: \"pieWedge\",\n PIE: \"pie\",\n CHORD: \"chord\",\n TEARDROP: \"teardrop\",\n FRAME: \"frame\",\n HALF_FRAME: \"halfFrame\",\n CORNER: \"corner\",\n DIAG_STRIPE: \"diagStripe\",\n PLUS: \"plus\",\n PLAQUE: \"plaque\",\n CAN: \"can\",\n CUBE: \"cube\",\n BEVEL: \"bevel\",\n DONUT: \"donut\",\n NO_SMOKING: \"noSmoking\",\n BLOCK_ARC: \"blockArc\",\n FOLDED_CORNER: \"foldedCorner\",\n SMILEY_FACE: \"smileyFace\",\n HEART: \"heart\",\n FUNNEL: \"funnel\",\n GEAR_6: \"gear6\",\n GEAR_9: \"gear9\",\n LIGHTNING_BOLT: \"lightningBolt\",\n SUN: \"sun\",\n MOON: \"moon\",\n CLOUD: \"cloud\",\n ARC: \"arc\",\n BRACKET_PAIR: \"bracketPair\",\n BRACE_PAIR: \"bracePair\",\n LEFT_BRACKET: \"leftBracket\",\n RIGHT_BRACKET: \"rightBracket\",\n LEFT_BRACE: \"leftBrace\",\n RIGHT_BRACE: \"rightBrace\",\n RIGHT_ARROW: \"rightArrow\",\n LEFT_ARROW: \"leftArrow\",\n UP_ARROW: \"upArrow\",\n DOWN_ARROW: \"downArrow\",\n LEFT_RIGHT_ARROW: \"leftRightArrow\",\n UP_DOWN_ARROW: \"upDownArrow\",\n QUAD_ARROW: \"quadArrow\",\n LEFT_RIGHT_UP_ARROW: \"leftRightUpArrow\",\n BENT_ARROW: \"bentArrow\",\n UTURN_ARROW: \"uturnArrow\",\n LEFT_UP_ARROW: \"leftUpArrow\",\n BENT_UP_ARROW: \"bentUpArrow\",\n CURVED_RIGHT_ARROW: \"curvedRightArrow\",\n CURVED_LEFT_ARROW: \"curvedLeftArrow\",\n CURVED_UP_ARROW: \"curvedUpArrow\",\n CURVED_DOWN_ARROW: \"curvedDownArrow\",\n STRIPED_RIGHT_ARROW: \"stripedRightArrow\",\n NOTCHED_RIGHT_ARROW: \"notchedRightArrow\",\n HOME_PLATE: \"homePlate\",\n CHEVRON: \"chevron\",\n RIGHT_ARROW_CALLOUT: \"rightArrowCallout\",\n LEFT_ARROW_CALLOUT: \"leftArrowCallout\",\n UP_ARROW_CALLOUT: \"upArrowCallout\",\n DOWN_ARROW_CALLOUT: \"downArrowCallout\",\n LEFT_RIGHT_ARROW_CALLOUT: \"leftRightArrowCallout\",\n UP_DOWN_ARROW_CALLOUT: \"upDownArrowCallout\",\n QUAD_ARROW_CALLOUT: \"quadArrowCallout\",\n CIRCULAR_ARROW: \"circularArrow\",\n LEFT_CIRCULAR_ARROW: \"leftCircularArrow\",\n SWOOSH_ARROW: \"swooshArrow\",\n LEFT_RIGHT_RIBBON: \"leftRightRibbon\",\n IRREGULAR_SEAL_1: \"irregularSeal1\",\n IRREGULAR_SEAL_2: \"irregularSeal2\",\n STAR_4: \"star4\",\n STAR_5: \"star5\",\n STAR_6: \"star6\",\n STAR_7: \"star7\",\n STAR_8: \"star8\",\n STAR_10: \"star10\",\n STAR_12: \"star12\",\n STAR_16: \"star16\",\n STAR_24: \"star24\",\n STAR_32: \"star32\",\n RIBBON_2: \"ribbon2\",\n RIBBON: \"ribbon\",\n ELLIPSE_RIBBON_2: \"ellipseRibbon2\",\n ELLIPSE_RIBBON: \"ellipseRibbon\",\n VERTICAL_SCROLL: \"verticalScroll\",\n HORIZONTAL_SCROLL: \"horizontalScroll\",\n WAVE: \"wave\",\n DOUBLE_WAVE: \"doubleWave\",\n WEDGE_RECT_CALLOUT: \"wedgeRectCallout\",\n WEDGE_ROUND_RECT_CALLOUT: \"wedgeRoundRectCallout\",\n WEDGE_ELLIPSE_CALLOUT: \"wedgeEllipseCallout\",\n CLOUD_CALLOUT: \"cloudCallout\",\n CALLOUT_1: \"callout1\",\n CALLOUT_2: \"callout2\",\n CALLOUT_3: \"callout3\",\n ACCENT_CALLOUT_1: \"accentCallout1\",\n ACCENT_CALLOUT_2: \"accentCallout2\",\n ACCENT_CALLOUT_3: \"accentCallout3\",\n BORDER_CALLOUT_1: \"borderCallout1\",\n BORDER_CALLOUT_2: \"borderCallout2\",\n BORDER_CALLOUT_3: \"borderCallout3\",\n ACCENT_BORDER_CALLOUT_1: \"accentBorderCallout1\",\n ACCENT_BORDER_CALLOUT_2: \"accentBorderCallout2\",\n ACCENT_BORDER_CALLOUT_3: \"accentBorderCallout3\",\n FLOW_CHART_PROCESS: \"flowChartProcess\",\n FLOW_CHART_ALTERNATE_PROCESS: \"flowChartAlternateProcess\",\n FLOW_CHART_DECISION: \"flowChartDecision\",\n FLOW_CHART_INPUT_OUTPUT: \"flowChartInputOutput\",\n FLOW_CHART_PREDEFINED_PROCESS: \"flowChartPredefinedProcess\",\n FLOW_CHART_INTERNAL_STORAGE: \"flowChartInternalStorage\",\n FLOW_CHART_DOCUMENT: \"flowChartDocument\",\n FLOW_CHART_MULTIDOCUMENT: \"flowChartMultidocument\",\n FLOW_CHART_TERMINATOR: \"flowChartTerminator\",\n FLOW_CHART_PREPARATION: \"flowChartPreparation\",\n FLOW_CHART_MANUAL_INPUT: \"flowChartManualInput\",\n FLOW_CHART_MANUAL_OPERATION: \"flowChartManualOperation\",\n FLOW_CHART_CONNECTOR: \"flowChartConnector\",\n FLOW_CHART_OFFPAGE_CONNECTOR: \"flowChartOffpageConnector\",\n FLOW_CHART_PUNCHED_CARD: \"flowChartPunchedCard\",\n FLOW_CHART_PUNCHED_TAPE: \"flowChartPunchedTape\",\n FLOW_CHART_SUMMING_JUNCTION: \"flowChartSummingJunction\",\n FLOW_CHART_OR: \"flowChartOr\",\n FLOW_CHART_COLLATE: \"flowChartCollate\",\n FLOW_CHART_SORT: \"flowChartSort\",\n FLOW_CHART_EXTRACT: \"flowChartExtract\",\n FLOW_CHART_MERGE: \"flowChartMerge\",\n FLOW_CHART_ONLINE_STORAGE: \"flowChartOnlineStorage\",\n FLOW_CHART_DELAY: \"flowChartDelay\",\n FLOW_CHART_MAGNETIC_TAPE: \"flowChartMagneticTape\",\n FLOW_CHART_MAGNETIC_DISK: \"flowChartMagneticDisk\",\n FLOW_CHART_MAGNETIC_DRUM: \"flowChartMagneticDrum\",\n FLOW_CHART_DISPLAY: \"flowChartDisplay\",\n ACTION_BUTTON_BACK_PREVIOUS: \"actionButtonBackPrevious\",\n ACTION_BUTTON_FORWARD_NEXT: \"actionButtonForwardNext\",\n ACTION_BUTTON_BEGINNING: \"actionButtonBeginning\",\n ACTION_BUTTON_END: \"actionButtonEnd\",\n ACTION_BUTTON_HOME: \"actionButtonHome\",\n ACTION_BUTTON_INFORMATION: \"actionButtonInformation\",\n ACTION_BUTTON_RETURN: \"actionButtonReturn\",\n ACTION_BUTTON_MOVIE: \"actionButtonMovie\",\n ACTION_BUTTON_DOCUMENT: \"actionButtonDocument\",\n ACTION_BUTTON_SOUND: \"actionButtonSound\",\n ACTION_BUTTON_HELP: \"actionButtonHelp\",\n ACTION_BUTTON_BLANK: \"actionButtonBlank\",\n MATH_PLUS: \"mathPlus\",\n MATH_MINUS: \"mathMinus\",\n MATH_MULTIPLY: \"mathMultiply\",\n MATH_DIVIDE: \"mathDivide\",\n MATH_EQUAL: \"mathEqual\",\n MATH_NOT_EQUAL: \"mathNotEqual\",\n} as const;\nexport type ShapePreset = typeof ShapePreset[keyof typeof ShapePreset];\n\n/** 도형 z-order(앞뒤 순서) 변경 종류. */\nexport const ShapeZOrder = {\n /** 맨 앞으로 */\n FRONT: \"front\",\n /** 맨 뒤로 */\n BACK: \"back\",\n /** 앞으로 (한 단계) */\n FORWARD: \"forward\",\n /** 뒤로 (한 단계) */\n BACKWARD: \"backward\",\n} as const;\nexport type ShapeZOrder = typeof ShapeZOrder[keyof typeof ShapeZOrder];\n\n/**\n * addChart/setType 의 chartType. 단순 (type, range) 생성이 가능한 20종만 있으며,\n * 그 밖의 종류는 CHART_TYPE_UNSUPPORTED 로 거부된다.\n */\nexport const ChartType = {\n clusteredColumn: \"clustered_column\",\n stackedColumn: \"stacked_column\",\n _3dClusteredColumn: \"3d_clustered_column\",\n _3dStackedColumn: \"3d_stacked_column\",\n clusteredBar: \"clustered_bar\",\n stackedBar: \"stacked_bar\",\n _3dClusteredBar: \"3d_clustered_bar\",\n _3dStackedBar: \"3d_stacked_bar\",\n line: \"line\",\n pie: \"pie\",\n _3dPie: \"3d_pie\",\n explodedPie: \"exploded_pie\",\n _3dExplodedPie: \"3d_exploded_pie\",\n scatter: \"scatter\",\n area: \"area\",\n stackedArea: \"stacked_area\",\n _3dArea: \"3d_area\",\n _3dStackedArea: \"3d_stacked_area\",\n doughnut: \"doughnut\",\n radar: \"radar\",\n} as const;\nexport type ChartType = typeof ChartType[keyof typeof ChartType];\n\n/** setGridLine 의 gridType. \"none\" 은 해당 축 눈금선 숨김. */\nexport const ChartGridLineType = {\n none: \"none\",\n major: \"major\",\n minor: \"minor\",\n majorMinor: \"major_minor\",\n} as const;\nexport type ChartGridLineType = typeof ChartGridLineType[keyof typeof ChartGridLineType];\n\n/** setAxisTitle/setGridLine 의 axis — 대상 축을 가리킨다. */\nexport const ChartAxis = {\n horizontal: \"horizontal\",\n vertical: \"vertical\",\n} as const;\nexport type ChartAxis = typeof ChartAxis[keyof typeof ChartAxis];\n\n/** setLegendPosition 의 position. \"none\" 은 범례 숨김. */\nexport const ChartLegendPosition = {\n none: \"none\",\n bottom: \"bottom\",\n topRight: \"top_right\",\n top: \"top\",\n right: \"right\",\n left: \"left\",\n} as const;\nexport type ChartLegendPosition = typeof ChartLegendPosition[keyof typeof ChartLegendPosition];\n\n/**\n * setDataLabelPosition 의 position. \"none\" 은 숨김.\n * 차트 타입별 유효 위치는 부분집합이며 위반 시 CHART_DATALABEL_POSITION_INVALID.\n */\nexport const ChartDataLabelPosition = {\n none: \"none\",\n center: \"center\",\n insideEnd: \"inside_end\",\n insideBase: \"inside_base\",\n outsideEnd: \"outside_end\",\n bestFit: \"best_fit\",\n left: \"left\",\n right: \"right\",\n top: \"top\",\n bottom: \"bottom\",\n} as const;\nexport type ChartDataLabelPosition = typeof ChartDataLabelPosition[keyof typeof ChartDataLabelPosition];\n\n// =============================================================================\n// Classes\n// =============================================================================\n","/* eslint-disable */\n/**\n * Thinkfree Office SDK Type Definitions\n *\n * ⚠️ AUTO-GENERATED — DO NOT EDIT.\n * 오피스 구현 저장소(비공개)의 API JSDoc 에서 생성된다 — 수정은 원본 JSDoc 에서.\n *\n * proxy 메서드는 postMessage bridge 를 거치므로 Promise 를 반환한다.\n * Generated: 2026-09-14\n */\n\n// Thinkfree Office SDK (Word)\n\n// 공통 enum — 정의·값은 common 모듈(SDK flat export)에만 있다. 여기서는 시그니처 참조용 type import 만 한다.\nimport type { LineDash, ShapePreset, ShapeZOrder, ChartType, ChartGridLineType, ChartAxis, ChartLegendPosition, ChartDataLabelPosition } from \"./common-api.generated.js\";\n\n// 실제(비-ambient) 모듈 네임스페이스 — 단일 번들 d.ts 에서 `Word.X` 로 타입·런타임\n// enum 값을 모두 노출한다. index 의 `export * as` 재수출은 tsup dts 롤업에서 const+type\n// 선언 병합의 값 의미가 타입 전용으로 강등되므로 쓰지 않는다 (dts.config 의 namespace 키).\nexport namespace Word {\n // =============================================================================\n // Constants / Enums\n // =============================================================================\n\n /**\n * 삽입 위치 — 기준 객체(receiver)를 기준으로 어디에 넣을지. insert 계열의 옵션 `position` 값.\n * 밖(형제): before/after, 안(콘텐츠 끝단): start/end.\n * start/end 의 기준은 기준 객체 종류로 갈린다 — 단락이면 그 단락 콘텐츠의 맨앞/맨끝,\n * 본문(body)이면 본문 콘텐츠의 맨앞/맨끝(= 첫 단락 앞 / 마지막 단락 뒤).\n */\n export const InsertAt = {\n /** 기준 요소 앞(형제) */\n BEFORE: \"before\",\n /** 기준 요소 뒤(형제) */\n AFTER: \"after\",\n /** 기준 요소 콘텐츠 맨 앞 */\n START: \"start\",\n /** 기준 요소 콘텐츠 맨 끝 */\n END: \"end\",\n } as const;\n export type InsertAt = typeof InsertAt[keyof typeof InsertAt];\n\n /** 범위 조회 위치 — 기준 객체(receiver)의 어느 부분 범위를 반환할지. getRange(RangePosition) 값. */\n export const RangePosition = {\n /** 전체(단락 기호 포함) */\n WHOLE: \"whole\",\n /** 시작 지점(collapsed) */\n START: \"start\",\n /** 끝 지점(단락 기호 앞, collapsed) */\n END: \"end\",\n /** 단락 기호 다음 지점(collapsed) */\n AFTER: \"after\",\n /** 단락 기호 제외한 내용 범위 */\n CONTENT: \"content\",\n /** 시작 앞 지점(collapsed) */\n BEFORE: \"before\",\n } as const;\n export type RangePosition = typeof RangePosition[keyof typeof RangePosition];\n\n /**\n * 선택 영역 기준 위치 — 현재 선택/커서를 어느 지점으로 잡을지.\n * - select: 선택 영역 전체, start/end: 선택(커서)의 시작/끝 지점(collapsed).\n */\n export const SelectionMode = {\n /** 현재 선택 영역 전체 */\n SELECT: \"select\",\n /** 선택/커서 시작 지점(collapsed) */\n START: \"start\",\n /** 선택/커서 끝 지점(collapsed) */\n END: \"end\",\n } as const;\n export type SelectionMode = typeof SelectionMode[keyof typeof SelectionMode];\n\n /**\n * RangeBuilder.fromView() 인자 타입.\n * View 환경에서 어떤 정보를 ModelRange로 변환할지 결정한다.\n */\n export const ViewContextType = {\n /** 현재 커서 (selection.getModelRange(false)) */\n CURSOR: \"cursor\",\n /** 현재 선택 영역 (selection.getModelRange(true)) */\n SELECTION: \"selection\",\n } as const;\n export type ViewContextType = typeof ViewContextType[keyof typeof ViewContextType];\n\n /** 문서 구조 조회 타입 필터 — getStructure({ type }) / get_document_structure 의 type 값. */\n export const StructureFilter = {\n /** 표 */\n TABLE: \"table\",\n /** 목록 단락 */\n LIST: \"list\",\n } as const;\n export type StructureFilter = typeof StructureFilter[keyof typeof StructureFilter];\n\n /**\n * WordRange 가 \"무엇을 가리키는지\" 적어 두는 방식(종류).\n *\n * OFFSET 만 좌표를 직접 들고 있고, 나머지는 대상의 id·이름만 들고 있다가 **쓸 때 위치를 찾는다**\n * — 그래서 선택 영역이 바뀌거나 편집으로 표시가 밀려도 항상 지금 위치를 가리킨다.\n */\n export const RangeKind = {\n /** 단락 ID + 글자 위치를 직접 지정(좌표를 들고 있음 — 이후 편집으로 어긋날 수 있다) */\n OFFSET: \"offset\",\n /** 영역의 어느 부분인지로 지정(맨앞/맨끝/전체 등 — RangePosition) */\n RANGE_POSITION: \"rangePosition\",\n /** 화면의 선택 영역/커서(쓸 때마다 현재 선택을 다시 읽는다) */\n VIEW: \"view\",\n /** 그 댓글이 달린 본문 구간 */\n COMMENT: \"comment\",\n /** 각주/미주 표시가 놓인 자리 */\n NOTE: \"note\",\n /** 책갈피 표시가 놓인 자리(글자 한 칸) */\n BOOKMARK: \"bookmark\",\n /** 도형·이미지가 놓인 자리(글자 한 칸 — floating 이면 앵커 자리) */\n SHAPE: \"shape\",\n /** 하이퍼링크의 표시 텍스트 구간(앞뒤 마커는 제외 — 링크를 유지한 채 글자만 다룬다) */\n HYPERLINK: \"hyperlink\",\n /** 변경 추적 항목이 차지하는 구간 */\n CHANGE_TRACKING: \"changeTracking\",\n } as const;\n export type RangeKind = typeof RangeKind[keyof typeof RangeKind];\n\n /**\n * WordBody.search()/WordRange.search() 로 찾을 수 있는 특수 문자(눈에 보이지 않는 비-텍스트 런) 종류.\n * Word 찾기/바꾸기의 \"특수 문자\"에 대응 — 텍스트 검색(search)이 문자로 매칭하지 못하는 요소를 종류로 지목해 위치(Range)를 얻는다.\n * 값은 코어 모델 런 타입(DefineTypes.element)의 키와 동일하다.\n */\n export const SpecialCharacter = {\n /** 페이지 나누기 */\n PAGE_BREAK: \"pageBreak\",\n /** 단 나누기 */\n COLUMN_BREAK: \"columnBreak\",\n /** 줄바꿈(Shift+Enter) */\n SOFT_BREAK: \"softBreak\",\n /** 탭 */\n TAB: \"tab\",\n /** 기호 */\n SYMBOL: \"symbol\",\n } as const;\n export type SpecialCharacter = typeof SpecialCharacter[keyof typeof SpecialCharacter];\n\n /**\n * 보기 배율/맞춤 모드.\n * WordDocument.setZoom() 에서 사용한다. 코어에 정의된 배율 프리셋(50~200%)과 맞춤·단계 모드.\n */\n export const ZoomMode = {\n /** 50% */\n SCALE_50: \"50\",\n /** 66% */\n SCALE_66: \"66\",\n /** 75% */\n SCALE_75: \"75\",\n /** 100% (원래 배율) */\n SCALE_100: \"100\",\n /** 125% */\n SCALE_125: \"125\",\n /** 150% */\n SCALE_150: \"150\",\n /** 200% */\n SCALE_200: \"200\",\n /** 폭 맞춤 */\n FIT_WIDTH: \"fitWidth\",\n /** 쪽 맞춤 */\n FIT_WINDOW: \"fitInWindow\",\n /** 한 단계 확대 */\n ZOOM_IN: \"zoomIn\",\n /** 한 단계 축소 */\n ZOOM_OUT: \"zoomOut\",\n } as const;\n export type ZoomMode = typeof ZoomMode[keyof typeof ZoomMode];\n\n /**\n * 머리글/바닥글 종류.\n * - PRIMARY: 기본(홀수/모든 페이지) — 별도 \"odd\" 는 없고 PRIMARY 가 그 역할\n */\n export const HeaderFooterType = {\n /** 기본 머리글/바닥글 (OOXML default) */\n PRIMARY: \"primary\",\n /** 첫 페이지 (OOXML first) */\n FIRST_PAGE: \"firstPage\",\n /** 짝수 페이지 (OOXML even) */\n EVEN_PAGES: \"evenPages\",\n } as const;\n export type HeaderFooterType = typeof HeaderFooterType[keyof typeof HeaderFooterType];\n\n /**\n * 머리글/바닥글 종류의 OOXML/모델 어휘 (WordSection.getHeader/getFooter type 으로도 허용).\n * - HeaderFooterType(primary/firstPage/evenPages)과 1:1 동의어 — 둘 중 어느 어휘로도 호출 가능.\n */\n export const HeaderFooterVariant = {\n /** 기본(= HeaderFooterType.PRIMARY) */\n DEFAULT: \"default\",\n /** 첫 페이지(= HeaderFooterType.FIRST_PAGE) */\n FIRST: \"first\",\n /** 짝수 페이지(= HeaderFooterType.EVEN_PAGES) */\n EVEN: \"even\",\n } as const;\n export type HeaderFooterVariant = typeof HeaderFooterVariant[keyof typeof HeaderFooterVariant];\n\n /**\n * 구역(section) 나누기 유형 (WordSection.setBreakType type — getPageSetup().breakType 과 대칭).\n * setBreakType 으로 지정한 값은 getPageSetup().breakType 으로 그대로 다시 읽힌다.\n * - \"단 나누기\"(nextColumn)는 구역 나누기 유형이 아니라 본문 inline 나누기다 — WordRange.insertColumnBreak / SpecialCharacter.COLUMN_BREAK 로 다룬다.\n */\n export const SectionBreakType = {\n /** 이어서 (이어나누기) */\n CONTINUOUS: \"continuous\",\n /** 다음 페이지부터 */\n NEXT_PAGE: \"nextPage\",\n /** 짝수 페이지부터 */\n EVEN_PAGE: \"evenPage\",\n /** 홀수 페이지부터 */\n ODD_PAGE: \"oddPage\",\n } as const;\n export type SectionBreakType = typeof SectionBreakType[keyof typeof SectionBreakType];\n\n /**\n * 각주/미주 종류.\n * 값은 코어 DefineTypes.noteTypes / DefineActions.type.footnote·endnote 와 동일해 매핑 없이 그대로 쓰인다.\n */\n export const NoteType = {\n /** 각주 (페이지 하단) */\n FOOTNOTE: \"footnote\",\n /** 미주 (문서 끝) */\n ENDNOTE: \"endnote\",\n } as const;\n export type NoteType = typeof NoteType[keyof typeof NoteType];\n\n /**\n * 하이퍼링크 종류 (WordHyperlink.getLinkType()).\n * 종류는 별도 입력축이 아니라 url 에서 정해진다: \"#이름\"→BOOKMARK, \"mailto:\"→MAILTO, 그 외→LINK.\n */\n export const HyperlinkType = {\n /** 웹 주소 (http/https) */\n LINK: \"link\",\n /** 이메일 */\n MAILTO: \"mailto\",\n /** 문서 내부 북마크 */\n BOOKMARK: \"bookmark\",\n } as const;\n export type HyperlinkType = typeof HyperlinkType[keyof typeof HyperlinkType];\n\n /**\n * 변경 추적 항목(change tracking) 공개 유형 (WordChangeTracking.getInfo().type).\n * 코어 revisionType(ins/del/change)을 정규화한 공개 값 — 변환 맵은 소비자(extractors)가 보유한다.\n */\n export const ChangeTrackingType = {\n /** 삽입 (코어 ins) */\n ADDED: \"added\",\n /** 삭제 (코어 del) */\n DELETED: \"deleted\",\n /** 서식 변경 (코어 change) */\n FORMATTED: \"formatted\",\n } as const;\n export type ChangeTrackingType = typeof ChangeTrackingType[keyof typeof ChangeTrackingType];\n\n /**\n * 도형 wrap(텍스트 배치) 종류.\n * 워드 모델이 지원하는 3가지 ([defineTypes.js] shapeWrapType) 만 노출.\n */\n export const ShapeWrap = {\n /** 텍스트 흐름 안에 글자처럼 박힘 (paragraphId + offset 으로 위치) */\n INLINE: \"inline\",\n /** 텍스트 위에 떠있음 */\n INFRONT: \"infront\",\n /** 텍스트 뒤에 깔림 */\n BEHIND: \"behind\",\n } as const;\n export type ShapeWrap = typeof ShapeWrap[keyof typeof ShapeWrap];\n\n /** floating 도형 가로 위치 기준 (OOXML wp:positionH @relativeFrom). */\n export const PositionRelativeFromH = {\n PAGE: \"page\",\n MARGIN: \"margin\",\n COLUMN: \"column\",\n } as const;\n export type PositionRelativeFromH = typeof PositionRelativeFromH[keyof typeof PositionRelativeFromH];\n\n /** floating 도형 세로 위치 기준 (OOXML wp:positionV @relativeFrom). */\n export const PositionRelativeFromV = {\n PAGE: \"page\",\n MARGIN: \"margin\",\n PARAGRAPH: \"paragraph\",\n } as const;\n export type PositionRelativeFromV = typeof PositionRelativeFromV[keyof typeof PositionRelativeFromV];\n\n /** 도형 종류. */\n export const ShapeType = {\n /** preset geometry 도형 */\n SHAPE: \"sp\",\n /** 이미지 */\n PICTURE: \"pic\",\n } as const;\n export type ShapeType = typeof ShapeType[keyof typeof ShapeType];\n\n /** 도형 채우기 종류 (setFill type). */\n export const FillType = {\n NONE: \"noFill\",\n SOLID: \"solidFill\",\n GRADIENT: \"gradFill\",\n IMAGE: \"blipFill\",\n } as const;\n export type FillType = typeof FillType[keyof typeof FillType];\n\n /**\n * 텍스트박스 세로 정렬 (setTextVerticalAlign align — bodyPr anchor).\n * 가로 텍스트(flow=horz) 기준. 모델 anchor 값과 1:1.\n */\n export const TextVerticalAlign = {\n TOP: \"top\",\n MIDDLE: \"middle\",\n BOTTOM: \"bottom\",\n } as const;\n export type TextVerticalAlign = typeof TextVerticalAlign[keyof typeof TextVerticalAlign];\n\n /** 선 겹선(compound) 스타일 (setShapeLine compound — OOXML a:ln @cmpd). */\n export const LineCompound = {\n SINGLE: \"sng\",\n DOUBLE: \"dbl\",\n THICK_THIN: \"thickThin\",\n THIN_THICK: \"thinThick\",\n TRIPLE: \"tri\",\n } as const;\n export type LineCompound = typeof LineCompound[keyof typeof LineCompound];\n\n /** 텍스트/단락 정렬. */\n export const TextAlign = {\n LEFT: \"left\",\n CENTER: \"center\",\n RIGHT: \"right\",\n JUSTIFY: \"justify\",\n } as const;\n export type TextAlign = typeof TextAlign[keyof typeof TextAlign];\n\n /** 표 상자의 페이지 내 가로 위치. */\n export const TableAlign = {\n LEFT: \"left\",\n CENTER: \"center\",\n RIGHT: \"right\",\n } as const;\n export type TableAlign = typeof TableAlign[keyof typeof TableAlign];\n\n /** 표 셀 세로 정렬. */\n export const CellVerticalAlign = {\n TOP: \"top\",\n CENTER: \"center\",\n BOTTOM: \"bottom\",\n } as const;\n export type CellVerticalAlign = typeof CellVerticalAlign[keyof typeof CellVerticalAlign];\n\n /** 개요 수준(outline level) — 단락의 개요/목차 상 수준. \"body\"=본문(개요 수준 없음). */\n export const OutlineLevel = {\n LEVEL_1: \"level1\",\n LEVEL_2: \"level2\",\n LEVEL_3: \"level3\",\n LEVEL_4: \"level4\",\n LEVEL_5: \"level5\",\n LEVEL_6: \"level6\",\n LEVEL_7: \"level7\",\n LEVEL_8: \"level8\",\n LEVEL_9: \"level9\",\n BODY: \"body\",\n } as const;\n export type OutlineLevel = typeof OutlineLevel[keyof typeof OutlineLevel];\n\n /**\n * 문서 기본 제공(내장) 스타일 키. setStyle(style) 에 그대로 넘긴다(값 = getStyles() 의 style 키).\n * 내장 스타일은 문서 로드 시 항상 존재하므로 이 enum 값은 어느 문서에서든 유효하다.\n * 커스텀 문서 스타일은 이 enum 없이 getStyles() 로 얻은 style 값(String)을 직접 넘긴다.\n */\n export const Style = {\n /** 본문(기본 단락 스타일) */\n NORMAL: \"normal\",\n TITLE: \"title\",\n SUBTITLE: \"subtitle\",\n HEADING_1: \"heading_1\",\n HEADING_2: \"heading_2\",\n HEADING_3: \"heading_3\",\n QUOTE: \"quote\",\n /** ↓ 글자 스타일 */\n STRONG: \"strong\",\n EMPHASIS: \"emphasis\",\n SUBTLE_EMPHASIS: \"subtle_emphasis\",\n INTENSE_EMPHASIS: \"intense_emphasis\",\n } as const;\n export type Style = typeof Style[keyof typeof Style];\n\n /** 들여쓰기 상대 조정. */\n export const IndentType = {\n INDENT: \"indent\",\n OUTDENT: \"outdent\",\n } as const;\n export type IndentType = typeof IndentType[keyof typeof IndentType];\n\n /** 문서 기본 제공 목록 서식. */\n export const ListType = {\n /** ● */\n BULLET_CIRCLE: \"bulletCircle\",\n /** ■ */\n BULLET_SQUARE: \"bulletSquare\",\n /** ◆ */\n BULLET_DIAMOND: \"bulletDiamond\",\n /** ✓ */\n BULLET_CHECK: \"bulletCheck\",\n /** ➢ */\n BULLET_ARROW: \"bulletArrow\",\n /** ✧ */\n BULLET_STAR: \"bulletStar\",\n /** 1. */\n NUMBER_DECIMAL: \"numberDecimal\",\n /** A. */\n NUMBER_UPPER_LETTER: \"numberUpperLetter\",\n /** I. */\n NUMBER_UPPER_ROMAN: \"numberUpperRoman\",\n /** ① */\n NUMBER_CIRCLED: \"numberCircled\",\n /** a. */\n NUMBER_LOWER_LETTER: \"numberLowerLetter\",\n /** i. */\n NUMBER_LOWER_ROMAN: \"numberLowerRoman\",\n /** 1. / A. / i. */\n MULTILEVEL_NUMBER_LETTER_ROMAN: \"multilevelNumberLetterRoman\",\n /** 1. / A. / a. */\n MULTILEVEL_NUMBER_LETTER_LETTER: \"multilevelNumberLetterLetter\",\n /** I. / A. / i. */\n MULTILEVEL_ROMAN_LETTER_ROMAN: \"multilevelRomanLetterRoman\",\n /** 1 / 1.1 / 1.1.1 */\n MULTILEVEL_NESTED_NUMBER: \"multilevelNestedNumber\",\n /** 1. / 1.1. / 1.1.1. */\n MULTILEVEL_NESTED_NUMBER_DOT: \"multilevelNestedNumberDot\",\n /** 1 / 1-1 / 1-1-1 */\n MULTILEVEL_NESTED_FULL_WIDTH: \"multilevelNestedFullWidth\",\n } as const;\n export type ListType = typeof ListType[keyof typeof ListType];\n\n /** 페이지 번호 대상 영역 (setPageNumber area). */\n export const PageNumberArea = {\n /** 머리글 */\n HEADER: \"header\",\n /** 바닥글 */\n FOOTER: \"footer\",\n } as const;\n export type PageNumberArea = typeof PageNumberArea[keyof typeof PageNumberArea];\n\n /** 페이지 번호 정렬 (setPageNumber align). */\n export const PageNumberAlign = {\n /** 왼쪽 정렬 */\n LEFT: \"left\",\n /** 가운데 정렬 */\n CENTER: \"center\",\n /** 오른쪽 정렬 */\n RIGHT: \"right\",\n } as const;\n export type PageNumberAlign = typeof PageNumberAlign[keyof typeof PageNumberAlign];\n\n /** 테두리 선 스타일 (셀·단락 테두리 공용). */\n export const BorderStyle = {\n SOLID: \"solid\",\n DASHED: \"dashed\",\n DOTTED: \"dotted\",\n DOUBLE: \"double\",\n NONE: \"none\",\n HIDDEN: \"hidden\",\n } as const;\n export type BorderStyle = typeof BorderStyle[keyof typeof BorderStyle];\n\n /**\n * 테두리 적용 위치(면/영역) (셀·단락 테두리 공용).\n * - 단락 테두리: top/bottom/left/right/all/between 유효 (between=단락 사이 가로선, 단락 전용).\n * - 표 셀 테두리: top/bottom/left/right/all/outer/inner/betweenRows/betweenColumns 유효.\n */\n export const BorderLocation = {\n TOP: \"top\",\n RIGHT: \"right\",\n BOTTOM: \"bottom\",\n LEFT: \"left\",\n ALL: \"all\",\n OUTER: \"outer\",\n INNER: \"inner\",\n BETWEEN_ROWS: \"betweenRows\",\n BETWEEN_COLUMNS: \"betweenColumns\",\n BETWEEN: \"between\",\n } as const;\n export type BorderLocation = typeof BorderLocation[keyof typeof BorderLocation];\n\n /** 탭 스톱 정렬 (값은 코어 tab val 과 동일). */\n export const TabAlignment = {\n LEFT: \"left\",\n CENTER: \"center\",\n RIGHT: \"right\",\n DECIMAL: \"decimal\",\n } as const;\n export type TabAlignment = typeof TabAlignment[keyof typeof TabAlignment];\n\n /** 탭 스톱 리더(빈 공간 채움 문자) (값은 코어 tab leader 와 동일). */\n export const TabLeader = {\n NONE: \"none\",\n DOT: \"dot\",\n HYPHEN: \"hyphen\",\n UNDERSCORE: \"underscore\",\n MIDDLE_DOT: \"middleDot\",\n } as const;\n export type TabLeader = typeof TabLeader[keyof typeof TabLeader];\n\n /** 페이지 방향 (setPageSize orientation). */\n export const PageOrientation = {\n /** 세로 */\n PORTRAIT: \"portrait\",\n /** 가로 */\n LANDSCAPE: \"landscape\",\n } as const;\n export type PageOrientation = typeof PageOrientation[keyof typeof PageOrientation];\n\n /** 용지 크기 프리셋 (setPageSize 프리셋 이름). */\n export const PaperSize = {\n A3: \"A3\",\n A4: \"A4\",\n A5: \"A5\",\n LETTER: \"Letter\",\n LEGAL: \"Legal\",\n EXECUTIVE: \"Executive\",\n } as const;\n export type PaperSize = typeof PaperSize[keyof typeof PaperSize];\n\n /** 페이지 번호 형식 (setPageNumbering formatType / getPageSetup().pageNumber.formatType). */\n export const NumberFormat = {\n /** 1, 2, 3 */\n DECIMAL: \"decimal\",\n /** ①, ②, ③ */\n DECIMAL_CIRCLE: \"decimalEnclosedCircle\",\n /** (1), (2), (3) */\n DECIMAL_PAREN: \"decimalEnclosedParen\",\n /** 1., 2., 3. */\n DECIMAL_FULLSTOP: \"decimalEnclosedFullstop\",\n /** 01, 02, 03 */\n DECIMAL_ZERO: \"decimalZero\",\n /** 1, 2, 3 (전각) */\n DECIMAL_FULL_WIDTH: \"decimalFullWidth\",\n /** 1, 2, 3 (반각) */\n DECIMAL_HALF_WIDTH: \"decimalHalfWidth\",\n /** -1-, -2-, -3- */\n NUMBER_DASH: \"numberInDash\",\n /** One, Two, Three */\n CARDINAL_TEXT: \"cardinalText\",\n /** 1st, 2nd, 3rd */\n ORDINAL: \"ordinal\",\n /** First, Second, Third */\n ORDINAL_TEXT: \"ordinalText\",\n /** *, †, ‡, § */\n CHICAGO: \"chicago\",\n /** 1, 2, ..., 9, A, B */\n HEX: \"hex\",\n /** a, b, c */\n LOWER_LETTER: \"lowerLetter\",\n /** A, B, C */\n UPPER_LETTER: \"upperLetter\",\n /** i, ii, iii */\n LOWER_ROMAN: \"lowerRoman\",\n /** I, II, III */\n UPPER_ROMAN: \"upperRoman\",\n /** ㄱ, ㄴ, ㄷ */\n HANGUL_CHOSUNG: \"chosung\",\n /** 가, 나, 다 */\n HANGUL_GANADA: \"ganada\",\n /** 일, 이, 삼 */\n KOREAN_COUNT: \"koreanCounting\",\n /** 하나, 둘, 셋 */\n KOREAN_LEGAL: \"koreanLegal\",\n /** 一, 二, 三 */\n KOREAN_DIGITAL: \"koreanDigital\",\n /** 壹, 貳, 參 */\n KOREAN_DIGITAL2: \"koreanDigital2\",\n /** 一, 二, 三 */\n CHINESE_COUNT: \"chineseCounting\",\n /** 一, 二, 三 (천 단위) */\n CHINESE_COUNTING_THOUSAND: \"chineseCountingThousand\",\n /** 壹, 贰, 叁 */\n CHINESE_LEGAL: \"chineseLegalSimplified\",\n /** 一, 二, 三 (자릿수 나열) */\n CHINESE_DIGITAL: \"chineseDigital\",\n /** 〇, 一, 二 */\n CHINESE_ZERO_TAIWANESE_DIGITAL: \"chineseZeroTaiwaneseDigital\",\n /** 一, 二, 三 */\n TAIWANESE_COUNT: \"taiwaneseCounting\",\n /** 一, 二, 三 (천 단위) */\n TAIWANESE_COUNTING_THOUSAND: \"taiwaneseCountingThousand\",\n /** 一, 二, 三 (자릿수 나열) */\n TAIWANESE_DIGITAL: \"taiwaneseDigital\",\n /** 一, 二, 三 */\n IDEOGRAPH_DIGITAL: \"ideographDigital\",\n /** ㊀, ㊁, ㊂ */\n IDEOGRAPH_CIRCLE: \"ideographEnclosedCircle\",\n /** 壹, 貳, 參 */\n IDEOGRAPH_LEGAL: \"ideographLegalTraditional\",\n /** 갑, 을, 병 (십간) */\n IDEOGRAPH_TRADITIONAL: \"ideographTraditional\",\n /** 자, 축, 인 (십이지) */\n IDEOGRAPH_ZODIAC: \"ideographZodiac\",\n /** 갑자, 을축, 병인 (육십갑자) */\n IDEOGRAPH_ZODIAC_TRADITIONAL: \"ideographZodiacTraditional\",\n /** 一, 二, 三 */\n JAPANESE_COUNT: \"japaneseCounting\",\n /** 一, 二, 三 (만 단위) */\n JAPANESE_DIGITAL: \"japaneseDigitalTenThousand\",\n /** 壱, 弐, 参 */\n JAPANESE_LEGAL: \"japaneseLegal\",\n /** ア, イ, ウ (반각) */\n JAPANESE_AIUEO: \"aiueo\",\n /** ア, イ, ウ (전각) */\n JAPANESE_AIUEO_FULL_WIDTH: \"aiueoFullWidth\",\n /** イ, ロ, ハ (반각) */\n JAPANESE_IROHA: \"iroha\",\n /** イ, ロ, ハ (전각) */\n JAPANESE_IROHA_FULL_WIDTH: \"irohaFullWidth\",\n /** 번호 표시 안 함 */\n NONE: \"none\",\n } as const;\n export type NumberFormat = typeof NumberFormat[keyof typeof NumberFormat];\n\n // =============================================================================\n // Typedefs\n // =============================================================================\n\n export interface RangeData {\n /** start paragraph ID */\n startParaId?: string;\n /** start offset (기본값: start of paragraph) */\n startOffset?: number;\n /** end paragraph ID (기본값: startParaId) */\n endParaId?: string;\n /** end offset (기본값: end of paragraph) */\n endOffset?: number;\n }\n\n export interface PageSetupInfo {\n /** paper dimensions (pt; null if unset) */\n pageSize: Size | null;\n /** orientation (null if unset) */\n orientation: PageOrientation | null;\n /** name of the matched paper preset (null if no match) */\n paperSize: PaperSize | null;\n /** margins (pt) */\n margins: PageMargins;\n /** whether \"different first page\" is enabled */\n titlePage: boolean;\n /** section break type (nextPage/continuous, etc.; nextColumn for column-break documents) */\n breakType: string;\n /** page numbering settings of the section (null if unset) */\n pageNumber: PageNumbering | null;\n }\n\n export interface PageMargins {\n /** top margin (pt) */\n top?: number;\n /** bottom margin (pt) */\n bottom?: number;\n /** left margin (pt) */\n left?: number;\n /** right margin (pt) */\n right?: number;\n /** header area margin (pt) */\n header?: number;\n /** footer area margin (pt) */\n footer?: number;\n }\n\n export interface PageNumbering {\n /** starting number for the first page of this section (integer ≥ 0) */\n start?: number;\n /** page number display format (decimal, roman numerals, etc.) */\n formatType?: NumberFormat;\n }\n\n export interface ColumnLayout {\n /** number of columns (1~12; 1 removes columns) */\n count: number;\n /** whether all columns have the same width (기본값: false if widths is given, otherwise current value) */\n equalWidth?: boolean;\n /** spacing between columns (pt; used when a column does not specify its own spacing) (기본값: current value (initially 36)) */\n space?: number;\n /** whether to show a separator line between columns (기본값: current value (initially false)) */\n separator?: boolean;\n /** width of each column (pt; the count must equal count, and specifying it makes the columns unequal. Included on read only when unequal) (기본값: current value) */\n widths?: ColumnWidth[];\n }\n\n export interface ColumnWidth {\n /** column width (pt) */\n width: number;\n /** spacing after this column (pt) (기본값: parent space) */\n space?: number;\n }\n\n export interface TextFormat {\n /** bold (null removes the property) */\n bold?: boolean | null;\n /** italic (null removes the property) */\n italic?: boolean | null;\n /** underline (null removes the property) */\n underline?: boolean | null;\n /** font size (pt, null removes the property) */\n size?: number | null;\n /** text color (hex, e.g. \"#FF0000\", null removes the property) */\n color?: string | null;\n /** font name (null removes the property) */\n font?: string | null;\n /** strikethrough (null removes the property) */\n strikeThrough?: boolean | null;\n /** highlight color (hex, e.g. \"#FFFF00\"; null/\"transparent\" removes it) */\n highlightColor?: string | null;\n /** superscript (mutually exclusive with subscript; takes precedence if both are true, null removes it) */\n superscript?: boolean | null;\n /** subscript (mutually exclusive with superscript, null removes it) */\n subscript?: boolean | null;\n /** character spacing (pt, negative tightens; range -12~400, null removes the property) */\n spacing?: number | null;\n }\n\n export interface ParagraphFormat {\n /** alignment (\"left\"|\"center\"|\"right\"|\"justify\", null removes it) */\n align?: TextAlign | null;\n /** line spacing — number = multiple (e.g. 1.5), \"Npx\" = the same multiple fixed (e.g. \"1.5px\"; N is a line-height multiple, not pixels), null = remove */\n lineSpacing?: number | string | null;\n /** left indent (px, null removes it) */\n leftIndent?: number | null;\n /** right indent (px, null removes it) */\n rightIndent?: number | null;\n /** first-line indent (px, negative for a hanging indent, null removes it) */\n firstLineIndent?: number | null;\n /** space before the paragraph (pt, null removes it) */\n spaceBefore?: number | null;\n /** space after the paragraph (pt, null removes it) */\n spaceAfter?: number | null;\n /** paragraph background color (shading fill, hex \"#RRGGBB\", null removes it) */\n backgroundColor?: string | null;\n /** outline level (\"level1\"~\"level9\"; \"body\" or null means body text) */\n outlineLevel?: OutlineLevel | null;\n }\n\n export interface Border {\n /** target side (for paragraph borders, top/bottom/left/right/all and between (horizontal line between paragraphs) are valid) */\n location: BorderLocation;\n /** line style (solid/dashed/dotted/double/none/hidden) */\n style: BorderStyle;\n /** line color (hex \"#RRGGBB\") */\n color: string;\n /** line width (pt) */\n width: number;\n }\n\n export interface TabStop {\n /** tab stop position (pt) */\n position: number;\n /** alignment (\"left\"|\"center\"|\"right\"|\"decimal\", default \"left\") */\n alignment?: TabAlignment;\n /** leader fill (\"none\"|\"dot\"|\"hyphen\"|\"underscore\"|\"middleDot\", default \"none\") */\n leader?: TabLeader;\n }\n\n export interface CellRange {\n /** anchor row (0-based, relative to the table) */\n row: number;\n /** anchor column (0-based, relative to the table) */\n col: number;\n /** number of rows (기본값: 1) */\n rowSpan?: number;\n /** number of columns (기본값: 1) */\n colSpan?: number;\n }\n\n export interface Padding {\n /** left padding (pt) */\n left?: number;\n /** right padding (pt) */\n right?: number;\n /** top padding (pt) */\n top?: number;\n /** bottom padding (pt) */\n bottom?: number;\n }\n\n export interface ShapeInfo {\n /** 도형 ID (영구 GUID) */\n shapeId: string;\n /** 도형 종류 (\"sp\"=도형/텍스트박스, \"pic\"=이미지) */\n shapeType: ShapeType;\n /** 도형이 속한 영역 ID (본문 \"0\") */\n storyId: string;\n /** 너비(px) */\n width: number;\n /** 높이(px) */\n height: number;\n /** 배치 모드 (inline/infront/behind) */\n wrap: ShapeWrap;\n /** 앞뒤 순서 (floating 전용 의미) */\n zIndex: number;\n /** 소속 위치 (offset 은 inline 전용 단락 내 글자 위치) */\n anchor: { paragraphId: string; offset?: number };\n /** floating 전용 가로 위치(px, relativeFromH 기준 — move 에 그대로 재사용 가능) */\n x?: number;\n /** floating 전용 세로 위치(px, relativeFromV 기준) */\n y?: number;\n /** floating 전용 가로 기준점 */\n relativeFromH?: PositionRelativeFromH;\n /** floating 전용 세로 기준점 */\n relativeFromV?: PositionRelativeFromV;\n /** 채우기 readback (setFill 입력과 대칭) */\n fill: ShapeFill | null;\n /** 선 readback (setLine 입력과 대칭) */\n line: ShapeLine | null;\n /** 링크 readback */\n hyperlink: { url: string; tooltip: string; linkType: string; anchor?: string } | null;\n /** 텍스트 영역 보유 여부(텍스트박스) */\n isTextbox?: boolean;\n /** 텍스트박스 내부 텍스트 영역 ID */\n textboxStoryId?: string;\n /** 대체 텍스트 */\n altText?: string;\n }\n\n export interface Size {\n /** width (positive) */\n width?: number;\n /** height (positive) */\n height?: number;\n }\n\n export interface ShapeFill {\n /** fill kind (noFill/solidFill/blipFill/gradFill) */\n type: FillType;\n /** solidFill color \"#RRGGBB\" (null/\"\" removes the fill) */\n color?: string | null;\n /** blipFill image source (exactly one of src, url, base64) */\n image?: { src?: string; url?: string; base64?: string };\n /** gradFill color stops (≥2, position 0~100) */\n stops?: { position: number; color: string }[];\n /** gradFill angle (degrees) (기본값: 0 (left→right)) */\n angle?: number;\n }\n\n export interface ShapeLine {\n /** line color \"#RRGGBB\" (null or \"\" removes it) */\n color?: string | null;\n /** line width (pt) */\n width?: number;\n /** dash style (null removes it) */\n dash?: LineDash | null;\n /** compound line style (null removes it) */\n compound?: LineCompound | null;\n }\n\n export interface StyleInfo {\n /** style key */\n style: string;\n /** display name */\n name: string;\n /** style type */\n type: \"paragraph\" | \"character\";\n /** key of the parent style it inherits from (if any) */\n basedOn?: string;\n /** key of the style for the next paragraph (if any) */\n next?: string;\n }\n\n // =============================================================================\n // Classes\n // =============================================================================\n\n /** The entry point to the document. */\n export interface WordDocument {\n /**\n * Returns the paragraph with the given ID.\n * - The area the paragraph belongs to (body/header/footer) is found and bound automatically, so header/footer paragraphs can be formatted and edited the same way as body paragraphs.\n *\n * @param paragraphId - paragraph ID\n * @returns paragraph object (area bound automatically)\n */\n getParagraph(paragraphId: string): Promise<WordParagraph>;\n /**\n * Returns the table with the given ID.\n * - The area the table belongs to (body/header/footer/text box) is found and bound automatically, so tables in those areas can be handled the same way.\n *\n * @param tableId - table ID\n * @returns table object (area bound automatically)\n */\n getTable(tableId: string): Promise<WordTable>;\n /**\n * Returns the range at the given coordinates (RangeData), or the whole body when called with no argument.\n * - The area the paragraph belongs to (body/header/footer) is found and bound automatically, so passing the paragraphId of a header/footer paragraph works the same as for the body.\n * - Calling it with no argument is a shortcut for `getBody().getRange(RangePosition.WHOLE)`. A range lives in one area, so this covers the body only, not headers, footers, or notes.\n * - Passing coordinates requires startParaId. An options object without it is rejected right away, so a mistyped key cannot turn into the whole body by accident.\n * - Use `getBody().getRange(RangePosition.START/END)` for the start/end of an area and `getSelection()` for the selection.\n *\n * @param options - coordinate range information. Omit it for the whole body (기본값: whole body)\n * @returns range object\n * @throws {Error} if an options object is given without startParaId\n * @example\n * doc.getRange(); // whole body\n * doc.getRange({ startParaId: \"p1\" }); // whole paragraph\n * doc.getRange({ startParaId: \"p1\", startOffset: 0, endOffset: 5 }); // characters 0~5 within the paragraph\n */\n getRange(options?: RangeData): Promise<WordRange>;\n /**\n * Returns the current selection.\n * - If nothing is selected, returns an empty (collapsed) range at the cursor position.\n *\n * @returns selection range\n */\n getSelection(): Promise<WordRange>;\n /**\n * Returns the content area of the document body.\n * - Use it to get body text and structure and to insert paragraphs and tables.\n *\n * @returns document body\n * @example\n * doc.getBody().getText(); // get body text\n * doc.getBody().insertParagraph(\"New paragraph\"); // append a paragraph at the end of the body\n */\n getBody(): Promise<WordBody>;\n /**\n * Returns the section at the given index.\n * - Use it to get the section's body, header, and footer and for page setup.\n *\n * @param index - section index (0-based, in document order; 0 = first section) (기본값: 0)\n * @returns section object (the index is validated when header/footer/page setup is called)\n * @example\n * doc.getSection(); // first section (index omitted)\n * doc.getSection(1).getBody(); // body of the second section\n * doc.getSection(0).getHeader(HeaderFooterVariant.DEFAULT); // default header of the first section\n */\n getSection(index?: number): Promise<WordSection>;\n /**\n * Returns the list of sections in the document, in document order.\n *\n * @returns section list (empty array if none)\n */\n getSections(): Promise<WordSection[]>;\n /**\n * Sets or removes the page number in the header or footer.\n * - Creates the area automatically if it does not exist, and replaces any existing page number.\n * - If remove is true, only the page number paragraph is removed. Nothing changes if the area or the number does not exist.\n *\n * @param area - target area (header/footer)\n * @param options - page number settings\n * @param options.align - alignment (left/center/right). Ignored when remove:true (기본값: PageNumberAlign.LEFT)\n * @param options.variant - header/footer variant (default/first/even) (기본값: HeaderFooterVariant.DEFAULT)\n * @param options.sectionIndex - 0-based section index (0 = first section) (기본값: 0)\n * @param options.remove - if true, removes the page number (align ignored) (기본값: false)\n * @example\n * doc.setPageNumber(PageNumberArea.FOOTER); // show page number in the footer\n * doc.setPageNumber(PageNumberArea.FOOTER, { align: PageNumberAlign.CENTER }); // center alignment\n * doc.setPageNumber(PageNumberArea.FOOTER, { remove: true }); // remove page number\n */\n setPageNumber(area: PageNumberArea, options?: { align?: PageNumberAlign; variant?: HeaderFooterVariant; sectionIndex?: number; remove?: boolean }): Promise<void>;\n /**\n * Turns change tracking (track changes) on or off.\n * - When on, subsequent edits are tracked as insertions/deletions/format changes; when off, editing returns to normal (already recorded changes are kept).\n *\n * @param enabled - true to turn on, false to turn off\n * @example\n * doc.setChangeTracking(true); // track subsequent edits\n * doc.setChangeTracking(false); // stop tracking, keeping existing tracked changes\n */\n setChangeTracking(enabled: boolean): Promise<void>;\n /**\n * Returns whether change tracking (track changes) is on.\n *\n * @returns true if on, false if off\n */\n isChangeTrackingEnabled(): Promise<boolean>;\n /**\n * Saves the document.\n * - Does nothing if there are no edits or a save is already in progress.\n */\n save(): Promise<void>;\n /**\n * Downloads the document in its original format.\n */\n download(): Promise<void>;\n /**\n * Prints the current document.\n * - Uses browser printing on desktop Chrome and Edge; in other environments, converts to PDF and downloads it.\n * - Does nothing if printing is disabled for the document.\n */\n print(): Promise<void>;\n /**\n * Changes the view zoom.\n *\n * @param mode - zoom preset (50~200%), fit (fitWidth/fitInWindow), or step (zoomIn/zoomOut)\n * @throws {Error} if mode is not a ZoomMode value\n * @example\n * doc.setZoom(ZoomMode.SCALE_100); // 100% zoom\n * doc.setZoom(ZoomMode.FIT_WIDTH); // fit to screen width\n */\n setZoom(mode: ZoomMode): Promise<void>;\n /**\n * Shows or hides all formatting marks (paragraph marks, spaces, tabs, etc.).\n *\n * @param visible - true to show, false to hide\n * @example\n * doc.setFormattingMarks(true); // show formatting marks\n * doc.setFormattingMarks(false); // hide formatting marks\n */\n setFormattingMarks(visible: boolean): Promise<void>;\n /**\n * Sets or removes the document (page) background color.\n *\n * @param color - background color (\"#RRGGBB\"). null or an empty string removes the background color.\n * @throws {Error} if color is not in \"#RRGGBB\" format\n * @example\n * doc.setBackgroundColor(\"#FFF8DC\"); // set page background color\n * doc.setBackgroundColor(null); // remove background color\n */\n setBackgroundColor(color: string | null): Promise<void>;\n /**\n * Sets the whole document to use different headers and footers on odd and even pages.\n *\n * @param enabled - true to turn on, false to turn off\n * @throws {Error} if enabled is not a boolean\n * @example\n * doc.setEvenAndOddHeaders(true); // separate odd/even headers\n * doc.getSection().getHeader(HeaderFooterVariant.EVEN).insertText(\"Even page\", { replace: true }); // enter the even-page header\n */\n setEvenAndOddHeaders(enabled: boolean): Promise<void>;\n /**\n * Returns the bookmark with the given name.\n * - Entry point for per-bookmark operations such as delete, go to, exists, and info.\n *\n * @param name - bookmark name\n * @returns bookmark object\n */\n getBookmark(name: string): Promise<WordBookmark>;\n /**\n * Returns the list of bookmarks in the document.\n *\n * @param includeHidden - if true, also includes hidden bookmarks (\"_\" prefix) (기본값: false)\n * @returns bookmark list (empty array if none)\n * @example\n * doc.getBookmarks(); // get regular bookmarks\n * doc.getBookmarks(true); // include hidden bookmarks\n */\n getBookmarks(includeHidden?: boolean): Promise<WordBookmark[]>;\n /**\n * Returns the comment with the given ID.\n *\n * @param commentId - comment ID\n * @returns comment object\n */\n getComment(commentId: string): Promise<WordComment>;\n /**\n * Returns the list of comments in the document.\n *\n * @returns comment list\n */\n getComments(): Promise<WordComment[]>;\n /**\n * Returns the list of change tracking entries in the whole document, in document order.\n *\n * @returns change tracking list\n */\n getChangeTrackings(): Promise<WordChangeTracking[]>;\n /**\n * Returns the change tracking entry with the given ID.\n *\n * @param id - change tracking entry ID\n * @returns change tracking object\n */\n getChangeTracking(id: string): Promise<WordChangeTracking>;\n /**\n * Accepts all change tracking entries in the whole document at once.\n *\n * @returns processing result\n */\n acceptChangeTrackings(): Promise<{ processedCount: number; remainingCount: number; failedIds: string[] }>;\n /**\n * Rejects all change tracking entries in the whole document at once.\n *\n * @returns processing result\n */\n rejectChangeTrackings(): Promise<{ processedCount: number; remainingCount: number; failedIds: string[] }>;\n /**\n * Returns the footnote or endnote with the given ID.\n *\n * @param noteId - footnote/endnote area ID\n * @returns note object\n */\n getNote(noteId: string): Promise<WordNote>;\n /**\n * Returns the list of footnotes and endnotes in the document, in document order.\n *\n * @returns footnote/endnote list\n * @example\n * word.getNotes().forEach(note => console.log(note.getBody().getText())); // get footnote/endnote content\n * word.getFootnotes().forEach(note => note.delete()); // delete all footnotes\n */\n getNotes(): Promise<WordNote[]>;\n /**\n * Returns the list of footnotes in the document, in document order.\n *\n * @returns footnote list\n */\n getFootnotes(): Promise<WordNote[]>;\n /**\n * Returns the list of endnotes in the document, in document order.\n *\n * @returns endnote list\n */\n getEndnotes(): Promise<WordNote[]>;\n /**\n * Returns the style with the given key.\n * - Use it to get or modify style information and the defined formatting.\n *\n * @param style - Style enum for built-in styles (value = key); for custom document styles, the style value from getStyles() (e.g. \"heading_1\"/\"strong\")\n * @returns style object\n */\n getStyle(style: Style | string): Promise<WordStyle>;\n /**\n * Returns the list of styles defined in the document.\n *\n * @returns style list (empty array if none)\n */\n getStyles(): Promise<WordStyle[]>;\n /**\n * Returns the shape with the given ID.\n * - Returns an object matching the kind of shape: image, chart, or general shape.\n *\n * @param shapeId - shape ID (obtained from getShapes / insertShape)\n * @returns shape object (picture → WordImage, chart → WordChart)\n */\n getShape(shapeId: string): Promise<WordShape | WordImage | WordChart>;\n /**\n * Returns the list of shapes in the document.\n * - Includes both inline shapes (placed like text) and floating shapes (placed in front of or behind text).\n *\n * @param options - list filter\n * @param options.storyId - target area ID (body if omitted) (기본값: \"0\")\n * @param options.type - shape type filter (기본값: all types)\n * @param options.anchorParagraphId - anchor paragraph filter (기본값: all)\n * @returns shape list (pictures as WordImage, charts as WordChart; empty array if none)\n * @throws {Error} if type is not a ShapeType value\n * @example\n * doc.getShapes(); // shapes in the body\n * doc.getShapes({ type: ShapeType.PICTURE }); // images only\n */\n getShapes(options?: { storyId?: string; type?: ShapeType; anchorParagraphId?: string }): Promise<(WordShape | WordImage | WordChart)[]>;\n /**\n * Returns the chart with the given ID.\n *\n * @param shapeId - chart shape ID (obtained from getCharts / getShapes)\n * @returns chart object\n */\n getChart(shapeId: string): Promise<WordChart>;\n /**\n * Returns the list of charts in the document.\n *\n * @param options - list filter\n * @param options.storyId - target area ID (body if omitted) (기본값: \"0\")\n * @param options.anchorParagraphId - anchor paragraph filter (기본값: all)\n * @returns chart list (empty array if none)\n * @example\n * doc.getCharts(); // get all charts\n * doc.getCharts({ anchorParagraphId: id }); // charts anchored to the given paragraph\n */\n getCharts(options?: { storyId?: string; anchorParagraphId?: string }): Promise<WordChart[]>;\n /**\n * Returns the hyperlink with the given ID.\n *\n * @param hyperlinkId - hyperlink ID (obtained from range.insertHyperlink / getHyperlinks)\n * @returns hyperlink object\n */\n getHyperlink(hyperlinkId: string): Promise<WordHyperlink>;\n /**\n * Returns the list of hyperlinks in the document (or in a specific area).\n *\n * @param options - list filter\n * @param options.storyId - target area ID (body if omitted) (기본값: \"0\")\n * @param options.anchorParagraphId - only links that start in the given paragraph (기본값: whole area)\n * @returns hyperlink list (empty array if none)\n * @example\n * doc.getHyperlinks(); // hyperlinks in the body\n * doc.getHyperlinks({ anchorParagraphId: id }); // links that start in the given paragraph\n */\n getHyperlinks(options?: { storyId?: string; anchorParagraphId?: string }): Promise<WordHyperlink[]>;\n }\n\n /** Gets and edits a single content area such as the body, header, or footer. */\n export interface WordBody {\n /**\n * Returns the identifier of this area.\n *\n * @returns ID of the content area\n */\n getStoryId(): Promise<string>;\n /**\n * Checks whether this content area actually exists.\n * - A header or footer that has not been created yet is created on the first content insertion.\n *\n * @returns true if the area exists, false if it has not been created yet\n */\n exists(): Promise<boolean>;\n /**\n * Returns the range for the given position or coordinates within this area.\n *\n * @param range - coordinate RangeData object, or an area position RangePosition (\"whole\"/\"start\"/\"end\"/\"content\"); omitted means the whole area (기본값: RangePosition.WHOLE)\n * @returns range that can be inspected and edited within this area\n * @example\n * body.getRange(); // the whole area\n * body.getRange(RangePosition.END); // end of the area (empty range)\n * body.getRange({ startParaId: id, startOffset: 0 }); // coordinate range\n */\n getRange(range?: (RangeData | RangePosition)): Promise<WordRange>;\n /**\n * Sets this whole area as the on-screen selection (does not change document content).\n *\n * @param mode - \"select\" (whole area) / \"start\" (cursor at the start of the area) / \"end\" (cursor at the end of the area) (기본값: SelectionMode.SELECT)\n * @throws {Error} if the position of the area cannot be determined\n * @example\n * body.select(); // select the whole area\n * body.select(SelectionMode.END); // place the cursor at the end of the area\n */\n select(mode?: SelectionMode): Promise<void>;\n /**\n * Searches this area for text or a special character and returns a list of editable ranges.\n *\n * @param query - a string searches for text; a `{ character }` object searches for a special character\n * @param options - text search options (ignored for special character search)\n * @param options.caseSensitive - case-sensitive matching (기본값: false)\n * @param options.wholeWord - whole-word matching (기본값: false)\n * @returns list of matched range proxies (empty array if none)\n * @throws {Error} if query is missing, malformed, or an unsupported special character\n * @example\n * body.search(\"hello\"); // plain text search\n * body.search(\"Hello\", { caseSensitive: true }); // case-sensitive match\n * body.search(\"cat\", { wholeWord: true }); // only the standalone word \"cat\" (excludes cat inside catalog)\n * body.search({ character: SpecialCharacter.PAGE_BREAK }); // find page breaks\n * const ranges = body.search(\"draft\"); // returned ranges are directly editable\n * ranges.forEach((range) => range.setTextFormat({ bold: true })); // e.g. make every match bold\n */\n search(query: string | { character: SpecialCharacter }, options?: { caseSensitive?: boolean; wholeWord?: boolean }): Promise<WordRange[]>;\n /**\n * Returns the entire content of this area as plain text.\n * - For footnotes/endnotes, the automatic number marker and separator space are excluded.\n *\n * @returns full text for reading. Empty string if the area does not exist\n */\n getText(): Promise<string>;\n /**\n * Returns the paragraph/table structure of this area. Empty list if the area does not exist.\n * - The text of a paragraph entry includes the trailing boundary newline — the final \"\\n\" is always the paragraph boundary, so the character count within that paragraph is `text.length - 1`,\n * and a \"\\n\" in the middle is one line-break object (manual line break, page break, or column break).\n *\n * @param options - lookup options. The target area is fixed to this body.\n * @param options.type - get only a specific type (table=tables only / list=list paragraphs only) (기본값: all)\n * @returns list of paragraph/table entries (document order). id is a common identifier (type tells the kind); type=\"p\" includes text, tables include rows/columns\n * @example\n * body.getStructure(); // all paragraphs and tables\n * body.getStructure({ type: StructureFilter.TABLE }); // tables only\n * body.getStructure({ type: StructureFilter.LIST }); // list paragraphs only\n */\n getStructure(options?: { type?: StructureFilter }): Promise<{ paragraphs: { index: number; type: string; id: string; storyId: string; text?: string; rows?: number; columns?: number }[] }>;\n /**\n * Returns the entire content of this area as HTML with formatting.\n * - Paragraphs are represented as <p> elements.\n *\n * @returns HTML and paragraph count. Empty string and 0 if the area does not exist\n */\n getContentHtml(): Promise<{ html: string; paragraphCount: number }>;\n /**\n * Returns the list of paragraphs in this area.\n *\n * @returns list of paragraphs that can be inspected and edited. Empty array if the area does not exist\n */\n getParagraphs(): Promise<WordParagraph[]>;\n /**\n * Returns the paragraph at the given index in this area.\n *\n * @param index - zero-based paragraph index (기본값: 0)\n * @returns paragraph that can be inspected and edited. null if the area or that paragraph does not exist\n */\n getParagraph(index?: number): Promise<WordParagraph | null>;\n /**\n * Returns the list of comments in this area. Works only for the body area; other areas return an empty array.\n *\n * @returns array of comment proxies\n */\n getComments(): Promise<WordComment[]>;\n /**\n * Returns the list of change tracking items in this area in document order.\n *\n * @returns array of change tracking proxies\n */\n getChangeTrackings(): Promise<WordChangeTracking[]>;\n /**\n * Accepts all change tracking items in this area.\n *\n * @returns processing result\n */\n acceptChangeTrackings(): Promise<{ processedCount: number; remainingCount: number; failedIds: string[] }>;\n /**\n * Rejects all change tracking items in this area.\n *\n * @returns processing result\n */\n rejectChangeTrackings(): Promise<{ processedCount: number; remainingCount: number; failedIds: string[] }>;\n /**\n * Returns the list of footnotes/endnotes in the body. (body area only)\n *\n * @returns array of note proxies\n */\n getNotes(): Promise<WordNote[]>;\n /**\n * Returns the list of footnotes in the body. (body area only)\n *\n * @returns array of footnote proxies\n */\n getFootnotes(): Promise<WordNote[]>;\n /**\n * Returns the list of endnotes in the body. (body area only)\n *\n * @returns array of endnote proxies\n */\n getEndnotes(): Promise<WordNote[]>;\n /**\n * Inserts a new paragraph; if the position is omitted, appends it at the end of the area.\n * - Creates the area automatically if it does not exist. The new paragraph inherits the direct paragraph formatting of the reference paragraph, such as alignment, spacing, and indentation.\n * - If paragraphId is omitted, the first or last paragraph of the area is used as the reference depending on the insert position.\n * - To reset the inherited direct formatting, call clearFormat() on the returned paragraph.\n *\n * @param text - text of the new paragraph\n * @param options - insert options\n * @param options.paragraphId - reference paragraph ID\n * @param options.position - with a reference paragraph, \"before\" (above) / \"after\" (below) relative to that paragraph; without one, the area position \"start\" (very beginning) / \"end\" (very end) (기본값: after if a reference paragraph is given, otherwise end)\n * @returns new paragraph that can be inspected and edited after insertion\n * @throws {Error} if the reference paragraph given by paragraphId does not exist or position is not an InsertAt value\n * @example\n * body.insertParagraph(\"New paragraph\"); // append at the end\n * body.insertParagraph(\"First\", { position: InsertAt.START }); // add at the very beginning\n * body.insertParagraph(\"After\", { paragraphId: id, position: InsertAt.AFTER }); // after a specific paragraph\n */\n insertParagraph(text: string, options?: { paragraphId?: string; position?: InsertAt }): Promise<WordParagraph>;\n /**\n * Inserts a table; if the position is omitted, appends it at the end of the area.\n * - Cannot insert inside a table cell. An error is thrown if the insertion point is inside a cell.\n *\n * @param rows - number of rows\n * @param columns - number of columns\n * @param options - insert options\n * @param options.paragraphId - reference paragraph ID\n * @param options.position - with a reference paragraph, \"before\" (above) / \"after\" (below) relative to that paragraph; without one, the area position \"start\" (very beginning) / \"end\" (very end) (기본값: after if a reference paragraph is given, otherwise end)\n * @param options.values - cell values to fill right after creation (2D array; throws before issuing if it exceeds the table size)\n * @returns proxy of the inserted table\n * @throws {Error} if rows/columns are not 1 or greater, values exceeds the table size, the reference paragraph does not exist, or the insertion point is inside a table cell (nested tables not supported)\n * @example\n * body.insertTable(3, 4); // empty 3x4 table at the end\n * body.insertTable(2, 2, { paragraphId: id, position: InsertAt.BEFORE }); // before a specific paragraph\n * body.insertTable(2, 2, { values: [[\"Name\", \"Score\"], [\"Kim Minsu\", \"95\"]] }); // fill at creation\n */\n insertTable(rows: number, columns: number, options?: { paragraphId?: string; position?: InsertAt; values?: string[][] }): Promise<WordTable>;\n /**\n * Inserts HTML and returns the range of the inserted content.\n * - If the position is omitted, creates a new paragraph at the end of the area and inserts there.\n * - If <img> is included, the images are uploaded first and their src replaced. Images that fail to upload are excluded and the rest is inserted.\n * - Plain text without tags (`\"hello\"`) and non-block tags (`\"<div>abc</div>\"`) are also normalized as text within a paragraph,\n * and multi-paragraph HTML (`\"<p>a</p><p>b</p>\"`) returns a range covering all of those paragraphs.\n * - Since it goes through the same path as paste, **anything paste does not support is not inserted**:\n * - List styles are not applied — `<ul>`/`<ol>`/`<li>` become plain paragraphs without numbers or bullets (set lists separately with `WordParagraph.setList`).\n * - Heading styles are not applied either — `<h1>`~`<h6>` become plain paragraphs without a style (set styles separately with `WordRange.setStyle`).\n * - Tags that are not document content (`<script>`/`<style>`/`<iframe>`, etc.) are discarded along with their inner text.\n * - If change tracking (track changes) is on, the inserted content remains as a revision, as with normal paste (except inside comments).\n * - Because block HTML (`<p>`, `<h1>`, etc.) inserts a paragraph break with each block, **one empty paragraph remains after the last block** (plain text and inline do not leave one).\n *\n * @param html - HTML to insert. If an empty string (whitespace-only counts too), returns only an empty range at the insertion point without changing the document\n * @param options - insert position options\n * @param options.paragraphId - reference paragraph ID\n * @param options.position - without a reference paragraph, creates a new paragraph at \"start\" (very beginning of the area) / \"end\" (very end of the area) and inserts into it. With a reference paragraph, this is the **insertion point**, not a sibling position — \"after\" is the end point of that paragraph, \"before\" is its start point. \"after\" appends at the end of the anchor paragraph, so the first content merges into that paragraph (`<p>A</p><p>B</p>` = A merged into the anchor + B as a new paragraph), while \"before\" becomes a new paragraph before the anchor for block HTML, or merges at the very start of the anchor for inline HTML (기본값: after if a reference paragraph is given, otherwise end)\n * @returns range of the inserted content. If there is nothing to insert (empty HTML or HTML without content), an empty (collapsed) range at the insertion point. Insertion failures are reported as exceptions.\n * @throws {Error} if html is not a string, the reference paragraph does not exist, the HTML cannot be parsed, or a table is inserted inside a cell (Promise reject)\n * @example\n * const range = await body.insertHtml(\"<p>Paragraph</p>\"); // append at the end of the area + get the inserted range\n * range.setTextFormat({ bold: true }); // returned range is directly editable\n * body.insertHtml(\"<p>First</p>\", { position: InsertAt.START }); // very beginning of the area\n * body.insertHtml(\"<p>After paragraph</p>\", { paragraphId: id, position: InsertAt.AFTER }); // new paragraph after that paragraph\n * body.insertHtml(\"<b>appended</b>\", { paragraphId: id }); // inline HTML — appended at the end of that paragraph\n * body.insertHtml(\"<ul><li>a</li></ul>\"); // list style is not applied — inserted as paragraphs, then set with setList\n * (await body.insertHtml(\"\")).isCollapsed(); // empty HTML — no change, empty range\n */\n insertHtml(html: string, options?: { paragraphId?: string; position?: InsertAt }): Promise<WordRange>;\n /**\n * Finds and replaces all matching text within this area.\n * - When called on the body, the scope is the whole body; when called on a header, footer, etc., it is limited to that area.\n *\n * @param findText - text to find\n * @param replaceText - replacement text\n * @param options - replace options\n * @param options.caseSensitive - case-sensitive matching (기본값: false)\n * @returns number of actual replacements (0 if no match)\n * @throws {Error} if findText is empty\n * @example\n * doc.getBody().replaceAll(\"hello\", \"HI\").replacedCount; // replacement count\n * doc.getBody().replaceAll(\"Draft\", \"Final\", { caseSensitive: true }); // case-sensitive\n * doc.getSection().getHeader().replaceAll(\"v1\", \"v2\"); // replace only in the header area\n * doc.getFootnotes()[0].getBody().replaceAll(\"insert\", \"update\"); // replace only within the footnote content\n * doc.getShape(shapeId).getBody().replaceAll(\"old\", \"new\"); // replace only inside the text box\n */\n replaceAll(findText: string, replaceText: string, options?: { caseSensitive?: boolean }): Promise<{ replacedCount: number }>;\n /**\n * Puts text into this area, either at the very beginning or in place of the whole content.\n * - Without replace, the text goes in at the very start of the area and the existing content stays.\n * - With replace, the whole content is replaced and a single paragraph is left, so several paragraphs become one.\n * - If the area does not exist yet, it is created and this text becomes its first content.\n * - In a footnote or endnote area, replace keeps the automatic number marker and the space after it and replaces only the text that follows.\n * - Only the text changes — the formatting of the area stays as it is. Apply formatting to the returned range when you need it.\n *\n * @param text - text to put in. An empty string with replace empties the area\n * @param options - insert options\n * @param options.replace - true replaces the whole content of the area; omitted adds at the very beginning (기본값: false)\n * @returns range of the text that was put in. For a footnote/endnote replace it covers the first paragraph including the number marker. null when a footnote/endnote has no content to replace\n * @throws {Error} if the paragraph of the area cannot be found\n * @example\n * doc.getBody().insertText(\"Preface\"); // add at the very beginning of the body\n * section.getHeader().insertText(\"Report\", { replace: true }); // replace the header (created if missing)\n * note.getBody().insertText(\"Footnote content\", { replace: true }); // replace the footnote text (number marker kept)\n */\n insertText(text: string, options?: { replace?: boolean }): Promise<WordRange | null>;\n /**\n * Clears the content of this area, leaving one empty paragraph.\n * - The content area itself is kept.\n *\n * @returns true if the area exists (including an already empty area), false if the area does not exist\n */\n clear(): Promise<boolean>;\n /**\n * Replaces multiple paragraphs in place at once. Changes text only; unless keepFormat is set, resets the formatting of the replaced range.\n *\n * @param items - list of paragraphs to replace, looked up within this area. keepFormat defaults to false (reset formatting)\n * @returns number of successful replacements\n * @throws {Error} paragraphId missing or paragraph not found\n */\n replaceParagraphs(items: { paragraphId: string; text: string; keepFormat?: boolean }[]): Promise<number>;\n }\n\n /** Gets and edits the page setup and headers/footers of a single document section. */\n export interface WordSection {\n /**\n * Returns the index of this section.\n *\n * @returns 0-based section index\n */\n getIndex(): Promise<number>;\n /**\n * Returns the section body.\n * - The body is shared by all sections, so calling this on any section returns the same body.\n *\n * @returns body area\n */\n getBody(): Promise<WordBody>;\n /**\n * Returns the header area of this section.\n * - An area that does not exist yet is created on first content insertion.\n *\n * @param type - kind: HeaderFooterType (primary/firstPage/evenPages) or HeaderFooterVariant (default/first/even) (기본값: HeaderFooterType.PRIMARY)\n * @returns header area of the given kind\n * @throws {Error} if type is not a HeaderFooterType/HeaderFooterVariant value or the section does not exist\n * @example\n * section.getHeader(); // default header\n * section.getHeader(HeaderFooterVariant.FIRST); // first-page header\n * section.getHeader(HeaderFooterVariant.EVEN); // even-page header\n */\n getHeader(type?: HeaderFooterType | HeaderFooterVariant): Promise<WordBody>;\n /**\n * Returns the footer area of this section.\n * - An area that does not exist yet is created on first content insertion.\n *\n * @param type - kind: HeaderFooterType (primary/firstPage/evenPages) or HeaderFooterVariant (default/first/even) (기본값: HeaderFooterType.PRIMARY)\n * @returns footer area of the given kind\n * @throws {Error} if type is not a HeaderFooterType/HeaderFooterVariant value or the section does not exist\n * @example\n * section.getFooter(); // default footer\n * section.getFooter(HeaderFooterVariant.FIRST); // first-page footer\n */\n getFooter(type?: HeaderFooterType | HeaderFooterVariant): Promise<WordBody>;\n /**\n * Returns the next section in document order.\n *\n * @returns the next section; null if this is the last section\n */\n getNext(): Promise<WordSection | null>;\n /**\n * Returns the previous section in document order.\n *\n * @returns the previous section; null if this is the first section\n */\n getPrevious(): Promise<WordSection | null>;\n /**\n * Returns the page setup of this section.\n * - Paper size and margins are returned in pt.\n *\n * @returns page setup of this section\n * @throws {Error} if the section does not exist\n */\n getPageSetup(): Promise<PageSetupInfo>;\n /**\n * Returns the column (multi-column) layout of this section.\n * - count, equalWidth, space and separator are always included; widths is added only when the column widths differ.\n * - A single column is always reported as equal width, so the result is { count: 1, equalWidth: true, space, separator } with no widths.\n * - The return value can be passed to setColumns() as is.\n *\n * @returns column layout (same shape as the setColumns input)\n * @throws {Error} if the section does not exist\n */\n getColumns(): Promise<ColumnLayout>;\n /**\n * Sets the paper size and orientation of this section.\n * - Specify a paper preset or a width/height in pt. Unspecified dimensions are kept.\n * - When an orientation is given, width and height are aligned to it. Changing only the preset keeps the current orientation.\n *\n * @param size - paper dimensions (pt; an omitted axis keeps its current value) or a paper preset name (A3/A4/A5/Letter/Legal/Executive). null keeps the size (changes orientation only)\n * @param orientation - orientation (portrait/landscape)\n * @throws {Error} if the section does not exist, the preset or orientation is invalid, a dimension is negative, or both size and orientation are omitted\n * @example\n * section.setPageSize(PaperSize.A4); // paper preset (keeps current orientation)\n * section.setPageSize(PaperSize.A4, PageOrientation.LANDSCAPE); // preset + landscape\n * section.setPageSize({ width: 595.3, height: 841.9 }); // explicit dimensions (pt — A4)\n * section.setPageSize({ width: 900 }); // change width only (keeps height)\n * section.setPageSize(null, PageOrientation.PORTRAIT); // change orientation only (keeps size)\n */\n setPageSize(size: Size | PaperSize | null, orientation?: PageOrientation): Promise<void>;\n /**\n * Sets the page margins of this section.\n * - Only the specified sides are changed; the unit is pt.\n *\n * @param margins - margins (pt)\n * @throws {Error} if the section does not exist, margins is not an object, or a margin is negative\n * @example\n * section.setPageMargin({ top: 72, bottom: 72 }); // top/bottom only (pt; other sides kept)\n * section.setPageMargin({ left: 120, right: 120, header: 48, footer: 48 }); // left/right + header/footer margins\n */\n setPageMargin(margins: PageMargins): Promise<void>;\n /**\n * Enables a separate header/footer for the first page of this section.\n * - Does nothing if the value equals the current one. After enabling, enter the first-page content separately.\n * - Check the setting via getPageSetup().titlePage.\n *\n * @param enabled - enable (true) / disable (false)\n * @throws {Error} if the section does not exist or enabled is not a boolean\n * @example\n * section.setTitlePage(true); // separate first-page header/footer\n * section.setTitlePage(false); // remove the distinction\n */\n setTitlePage(enabled: boolean): Promise<void>;\n /**\n * Changes the page numbering settings of this section.\n * - Only the specified fields are changed; null removes the whole setting. Does nothing if the value equals the current one.\n * - Check the setting via getPageSetup().pageNumber.\n *\n * @param options - page numbering settings, or null (remove)\n * @throws {Error} if the section does not exist or start/formatType is invalid\n * @example\n * section.setPageNumbering({ start: 1 }); // start the section's page numbers at 1\n * section.setPageNumbering({ formatType: NumberFormat.UPPER_ROMAN }); // roman numerals\n * section.setPageNumbering(null); // remove page numbering settings\n */\n setPageNumbering(options: PageNumbering | null): Promise<void>;\n /**\n * Changes the break type of this section (continuous, next page, etc.). Does nothing if the value equals the current one.\n * - Same as the value read via getPageSetup().breakType.\n *\n * @param type - break type (continuous/nextPage/evenPage/oddPage)\n * @throws {Error} if type is not a SectionBreakType value or the section does not exist\n * @example\n * section.setBreakType(SectionBreakType.CONTINUOUS); // continue from the previous section\n * section.setBreakType(SectionBreakType.NEXT_PAGE); // start on the next page\n */\n setBreakType(type: SectionBreakType): Promise<void>;\n /**\n * Changes the column (multi-column) layout of this section.\n * - Only the specified fields are changed; the rest keep their current values. Does nothing if the value equals the current one. The unit is pt.\n * - To give each column a different width, specify widths; otherwise all columns share the same width. When count is 1, equalWidth and widths are ignored.\n * - Check the setting via getColumns(); its return value can be passed back as is.\n *\n * @param layout - column layout\n * @throws {Error} if the section does not exist, layout is not an object, count is missing or not an integer in 1~12, or the columns are unequal but the number of widths differs from count\n * @example\n * section.setColumns({ count: 2 }); // two equal columns\n * section.setColumns({ count: 3, separator: true }); // three equal columns + separator line\n * section.setColumns({ count: 1 }); // remove columns (single column)\n * section.setColumns({ count: 2, widths: [{ width: 300 }, { width: 200 }] }); // individual widths (unequal)\n * section.setColumns(section.getColumns()); // write back the read value (no change)\n */\n setColumns(layout: ColumnLayout): Promise<void>;\n /**\n * Removes the break of this section and merges it with the next section.\n * - The last section has no break to remove.\n *\n * @throws {Error} if this is the last section or the section does not exist\n */\n deleteBreak(): Promise<void>;\n }\n\n /** Gets and edits the content and formatting of a single paragraph. */\n export interface WordParagraph {\n /**\n * Returns the paragraph ID.\n *\n * @returns paragraph ID\n */\n getId(): Promise<string>;\n /**\n * Returns the text of the paragraph.\n * - Character positions computed from the returned text are used as the offset of insertText() or the character positions of getRange().\n * - A tab is represented as \"\\t\", line/page/column breaks as \"\\n\", and objects such as footnotes and shapes as the single character \"\\uFFFC\".\n * - The line break that marks the end of the paragraph is not included.\n *\n * @returns the concatenated text of the characters in the paragraph (\"\" if none)\n * @throws {Error} if the paragraph does not exist in the document\n * @example\n * const text = para.getText(); // \"Cherry\\uFFFCQuality\" — the footnote takes one slot\n * const at = text.indexOf(\"Quality\");\n * para.getRange(at, at + 7).insertText(\"Status\", { replace: true }); // replace only the found span\n */\n getText(): Promise<string>;\n /**\n * Returns the structure information of this paragraph.\n * - Includes index, type, paragraph ID, area ID and text.\n *\n * @returns a list containing this single paragraph entry\n * @throws {Error} if the paragraph does not exist in the document\n */\n getStructure(): Promise<{ paragraphs: { index: number; type: string; id: string; storyId: string; text: string }[] }>;\n /**\n * Returns the content of this paragraph as HTML with formatting.\n * - The paragraph is represented as a <p> element.\n *\n * @returns HTML of this paragraph and the paragraph count\n * @throws {Error} if the paragraph does not exist in the document\n */\n getContentHtml(): Promise<{ html: string; paragraphCount: number }>;\n /**\n * Inserts text into the paragraph or replaces the entire paragraph content.\n * - Formatting is preserved. To change or reset formatting, use setTextFormat(), clearFormat() or setStyle() on the returned range.\n *\n * @param text - text to insert\n * @param options - insert/replace options\n * @param options.offset - character position within the paragraph (0-based); takes precedence over position\n * @param options.position - append position (when offset is absent). start (paragraph start) | end (paragraph end) (기본값: InsertAt.START)\n * @param options.replace - if true, replaces the entire paragraph content with the new text (position arguments ignored) (기본값: false)\n * @returns range of the text just inserted (or replaced, when replacing)\n * @throws {Error} if the paragraph does not exist in the document or the offset/position combination is invalid\n * @example\n * para.insertText(\"hello\"); // append at paragraph start (default)\n * para.insertText(\"world\", { position: InsertAt.END }); // append at paragraph end\n * para.insertText(\"X\", { offset: 3 }); // insert at the 3rd character position\n * para.insertText(\"new text\", { replace: true }); // replace the entire paragraph\n */\n insertText(text: string, options?: { offset?: number; position?: InsertAt; replace?: boolean }): Promise<WordRange>;\n /**\n * Inserts a shape of the given preset into the paragraph.\n * - After insertion, use the returned shape to set formatting and placement.\n *\n * @param preset - base shape of the shape (e.g. \"rect\", \"ellipse\", \"roundRect\")\n * @param options - shape insertion options\n * @param options.width - width (px) (기본값: 100)\n * @param options.height - height (px) (기본값: 100)\n * @param options.offset - character position within the paragraph (0-based); takes precedence over position\n * @param options.position - insertion position (when offset is absent). start (paragraph start) | end (paragraph end) (기본값: InsertAt.START)\n * @returns the inserted shape\n * @throws {Error} if preset is not a ShapePreset value, width/height is not positive, or the insertion position is invalid\n * @example\n * para.insertShape(ShapePreset.RECT); // 100x100 rectangle at paragraph start (default)\n * para.insertShape(ShapePreset.ELLIPSE, { offset: 3 }); // insert at the 3rd character position\n * para.insertShape(ShapePreset.RECT, { position: InsertAt.END }); // insert at paragraph end\n */\n insertShape(preset: ShapePreset, options?: { width?: number; height?: number; offset?: number; position?: InsertAt }): Promise<WordShape>;\n /**\n * Inserts a text box into the paragraph.\n *\n * @param options - text box insertion options\n * @param options.width - width (px) (기본값: 100)\n * @param options.height - height (px) (기본값: 100)\n * @param options.text - initial content text\n * @param options.offset - character position within the paragraph (0-based); takes precedence over position\n * @param options.position - insertion position (when offset is absent). start (paragraph start) | end (paragraph end) (기본값: InsertAt.START)\n * @returns creation result (shape: shape object / storyId: text box area ID / paragraphId: first paragraph ID)\n * @throws {Error} if width/height is not positive or text is not a string\n * @example\n * para.insertTextbox({ text: \"Notice\" }); // insert a text box\n * para.insertTextbox({ width: 200, height: 100, offset: 3 }); // specify size and position\n */\n insertTextbox(options?: { width?: number; height?: number; text?: string; offset?: number; position?: InsertAt }): Promise<{ shape: WordShape; storyId: string; paragraphId: string }>;\n /**\n * Inserts an image into the paragraph, placed inline like a character.\n * - Processed asynchronously regardless of the image source.\n *\n * @param options - image insertion options (exactly one source among src/url/base64 is required)\n * @param options.src - path of an already uploaded image\n * @param options.url - image URL (uploaded first, then inserted)\n * @param options.base64 - base64 data (uploaded first, then inserted)\n * @param options.width - width (px) (기본값: original size)\n * @param options.height - height (px) (기본값: original size)\n * @param options.offset - character position within the paragraph (0-based); takes precedence over position\n * @param options.position - insertion position (when offset is absent). start (paragraph start) | end (paragraph end) (기본값: InsertAt.START)\n * @returns the inserted image\n * @throws {Error} if exactly one source (src/url/base64) is not specified, the insertion position is invalid, or the image download/upload fails (Promise reject)\n * @example\n * await para.insertImage({ url: \"https://example.com/image.png\" }); // insert an external image\n * await para.insertImage({ src: imagePath, width: 200, offset: 3 }); // specify size and position of an uploaded image\n */\n insertImage(options: { src?: string; url?: string; base64?: string; width?: number; height?: number; offset?: number; position?: InsertAt }): Promise<WordImage>;\n /**\n * Inserts a web video into the paragraph, placed inline like a character.\n * - Supports YouTube and 3DS 3DEXPERIENCE URLs and is processed asynchronously.\n * - Uses a fallback image if the preview image cannot be fetched.\n *\n * @param url - web video URL (YouTube / 3DS 3DEXPERIENCE)\n * @param options - web video insertion options\n * @param options.width - width (px) (기본값: original thumbnail size)\n * @param options.height - height (px) (기본값: original thumbnail size)\n * @param options.offset - character position within the paragraph (0-based); takes precedence over position\n * @param options.position - insertion position (when offset is absent). start (paragraph start) | end (paragraph end) (기본값: InsertAt.START)\n * @returns the inserted web video image object\n * @throws {Error} if url is missing or unsupported, the insertion position is invalid, or both the preview and fallback image uploads fail (Promise reject)\n * @example\n * await para.insertWebVideo(videoUrl); // insert a video from a supported URL\n * await para.insertWebVideo(videoUrl, { width: 320, height: 180, position: InsertAt.END }); // specify size at paragraph end\n */\n insertWebVideo(url: string, options?: { width?: number; height?: number; offset?: number; position?: InsertAt }): Promise<WordImage>;\n /**\n * Inserts a line break into the paragraph.\n * - Breaks the line while keeping the paragraph, like Shift+Enter.\n *\n * @param options - insertion position options\n * @param options.offset - character position within the paragraph (0-based); a position past the end of the paragraph is adjusted to the paragraph end. takes precedence over position\n * @param options.position - insertion position (when offset is absent). start (paragraph start) | end (paragraph end) (기본값: InsertAt.START)\n * @throws {Error} if the paragraph does not exist in the document or position is not \"start\" or \"end\"\n * @example\n * para.insertLineBreak(); // line break at paragraph start\n * para.insertLineBreak({ offset: 3 }); // line break at the given character position\n */\n insertLineBreak(options?: { offset?: number; position?: InsertAt }): Promise<void>;\n /**\n * Inserts a tab character into the paragraph.\n * - Tab stop positions are set separately with setTabs().\n *\n * @param options - insertion position options\n * @param options.offset - character position within the paragraph (0-based); a position past the end of the paragraph is adjusted to the paragraph end. takes precedence over position\n * @param options.position - insertion position (when offset is absent). start (paragraph start) | end (paragraph end) (기본값: InsertAt.START)\n * @throws {Error} if the paragraph does not exist in the document or position is not \"start\" or \"end\"\n * @example\n * para.insertTab(); // insert a tab at paragraph start\n * para.insertTab({ position: InsertAt.END }); // insert a tab at paragraph end\n */\n insertTab(options?: { offset?: number; position?: InsertAt }): Promise<void>;\n /**\n * Inserts a symbol into the paragraph.\n * - font not specified: inserts the Unicode character as plain text.\n * - font specified: inserts the symbol glyph of that font.\n *\n * @param charCode - Unicode code point (hex string \"2605\" | \"0x2605\" | number 0x2605)\n * @param options - symbol insertion options\n * @param options.font - if specified, inserts the symbol glyph of that font\n * @param options.offset - character position within the paragraph (0-based); takes precedence over position\n * @param options.position - insertion position (when offset is absent). start (paragraph start) | end (paragraph end) (기본값: InsertAt.START)\n * @throws {Error} if charCode is not a valid code point or the insertion position is invalid\n * @example\n * para.insertSymbol(\"2605\"); // insert ★ at paragraph start\n * para.insertSymbol(\"F0FC\", { font: \"Wingdings\" }); // Wingdings check mark symbol\n */\n insertSymbol(charCode: string | number, options?: { font?: string; offset?: number; position?: InsertAt }): Promise<void>;\n /**\n * Inserts a section break at the paragraph position to create a new section.\n * - Section breaks can only be inserted in the body (not in header/footer/text box).\n *\n * @param type - start type of the new section (continuous: continues / nextPage: from the next page / evenPage: from the next even page / oddPage: from the next odd page)\n * @param options - insertion position options\n * @param options.offset - character position within the paragraph (0-based); takes precedence over position\n * @param options.position - insertion position (when offset is absent). start (paragraph start) | end (paragraph end) (기본값: InsertAt.START)\n * @throws {Error} if the area is outside the body, type is not a SectionBreakType value, or the insertion position is invalid\n * @example\n * para.insertSectionBreak(SectionBreakType.NEXT_PAGE); // break at paragraph start (default)\n * para.insertSectionBreak(SectionBreakType.CONTINUOUS, { position: InsertAt.END }); // break at paragraph end\n * para.insertSectionBreak(SectionBreakType.CONTINUOUS, { offset: 5 }); // break at the 5th character position\n */\n insertSectionBreak(type: SectionBreakType, options?: { offset?: number; position?: InsertAt }): Promise<void>;\n /**\n * Inserts a page break into the paragraph.\n * - The following content starts on the next page. Can only be inserted in the body.\n *\n * @param options - insertion position options\n * @param options.offset - character position within the paragraph (0-based); takes precedence over position\n * @param options.position - insertion position (when offset is absent). start (paragraph start) | end (paragraph end) (기본값: InsertAt.START)\n * @throws {Error} if the area is outside the body or the insertion position is invalid\n * @example\n * para.insertPageBreak(); // page break at paragraph start\n * para.insertPageBreak({ offset: 3 }); // break at the given character position\n */\n insertPageBreak(options?: { offset?: number; position?: InsertAt }): Promise<void>;\n /**\n * Inserts a column break into the paragraph.\n * - The following content starts in the next column, or on the next page if the section has a single column. Can only be inserted in the body.\n *\n * @param options - insertion position options\n * @param options.offset - character position within the paragraph (0-based); takes precedence over position\n * @param options.position - insertion position (when offset is absent). start (paragraph start) | end (paragraph end) (기본값: InsertAt.START)\n * @throws {Error} if the area is outside the body or the insertion position is invalid\n * @example\n * para.insertColumnBreak(); // column break at paragraph start\n * para.insertColumnBreak({ position: InsertAt.END }); // break at paragraph end\n */\n insertColumnBreak(options?: { offset?: number; position?: InsertAt }): Promise<void>;\n /**\n * Inserts a footnote at the paragraph position.\n *\n * @param text - initial text of the footnote content (기본값: empty footnote)\n * @param options - insertion position options\n * @param options.offset - character position within the paragraph (0-based); takes precedence over position\n * @param options.position - insertion position (when offset is absent). start (paragraph start) | end (paragraph end) (기본값: InsertAt.START)\n * @returns the created footnote object\n * @throws {Error} if text is not a string or the insertion position is invalid\n * @example\n * para.insertFootnote(\"Source: report\"); // insert a footnote at paragraph start\n * para.insertFootnote(\"Additional note\", { offset: 3 }); // insert at the given character position\n */\n insertFootnote(text?: string, options?: { offset?: number; position?: InsertAt }): Promise<WordNote>;\n /**\n * Inserts an endnote at the paragraph position.\n *\n * @param text - initial text of the endnote content (기본값: empty endnote)\n * @param options - insertion position options\n * @param options.offset - character position within the paragraph (0-based); takes precedence over position\n * @param options.position - insertion position (when offset is absent). start (paragraph start) | end (paragraph end) (기본값: InsertAt.START)\n * @returns the created endnote object\n * @throws {Error} if text is not a string or the insertion position is invalid\n * @example\n * para.insertEndnote(\"References\"); // insert an endnote at paragraph start\n * para.insertEndnote(\"Further note\", { position: InsertAt.END }); // insert at paragraph end\n */\n insertEndnote(text?: string, options?: { offset?: number; position?: InsertAt }): Promise<WordNote>;\n /**\n * Inserts a new paragraph above or below this paragraph, or splits the paragraph at the given character position.\n * - The new paragraph inherits this paragraph's direct paragraph formatting such as alignment, spacing and indentation.\n * - To reset the inherited direct formatting, call clearFormat() on the returned paragraph.\n *\n * @param text - text of the new paragraph (empty string creates an empty paragraph — a pure split when offset is given)\n * @param options - insertion options\n * @param options.offset - splits at the character position within the paragraph (0-based); the following content is preserved as the new paragraph. a position past the end of the paragraph is adjusted to the paragraph end. position is ignored when specified\n * @param options.position - for sibling insertion, \"before\" (above) / \"after\" (below) relative to this paragraph (기본값: InsertAt.AFTER)\n * @returns the newly created paragraph object\n * @throws {Error} if the paragraph does not exist in the document or position is not \"before\" or \"after\"\n * @example\n * para.insertParagraph(\"below\"); // add below this paragraph\n * para.insertParagraph(\"above\", { position: InsertAt.BEFORE }); // add above this paragraph\n * para.insertParagraph(\"\", { offset: 3 }); // split the paragraph at the 3rd character position (following content preserved)\n */\n insertParagraph(text: string, options?: { offset?: number; position?: InsertAt }): Promise<WordParagraph>;\n /**\n * Inserts a table above or below this paragraph, or splits the paragraph at a character position and inserts the table between the parts.\n * - Cannot be inserted inside a table cell (nested tables are not supported — an error is thrown if the insertion point is inside a cell).\n *\n * @param rows - number of rows\n * @param columns - number of columns\n * @param options - insertion options\n * @param options.offset - splits at the character position within the paragraph (0-based) and inserts the table between the parts; the following content is preserved as a new paragraph. position is ignored when specified\n * @param options.position - for sibling insertion, \"before\" (above) / \"after\" (below) relative to this paragraph (기본값: InsertAt.AFTER)\n * @param options.values - cell values to fill right after creation (2D array; an error is thrown before execution if it exceeds the table size)\n * @returns the inserted table object\n * @throws {Error} if rows/columns are not integers 1 or greater, values exceeds the table size, the reference paragraph does not exist, or the insertion point is inside a table cell (nested tables are not supported)\n * @example\n * para.insertTable(3, 4); // 3x4 table below this paragraph\n * para.insertTable(2, 2, { position: InsertAt.BEFORE }); // insert above this paragraph\n * para.insertTable(2, 2, { offset: 3 }); // split at the 3rd character position and insert between the parts\n * para.insertTable(2, 2, { values: [[\"a\", \"b\"], [\"c\", \"d\"]] }); // fill cells on creation\n */\n insertTable(rows: number, columns: number, options?: { offset?: number; position?: InsertAt; values?: string[][] }): Promise<WordTable>;\n /**\n * Applies text formatting to the entire text of the paragraph.\n *\n * @param options - text formatting to apply\n * @throws {Error} if the paragraph does not exist in the document\n * @example\n * para.setTextFormat({ bold: true }); // make all text in the paragraph bold\n * para.setTextFormat({ size: 12, color: \"#FF0000\" }); // set size and color\n */\n setTextFormat(options: TextFormat): Promise<void>;\n /**\n * Resets the text formatting and paragraph formatting of the entire paragraph.\n *\n * @throws {Error} if the paragraph does not exist in the document\n */\n clearFormat(): Promise<void>;\n /**\n * Sets this paragraph as the on-screen selection.\n * - Does not change document content.\n *\n * @param mode - \"select\" (entire paragraph) / \"start\" (cursor at paragraph start) / \"end\" (cursor at paragraph end) (기본값: SelectionMode.SELECT)\n * @throws {Error} if the paragraph does not exist in the document\n * @example\n * para.select(); // select the entire paragraph\n * para.select(SelectionMode.END); // place the cursor at paragraph end\n */\n select(mode?: SelectionMode): Promise<void>;\n /**\n * Applies the given paragraph formatting to this paragraph.\n * - Only the specified fields are changed. Text formatting is set with setTextFormat().\n *\n * @param options - paragraph formatting to apply\n * @throws {Error} if the paragraph does not exist in the document\n * @example\n * para.setParagraphFormat({ align: TextAlign.CENTER }); // center alignment\n * para.setParagraphFormat({ lineSpacing: 1.5, spaceAfter: 10 }); // 1.5x line spacing, 10pt space after paragraph\n * para.setParagraphFormat({ leftIndent: 20, align: null }); // 20px left indent, remove alignment\n */\n setParagraphFormat(options: ParagraphFormat): Promise<void>;\n /**\n * Sets the border of this paragraph.\n * - Uses the same Border format as cell borders.\n *\n * @param border - border value\n * @throws {Error} if the border value is invalid or the paragraph does not exist in the document\n * @example\n * para.setParagraphBorder({ location: BorderLocation.ALL, style: BorderStyle.SOLID, color: \"#0000FF\", width: 1 }); // blue solid line on all four sides and between paragraphs\n * para.setParagraphBorder({ location: BorderLocation.BOTTOM, style: BorderStyle.DOUBLE, color: \"#000000\", width: 2 }); // double line on the bottom only\n * para.setParagraphBorder({ location: BorderLocation.ALL, style: BorderStyle.NONE, color: \"#000000\", width: 0 }); // remove borders\n */\n setParagraphBorder(border: Border): Promise<void>;\n /**\n * Sets the tab stop positions of this paragraph.\n * - Replaces the existing setting with the given array; an empty array removes all tab stops.\n *\n * @param tabs - array of tab stops\n * @throws {Error} if the tabs value is invalid or the paragraph does not exist in the document\n * @example\n * para.setTabs([{ position: 72, alignment: TabAlignment.LEFT }]); // left-aligned tab at 72pt (1 inch)\n * para.setTabs([]); // remove all tab stops\n */\n setTabs(tabs: TabStop[]): Promise<void>;\n /**\n * Applies a style to this paragraph.\n * - Applying a style resets the existing direct formatting.\n * - A paragraph style is applied to the paragraph; a character style is applied to the entire text of the paragraph.\n *\n * @param style - Style enum for built-in styles (value = key), or the style value from getStyles() for custom document styles. null removes the style (reverts to default)\n * @throws {Error} if the paragraph does not exist in the document or the style does not exist in the document\n * @example\n * para.setStyle(Style.HEADING_1); // Heading 1 paragraph style\n * para.setStyle(\"MyCustomStyle\"); // custom document style (key obtained from getStyles)\n * para.setStyle(null); // remove the style (revert to default)\n */\n setStyle(style: Style | string | null): Promise<void>;\n /**\n * Adjusts indent/outdent by one level.\n * - For a list paragraph the list level moves; otherwise the paragraph's left indent moves.\n * - Even for the first item of a list, only that item's level moves.\n *\n * @param type - \"indent\"|\"outdent\"\n * @throws {Error} if type is not an IndentType value or the paragraph does not exist in the document\n * @example\n * para.setIndent(IndentType.INDENT); // indent one level\n * para.setIndent(IndentType.OUTDENT); // outdent one level\n */\n setIndent(type: IndentType): Promise<void>;\n /**\n * Returns the range for the given character position span within this paragraph.\n *\n * @param startOffset - start character position (0-based) (기본값: paragraph start)\n * @param endOffset - end character position (기본값: paragraph end)\n * @returns range object bound to the offset span within the paragraph\n * @example\n * para.getRange(); // range of the paragraph content\n * para.getRange(0, 5); // range of characters 0 to 5\n * para.getRange(3); // from the 3rd character to paragraph end\n */\n getRange(startOffset?: number, endOffset?: number): Promise<WordRange>;\n /**\n * Returns the list of comments overlapping this paragraph's range.\n *\n * @returns list of comments\n */\n getComments(): Promise<WordComment[]>;\n /**\n * Returns the list of change tracking entries overlapping this paragraph.\n *\n * @returns list of change tracking entries\n */\n getChangeTrackings(): Promise<WordChangeTracking[]>;\n /**\n * Accepts all change tracking entries overlapping this paragraph.\n *\n * @returns processing result\n */\n acceptChangeTrackings(): Promise<{ processedCount: number; remainingCount: number; failedIds: string[] }>;\n /**\n * Rejects all change tracking entries overlapping this paragraph.\n *\n * @returns processing result\n */\n rejectChangeTrackings(): Promise<{ processedCount: number; remainingCount: number; failedIds: string[] }>;\n /**\n * Returns the list of footnotes/endnotes in this paragraph.\n *\n * @returns list of footnotes and endnotes\n */\n getNotes(): Promise<WordNote[]>;\n /**\n * Returns the list of footnotes in this paragraph.\n *\n * @returns list of footnotes\n */\n getFootnotes(): Promise<WordNote[]>;\n /**\n * Returns the list of endnotes in this paragraph.\n *\n * @returns list of endnotes\n */\n getEndnotes(): Promise<WordNote[]>;\n /**\n * Returns the immediately preceding paragraph.\n * - Returns null if the preceding element is not a paragraph (e.g. a table) or does not exist. Does not cross section boundaries.\n *\n * @returns the previous paragraph; null if none or the preceding element is not a paragraph\n * @throws {Error} if the paragraph does not exist in the document\n */\n getPreviousSibling(): Promise<WordParagraph | null>;\n /**\n * Returns the immediately following paragraph.\n * - Returns null if the following element is not a paragraph (e.g. a table) or does not exist. Does not cross section boundaries.\n *\n * @returns the next paragraph; null if none or the following element is not a paragraph\n * @throws {Error} if the paragraph does not exist in the document\n */\n getNextSibling(): Promise<WordParagraph | null>;\n /**\n * Returns the area (body/header/footer, etc.) this paragraph belongs to.\n *\n * @returns the area this paragraph belongs to\n * @throws {Error} if the paragraph does not exist in the document\n */\n getParentBody(): Promise<WordBody>;\n /**\n * Returns the nearest table this paragraph belongs to.\n * - Returns null for a paragraph outside a table. For nested tables, returns the inner table.\n *\n * @returns the parent table object; null if outside a table\n * @throws {Error} if the paragraph does not exist in the document\n */\n getParentTable(): Promise<WordTable | null>;\n /**\n * Returns the nearest table cell this paragraph belongs to.\n * - Returns null for a paragraph outside a cell. For nested tables, returns the inner cell.\n *\n * @returns the parent cell object; null if outside a cell\n * @throws {Error} if the paragraph does not exist in the document\n */\n getParentTableCell(): Promise<WordTableCell | null>;\n /**\n * Applies the given list format to this paragraph.\n * - When applied to an existing list, items at the same level of the same list change as well.\n * - Applying a multilevel list affects the entire list.\n * - After applying, change the list level with setLevel() on the list obtained from getList().\n *\n * @param listType - list type to apply. Choose from the built-in bullet, numbered and multilevel lists.\n * @throws {Error} if listType is not a ListType value or the paragraph does not exist in the document\n * @example\n * para.setList(ListType.BULLET_CIRCLE); // circle bullet ●\n * para.setList(ListType.NUMBER_CIRCLED); // circled number ①\n * para.setList(ListType.MULTILEVEL_NESTED_NUMBER); // multilevel 1 / 1.1 / 1.1.1\n */\n setList(listType: ListType): Promise<void>;\n /**\n * Returns the list of this paragraph.\n * - Used to change the list level and restart numbering.\n *\n * @returns list handle; null if the paragraph is not a list item\n * @throws {Error} if the paragraph does not exist in the document\n * @example\n * const list = para.getList();\n * if (list) {\n * list.setLevel(IndentType.INDENT); // one level deeper\n * list.restartNumbering(); // restart numbering from this paragraph\n * }\n */\n getList(): Promise<WordList | null>;\n /**\n * Removes the list from this paragraph.\n * - To remove lists from multiple paragraphs at once, use clearList of WordRange.\n *\n * @throws {Error} if the paragraph does not exist in the document\n */\n clearList(): Promise<void>;\n /**\n * Deletes the paragraph.\n * - If no other paragraph follows, keeps the paragraph and deletes only its characters.\n *\n * @throws {Error} if the paragraph does not exist in the document\n */\n delete(): Promise<void>;\n }\n\n /** Reads and edits content within a specified range of the document. */\n export interface WordRange {\n /**\n * Returns the start/end positions of this range as paragraph coordinates.\n * - Ranges created without coordinates, such as the selection, cursor, or a footnote marker, also have their current position computed and returned.\n * The return shape matches the `getRange` argument, so passing it back recreates the same range.\n *\n * @returns start/end paragraph IDs, character offsets, and area ID\n * @throws {Error} if the range position cannot be resolved (no selection, etc.)\n * @example\n * range.getLocation(); // get the start/end paragraphs and character positions\n * doc.getSelection().getLocation(); // get the coordinates of the current selection\n */\n getLocation(): Promise<{ startParaId: string; startOffset: number; endParaId: string; endOffset: number; storyId: string }>;\n /**\n * Returns the text contained in this range.\n * - Paragraph boundaries are separated by \"\\n\". Within a single paragraph, add getLocation().startOffset to a character position in the returned text to get the paragraph character position.\n * - This calculation cannot be used for ranges spanning multiple paragraphs.\n * - Tabs are represented as \"\\t\", line/page/column breaks as \"\\n\", and objects such as footnotes and shapes as the single character \"\".\n *\n * @returns range text (\"\" for an empty range/cursor)\n * @throws {Error} if the range position cannot be resolved\n * @example\n * range.getText(); // get the text of this range\n * doc.getSelection().getText(); // get the selected text\n */\n getText(): Promise<string>;\n /**\n * Checks whether this range is empty, with the same start and end.\n * - Returns true for a cursor-only range, and false for a range containing selected characters or a search result.\n *\n * @returns true if the range is empty\n * @throws {Error} if the range position cannot be resolved (no selection, etc.)\n * @example\n * doc.getRange({ startParaId: id, startOffset: 3, endOffset: 3 }).isCollapsed(); // empty range: true\n * doc.getRange({ startParaId: id, startOffset: 0, endOffset: 5 }).isCollapsed(); // character range: false\n */\n isCollapsed(): Promise<boolean>;\n /**\n * Returns the paragraph/table structure spanned by this range.\n * - Contains, in document order, everything from the start paragraph to the end paragraph (including tables in between).\n *\n * @returns list of paragraph and table entries spanned by the range\n * @throws {Error} if the range position cannot be resolved\n */\n getStructure(): Promise<{ paragraphs: { index: number; type: string; id: string; storyId: string; text?: string; rows?: number; columns?: number }[] }>;\n /**\n * Returns the paragraph content spanned by this range as HTML with formatting.\n * - Includes paragraphs from the start to the end paragraph in document order; paragraphs inside tables are also represented as <p> elements.\n *\n * @returns range HTML and paragraph count\n * @throws {Error} if the range position cannot be resolved\n */\n getContentHtml(): Promise<{ html: string; paragraphCount: number }>;\n /**\n * Finds text or special characters (page break/column break/line break/tab/symbol) within this range and returns editable ranges.\n *\n * @param query - a string searches text; a `{ character }` object searches special characters\n * @param options - text search options (ignored for special character search)\n * @param options.caseSensitive - case-sensitive matching (기본값: false)\n * @param options.wholeWord - whole-word search (a match is accepted only when bounded by whitespace, punctuation, or a document boundary) (기본값: false)\n * @returns list of matched ranges within this range (empty array if none)\n * @throws {Error} if query is missing or malformed, the special character is unsupported, or the range position cannot be resolved\n * @example\n * range.search(\"hello\"); // plain text search within this range\n * range.search(\"Hello\", { caseSensitive: true }); // case-sensitive matching\n * range.search(\"cat\", { wholeWord: true }); // only the standalone word \"cat\" (excludes cat in catalog)\n * range.search({ character: SpecialCharacter.TAB }); // find tab characters\n * const hits = range.search(\"draft\"); // only matches fully contained in this range\n * hits.forEach((hit) => hit.setTextFormat({ bold: true })); // returned ranges are directly editable\n */\n search(query: string | { character: SpecialCharacter }, options?: { caseSensitive?: boolean; wholeWord?: boolean }): Promise<WordRange[]>;\n /**\n * Applies text formatting to the range.\n *\n * @param options - text formatting to apply (only the specified fields change; passing null instead of a value removes that property and reverts to style inheritance)\n * @throws {Error} if the range position cannot be resolved\n * @example\n * range.setTextFormat({ bold: true }); // bold\n * range.setTextFormat({ size: 12, color: \"#FF0000\" }); // set size and color together\n * range.setTextFormat({ bold: null }); // remove the bold property (restore inheritance)\n */\n setTextFormat(options: TextFormat): Promise<void>;\n /**\n * Resets the text formatting and paragraph formatting of the range.\n * - Paragraph formatting is reset only for paragraphs whose paragraph mark falls inside the range.\n *\n * @throws {Error} if the range position cannot be resolved\n */\n clearFormat(): Promise<void>;\n /**\n * Applies a style to this range.\n * - Existing direct formatting is reset. A paragraph style applies to the paragraphs spanned by the range; a character style applies to the range text.\n *\n * @param style - built-in styles use the Style enum (value = key); custom document styles use the style value from getStyles(). null removes the character style only, leaving the paragraph style in place\n * @throws {Error} if the range position cannot be resolved or the style does not exist in the document\n * @example\n * range.setStyle(Style.HEADING_1); // apply the Heading 1 style\n * range.setStyle(null); // remove the character style (the paragraph style stays)\n */\n setStyle(style: Style | string | null): Promise<void>;\n /**\n * Deletes the text of the range.\n *\n * @throws {Error} if the range position cannot be resolved\n */\n delete(): Promise<void>;\n /**\n * Attaches a hyperlink to this range.\n * - With displayText, that text replaces the range text and carries the link; without it, the existing range text is linked as is.\n * - An empty range has no text to link, so displayText is required there.\n * - The link type is determined automatically from the url (web `http(s)://`, email `mailto:`, bookmark `#name`; https:// is assumed when no scheme is given).\n *\n * @param url - link destination\n * @param options - hyperlink options\n * @param options.tooltip - mouse-over tooltip (기본값: url)\n * @param options.displayText - text to show in place of the range text (required for an empty range)\n * @returns the inserted hyperlink, or null if the new id could not be identified\n * @throws {Error} if url is missing, or the range is empty and displayText is not specified\n * @example\n * range.insertHyperlink(\"https://example.com\"); // web link on the range text\n * doc.getSelection().insertHyperlink(\"mailto:a@b.com\", { displayText: \"Email\" }); // insert as new text at the cursor\n * range.insertHyperlink(\"#bookmark1\", { tooltip: \"Go to\" }); // bookmark link + tooltip\n */\n insertHyperlink(url: string, options?: { tooltip?: string; displayText?: string }): Promise<WordHyperlink | null>;\n /**\n * Returns the hyperlink attached to this range.\n * - The link at the start point is used; if there is none, the link at the end point is used. So a range spanning several links gives the one at the start.\n * - Only the two end points are examined — a link that lies entirely inside the range, touching neither point, is not found.\n *\n * @returns hyperlink object, or null if neither point has a link\n * @throws {Error} if the range position cannot be resolved\n */\n getHyperlink(): Promise<WordHyperlink | null>;\n /**\n * Applies paragraph formatting to the paragraphs spanned by this range.\n * - Only the specified fields change; null removes that property so the style's formatting applies.\n *\n * @param options - paragraph formatting to apply\n * @throws {Error} if the range position cannot be resolved\n * @example\n * range.setParagraphFormat({ align: TextAlign.CENTER }); // center alignment\n * range.setParagraphFormat({ lineSpacing: 1.5, spaceAfter: 10 }); // line spacing and space after the paragraph\n */\n setParagraphFormat(options: ParagraphFormat): Promise<void>;\n /**\n * Returns the text formatting and paragraph formatting at the start position of this range.\n * - Even if formatting varies within the range, the direct formatting at the start position is returned.\n *\n * @returns text and paragraph formatting at the start position (missing items are omitted)\n * @throws {Error} if the range position cannot be resolved\n */\n getFormat(): Promise<{ textFormat?: TextFormat; paragraphFormat?: ParagraphFormat }>;\n /**\n * Copies the style and formatting (text + paragraph) at the start position of this range to the target range.\n * - The source is read from the **start point only** of this range — even if the range spans multiple paragraphs, only the first paragraph's formatting is taken.\n * - For the same reason, paragraph formatting is applied only to the **first paragraph** of the target range.\n * - **If the target is an empty paragraph or a cursor, only paragraph formatting is applied and text formatting is not** — there are no characters to format,\n * and characters entered into that paragraph later do not follow the source text formatting.\n *\n * @param targetRange - range that receives the formatting\n * @throws {Error} if targetRange is not a WordRange or the range position cannot be resolved\n * @example\n * range.copyFormatTo(targetRange); // copy the formatting at the start position to the target range\n */\n copyFormatTo(targetRange: WordRange): Promise<void>;\n /**\n * Sets borders on the paragraphs spanned by this range.\n * - Uses the same Border format as cell borders; location specifies which sides to apply.\n *\n * @param border - border value (shared by paragraphs, cells, and pages)\n * @throws {Error} if the border's location, style, color, or width is invalid, or the range position cannot be resolved\n * @example\n * range.setParagraphBorder({ location: BorderLocation.ALL, style: BorderStyle.SOLID, color: \"#0000FF\", width: 1 }); // all four sides of the paragraphs in the range + lines between them\n * range.setParagraphBorder({ location: BorderLocation.TOP, style: BorderStyle.DOTTED, color: \"#888888\", width: 1 }); // dotted line on the top only\n */\n setParagraphBorder(border: Border): Promise<void>;\n /**\n * Sets the tab stops of the paragraphs spanned by this range.\n * - Replaces the existing setting with the given array; an empty array removes all tab stops.\n *\n * @param tabs - array of tab stops\n * @throws {Error} if the tabs value is invalid or the range position cannot be resolved\n * @example\n * range.setTabs([{ position: 96, alignment: TabAlignment.LEFT }]); // set tab stops on the paragraphs in the range\n * range.setTabs([]); // remove all tab stops\n */\n setTabs(tabs: TabStop[]): Promise<void>;\n /**\n * Adjusts the indent/outdent of the paragraphs spanned by the range by one step.\n * - For list paragraphs the list level moves; for non-list paragraphs the paragraph left margin moves.\n * - Even if the start paragraph is the first item of a list, only that item's level moves.\n *\n * @param type - \"indent\"|\"outdent\"\n * @throws {Error} if type is not an IndentType value or the range position cannot be resolved\n * @example\n * range.setIndent(IndentType.INDENT); // indent the paragraphs in the range\n * range.setIndent(IndentType.OUTDENT); // outdent the paragraphs in the range\n */\n setIndent(type: IndentType): Promise<void>;\n /**\n * Applies list formatting to the paragraphs spanned by this range.\n * - An empty range applies to the paragraph containing the cursor. If multiple paragraphs are included, all of them are affected.\n * - If the cursor is inside an existing list, items of the same list at the same level change too. Multi-level lists are updated as a whole.\n *\n * @param listType - list type to apply. Choose from the built-in bullet, numbered, and multi-level lists.\n * @throws {Error} if listType is missing or the range position cannot be resolved\n * @example\n * doc.getSelection().setList(ListType.NUMBER_DECIMAL); // number the selected paragraphs\n */\n setList(listType: ListType): Promise<void>;\n /**\n * Removes list formatting from the paragraphs spanned by the range.\n *\n * @throws {Error} if the range position cannot be resolved\n * @example\n * doc.getSelection().clearList(); // remove lists from the selected range\n */\n clearList(): Promise<void>;\n /**\n * Returns the start paragraph of this range.\n * - Use the returned paragraph to edit the content and formatting of the whole paragraph.\n * - A coordinate range is not checked here — if the paragraph ID does not exist, the error surfaces when the returned paragraph is used.\n *\n * @returns start paragraph object\n * @throws {Error} if the position of a selection or cursor range cannot be resolved\n */\n getParagraph(): Promise<WordParagraph>;\n /**\n * Returns the section containing the start position of this range.\n * - Returns null when the section cannot be determined outside the body, such as in headers and footers.\n *\n * @returns section object, or null if no body section is found\n * @throws {Error} if the range position cannot be resolved (no selection, etc.)\n */\n getParentSection(): Promise<WordSection | null>;\n /**\n * Returns the list of comments overlapping this range.\n *\n * @returns list of comments\n */\n getComments(): Promise<WordComment[]>;\n /**\n * Returns the list of change-tracking entries overlapping this range, in document order.\n *\n * @returns list of change-tracking entries\n */\n getChangeTrackings(): Promise<WordChangeTracking[]>;\n /**\n * Accepts all change-tracking entries overlapping this range.\n *\n * @returns processing result\n */\n acceptChangeTrackings(): Promise<{ processedCount: number; remainingCount: number; failedIds: string[] }>;\n /**\n * Rejects all change-tracking entries overlapping this range.\n *\n * @returns processing result\n */\n rejectChangeTrackings(): Promise<{ processedCount: number; remainingCount: number; failedIds: string[] }>;\n /**\n * Returns the list of footnotes and endnotes within this range.\n *\n * @returns list of footnotes and endnotes\n */\n getNotes(): Promise<WordNote[]>;\n /**\n * Returns the list of footnotes within this range.\n *\n * @returns list of footnotes\n */\n getFootnotes(): Promise<WordNote[]>;\n /**\n * Returns the list of endnotes within this range.\n *\n * @returns list of endnotes\n */\n getEndnotes(): Promise<WordNote[]>;\n /**\n * Returns the list of shapes, images, and charts within this range.\n * - Includes both inline shapes and shapes placed in front of or behind text.\n *\n * @returns list of shapes (pictures as WordImage, charts as WordChart; empty array if none)\n */\n getShapes(): Promise<(WordShape | WordImage | WordChart)[]>;\n /**\n * Returns the list of bookmarks whose markers lie within the range.\n *\n * @returns list of bookmarks (empty array if none)\n */\n getBookmarks(): Promise<WordBookmark[]>;\n /**\n * Returns the list of text hyperlinks overlapping this range.\n *\n * @returns list of hyperlinks (empty array if none)\n */\n getHyperlinks(): Promise<WordHyperlink[]>;\n /**\n * Inserts text into this range.\n * - replace not specified: inserts at one end point of the range (the original text remains even for a span). position determines which end.\n * - replace: true: replaces the range text with the new text (for a single point, inserts there; position is ignored).\n * Handles text only and leaves formatting as-is. Apply formatting changes separately to the returned range.\n *\n * @param text - text to insert\n * @param options - insert/replace options\n * @param options.position - relative to the range: \"before\" (start point, before the match) / \"after\" (end point, after the match). Ignored when replace:true. (기본값: InsertAt.BEFORE)\n * @param options.replace - if true, replaces the range text with the new text (position ignored)\n * @returns range of the newly inserted or replaced text (setTextFormat etc. can be applied to it directly)\n * @throws {Error} if the range position cannot be resolved or position is not before/after\n * @example\n * range.insertText(\"prepended\"); // insert at the range start\n * range.insertText(\"appended\", { position: InsertAt.AFTER }); // insert at the range end\n * range.insertText(\"new content\", { replace: true }); // replace the range content\n */\n insertText(text: string, options?: { position?: InsertAt; replace?: boolean }): Promise<WordRange>;\n /**\n * Sets this range as the on-screen selection.\n * - Does not change document content.\n *\n * @param mode - \"select\" (whole range) / \"start\" (cursor at the start point) / \"end\" (cursor at the end point) (기본값: SelectionMode.SELECT)\n * @throws {Error} if mode is not a SelectionMode value or the range position cannot be resolved\n * @example\n * range.select(); // select the whole range\n * range.select(SelectionMode.END); // place the cursor at the range end\n * doc.getSelection().select(SelectionMode.START); // collapse the current selection to a cursor at its start\n */\n select(mode?: SelectionMode): Promise<void>;\n /**\n * Inserts a new paragraph above or below the anchor paragraph of this range.\n * - The new paragraph inherits the anchor paragraph's direct paragraph formatting such as alignment, spacing, and indents.\n * - To reset the inherited direct formatting, call clearFormat() on the returned paragraph.\n *\n * @param text - text of the new paragraph\n * @param options - insert options\n * @param options.position - relative to the range paragraph: \"before\" (above) / \"after\" (below) (기본값: InsertAt.AFTER)\n * @returns the newly created paragraph\n * @throws {Error} if the anchor paragraph of the range cannot be found, or position is not \"before\" or \"after\"\n * @example\n * range.insertParagraph(\"new paragraph\"); // add below the range paragraph\n * range.insertParagraph(\"above\", { position: InsertAt.BEFORE }); // add above the range paragraph\n */\n insertParagraph(text: string, options?: { position?: InsertAt }): Promise<WordParagraph>;\n /**\n * Inserts a table relative to the paragraph of the range.\n * - Cannot insert inside a table cell (nested tables are not supported — an error occurs if the insertion point is inside a cell).\n *\n * @param rows - number of rows\n * @param columns - number of columns\n * @param options - insert options\n * @param options.position - relative to the range paragraph: \"before\" (above) / \"after\" (below) (기본값: InsertAt.AFTER)\n * @param options.values - cell values to fill right after creation (2D array; exceeding the table size raises an error before issuing)\n * @returns the inserted table\n * @throws {Error} if rows/columns are not 1 or greater, position is not \"before\" or \"after\", the anchor paragraph does not exist, or the insertion point is inside a table cell (nested tables are not supported)\n * @example\n * range.insertTable(3, 4); // 3x4 table below the range paragraph\n * range.insertTable(2, 2, { position: InsertAt.BEFORE }); // insert above the range paragraph\n * range.insertTable(2, 2, { values: [[\"a\", \"b\"], [\"c\", \"d\"]] }); // fill cells on creation\n */\n insertTable(rows: number, columns: number, options?: { position?: InsertAt; values?: string[][] }): Promise<WordTable>;\n /**\n * Inserts a shape of the given preset into the paragraph of this range.\n * - Use the returned shape to set formatting and placement.\n *\n * @param preset - basic shape of the shape (e.g. \"rect\", \"ellipse\", \"roundRect\")\n * @param options - size (px; an omitted axis defaults to 100)\n * @returns the inserted shape\n * @throws {Error} if preset is not a ShapePreset value, width/height are not positive, or the range position cannot be resolved\n * @example\n * range.insertShape(ShapePreset.RECT); // insert a rectangle\n * range.insertShape(ShapePreset.ELLIPSE, { width: 200, height: 100 }); // ellipse with a specified size\n */\n insertShape(preset: ShapePreset, options?: Size): Promise<WordShape>;\n /**\n * Inserts a text box into the paragraph of the range.\n *\n * @param options - text box creation options (an omitted size axis defaults to 100; text is the initial content)\n * @returns creation result (shape: shape object / storyId: text box area ID / paragraphId: first paragraph ID)\n * @throws {Error} if width/height are not positive or text is not a string\n * @example\n * range.insertTextbox({ text: \"Notice\" }); // insert a text box\n * range.insertTextbox({ width: 200, height: 100, text: \"Description\" }); // specify size and content\n */\n insertTextbox(options?: Size & { text?: String }): Promise<{ shape: WordShape; storyId: string; paragraphId: string }>;\n /**\n * Inserts an image inline at the start position of this range.\n * - Processed asynchronously regardless of the image source.\n *\n * @param options - image insert options (exactly one source among src/url/base64 is required)\n * @param options.src - path of an already uploaded image\n * @param options.url - image URL (uploaded first, then inserted)\n * @param options.base64 - base64 data (uploaded first, then inserted)\n * @param options.width - width (px). Required with src — the original size is only known for url/base64, which are measured on upload (기본값: original size)\n * @param options.height - height (px). Required with src — the original size is only known for url/base64, which are measured on upload (기본값: original size)\n * @returns the inserted image\n * @throws {Error} if exactly one source (src/url/base64) is not specified, width/height are missing or not positive with src, the range position cannot be resolved, or the image download/upload fails (Promise reject)\n * @example\n * await range.insertImage({ url: \"https://example.com/image.png\" }); // insert an external image\n * await range.insertImage({ src: imagePath, width: 200, height: 150 }); // insert an uploaded image (size required)\n */\n insertImage(options: { src?: string; url?: string; base64?: string; width?: number; height?: number }): Promise<WordImage>;\n /**\n * Inserts a web video inline at the start position of this range.\n * - Supports YouTube and 3DS 3DEXPERIENCE URLs and is processed asynchronously.\n * - If the preview image cannot be fetched, a fallback image is used.\n *\n * @param url - web video URL (YouTube / 3DS 3DEXPERIENCE)\n * @param options - size (px) (기본값: thumbnail original size)\n * @returns the inserted web video image object\n * @throws {Error} if url is missing or unsupported, the range position cannot be resolved, or both the preview and fallback image uploads fail (Promise reject)\n * @example\n * await range.insertWebVideo(videoUrl); // insert a video from a supported URL\n * await range.insertWebVideo(videoUrl, { width: 320, height: 180 }); // specify the size\n */\n insertWebVideo(url: string, options?: Size): Promise<WordImage>;\n /**\n * Inserts a line break at the start position of this range.\n * - Breaks the line while keeping the paragraph, like Shift+Enter.\n *\n * @throws {Error} if the range position cannot be resolved\n * @example\n * range.insertLineBreak(); // line break at the range start\n */\n insertLineBreak(): Promise<void>;\n /**\n * Inserts a tab character at the start position of this range.\n * - Tab stop positions are set separately with setTabs().\n *\n * @throws {Error} if the range position cannot be resolved\n * @example\n * range.insertTab(); // insert a tab at the range start\n */\n insertTab(): Promise<void>;\n /**\n * Inserts a symbol at the start position of this range.\n * - font not specified: inserts the Unicode character as plain text.\n * - font specified: inserts it as a symbol glyph of that font.\n *\n * @param charCode - Unicode code point (hex string \"2605\" | \"0x2605\" | number 0x2605)\n * @param options - when font is specified, inserts the symbol in that font\n * @throws {Error} if charCode is not a valid code point or the range position cannot be resolved\n * @example\n * range.insertSymbol(\"2605\"); // insert the star symbol ★\n * range.insertSymbol(\"F0FC\", { font: \"Wingdings\" }); // check mark symbol in the specified font\n */\n insertSymbol(charCode: string | number, options?: { font?: string }): Promise<void>;\n /**\n * Inserts a section break at this range position to create a new section.\n * - Section breaks can only be inserted in the body (not in headers/footers/text boxes).\n *\n * @param type - start type of the new section (continuous: continues on the same page / nextPage: from the next page / evenPage: from the next even page / oddPage: from the next odd page)\n * @throws {Error} if the area is outside the body, type is not a SectionBreakType value, or the range position cannot be resolved\n * @example\n * doc.getSelection().insertSectionBreak(SectionBreakType.NEXT_PAGE); // next-page section break at the selection\n * doc.getBody().getRange(RangePosition.END).insertSectionBreak(SectionBreakType.CONTINUOUS); // continuous section break at the end of the document\n */\n insertSectionBreak(type: SectionBreakType): Promise<void>;\n /**\n * Inserts a page break at this range position.\n * - The following content starts on the next page. Can only be inserted in the body.\n *\n * @throws {Error} if the area is outside the body or the range position cannot be resolved\n * @example\n * doc.getSelection().insertPageBreak(); // page break at the selection\n * doc.getRange({ startParaId: id, startOffset: 5, endOffset: 5 }).insertPageBreak(); // break at the specified character position\n */\n insertPageBreak(): Promise<void>;\n /**\n * Inserts a column break at this range position.\n * - The following content starts in the next column, or on the next page if the section has a single column. Can only be inserted in the body.\n *\n * @throws {Error} if the area is outside the body or the range position cannot be resolved\n * @example\n * doc.getSelection().insertColumnBreak(); // column break at the selection\n * doc.getRange({ startParaId: id, startOffset: 5, endOffset: 5 }).insertColumnBreak(); // break at the specified character position\n */\n insertColumnBreak(): Promise<void>;\n /**\n * Inserts a bookmark at the start position of this range.\n * - If a bookmark with the same name exists, it is replaced. The name cannot start with a digit, special character, or space.\n *\n * @param name - bookmark name\n * @returns the inserted bookmark\n * @throws {Error} if name is missing or invalid, or the range position cannot be resolved\n * @example\n * range.insertBookmark(\"intro\"); // bookmark at the range start\n * doc.getSelection().insertBookmark(\"here\").goTo(); // insert and move there immediately\n */\n insertBookmark(name: string): Promise<WordBookmark>;\n /**\n * Inserts a comment on this range.\n *\n * @param text - comment body\n * @param options - author metadata\n * @returns the inserted comment\n * @throws {Error} if text is not a string or the range position cannot be resolved\n * @example\n * range.insertComment(\"Please check\"); // add a comment on the range\n * range.insertComment(\"Review note\", { authorName: \"Reviewer\", initials: \"RV\" }); // specify the author\n */\n insertComment(text: string, options?: { authorName?: string; initials?: string }): Promise<WordComment>;\n /**\n * Inserts a footnote at the end of this range.\n * - The marker is placed in the body and the content goes into the footnote area at the bottom of the page.\n *\n * @param text - initial text of the footnote content (기본값: empty footnote)\n * @returns the created footnote\n * @throws {Error} if text is not a string or the range position cannot be resolved\n * @example\n * range.insertFootnote(\"Source: report\"); // insert a footnote at the range end\n * para.getRange(5, 5).insertFootnote(\"Additional note\"); // insert a footnote at the specified character position\n */\n insertFootnote(text?: string): Promise<WordNote>;\n /**\n * Inserts an endnote at the end of this range.\n * - The marker is placed in the body and the content goes into the endnote area at the end of the document.\n *\n * @param text - initial text of the endnote content (기본값: empty endnote)\n * @returns the created endnote\n * @throws {Error} if text is not a string or the range position cannot be resolved\n * @example\n * range.insertEndnote(\"Reference\"); // insert an endnote at the range end\n * doc.getSelection().insertEndnote(\"Further details\"); // insert an endnote at the end of the selection\n */\n insertEndnote(text?: string): Promise<WordNote>;\n }\n\n /** Changes the level and numbering restart position of a paragraph that belongs to a list. */\n export interface WordList {\n /**\n * Changes the list level of this paragraph.\n * - Moves one level at a time with IndentType, or sets the target level with a 0-based number.\n * - Even on the first item of the list, only this paragraph's level changes. The change can be undone in one step.\n * - If the given level is deeper than the list supports, moves to the last level of that list.\n * - To remove the list, use clearList() on the paragraph or range.\n *\n * @param value - \"indent\" (one level in) | \"outdent\" (one level out) | target level (integer 0~8)\n * @throws {Error} if value is neither an IndentType value nor an integer 0~8, or the paragraph is not in the document\n * @example\n * list.setLevel(IndentType.INDENT); // 1 → 1.1\n * list.setLevel(2); // set to level 2\n * list.setLevel(0); // to the outermost level (list kept)\n * list.setLevel(8); // innermost level (maximum allowed)\n */\n setLevel(value: IndentType | number): Promise<void>;\n /**\n * Restarts numbering from this paragraph.\n *\n * @throws {Error} if the paragraph is not in the document\n * @example\n * para.getList().restartNumbering(); // restart list numbering from this paragraph\n */\n restartNumbering(): Promise<void>;\n }\n\n /** Gets and edits the structure of a table and the content and formatting of its cells. */\n export interface WordTable {\n /**\n * Returns the table ID.\n *\n * @returns table ID\n */\n getId(): Promise<string>;\n /**\n * Returns the number of rows in the table.\n *\n * @returns number of rows in the table\n */\n getRowCount(): Promise<number>;\n /**\n * Returns the total number of columns in the table, including the columns occupied by merged cells.\n *\n * @returns total number of columns in the table, taking merges into account\n */\n getColumnCount(): Promise<number>;\n /**\n * Returns the row at the given position.\n *\n * @param rowIndex - row index (0-based)\n * @returns the row at that index\n */\n getRow(rowIndex: number): Promise<WordTableRow>;\n /**\n * Returns the cell at the given position.\n *\n * @param rowIndex - row index (0-based)\n * @param columnIndex - column index (0-based)\n * @returns the cell at that row and column\n */\n getCell(rowIndex: number, columnIndex: number): Promise<WordTableCell>;\n /**\n * Replaces the content of multiple cells with text from a 2D array.\n * - Puts values[r][c] into row r, column c. Cells not covered by the array and cells whose value is null or undefined are left unchanged.\n * - Throws if the array exceeds the table size.\n *\n * @param values - array of values per row (rows may have different column lengths)\n * @throws {Error} if the table does not exist, values is not an array, or the array exceeds the table size\n * @example\n * table.setValues([[\"Name\", \"Score\"], [\"John\", \"95\"]]); // fill 2x2\n * table.setValues([[null, \"Changed\"]]); // update only the second cell of the first row (null is skipped)\n */\n setValues(values: string[][]): Promise<void>;\n /**\n * Deletes the table.\n *\n * @throws {Error} if the table is not in the document\n */\n delete(): Promise<void>;\n /**\n * Sets the horizontal position of the table within the page.\n * - Set the horizontal alignment of cell content with setParagraphFormat() on the cell paragraph, and vertical alignment with setCellVerticalAlignment().\n *\n * @param align - horizontal position \"left\" | \"center\" | \"right\"\n * @throws {Error} if align is not a TableAlign value or the table is not in the document\n * @example\n * table.setAlignment(TableAlign.CENTER); // center the table on the page\n */\n setAlignment(align: TableAlign): Promise<void>;\n /**\n * Sets the widths of all columns in the table.\n * - The array length must equal the total number of columns. Columns with null keep their current width.\n * - Values smaller than the minimum width are raised to the minimum.\n *\n * @param widths - array of column widths (pt). A null slot keeps the current value\n * @throws {Error} if widths is not an array, its length differs from the column count, or a value is not positive\n * @example\n * table.setColumnWidths([120, 200, 80]); // set each of 3 columns in pt\n * table.setColumnWidths([100, null, null]); // change only the first column, keep the rest\n */\n setColumnWidths(widths: (number | null)[]): Promise<void>;\n /**\n * Sets the row heights of the table row by row.\n * - The array length must equal the number of rows. Rows with null keep their current height.\n *\n * @param heights - array of row heights (pt). A null slot keeps the current value\n * @throws {Error} if heights is not an array, its length differs from the row count, or a value is not positive\n * @example\n * table.setRowHeights([30, 30, 60]); // set height per row\n * table.setRowHeights([null, 40, null]); // change only the second row\n */\n setRowHeights(heights: (number | null)[]): Promise<void>;\n /**\n * Makes the widths of the target columns equal.\n * - Divides the total width of the target columns evenly while preserving it; other columns are unchanged.\n *\n * @param range - target column range. Only the column span (col/colSpan) is used (기본값: whole table)\n * @throws {Error} if the table does not exist or range is invalid\n * @example\n * table.distributeColumns(); // distribute all column widths evenly\n * table.distributeColumns({ col: 0, colSpan: 2 }); // distribute only the first two columns evenly\n */\n distributeColumns(range?: CellRange): Promise<void>;\n /**\n * Sets the target rows to the same given height.\n *\n * @param height - row height (pt, positive)\n * @param range - target row range. Only the row span (row/rowSpan) is used (기본값: whole table)\n * @throws {Error} if height is not positive, the table does not exist, or range is invalid\n * @example\n * table.setRowHeight(30); // set all rows of the table to 30pt\n * table.setRowHeight(45, { row: 0, rowSpan: 2 }); // set only the first two rows to 45pt\n */\n setRowHeight(height: number, range?: CellRange): Promise<void>;\n /**\n * Inserts a new row before or after the reference row.\n *\n * @param rowIndex - reference row index (0-based)\n * @param position - insert position \"before\" (above the reference row) | \"after\" (below the reference row) (기본값: InsertAt.AFTER)\n * @returns the newly created row\n * @throws {Error} if the table does not exist, rowIndex is missing, or it is out of range\n * @example\n * const row = table.insertRow(0); // add below the first row\n * table.insertRow(0, InsertAt.BEFORE).getCell(0).setText(\"Header\"); // add at the very top and fill it right away\n */\n insertRow(rowIndex: number, position?: InsertAt): Promise<WordTableRow>;\n /**\n * Deletes a row.\n *\n * @param rowIndex - index of the row to delete (0-based)\n */\n deleteRow(rowIndex: number): Promise<void>;\n /**\n * Inserts a new column to the left or right of the reference column.\n * - Access the cells of the new column by passing row and column indices to getCell().\n *\n * @param columnIndex - reference column index (0-based)\n * @param position - insert position \"before\" (left of the reference column) | \"after\" (right of the reference column) (기본값: InsertAt.AFTER)\n * @throws {Error} if the table does not exist, columnIndex is missing, or it is out of range\n * @example\n * table.insertColumn(0); // add to the right of the first column\n * table.getCell(0, 1).setText(\"Header\"); // fill the first cell of the new column\n */\n insertColumn(columnIndex: number, position?: InsertAt): Promise<void>;\n /**\n * Deletes a column.\n *\n * @param columnIndex - index of the column to delete (0-based)\n */\n deleteColumn(columnIndex: number): Promise<void>;\n /**\n * Merges a cell range.\n *\n * @param range - target cell range (anchor + count; at least one of rowSpan/colSpan must be 2 or more)\n * @throws {Error} if both rowSpan and colSpan are 1 or less, or range is invalid\n * @example\n * table.mergeCells({ row: 0, col: 0, colSpan: 2 }); // merge two columns of the first row horizontally\n * table.mergeCells({ row: 1, col: 1, rowSpan: 2, colSpan: 2 }); // merge a 2×2 rectangular range\n */\n mergeCells(range: CellRange): Promise<void>;\n /**\n * Splits the merged cells within the given range.\n *\n * @param range - target cell range (omit the counts for a single cell)\n * @example\n * table.unmergeCells({ row: 0, col: 0 }); // split the specified merged cell\n */\n unmergeCells(range: CellRange): Promise<void>;\n /**\n * Sets the background color of a cell range.\n *\n * @param range - target cell range (anchor + count)\n * @param color - background color (hex \"#RRGGBB\"; null or \"\" removes it)\n * @example\n * table.setCellBackgroundColor({ row: 0, col: 0 }, \"#FFEB3B\"); // single cell\n * table.setCellBackgroundColor({ row: 0, col: 0, colSpan: 3 }, null); // remove background of the first 3 columns\n */\n setCellBackgroundColor(range: CellRange, color: string | null): Promise<void>;\n /**\n * Sets the vertical alignment of a cell range.\n *\n * @param range - target cell range (anchor + count)\n * @param align - vertical alignment \"top\" | \"center\" | \"bottom\"\n * @example\n * table.setCellVerticalAlignment({ row: 0, col: 0, colSpan: 2 }, CellVerticalAlign.CENTER); // vertically center the first two cells\n */\n setCellVerticalAlignment(range: CellRange, align: CellVerticalAlign): Promise<void>;\n /**\n * Sets the inner padding of the given cell range.\n *\n * @param range - target cell range (anchor + count)\n * @param padding - padding on 4 sides (pt; only the specified sides change)\n * @example\n * table.setCellPadding({ row: 0, col: 0 }, { top: 4, bottom: 4 }); // top and bottom only\n * table.setCellPadding({ row: 0, col: 0, rowSpan: 2 }, { left: 8, right: 8 }); // left and right only, two rows\n */\n setCellPadding(range: CellRange, padding: Padding): Promise<void>;\n /**\n * Sets the borders of a cell range.\n *\n * @param range - target cell range (anchor + count)\n * @param border - border value (shared by paragraph/cell/page — see the Border typedef of WordRange.setParagraphBorder for field definitions)\n * @example\n * table.setCellBorder({ row: 0, col: 0 }, { location: BorderLocation.ALL, style: BorderStyle.SOLID, color: \"#000000\", width: 1 }); // 1pt solid line on all four sides of the cell\n */\n setCellBorder(range: CellRange, border: Border): Promise<void>;\n }\n\n /** Gets a single table row and inserts or deletes adjacent rows. */\n export interface WordTableRow {\n /**\n * Returns the table this row belongs to.\n *\n * @returns the table this row belongs to\n */\n getTable(): Promise<WordTable>;\n /**\n * Returns the row index.\n *\n * @returns 0-based row index\n */\n getIndex(): Promise<number>;\n /**\n * Returns the list of cells in this row.\n * - Returned in column order, including merged cells.\n *\n * @returns cells in column order\n */\n getCells(): Promise<WordTableCell[]>;\n /**\n * Returns the cell at the given column in this row.\n *\n * @param columnIndex - 0-based column index\n * @returns the cell at that column\n */\n getCell(columnIndex: number): Promise<WordTableCell>;\n /**\n * Deletes this row.\n */\n delete(): Promise<void>;\n /**\n * Inserts a new row above or below this row.\n *\n * @param position - insert position: \"before\" (above) | \"after\" (below) (기본값: InsertAt.AFTER)\n * @returns the newly created row\n * @throws {Error} if the table does not exist or the row index is out of range\n * @example\n * row.insertSibling(); // insert below the current row\n * row.insertSibling(InsertAt.BEFORE); // insert above the current row\n */\n insertSibling(position?: InsertAt): Promise<WordTableRow>;\n }\n\n /** Fills a single table cell with content and sets its formatting. */\n export interface WordTableCell {\n /**\n * Returns the table this cell belongs to.\n *\n * @returns the table this cell belongs to\n */\n getTable(): Promise<WordTable>;\n /**\n * Returns the row index.\n *\n * @returns 0-based row index\n */\n getRow(): Promise<number>;\n /**\n * Returns the column index.\n *\n * @returns 0-based column index\n */\n getColumn(): Promise<number>;\n /**\n * Returns all paragraphs in the cell, in order.\n *\n * @returns array of paragraphs inside the cell (empty array if the cell is empty)\n */\n getParagraphs(): Promise<WordParagraph[]>;\n /**\n * Returns the paragraph at the given index inside the cell.\n * - Use the returned paragraph to read its text and edit its content and formatting.\n *\n * @param index - 0-based paragraph index (기본값: 0)\n * @returns the paragraph, or null if none\n */\n getParagraph(index?: number): Promise<WordParagraph | null>;\n /**\n * Replaces the text of the first paragraph in the cell with the given text.\n * - Only the first paragraph is changed; the other paragraphs of the cell are left as they are.\n *\n * @param text - text to set\n * @throws {Error} if the table does not exist or the cell coordinates are out of range\n * @example\n * cell.setText(\"New content\"); // replace the text of the first paragraph\n * cell.setText(\"\"); // clear the text of the first paragraph\n */\n setText(text: string): Promise<void>;\n /**\n * Sets the cell background color.\n *\n * @param color - \"#RRGGBB\" hex color; null/\"\" removes the background\n * @example\n * cell.setBackgroundColor(\"#FFEB3B\"); // yellow background\n * cell.setBackgroundColor(null); // remove background\n */\n setBackgroundColor(color: string | null): Promise<void>;\n /**\n * Sets the vertical alignment of the cell.\n *\n * @param align - \"top\" | \"center\" | \"bottom\"\n * @example\n * cell.setVerticalAlignment(CellVerticalAlign.CENTER); // vertically center\n */\n setVerticalAlignment(align: CellVerticalAlign): Promise<void>;\n /**\n * Sets the inner padding of the cell.\n * - Only the specified sides are changed.\n *\n * @param padding - padding for the four sides\n * @example\n * cell.setPadding({ left: 8, right: 8 }); // set only left/right padding to 8pt\n */\n setPadding(padding: Padding): Promise<void>;\n /**\n * Sets the cell border.\n *\n * @param border - border value\n * @example\n * cell.setBorder({ location: BorderLocation.BOTTOM, style: BorderStyle.SOLID, color: \"#000000\", width: 1 }); // solid bottom border\n */\n setBorder(border: Border): Promise<void>;\n }\n\n /** Gets and edits the content and formatting of a shape or text box. */\n export interface WordShape {\n /**\n * Returns the range of the position the shape occupies.\n * - The shape occupies a single character position, so start = end.\n *\n * @returns range of the shape position (errors at use time if the shape does not exist)\n * @example\n * word.getShape(id).getRange().getLocation(); // { startParaId, startOffset, ... }\n */\n getRange(): Promise<WordRange>;\n /**\n * Returns the text area inside the shape.\n *\n * @returns text area container, null if the shape is not a text box\n * @throws {Error} if the shape does not exist in the document\n */\n getBody(): Promise<WordBody | null>;\n /**\n * Returns the current fill settings of the shape.\n * - The return value can be passed to setFill() as-is.\n * - A theme color fill or a radial gradient fill returns only type, so passing such a value back to setFill() fails.\n *\n * @returns fill information (same shape as the setFill input), null if there is no fill information\n * @throws {Error} if the shape does not exist in the document\n */\n getFill(): Promise<ShapeFill | null>;\n /**\n * Returns the current line settings of the shape.\n * - The return value can be passed to setLine() as-is.\n *\n * @returns line information (same shape as the setLine input), null if there is no line information\n * @throws {Error} if the shape does not exist in the document\n */\n getLine(): Promise<ShapeLine | null>;\n /**\n * Returns the hyperlink information attached to the shape.\n * - A shape can have one hyperlink.\n *\n * @returns link information, null if none. For a bookmark, url=\"#name\" and anchor=\"name\"\n * @throws {Error} if the shape does not exist in the document\n * @example\n * const link = shape.getHyperlink();\n * if (link) { shape.updateHyperlink({ url: \"https://new.com\" }); } // update if present\n */\n getHyperlink(): Promise<{ url: string; tooltip: string | null; linkType: HyperlinkType; anchor?: string } | null>;\n /**\n * Changes the size of the shape.\n * - Specify at least one of width or height. The size of the unspecified dimension is kept.\n *\n * @param options - new size (px). Each field is optional, at least one required; omitted axes keep their current value\n * @throws {Error} if the shape does not exist, both width and height are omitted, or a given value is not positive\n * @example\n * shape.resize({ width: 200, height: 100 }); // change width and height together\n * shape.resize({ width: 200 }); // change width only (height kept)\n */\n resize(options: Size): Promise<void>;\n /**\n * Changes the wrap mode of the shape.\n * - Switches between inline with text and in front of / behind text.\n *\n * @param wrap - \"inline\"|\"infront\"|\"behind\"\n * @throws {Error} if the shape does not exist or wrap is not a ShapeWrap value\n * @example\n * shape.setWrap(ShapeWrap.INLINE); // inline with text\n * shape.setWrap(ShapeWrap.INFRONT); // in front of text\n * shape.setWrap(ShapeWrap.BEHIND); // behind text\n */\n setWrap(wrap: ShapeWrap): Promise<void>;\n /**\n * Changes the z-order of a shape placed in front of or behind text.\n * - Specifying the same position for a shape already at the very front or back makes no change.\n *\n * @param order - \"front\"|\"back\"|\"forward\"|\"backward\"\n * @throws {Error} if the shape does not exist, order is not a ShapeZOrder value, or the shape is inline (z-order applies only to shapes in front of / behind text)\n * @example\n * shape.setZOrder(ShapeZOrder.FRONT); // bring to front\n * shape.setZOrder(ShapeZOrder.BACKWARD); // send backward one step\n */\n setZOrder(order: ShapeZOrder): Promise<void>;\n /**\n * Changes the position of a shape placed in front of or behind text.\n * - x and y are px coordinates relative to relativeFromH and relativeFromV; unspecified fields are kept.\n * - A reference point must be given together with its coordinate, because changing the reference point changes the meaning of the coordinate.\n * - If anchorParagraphId is given, the shape moves to that paragraph; otherwise only the position within the current paragraph changes.\n *\n * @param options - move options (x/y in px). Omitted fields keep their current value\n * @throws {Error} if the shape does not exist, all fields are omitted, x or y is not a number, a relativeFrom value is invalid, the shape is inline, a reference point is given without its coordinate, the current position of an omitted axis is not a coordinate (aligned or percentage based), or the target paragraph does not exist or is outside the body\n * @example\n * shape.move({ x: 100, y: 50 }); // move coordinates only, keeping the current reference points\n * shape.move({ x: 0, relativeFromH: PositionRelativeFromH.PAGE }); // move while changing the horizontal reference to the page\n * shape.move({ anchorParagraphId: \"p1\", x: 30, y: 30 }); // re-anchor to another paragraph\n */\n move(options: { x?: number; y?: number; relativeFromH?: PositionRelativeFromH; relativeFromV?: PositionRelativeFromV; anchorParagraphId?: string }): Promise<void>;\n /**\n * Sets the shape fill.\n * - For blipFill, give image as one of { src } (file name already uploaded to the server) / { url } (external image address) / { base64 }.\n * url and base64 are uploaded to the server first and then applied, so the result must be awaited in every case — always call with await.\n * - The input has the same shape as the getFill() return value (ShapeFill), so a read value can be re-applied as-is.\n *\n * @param fill - fill information (type determines which fields are valid)\n * @returns no return value\n * @throws {Error} if the shape does not exist, type/color/sub-fields are invalid, or the image upload fails (Promise reject)\n * @example\n * await shape.setFill({ type: FillType.SOLID, color: \"#FF0000\" }); // solid color\n * await shape.setFill({ type: FillType.NONE }); // remove fill\n * await shape.setFill({ type: FillType.GRADIENT, stops: [{ position: 0, color: \"#FFFFFF\" }, { position: 100, color: \"#000000\" }], angle: 90 }); // gradient\n * await shape.setFill({ type: FillType.IMAGE, image: { url: \"https://example.com/a.png\" } }); // external image (uploaded first)\n */\n setFill(fill: ShapeFill): Promise<void>;\n /**\n * Sets the shape line.\n * - Omitted = no change, null (color/dash/compound) = remove. null or a non-number for width is rejected (no \"remove\" meaning).\n *\n * @param options - line options. Omitted = no change, null for color/dash/compound = remove\n * @throws {Error} if the shape does not exist, all fields are omitted, a value is invalid, or width is not a number ≥ 0\n * @example\n * shape.setLine({ color: \"#000000\", width: 2 }); // black 2pt line\n * shape.setLine({ dash: LineDash.DASH }); // change dash style only\n * shape.setLine({ color: null }); // remove line\n */\n setLine(options: ShapeLine): Promise<void>;\n /**\n * Sets a hyperlink on the shape.\n * - Replaces an existing link if present. Web address, email and bookmark are distinguished by URL format; a web address without a protocol gets https:// prepended.\n *\n * @param url - link destination\n * @param options - additional options\n * @param options.tooltip - mouse-over tooltip (기본값: url)\n * @throws {Error} if the shape does not exist, url is not a string or is an empty string, or the shape is a web video (its link slot holds the playback address)\n * @example\n * shape.insertHyperlink(\"https://example.com\"); // web link\n * shape.insertHyperlink(\"mailto:a@b.com\", { tooltip: \"Send mail\" }); // email + tooltip\n * shape.insertHyperlink(\"#bookmark1\"); // bookmark within the document\n */\n insertHyperlink(url: string, options?: { tooltip?: string }): Promise<void>;\n /**\n * Updates the address or tooltip of the hyperlink attached to the shape.\n * - Throws if there is no existing link. Unspecified fields are kept.\n *\n * @param options - items to update (at least one of url/tooltip)\n * @param options.url - new URL (web `http(s)://` · email `mailto:` · bookmark `#name`) (기본값: current value)\n * @param options.tooltip - new tooltip (기본값: current value)\n * @throws {Error} if the shape does not exist, there is no hyperlink, or no field to change is given\n * @example\n * shape.updateHyperlink({ url: \"https://new.com\" }); // change link target only\n * shape.updateHyperlink({ tooltip: \"Description\" }); // change tooltip only\n */\n updateHyperlink(options: { url?: string; tooltip?: string }): Promise<void>;\n /**\n * Removes the hyperlink from the shape.\n * - The shape itself is kept. Use getHyperlink() to check whether a link exists.\n *\n * @throws {Error} if the shape does not exist or has no hyperlink\n * @example\n * if (shape.getHyperlink()) { shape.removeHyperlink(); } // remove only if present\n */\n removeHyperlink(): Promise<void>;\n /**\n * Replaces the text content of the shape.\n * - For a plain shape, a new text area is created. Throws for shapes that cannot hold text, such as images.\n * - An empty string clears the content.\n *\n * @param text - text to fill in (\"\" clears the content)\n * @throws {Error} if the shape does not exist, text is not a string, or the shape cannot hold text (e.g. an image)\n * @example\n * shape.setText(\"Notice text\"); // set or replace text\n * shape.setText(\"\"); // clear content\n */\n setText(text: string): Promise<void>;\n /**\n * Sets the vertical alignment of the shape text.\n * - Applies only to shapes with a text area. If there is none, add text first with setText().\n *\n * @param align - \"top\"|\"middle\"|\"bottom\"\n * @throws {Error} if the shape does not exist, has no text area, or align is not a TextVerticalAlign value\n * @example\n * shape.setTextVerticalAlign(TextVerticalAlign.MIDDLE); // vertically centered\n */\n setTextVerticalAlign(align: TextVerticalAlign): Promise<void>;\n /**\n * Sets the inner margins of the shape text area.\n * - Specifies all four margins of a shape that has a text area.\n *\n * @param options - four margins (pt, each ≥ 0)\n * @throws {Error} if the shape does not exist, has no text area, or a value is not a number ≥ 0\n * @example\n * shape.setTextMargin({ left: 6, top: 6, right: 6, bottom: 6 }); // 6pt margin on all four sides\n */\n setTextMargin(options: { left: number; top: number; right: number; bottom: number }): Promise<void>;\n /**\n * Deletes the shape.\n * - Both inline shapes and shapes placed in front of or behind text can be deleted.\n *\n * @throws {Error} if the shape does not exist in the document\n */\n delete(): Promise<void>;\n }\n\n /** Edits the size, position, wrap, and hyperlink of an image in the document. */\n export interface WordImage extends WordShape {\n }\n\n /** Gets and edits the type and formatting of a chart. */\n export interface WordChart extends WordShape {\n // ChartApiMixin\n /**\n * 차트 타입을 enum 문자열로 반환한다. 미지원/미매핑 타입(파일 로드 stock/surface 등)은 \"unknown\".\n */\n getType(): Promise<string>;\n /**\n * 차트가 편집 가능한지 반환한다. 대상 부재·복원 불가·외부 데이터 차트는 false (throw 하지 않는다).\n */\n isEditable(): Promise<boolean>;\n /**\n * 차트 제목을 반환한다. 미설정 시 빈 문자열.\n */\n getTitle(): Promise<string>;\n /**\n * 축 제목을 반환한다. 미설정 시 빈 문자열,\n * 축 제목을 갖지 않는 차트 종류(원형 계열·도넛·방사형)는 null.\n *\n * @param axis - 그 외 CHART_AXIS_INVALID throw.\n */\n getAxisTitle(axis: ChartAxis): Promise<string | null>;\n /**\n * 범례 위치를 반환한다. 범례가 없으면 \"none\".\n */\n getLegendPosition(): Promise<ChartLegendPosition>;\n /**\n * 데이터레이블 위치를 반환한다. 레이블이 없으면 \"none\".\n */\n getDataLabelPosition(): Promise<ChartDataLabelPosition>;\n /**\n * 축별 눈금선 종류를 반환한다. 꺼져 있으면 \"none\",\n * 해당 눈금선을 갖지 않는 차트 종류는 null.\n *\n * @param axis - 그 외 CHART_AXIS_INVALID throw.\n */\n getGridLine(axis: ChartAxis): Promise<ChartGridLineType | null>;\n /**\n * 차트의 공통 서식 상태를 모델 조회 1회로 반환한다. 각 값은 동명 getter 와 같은 규약이다 —\n * axisTitle/gridLine 의 null 은 그 차트 종류에 해당 축의 제목·눈금선이 없다는 뜻이고,\n * \"none\" 은 지원하지만 꺼져 있다는 뜻이다.\n *\n * 개별 getter 는 호출마다 대상 실존 확인(hasChart)을 반복하므로, 여러 값을 함께 읽을 때는 이 쪽을 쓴다.\n */\n getState(): Promise<{ type: string; title: string; legendPosition: ChartLegendPosition; dataLabelPosition: ChartDataLabelPosition; axisTitle: { horizontal: string | null; vertical: string | null }; gridLine: { horizontal: ChartGridLineType | null; vertical: ChartGridLineType | null } }>;\n /**\n * 차트 종류를 변경한다. 현재 종류와 같으면 아무것도 하지 않는다 —\n * 종류가 그대로인데 스타일 미지정 차트의 스타일만 기본값으로 바뀌는 부작용을 막는다.\n *\n * @param chartType - 차트 종류 enum 값(= enum 문자열, 예: \"clustered_column\"). 미정의/미지원이면 CHART_TYPE_UNSUPPORTED throw.\n */\n setType(chartType: ChartType): Promise<void>;\n /**\n * 차트 프리셋 스타일을 변경한다. 번호별 실제 색은 문서 테마에 종속된다.\n *\n * @param style - 스타일 번호 (1~12 정수). 3개 단위로 색 그룹이 나뉘고(1~3=그룹1, 4~6=그룹2, 7~9=그룹3, 10~12=그룹4), 그룹 내 순서는 배경 변형이다(1번째=반투명 배경, 2번째=흰색 배경, 3번째=색상 배경+계열 테두리 — 정의는 chartInfo.setStyle JSDoc). 형태 위반 시 CHART_STYLE_INVALID throw.\n */\n setStyle(style: number): Promise<void>;\n /**\n * 차트 제목을 설정한다.\n */\n setTitle(title: string): Promise<void>;\n /**\n * 축 제목을 설정한다. 축 제목을 갖지 않는 차트 종류(원형 계열·도넛·방사형)는\n * CHART_AXIS_TITLE_UNSUPPORTED throw.\n *\n * @param axis - 그 외 CHART_AXIS_INVALID throw.\n */\n setAxisTitle(axis: ChartAxis, title: string): Promise<void>;\n /**\n * 범례 위치를 설정한다. \"none\"이면 범례를 숨긴다.\n *\n * @param position - 그 외 CHART_LEGEND_POSITION_INVALID throw.\n */\n setLegendPosition(position: ChartLegendPosition): Promise<void>;\n /**\n * 데이터레이블 위치를 설정한다. \"none\"이면 숨긴다.\n * 차트 타입별 유효 위치까지 검증한다 — 타입 그룹 미정의는 CHART_DATALABEL_UNSUPPORTED,\n * 그룹에 없는 위치는 CHART_DATALABEL_POSITION_INVALID throw. \"none\"은 전 타입 허용.\n *\n * @param position - 그 외 CHART_DATALABEL_POSITION_INVALID throw.\n */\n setDataLabelPosition(position: ChartDataLabelPosition): Promise<void>;\n /**\n * 차트 눈금선을 설정한다. \"none\"이면 해당 축 눈금선을 숨긴다.\n * 차트 타입별 지원 여부까지 검증한다 — 원형 계열·도넛은 양축, 방사형은 세로 축이\n * CHART_GRID_LINE_UNSUPPORTED throw.\n *\n * @param axis - 그 외 CHART_AXIS_INVALID throw.\n * @param gridType - 그 외 CHART_GRID_LINE_INVALID throw.\n */\n setGridLine(axis: ChartAxis, gridType: ChartGridLineType): Promise<void>;\n // own\n /**\n * Returns the chart shape ID.\n *\n * @returns chart shape ID (permanent GUID)\n */\n getId(): Promise<string>;\n }\n\n /** Looks up a bookmark identified by name, deletes it, or moves to its position. */\n export interface WordBookmark {\n /**\n * Returns the bookmark name.\n *\n * @returns bookmark name\n */\n getName(): Promise<string>;\n /**\n * Returns whether the bookmark exists.\n *\n * @returns true if it exists\n */\n exists(): Promise<boolean>;\n /**\n * Deletes the bookmark.\n *\n * @throws {Error} if no bookmark with the given name exists\n */\n delete(): Promise<void>;\n /**\n * Moves the cursor to the bookmark position.\n * - Does not change document content; does nothing if the bookmark does not exist.\n */\n goTo(): Promise<void>;\n /**\n * Returns the range at which the bookmark marker is placed.\n *\n * @returns marker position range\n * @example\n * word.getBookmark(\"intro\").getRange().getLocation(); // get the bookmark position\n * word.getBookmark(\"intro\").getRange().insertText(\"headerText\");\n */\n getRange(): Promise<WordRange>;\n }\n\n /** Gets, updates or deletes a hyperlink attached to text. */\n export interface WordHyperlink {\n /**\n * Returns the hyperlink ID.\n *\n * @returns hyperlink ID, or null if not yet inserted\n */\n getId(): Promise<string | null>;\n /**\n * Returns whether the hyperlink exists.\n *\n * @returns true if it exists\n */\n exists(): Promise<boolean>;\n /**\n * Returns the link target address.\n * - Bookmarks are returned as \"#name\". Web addresses entered without a protocol are returned as \"https://…\".\n *\n * @returns destination url\n * @throws {Error} if no hyperlink with the given ID exists\n * @example\n * word.getHyperlinks().filter(link => link.getUrl().startsWith(\"http://\")); // pick out insecure links\n */\n getUrl(): Promise<string>;\n /**\n * Returns the link tooltip (the description shown on mouse hover).\n *\n * @returns tooltip, or null if not set\n * @throws {Error} if no hyperlink with the given ID exists\n */\n getTooltip(): Promise<string | null>;\n /**\n * Returns the link type.\n *\n * @returns link type (link/mailto/bookmark)\n * @throws {Error} if no hyperlink with the given ID exists\n */\n getLinkType(): Promise<HyperlinkType>;\n /**\n * Returns the range of the display text the link is attached to.\n * - The link start/end markers are not included. Editing the returned range changes only the text while keeping the link.\n *\n * @returns display text range\n * @example\n * word.getHyperlink(id).getRange().getText(); // text the link is attached to\n * word.getHyperlink(id).getRange().insertText(\"Shortcut\", { replace: true }); // replace only the text, keeping the link\n * word.getHyperlink(id).getRange().setTextFormat({ bold: true }); // format only the link text\n */\n getRange(): Promise<WordRange>;\n /**\n * Updates the hyperlink's address, tooltip and display text.\n * - Specify at least one field to change. Giving only url keeps the display text; giving displayText replaces it.\n *\n * @param options - update options (all fields optional, at least one required)\n * @param options.url - new URL (web `http(s)://` · email `mailto:` · bookmark `#name`) (기본값: current value)\n * @param options.tooltip - new tooltip (omitted: keeps the current tooltip, but becomes the new url when url is also changed)\n * @param options.displayText - new display text (if given, the visible text is replaced) (기본값: current value)\n * @throws {Error} if no field to change is given or the hyperlink does not exist\n * @example\n * link.update({ url: \"https://example.com\" }); // change only the link target\n * link.update({ url: \"mailto:a@b.com\", displayText: \"mail\" }); // replace target + display text\n * link.update({ tooltip: \"description\" }); // change only the tooltip\n */\n update(options: { url?: string; tooltip?: string; displayText?: string }): Promise<void>;\n /**\n * Deletes the hyperlink.\n * - The display text remains in the document.\n *\n * @throws {Error} if no hyperlink with the given ID exists\n */\n delete(): Promise<void>;\n }\n\n /** Looks up a comment and edits its content or deletes it. */\n export interface WordComment {\n /**\n * Returns the comment ID.\n *\n * @returns comment ID\n */\n getId(): Promise<string>;\n /**\n * Returns whether the comment exists.\n *\n * @returns true if it exists\n */\n exists(): Promise<boolean>;\n /**\n * Returns the body range the comment is attached to.\n *\n * @returns body range the comment is linked to\n */\n getRange(): Promise<WordRange>;\n /**\n * Returns the content area of the comment.\n *\n * @returns comment body area, null if none\n */\n getBody(): Promise<WordBody | null>;\n /**\n * Deletes the comment.\n *\n * @throws {Error} if no comment with the given ID exists\n */\n delete(): Promise<void>;\n }\n\n /** Gets and updates the information and formatting defined in a style. */\n export interface WordStyle {\n /**\n * Returns the information and formatting defined directly on this style.\n * - Formatting from parent styles linked via basedOn is not included.\n * - textFormat and paragraphFormat can be reused to set text and paragraph formatting respectively. Character styles have no paragraphFormat.\n *\n * @returns null if none\n */\n getStyle(): Promise<(StyleInfo & { textFormat?: TextFormat, paragraphFormat?: ParagraphFormat }) | null>;\n /**\n * Returns the final style information including formatting inherited from parent styles.\n * - Returned in the same shape as getStyle(), with formatting inheritance via basedOn applied.\n *\n * @returns null if none\n */\n getResolvedStyle(): Promise<(StyleInfo & { textFormat?: TextFormat, paragraphFormat?: ParagraphFormat }) | null>;\n /**\n * Partially updates the formatting defined in the style.\n * - Only the specified fields are changed; the rest are kept. null removes the property so the parent style's formatting applies.\n * - Paragraph styles accept both text and paragraph formatting; character styles accept text formatting only.\n *\n * @param changes - formatting to change (partial, at least one)\n * @throws {Error} if no field to change is given, an unknown key is present, the style is invalid, or paragraphFormat is given for a character style\n * @example\n * style.update({ textFormat: { bold: true, color: \"#FF0000\" } }); // change text formatting only\n * style.update({ paragraphFormat: { align: TextAlign.CENTER } }); // change paragraph formatting only\n * style.update({ textFormat: { size: null } }); // remove property (revert to inherited)\n */\n update(changes: { textFormat?: TextFormat; paragraphFormat?: ParagraphFormat }): Promise<void>;\n }\n\n /** Looks up a footnote or endnote and edits its content or deletes it. */\n export interface WordNote {\n /**\n * Returns the footnote/endnote ID.\n *\n * @returns footnote/endnote ID\n */\n getId(): Promise<string>;\n /**\n * Returns whether the footnote/endnote exists.\n *\n * @returns true if it exists\n */\n exists(): Promise<boolean>;\n /**\n * Returns the body range at which the footnote/endnote reference mark is placed.\n *\n * @returns marker position range\n * @example\n * word.getNote(id).getRange().getLocation(); // { startParaId, startOffset, ... }\n */\n getRange(): Promise<WordRange>;\n /**\n * Returns the content area of the footnote/endnote.\n *\n * @returns content area, null if none\n * @example\n * word.getNote(id).getBody().getText(); // get the footnote/endnote content\n * word.getNote(id).getBody().insertText(\"new content\", { replace: true }); // replace the whole content\n */\n getBody(): Promise<WordBody | null>;\n /**\n * Returns the ordinal position among footnotes/endnotes of the same kind within the document.\n *\n * @returns ordinal position, -1 if none\n */\n getIndex(): Promise<number>;\n /**\n * Deletes the footnote/endnote.\n * - Deletes both the reference mark in the body and the footnote/endnote content.\n *\n * @throws {Error} if no footnote/endnote with the given ID exists or its reference mark cannot be found in the body\n */\n delete(): Promise<void>;\n }\n\n /** Looks up a change tracking entry and accepts or rejects it. */\n export interface WordChangeTracking {\n /**\n * Returns the ID of the change tracking entry.\n *\n * @returns change tracking entry ID\n */\n getId(): Promise<string>;\n /**\n * Checks whether the change tracking entry still exists.\n * - An entry that has been accepted or rejected is considered no longer existing.\n *\n * @returns true if it exists\n */\n exists(): Promise<boolean>;\n /**\n * Returns the document range occupied by the change entry.\n * - When several changes are grouped, the range spans from the first to the last; null if there is no target.\n *\n * @returns change range, null if there is no target\n */\n getRange(): Promise<WordRange | null>;\n /**\n * Accepts the change tracking entry.\n * - Confirms insertions, deletions, and formatting changes. An already processed entry is not changed again.\n *\n * @returns true if accepted, false if there is no target\n */\n accept(): Promise<boolean>;\n /**\n * Rejects the change tracking entry.\n * - Cancels insertions and deletions and restores the original formatting. An already processed entry is not changed again.\n *\n * @returns true if rejected, false if there is no target\n */\n reject(): Promise<boolean>;\n }\n}\n","/* eslint-disable */\n/**\n * Thinkfree Office SDK Type Definitions\n *\n * ⚠️ AUTO-GENERATED — DO NOT EDIT.\n * 오피스 구현 저장소(비공개)의 API JSDoc 에서 생성된다 — 수정은 원본 JSDoc 에서.\n *\n * proxy 메서드는 postMessage bridge 를 거치므로 Promise 를 반환한다.\n * Generated: 2026-09-14\n */\n\n// Thinkfree Office SDK (Cell)\n\n// 공통 enum — 정의·값은 common 모듈(SDK flat export)에만 있다. 여기서는 시그니처 참조용 type import 만 한다.\nimport type { LineDash, ShapePreset, ShapeZOrder, ChartType, ChartGridLineType, ChartAxis, ChartLegendPosition, ChartDataLabelPosition } from \"./common-api.generated.js\";\n\n// 실제(비-ambient) 모듈 네임스페이스 — 단일 번들 d.ts 에서 `Cell.X` 로 타입·런타임\n// enum 값을 모두 노출한다. index 의 `export * as` 재수출은 tsup dts 롤업에서 const+type\n// 선언 병합의 값 의미가 타입 전용으로 강등되므로 쓰지 않는다 (dts.config 의 namespace 키).\nexport namespace Cell {\n // =============================================================================\n // Constants / Enums\n // =============================================================================\n\n /**\n * SDK proxy 엔티티 타입 — 직렬화 descriptor(`{__proxy, type, attrs}`)와\n * proxyInvoke payload 의 `proxyType` 값으로 사용한다.\n *\n * 문자열은 d.ts 공개명(cell-api.dts.config.json classNameMap)과 동일하며,\n * tfo-sdk `src/proxyConstants.ts` 의 `PROXY_TYPE` 와 수동 동기화 쌍이다.\n * Chart/Table 은 show ProxyType 과 동일 문자열이지만 dispatcher 가 모듈(iframe)별로\n * 독립이라 충돌하지 않는다.\n */\n export const ProxyType = {\n WORKBOOK: \"Workbook\",\n WORKSHEET: \"Worksheet\",\n RANGE: \"Range\",\n CHART: \"Chart\",\n TABLE: \"Table\",\n FILTER: \"Filter\",\n NAME: \"Name\",\n } as const;\n export type ProxyType = typeof ProxyType[keyof typeof ProxyType];\n\n /**\n * 셀 가로 정렬 — `ApiRange.setHorizontalAlign` 인자.\n *\n * 지정하지 않은 셀은 데이터 종류에 따라 그려진다(문자는 왼쪽, 숫자는 오른쪽). 조회는 명시 지정된\n * 값만 돌려주므로 기본 상태에서는 값이 없다.\n */\n export const HorizontalAlign = {\n LEFT: \"left\",\n CENTER: \"center\",\n RIGHT: \"right\",\n JUSTIFY: \"justify\",\n DISTRIBUTED: \"distributed\",\n } as const;\n export type HorizontalAlign = typeof HorizontalAlign[keyof typeof HorizontalAlign];\n\n /**\n * 셀 세로 정렬 — `ApiRange.setVerticalAlign` 인자.\n *\n * 지정하지 않은 셀은 아래쪽으로 그려진다. 조회는 명시 지정된 값만 돌려준다.\n */\n export const VerticalAlign = {\n TOP: \"top\",\n CENTER: \"center\",\n BOTTOM: \"bottom\",\n JUSTIFY: \"justify\",\n } as const;\n export type VerticalAlign = typeof VerticalAlign[keyof typeof VerticalAlign];\n\n /**\n * 테두리를 적용할 위치 — `ApiRange.setBorder` 의 첫 인자.\n *\n * `NONE` 은 테두리 제거이며 이때 선 스타일·색은 무시된다. `CENTER`/`MIDDLE` 은 범위 내부의\n * 세로선/가로선, `CROSS` 는 그 둘, `RECTANGLE` 은 바깥 네 변, `ALL` 은 바깥과 내부 전체다.\n *\n * 값은 모델 어휘(`Constants.ot.BORDER_TYPE_*`)와 같은 문자열이다.\n */\n export const BorderType = {\n ALL: \"all\",\n RECTANGLE: \"rectangle\",\n CROSS: \"cross\",\n TOP: \"top\",\n BOTTOM: \"bottom\",\n LEFT: \"left\",\n RIGHT: \"right\",\n CENTER: \"center\",\n MIDDLE: \"middle\",\n DIAGONAL: \"diagonal\",\n DIAGONAL_UP: \"diagonal_up\",\n DIAGONAL_DOWN: \"diagonal_down\",\n DIAGONAL_CROSS: \"diagonal_cross\",\n NONE: \"none\",\n } as const;\n export type BorderType = typeof BorderType[keyof typeof BorderType];\n\n /**\n * 테두리 선 스타일 — `ApiRange.setBorder` 의 두 번째 인자(기본 `THIN`).\n *\n * 값은 렌더러가 아는 선 스타일 전부(`view/util/borderStyleUtils.js` 의 우선순위 목록 · 조건부 서식이\n * 쓰는 `controller/dxfStyle.js` 의 `CF_PROFILE.border.styles`)와 같아야 한다. 목록 밖의 문자열은\n * 검증 없이 저장되고 화면에는 테두리가 지정한 모양으로 그려지지 않는다.\n * 생성기가 객체 리터럴만 읽으므로 그 목록에서 파생할 수 없다 — 대신 dispatch 테스트가 어긋남을 잡는다.\n */\n export const BorderLineStyle = {\n HAIR: \"hair\",\n THIN: \"thin\",\n MEDIUM: \"medium\",\n THICK: \"thick\",\n DOUBLE: \"double\",\n DOTTED: \"dotted\",\n DASHED: \"dashed\",\n DASH_DOT: \"dashDot\",\n DASH_DOT_DOT: \"dashDotDot\",\n MEDIUM_DASHED: \"mediumDashed\",\n MEDIUM_DASH_DOT: \"mediumDashDot\",\n MEDIUM_DASH_DOT_DOT: \"mediumDashDotDot\",\n SLANT_DASH_DOT: \"slantDashDot\",\n NONE: \"none\",\n } as const;\n export type BorderLineStyle = typeof BorderLineStyle[keyof typeof BorderLineStyle];\n\n /** 정렬 방향 — `ApiRange.sort` · `ApiFilter.sort` 인자. */\n export const SortOrder = {\n ASCENDING: \"asc\",\n DESCENDING: \"desc\",\n } as const;\n export type SortOrder = typeof SortOrder[keyof typeof SortOrder];\n\n /**\n * 하이퍼링크 종류 — `ApiRange.setHyperlink` 의 `options.type`.\n *\n * `BOOK` 은 같은 문서 안의 위치로 이동하는 링크이며 `location` 에 시트·범위를 준다.\n * 목록 밖의 값이면 INVALID_HYPERLINK_TYPE 로 실패한다.\n */\n export const HyperlinkType = {\n WEB: \"web\",\n EMAIL: \"email\",\n BOOK: \"book\",\n } as const;\n export type HyperlinkType = typeof HyperlinkType[keyof typeof HyperlinkType];\n\n /**\n * 데이터 유효성 규칙 종류 — `ApiRange.setDataValidation` rule 의 `type`.\n *\n * `ANY` 는 입력을 제한하지 않고 안내 메시지만 붙이는 종류이므로 수식이 필요 없다.\n * `LIST` 는 `formula1` 에 콤마 목록(`=` 없이) 또는 단일 열·행 범위 참조(`=` 필수)를 받고,\n * `CUSTOM` 은 불리언 수식을 받는다. 나머지는 `operator` 와 짝으로 경계값을 받는다.\n */\n export const DataValidationType = {\n ANY: \"any\",\n LIST: \"list\",\n WHOLE: \"whole\",\n DECIMAL: \"decimal\",\n DATE: \"date\",\n TIME: \"time\",\n TEXT_LENGTH: \"textLength\",\n CUSTOM: \"custom\",\n } as const;\n export type DataValidationType = typeof DataValidationType[keyof typeof DataValidationType];\n\n /**\n * 데이터 유효성 비교 연산자 — `ApiRange.setDataValidation` rule 의 `operator`.\n *\n * 숫자·날짜·시간·길이 종류에서만 쓴다. `BETWEEN`/`NOT_BETWEEN` 은 `formula2` 로 두 번째\n * 경계를 함께 받는다.\n */\n export const DataValidationOperator = {\n BETWEEN: \"between\",\n NOT_BETWEEN: \"notBetween\",\n EQUAL: \"equal\",\n NOT_EQUAL: \"notEqual\",\n LESS_THAN: \"lessThan\",\n LESS_THAN_OR_EQUAL: \"lessThanOrEqual\",\n GREATER_THAN: \"greaterThan\",\n GREATER_THAN_OR_EQUAL: \"greaterThanOrEqual\",\n } as const;\n export type DataValidationOperator = typeof DataValidationOperator[keyof typeof DataValidationOperator];\n\n /**\n * 데이터 유효성 위반 시 오류 표시 방식 — `ApiRange.setDataValidation` rule 의 `errorStyle`(기본 `STOP`).\n *\n * `STOP` 은 입력을 거부하고, `WARNING`/`INFORMATION` 은 경고 후 입력을 허용한다.\n */\n export const DataValidationErrorStyle = {\n STOP: \"stop\",\n WARNING: \"warning\",\n INFORMATION: \"information\",\n } as const;\n export type DataValidationErrorStyle = typeof DataValidationErrorStyle[keyof typeof DataValidationErrorStyle];\n\n /**\n * 조건부 서식 규칙 종류 — `ApiRange.addConditionalFormat` rule 의 `rule_type`.\n *\n * `CELL_IS` 는 `operator` + 경계값, `EXPRESSION` 은 불리언 수식, 텍스트 계열은 비교 문자열,\n * `TOP10` 은 순위(`rank`), `TIME_PERIOD` 는 기간 토큰을 함께 받는다. 여기까지는 수식 계열로\n * 강조 서식을 `style` 로 직접 지정한다.\n *\n * `COLOR_SCALE`/`DATA_BAR`/`ICON_SET` 은 시각 규칙이라 `style` 을 받지 않고 색 목록 또는\n * 프리셋 식별자와 임계값(`cfvo`)으로 서술한다.\n *\n * 값은 모델 정본 토큰과 같은 문자열이다.\n */\n export const ConditionalFormatRuleType = {\n CELL_IS: \"cellIs\",\n EXPRESSION: \"expression\",\n CONTAINS_TEXT: \"containsText\",\n NOT_CONTAINS_TEXT: \"notContainsText\",\n BEGINS_WITH: \"beginsWith\",\n ENDS_WITH: \"endsWith\",\n CONTAINS_BLANKS: \"containsBlanks\",\n NOT_CONTAINS_BLANKS: \"notContainsBlanks\",\n CONTAINS_ERRORS: \"containsErrors\",\n NOT_CONTAINS_ERRORS: \"notContainsErrors\",\n TOP10: \"top10\",\n ABOVE_AVERAGE: \"aboveAverage\",\n BELOW_AVERAGE: \"belowAverage\",\n DUPLICATE_VALUES: \"duplicateValues\",\n UNIQUE_VALUES: \"uniqueValues\",\n TIME_PERIOD: \"timePeriod\",\n COLOR_SCALE: \"colorScale\",\n DATA_BAR: \"dataBar\",\n ICON_SET: \"iconSet\",\n } as const;\n export type ConditionalFormatRuleType = typeof ConditionalFormatRuleType[keyof typeof ConditionalFormatRuleType];\n\n /**\n * 조건부 서식 비교 연산자 — `cellIs` 규칙의 `operator`.\n *\n * `BETWEEN`/`NOT_BETWEEN` 은 `formula2` 로 두 번째 경계를 함께 받는다.\n */\n export const ConditionalFormatOperator = {\n EQUAL: \"equal\",\n NOT_EQUAL: \"notEqual\",\n BETWEEN: \"between\",\n NOT_BETWEEN: \"notBetween\",\n GREATER_THAN: \"greaterThan\",\n GREATER_THAN_OR_EQUAL: \"greaterThanOrEqual\",\n LESS_THAN: \"lessThan\",\n LESS_THAN_OR_EQUAL: \"lessThanOrEqual\",\n } as const;\n export type ConditionalFormatOperator = typeof ConditionalFormatOperator[keyof typeof ConditionalFormatOperator];\n\n /**\n * 조건부 서식 기간 토큰 — `timePeriod` 규칙의 `time_period`.\n *\n * 기준일은 문서를 여는 시점의 오늘 날짜이므로 규칙이 가리키는 셀 집합은 날짜가 바뀌면 달라진다.\n */\n export const ConditionalFormatTimePeriod = {\n YESTERDAY: \"yesterday\",\n TODAY: \"today\",\n TOMORROW: \"tomorrow\",\n LAST_7_DAYS: \"last7Days\",\n LAST_WEEK: \"lastWeek\",\n THIS_WEEK: \"thisWeek\",\n NEXT_WEEK: \"nextWeek\",\n LAST_MONTH: \"lastMonth\",\n THIS_MONTH: \"thisMonth\",\n NEXT_MONTH: \"nextMonth\",\n } as const;\n export type ConditionalFormatTimePeriod = typeof ConditionalFormatTimePeriod[keyof typeof ConditionalFormatTimePeriod];\n\n /**\n * 조건부 서식 시각 규칙 임계값의 기준 — `cfvo[].type`.\n *\n * `NUM`/`PERCENT`/`PERCENTILE`/`FORMULA` 는 `formula` 로 값을 함께 받고, `MIN`/`MAX` 는\n * 범위의 최소·최대를 쓴다. `AUTO_MIN`/`AUTO_MAX` 는 데이터 막대 전용 기본 임계값이라 직접 지정하기보다\n * 조회 결과를 그대로 다시 넣을 때 쓰라고 열어 둔 값이다.\n */\n export const ConditionalFormatValueType = {\n NUM: \"num\",\n MIN: \"min\",\n MAX: \"max\",\n PERCENT: \"percent\",\n PERCENTILE: \"percentile\",\n FORMULA: \"formula\",\n AUTO_MIN: \"autoMin\",\n AUTO_MAX: \"autoMax\",\n } as const;\n export type ConditionalFormatValueType = typeof ConditionalFormatValueType[keyof typeof ConditionalFormatValueType];\n\n /**\n * 필터 조건 종류 — `ApiFilter.applyFilter` criteria 의 `filterType`.\n *\n * 종류에 따라 criteria 의 나머지 필드가 달라진다 — `VALUES` 는 표시할 값 목록,\n * `CUSTOM` 은 조건식 1~2개, `TOP10` 은 개수/비율, `DYNAMIC` 은 평균 기준 토큰.\n *\n * `ApiFilter.getInfo` 의 `columns[].filterType` 도 같은 어휘다. 단 단일 `EQUAL` 조건으로\n * 적용한 `CUSTOM` 은 모델에서 값 목록으로 저장되어 조회 시 `VALUES` 로 나온다.\n */\n export const FilterType = {\n VALUES: \"values\",\n CUSTOM: \"custom\",\n TOP10: \"top10\",\n DYNAMIC: \"dynamic\",\n } as const;\n export type FilterType = typeof FilterType[keyof typeof FilterType];\n\n /**\n * 사용자 지정 필터 조건식의 연산자 — `custom` criteria 의 `conditions[].operator`.\n *\n * `EQUAL` 은 단일 조건에서만 쓸 수 있다(두 조건 조합에서는 지원하지 않는다).\n * \"사이\"·\"사이 제외\" 는 별도 연산자가 아니라 두 조건의 AND·OR 조합으로 표현한다.\n */\n export const FilterOperator = {\n EQUAL: \"equal\",\n NOT_EQUAL: \"notEqual\",\n GREATER_THAN: \"greaterThan\",\n GREATER_OR_EQUAL: \"greaterOrEqual\",\n LESS_THAN: \"lessThan\",\n LESS_OR_EQUAL: \"lessOrEqual\",\n BEGINS_WITH: \"beginsWith\",\n NOT_BEGINS_WITH: \"notBeginsWith\",\n ENDS_WITH: \"endsWith\",\n NOT_ENDS_WITH: \"notEndsWith\",\n CONTAINS: \"contains\",\n NOT_CONTAINS: \"notContains\",\n } as const;\n export type FilterOperator = typeof FilterOperator[keyof typeof FilterOperator];\n\n /** 동적 필터의 기준 — `dynamic` criteria 의 `type`. */\n export const FilterDynamicType = {\n ABOVE_AVERAGE: \"aboveAverage\",\n BELOW_AVERAGE: \"belowAverage\",\n } as const;\n export type FilterDynamicType = typeof FilterDynamicType[keyof typeof FilterDynamicType];\n\n // =============================================================================\n // Typedefs\n // =============================================================================\n\n export interface SheetInfo {\n name: string;\n hidden: boolean;\n tabColor: string;\n usedRange: string | null;\n selection: string;\n freezePanes: { rows: number; cols: number };\n gridlinesVisible: boolean;\n zoom: number;\n }\n\n export interface DataValidationRule {\n /** 적용 범위(A1 문자열). 다중(비연속) 영역은 콤마로 이어붙인 단일 문자열 */\n ranges: string;\n /** any/list/whole/decimal/date/time/textLength/custom */\n type: string;\n /** 주 값/참조/수식(any 타입은 없음) */\n formula1?: string | number;\n /** 비교 연산자(숫자·날짜·시간·길이 타입만) */\n operator?: string;\n /** between/notBetween 의 두 번째 경계 */\n formula2?: string | number;\n /** 빈 셀 허용 */\n allowBlank: boolean;\n /** list 드롭다운 표시(list 만) */\n showDropDown?: boolean;\n /** 셀 선택 시 안내 메시지 표시 */\n showInputMessage: boolean;\n /** 안내 메시지 제목 */\n inputTitle?: string;\n /** 안내 메시지 본문 */\n inputMessage?: string;\n /** 위반 시 오류 메시지 표시 */\n showErrorMessage: boolean;\n /** 오류 스타일 stop/warning/information */\n errorStyle: string;\n /** 오류 메시지 제목 */\n errorTitle?: string;\n /** 오류 메시지 본문 */\n errorMessage?: string;\n }\n\n export interface HyperlinkInfo {\n range: string;\n type: \"web\" | \"email\" | \"book\" | \"document\" | \"file\" | \"\";\n location: string;\n display: string;\n }\n\n export interface BorderLine {\n /** 선 스타일 — BorderLineStyle 어휘 */\n style: string;\n /** 선 색 \"#RRGGBB\". 색을 지정하지 않은 테두리는 비어 있다 */\n color?: string;\n }\n\n export interface BorderDiagonal {\n /** 선 스타일 — BorderLineStyle 어휘 */\n style: string;\n /** 선 색 \"#RRGGBB\" */\n color?: string;\n /** 대각선 방향. setBorder 의 type 으로 그대로 넘길 수 있다 */\n direction: \"diagonal_up\" | \"diagonal_down\" | \"diagonal_cross\";\n }\n\n export interface BorderInfo {\n /** 테두리가 없으면 null */\n top: BorderLine | null;\n bottom: BorderLine | null;\n left: BorderLine | null;\n right: BorderLine | null;\n diagonal: BorderDiagonal | null;\n }\n\n export interface FillPattern {\n /** 무늬 종류 — \"lightGrid\", \"darkVertical\" 등 */\n type: string;\n /** 무늬선 색 \"#RRGGBB\" */\n color?: string;\n }\n\n export interface FillInfo {\n type: \"solid\" | \"pattern\" | \"gradient\";\n /** 바탕색 \"#RRGGBB\". 그라디언트와 바탕색이 지정되지 않은 채우기에서는 비어 있다 */\n backgroundColor?: string;\n /** 바탕색 위에 겹쳐 그리는 무늬. 무늬 채우기에만 오며 조회 전용이다 */\n pattern?: FillPattern;\n }\n\n export interface TableOptions {\n headerRow: boolean;\n totalsRow: boolean;\n firstColumn: boolean;\n lastColumn: boolean;\n bandedRows: boolean;\n bandedColumns: boolean;\n style: string;\n }\n\n export interface TableInfo {\n name: string;\n sheet: string;\n range: string;\n headerRow: boolean;\n totalsRow: boolean;\n firstColumn: boolean;\n lastColumn: boolean;\n bandedRows: boolean;\n bandedColumns: boolean;\n style: string;\n }\n\n export interface FilterInfo {\n /** 필터 존재 여부. false 면 이 필드만 존재한다. */\n enabled: boolean;\n /** A1 문자열 (예: \"A1:D20\"). 필터가 있을 때만 포함. */\n range?: string;\n /** 필터가 있을 때만 포함. colId 는 필터 범위 첫 열부터의 0-based 오프셋 — applyFilter/clearFilter/sort 입력과 동일 좌표계. */\n columns?: { colId: number; filterType: string; criteria: Record<string, unknown> }[];\n /** filterHidden 기준 숨김 행 수 (rowHidden 과 별개). 필터가 있을 때만 포함. */\n hiddenRowCount?: number;\n /** 정렬 상태(sortState). 필터가 있을 때만 포함하며 정렬된 적 없으면 null. colId 는 필터 범위 첫 열부터의 0-based 오프셋(sort() 입력 colId 와 왕복 대칭), order 는 \"asc\"|\"desc\". 단일 키(1차 스코프) — 다중 정렬 키 문서는 첫 조건만 노출한다. */\n sort?: { colId: number; order: string } | null;\n }\n\n // =============================================================================\n // Classes\n // =============================================================================\n\n export interface Workbook {\n /**\n * 전체 시트 목록을 배열로 반환한다. 배열 순서가 시트 인덱스이다.\n * 시트별 상세 속성(hidden/tabColor/usedRange 등)은 ApiWorksheet.getSheetInfo() 로 조회한다.\n */\n getSheetList(): Promise<{ name: string; active: boolean }[]>;\n /**\n * 시트 핸들을 반환한다. 인덱스(0-based) 또는 시트 이름으로 지정하며, 생략하면 현재 활성 시트를 대상으로 한다.\n * 없는 이름이면 SHEET_NOT_FOUND, 범위 밖 인덱스거나 숫자·문자열이 아니면 INVALID_ARGUMENT 를 throw 한다.\n */\n getWorksheet(sheet?: number | string): Promise<Worksheet>;\n /**\n * oid(전역 유일 키)로 객체 핸들을 반환한다. 시트를 몰라도 전역 역산으로 찾는다.\n * 현재는 차트만 핸들(ApiChart)을 제공하며, 차트가 아니거나 부재하면 null 을 반환한다.\n * (향후 다른 객체 타입 핸들의 공통 진입점)\n */\n getObjectById(oid: string): Promise<Chart>;\n /**\n * 이름으로 테이블 핸들을 반환한다. 워크북 전체에서 이름은 unique 하다. 없으면 null.\n * 조회는 대소문자를 무시하고, 핸들에는 표의 정본 이름을 담는다.\n */\n getTable(name: string): Promise<Table>;\n /**\n * 정의된 이름 핸들. sheet 생략 시 전역(localSheetId=-1), 지정 시 그 시트 로컬. 없으면 null.\n *\n * @param sheet - 시트 로컬 스코프면 시트 이름/인덱스 (생략 시 전역)\n */\n getDefinedName(name: string, sheet?: number | string): Promise<Name>;\n /**\n * 정의된 이름 생성. sheet 생략 시 전역, 지정 시 그 시트 로컬.\n *\n * @param sheet - 시트 로컬 스코프면 시트 이름/인덱스 (생략 시 전역)\n */\n addDefinedName(name: string, formula: string, sheet?: number | string): Promise<Name>;\n /**\n * 정의된 이름 요약 목록(내장 제외). sheet 생략 시 전역, 지정 시 그 시트 로컬.\n *\n * @param sheet - 시트 로컬 스코프면 시트 이름/인덱스 (생략 시 전역)\n */\n getDefinedNameList(sheet?: number | string): Promise<{ name: string; sheet: string | null; formula: string }[]>;\n /**\n * 새 시트를 추가한다.\n */\n addSheet(name: string): Promise<{ sheetIndex: number; sheetName: string }>;\n /**\n * 시트를 삭제한다.\n */\n removeSheet(sheet: number | string): Promise<void>;\n /**\n * 시트를 복사한다. 복사된 시트는 원본 시트 바로 뒤에 추가된다.\n */\n copySheet(sheet: number | string): Promise<{ sheetIndex: number; sheetName: string }>;\n /**\n * 시트 위치를 이동한다.\n *\n * @param to - 0 ~ (시트 갯수 - 1) 사이의 정수\n */\n moveSheet(from: number | string, to: number): Promise<void>;\n /**\n * 활성 시트를 변경한다.\n */\n setActiveSheet(sheet: number | string): Promise<void>;\n /**\n * 워크북 문서 속성을 반환한다.\n * creator 는 원본 문서 작성자로, 값이 없는 문서(신규 웹 생성 문서 등)에서는 undefined 일 수 있다.\n */\n getDocumentProperties(): Promise<{ application: string; creator: string | undefined; created: any; lastModified: any; fileType: any; locale: string }>;\n }\n\n export interface Worksheet {\n getName(): Promise<string>;\n isHidden(): Promise<boolean>;\n /**\n * 시트 탭 색상을 \"#RRGGBB\" 형태로 반환한다. 색이 지정되지 않았으면 \"\".\n */\n getTabColor(): Promise<string>;\n /**\n * 현재 선택 영역을 반환한다.\n */\n getSelection(): Promise<Range>;\n /**\n * 데이터(값 또는 셀 서식)가 존재하는 사용 범위를 반환한다. 데이터가 없으면 null.\n */\n getUsedRange(): Promise<Range>;\n /**\n * 이 시트의 모든 병합 셀 목록을 A1 범위 문자열 배열로 반환한다.\n * 핸들이 아니라 요약 배열을 반환하며(List 접미사 컨벤션), 병합이 없으면 빈 배열.\n * 범위와 교차하는 병합만 조회하려면 Range.getMergeCellList() 를 사용한다.\n */\n getMergeCellList(): Promise<string[]>;\n /**\n * 이 시트의 전체 하이퍼링크 목록을 반환한다.\n */\n getHyperlinkList(): Promise<HyperlinkInfo[]>;\n /**\n * 틀 고정 정보를 반환한다.\n *\n * @returns rows=고정 행 수, cols=고정 열 수 (0이면 고정 없음)\n */\n getFreezePanes(): Promise<{ rows: number; cols: number }>;\n /**\n * 눈금선 표시 여부를 반환한다.\n */\n getGridlinesVisible(): Promise<boolean>;\n /**\n * 줌 배율을 반환한다. 분수 스케일(1=100%)로 반환한다. (퍼센트 변환 없음)\n */\n getZoom(): Promise<number>;\n /**\n * 시트 정보를 한 번에 반환한다. (통합 읽기)\n * usedRange/selection 은 A1 범위 문자열이며, usedRange 는 데이터가 없는 빈 시트에서 null 이다.\n */\n getSheetInfo(): Promise<SheetInfo>;\n /**\n * 시트 이름을 변경한다.\n */\n setName(name: string): Promise<void>;\n /**\n * 시트의 표시/숨김을 설정한다. hidden 이 null/undefined 면 아무 동작도 하지 않는다.\n *\n * @param hidden - true=숨김, false=표시\n */\n setHidden(hidden: boolean): Promise<void>;\n /**\n * 시트 탭 색상을 설정한다.\n */\n setTabColor(color: string): Promise<void>;\n /**\n * 선택 영역을 설정한다. 대상 시트가 활성 시트가 아니면 먼저 활성화된다.\n *\n * @param range - A1 표기 문자열(\"A1:B2\", 단일 셀은 \"E10\") 또는 0-based 좌표 객체(단일 셀은 row2/col2 생략 가능)\n * @returns 적용 후 위치 — sheet=시트 이름, selection=A1 표기 문자열\n */\n setSelection(range: string | { row1: number; col1: number; row2?: number; col2?: number }): Promise<{ sheet: string; selection: string }>;\n /**\n * 지정 범위로 이동(goto)한다. 선택 영역을 설정하고 대상 셀이 보이도록 화면을 스크롤한다.\n * 대상 시트가 활성 시트가 아니면 먼저 활성화된다.\n * setSelection 이 선택만 바꾸는 것과 달리, 이름상자/이동 다이얼로그와 동일한 이동 동작이다.\n *\n * @param range - A1 표기 문자열(\"A1:B2\", 단일 셀은 \"E10\") 또는 0-based 좌표 객체(단일 셀은 row2/col2 생략 가능)\n * @returns 이동 후 위치 — sheet=시트 이름, selection=A1 표기 문자열\n */\n goto(range: string | { row1: number; col1: number; row2?: number; col2?: number }): Promise<{ sheet: string; selection: string }>;\n /**\n * 틀 고정을 설정한다.\n *\n * @param rows - 고정할 상단 행 수 (0이면 행 고정 해제)\n * @param cols - 고정할 좌측 열 수 (0이면 열 고정 해제)\n */\n setFreezePanes(rows: number, cols: number): Promise<void>;\n /**\n * 눈금선 표시 여부를 설정한다.\n */\n setGridlinesVisible(visible: boolean): Promise<void>;\n /**\n * 줌 배율을 설정한다. 분수 스케일(1=100%)로 지정한다.\n * ZOOM_MIN(0.5)~ZOOM_MAX(1.5) 범위를 벗어나면 ZOOM_OUT_OF_RANGE 를 throw 한다. (clamp 아님)\n */\n setZoom(zoomFactor: number): Promise<void>;\n /**\n * 이 시트의 Range 핸들을 반환한다.\n *\n * @param range - A1 표기 문자열(\"A1:B2\", 단일 셀은 \"E10\") 또는 0-based 좌표 객체(단일 셀은 row2/col2 생략 가능)\n */\n getRange(range: string | { row1: number; col1: number; row2?: number; col2?: number }): Promise<Range>;\n /**\n * 이 시트에 차트를 추가하고 ApiChart 핸들을 반환한다.\n * 영역 인자는 진입부에서 0-based 좌표로 정규화하며, command 이하로는 좌표만 전달한다.\n *\n * @param chartType - 차트 종류 enum 값(= enum 문자열, 예: \"clustered_column\"). 미정의/미지원이면 CHART_TYPE_UNSUPPORTED throw.\n * @param dataRange - 데이터 범위(A1 표기 문자열 또는 0-based 좌표 객체)\n * @param opts - 추가 옵션\n * @param opts.seriesBy - 시리즈 방향. rows=행이 시리즈, columns=열이 시리즈, auto(기본)=데이터 모양에 따라 자동. 분산형/거품형은 rows/columns 미지원(CHART_SWITCH_UNSUPPORTED)\n */\n addChart(chartType: ChartType, dataRange: string | { row1: number; col1: number; row2?: number; col2?: number }, opts?: { seriesBy?: \"auto\" | \"rows\" | \"columns\" }): Promise<Chart>;\n /**\n * 이 시트에서 oid 로 차트 핸들을 반환한다. 이 시트에 없으면(다른 시트이거나 부재) CHART_NOT_FOUND 를 throw 한다.\n */\n getChart(oid: string): Promise<Chart>;\n /**\n * 이 시트의 모든 차트 요약을 배열로 반환한다.\n * 핸들이 아니라 요약 객체를 반환하므로(getSheetList 와 동일 컨벤션 — 요약 반환은 List 접미사),\n * 핸들이 필요하면 요약의 oid 로 getChart(oid) 를 호출해 복원한다.\n */\n getChartList(): Promise<{ oid: string; type: string; range: string | null; title: string }[]>;\n /**\n * 이 시트에 테이블을 추가하고 ApiTable 핸들을 반환한다.\n * 영역 인자는 진입부에서 0-based 좌표로 정규화하며, command 이하로는 좌표만 전달한다.\n *\n * @param dataRange - 데이터 범위(A1 표기 문자열 또는 0-based 좌표 객체)\n * @param hasHeaders - 첫 행을 머리글로 사용할지 여부 (기본값: true)\n */\n addTable(dataRange: string | { row1: number; col1: number; row2?: number; col2?: number }, hasHeaders?: boolean): Promise<Table>;\n /**\n * 이 시트의 모든 테이블 요약을 배열로 반환한다.\n * 핸들이 아니라 요약 객체를 반환하므로(List 접미사 컨벤션),\n * 핸들이 필요하면 요약의 name 으로 Workbook.getTable(name) 을 호출해 복원한다.\n *\n * @returns 요약 스키마는 ApiTable.getInfo() 의 TableInfo 와 동일\n */\n getTableList(): Promise<TableInfo[]>;\n /**\n * 이 시트의 자동 필터 핸들을 반환한다. 필터 유무와 무관하게 항상 핸들을 반환한다(null 아님).\n * 필터 생성/존재 조회는 핸들에서 수행한다(create() / getInfo().enabled).\n */\n getFilter(): Promise<Filter>;\n /**\n * 이 시트의 조건부 서식 규칙 요약을 배열로 반환한다(핸들 아님 — priority 키 요약).\n * 내부 모델 ruleInfo 전체 대신, 규칙을 추가할 때(add_conditional_format) 지정하는 것과 동일한\n * 정규화 rule 형태(rule_type + 타입별 필드)만 `rule` 에 담는다(conditionalFormat.spec.md §4 스키마).\n * priority/ranges/stopIfTrue 는 규칙 식별·일괄편집(update)용 메타로 함께 반환한다. 강조 서식(style)은\n * 규칙과 분리된 dxf 참조라 이 조회에는 포함하지 않는다.\n * ranges 는 다중(비연속) 영역도 콤마로 이어붙인 단일 A1 문자열이라 update 의 set_ranges[].ranges 에\n * 그대로 되돌려 넣을 수 있다(콤마 = A1 참조 문법의 다중 영역 연산자).\n */\n getConditionalFormatList(): Promise<{ priority: number; stopIfTrue: boolean; ranges: string; rule: Record<string, unknown> }[]>;\n /**\n * 이 시트의 데이터 유효성 규칙 요약을 반환한다(핸들 아님 — list-only). 각 항목에 적용 ranges(A1) 포함.\n */\n getDataValidationList(): Promise<DataValidationRule[]>;\n /**\n * 이 시트의 모든 셀 메모를 요약 배열로 반환한다(핸들 아님 — list-only). 메모가 없으면 빈 배열.\n * cell=앵커 셀(A1), text=본문(plain text), visible=표시 여부(true=항상 표시 / false=hover 시 표시).\n */\n getCommentList(): Promise<{ cell: string; text: string; visible: boolean }[]>;\n /**\n * 조건부 서식 규칙을 일괄 편집한다(삭제 / 적용영역 변경 / 우선순위 단건 move — 단일 트랜잭션, all-or-nothing).\n * 규칙 내용(operator/formula/type 등) 편집은 UI(규칙 관리자)에도 없는 기능이라 미지원 — 내용 변경은 삭제 후 재추가로 처리한다.\n *\n * @param descriptor - deletes: {number[]} 삭제할 규칙 priority 목록 - set_ranges: {{priority:number, ranges:string|{row1,col1,row2?,col2?}[]}[]} 규칙별 적용영역 변경. 규칙 하나가 다중(비연속) 영역을 가질 수 있어 ranges 는 목록이다 — 콤마 구분 A1 문자열 (\"A1:B2,D4:E5\") 또는 좌표 객체 배열 ([{row1, col1, row2, col2}, ...]). 문자열 배열은 콤마 문자열과 중복이라 받지 않고, 빈 목록도 받지 않는다(영역 제거는 deletes 소관) - move_priority: {{priority:number, to:number}} 우선순위 단건 move (호출당 1건) — 대상 규칙을 목표 위치로 옮기고 사이 규칙은 한 칸씩 shift(Excel/Sheets 동일). 닫힌 순열 전개는 command 가 수행(UI 규칙 관리자의 setPriorities 닫힌 순열 경로는 별도 유지)\n */\n updateConditionalFormatRules(descriptor: Record<string, unknown>): Promise<void>;\n }\n\n export interface Range {\n /**\n * 범위가 셀 하나인지 반환한다. 행/열 전체 범위(A:A, 5:5 — -1 마커·0~MAX 표현 모두)는\n * 크기와 무관하게 false 다.\n */\n isSingleCell(): Promise<boolean>;\n /**\n * 범위 좌상단 셀의 값을 모델 원본 그대로 반환한다. 날짜는 시리얼 숫자, 수식 에러는 \"#REF!\" 같은 문자열이다.\n *\n * @returns 값이 없으면 undefined\n */\n getValue(): Promise<any>;\n /**\n * 범위 전체의 값을 행 우선 2차원 배열로 반환한다. 바깥 배열이 행, 안쪽 배열이 열이며 범위 크기와\n * 같다 — 빈 셀도 자리를 차지한다.\n *\n * @returns 시트에 데이터가 전혀 없을 때만 빈 배열\n */\n getValues(): Promise<any[][]>;\n /**\n * 범위 좌상단 셀의 수식 문자열을 반환한다. 수식이 아닌 셀(상수·빈 셀)이면 undefined 다.\n */\n getFormula(): Promise<string | undefined>;\n /**\n * 범위 좌상단 셀의 화면 표시 문자열을 반환한다. 표시 서식(숫자 서식)이 적용된 결과라 원본 값과 다를 수 있다.\n *\n * @returns 셀이 비어 있으면 빈 문자열\n */\n getDisplayValue(): Promise<string>;\n /**\n * 범위 내 모든 셀의 수식을 2차원 배열로 반환한다.\n * 수식이 없는 셀은 null.\n */\n getFormulas(): Promise<(string | null)[][]>;\n /**\n * 범위 내 모든 셀의 서식 적용된 표시값을 2차원 배열로 반환한다.\n */\n getDisplayValues(): Promise<string[][]>;\n /**\n * 단일 셀의 value, displayValue, formula를 한 번에 반환한다.\n */\n getCellContent(): Promise<{ value: any; displayValue: string; formula: string | null }>;\n /**\n * 범위 내 모든 셀의 { value, displayValue, formula } 객체를 2차원 배열로 반환한다.\n */\n getCellContents(): Promise<{ value: any; displayValue: string; formula: string | null }[][]>;\n /**\n * 범위 첫 행의 높이(px)를 반환한다. 숨긴 행도 숨기기 전 높이를 반환한다.\n */\n getRowHeight(): Promise<number>;\n /**\n * 범위 첫 열의 너비(px)를 반환한다. 숨긴 열도 숨기기 전 너비를 반환한다.\n */\n getColumnWidth(): Promise<number>;\n /**\n * 범위에 걸친 행의 높이(px)를 설정한다. 0 이하를 주면 높이 변경이 아니라 행 숨김으로 동작한다.\n */\n setRowHeight(height: number): Promise<void>;\n /**\n * 범위에 걸친 열의 너비(px)를 설정한다. 0 이하를 주면 너비 변경이 아니라 열 숨김으로 동작한다.\n */\n setColumnWidth(width: number): Promise<void>;\n /**\n * 범위의 행 높이를 셀 내용에 맞춰 자동으로 조정한다.\n */\n autofitRows(): Promise<void>;\n /**\n * 범위의 열 너비를 셀 내용에 맞춰 자동으로 조정한다.\n */\n autofitColumns(): Promise<void>;\n /**\n * 범위의 첫 행 위치에 행을 삽입한다.\n *\n * @param count - 삽입할 행 수. 미지정 시 range 의 행 높이만큼 삽입.\n */\n insertRow(count?: number): Promise<void>;\n /**\n * 범위에 해당하는 행을 삭제한다.\n */\n deleteRow(): Promise<void>;\n /**\n * 범위의 첫 열 위치에 열을 삽입한다.\n *\n * @param count - 삽입할 열 수. 미지정 시 range 의 열 폭만큼 삽입.\n */\n insertColumn(count?: number): Promise<void>;\n /**\n * 범위에 해당하는 열을 삭제한다.\n */\n deleteColumn(): Promise<void>;\n /**\n * 범위가 걸친 행의 표시 여부를 설정한다.\n *\n * @param visible - true=표시, false=숨김\n */\n setRowVisible(visible: boolean): Promise<void>;\n /**\n * 범위가 걸친 열의 표시 여부를 설정한다.\n *\n * @param visible - true=표시, false=숨김\n */\n setColumnVisible(visible: boolean): Promise<void>;\n /**\n * 범위의 첫 행 표시 여부를 반환한다.\n *\n * @returns true=표시, false=숨김\n */\n getRowVisible(): Promise<boolean>;\n /**\n * 범위의 첫 열 표시 여부를 반환한다.\n *\n * @returns true=표시, false=숨김\n */\n getColumnVisible(): Promise<boolean>;\n /**\n * 범위 내 모든 셀에 동일한 값을 설정한다.\n * 수식(=로 시작)은 자동으로 감지/파싱된다.\n *\n * 배열수식(\"{=...}\")도 자동 감지되어 범위 전체가 하나의 배열수식 영역으로\n * 입력된다(Excel ctrl+shift+enter 와 동일 의미론). 이때 Command 검증 실패 시\n * OperationErrorCode 를 message 로 하는 Error 가 throw 된다:\n * 테이블 교차(ARRAY_FORMULA_TABLE), 병합 셀 포함(ARRAY_FORMULA_MERGED_CELL),\n * 기존 배열수식 영역과 부분 교차(ARRAY_FORMULA_EDIT), 피벗 영역(PIVOT_TABLE_EDIT).\n * 단일 셀이 기존 배열수식 영역 내부이면 영역 전체 재입력으로 확장된다.\n *\n * @param value - 설정할 값\n */\n setValue(value: any): Promise<void>;\n /**\n * 2차원 배열로 범위에 각 셀마다 다른 값을 설정한다.\n * values의 행/열 크기가 범위와 일치해야 한다.\n *\n * 2D 배열을 이 범위의 원점(row1,col1) 기준 절대좌표 insertions 리스트로 펼쳐\n * SET_VALUES Command 를 1회 호출한다. 전체가 단일 OT/undo 단위로 묶인다.\n *\n * 배열수식(\"{=...}\")은 허용하지 않는다 — 배열수식은 영역 전체에 단일 수식을\n * 입력하는 의미론(ARRAY_FORMULA_INSERTION)이라 셀별 개별값 입력과 양립할 수\n * 없다. 섞여 있으면 Error 를 throw 한다(리터럴 텍스트로 조용히 들어가는 것 방지).\n * 배열수식 입력은 setValue 를 사용한다.\n *\n * @param values - 2차원 배열\n */\n setValues(values: any[][]): Promise<void>;\n /**\n * 범위 내 모든 셀의 값을 삭제한다. (서식은 유지)\n */\n deleteValue(): Promise<void>;\n /**\n * 범위 전체에 굵게를 적용하거나 해제한다.\n */\n setFontBold(isOn: boolean): Promise<void>;\n /**\n * 범위 전체에 기울임을 적용하거나 해제한다.\n */\n setFontItalic(isOn: boolean): Promise<void>;\n /**\n * 범위 전체에 밑줄을 적용하거나 해제한다.\n *\n * @param isOn - 밑줄 적용 여부. false 이면 isDouble 인자는 무시된다.\n * @param isDouble - 이중 밑줄 여부 (기본값: false)\n */\n setFontUnderline(isOn: boolean, isDouble?: boolean): Promise<void>;\n /**\n * 범위 전체에 취소선을 적용하거나 해제한다.\n */\n setFontStrikethrough(isOn: boolean): Promise<void>;\n /**\n * 범위 좌상단 셀이 굵게인지 반환한다. 범위가 여러 셀이어도 좌상단만 읽으므로 범위 안에서 서식이 섞여 있어도 알 수 없다.\n * 서식 미지정 셀은 기본 스타일 값을 따른다.\n */\n isFontBold(): Promise<boolean | undefined>;\n /**\n * 범위 좌상단 셀이 기울임인지 반환한다. 서식 미지정 셀은 기본 스타일 값을 따른다.\n */\n isFontItalic(): Promise<boolean | undefined>;\n /**\n * @returns 밑줄 종류 (\"single\", \"double\", \"none\" 등)\n */\n getFontUnderline(): Promise<string | undefined>;\n /**\n * 범위 좌상단 셀에 취소선이 있는지 반환한다. 서식 미지정 셀은 기본 스타일 값을 따른다.\n */\n isFontStrikethrough(): Promise<boolean | undefined>;\n /**\n * 범위 전체의 글꼴을 바꾼다.\n *\n * @param name - 글꼴 이름\n */\n setFontName(name: string): Promise<void>;\n /**\n * 범위 전체의 글꼴 크기를 바꾼다.\n *\n * @param size - 글꼴 크기(pt)\n */\n setFontSize(size: number | string): Promise<void>;\n /**\n * 범위 전체의 글꼴 색을 바꾼다.\n *\n * @param color - #RRGGBB 형식\n */\n setFontColor(color: string): Promise<void>;\n /**\n * 범위 좌상단 셀의 글꼴 이름을 반환한다. 서식 미지정 셀은 기본 스타일 값을 따른다.\n */\n getFontName(): Promise<string | undefined>;\n /**\n * 범위 좌상단 셀의 글꼴 크기(pt)를 반환한다. 서식 미지정 셀은 기본 스타일 값을 따른다.\n */\n getFontSize(): Promise<number | undefined>;\n /**\n * 범위 좌상단 셀의 글꼴 색을 \"#RRGGBB\" 형식으로 반환한다. 서식 미지정 셀은 기본 스타일 값을 따른다.\n */\n getFontColor(): Promise<string | undefined>;\n /**\n * @returns { bold, italic, underline, strikethrough, name, size, color }\n */\n getFont(): Promise<Record<string, unknown> | undefined>;\n /**\n * 범위 전체의 배경색을 바꾼다.\n *\n * @param color - #RRGGBB 형식. null/undefined/빈 문자열이면 배경 제거.\n */\n setBackgroundColor(color?: string): Promise<void>;\n /**\n * 범위 전체의 가로 정렬을 설정한다. 목록 밖의 값도 검증 없이 저장된다 — 모델이 아는 값\n * (`centerContinuous`·`center-across`)은 가운데로, 모르는 값은 데이터 종류와 무관하게 왼쪽으로 그려진다.\n */\n setHorizontalAlign(value: HorizontalAlign): Promise<void>;\n /**\n * 범위 전체의 세로 정렬을 설정한다. 목록 밖의 값도 검증 없이 저장된다 — 모델이 아는 값\n * (`distributed`)은 가운데로, 모르는 값은 아래로 그려진다.\n */\n setVerticalAlign(value: VerticalAlign): Promise<void>;\n /**\n * 범위 전체에 텍스트 줄바꿈을 적용하거나 해제한다.\n */\n setWrapText(isOn: boolean): Promise<void>;\n /**\n * 범위 좌상단 셀의 바탕색을 \"#RRGGBB\" 형식으로 반환한다. 배경이 없으면 undefined 다.\n * 채우기 종류까지 알아야 하면 getFill 을 쓴다.\n */\n getBackgroundColor(): Promise<string | undefined>;\n /**\n * 범위 좌상단 셀의 가로 정렬을 반환한다. 명시 지정된 값만 반환하고, 기본 정렬 상태면 undefined 다.\n * 값 어휘는 HorizontalAlign 이지만, 가져온 문서에는 목록 밖 값(fill·centerContinuous 등)이 있을 수 있다.\n */\n getHorizontalAlign(): Promise<string | undefined>;\n /**\n * 범위 좌상단 셀의 세로 정렬을 반환한다. 명시 지정된 값만 반환하고, 기본 정렬 상태면 undefined 다.\n * 값 어휘는 VerticalAlign 이지만, 가져온 문서에는 목록 밖 값이 있을 수 있다.\n */\n getVerticalAlign(): Promise<string | undefined>;\n /**\n * 범위 좌상단 셀에 텍스트 줄바꿈이 적용되어 있는지 반환한다. 서식 미지정 셀은 기본 스타일 값을 따른다.\n */\n isWrapText(): Promise<boolean | undefined>;\n /**\n * 범위 좌상단 셀의 채우기 상태를 반환한다. 배경이 없으면 undefined 다.\n */\n getFill(): Promise<FillInfo | undefined>;\n /**\n * @returns { horizontalAlign, verticalAlign, wrapText, indent }\n */\n getAlignment(): Promise<Record<string, unknown> | undefined>;\n /**\n * 범위의 들여쓰기 수준을 1 증가시킨다.\n */\n increaseIndent(): Promise<void>;\n /**\n * 범위의 들여쓰기 수준을 1 감소시킨다.\n */\n decreaseIndent(): Promise<void>;\n /**\n * 범위 좌상단 셀의 들여쓰기 수준을 반환한다. 들여쓰기가 지정되어 있지 않으면 0 이다(다른 서식 조회와 달리 undefined 가 아니다).\n */\n getIndent(): Promise<number>;\n /**\n * 테두리 서식을 설정한다.\n * type 이 \"none\" 이면 테두리를 제거하며, style/color 는 무시된다.\n *\n * @param type - 테두리를 적용할 위치\n * @param lineStyle - 선 스타일 (기본값: \"thin\")\n * @param color - #RRGGBB 형식 색상 (기본값: \"#000000\")\n */\n setBorder(type: BorderType, lineStyle?: BorderLineStyle, color?: string): Promise<void>;\n /**\n * 범위 좌상단 셀의 테두리 상태를 변별로 반환한다. 테두리가 없는 변은 null 이다.\n *\n * setBorder 는 범위 단위 명령(all·rectangle·cross 등)을 받지만 모델에는 셀별 네 변으로 분해되어\n * 저장되므로, 조회는 그 명령을 되돌려 주지 못하고 변별 상태만 준다.\n */\n getBorder(): Promise<BorderInfo | undefined>;\n /**\n * 범위의 셀 서식(글꼴/채우기/정렬/테두리/표시형식/병합 등)을 제거한다. 값은 유지된다.\n * 행/열 전체 범위가 병합 셀과 교차하면 OVERLAPPING_MERGE 를 throw 한다.\n * 대용량 범위는 confirm 없이 즉시 실행되며, 기준 초과 시 undo buffer 가 비워진다(UI 경로와 동일 규칙).\n */\n clearFormat(): Promise<void>;\n /**\n * 범위의 모든 내용을 지운다 — 값/수식/하이퍼링크/서식/병합/메모/데이터 유효성/스파크라인/필터/표.\n * 전체가 단일 undo 단위로 처리된다.\n * 피벗 교차(PIVOT_TABLE_EDIT), 배열수식 일부 포함(ARRAY_FORMULA_EDIT),\n * 행/열 전체 범위 + 병합 교차(OVERLAPPING_MERGE) 시 throw 한다.\n */\n clearAll(): Promise<void>;\n /**\n * 범위 내 셀을 하나로 병합한다.\n * 단일 셀이면 무시. 범위 내 여러 값이 있으면 좌상단 셀 값을 유지한다.\n */\n merge(): Promise<void>;\n /**\n * 범위 내 병합된 셀을 모두 해제한다.\n */\n unmerge(): Promise<void>;\n /**\n * 이 범위와 교차(intersect)하는 병합 셀 목록을 A1 범위 문자열 배열로 반환한다. (순수 조회)\n * 부분 교차라도 병합 영역 전체 주소를 반환하며(범위로 잘라내지 않음 — Office.js getMergedAreas 관례),\n * 범위에 온전히 포함되거나 범위를 포함하는 병합도 모두 포함한다. 교차하는 병합이 없으면 빈 배열.\n * 시트 전체 병합 목록은 Worksheet.getMergeCellList() 를 사용한다.\n */\n getMergeCellList(): Promise<string[]>;\n /**\n * format code 문자열을 직접 지정해 표시 형식을 설정한다. (예: \"#,##0.00\", \"yyyy-mm-dd\", \"0.00%\")\n * 다이얼로그 custom 경로와 동일하게 사용자정의(164) grain 으로 모델에 반영된다.\n *\n * @param formatCode - 엑셀 호환 형식 코드\n */\n setNumberFormat(formatCode: string): Promise<void>;\n /**\n * 좌상단 셀의 표시 형식 정보를 반환한다.\n *\n * @returns { formatCode }\n */\n getNumberFormat(): Promise<Record<string, unknown> | undefined>;\n /**\n * 이 범위에 조건부 서식 규칙을 추가한다.\n * rule 은 정규화 규칙 객체(§4 스키마) — rule_type 은 ConditionalFormatRuleType, cellIs 의 operator 는\n * ConditionalFormatOperator, timePeriod 의 time_period 는 ConditionalFormatTimePeriod,\n * 시각 규칙의 cfvo[].type 은 ConditionalFormatValueType 어휘다.\n * 수식 계열 규칙의 강조 서식은 style(직접 지정, §4.13)로 지정한다(생략 시 기본 강조).\n * colorScale 은 colors(ARGB 2~3개)로, dataBar/iconSet 은 프리셋(data_bar/icon_set)으로 지정한다.\n * 예: { rule_type:\"cellIs\", operator:\"lessThan\", formula1:\"0\",\n * style:{ font:{bold:true, color:\"#9C0006\"}, fill:{color:\"#FFC7CE\"}, border:{style:\"thin\", color:\"#9C0006\"} } }\n *\n * @param rule - 정규화 규칙 객체\n */\n addConditionalFormat(rule: Record<string, unknown>): Promise<void>;\n /**\n * 이 범위에 걸친 조건부 서식 규칙을 제거한다(겹치는 규칙의 영역 축소 또는 삭제).\n */\n clearConditionalFormats(): Promise<void>;\n /**\n * 이 범위에 데이터 유효성 검사 규칙을 적용/교체한다(셀당 1규칙, 겹치면 교차분 정리 후 교체).\n * rule 은 공개 규칙 값객체 — type(DataValidationType) + 타입별 formula 와 operator(DataValidationOperator)\n * + 메시지·옵션(errorStyle 는 DataValidationErrorStyle).\n */\n setDataValidation(rule: Record<string, unknown>): Promise<void>;\n /**\n * 이 범위와 겹치는 데이터 유효성 규칙을 제거한다(교차 영역만; 규칙의 나머지 영역은 유지, 겹침 없으면 no-op).\n */\n clearDataValidation(): Promise<void>;\n /**\n * 범위를 지정 열 기준으로 정렬한다.\n * 대상이 필터/테이블 영역의 단일 셀이면 필터 정렬(sortState 저장)로 자동 위임되고,\n * 그 외에는 1회성 무상태 범위 정렬로 동작한다. 헤더는 자동 감지된다(옵션 아님).\n * 배열수식 포함(ARRAY_FORMULA_EDIT), 피벗 영역(PIVOT_TABLE_EDIT),\n * 빈/무효 범위(SORT_RANGE_INVALID), 불일치 병합 셀 포함(SORT_MERGE_MISMATCH),\n * 20만 행 초과(SORT_RANGE_TOO_LARGE) 시 throw 한다.\n *\n * @param key - 정렬 기준 열 — 이 범위의 첫 열부터의 0-based 오프셋 (0=첫 열, Excel JS SortField.key 와 동일 의미). 정수가 아니거나 범위 너비를 벗어나면 INVALID_SORT_FIELD.\n * @param order - 정렬 방향\n * @param options - 1차 미지원 예약(matchCase/hasHeaders/orientation 등). 값이 오면 INVALID_SORT_OPTION.\n */\n sort(key: number, order: SortOrder, options?: Record<string, unknown>): Promise<void>;\n /**\n * 이 셀(범위 좌상단)에 메모를 설정한다 — 없으면 생성, 있으면 본문만 교체(표시/위치 상태 보존).\n *\n * @param text - 메모 본문(plain text). 여러 줄은 \"\\n\"\n */\n setComment(text: string): Promise<void>;\n /**\n * 이 범위 내 모든 셀 메모를 삭제한다(겹치는 메모가 없으면 no-op).\n */\n deleteComment(): Promise<void>;\n /**\n * 이 셀(범위 좌상단) 메모의 표시/숨김을 설정한다. 메모가 없으면 COMMENT_NOT_FOUND.\n *\n * @param visible - true=항상 표시 / false=hover 시 표시\n */\n setCommentVisible(visible: boolean): Promise<void>;\n /**\n * 이 범위와 교차(부분적으로만 겹쳐도 포함)하는 하이퍼링크 목록을 반환한다.\n */\n getHyperlinkList(): Promise<HyperlinkInfo[]>;\n /**\n * 이 범위에 하이퍼링크를 설정한다.\n * 범위가 다중 셀이면 링크·서식(파란색+밑줄)은 범위 전체에 적용되지만,\n * 표시 텍스트는 좌상단에만 적용된다. (display 판정-셀 값 유무/타입도 좌상단 셀 기준)\n *\n * @param options.location - 링크 대상 (URL/이메일/문서 내 참조, 예: \"Sheet1!A1\", 정의된 이름)\n * @param options.display - 셀 표시 텍스트. - 셀 값이 있고 숫자이거나 줄바꿈 포함 문자열이면 무시되고 셀 값이 유지된다. - 셀 값이 있는 일반 문자열이면 display가 우선 적용된다. - 셀 값이 없으면 display가 적용되고, 생략 시 location이 적용된다.\n * @param options.type - 목록 밖의 값이면 INVALID_HYPERLINK_TYPE. 생략 시 location에서 자동 판별\n */\n setHyperlink(options: { location: string; display?: string; type?: HyperlinkType }): Promise<void>;\n /**\n * 이 범위와 상호 포함 관계(범위가 링크를 포함하거나 링크가 범위를 포함)인 하이퍼링크만 삭제한다(셀 값은 유지).\n * 부분적으로만 겹치는 링크는 삭제되지 않는다.\n * 서식(파란색+밑줄)도 함께 제거되며,\n * 삭제된 링크와 교차하는 다른 하이퍼링크는 서식이 복원된다.\n */\n removeHyperlink(): Promise<void>;\n }\n\n export interface Chart {\n // ChartApiMixin\n /**\n * 차트 타입을 enum 문자열로 반환한다. 미지원/미매핑 타입(파일 로드 stock/surface 등)은 \"unknown\".\n */\n getType(): Promise<string>;\n /**\n * 차트가 편집 가능한지 반환한다. 대상 부재·복원 불가·외부 데이터 차트는 false (throw 하지 않는다).\n */\n isEditable(): Promise<boolean>;\n /**\n * 차트 제목을 반환한다. 미설정 시 빈 문자열.\n */\n getTitle(): Promise<string>;\n /**\n * 축 제목을 반환한다. 미설정 시 빈 문자열,\n * 축 제목을 갖지 않는 차트 종류(원형 계열·도넛·방사형)는 null.\n *\n * @param axis - 그 외 CHART_AXIS_INVALID throw.\n */\n getAxisTitle(axis: ChartAxis): Promise<string | null>;\n /**\n * 범례 위치를 반환한다. 범례가 없으면 \"none\".\n */\n getLegendPosition(): Promise<ChartLegendPosition>;\n /**\n * 데이터레이블 위치를 반환한다. 레이블이 없으면 \"none\".\n */\n getDataLabelPosition(): Promise<ChartDataLabelPosition>;\n /**\n * 축별 눈금선 종류를 반환한다. 꺼져 있으면 \"none\",\n * 해당 눈금선을 갖지 않는 차트 종류는 null.\n *\n * @param axis - 그 외 CHART_AXIS_INVALID throw.\n */\n getGridLine(axis: ChartAxis): Promise<ChartGridLineType | null>;\n /**\n * 차트의 공통 서식 상태를 모델 조회 1회로 반환한다. 각 값은 동명 getter 와 같은 규약이다 —\n * axisTitle/gridLine 의 null 은 그 차트 종류에 해당 축의 제목·눈금선이 없다는 뜻이고,\n * \"none\" 은 지원하지만 꺼져 있다는 뜻이다.\n *\n * 개별 getter 는 호출마다 대상 실존 확인(hasChart)을 반복하므로, 여러 값을 함께 읽을 때는 이 쪽을 쓴다.\n */\n getState(): Promise<{ type: string; title: string; legendPosition: ChartLegendPosition; dataLabelPosition: ChartDataLabelPosition; axisTitle: { horizontal: string | null; vertical: string | null }; gridLine: { horizontal: ChartGridLineType | null; vertical: ChartGridLineType | null } }>;\n /**\n * 차트 종류를 변경한다. 현재 종류와 같으면 아무것도 하지 않는다 —\n * 종류가 그대로인데 스타일 미지정 차트의 스타일만 기본값으로 바뀌는 부작용을 막는다.\n *\n * @param chartType - 차트 종류 enum 값(= enum 문자열, 예: \"clustered_column\"). 미정의/미지원이면 CHART_TYPE_UNSUPPORTED throw.\n */\n setType(chartType: ChartType): Promise<void>;\n /**\n * 차트 프리셋 스타일을 변경한다. 번호별 실제 색은 문서 테마에 종속된다.\n *\n * @param style - 스타일 번호 (1~12 정수). 3개 단위로 색 그룹이 나뉘고(1~3=그룹1, 4~6=그룹2, 7~9=그룹3, 10~12=그룹4), 그룹 내 순서는 배경 변형이다(1번째=반투명 배경, 2번째=흰색 배경, 3번째=색상 배경+계열 테두리 — 정의는 chartInfo.setStyle JSDoc). 형태 위반 시 CHART_STYLE_INVALID throw.\n */\n setStyle(style: number): Promise<void>;\n /**\n * 차트 제목을 설정한다.\n */\n setTitle(title: string): Promise<void>;\n /**\n * 축 제목을 설정한다. 축 제목을 갖지 않는 차트 종류(원형 계열·도넛·방사형)는\n * CHART_AXIS_TITLE_UNSUPPORTED throw.\n *\n * @param axis - 그 외 CHART_AXIS_INVALID throw.\n */\n setAxisTitle(axis: ChartAxis, title: string): Promise<void>;\n /**\n * 범례 위치를 설정한다. \"none\"이면 범례를 숨긴다.\n *\n * @param position - 그 외 CHART_LEGEND_POSITION_INVALID throw.\n */\n setLegendPosition(position: ChartLegendPosition): Promise<void>;\n /**\n * 데이터레이블 위치를 설정한다. \"none\"이면 숨긴다.\n * 차트 타입별 유효 위치까지 검증한다 — 타입 그룹 미정의는 CHART_DATALABEL_UNSUPPORTED,\n * 그룹에 없는 위치는 CHART_DATALABEL_POSITION_INVALID throw. \"none\"은 전 타입 허용.\n *\n * @param position - 그 외 CHART_DATALABEL_POSITION_INVALID throw.\n */\n setDataLabelPosition(position: ChartDataLabelPosition): Promise<void>;\n /**\n * 차트 눈금선을 설정한다. \"none\"이면 해당 축 눈금선을 숨긴다.\n * 차트 타입별 지원 여부까지 검증한다 — 원형 계열·도넛은 양축, 방사형은 세로 축이\n * CHART_GRID_LINE_UNSUPPORTED throw.\n *\n * @param axis - 그 외 CHART_AXIS_INVALID throw.\n * @param gridType - 그 외 CHART_GRID_LINE_INVALID throw.\n */\n setGridLine(axis: ChartAxis, gridType: ChartGridLineType): Promise<void>;\n // own\n /**\n * 차트 핸들 키(oid)를 반환한다.\n */\n getId(): Promise<string>;\n /**\n * 차트 데이터 범위를 A1 문자열로 반환한다.\n * 다중/cross-sheet 등으로 단일 bounding range 가 성립하지 않으면 null.\n */\n getDataRange(): Promise<string | null>;\n /**\n * 차트 요약 정보를 반환한다. getChartList 가 쓰는 요약 스키마.\n * 타입·제목은 공통 mixin 의 getState() 로 받고, 데이터 범위만 chartGraphic 을 따로 읽는다.\n */\n getInfo(): Promise<{ oid: string; type: string; range: string | null; title: string }>;\n /**\n * 차트를 삭제한다.\n */\n delete(): Promise<{ undoable: boolean; undoBufferCleared: boolean }>;\n /**\n * 차트의 데이터 소스 범위를 다른 셀 범위로 교체한다.\n * 영역 인자는 진입부에서 0-based 좌표로 정규화하며, command 이하로는 좌표만 전달한다.\n * 차트가 속한 시트 기준 단일 범위만 지원한다(cross-sheet 는 getDataRange 와 대칭으로 미지원).\n * 무효 범위/시리즈 상한 초과는 CHART_RANGE_INVALID 를 throw 한다.\n *\n * @param dataRange - 데이터 범위(A1 표기 문자열 또는 0-based 좌표 객체)\n * @param seriesBy - 시리즈 방향. rows=행이 시리즈, columns=열이 시리즈, auto=새 범위 모양 기준 자동. 미지정 시 기존 방향 유지. 분산형/거품형은 rows/columns 미지원(CHART_SWITCH_UNSUPPORTED)\n */\n setDataRange(dataRange: string | { row1: number; col1: number; row2?: number; col2?: number }, seriesBy?: \"auto\" | \"rows\" | \"columns\"): Promise<void>;\n /**\n * 차트의 행/열(시리즈 방향)을 전환한다. 호출할 때마다 전환 상태가 토글된다.\n * 분산형/거품형 차트는 전환을 지원하지 않으며 CHART_SWITCH_UNSUPPORTED 를 throw 한다.\n * 데이터 범위가 없거나 시리즈 상한(행/열 100개)을 넘는 차트는 CHART_RANGE_INVALID 를 throw 한다.\n */\n switchRowColumn(): Promise<void>;\n /**\n * 차트를 지정한 시작 셀로 이동한다. (이동 전용 — 현재 크기 유지)\n * 영역 인자는 진입부에서 0-based 좌표로 정규화하며, command 이하로는 좌표만 전달한다.\n * 단일 셀 의미이므로 범위를 넘겨도 **좌상단(row1, col1)만** 새 from 앵커로 사용한다 — 우하단은 무시된다.\n * 크기 변경(리사이즈)은 후속 범위이며, endCell 을 넘기면 UNSUPPORTED_OPERATION 을 throw 한다.\n *\n * @param startCell - 이동 목표 셀(A1 표기 문자열 또는 0-based 좌표 객체 — 단일 셀은 row2/col2 생략 가능). 좌상단만 사용\n * @param endCell - 후속 리사이즈용 예약(우하단). 현재 지정 시 UNSUPPORTED_OPERATION throw.\n */\n setPosition(startCell: string | { row1: number; col1: number; row2?: number; col2?: number }, endCell?: string | { row1: number; col1: number; row2?: number; col2?: number }): Promise<void>;\n }\n\n export interface Table {\n /**\n * 테이블 이름(핸들 키)을 반환한다.\n */\n getName(): Promise<string>;\n /**\n * 테이블 전체 영역의 Range 핸들을 반환한다.\n */\n getRange(): Promise<Range>;\n /**\n * 테이블 옵션을 일괄 반환한다.\n */\n getOptions(): Promise<TableOptions>;\n /**\n * 테이블을 삭제한다. 표 정의·오토필터 제거 + 테이블 영역 셀 내용을 클리어한다.\n * 두 변경은 한 번의 undo 로 함께 복원된다.\n */\n delete(): Promise<void>;\n /**\n * 테이블 영역을 새 범위로 변경한다. 머리글 행 위치는 유지된다.\n *\n * @param range - 새 영역(A1 표기 문자열 또는 0-based 좌표 객체)\n */\n resize(range: string | { row1: number; col1: number; row2?: number; col2?: number }): Promise<void>;\n /**\n * 테이블 옵션을 변경한다. 지정한 키만 적용되고 나머지는 현재 값을 유지한다.\n * (스타일 `style` 변경은 현재 미지원 — `getOptions`로 조회만 가능.)\n */\n setOptions(options: { headerRow?: boolean; totalsRow?: boolean; firstColumn?: boolean; lastColumn?: boolean; bandedRows?: boolean; bandedColumns?: boolean }): Promise<void>;\n /**\n * 테이블 이름을 변경한다.\n */\n setName(name: string): Promise<void>;\n /**\n * 이 테이블의 자동 필터 핸들을 반환한다.\n * 테이블 필터링은 내재적이므로, 테이블이 존재하면 필터 유무와 무관하게 항상 핸들을 반환한다(null 아님).\n * 필터가 아직 없으면 조건 적용(applyFilter) 시 자동 생성되고, getInfo 는 빈 상태를 반환한다.\n * 명시적 생성/삭제는 핸들의 create()/remove() 로도 가능하다.\n */\n getFilter(): Promise<Filter>;\n /**\n * 목록/조회가 공유하는 요약 스키마.\n */\n getInfo(): Promise<TableInfo>;\n }\n\n export interface Filter {\n /**\n * 자동 필터를 생성한다. (SET_FILTER 라우팅)\n * - 시트: 전달 범위(range)에 필터를 설정한다. range 생략 시 command 가 현재 선택영역 기준으로 유도한다.\n * - 테이블: range 는 무시하고 테이블 구조(머리글~데이터, 합계 행 제외)로 설정한다.\n * 이미 필터가 있으면 SET_FILTER command 가 FILTER_INVALID_RANGE 로 거부하므로 여기서 선검사하지 않는다.\n *\n * @param range - 시트 필터 범위(A1 표기 문자열 또는 0-based 좌표 객체). 생략 시 선택영역 기준.\n */\n create(range?: string | { row1: number; col1: number; row2?: number; col2?: number }): Promise<void>;\n /**\n * 지정 열에 필터 조건을 적용한다. criteria=null 이면 해당 열 조건을 해제한다.\n *\n * @param colId - 대상 열 — 필터 범위 첫 열부터의 0-based 오프셋 (0=첫 열, Filter.sort 의 colId 와 동일 의미). 정수가 아니거나 음수면 FILTER_INVALID_RANGE, 범위 상한 검증은 APPLY_FILTER command 가 수행한다(위반 시 FILTER_INVALID_RANGE).\n * @param criteria - filterType 별 스키마 또는 null(해제). APPLY_FILTER command 스키마와 동일. 종류·연산자 어휘는 FilterType/FilterOperator/FilterDynamicType.\n */\n applyFilter(colId: number, criteria: Record<string, unknown> | null): Promise<void>;\n /**\n * 필터 조건을 해제한다. colId 지정 시 해당 열만, 생략 시 조건이 걸린 모든 열을 일괄 해제한다.\n * 두 모드 모두 필터 영역·구조는 유지된다 — 필터(영역) 자체를 제거하는 remove() 와 구분.\n * - colId 지정: applyFilter(colId, null) 동치. 시트 필터가 없으면 FILTER_NOT_FOUND.\n * - colId 생략(전체 해제): 해제할 조건이 없으면 no-op. 열별로 APPLY_FILTER(null) 를 반복하므로\n * undo 가 열 수만큼 분할된다.\n *\n * @param colId - 해제할 열 — 필터 범위 첫 열부터의 0-based 오프셋 (0=첫 열). 생략(undefined)하면 모든 열의 조건을 해제한다. undefined 도 유효 정수도 아니면(문자열·음수·비정수) FILTER_INVALID_RANGE.\n */\n clearFilter(colId?: number): Promise<void>;\n /**\n * 필터/테이블 컨텍스트를 지정 열 기준으로 정렬한다. (SORT_FILTER 라우팅 — sortState 갱신)\n * - 시트 필터: 필터가 없으면 FILTER_NOT_FOUND (정렬은 명시 필터 필요, create() 선행).\n * - 테이블 필터: 필터가 없으면 정렬 전 자동 생성된다(테이블 필터링은 내재적).\n *\n * @param colId - 정렬 기준 열 — 필터 범위 첫 열부터의 0-based 오프셋 (0=첫 열). 정수가 아니거나 음수면 INVALID_SORT_FIELD, 범위 상한 검증은 SORT_FILTER command 가 수행한다(위반 시 INVALID_SORT_FIELD).\n * @param order - 정렬 방향\n * @returns this\n */\n sort(colId: number, order: SortOrder): Promise<Filter>;\n /**\n * 자동 필터(영역)를 제거한다. (REMOVE_FILTER 라우팅 — 시트/테이블 공통)\n * 조건만 해제하고 필터 영역·구조를 유지하는 clearFilter() 와 구분된다.\n * 대상에 필터가 없으면 REMOVE_FILTER command 가 FILTER_NOT_FOUND 로 throw 하므로 여기서 선검사하지 않는다.\n */\n remove(): Promise<void>;\n /**\n * 필터 정보를 조회한다. (command 없음 — Model getter 조합. 절대 throw 하지 않는다)\n * 필터가 없으면(시트 미생성 / 테이블 내재적 필터 미생성) `{ enabled: false }` 만 반환한다 —\n * range/columns/hiddenRowCount/sort 는 필터가 있을 때만 포함된다.\n * columns 는 조건이 걸린 열만 포함하며, criteria 는 정규화 criteria 로 역변환된다.\n */\n getInfo(): Promise<FilterInfo>;\n }\n\n export interface Name {\n /**\n * Returns the defined name string.\n */\n getName(): Promise<string>;\n /**\n * Returns the sheet name for a sheet-scoped name, or null for workbook scope.\n */\n getSheetName(): Promise<string | null>;\n /**\n * Returns the active formula with a leading \"=\".\n */\n getFormula(): Promise<string>;\n /**\n * Renames the defined name.\n */\n setName(newName: string): Promise<void>;\n /**\n * Replaces the formula.\n */\n setFormula(formula: string): Promise<void>;\n /**\n * Updates name or formula.\n */\n update(fields: { newName?: string; formula?: string }): Promise<void>;\n /**\n * Deletes the defined name.\n */\n delete(): Promise<void>;\n /**\n * Returns a simple info object.\n */\n getInfo(): Promise<{ name: string; sheet: string | null; formula: string }>;\n }\n}\n","/* eslint-disable */\n/**\n * Thinkfree Office SDK Type Definitions\n *\n * ⚠️ AUTO-GENERATED — DO NOT EDIT.\n * 오피스 구현 저장소(비공개)의 API JSDoc 에서 생성된다 — 수정은 원본 JSDoc 에서.\n *\n * proxy 메서드는 postMessage bridge 를 거치므로 Promise 를 반환한다.\n * Generated: 2026-09-14\n */\n\n// Thinkfree Office SDK (Show)\n\n// 공통 enum — 정의·값은 common 모듈(SDK flat export)에만 있다. 여기서는 시그니처 참조용 type import 만 한다.\nimport type { LineDash, ShapePreset, ShapeZOrder, ChartType, ChartGridLineType, ChartAxis, ChartLegendPosition, ChartDataLabelPosition } from \"./common-api.generated.js\";\n\n// 실제(비-ambient) 모듈 네임스페이스 — 단일 번들 d.ts 에서 `Show.X` 로 타입·런타임\n// enum 값을 모두 노출한다. index 의 `export * as` 재수출은 tsup dts 롤업에서 const+type\n// 선언 병합의 값 의미가 타입 전용으로 강등되므로 쓰지 않는다 (dts.config 의 namespace 키).\nexport namespace Show {\n // =============================================================================\n // Constants / Enums\n // =============================================================================\n\n export const ShapeType = {\n SHAPE: \"sp\",\n IMAGE: \"pic\",\n CONNECTOR: \"cxnSp\",\n GROUP: \"grpSp\",\n CHART: \"chart\",\n TABLE: \"tbl\",\n DIAGRAM: \"diagram\",\n OLE_OBJECT: \"ole\",\n CONTROL: \"control\",\n } as const;\n export type ShapeType = typeof ShapeType[keyof typeof ShapeType];\n\n export const PlaceholderType = {\n TITLE: \"title\",\n CTR_TITLE: \"ctrTitle\",\n SUB_TITLE: \"subTitle\",\n BODY: \"body\",\n OBJECT: \"obj\",\n CHART: \"chart\",\n TABLE: \"tbl\",\n CLIP_ART: \"clipArt\",\n DIAGRAM: \"dgm\",\n MEDIA: \"media\",\n DATE: \"dt\",\n SLIDE_NUM: \"sldNum\",\n FOOTER: \"ftr\",\n HEADER: \"hdr\",\n PICTURE: \"pic\",\n SLIDE_IMAGE: \"sldImg\",\n } as const;\n export type PlaceholderType = typeof PlaceholderType[keyof typeof PlaceholderType];\n\n /**\n * 슬라이드 레이아웃 종류 (OOXML ST_SlideLayoutType).\n * setLayout/insertSlide/findSlides 에서 레이아웃을 지정·필터하는 값으로 사용한다.\n * 한 마스터에 같은 type 이 여럿일 수 있으며, 이때는 순서상 첫 번째가 선택된다.\n */\n export const SlideLayoutType = {\n TITLE: \"title\",\n TX: \"tx\",\n TWO_COL_TX: \"twoColTx\",\n TBL: \"tbl\",\n TX_AND_CHART: \"txAndChart\",\n CHART_AND_TX: \"chartAndTx\",\n DGM: \"dgm\",\n CHART: \"chart\",\n TX_AND_CLIP_ART: \"txAndClipArt\",\n CLIP_ART_AND_TX: \"clipArtAndTx\",\n TITLE_ONLY: \"titleOnly\",\n BLANK: \"blank\",\n TX_AND_OBJ: \"txAndObj\",\n OBJ_AND_TX: \"objAndTx\",\n OBJ_ONLY: \"objOnly\",\n OBJ: \"obj\",\n TX_AND_MEDIA: \"txAndMedia\",\n MEDIA_AND_TX: \"mediaAndTx\",\n OBJ_OVER_TX: \"objOverTx\",\n TX_OVER_OBJ: \"txOverObj\",\n TX_AND_TWO_OBJ: \"txAndTwoObj\",\n TWO_OBJ_AND_TX: \"twoObjAndTx\",\n TWO_OBJ_OVER_TX: \"twoObjOverTx\",\n FOUR_OBJ: \"fourObj\",\n VERT_TX: \"vertTx\",\n CLIP_ART_AND_VERT_TX: \"clipArtAndVertTx\",\n VERT_TITLE_AND_TX: \"vertTitleAndTx\",\n VERT_TITLE_AND_TX_OVER_CHART: \"vertTitleAndTxOverChart\",\n TWO_OBJ: \"twoObj\",\n OBJ_AND_TWO_OBJ: \"objAndTwoObj\",\n TWO_OBJ_AND_OBJ: \"twoObjAndObj\",\n CUST: \"cust\",\n SEC_HEAD: \"secHead\",\n TWO_TX_TWO_OBJ: \"twoTxTwoObj\",\n OBJ_TX: \"objTx\",\n PIC_TX: \"picTx\",\n } as const;\n export type SlideLayoutType = typeof SlideLayoutType[keyof typeof SlideLayoutType];\n\n /** 보기 배율/맞춤. */\n export const ViewMode = {\n FIT_IN_WINDOW: \"fitInWindow\",\n ZOOM_50: \"50\",\n ZOOM_75: \"75\",\n ZOOM_100: \"100\",\n ZOOM_150: \"150\",\n ZOOM_200: \"200\",\n ZOOM_300: \"300\",\n ZOOM_400: \"400\",\n } as const;\n export type ViewMode = typeof ViewMode[keyof typeof ViewMode];\n\n /** 모두 선택(select_all) 범위. */\n export const SelectScope = {\n SHAPE: \"shape\",\n SLIDE: \"slide\",\n TEXT: \"text\",\n } as const;\n export type SelectScope = typeof SelectScope[keyof typeof SelectScope];\n\n export const RunProperty = {\n FONT_SIZE: \"fontSize\",\n BOLD: \"bold\",\n ITALIC: \"italic\",\n UNDERLINE: \"underline\",\n STRIKE: \"strike\",\n FONT_FAMILY: \"fontFamily\",\n BASELINE_SHIFT: \"baselineShift\",\n } as const;\n export type RunProperty = typeof RunProperty[keyof typeof RunProperty];\n\n export const FlipDirection = {\n HORIZONTAL: \"horizontal\",\n VERTICAL: \"vertical\",\n } as const;\n export type FlipDirection = typeof FlipDirection[keyof typeof FlipDirection];\n\n export const EffectType = {\n OUTER_SHADOW: \"outerShdw\",\n INNER_SHADOW: \"innerShdw\",\n REFLECTION: \"reflection\",\n GLOW: \"glow\",\n SOFT_EDGE: \"softEdge\",\n } as const;\n export type EffectType = typeof EffectType[keyof typeof EffectType];\n\n export const LineCap = {\n FLAT: \"flat\",\n ROUND: \"rnd\",\n SQUARE: \"sq\",\n } as const;\n export type LineCap = typeof LineCap[keyof typeof LineCap];\n\n export const LineJoin = {\n ROUND: \"round\",\n BEVEL: \"bevel\",\n MITER: \"miter\",\n } as const;\n export type LineJoin = typeof LineJoin[keyof typeof LineJoin];\n\n export const LineEndType = {\n NONE: \"none\",\n TRIANGLE: \"triangle\",\n STEALTH: \"stealth\",\n DIAMOND: \"diamond\",\n OVAL: \"oval\",\n ARROW: \"arrow\",\n } as const;\n export type LineEndType = typeof LineEndType[keyof typeof LineEndType];\n\n export const LineEndSize = {\n SMALL: \"sm\",\n MEDIUM: \"med\",\n LARGE: \"lg\",\n } as const;\n export type LineEndSize = typeof LineEndSize[keyof typeof LineEndSize];\n\n export const TextAlignH = {\n LEFT: \"l\",\n CENTER: \"ctr\",\n RIGHT: \"r\",\n JUSTIFY: \"just\",\n DISTRIBUTE: \"dist\",\n } as const;\n export type TextAlignH = typeof TextAlignH[keyof typeof TextAlignH];\n\n export const LineSpacingType = {\n MULTIPLE: \"multiple\",\n EXACT: \"exact\",\n } as const;\n export type LineSpacingType = typeof LineSpacingType[keyof typeof LineSpacingType];\n\n export const SpeedType = {\n SLOW: \"slow\",\n MED: \"med\",\n FAST: \"fast\",\n } as const;\n export type SpeedType = typeof SpeedType[keyof typeof SpeedType];\n\n export const TransitionType = {\n NONE: \"none\",\n RANDOM: \"random\",\n FADE: \"fade\",\n PUSH: \"push\",\n COVER: \"cover\",\n CUT: \"cut\",\n SPLIT: \"split\",\n WIPE: \"wipe\",\n STRIPS: \"strips\",\n PULL: \"pull\",\n COMB: \"comb\",\n CIRCLE: \"circle\",\n DIAMOND: \"diamond\",\n PLUS: \"plus\",\n ZOOM: \"zoom\",\n WHEEL: \"wheel\",\n WHEEL_REVERSE: \"wheelReverse\",\n WEDGE: \"wedge\",\n FLIP: \"flip\",\n } as const;\n export type TransitionType = typeof TransitionType[keyof typeof TransitionType];\n\n export const TransitionEffectDir = {\n DOWN: \"d\",\n LEFT: \"l\",\n RIGHT: \"r\",\n UP: \"u\",\n LEFT_DOWN: \"ld\",\n LEFT_UP: \"lu\",\n RIGHT_DOWN: \"rd\",\n RIGHT_UP: \"ru\",\n IN: \"in\",\n OUT: \"out\",\n HORIZONTAL: \"horz\",\n VERTICAL: \"vert\",\n } as const;\n export type TransitionEffectDir = typeof TransitionEffectDir[keyof typeof TransitionEffectDir];\n\n /**\n * 머리글/바닥글 날짜 자동갱신(update) 모드의 날짜 표시 형식 (모델 fldType 값).\n * 실제 출력 문자열은 언어(DateLanguage)에 따라 달라진다.\n * 값은 Const.FldType 에서 파생하며, 날짜 형식이 아닌 SlideNum 과\n * datetime1 과 동일한 기본 sentinel 인 DatetimeFigureOut 은 제외한다.\n *\n * 형식 참고(기본 언어): datetime1=2026-06-30, datetime2=전체 날짜+요일, datetime3=특수 연호,\n * datetime4=년 월 일, datetime5=2026/6/30, datetime6=년 월, datetime7=특수 연호 년 월,\n * datetime8=날짜+시:분:초, datetime9=날짜+오전/오후 시:분, datetime10=시:분,\n * datetime11=시:분:초, datetime12=오전/오후 시:분, datetime13=오전/오후 시:분:초\n */\n export const DateFormat = {\n Datetime1: \"datetime1\",\n Datetime2: \"datetime2\",\n Datetime3: \"datetime3\",\n Datetime4: \"datetime4\",\n Datetime5: \"datetime5\",\n Datetime6: \"datetime6\",\n Datetime7: \"datetime7\",\n Datetime8: \"datetime8\",\n Datetime9: \"datetime9\",\n Datetime10: \"datetime10\",\n Datetime11: \"datetime11\",\n Datetime12: \"datetime12\",\n Datetime13: \"datetime13\",\n } as const;\n export type DateFormat = typeof DateFormat[keyof typeof DateFormat];\n\n export const DateLanguage = {\n ENGLISH: \"en-US\",\n KOREAN: \"ko-KR\",\n JAPANESE: \"ja-JP\",\n RUSSIAN: \"ru-RU\",\n } as const;\n export type DateLanguage = typeof DateLanguage[keyof typeof DateLanguage];\n\n export const BulletType = {\n NONE: \"buNone\",\n CHAR: \"buChar\",\n AUTO_NUM: \"buAutoNum\",\n BLIP: \"buBlip\",\n } as const;\n export type BulletType = typeof BulletType[keyof typeof BulletType];\n\n export const Underline = {\n NONE: \"none\",\n WORDS: \"words\",\n SINGLE: \"sng\",\n DOUBLE: \"dbl\",\n HEAVY: \"heavy\",\n DOTTED: \"dotted\",\n DOTTED_HEAVY: \"dottedHeavy\",\n DASH: \"dash\",\n DASH_HEAVY: \"dashHeavy\",\n DASH_LONG: \"dashLong\",\n DASH_LONG_HEAVY: \"dashLongHeavy\",\n DOT_DASH: \"dotDash\",\n DOT_DASH_HEAVY: \"dotDashHeavy\",\n DOT_DOT_DASH: \"dotDotDash\",\n DOT_DOT_DASH_HEAVY: \"dotDotDashHeavy\",\n WAVY: \"wavy\",\n WAVY_HEAVY: \"wavyHeavy\",\n WAVY_DOUBLE: \"wavyDbl\",\n } as const;\n export type Underline = typeof Underline[keyof typeof Underline];\n\n export const Strike = {\n NONE: \"noStrike\",\n SINGLE: \"sngStrike\",\n DOUBLE: \"dblStrike\",\n } as const;\n export type Strike = typeof Strike[keyof typeof Strike];\n\n export const AutoFitType = {\n NO_AUTOFIT: \"noAutofit\",\n NORMAL: \"normAutofit\",\n SHAPE_AUTOFIT: \"spAutoFit\",\n } as const;\n export type AutoFitType = typeof AutoFitType[keyof typeof AutoFitType];\n\n export const WriteMode = {\n HORIZONTAL: \"horz\",\n VERTICAL_EAST: \"eaVert\",\n VERTICAL: \"vert\",\n VERTICAL_270: \"vert270\",\n WORDART_VERTICAL_RTL: \"wordArtVertRtl\",\n WORDART_VERTICAL: \"wordArtVert\",\n MONGOLIAN_VERTICAL: \"mongolianVert\",\n } as const;\n export type WriteMode = typeof WriteMode[keyof typeof WriteMode];\n\n export const TextMode = {\n REPLACE: \"replace\",\n APPEND: \"append\",\n } as const;\n export type TextMode = typeof TextMode[keyof typeof TextMode];\n\n export const MoveMode = {\n ABSOLUTE: \"absolute\",\n RELATIVE: \"relative\",\n } as const;\n export type MoveMode = typeof MoveMode[keyof typeof MoveMode];\n\n export const TextAlignV = {\n TOP: 0,\n MIDDLE: 1,\n BOTTOM: 2,\n TOP_CENTER: 3,\n MIDDLE_CENTER: 4,\n BOTTOM_CENTER: 5,\n } as const;\n export type TextAlignV = typeof TextAlignV[keyof typeof TextAlignV];\n\n /**\n * 번호 매기기 유형 (BulletType.AUTO_NUM 용).\n * 값은 Const.Bullet.Numbered.Type 에서 파생하며, 내부 sentinel 인 NOT_SUPPORTED 는 제외한다.\n */\n export const NumberedType = {\n NUMBER_WITH_DOT: \"arabicPeriod\",\n CIRCLE_NUMBER: \"circleNumDbPlain\",\n ROMAN_NUMERAL_UPPERCASE: \"romanUcPeriod\",\n UPPERCASE_ALPHABET: \"alphaUcPeriod\",\n NUMBER_WITH_ROUND_BRACKET: \"arabicParenR\",\n LOWERCASE_ALPHABET: \"alphaLcPeriod\",\n CHINESE: \"ea1JpnKorPeriod\",\n ROMAN_NUMERAL_LOWERCASE: \"romanLcPeriod\",\n LOWERCASE_ALPHABET_WITH_ROUND_BRACKET: \"alphaLcParenR\",\n } as const;\n export type NumberedType = typeof NumberedType[keyof typeof NumberedType];\n\n /** 글머리 문자 스타일 (BulletType.CHAR 용, Const.Bullet.Char.InfoMap 의 키와 동일) */\n export const CharType = {\n DOT: \"1\",\n DIAMOND: \"2\",\n SQUARE: \"3\",\n CIRCLE: \"4\",\n FOUR_DIAMONDS: \"5\",\n ARROW: \"6\",\n CHECK: \"7\",\n } as const;\n export type CharType = typeof CharType[keyof typeof CharType];\n\n export const HyperlinkType = {\n URL: \"url\",\n EMAIL: \"email\",\n SLIDE_JUMP: \"slideJump\",\n SHOW_JUMP: \"showJump\",\n FILE: \"file\",\n } as const;\n export type HyperlinkType = typeof HyperlinkType[keyof typeof HyperlinkType];\n\n export const ShowJumpType = {\n FIRST: \"first\",\n LAST: \"last\",\n NEXT: \"next\",\n PREV: \"prev\",\n EXIT: \"endShow\",\n LAST_VIEWED: \"lastSlideViewed\",\n } as const;\n export type ShowJumpType = typeof ShowJumpType[keyof typeof ShowJumpType];\n\n export const GradientType = {\n LINEAR: \"lin\",\n CIRCLE: \"circle\",\n RECT: \"rect\",\n SHAPE: \"shape\",\n } as const;\n export type GradientType = typeof GradientType[keyof typeof GradientType];\n\n export const FillType = {\n SOLID: \"solidFill\",\n GRADIENT: \"gradFill\",\n NONE: \"noFill\",\n IMAGE: \"blipFill\",\n PATTERN: \"pattFill\",\n } as const;\n export type FillType = typeof FillType[keyof typeof FillType];\n\n export const ImageFillMode = {\n STRETCH: \"stretch\",\n TILE: \"tile\",\n } as const;\n export type ImageFillMode = typeof ImageFillMode[keyof typeof ImageFillMode];\n\n export const ImageTileFlip = {\n NONE: \"none\",\n HORIZONTAL: \"x\",\n VERTICAL: \"y\",\n BOTH: \"xy\",\n } as const;\n export type ImageTileFlip = typeof ImageTileFlip[keyof typeof ImageTileFlip];\n\n export const RectAlign = {\n TOP_LEFT: \"tl\",\n TOP: \"t\",\n TOP_RIGHT: \"tr\",\n LEFT: \"l\",\n CENTER: \"ctr\",\n RIGHT: \"r\",\n BOTTOM_LEFT: \"bl\",\n BOTTOM: \"b\",\n BOTTOM_RIGHT: \"br\",\n } as const;\n export type RectAlign = typeof RectAlign[keyof typeof RectAlign];\n\n export const PatternPreset = {\n PERCENT_5: \"pct5\",\n PERCENT_10: \"pct10\",\n PERCENT_20: \"pct20\",\n PERCENT_25: \"pct25\",\n PERCENT_30: \"pct30\",\n PERCENT_40: \"pct40\",\n PERCENT_50: \"pct50\",\n PERCENT_60: \"pct60\",\n PERCENT_70: \"pct70\",\n PERCENT_75: \"pct75\",\n PERCENT_80: \"pct80\",\n PERCENT_90: \"pct90\",\n LIGHT_DOWNWARD_DIAGONAL: \"ltDnDiag\",\n LIGHT_UPWARD_DIAGONAL: \"ltUpDiag\",\n DARK_DOWNWARD_DIAGONAL: \"dkDnDiag\",\n DARK_UPWARD_DIAGONAL: \"dkUpDiag\",\n WIDE_DOWNWARD_DIAGONAL: \"wdDnDiag\",\n WIDE_UPWARD_DIAGONAL: \"wdUpDiag\",\n LIGHT_VERTICAL: \"ltVert\",\n LIGHT_HORIZONTAL: \"ltHorz\",\n NARROW_VERTICAL: \"narVert\",\n NARROW_HORIZONTAL: \"narHorz\",\n DARK_VERTICAL: \"dkVert\",\n DARK_HORIZONTAL: \"dkHorz\",\n DASHED_DOWNWARD_DIAGONAL: \"dashDnDiag\",\n DASHED_UPWARD_DIAGONAL: \"dashUpDiag\",\n DASHED_HORIZONTAL: \"dashHorz\",\n DASHED_VERTICAL: \"dashVert\",\n SMALL_CONFETTI: \"smConfetti\",\n LARGE_CONFETTI: \"lgConfetti\",\n ZIGZAG: \"zigZag\",\n WAVE: \"wave\",\n DIAGONAL_BRICK: \"diagBrick\",\n HORIZONTAL_BRICK: \"horzBrick\",\n WEAVE: \"weave\",\n PLAID: \"plaid\",\n DIVOT: \"divot\",\n DOTTED_GRID: \"dotGrid\",\n DOTTED_DIAMOND: \"dotDmnd\",\n SHINGLE: \"shingle\",\n TRELLIS: \"trellis\",\n SPHERE: \"sphere\",\n SMALL_GRID: \"smGrid\",\n LARGE_GRID: \"lgGrid\",\n SMALL_CHECKER_BOARD: \"smCheck\",\n LARGE_CHECKER_BOARD: \"lgCheck\",\n OUTLINED_DIAMOND: \"openDmnd\",\n SOLID_DIAMOND: \"solidDmnd\",\n HORIZONTAL: \"horz\",\n VERTICAL: \"vert\",\n CROSS: \"cross\",\n DOWNWARD_DIAGONAL: \"dnDiag\",\n UPWARD_DIAGONAL: \"upDiag\",\n DIAGONAL_CROSS: \"diagCross\",\n } as const;\n export type PatternPreset = typeof PatternPreset[keyof typeof PatternPreset];\n\n export const AlignType = {\n LEFT: \"left\",\n CENTER: \"center\",\n RIGHT: \"right\",\n TOP: \"top\",\n MIDDLE: \"middle\",\n BOTTOM: \"bottom\",\n } as const;\n export type AlignType = typeof AlignType[keyof typeof AlignType];\n\n export const DistributeDirection = {\n HORIZONTAL: \"horizontal\",\n VERTICAL: \"vertical\",\n } as const;\n export type DistributeDirection = typeof DistributeDirection[keyof typeof DistributeDirection];\n\n export const GridPosition = {\n TOP_LEFT: \"top-left\",\n TOP_CENTER: \"top-center\",\n TOP_RIGHT: \"top-right\",\n CENTER_LEFT: \"center-left\",\n CENTER: \"center\",\n CENTER_RIGHT: \"center-right\",\n BOTTOM_LEFT: \"bottom-left\",\n BOTTOM_CENTER: \"bottom-center\",\n BOTTOM_RIGHT: \"bottom-right\",\n } as const;\n export type GridPosition = typeof GridPosition[keyof typeof GridPosition];\n\n export const SizeCategory = {\n SMALL: \"small\",\n MEDIUM: \"medium\",\n LARGE: \"large\",\n } as const;\n export type SizeCategory = typeof SizeCategory[keyof typeof SizeCategory];\n\n export const BorderPosition = {\n TOP: \"top\",\n BOTTOM: \"bottom\",\n LEFT: \"left\",\n RIGHT: \"right\",\n DIAGONAL_DOWN: \"diagonalDown\",\n DIAGONAL_UP: \"diagonalUp\",\n ALL: \"all\",\n } as const;\n export type BorderPosition = typeof BorderPosition[keyof typeof BorderPosition];\n\n export const InsertPosition = {\n ABOVE: 0,\n BELOW: 1,\n LEFT: 2,\n RIGHT: 3,\n } as const;\n export type InsertPosition = typeof InsertPosition[keyof typeof InsertPosition];\n\n export const TableStyleOption = {\n FIRST_ROW: 0,\n LAST_ROW: 1,\n BAND_ROW: 2,\n FIRST_COL: 3,\n LAST_COL: 4,\n BAND_COL: 5,\n } as const;\n export type TableStyleOption = typeof TableStyleOption[keyof typeof TableStyleOption];\n\n /** 표 프리셋 스타일 색상 그룹. */\n export const TableStyleColor = {\n TX1: \"tx1\",\n ACCENT1: \"accent1\",\n ACCENT2: \"accent2\",\n ACCENT3: \"accent3\",\n ACCENT4: \"accent4\",\n ACCENT5: \"accent5\",\n ACCENT6: \"accent6\",\n } as const;\n export type TableStyleColor = typeof TableStyleColor[keyof typeof TableStyleColor];\n\n /** 표 프리셋 스타일 명도 타입. */\n export const TableStyleType = {\n GENERIC1: \"generic1\",\n GENERIC2: \"generic2\",\n LIGHT1: \"light1\",\n LIGHT2: \"light2\",\n LIGHT3: \"light3\",\n NORMAL1: \"normal1\",\n NORMAL2: \"normal2\",\n NORMAL3: \"normal3\",\n NORMAL4: \"normal4\",\n DARK1: \"dark1\",\n DARK2: \"dark2\",\n } as const;\n export type TableStyleType = typeof TableStyleType[keyof typeof TableStyleType];\n\n /**\n * ShapePreset family 정의 (family ID → preset 목록).\n * 정본: commonFrame/js/uiFramework/templateDefine.js 의 shape_btn_<family>_ 팔레트.\n * findShapes 의 presetId 에 family 키(\"rectangle\" 등)를 전달하면 해당 계열 전체를, ShapePreset 값(\"rect\" 등)을 전달하면 그 도형만 매칭한다.\n * 신규 도형 추가 시 templateDefine.js 와 동기화할 것.\n */\n export const ShapePresetFamily = {\n rectangle: [\"rect\", \"roundRect\", \"snip1Rect\", \"snip2SameRect\", \"snip2DiagRect\", \"snipRoundRect\", \"round1Rect\", \"round2SameRect\", \"round2DiagRect\"],\n arrow: [\"rightArrow\", \"leftArrow\", \"upArrow\", \"downArrow\", \"leftRightArrow\", \"upDownArrow\", \"quadArrow\", \"leftRightUpArrow\", \"bentArrow\", \"uturnArrow\", \"leftUpArrow\", \"bentUpArrow\", \"curvedRightArrow\", \"curvedLeftArrow\", \"curvedUpArrow\", \"curvedDownArrow\", \"stripedRightArrow\", \"notchedRightArrow\", \"homePlate\", \"chevron\", \"rightArrowCallout\", \"leftArrowCallout\", \"upArrowCallout\", \"downArrowCallout\", \"leftRightArrowCallout\", \"upDownArrowCallout\", \"quadArrowCallout\", \"circularArrow\", \"leftCircularArrow\", \"swooshArrow\", \"leftRightRibbon\"],\n basicShape: [\"ellipse\", \"triangle\", \"rtTriangle\", \"parallelogram\", \"trapezoid\", \"diamond\", \"pentagon\", \"hexagon\", \"heptagon\", \"octagon\", \"decagon\", \"dodecagon\", \"pieWedge\", \"pie\", \"chord\", \"teardrop\", \"frame\", \"halfFrame\", \"corner\", \"diagStripe\", \"plus\", \"plaque\", \"can\", \"cube\", \"bevel\", \"donut\", \"noSmoking\", \"blockArc\", \"foldedCorner\", \"smileyFace\", \"heart\", \"funnel\", \"gear6\", \"gear9\", \"lightningBolt\", \"sun\", \"moon\", \"cloud\", \"arc\", \"bracketPair\", \"bracePair\", \"leftBracket\", \"rightBracket\", \"leftBrace\", \"rightBrace\"],\n star: [\"irregularSeal1\", \"irregularSeal2\", \"star4\", \"star5\", \"star6\", \"star7\", \"star8\", \"star10\", \"star12\", \"star16\", \"star24\", \"star32\"],\n banner: [\"ribbon2\", \"ribbon\", \"ellipseRibbon2\", \"ellipseRibbon\", \"verticalScroll\", \"horizontalScroll\", \"wave\", \"doubleWave\"],\n callout: [\"wedgeRectCallout\", \"wedgeRoundRectCallout\", \"wedgeEllipseCallout\", \"cloudCallout\", \"callout1\", \"callout2\", \"callout3\", \"accentCallout1\", \"accentCallout2\", \"accentCallout3\", \"borderCallout1\", \"borderCallout2\", \"borderCallout3\", \"accentBorderCallout1\", \"accentBorderCallout2\", \"accentBorderCallout3\"],\n flowchart: [\"flowChartProcess\", \"flowChartAlternateProcess\", \"flowChartDecision\", \"flowChartInputOutput\", \"flowChartPredefinedProcess\", \"flowChartInternalStorage\", \"flowChartDocument\", \"flowChartMultidocument\", \"flowChartTerminator\", \"flowChartPreparation\", \"flowChartManualInput\", \"flowChartManualOperation\", \"flowChartConnector\", \"flowChartOffpageConnector\", \"flowChartPunchedCard\", \"flowChartPunchedTape\", \"flowChartSummingJunction\", \"flowChartOr\", \"flowChartCollate\", \"flowChartSort\", \"flowChartExtract\", \"flowChartMerge\", \"flowChartOnlineStorage\", \"flowChartDelay\", \"flowChartMagneticTape\", \"flowChartMagneticDisk\", \"flowChartMagneticDrum\", \"flowChartDisplay\"],\n actionButton: [\"actionButtonBackPrevious\", \"actionButtonForwardNext\", \"actionButtonBeginning\", \"actionButtonEnd\", \"actionButtonHome\", \"actionButtonInformation\", \"actionButtonReturn\", \"actionButtonMovie\", \"actionButtonDocument\", \"actionButtonSound\", \"actionButtonHelp\", \"actionButtonBlank\"],\n equation: [\"mathPlus\", \"mathMinus\", \"mathMultiply\", \"mathDivide\", \"mathEqual\", \"mathNotEqual\"],\n line: [\"line\", \"bentConnector3\", \"curvedConnector3\"],\n } as const;\n export type ShapePresetFamily = keyof typeof ShapePresetFamily;\n\n // =============================================================================\n // Typedefs\n // =============================================================================\n\n export interface SlideFilter {\n /** 0-based 인덱스 목록 */\n indexes?: number[];\n /** 숨김 슬라이드 여부 */\n isHidden?: boolean;\n /** 레이아웃 종류 */\n layoutType?: SlideLayoutType;\n /** 슬라이드 내 포함 텍스트 */\n textContains?: string;\n /** 댓글 존재 여부 */\n hasComment?: boolean;\n /** 전환 효과 존재 여부 */\n hasTransition?: boolean;\n }\n\n export interface HeaderFooterDate {\n /** 자동갱신 날짜 형식 (text 지정 시 무시) (기본값: DateFormat.Datetime1) */\n format?: DateFormat;\n /** 자동갱신 날짜 언어 (text 지정 시 무시) (기본값: DateLanguage.ENGLISH) */\n language?: DateLanguage;\n /** 지정 시 고정 텍스트로 처리 (자동갱신 안 함) */\n text?: string;\n }\n\n export interface ColorScheme {\n /** 사용자 정의 색상 테마 이름 */\n name: string;\n /** 텍스트/배경 어두운 색 1 (#RRGGBB) */\n tb_color_dark_1: string;\n /** 텍스트/배경 밝은 색 1 (#RRGGBB) */\n tb_color_light_1: string;\n /** 텍스트/배경 어두운 색 2 (#RRGGBB) */\n tb_color_dark_2: string;\n /** 텍스트/배경 밝은 색 2 (#RRGGBB) */\n tb_color_light_2: string;\n /** 강조 색 1 (#RRGGBB) */\n accent_1: string;\n /** 강조 색 2 (#RRGGBB) */\n accent_2: string;\n /** 강조 색 3 (#RRGGBB) */\n accent_3: string;\n /** 강조 색 4 (#RRGGBB) */\n accent_4: string;\n /** 강조 색 5 (#RRGGBB) */\n accent_5: string;\n /** 강조 색 6 (#RRGGBB) */\n accent_6: string;\n /** 하이퍼링크 색 (#RRGGBB) */\n hyperlink: string;\n /** 방문한 하이퍼링크 색 (#RRGGBB) */\n opened_hyperlink: string;\n }\n\n export interface ShapeFilter {\n /** placeholder 제외 여부 */\n excludePlaceholder?: boolean;\n /** placeholder 유형 */\n placeholderType?: PlaceholderType;\n /** 도형 종류 */\n shapeType?: ShapeType;\n /** 도형 프리셋. ShapePreset 값(정확 매칭) 또는 ShapePresetFamily 키(계열 매칭). 배열로 여러 개 지정 가능 */\n presetId?: ShapePreset | ShapePresetFamily | string | (ShapePreset | ShapePresetFamily | string)[];\n /** 텍스트 포함 여부 */\n textContains?: string;\n /** 텍스트 존재 여부 */\n hasText?: boolean;\n /** 채우기 유형 */\n fillType?: FillType;\n /** 채우기 색상 (hex) */\n fillColor?: string;\n /** 선 존재 여부 */\n hasLine?: boolean;\n /** 선 색상 (hex) */\n lineColor?: string;\n /** 슬라이드 9등분 기준 위치 */\n position?: GridPosition;\n /** 슬라이드 대비 상대 크기 */\n size?: SizeCategory;\n /** 하이퍼링크 존재 여부 */\n hasHyperlink?: boolean;\n /** 효과 적용 여부 */\n hasEffect?: boolean;\n }\n\n export interface TableFilter {\n /** 셀 텍스트 포함 여부 */\n textContains?: string;\n /** 행 수 */\n rowCount?: number;\n /** 열 수 */\n colCount?: number;\n }\n\n export interface CommentFilter {\n /** 댓글 텍스트 포함 여부 */\n textContains?: string;\n /** 답글 여부 */\n isReply?: boolean;\n /** 특정 부모의 답글만 필터 */\n parentCommentId?: string;\n }\n\n export interface Transition {\n /** 전환 효과 종류 */\n type: TransitionType;\n /** 전환 속도 (기본값: 효과별 기본 속도) */\n speed?: SpeedType;\n /** 전환 방향. 효과별 유효값 상이 — push/cover/pull/wipe/flip:l/r/u/d, comb:horz/vert, split/plus/zoom:in/out, strips:lu/ld/ru/rd (기본값: 효과별 기본 방향) */\n dir?: TransitionEffectDir;\n /** 분할 방향 (SPLIT 효과 전용: horz|vert) (기본값: 효과 기본값) */\n orient?: TransitionEffectDir;\n /** 검은 화면을 거쳐 전환 (FADE/CUT 효과 전용) (기본값: false) */\n thruBlack?: boolean;\n /** 자동 진행 시간 (s) (기본값: 자동 진행 안 함) */\n advTm?: number;\n /** 클릭으로 진행 여부 (기본값: true(클릭 시 진행)) */\n advClick?: boolean;\n }\n\n export interface ChartFilter {\n /** 차트 종류 필터 */\n chartType?: ChartType;\n }\n\n export interface CommentPosition {\n /** X 좌표 (px 단위) */\n x: number;\n /** Y 좌표 (px 단위) */\n y: number;\n }\n\n export interface ShapeTransform {\n /** X 좌표 (px 단위) */\n x: number;\n /** Y 좌표 (px 단위) */\n y: number;\n /** 너비 (px 단위) */\n width: number;\n /** 높이 (px 단위) */\n height: number;\n /** 회전 각도 (degree) */\n angle: number;\n }\n\n export interface Hyperlink {\n /** 하이퍼링크 타입 (url/email/slideJump/showJump/file) */\n type: HyperlinkType;\n /** url/email 일 때의 대상 (email 은 mailto 접두어 제거) */\n urlOrEmail?: string;\n /** slideJump 일 때 대상 슬라이드 id */\n slideId?: string;\n /** showJump 일 때 쇼 점프 유형 */\n showJumpType?: ShowJumpType;\n /** file 일 때 파일 경로 */\n path?: string;\n }\n\n export interface ShapeMoveDistance {\n /** X 이동량 (px 단위, 양수 = 오른쪽) (기본값: 0(X 유지)) */\n x?: number;\n /** Y 이동량 (px 단위, 양수 = 아래) (기본값: 0(Y 유지)) */\n y?: number;\n }\n\n export interface Fill {\n /** 채우기 종류 (apiConstants.FillType). getFill 출력과 findShapes({fillType}) 필터가 같은 어휘를 쓴다 */\n type: FillType;\n /** solid: hex \"#RRGGBB\" 또는 scheme color */\n color?: string;\n /** solid/image: 투명도(0~100, 0=불투명일 때 생략) */\n alpha?: number;\n /** gradient: 그라데이션 유형(lin/circle/rect/shape) */\n gradientType?: GradientType;\n /** gradient: 각도(degree) */\n angle?: number;\n /** gradient: 색상 변화점 */\n stops?: { color: string; pos?: number; alpha?: number }[];\n /** image: 이미지 채우기 방식 */\n fillMode?: ImageFillMode;\n /** image: uploaded resource id for same-document setFill round-trip */\n embed?: string;\n /** image: original image width in px */\n width?: number;\n /** image: original image height in px */\n height?: number;\n /** image: 바둑판 오프셋 (pt). fillMode=ImageFillMode.TILE 일 때만 존재 */\n offset?: { x: number; y: number };\n /** image: 바둑판 배율 (%). fillMode=ImageFillMode.TILE 일 때만 존재 */\n scale?: { x: number; y: number };\n /** image: 바둑판 대칭. fillMode=ImageFillMode.TILE 일 때만 존재 */\n mirror?: ImageTileFlip;\n /** image: 바둑판 정렬 기준점. fillMode=ImageFillMode.TILE 일 때만 존재 */\n align?: RectAlign;\n /** image: 도형과 함께 회전 여부 (tile/stretch 공통) */\n rotateWithShape?: boolean;\n /** pattern: 무늬 프리셋 (apiConstants.PatternPreset) */\n preset?: PatternPreset;\n /** pattern: 전경색 (hex \"#RRGGBB\"/scheme) */\n foreColor?: string;\n /** pattern: 배경색 (hex \"#RRGGBB\"/scheme) */\n backColor?: string;\n /** pattern: 전경색 투명도 (0~100, 0=불투명일 때 생략) */\n foreAlpha?: number;\n /** pattern: 배경색 투명도 (0~100, 0=불투명일 때 생략) */\n backAlpha?: number;\n }\n\n export interface LineStyle {\n /** 선 채우기 종류 (apiConstants.FillType). getFill 출력과 같은 어휘 */\n type: FillType;\n /** solid: 선 색상 (hex \"#RRGGBB\"/scheme) */\n color?: string | null;\n /** solid: 투명도 (0~100, 0=불투명일 때 생략) */\n alpha?: number;\n /** gradient: 그라데이션 유형(lin/circle/rect/shape) */\n gradientType?: GradientType;\n /** gradient: 색상 변화점 */\n stops?: { color: string; pos?: number; alpha?: number }[];\n /** gradient: 각도(degree) */\n angle?: number;\n /** 선 두께 (pt). 선 없음이면 null */\n width: number | null;\n /** 선 대시 유형 */\n dash: LineDash | null;\n /** 선 끝 모양 */\n cap: LineCap | null;\n /** 선 연결(모서리) 유형 */\n join: LineJoin | null;\n }\n\n export interface Effects {\n /** 외부 그림자. 전체 필드를 setOuterShadow 공개 인자로 사용할 수 있다. 배치 파라미터는 sx/sy 배율·kx/ky 기울임(degree)·algn 정렬·rotWithShape 이다. alpha 항상 포함(불투명=0) */\n outerShadow?: { color: string; alpha: number; blur: number; dist: number; dir: number; sx: number; sy: number; kx: number; ky: number; algn: string; rotWithShape: boolean };\n /** 내부 그림자 (setInnerShadow). 내부 그림자는 배치 파라미터가 없다 */\n innerShadow?: { color: string; alpha: number; blur: number; dist: number; dir: number };\n /** 네온(광선) (setGlow). alpha 항상 포함(불투명=0) */\n glow?: { color: string; alpha: number; rad: number };\n /** 옅은 테두리 (setSoftEdge) */\n softEdge?: { rad: number };\n /** 반사. 전체 필드를 setReflection 공개 인자로 사용할 수 있다. 렌더에 반영되는 것은 blur/dist/endPos/startAlpha/endAlpha 이며 dir 은 렌더가 참조하지 않는다. 배치 파라미터는 sx/sy 배율·kx/ky 기울임(degree)·algn 정렬·rotWithShape 이다. stPos·fadeDir 은 웹쇼 렌더가 참조하지 않지만, 외부 문서(PowerPoint 등)에서 온 값이 setReflection 의 기본값으로 덮이지 않도록 함께 반환한다 */\n reflection?: { blur: number; dist: number; stPos: number; endPos: number; dir: number; fadeDir: number; startAlpha: number; endAlpha: number; sx: number; sy: number; kx: number; ky: number; algn: string; rotWithShape: boolean };\n /** 카메라(회전) 3D (set3d 의 scene3d) */\n scene3d?: Scene3d;\n /** 입체(깊이) 3D (set3d 의 sp3d) */\n sp3d?: Sp3d;\n }\n\n export interface ImageFillDetail {\n /** 바둑판 오프셋 (pt) (기본값: {x: 0, y: 0}) */\n offset?: { x?: number; y?: number };\n /** 바둑판 배율 (%) (기본값: {x: 100, y: 100}) */\n scale?: { x?: number; y?: number };\n /** 바둑판 대칭 (기본값: ImageTileFlip.NONE) */\n mirror?: ImageTileFlip;\n /** 바둑판 정렬 기준점 (기본값: RectAlign.TOP_LEFT) */\n align?: RectAlign;\n /** 도형과 함께 회전 여부 (기본값: 기존 동작 유지(기본 true)) */\n rotateWithShape?: boolean;\n }\n\n export interface Effect {\n /** 효과 타입 */\n type: EffectType;\n /** 효과 색상 (outer/inner shadow, glow 에만 사용) */\n color?: EffectColor;\n /** 흐림 반경 (pt) */\n blurRad?: number;\n /** 거리 (pt) */\n dist?: number;\n /** 방향 (degree) */\n dir?: number;\n /** glow/softEdge 반경 (pt) */\n rad?: number;\n /** reflection 크기 (0~100) */\n endPos?: number;\n }\n\n export interface EffectColor {\n /** hex (#RRGGBB) 또는 scheme color */\n strVal: string;\n /** 투명도 (0~100, UI 단위) */\n colorEffects?: { alpha: number };\n }\n\n export interface Scene3d {\n /** camera 프리셋 (orthographicFront, isometricLeftDown 등) */\n prst?: string;\n /** longitude (degree) */\n x?: number;\n /** latitude (degree) */\n y?: number;\n /** revolution (degree) */\n z?: number;\n }\n\n export interface Sp3d {\n /** z 값 (pt 단위) */\n z?: number;\n }\n\n export interface AdjustValue {\n /** 조절값 이름 */\n name: string;\n /** 현재 조절값(단위 기준 정수) */\n value: number;\n /** 설정 가능한 최솟값, 범위를 알 수 없으면 null */\n min: number | null;\n /** 설정 가능한 최댓값, 범위를 알 수 없으면 null */\n max: number | null;\n /** 값의 단위. pct는 1/1000%, ang는 1/60000도이며 범위를 알 수 없으면 null */\n unit: string | null;\n }\n\n export interface AdjustValueUpdate {\n /** 조절값 이름(getAdjustValues 결과) */\n name: string;\n /** 조절값. 정수로 반올림되며 허용 범위를 벗어나면 최솟값 또는 최댓값으로 제한됨 */\n value: number;\n }\n\n export interface CellFilter {\n /** 셀 범위 (0-based, inclusive) */\n range?: { startRow: number; startCol: number; endRow: number; endCol: number };\n /** 특정 행만 (0-based, 대표 셀 기준) */\n rowIndex?: number;\n /** 특정 열만 (0-based, 대표 셀 기준) */\n colIndex?: number;\n /** true: 텍스트 비어있는 셀, false: 텍스트 있는 셀 */\n isEmpty?: boolean;\n /** true: 병합 대표 셀, false: 단일 셀 */\n isMerged?: boolean;\n /** 셀 텍스트에 포함된 문자열 */\n textContains?: string;\n /** 셀 배경색 일치 (hex \"#RRGGBB\", 대소문자 무시, 스타일 상속분 미포함) */\n fillColor?: string;\n /** tcPr 에 fill 이 명시적으로 설정됐는지 (스타일 상속분 미포함) */\n hasFill?: boolean;\n /** tcPr 에 상하좌우 테두리 1개 이상 명시적으로 설정됐는지 (스타일 상속분 미포함) */\n hasBorder?: boolean;\n }\n\n export interface BorderStyle {\n /** 테두리 색상 (hex \"#RRGGBB\"). 색 없음이면 null */\n color: string | null;\n /** 선 두께 (pt) */\n width: number | null;\n /** 선 대시 유형 */\n dash: LineDash | null;\n }\n\n export interface FontStyle {\n /** 글자 크기 (pt) */\n fontSize?: number;\n /** 굵게 여부 */\n bold?: boolean;\n /** 기울임 여부 */\n italic?: boolean;\n /** 밑줄 유형 */\n underline?: Underline;\n /** 취소선 유형 */\n strike?: Strike;\n /** 글자 색상 (hex #RRGGBB 또는 scheme color) */\n textColor?: string;\n /** 글꼴 이름 */\n fontFamily?: string;\n /** 기준선 이동 (양수: 위 첨자, 음수: 아래 첨자) */\n baselineShift?: number;\n }\n\n export interface ParagraphStyle {\n /** 가로 정렬 */\n alignH?: TextAlignH;\n /** 줄 간격 값 (UI \"줄 간격\"의 값). MULTIPLE 이면 배수 백분율(150=1.5배), EXACT 면 pt */\n lineSpacing?: number;\n /** 줄 간격 유형 (기본값: LineSpacingType.MULTIPLE) */\n lineSpacingType?: LineSpacingType;\n /** 단락 전체의 왼쪽 여백 (pt, UI \"텍스트 앞\") */\n marginLeft?: number;\n /** 첫 줄만의 들여쓰기 (pt, UI \"첫 줄\"). 양수는 들여쓰기, 음수는 내어쓰기, 0 은 없음 */\n firstLineIndent?: number;\n /** 단락 앞 간격 (pt, UI \"문단 위\") */\n spaceBefore?: number;\n /** 단락 뒤 간격 (pt, UI \"문단 아래\") */\n spaceAfter?: number;\n }\n\n // =============================================================================\n // Classes\n // =============================================================================\n\n // 가드 target 핸들의 명목 브랜드 키 — 비-export 선언 전용 심볼이라 런타임 값이 없고\n // 외부 코드가 키를 참조할 수도 없다. 인터페이스의 [__proxyBrand] 멤버에서만 사용한다.\n declare const __proxyBrand: unique symbol;\n\n /** 문서 전체를 다루는 진입점으로, 슬라이드 조회·검색(getSlide/findShapes/findText 등), 슬라이드 삽입·삭제·복제·이동(insertSlide/deleteSlide/duplicateSlide 등), 날짜·슬라이드 번호·바닥글 일괄 설정(setDate/setSlideNumber/setFooter 등), 테마 적용(setDocumentColorScheme/setFontScheme/setFmtScheme 등), 저장·다운로드·인쇄(save/download/print 등), 슬라이드 쇼 시작(startSlideShow)을 제공한다. */\n export interface Document {\n /**\n * 문서(캔버스) 정보를 반환한다.\n *\n * @returns 슬라이드 영역의 가로·세로 크기 (px) 와 전체 슬라이드 수\n */\n getDocumentInfo(): Promise<{ width: number; height: number; slideCount: number }>;\n /**\n * 슬라이드 영역 크기 (px). 문서 내 모든 슬라이드가 공유하는 단일 값.\n *\n * @returns 슬라이드 영역의 가로·세로 크기 (px)\n */\n getSlideSize(): Promise<{ width: number; height: number }>;\n /**\n * 인덱스로 슬라이드를 가져온다.\n *\n * @param index - 0-based\n * @returns 해당 슬라이드 (범위를 벗어나면 null)\n */\n getSlide(index: number): Promise<Slide | null>;\n /**\n * 슬라이드 ID로 슬라이드를 가져온다.\n *\n * @param slideId - 슬라이드 ID\n * @returns 해당 슬라이드 (없으면 null)\n */\n getSlideById(slideId: string): Promise<Slide | null>;\n /**\n * 슬라이드의 0-based 인덱스를 찾는다.\n *\n * @param slideProxy - 대상 슬라이드\n * @returns -1 if not found\n */\n getSlideIndex(slideProxy: Slide): Promise<number>;\n /**\n * 문서의 모든 슬라이드를 순서대로 반환한다.\n *\n * @returns 슬라이드 목록\n */\n getSlides(): Promise<Slide[]>;\n /**\n * 지정한 슬라이드가 속한 마스터의 레이아웃 목록을 반환한다.\n * 레이아웃은 마스터 단위의 상위 개념이라 문서 레벨에서 조회한다.\n *\n * @param slideProxy - 대상 슬라이드\n */\n getLayoutList(slideProxy: Slide): Promise<{ id: string; type: SlideLayoutType; name: string }[]>;\n /**\n * @returns 문서의 전체 슬라이드 수\n */\n getSlideCount(): Promise<number>;\n /**\n * 현재 보기의 슬라이드를 반환한다.\n */\n getCurrentSlide(): Promise<Slide | null>;\n /**\n * 조건에 맞는 슬라이드를 검색한다.\n *\n * @param filter - 검색 조건 (기본값: 전체 슬라이드)\n * @returns 조건에 맞는 슬라이드 목록\n */\n findSlides(filter?: SlideFilter): Promise<Slide[]>;\n /**\n * 여러 슬라이드에서 조건에 맞는 도형을 검색한다.\n * 슬라이드별 검색은 Slide.findShapes 와 동일하며, 결과를 슬라이드 순서대로 합친다.\n *\n * @param slides - 검색 대상 슬라이드\n * @param filter - 검색 조건 (Slide.findShapes 와 동일) (기본값: 전체 도형)\n * @returns 조건에 맞는 도형 목록\n */\n findShapes(slides: Slide[], filter?: ShapeFilter): Promise<(Shape | Image | Line | Group | Chart | Table | Diagram | OleObject | Control)[]>;\n /**\n * 여러 슬라이드에서 조건에 맞는 표를 검색한다.\n *\n * @param slides - 검색 대상 슬라이드\n * @param filter - 검색 조건 (Slide.findTables 와 동일) (기본값: 전체 표)\n * @returns 조건에 맞는 표 목록\n */\n findTables(slides: Slide[], filter?: TableFilter): Promise<Table[]>;\n /**\n * 여러 슬라이드에서 조건에 맞는 차트를 검색한다.\n *\n * @param slides - 검색 대상 슬라이드\n * @param filter - 검색 조건 (Slide.findCharts 와 동일) (기본값: 전체 차트)\n * @returns 조건에 맞는 차트 목록\n */\n findCharts(slides: Slide[], filter?: ChartFilter): Promise<Chart[]>;\n /**\n * 여러 슬라이드에서 조건에 맞는 댓글을 검색한다.\n *\n * @param slides - 검색 대상 슬라이드\n * @param filter - 검색 조건 (Slide.findComments 와 동일) (기본값: 전체 댓글)\n * @returns 조건에 맞는 댓글 목록\n */\n findComments(slides: Slide[], filter?: CommentFilter): Promise<Comment[]>;\n /**\n * 텍스트를 검색한다. slideProxyList 를 주면 그 슬라이드들만 검색한다.\n * 매치는 문서 순서(슬라이드 → 도형 → 표 셀)로 반환된다.\n * 병합된 표 셀, 슬라이드 번호·날짜 같은 자동 갱신 필드, 문단 경계를 가로지르는 매치는 검색되지 않는다.\n *\n * @param query - 찾을 텍스트\n * @param slideProxyList - 검색 대상 슬라이드 (기본값: 전체 슬라이드)\n * @param caseSensitive - 대소문자 구분 (기본값: false)\n * @returns 매치 목록. target 은 표 셀 매치면 TableCell, 아니면 도형 프록시(Shape)이며, range 를 그대로 서식 API 에 넘겨 매치 구간만 편집할 수 있다 (예: `m.target.setBold(true, m.range)`). range 의 from/to 는 글자 offset(to 포함), text 는 검색 시점의 매치 텍스트다.\n */\n findText(query: string, slideProxyList?: Slide[], caseSensitive?: boolean): Promise<{ target: (TableCell | Shape); range: { from: number; to: number }; text: string }[]>;\n /**\n * 적용 가능한 표 스타일 이름 목록을 반환한다.\n * 여기서 얻은 이름을 slide.insertTable / table.setStyle 에 그대로 넘긴다.\n *\n * @returns 표 스타일 이름 목록 (편집기 '표 스타일' 갤러리와 동일)\n */\n getTableStyleNames(): Promise<string[]>;\n /**\n * 적용 가능한 색상 테마(빌트인 + 사용자 정의) 목록을 반환한다.\n *\n * @returns 색상 테마 목록 (prst: 프리셋 이름, name: 표시 이름, colors: 슬롯 이름 → #RRGGBB)\n */\n getColorSchemeList(): Promise<{ prst: string; name: string; colors: Record<string, unknown> }[]>;\n /**\n * 적용 가능한 테마 글꼴(빌트인 + 사용자 정의) 목록을 반환한다.\n *\n * @returns 테마 글꼴 목록 (prst: 프리셋 이름, name: 표시 이름)\n */\n getFontSchemeList(): Promise<{ prst: string; name: string }[]>;\n /**\n * 적용 가능한 테마 효과 목록을 반환한다.\n *\n * @returns 테마 효과 목록 (prst: 프리셋 이름, name: 표시 이름)\n */\n getFmtSchemeList(): Promise<{ prst: string; name: string }[]>;\n /**\n * 댓글 메모 스타일 프리셋 목록을 반환한다. setComment 계열에 styleIndex 를 전달할 때 name 으로 식별.\n *\n * @returns - styleIndex 는 1-based\n */\n getCommentStyleList(): Promise<{ styleIndex: number; name: string }[]>;\n /**\n * 차트 프리셋 스타일(1~12)별 계열 색 팔레트를 현재 테마 기준으로 반환한다. set_chart_style 의 style 을 고를 때 참고용.\n * style 은 색 그룹(4) × 배경/선 변형(3) 조합. 색은 그룹으로만 결정되므로 같은 그룹(예: 1~3)은 colors 가 동일하고,\n * 그룹 내 차이(뒤 1/2/3)는 배경/선 변형(variant)이다. 색은 테마 accent 에 종속 — 테마가 바뀌면 값도 바뀐다.\n */\n getChartStyleList(): Promise<{ style: number; colors: string[]; variant: string }[]>;\n /**\n * 검색 텍스트를 찾아 모두 새 텍스트로 바꾼다. (모두 바꾸기) slideProxyList 를 주면 그 슬라이드들만 바꾼다.\n * 병합된 표 셀, 슬라이드 번호·날짜 같은 자동 갱신 필드, 문단 경계를 가로지르는 매치는 바뀌지 않는다.\n * 협업 잠금 등으로 편집할 수 없는 텍스트의 매치도 바꾸지 않고 skippedCount 로 반환한다.\n *\n * @param query - 찾을 텍스트\n * @param replacement - 바꿀 텍스트. 빈 문자열이면 매치를 삭제한다 (기본값: \"\")\n * @param slideProxyList - 치환 대상 슬라이드 (기본값: 전체 슬라이드)\n * @param caseSensitive - 대소문자 구분 (기본값: false)\n * @returns 치환한 매치 수 / 제외한 매치 수\n */\n replaceText(query: string, replacement?: string, slideProxyList?: Slide[], caseSensitive?: boolean): Promise<{ replacedCount: number; skippedCount: number }>;\n /**\n * 새 슬라이드를 삽입한다.\n *\n * @param index - 삽입 위치 (0-based) (기본값: 마지막에 추가)\n * @param layoutType - 레이아웃 종류. 같은 type 이 여럿이면 첫 번째. 지정한 type 미존재 시 BLANK (문서에 BLANK 가 없으면 첫 번째 마스터의 첫 번째 레이아웃) (기본값: SlideLayoutType.BLANK)\n * @returns 삽입된 슬라이드\n */\n insertSlide(index?: number, layoutType?: SlideLayoutType): Promise<Slide>;\n /**\n * 이미지(URL / data:URI)를 서버 파일 DB 에 업로드한다. (SVG 임포트의 이미지 처리)\n * 업로드 해소는 ApiUtils.uploadImageLink 로 공통화돼 있다(도형/배경 setImageFill·htmlImport 공유).\n *\n * @param url - 이미지 URL 또는 data URI\n */\n uploadImageFromUrl(url: string): Promise<{isError:boolean, src?:string, width?:number, height?:number}>;\n /**\n * 슬라이드 하나를 삭제한다.\n *\n * @param slideProxy - 삭제할 슬라이드\n */\n deleteSlide(slideProxy: Slide): Promise<void>;\n /**\n * 여러 슬라이드를 일괄 삭제한다.\n *\n * @param slideProxyList - 삭제할 슬라이드 배열\n */\n deleteSlides(slideProxyList: Slide[]): Promise<void>;\n /**\n * 슬라이드 하나를 복제한다.\n *\n * @param slideProxy - 복제할 슬라이드\n * @returns 복제된 슬라이드 Proxy\n */\n duplicateSlide(slideProxy: Slide): Promise<Slide | null>;\n /**\n * 여러 슬라이드를 일괄 복제한다.\n *\n * @param slideProxyList - 복제할 슬라이드 배열\n * @returns 복제된 슬라이드 Proxy 배열\n */\n duplicateSlides(slideProxyList: Slide[]): Promise<Slide[]>;\n /**\n * 슬라이드를 다른 위치로 이동한다.\n *\n * @param fromIndex - 이동 원본 인덱스 (0-based)\n * @param toIndex - 이동 대상 인덱스 (0-based)\n */\n moveSlide(fromIndex: number, toIndex: number): Promise<void>;\n /**\n * 지정한 슬라이드로 현재 보기를 전환한다.\n *\n * @param slideProxy - 이동할 슬라이드\n */\n goToSlide(slideProxy: Slide): Promise<void>;\n /**\n * 모든 슬라이드의 날짜 머리글/바닥글을 설정한다. (없으면 생성, 있으면 갱신)\n *\n * @param date - 날짜 설정 (기본값: 자동갱신 날짜)\n */\n setDate(date?: HeaderFooterDate): Promise<void>;\n /**\n * 모든 슬라이드의 날짜 머리글/바닥글을 제거한다.\n */\n removeDate(): Promise<void>;\n /**\n * 모든 슬라이드에 슬라이드 번호를 표시한다.\n */\n setSlideNumber(): Promise<void>;\n /**\n * 모든 슬라이드의 슬라이드 번호를 제거한다.\n */\n removeSlideNumber(): Promise<void>;\n /**\n * 모든 슬라이드의 바닥글을 설정한다. (없으면 생성, 있으면 갱신)\n *\n * @param text - 바닥글 텍스트\n */\n setFooter(text: string): Promise<void>;\n /**\n * 모든 슬라이드의 바닥글을 제거한다.\n */\n removeFooter(): Promise<void>;\n /**\n * 여러 슬라이드의 숨김 상태를 일괄 변경한다.\n *\n * @param slideProxyList - 대상 슬라이드 배열\n * @param isHidden - true: 숨김, false: 표시\n */\n hideSlides(slideProxyList: Slide[], isHidden: boolean): Promise<void>;\n /**\n * 여러 슬라이드의 배경을 일괄 초기화한다.\n *\n * @param slideProxyList - 대상 슬라이드 배열\n */\n resetBackgrounds(slideProxyList: Slide[]): Promise<void>;\n /**\n * 여러 슬라이드에 전환 효과를 일괄 적용한다. (단일 undo 로 처리)\n * 효과가 지원하는 옵션만 반영되며, 주지 않은 값은 기본 모델에서 채운다.\n * 효과 제거는 type 으로 하지 않고 removeTransition() 을 사용한다.\n *\n * @param slideProxyList - 대상 슬라이드 배열 (전체 적용은 getSlides() 를 넘긴다)\n * @param transition - 전환 효과 설정\n */\n setTransition(slideProxyList: Slide[], transition: Transition): Promise<void>;\n /**\n * 여러 슬라이드의 전환 효과를 제거한다. (단일 undo 로 처리)\n *\n * @param slideProxyList - 대상 슬라이드 배열\n */\n removeTransition(slideProxyList: Slide[]): Promise<void>;\n /**\n * 문서 전체의 색상 테마를 변경한다.\n * getColorSchemeList 로 목록을 확인한 뒤 prst 를 전달한다.\n *\n * @param colorSchemePrst - 색상 테마 프리셋 이름\n */\n setDocumentColorScheme(colorSchemePrst: string): Promise<void>;\n /**\n * 지정한 슬라이드들에만 색상 테마를 적용한다.\n * 이후 setDocumentColorScheme 으로 문서 전체 테마를 바꾸면 여기서 준 슬라이드별 재정의는 모두 해제된다.\n * getColorSchemeList 로 목록을 확인한 뒤 prst 를 전달한다.\n *\n * @param slideProxyList - 대상 슬라이드 배열\n * @param colorSchemePrst - 색상 테마 프리셋 이름\n */\n setSlideColorScheme(slideProxyList: Slide[], colorSchemePrst: string): Promise<void>;\n /**\n * 사용자 정의 색상 테마를 생성하고 현재 문서에 적용한다.\n *\n * @param colorScheme - 새 색상 테마 정보\n */\n createColorScheme(colorScheme: ColorScheme): Promise<void>;\n /**\n * 문서의 테마 글꼴을 변경한다.\n * getFontSchemeList 로 목록을 확인한 뒤 prst 를 전달한다.\n *\n * @param fontSchemePrst - 테마 글꼴 프리셋 이름\n */\n setFontScheme(fontSchemePrst: string): Promise<void>;\n /**\n * 문서의 테마 효과를 변경한다.\n * getFmtSchemeList 로 목록을 확인한 뒤 prst 를 전달한다.\n *\n * @param fmtSchemePrst - 테마 효과 프리셋 이름\n */\n setFmtScheme(fmtSchemePrst: string): Promise<void>;\n /**\n * 문서를 저장한다.\n * (서버 I/O 이므로 Actor 경유)\n */\n save(): Promise<void>;\n /**\n * 문서를 닫는다.\n * (앱 레벨 동작이므로 Actor 경유)\n */\n close(): Promise<void>;\n /**\n * 문서를 다운로드한다.\n * (서버 I/O 이므로 Actor 경유)\n */\n download(): Promise<void>;\n /**\n * 문서를 PDF 로 변환해 다운로드한다. 원본 형식(pptx 등)으로 받으려면 download() 를 사용한다.\n * 요청만 보내고 변환 완료를 기다리지 않는다 — 변환 진행·실패는 앱 상태 UI 가 표시한다.\n * OfficeFilter 사용 시 해당 API 미지원 (미구현)\n * (서버 변환·I/O 이므로 Actor 경유)\n */\n downloadAsPdf(): Promise<void>;\n /**\n * 현재 문서를 인쇄한다.\n * (브라우저 인쇄/PDF 등 앱 레벨 동작이므로 Actor 경유)\n */\n print(): Promise<void>;\n /**\n * 문서 전체의 댓글 표시 여부를 설정한다.\n *\n * @param show - true: 댓글 표시, false: 댓글 숨김\n */\n showComments(show: boolean): Promise<void>;\n /**\n * 슬라이드 쇼(전체화면 발표)를 시작한다.\n *\n * @param fromCurrent - true: 현재 슬라이드부터, false: 처음부터 (기본값: false)\n */\n startSlideShow(fromCurrent?: boolean): Promise<void>;\n /**\n * 지정한 범위를 모두 선택한다.\n *\n * @param scope - \"shape\": 현재 슬라이드의 모든 도형 - \"slide\": 모든 슬라이드 - \"text\": 현재 편집 중인 텍스트 전체 (텍스트 편집 중이 아니면 아무 것도 선택 안 함) (기본값: SelectScope.SHAPE)\n * @returns 선택 대상이 없으면 false\n */\n selectAll(scope?: SelectScope): Promise<boolean>;\n /**\n * 편집 화면의 보기 배율/맞춤을 변경한다.\n *\n * @param mode - 보기 배율 또는 창 맞춤. 허용값은 ViewMode 의 8개뿐이다.\n */\n setViewMode(mode: ViewMode): Promise<void>;\n }\n\n /** 슬라이드 한 장을 다루는 핸들로, 도형·표·차트·댓글 조회와 검색(getShapes/findShapes/findText 등), 개체 삽입(insertShape/insertTable/insertImage 등), 도형 그룹·복제·삭제·배분(groupShapes/duplicateShape/deleteShape 등), 배경 채우기(setFill 계열), 레이아웃·전환 효과(setLayout/setTransition 등), 슬라이드 노트 편집(setSlideNoteText 등)을 제공한다. */\n export interface Slide {\n /**\n * 슬라이드의 모든 도형을 반환한다.\n *\n * @returns 도형 목록\n */\n getShapes(): Promise<(Shape | Image | Line | Group | Chart | Table | Diagram | OleObject | Control)[]>;\n /**\n * 인덱스로 도형을 가져온다.\n *\n * @param index - 0-based\n * @returns 해당 도형 (범위를 벗어나면 null)\n */\n getShape(index: number): Promise<Shape | Image | Line | Group | Chart | Table | Diagram | OleObject | Control | null>;\n /**\n * 도형 ID로 도형을 가져온다.\n *\n * @param shapeId - 도형 ID\n * @returns 해당 도형 (없으면 null)\n */\n getShapeById(shapeId: string): Promise<Shape | Image | Line | Group | Chart | Table | Diagram | OleObject | Control | null>;\n /**\n * 조건에 맞는 도형을 검색한다.\n *\n * @param filter - 검색 조건 (기본값: 전체 도형)\n * @returns 조건에 맞는 도형 목록\n */\n findShapes(filter?: ShapeFilter): Promise<(Shape | Image | Line | Group | Chart | Table | Diagram | OleObject | Control)[]>;\n /**\n * 조건에 맞는 표를 검색한다.\n *\n * @param filter - 검색 조건 (기본값: 전체 표)\n * @returns 조건에 맞는 표 목록\n */\n findTables(filter?: TableFilter): Promise<Table[]>;\n /**\n * 슬라이드의 최상위 댓글(답글 제외) 목록을 반환한다.\n *\n * @returns 댓글 목록\n */\n getComments(): Promise<Comment[]>;\n /**\n * 댓글 ID로 댓글을 가져온다.\n *\n * @param commentId - 댓글 ID\n * @returns 해당 댓글 (없으면 null)\n */\n getComment(commentId: string): Promise<Comment | null>;\n /**\n * UI의 메모 탐색 기준으로 이전 최상위 댓글을 반환한다.\n *\n * @param commentProxy - 기준 최상위 댓글\n * @returns 이전 댓글 (없으면 null)\n */\n getPrevComment(commentProxy: Comment): Promise<Comment | null>;\n /**\n * UI의 메모 탐색 기준으로 다음 최상위 댓글을 반환한다.\n *\n * @param commentProxy - 기준 최상위 댓글\n * @returns 다음 댓글 (없으면 null)\n */\n getNextComment(commentProxy: Comment): Promise<Comment | null>;\n /**\n * 조건에 맞는 댓글을 검색한다.\n *\n * @param filter - 검색 조건 (기본값: 전체 댓글)\n * @returns 조건에 맞는 댓글 목록\n */\n findComments(filter?: CommentFilter): Promise<Comment[]>;\n /**\n * 이 슬라이드에서 텍스트를 검색한다. 매치는 도형 → 표 셀 순서로 반환된다.\n * 병합된 표 셀, 슬라이드 번호·날짜 같은 자동 갱신 필드, 문단 경계를 가로지르는 매치는 검색되지 않는다.\n *\n * @param query - 찾을 텍스트\n * @param caseSensitive - 대소문자 구분 (기본값: false)\n * @returns 매치 목록. target 은 표 셀 매치면 TableCell, 아니면 도형 프록시(Shape)이며, range(글자 offset, to 포함)를 그대로 서식 API 에 넘겨 매치 구간만 편집할 수 있다 (예: `m.target.setBold(true, m.range)`). text 는 검색 시점의 매치 텍스트다.\n */\n findText(query: string, caseSensitive?: boolean): Promise<{ target: (TableCell | Shape); range: { from: number; to: number }; text: string }[]>;\n /**\n * 슬라이드 노트의 텍스트를 plain text 로 반환한다.\n * 노트 슬라이드가 없으면 생성하지 않고 빈 문자열을 반환한다.\n */\n getSlideNoteText(): Promise<string>;\n /**\n * 슬라이드에 명시적으로 설정된 배경 채우기를 반환한다. (setSolidFill/setGradientFill/setImageFill 대칭)\n * 레이아웃/마스터 상속 배경은 포함하지 않으며, 슬라이드 자체 배경이 없으면 `{ type: \"none\" }`.\n *\n * @returns 배경 채우기 정보\n */\n getBackgroundFill(): Promise<Fill>;\n /**\n * 슬라이드에 적용된 레이아웃 종류를 반환한다. (setLayout 대칭)\n *\n * @returns 레이아웃 종류. 없으면 null\n */\n getLayoutType(): Promise<SlideLayoutType | null>;\n /**\n * 슬라이드 전환 효과를 setTransition 의 평면 입력 형태로 반환한다. (setTransition 대칭)\n * 표준 효과는 완전 대칭이나, 한쇼 확장 저장 케이스(대각선 wipe/strips 는 wipeout,\n * plus 안쪽은 fourboxwipe)는 부분 복원된다: wipeout 은 type=strips 로 되돌아가며(대각선 wipe 와 strips 는\n * 동일 애니메이션이라 strips 로 통일), dur/spokes 등 setTransition 입력이 아닌 값은 반환하지 않는다.\n *\n * @returns 전환 효과 설정. 효과 없으면 null\n */\n getTransition(): Promise<Transition | null>;\n /**\n * 이 슬라이드에서 검색 텍스트를 찾아 모두 새 텍스트로 바꾼다. (모두 바꾸기)\n * 병합된 표 셀, 슬라이드 번호·날짜 같은 자동 갱신 필드, 문단 경계를 가로지르는 매치는 바뀌지 않는다.\n * 협업 잠금 등으로 편집할 수 없는 텍스트의 매치도 바꾸지 않고 skippedCount 로 반환한다.\n *\n * @param query - 찾을 텍스트\n * @param replacement - 바꿀 텍스트. 빈 문자열이면 매치를 삭제한다 (기본값: \"\")\n * @param caseSensitive - 대소문자 구분 (기본값: false)\n * @returns 치환한 매치 수 / 제외한 매치 수\n */\n replaceText(query: string, replacement?: string, caseSensitive?: boolean): Promise<{ replacedCount: number; skippedCount: number }>;\n /**\n * 도형을 삽입한다.\n *\n * @param presetId - 도형 프리셋 ID (ShapePreset enum 참조) (기본값: ShapePreset.RECT)\n * @param transform - 위치/크기 (px 단위) (기본값: 슬라이드 중앙, 기본 크기)\n * @param transform.x - X 좌표 (px) (기본값: 가로 중앙)\n * @param transform.y - Y 좌표 (px) (기본값: 세로 중앙)\n * @param transform.width - 너비 (px) (기본값: 프리셋 기본 크기)\n * @param transform.height - 높이 (px) (기본값: 프리셋 기본 크기)\n * @param transform.angle - 회전 각도 (degree) (기본값: 0)\n * @returns 삽입된 도형\n */\n insertShape(presetId?: ShapePreset, transform?: { x?: number; y?: number; width?: number; height?: number; angle?: number }): Promise<Shape | Line>;\n /**\n * 글상자(텍스트박스)를 삽입한다. 삽입 후 반환된 프록시의 setText/insertText 로 텍스트를 넣는다.\n *\n * @param transform - 위치/크기 (px 단위) (기본값: 슬라이드 중앙, 기본 크기)\n * @param transform.x - X 좌표 (px) (기본값: 가로 중앙)\n * @param transform.y - Y 좌표 (px) (기본값: 세로 중앙)\n * @param transform.width - 너비 (px) (기본값: 기본 크기)\n * @param transform.height - 높이 (px) (기본값: 기본 크기)\n * @param transform.angle - 회전 각도 (degree) (기본값: 0)\n */\n insertTextBox(transform?: { x?: number; y?: number; width?: number; height?: number; angle?: number }): Promise<Shape>;\n /**\n * 표를 삽입한다.\n *\n * @param rowNum - 행 수\n * @param colNum - 열 수\n * @param styleName - 표 스타일 이름 (doc.getTableStyleNames() 결과). 목록에 없는 이름이면 throw (기본값: 문서 기본 스타일)\n * @returns 삽입된 표\n */\n insertTable(rowNum: number, colNum: number, styleName?: string): Promise<Table>;\n /**\n * 조건에 맞는 차트 배열을 반환한다.\n *\n * @param filter - 검색 조건 (기본값: 전체 차트)\n */\n findCharts(filter?: ChartFilter): Promise<Chart[]>;\n /**\n * 웹 이미지를 삽입한다.\n *\n * @param url - 이미지 URL\n * @returns 삽입된 이미지 도형 Proxy\n */\n insertImage(url: string): Promise<Image>;\n /**\n * 웹 동영상(YouTube / 3DS)을 삽입한다.\n *\n * @param url - 웹 동영상 URL (YouTube watch/embed/shorts/youtu.be, 3DS media)\n * @returns 삽입된 웹 동영상 도형 Proxy\n */\n insertWebVideo(url: string): Promise<Image>;\n /**\n * 슬라이드의 도형들을 하나의 이미지로 저장한다. (기존 UI 동작과 동일)\n *\n * @param shapeProxyList - 이미지로 저장할 도형 Proxy 배열\n */\n saveAsPicture(shapeProxyList: (Shape | Image | Line | Group | Chart | Table | Diagram | OleObject | Control)[]): Promise<void>;\n /**\n * 여러 도형을 하나의 그룹으로 묶는다.\n *\n * @param shapeProxyList - 그룹화할 도형 Proxy 배열\n * @returns 생성된 그룹 도형\n */\n groupShapes(shapeProxyList: (Shape | Image | Line | Group | Chart | Table | Diagram | OleObject | Control)[]): Promise<Group>;\n /**\n * 그룹을 해제해 자식 도형으로 분리한다.\n *\n * @param shapeProxy - 그룹 해제할 그룹 도형 Proxy\n * @returns 분리된 자식 도형 배열\n */\n ungroupShapes(shapeProxy: Group): Promise<(Shape | Image | Line | Group | Chart | Table | Diagram | OleObject | Control)[]>;\n /**\n * 도형 하나를 삭제한다.\n *\n * @param shapeProxy - 삭제할 도형 Proxy\n */\n deleteShape(shapeProxy: Shape | Image | Line | Group | Chart | Table | Diagram | OleObject | Control): Promise<void>;\n /**\n * 여러 도형을 일괄 삭제한다.\n *\n * @param shapeProxyList - 삭제할 도형 Proxy 배열\n */\n deleteShapes(shapeProxyList: (Shape | Image | Line | Group | Chart | Table | Diagram | OleObject | Control)[]): Promise<void>;\n /**\n * 도형을 복제한다. 차트는 복제할 수 없어 null을 반환한다.\n *\n * @param shapeProxy - 복제할 도형 Proxy\n * @returns 새로 생성된 도형 Proxy\n */\n duplicateShape(shapeProxy: Shape | Image | Line | Group | Chart | Table | Diagram | OleObject | Control): Promise<Shape | Image | Line | Group | Chart | Table | Diagram | OleObject | Control | null>;\n /**\n * 도형을 복제한다. 차트는 복제할 수 없어 결과에서 제외된다.\n *\n * @param shapeProxyList - 복제할 도형 Proxy 배열\n * @returns 새로 생성된 도형 Proxy 배열\n */\n duplicateShapes(shapeProxyList: (Shape | Image | Line | Group | Chart | Table | Diagram | OleObject | Control)[]): Promise<(Shape | Image | Line | Group | Chart | Table | Diagram | OleObject | Control)[]>;\n /**\n * 여러 도형을 균등하게 분배(distribute) 한다.\n * bbox 중심 기준으로 정렬한 뒤, 양 끝 도형 사이 간격이 모두 같아지도록 재배치한다. (2개 미만이면 변경 없음)\n *\n * @param shapeProxyList - 분배할 도형 Proxy 배열\n * @param direction - 분배 방향\n */\n distributeShapes(shapeProxyList: (Shape | Image | Line | Group | Chart | Table | Diagram | OleObject | Control)[], direction: DistributeDirection): Promise<void>;\n /**\n * 이 슬라이드의 숨김 상태를 설정한다.\n *\n * @param isHidden - true: 슬라이드 숨김, false: 슬라이드 표시\n */\n hide(isHidden: boolean): Promise<void>;\n /**\n * 슬라이드에 레이아웃을 적용한다.\n * 같은 type 이 여럿이면 마스터 순서상 첫 번째 레이아웃이 선택된다.\n *\n * @param layoutType - 레이아웃 종류. doc.getLayoutList(slide) 로 사용 가능한 type 확인\n * @returns 적용 여부 (해당 type 이 이 슬라이드의 마스터에 없으면 false)\n */\n setLayout(layoutType: SlideLayoutType): Promise<boolean>;\n /**\n * 슬라이드 레이아웃을 초기화한다.\n */\n resetLayout(): Promise<void>;\n /**\n * 슬라이드 배경을 초기화한다.\n */\n resetBackground(): Promise<void>;\n /**\n * 마스터(레이아웃)의 배경 도형 표시 여부를 설정한다.\n *\n * @param show - true: 마스터 도형 표시, false: 숨김\n */\n setShowMasterShapes(show: boolean): Promise<void>;\n /**\n * 슬라이드 배경을 단색으로 설정한다.\n *\n * @param color - hex (#RRGGBB) 또는 scheme color\n * @param alpha - 투명도 (0~100) (기본값: 0(불투명))\n */\n setSolidFill(color: string, alpha?: number): Promise<void>;\n /**\n * 슬라이드 배경을 그라데이션으로 설정한다.\n *\n * @param type - 그라데이션 유형 (lin/circle/rect/shape) (기본값: GradientType.LINEAR)\n * @param stops - 색상 변화점. pos 생략 시 균등 분배, alpha 는 투명도(0~100) (기본값: [{ color: \"accent1\", pos: 0 }, { color: \"bg1\", pos: 100 }])\n * @param angle - 그라데이션 각도 (lin 일 때만 사용) (기본값: 45)\n * @example\n * slide.setGradientFill(\"lin\", [{ color: \"#FF0000\" }, { color: \"#0000FF\" }], 90);\n */\n setGradientFill(type?: GradientType, stops?: { color: string; pos?: number; alpha?: number }[], angle?: number): Promise<void>;\n /**\n * 슬라이드 배경을 이미지로 설정한다.\n *\n * @param imageUrl - 이미지 URL\n * @param fillMode - 이미지 채우기 방식 (기본값: ImageFillMode.STRETCH)\n * @param alpha - 투명도 (0~100) (기본값: 0(불투명))\n * @param detail - 세부 옵션. offset/scale/mirror/align 은 fillMode=ImageFillMode.TILE 일 때만 반영 (기본값: {})\n * @returns 이미지 업로드 후 배경 적용이 끝나면 resolve\n */\n setImageFill(imageUrl: string, fillMode?: ImageFillMode, alpha?: number, detail?: ImageFillDetail): Promise<void>;\n /**\n * 슬라이드 배경 채우기를 제거한다.\n */\n removeFill(): Promise<void>;\n /**\n * 슬라이드 배경을 패턴(무늬)으로 설정한다. (getBackgroundFill 왕복 대칭 — setFill 의 pattern 경로)\n *\n * @param preset - 무늬 프리셋 (apiConstants.PatternPreset)\n * @param foreColor - 전경색 hex (#RRGGBB) 또는 scheme color (기본값: accent1(테마 강조색1))\n * @param backColor - 배경색 hex (#RRGGBB) 또는 scheme color (기본값: bg1(테마 배경색1))\n * @param foreAlpha - 전경색 투명도 (0~100) (기본값: 0(불투명))\n * @param backAlpha - 배경색 투명도 (0~100) (기본값: 0(불투명))\n */\n setPatternFill(preset: PatternPreset, foreColor?: string, backColor?: string, foreAlpha?: number, backAlpha?: number): Promise<void>;\n /**\n * getBackgroundFill() 이 반환한 채우기 객체를 그대로 슬라이드 배경에 적용한다. (getBackgroundFill 대칭)\n * type 으로 분기해 대응 setter 를 호출한다. image 는 readback 의 embed 를 재사용해 같은 문서 안에서 복원한다.\n * embed 가 없는 image 입력은 무시된다(새 이미지는 개별 setImageFill 사용).\n *\n * @param fill - getBackgroundFill() 반환값\n */\n setFill(fill: Fill): Promise<void>;\n /**\n * 댓글을 추가한다.\n *\n * @param text - 댓글 텍스트\n * @returns 생성된 댓글 (실패 시 null)\n */\n insertComment(text: string): Promise<Comment | null>;\n /**\n * 댓글에 답글을 추가한다.\n *\n * @param commentProxy - 부모 댓글\n * @param text - 답글 텍스트\n * @returns 생성된 답글 (실패 시 null)\n */\n replyComment(commentProxy: Comment, text: string): Promise<Comment | null>;\n /**\n * 댓글 하나를 삭제한다. 부모 댓글이면 그 답글도 함께 삭제된다.\n *\n * @param commentProxy - 삭제할 댓글\n */\n deleteComment(commentProxy: Comment): Promise<void>;\n /**\n * 여러 댓글을 일괄 삭제한다. 부모 댓글이 포함되면 그 답글도 함께 삭제된다. (UI 동작과 일치)\n *\n * @param commentProxyList - 삭제할 댓글 배열\n */\n deleteComments(commentProxyList: Comment[]): Promise<void>;\n /**\n * 슬라이드 전환 효과를 설정한다. 평면 입력을 모델 포맷으로 변환해 적용한다.\n * 효과가 지원하는 옵션만 반영되며, 주지 않은 값은 기본 모델에서 채운다.\n * 효과 제거는 type 으로 하지 않고 removeTransition() 을 사용한다.\n *\n * @param transition - 전환 효과 설정\n */\n setTransition(transition: Transition): Promise<void>;\n /**\n * 전환 효과를 제거한다.\n */\n removeTransition(): Promise<void>;\n /**\n * 이 슬라이드에 설정된 전환 효과 미리보기를 화면에서 재생한다.\n * 미리보기는 현재 보고 있는 슬라이드에서만 동작하므로, 이 슬라이드가 현재 슬라이드가\n * 아니면 재생하지 않고 예외를 던진다. 다른 슬라이드는 먼저 goToSlide 로 이동한 뒤 호출한다.\n * 문서를 변경하지 않는 표시용 동작이다.\n *\n * @param autoPreview - 지정하면 재생 대신 '자동 미리보기 설정'을 on/off 로 토글한다 (전환 효과 설정 시 자동으로 미리보기를 재생할지 여부, 앱 전역 설정) (기본값: 없음(즉시 미리보기 재생))\n */\n previewTransition(autoPreview?: boolean): Promise<void>;\n /**\n * 이 슬라이드의 날짜 머리글/바닥글을 설정한다. (없으면 생성, 있으면 갱신)\n *\n * @param date - 날짜 설정 (기본값: 자동갱신 날짜)\n */\n setDate(date?: HeaderFooterDate): Promise<void>;\n /**\n * 이 슬라이드의 날짜 머리글/바닥글을 제거한다.\n */\n removeDate(): Promise<void>;\n /**\n * 이 슬라이드에 슬라이드 번호를 표시한다.\n */\n setSlideNumber(): Promise<void>;\n /**\n * 이 슬라이드의 슬라이드 번호를 제거한다.\n */\n removeSlideNumber(): Promise<void>;\n /**\n * 이 슬라이드의 바닥글을 설정한다. (없으면 생성, 있으면 갱신)\n *\n * @param text - 바닥글 텍스트\n */\n setFooter(text: string): Promise<void>;\n /**\n * 이 슬라이드의 바닥글을 제거한다.\n */\n removeFooter(): Promise<void>;\n /**\n * 슬라이드 노트 텍스트를 설정한다. (기존 노트 내용은 대체됨)\n *\n * @param text - 노트 텍스트\n */\n setSlideNoteText(text: string): Promise<void>;\n /**\n * 슬라이드 노트 끝에 텍스트를 이어 붙인다.\n *\n * @param text - 추가할 노트 텍스트\n */\n appendSlideNoteText(text: string): Promise<void>;\n }\n\n /** 댓글 하나를 다루는 핸들로, 내용·작성자·작성 시각·위치 조회(getText/getAuthorName/getDateTime 등), 답글 관계 조회(isReply/getParentId/getReplies 등), 내용 수정(setText/appendText), 위치 이동(moveBy/setPosition), 표시 스타일 변경(setStyle)을 제공한다. */\n export interface Comment {\n /**\n * 댓글 텍스트를 반환한다.\n *\n * @returns 댓글 텍스트\n */\n getText(): Promise<string>;\n /**\n * 댓글 작성자 이름을 반환한다.\n *\n * @returns 작성자 이름 (작성자 정보가 없으면 빈 문자열)\n */\n getAuthorName(): Promise<string>;\n /**\n * 댓글 작성 일시를 반환한다.\n *\n * @returns 작성 일시 'YYYY-MM-DDTHH:mm:ss.SSS'\n */\n getDateTime(): Promise<string>;\n /**\n * 댓글 메모 아이콘의 슬라이드 기준 위치를 반환합니다.\n *\n * @returns 댓글 메모 아이콘의 위치 (px 단위)\n */\n getPosition(): Promise<CommentPosition>;\n /**\n * 이 댓글이 답글인지 여부를 반환한다.\n *\n * @returns 답글이면 true\n */\n isReply(): Promise<boolean>;\n /**\n * 부모 댓글 ID를 반환한다.\n *\n * @returns 부모 댓글 ID (답글이 아니면 빈 문자열)\n */\n getParentId(): Promise<string>;\n /**\n * 답글이 하나라도 있는지 여부를 반환한다.\n *\n * @returns 답글이 있으면 true\n */\n hasReplies(): Promise<boolean>;\n /**\n * 이 댓글의 답글 목록을 반환한다.\n *\n * @returns 답글 목록\n */\n getReplies(): Promise<Comment[]>;\n /**\n * 댓글 텍스트를 설정한다. (기존 내용은 대체됨)\n *\n * @param text - 댓글 텍스트\n */\n setText(text: string): Promise<void>;\n /**\n * 댓글 텍스트 끝에 이어 붙인다.\n *\n * @param text - 추가할 텍스트\n */\n appendText(text: string): Promise<void>;\n /**\n * 댓글 메모를 x, y 만큼 상대 이동시킵니다.\n *\n * @param distance - { x, y } (px 단위 이동량). 양수 = 오른쪽/아래\n */\n moveBy(distance: Record<string, unknown>): Promise<void>;\n /**\n * 댓글 메모를 슬라이드 기준 절대 위치로 이동시킵니다. (상대 이동은 moveBy)\n *\n * @param position - { x, y } (px 단위 절대 좌표). 생략한 축은 현재값 유지\n */\n setPosition(position: CommentPosition): Promise<void>;\n /**\n * 댓글 메모 스타일을 변경합니다.\n * 적용 가능한 styleIndex 와 색 이름은 Document.getCommentStyleList() 로 조회\n *\n * @param styleIndex - 스타일 인덱스 (1-based, getCommentStyleList 의 styleIndex)\n */\n setStyle(styleIndex: number): Promise<void>;\n }\n\n /** 모든 도형 종류가 공유하는 공통 API 로, 위치·크기·회전 조회와 변경(getTransform/moveBy/rotate 등), 정렬·순서·뒤집기(align/reorder/flip), 하이퍼링크(getHyperlink/setHyperlink/removeHyperlink), 도형 종류 판별 가드(isShape/isImage/isChart 등)를 제공한다. */\n export interface BaseShape {\n /**\n * 이 핸들이 `Shape` 인지 판별한다 (union 좁히기용 type guard).\n * SDK 핸들의 내부 판별값을 동기 검사한다 — postMessage 왕복 없음, await 불필요.\n */\n isShape(): this is Shape;\n /**\n * 이 핸들이 `Image` 인지 판별한다 (union 좁히기용 type guard).\n * SDK 핸들의 내부 판별값을 동기 검사한다 — postMessage 왕복 없음, await 불필요.\n */\n isImage(): this is Image;\n /**\n * 이 핸들이 `Line` 인지 판별한다 (union 좁히기용 type guard).\n * SDK 핸들의 내부 판별값을 동기 검사한다 — postMessage 왕복 없음, await 불필요.\n */\n isLine(): this is Line;\n /**\n * 이 핸들이 `Group` 인지 판별한다 (union 좁히기용 type guard).\n * SDK 핸들의 내부 판별값을 동기 검사한다 — postMessage 왕복 없음, await 불필요.\n */\n isGroup(): this is Group;\n /**\n * 이 핸들이 `Chart` 인지 판별한다 (union 좁히기용 type guard).\n * SDK 핸들의 내부 판별값을 동기 검사한다 — postMessage 왕복 없음, await 불필요.\n */\n isChart(): this is Chart;\n /**\n * 이 핸들이 `Table` 인지 판별한다 (union 좁히기용 type guard).\n * SDK 핸들의 내부 판별값을 동기 검사한다 — postMessage 왕복 없음, await 불필요.\n */\n isTable(): this is Table;\n /**\n * 이 핸들이 `Diagram` 인지 판별한다 (union 좁히기용 type guard).\n * SDK 핸들의 내부 판별값을 동기 검사한다 — postMessage 왕복 없음, await 불필요.\n */\n isDiagram(): this is Diagram;\n /**\n * 이 핸들이 `OleObject` 인지 판별한다 (union 좁히기용 type guard).\n * SDK 핸들의 내부 판별값을 동기 검사한다 — postMessage 왕복 없음, await 불필요.\n */\n isOleObject(): this is OleObject;\n /**\n * 이 핸들이 `Control` 인지 판별한다 (union 좁히기용 type guard).\n * SDK 핸들의 내부 판별값을 동기 검사한다 — postMessage 왕복 없음, await 불필요.\n */\n isControl(): this is Control;\n /**\n * 도형의 위치, 크기, 회전 정보를 반환한다.\n *\n * @returns 도형의 위치·크기·회전 정보. 모델 없음(협업 삭제 등)이면 null\n */\n getTransform(): Promise<ShapeTransform | null>;\n /**\n * 도형의 너비를 반환한다. (setWidth 대칭)\n *\n * @returns 너비 (px 단위). 모델 없음이면 null\n */\n getWidth(): Promise<number | null>;\n /**\n * 도형의 높이를 반환한다. (setHeight 대칭)\n *\n * @returns 높이 (px 단위). 모델 없음이면 null\n */\n getHeight(): Promise<number | null>;\n /**\n * 도형의 X 좌표를 반환한다. (setX 대칭)\n *\n * @returns X 좌표 (px 단위). 모델 없음이면 null\n */\n getX(): Promise<number | null>;\n /**\n * 도형의 Y 좌표를 반환한다. (setY 대칭)\n *\n * @returns Y 좌표 (px 단위). 모델 없음이면 null\n */\n getY(): Promise<number | null>;\n /**\n * 도형의 회전 각도를 반환한다. (rotate 대칭)\n *\n * @returns 회전 각도 (degree). 모델 없음이면 null\n */\n getRotation(): Promise<number | null>;\n /**\n * 도형의 OOXML preset id (prst) 를 반환한다.\n *\n * @returns preset id (prst), 없으면 null\n */\n getPresetId(): Promise<string | null>;\n /**\n * 도형이 placeholder(제목 · 본문 틀 등)인지 반환한다.\n *\n * @returns placeholder 여부\n */\n isPlaceholder(): Promise<boolean>;\n /**\n * 도형에 설정된 하이퍼링크를 반환한다.\n * 반환 객체를 그대로 setHyperlink 에 넘길 수 있다.\n * 지원하지 않는 action(program/macro/ole 등)은 공개 타입으로 노출하지 않고 null 을 반환한다.\n *\n * @returns 하이퍼링크 정보. 하이퍼링크(action)가 없으면 null\n */\n getHyperlink(): Promise<Hyperlink | null>;\n /**\n * 도형의 너비를 설정한다.\n *\n * @param width - 너비 (px 단위)\n */\n setWidth(width: number): Promise<void>;\n /**\n * 도형의 높이를 설정한다.\n *\n * @param height - 높이 (px 단위)\n */\n setHeight(height: number): Promise<void>;\n /**\n * 도형의 X 좌표를 절대값으로 설정한다. (상대 이동은 comment.moveBy 등과 구분)\n *\n * @param x - X 좌표 (px 단위)\n */\n setX(x: number): Promise<void>;\n /**\n * 도형의 Y 좌표를 절대값으로 설정한다.\n *\n * @param y - Y 좌표 (px 단위)\n */\n setY(y: number): Promise<void>;\n /**\n * 도형을 현재 위치 기준으로 x, y 만큼 상대 이동한다. (절대 좌표 설정은 setX / setY)\n *\n * @param distance - 이동량 (px 단위)\n */\n moveBy(distance: ShapeMoveDistance): Promise<void>;\n /**\n * 도형을 회전한다.\n *\n * @param rotation - 회전 각도 (degree)\n */\n rotate(rotation: number): Promise<void>;\n /**\n * 도형의 위치·크기·회전을 한 번에 설정한다. getTransform() 반환값을 그대로 넘길 수 있다. (getTransform 대칭)\n * 제공된 필드만 적용하며, 각 필드는 개별 setter 의 잠금 가드(canResize/canMove/canRotate)를 따른다.\n * 크기→위치→회전 순으로 개별 액션을 발생시키므로 실행 취소는 여러 단계가 될 수 있다.\n *\n * @param transform - 위치/크기 (px) · 회전 (degree) (기본값: 현재 값 유지)\n */\n setTransform(transform?: ShapeTransform): Promise<void>;\n /**\n * 도형을 상하 또는 좌우로 반전한다.\n *\n * @param direction - 반전 방향\n */\n flip(direction: FlipDirection): Promise<void>;\n /**\n * 도형의 정렬 순서(앞으로/뒤로)를 변경한다.\n *\n * @param order - 순서 변경 타입\n */\n reorder(order: ShapeZOrder): Promise<void>;\n /**\n * 도형을 슬라이드 기준으로 정렬한다.\n *\n * @param alignType - 정렬 타입\n */\n align(alignType: AlignType): Promise<void>;\n /**\n * 도형에 하이퍼링크를 설정한다. (getHyperlink 대칭 — 반환 객체를 그대로 넘겨 하이퍼링크를 복사할 수 있다)\n * other(program/macro/ole 등)와 유효하지 않은 대상(없는 슬라이드 id·ShowJumpType 밖의 값)은 무시한다.\n *\n * @param hyperlink - getHyperlink() 반환값 (baseShape 의 Hyperlink). type 이 없으면 무시한다\n */\n setHyperlink(hyperlink: Hyperlink): Promise<void>;\n /**\n * 도형의 하이퍼링크를 제거한다.\n */\n removeHyperlink(): Promise<void>;\n }\n\n /** 채우기·선·효과를 지원하는 도형들의 공통 API 로, 채우기(setSolidFill/setGradientFill/setImageFill 등), 선 서식(setLineColor/setLineWidth/setLineDash 등), 그림자·네온·부드러운 가장자리·반사 효과(setOuterShadow/setGlow/setSoftEdge 등), 3D 서식(set3d/remove3d)을 제공한다. */\n export interface BasePathShape extends BaseShape {\n /**\n * 도형 채우기를 반환한다. (setSolidFill/setGradientFill/setImageFill/removeFill 대칭)\n * type 으로 분기해 그대로 대응 setter 에 넘길 수 있다.\n *\n * @returns 채우기 정보. noFill 이면 `{ type: FillType.NONE }`, 모델 없음(협업 삭제 등)이면 null\n */\n getFill(): Promise<Fill | null>;\n /**\n * 선 스타일을 반환한다. (setLineColor/setLineWidth/setLineDash/setLineCap/setLineJoin 대칭)\n *\n * 선 채우기는 getFill 과 같은 판별 유니언으로 읽는다 — type 으로 분기하며 단색은 color,\n * 그라데이션은 gradientType/stops/angle 을 담는다.\n *\n * @returns 선 스타일. 모델 없으면 null\n */\n getLineStyle(): Promise<LineStyle | null>;\n /**\n * 선 색상을 반환한다. (setLineColor 대칭. 투명도까지 필요하면 getLineStyle 사용)\n *\n * @returns 선 색상 (hex \"#RRGGBB\"/scheme). 선 없음/모델 없음이면 null\n */\n getLineColor(): Promise<string | null>;\n /**\n * 선 두께(pt)를 반환한다. (setLineWidth 대칭)\n *\n * @returns 선 두께 (pt). 선 없음/모델 없음이면 null\n */\n getLineWidth(): Promise<number | null>;\n /**\n * 선 대시 유형을 반환한다. (setLineDash 대칭)\n *\n * @returns 선 대시 유형. LineDash enum 이 아니거나 모델 없음이면 null\n */\n getLineDash(): Promise<LineDash | null>;\n /**\n * 선 끝 모양(cap)을 반환한다. (setLineCap 대칭)\n *\n * @returns 선 끝 모양. 없음/모델 없음이면 null\n */\n getLineCap(): Promise<LineCap | null>;\n /**\n * 선 연결 유형(join)을 반환한다. (setLineJoin 대칭)\n *\n * @returns 선 연결(모서리) 유형. 없음/모델 없음이면 null\n */\n getLineJoin(): Promise<LineJoin | null>;\n /**\n * 도형에 적용된 효과를 반환한다. 적용된 효과만 키로 포함된다.\n * 각 값은 대응 setter(setOuterShadow/setInnerShadow/setGlow/setSoftEdge/setReflection/set3d) 인자와 대칭.\n * 모델 UI obj 를 경유하므로 길이(pt)·비율(%)은 소수 첫째 자리까지만 정확하다 — 그보다 작은 차이는\n * 왕복에서 반올림된다(렌더에는 나타나지 않는 수준).\n *\n * @returns 효과 정보. 적용된 효과가 없으면 빈 객체 `{}`, 모델 없음(협업 삭제 등)이면 null\n */\n getEffects(): Promise<Effects | null>;\n /**\n * 도형 채우기를 단색으로 설정한다.\n *\n * @param color - hex (#RRGGBB) 또는 scheme color\n * @param alpha - 투명도 (0~100) (기본값: 0(불투명))\n */\n setSolidFill(color: string, alpha?: number): Promise<void>;\n /**\n * 그라데이션 채우기를 설정한다.\n *\n * @param type - 그라데이션 유형 (lin/circle/rect/shape) (기본값: GradientType.LINEAR)\n * @param stops - 색상 변화점. pos 생략 시 균등 분배, alpha 는 투명도(0~100, 0=불투명) (기본값: [{ color: \"accent1\", pos: 0 }, { color: \"bg1\", pos: 100 }])\n * @param angle - 그라데이션 각도 (lin 일 때만 사용) (기본값: 45)\n * @example shape.setGradientFill(\"lin\", [{ color: \"#FF0000\" }, { color: \"#0000FF\" }], 90);\n */\n setGradientFill(type?: GradientType, stops?: { color: string; pos?: number; alpha?: number }[], angle?: number): Promise<void>;\n /**\n * 이미지 채우기를 설정한다.\n *\n * @param imageUrl - 이미지 URL\n * @param fillMode - 이미지 채우기 방식 (기본값: ImageFillMode.STRETCH)\n * @param alpha - 투명도 (0~100) (기본값: 0(불투명))\n * @param detail - 세부 옵션. offset/scale/mirror/align 은 fillMode=ImageFillMode.TILE 일 때만 반영 (기본값: {})\n * @returns 이미지 업로드 후 채우기 적용이 끝나면 resolve\n * @example shape.setImageFill(url, ImageFillMode.TILE, 0, { scale: { x: 50, y: 50 }, mirror: \"x\", align: \"tl\", rotateWithShape: true });\n */\n setImageFill(imageUrl: string, fillMode?: ImageFillMode, alpha?: number, detail?: ImageFillDetail): Promise<void>;\n /**\n * 채우기를 제거한다 (noFill).\n */\n removeFill(): Promise<void>;\n /**\n * 패턴(무늬) 채우기를 설정한다. (getFill 왕복 대칭 — setFill 의 pattern 경로)\n *\n * @param preset - 무늬 프리셋 (apiConstants.PatternPreset)\n * @param foreColor - 전경색 hex (#RRGGBB) 또는 scheme color (기본값: accent1(테마 강조색1))\n * @param backColor - 배경색 hex (#RRGGBB) 또는 scheme color (기본값: bg1(테마 배경색1))\n * @param foreAlpha - 전경색 투명도 (0~100) (기본값: 0(불투명))\n * @param backAlpha - 배경색 투명도 (0~100) (기본값: 0(불투명))\n */\n setPatternFill(preset: PatternPreset, foreColor?: string, backColor?: string, foreAlpha?: number, backAlpha?: number): Promise<void>;\n /**\n * getFill() 이 반환한 채우기 객체를 그대로 적용한다. (getFill 대칭 — 도형→도형 채우기 복사)\n * type 으로 분기해 대응 setter 를 호출한다. image 는 readback 의 embed 를 재사용해 같은 문서 안에서 복원한다.\n * embed 가 없는 image 입력은 무시된다(새 이미지는 개별 setImageFill 사용).\n *\n * @param fill - getFill() 반환값\n */\n setFill(fill: Fill): Promise<void>;\n /**\n * 선 색상을 설정한다.\n *\n * @param color - hex (#RRGGBB) 또는 scheme color\n * @param alpha - 투명도 (0~100, UI 단위) (기본값: 0(불투명))\n */\n setLineColor(color: string, alpha?: number): Promise<void>;\n /**\n * 선(테두리) 그라데이션 채우기를 설정한다.\n *\n * @param type - 그라데이션 유형 (lin/circle/rect/shape) (기본값: GradientType.LINEAR)\n * @param stops - 색상 변화점. pos 생략 시 균등 분배, alpha 는 투명도(0~100, 0=불투명) (기본값: [{ color: \"accent1\", pos: 0 }, { color: \"bg1\", pos: 100 }])\n * @param angle - 그라데이션 각도 (lin 일 때만 사용) (기본값: 45)\n * @example shape.setLineGradient(\"lin\", [{ color: \"#FF0000\" }, { color: \"#0000FF\" }], 90);\n */\n setLineGradient(type?: GradientType, stops?: { color: string; pos?: number; alpha?: number }[], angle?: number): Promise<void>;\n /**\n * 선 색상을 제거한다 (noFill).\n */\n removeLineColor(): Promise<void>;\n /**\n * 선 두께를 설정한다.\n *\n * @param lineWidth - 선 두께 (pt 단위)\n */\n setLineWidth(lineWidth: number): Promise<void>;\n /**\n * 선 스타일(대시)을 설정한다.\n *\n * @param lineDash - 선 대시 스타일\n */\n setLineDash(lineDash: LineDash): Promise<void>;\n /**\n * 선 끝 모양(cap)을 설정한다.\n *\n * @param lineCap - 선 끝 모양\n */\n setLineCap(lineCap: LineCap): Promise<void>;\n /**\n * 선 연결 유형(join)을 설정한다.\n *\n * @param lineJoin - 선 연결(모서리) 유형\n */\n setLineJoin(lineJoin: LineJoin): Promise<void>;\n /**\n * getLineStyle() 이 반환한 선 스타일 객체를 그대로 적용한다. (getLineStyle 대칭 — 도형→도형 선 복사)\n *\n * @param style - getLineStyle() 반환값 (basePathShape.LineStyle)\n */\n setLineStyle(style: LineStyle): Promise<void>;\n /**\n * 외부 그림자를 적용한다.\n *\n * @param shadow - 그림자 설정 (기본값: 전체 기본값)\n * @param shadow.color - hex 또는 scheme color (기본값: \"#000000\")\n * @param shadow.alpha - 투명도 (0~100, UI 단위) (기본값: 50)\n * @param shadow.blur - 흐림 반경 (pt) (기본값: 8)\n * @param shadow.dist - 거리 (pt) (기본값: 8)\n * @param shadow.dir - 방향 (degree) (기본값: 90)\n * @param shadow.sx - 가로 배율 (%) (기본값: 100)\n * @param shadow.sy - 세로 배율 (%) (기본값: 100)\n * @param shadow.kx - 가로 기울임 (degree) (기본값: 0)\n * @param shadow.ky - 세로 기울임 (degree) (기본값: 0)\n * @param shadow.algn - 정렬 기준 (기본값: RectAlign.CENTER)\n * @param shadow.rotWithShape - 도형 회전 연동 (기본값: false)\n */\n setOuterShadow(shadow?: { color?: string; alpha?: number; blur?: number; dist?: number; dir?: number; sx?: number; sy?: number; kx?: number; ky?: number; algn?: RectAlign; rotWithShape?: boolean }): Promise<void>;\n /**\n * 내부 그림자를 적용한다.\n *\n * @param shadow - 그림자 설정 (기본값: 전체 기본값)\n * @param shadow.color - hex 또는 scheme color (기본값: \"#000000\")\n * @param shadow.alpha - 투명도 (0~100, UI 단위) (기본값: 50)\n * @param shadow.blur - 흐림 반경 (pt) (기본값: 8)\n * @param shadow.dist - 거리 (pt) (기본값: 8)\n * @param shadow.dir - 방향 (degree) (기본값: 90)\n */\n setInnerShadow(shadow?: { color?: string; alpha?: number; blur?: number; dist?: number; dir?: number }): Promise<void>;\n /**\n * 네온(광선) 효과를 적용한다.\n *\n * @param glow - 네온(광선) 설정 (기본값: 전체 기본값)\n * @param glow.color - hex 또는 scheme color (기본값: \"#356FFF\")\n * @param glow.alpha - 투명도 (0~100, UI 단위) (기본값: 50)\n * @param glow.rad - 광선 반경 (pt) (기본값: 10)\n */\n setGlow(glow?: { color?: string; alpha?: number; rad?: number }): Promise<void>;\n /**\n * 옅은 테두리(softEdge) 효과를 적용한다.\n *\n * @param softEdge - 옅은 테두리 설정 (기본값: 전체 기본값)\n * @param softEdge.rad - 반경 (pt) (기본값: 5)\n */\n setSoftEdge(softEdge?: { rad?: number }): Promise<void>;\n /**\n * 반사 효과를 적용한다.\n *\n * @param reflection - 반사 설정 (기본값: 전체 기본값)\n * @param reflection.blur - 흐림 반경 (pt) (기본값: 0.5)\n * @param reflection.dist - 거리 (pt) (기본값: 8)\n * @param reflection.stPos - 시작 위치 (0~100). 웹쇼 렌더는 시작 위치를 쓰지 않는다. (기본값: 0)\n * @param reflection.endPos - 반사 크기 (0~100) (기본값: 50)\n * @param reflection.startAlpha - 시작 투명도 (0~100, UI 단위) (기본값: 50)\n * @param reflection.endAlpha - 끝 투명도 (0~100, UI 단위) (기본값: 99.7)\n * @param reflection.dir - 방향 (degree). 반사 렌더는 방향을 쓰지 않는다. (기본값: 90)\n * @param reflection.fadeDir - 페이드 방향 (degree). 웹쇼 렌더는 페이드 방향을 쓰지 않는다. (기본값: 90)\n * @param reflection.sx - 가로 배율 (%) (기본값: 100)\n * @param reflection.sy - 세로 배율 (%) (기본값: -100)\n * @param reflection.kx - 가로 기울임 (degree) (기본값: 0)\n * @param reflection.ky - 세로 기울임 (degree) (기본값: 0)\n * @param reflection.algn - 정렬 기준 (기본값: RectAlign.BOTTOM_LEFT)\n * @param reflection.rotWithShape - 도형 회전 연동 (기본값: false)\n */\n setReflection(reflection?: { blur?: number; dist?: number; stPos?: number; endPos?: number; startAlpha?: number; endAlpha?: number; dir?: number; fadeDir?: number; sx?: number; sy?: number; kx?: number; ky?: number; algn?: RectAlign; rotWithShape?: boolean }): Promise<void>;\n /**\n * 효과를 제거한다.\n *\n * @param effectType - 제거할 효과 타입\n */\n removeEffect(effectType: EffectType): Promise<void>;\n /**\n * 도형에 효과(그림자/광선/반사 등)를 직접 obj로 적용한다.\n * 단순 케이스는 setOuterShadow/setInnerShadow/setGlow/setSoftEdge/setReflection 사용 권장.\n *\n * @param effect - 적용할 효과 설정\n */\n setEffect(effect: Effect): Promise<void>;\n /**\n * 도형에 3D 효과를 적용한다. scene3d 또는 sp3d 중 비어있는 인자는 적용하지 않는다.\n *\n * @param scene3d - 카메라(회전) 설정 (기본값: 미적용)\n * @param sp3d - 입체(깊이) 설정 (기본값: 미적용)\n */\n set3d(scene3d?: Scene3d, sp3d?: Sp3d): Promise<void>;\n /**\n * 도형의 3D 효과를 제거한다.\n */\n remove3d(): Promise<void>;\n /**\n * getEffects() 가 반환한 효과 객체를 그대로 적용한다. (getEffects 대칭 — 도형→도형 효과 복사)\n * 포함된 효과 키만 대응 setter 로 적용한다. scene3d/sp3d 는 set3d 로 함께 넘긴다.\n *\n * @param effects - getEffects() 반환값 (basePathShape.Effects)\n */\n setEffects(effects: Effects): Promise<void>;\n }\n\n /** 일반 도형과 텍스트 상자를 다루는 핸들로, 텍스트 조회·편집(getText/setText/insertText 등), 글자 서식(setFontStyle/setBold/setFontSize 등), 문단 서식(setAlignH/setLineSpacing/setBulletStyle 등), 텍스트 상자 옵션(setAlignV/setTextboxAutoFit), 도형 모양 조절값(getAdjustValues/setAdjustValue 등)을 제공한다. */\n export interface Shape extends BasePathShape {\n /**\n * 선언 전용 명목 브랜드 — 멤버 구성이 같은 핸들 타입이 서로 대입 가능해져 가드\n * 내로잉이 무력화되는 것을 막는다. 런타임에 존재하지 않으며, 키 심볼이 비-export 라\n * 외부 코드에서 접근할 수 없다.\n */\n readonly [__proxyBrand]?: 'Shape';\n // BaseText\n /**\n * 대표 단락(range 가 걸친 첫 단락)의 단락 서식을 반환한다. (setParagraphStyle 대칭)\n * 반환 객체를 그대로 다른 개체의 setParagraphStyle 에 넘길 수 있다. 값이 없는 속성은 키를 생략한다.\n * 값은 레이아웃/마스터 상속이 반영된 해석값이다. 단락이 직접 지정한 값만 골라낼 수는 없다.\n * 같은 단락에 그대로 되돌려주면 상속값과 같은 속성은 오버라이드로 굳지 않고 지워진다. (updateTextPPr 동작)\n * 목록 수준은 서식 값이 아니라 상속 프리셋이라 이 객체에 담지 않는다. (getLevel 대칭)\n *\n * @param range - 읽을 텍스트 구간 (기본값: 전체 텍스트)\n * @returns 단락 서식 (baseText.ParagraphStyle). 텍스트/단락 없으면 null\n */\n getParagraphStyle(range?: { from: number; to: number }): Promise<ParagraphStyle | null>;\n /**\n * 대표 단락의 가로 정렬을 반환한다. (setAlignH 대칭)\n *\n * @param range - 읽을 텍스트 구간 (기본값: 전체 텍스트)\n * @returns 가로 정렬. 텍스트/단락 없으면 null\n */\n getAlignH(range?: { from: number; to: number }): Promise<TextAlignH | null>;\n /**\n * 대표 단락의 줄 간격 값을 반환한다. (setLineSpacing 대칭)\n *\n * @param range - 읽을 텍스트 구간 (기본값: 전체 텍스트)\n * @returns 줄 간격 값 (MULTIPLE: 배수%, EXACT: pt). 텍스트/단락 없으면 null\n */\n getLineSpacing(range?: { from: number; to: number }): Promise<number | null>;\n /**\n * 대표 단락의 줄 간격 유형을 반환한다. (setLineSpacing 의 type 대칭)\n *\n * @param range - 읽을 텍스트 구간 (기본값: 전체 텍스트)\n * @returns 줄 간격 유형. 텍스트/단락 없으면 null\n */\n getLineSpacingType(range?: { from: number; to: number }): Promise<LineSpacingType | null>;\n /**\n * 대표 단락의 단락 앞 간격(UI \"문단 위\")을 반환한다. (setSpaceBefore 대칭)\n *\n * @param range - 읽을 텍스트 구간 (기본값: 전체 텍스트)\n * @returns 단락 앞 간격 (pt). 배수(%) 저장/텍스트 없음이면 null\n */\n getSpaceBefore(range?: { from: number; to: number }): Promise<number | null>;\n /**\n * 대표 단락의 단락 뒤 간격(UI \"문단 아래\")을 반환한다. (setSpaceAfter 대칭)\n *\n * @param range - 읽을 텍스트 구간 (기본값: 전체 텍스트)\n * @returns 단락 뒤 간격 (pt). 배수(%) 저장/텍스트 없음이면 null\n */\n getSpaceAfter(range?: { from: number; to: number }): Promise<number | null>;\n /**\n * 대표 단락의 왼쪽 여백(UI \"텍스트 앞\")을 반환한다. (setMarginLeft 대칭)\n *\n * @param range - 읽을 텍스트 구간 (기본값: 전체 텍스트)\n * @returns 왼쪽 여백 (pt). 텍스트/단락 없으면 null\n */\n getMarginLeft(range?: { from: number; to: number }): Promise<number | null>;\n /**\n * 대표 단락의 첫 줄 들여쓰기(UI \"첫 줄\")를 반환한다. (setFirstLineIndent 대칭)\n *\n * @param range - 읽을 텍스트 구간 (기본값: 전체 텍스트)\n * @returns 첫 줄 들여쓰기 (pt, 음수는 내어쓰기). 텍스트/단락 없으면 null\n */\n getFirstLineIndent(range?: { from: number; to: number }): Promise<number | null>;\n /**\n * 대표 단락의 목록 수준을 반환한다. (setLevel 대칭)\n *\n * @param range - 읽을 텍스트 구간 (기본값: 전체 텍스트)\n * @returns 목록 수준 (1~9). 텍스트/단락 없으면 null\n */\n getLevel(range?: { from: number; to: number }): Promise<number | null>;\n /**\n * 텍스트를 plain text로 반환한다.\n *\n * @param range - 읽을 텍스트 구간 (기본값: 전체 텍스트)\n * @returns 해당 구간의 텍스트 (plain text). 텍스트 모델이 없거나 빈 구간이면 \"\"\n */\n getText(range?: { from: number; to: number }): Promise<string>;\n /**\n * 대표 run(첫 run)의 글꼴 스타일을 반환한다. (setFontStyle 대칭)\n * 반환 객체를 그대로 다른 개체의 setFontStyle 에 넘길 수 있다. 값이 없는 속성은 키를 생략한다.\n *\n * @returns 글꼴 스타일 (baseText.FontStyle). 런/스타일 없으면 빈 객체 `{}`, 텍스트 모델 없음(협업 삭제 등)이면 null\n */\n getFontStyle(): Promise<FontStyle | null>;\n /**\n * 대표 run 의 굵게 여부를 반환한다. (setBold 대칭)\n *\n * @returns 굵게 여부. 명시 안 됨(상속)/텍스트 없음이면 null\n */\n getBold(): Promise<boolean | null>;\n /**\n * 대표 run 의 기울임 여부를 반환한다. (setItalic 대칭)\n *\n * @returns 기울임 여부. 명시 안 됨/텍스트 없음이면 null\n */\n getItalic(): Promise<boolean | null>;\n /**\n * 대표 run 의 밑줄 유형을 반환한다. (setUnderline 대칭)\n *\n * @returns 밑줄 유형. 명시 안 됨/텍스트 없음이면 null\n */\n getUnderline(): Promise<Underline | null>;\n /**\n * 대표 run 의 취소선 유형을 반환한다. (setStrike 대칭)\n *\n * @returns 취소선 유형. 명시 안 됨/텍스트 없음이면 null\n */\n getStrike(): Promise<Strike | null>;\n /**\n * 대표 run 의 글자 크기(pt)를 반환한다. (setFontSize 대칭)\n *\n * @returns 글자 크기 (pt). 명시 안 됨/텍스트 없음이면 null\n */\n getFontSize(): Promise<number | null>;\n /**\n * 대표 run 의 글꼴 이름을 반환한다. (setFontFamily 대칭)\n *\n * @returns 글꼴 이름. 명시 안 됨/텍스트 없음이면 null\n */\n getFontFamily(): Promise<string | null>;\n /**\n * 대표 run 의 글자 색상을 반환한다. (setTextColor 대칭)\n *\n * @returns 글자 색상 (hex \"#RRGGBB\"/scheme). solid 아님/명시 안 됨/텍스트 없음이면 null\n */\n getTextColor(): Promise<string | null>;\n /**\n * 텍스트 구간의 하이퍼링크를 반환한다. (setTextHyperlink 대칭 —\n * 반환 객체를 그대로 넘겨 하이퍼링크를 복사할 수 있다)\n * range 를 주면 그 구간의 첫 글자, 없으면 텍스트 첫 글자가 속한 run 기준이다.\n * 도형 자체에 걸린 하이퍼링크는 getHyperlink 로 읽는다.\n *\n * @param range - 조회할 텍스트 구간 (기본값: 텍스트 첫 글자)\n * @returns 하이퍼링크 정보 (baseShape 의 Hyperlink). 링크 없음/텍스트 없음/미노출 action 이면 null\n */\n getTextHyperlink(range?: { from: number; to: number }): Promise<Hyperlink | null>;\n /**\n * 텍스트 상자 자동 맞춤 유형을 반환한다. (setTextboxAutoFit 대칭)\n *\n * @returns 자동 맞춤 유형. 텍스트 모델 없으면 null\n */\n getTextboxAutoFit(): Promise<AutoFitType | null>;\n /**\n * 텍스트를 설정한다. 인자 조합에 따라 다음과 같이 동작한다.\n * - range 없음: 전체 텍스트를 text 로 교체\n * - range 있음: 지정한 구간만 text 로 교체\n * - text 가 빈 문자열(\"\")이면 교체 대신 해당 범위를 삭제\n *\n * 삭제 없이 끼워넣는 삽입은 insertText 를 사용한다.\n * (단, from이 텍스트 끝(마지막 글자 다음 위치)이면 지울 글자가 없어 끝 삽입으로 동작한다)\n *\n * 대체된 자리의 글자 서식은 구간 시작 위치의 런 서식을, 문단 서식은 기존 문단의 서식을 따른다.\n *\n * @param text - 설정할 텍스트. 빈 문자열(\"\")이면 삭제로 동작\n * @param range - 교체할 텍스트 구간 to = from + 글자수 - 1 (0-based) 예: \"가나다\" 전체 = {from: 0, to: 2}, \"가나다\" 중 \"가\" = {from: 0, to: 0} (기본값: 전체 텍스트)\n */\n setText(text: string, range?: { from: number; to: number }): Promise<void>;\n /**\n * 텍스트를 삽입한다.\n * 삽입한 글자의 서식은 삽입 지점 바로 앞 글자의 런 서식을 따른다.\n *\n * @param text - 삽입할 텍스트\n * @param textOffset - 삽입 위치 offset (기본값: 텍스트 끝)\n */\n insertText(text: string, textOffset?: number): Promise<void>;\n /**\n * 글꼴 스타일을 설정한다. 단일 속성은 setBold/setItalic/setFontSize/setFontFamily/setTextColor 사용 권장.\n *\n * @param style - 글꼴 스타일 설정\n * @param range - 적용할 텍스트 구간 (기본값: 전체 텍스트)\n */\n setFontStyle(style: FontStyle, range?: { from: number; to: number }): Promise<void>;\n /**\n * 글자 굵게 설정.\n *\n * @param enabled - true: 굵게, false: 해제\n * @param range - 적용할 텍스트 구간 (기본값: 전체 텍스트)\n */\n setBold(enabled: boolean, range?: { from: number; to: number }): Promise<void>;\n /**\n * 글자 기울임 설정.\n *\n * @param enabled - true: 기울임, false: 해제\n * @param range - 적용할 텍스트 구간 (기본값: 전체 텍스트)\n */\n setItalic(enabled: boolean, range?: { from: number; to: number }): Promise<void>;\n /**\n * 글자 밑줄 설정.\n *\n * @param underline - 밑줄 유형\n * @param range - 적용할 텍스트 구간 (기본값: 전체 텍스트)\n */\n setUnderline(underline: Underline, range?: { from: number; to: number }): Promise<void>;\n /**\n * 글자 취소선 설정.\n *\n * @param strike - 취소선 유형\n * @param range - 적용할 텍스트 구간 (기본값: 전체 텍스트)\n */\n setStrike(strike: Strike, range?: { from: number; to: number }): Promise<void>;\n /**\n * 글자 크기 설정.\n *\n * @param fontSize - pt 단위\n * @param range - 적용할 텍스트 구간 (기본값: 전체 텍스트)\n */\n setFontSize(fontSize: number, range?: { from: number; to: number }): Promise<void>;\n /**\n * 글꼴 설정.\n *\n * @param fontFamily - 글꼴 이름\n * @param range - 적용할 텍스트 구간 (기본값: 전체 텍스트)\n */\n setFontFamily(fontFamily: string, range?: { from: number; to: number }): Promise<void>;\n /**\n * 글자 색상 설정.\n *\n * @param color - hex (#RRGGBB) 또는 scheme color\n * @param range - 적용할 텍스트 구간 (기본값: 전체 텍스트)\n */\n setTextColor(color: string, range?: { from: number; to: number }): Promise<void>;\n /**\n * 텍스트에 하이퍼링크를 설정한다. (getTextHyperlink 대칭 — 반환 객체를 그대로 넘겨 링크를 복사할 수 있다)\n * 도형 전체에 링크를 거는 setHyperlink 와 달리 글자(run)에 걸려 하이퍼링크 서식으로 표시된다.\n * other(program/macro/ole 등)와 유효하지 않은 대상(없는 슬라이드 id·ShowJumpType 밖의 값)은 무시한다.\n *\n * @param hyperlink - getTextHyperlink() 반환값 (baseShape 의 Hyperlink). type 이 없으면 무시한다\n * @param range - 적용할 텍스트 구간 (기본값: 전체 텍스트)\n */\n setTextHyperlink(hyperlink: Hyperlink, range?: { from: number; to: number }): Promise<void>;\n /**\n * 텍스트의 하이퍼링크를 제거한다. (도형 자체에 걸린 하이퍼링크는 removeHyperlink)\n *\n * @param range - 제거할 텍스트 구간 (기본값: 전체 텍스트)\n */\n removeTextHyperlink(range?: { from: number; to: number }): Promise<void>;\n /**\n * 지정한 offset 위치에 특수문자(symbol)를 삽입한다.\n *\n * @param textOffset - 삽입 위치 offset\n * @param symbol - 삽입할 특수문자\n */\n insertSymbol(textOffset: number, symbol: string): Promise<void>;\n /**\n * 텍스트 가로 정렬을 설정한다. range 를 주면 그 구간이 걸친 단락에만 적용한다.\n *\n * @param align - 가로 정렬\n * @param range - 적용할 텍스트 구간 (기본값: 전체 텍스트)\n */\n setAlignH(align: TextAlignH, range?: { from: number; to: number }): Promise<void>;\n /**\n * 단락 서식을 한 번에 설정한다. range 를 주면 그 구간이 걸친 단락에만 적용한다.\n * 문단 모양 대화상자의 입력 항목과 1:1 로 대응하며, 대화상자와 같이 한 액션으로 적용해 실행 취소 단위가 하나다.\n * 값을 준 속성만 바뀐다. null/undefined 는 \"변경 없음\"으로 무시하며, 지정한 값을 상속 상태로 되돌리는 방법은 아직 없다.\n * 단일 속성은 setLineSpacing/setMarginLeft/setFirstLineIndent/setSpaceBefore/setSpaceAfter 사용 권장.\n * 목록 수준은 부수 효과(글머리 기호·글자 크기)가 달라 여기 담지 않는다. (setLevel 참고)\n * alignH 만 별도 액션(setAlignH)으로 나가므로 다른 속성과 함께 주면 실행 취소 단위가 2개로 나뉜다.\n *\n * @param style - 단락 서식 설정\n * @param range - 적용할 텍스트 구간 (기본값: 전체 텍스트)\n */\n setParagraphStyle(style: ParagraphStyle, range?: { from: number; to: number }): Promise<void>;\n /**\n * 줄 간격을 설정한다. range 를 주면 그 구간이 걸친 단락에만 적용한다.\n * MULTIPLE 이면 \"100%\" 형태, EXACT 이면 pt 입력을 twip view 값으로 변환한다\n *\n * @param lineSpacing - 줄 간격 값 (MULTIPLE: 배수%, EXACT: pt)\n * @param type - 줄 간격 유형 (기본값: LineSpacingType.MULTIPLE)\n * @param range - 적용할 텍스트 구간 (기본값: 전체 텍스트)\n */\n setLineSpacing(lineSpacing: number, type?: LineSpacingType, range?: { from: number; to: number }): Promise<void>;\n /**\n * 단락 앞 간격(UI \"문단 위\")을 설정한다.\n *\n * @param spaceBefore - 단락 앞 간격 (pt)\n * @param range - 적용할 텍스트 구간 (기본값: 전체 텍스트)\n */\n setSpaceBefore(spaceBefore: number, range?: { from: number; to: number }): Promise<void>;\n /**\n * 단락 뒤 간격(UI \"문단 아래\")을 설정한다.\n *\n * @param spaceAfter - 단락 뒤 간격 (pt)\n * @param range - 적용할 텍스트 구간 (기본값: 전체 텍스트)\n */\n setSpaceAfter(spaceAfter: number, range?: { from: number; to: number }): Promise<void>;\n /**\n * 단락 전체의 왼쪽 여백(UI \"텍스트 앞\")을 설정한다. 첫 줄만 밀려면 setFirstLineIndent 를 쓴다.\n *\n * @param marginLeft - 왼쪽 여백 (pt)\n * @param range - 적용할 텍스트 구간 (기본값: 전체 텍스트)\n */\n setMarginLeft(marginLeft: number, range?: { from: number; to: number }): Promise<void>;\n /**\n * 단락 첫 줄의 들여쓰기(UI \"첫 줄\")를 설정한다. 둘째 줄부터는 marginLeft 를 따른다.\n * 양수는 들여쓰기, 음수는 내어쓰기, 0 은 없음이다. (UI 의 없음/들여쓰기/내어쓰기 구분을 부호 하나로 표현한다)\n * 글머리 기호 목록의 계층 깊이를 바꾸려는 것이면 setLevel 이다.\n *\n * @param firstLineIndent - 첫 줄 들여쓰기 (pt)\n * @param range - 적용할 텍스트 구간 (기본값: 전체 텍스트)\n */\n setFirstLineIndent(firstLineIndent: number, range?: { from: number; to: number }): Promise<void>;\n /**\n * 목록 수준(개요 계층 깊이)을 설정한다. range 가 걸친 단락을 모두 같은 수준으로 맞춘다.\n * pt 단위 들여쓰기(setFirstLineIndent/setMarginLeft)와 달리 수준은 상속 프리셋 선택이라,\n * 바꾸면 그 수준의 글머리 기호와 글자 크기가 함께 따라온다.\n * marginLeft 는 새 수준의 값으로 덮인다. setMarginLeft 로 지정한 값도 버려지므로\n * 둘을 함께 쓸 때는 setLevel 을 먼저 호출한다. (firstLineIndent 는 유지된다)\n * 대상 텍스트가 허용하는 범위(제목 개체는 1 단계뿐)로 clamp 한다.\n *\n * @param level - 목록 수준 (1=최상위 ~ 9)\n * @param range - 적용할 텍스트 구간 (기본값: 전체 텍스트)\n */\n setLevel(level: number, range?: { from: number; to: number }): Promise<void>;\n /**\n * 글머리 기호 스타일을 설정한다.\n *\n * @param bulletType - 글머리 기호 유형\n * @param subType - BulletType.AUTO_NUM: 번호 매기기 유형 (기본값 NumberedType.NUMBER_WITH_DOT), BulletType.CHAR: 글머리 문자 유형 (기본값 CharType.DOT)\n * @param startAt - 시작 번호 (BulletType.AUTO_NUM 일 때만 사용) (기본값: 1)\n * @param range - 적용할 텍스트 구간 (기본값: 전체 텍스트)\n */\n setBulletStyle(bulletType: BulletType, subType?: NumberedType | CharType, startAt?: number, range?: { from: number; to: number }): Promise<void>;\n /**\n * 텍스트 세로 정렬을 설정한다.\n *\n * @param align - 세로 정렬\n */\n setAlignV(align: TextAlignV): Promise<void>;\n /**\n * 텍스트 상자 자동 맞춤 유형을 설정한다.\n *\n * @param autoAlignType - 자동 맞춤 유형\n */\n setTextboxAutoFit(autoAlignType: AutoFitType): Promise<void>;\n // own\n /**\n * 일반 도형에 정의된 조절값과 조절 가능한 범위를 반환한다. 반환된 name은 조절값 조회와 변경 API에서 사용한다.\n *\n * @returns 조절값 목록\n */\n getAdjustValues(): Promise<AdjustValue[]>;\n /**\n * 3D 회전 시 텍스트를 평면으로 유지할지 설정한다.\n *\n * @param enabled - true이면 텍스트 평면 유지, false이면 해제\n */\n setFlatTx(enabled: boolean): Promise<void>;\n /**\n * 일반 도형의 조절값(adjust value) 하나를 변경한다. 여러 조절값을 함께 변경하려면 setAdjustValues를 사용한다.\n *\n * @param name - 조절값 이름(getAdjustValues 결과)\n * @param value - 조절값. 정수로 반올림되며 허용 범위를 벗어나면 최솟값 또는 최댓값으로 제한됨\n * @throws {Error} name이 현재 도형에 없는 조절값인 경우\n */\n setAdjustValue(name: string, value: number): Promise<void>;\n /**\n * 일반 도형의 여러 조절값(adjust value)을 한 번에 변경한다.\n *\n * @param avList - 변경할 조절값 목록\n * @throws {Error} name이 현재 도형에 없는 조절값인 경우\n */\n setAdjustValues(avList: AdjustValueUpdate[]): Promise<void>;\n }\n\n /** 이미지 도형을 다루는 핸들로, 원본 크기 되돌리기(resetImageSize)와 이미지 자르기(cropImage)를 제공하며, 위치·크기·채우기·선·효과는 BasePathShape 공통 API 를 그대로 쓴다. */\n export interface Image extends BasePathShape {\n /**\n * 선언 전용 명목 브랜드 — 멤버 구성이 같은 핸들 타입이 서로 대입 가능해져 가드\n * 내로잉이 무력화되는 것을 막는다. 런타임에 존재하지 않으며, 키 심볼이 비-export 라\n * 외부 코드에서 접근할 수 없다.\n */\n readonly [__proxyBrand]?: 'Image';\n /**\n * 이미지를 원본 크기로 되돌린다.\n * blip 의 width/height (pixel) 를 EMU 로 변환하여 xfrm 을 갱신하고, srcRect (crop) 가 있으면 함께 제거한다.\n */\n resetImageSize(): Promise<void>;\n /**\n * 이미지를 지정한 방향으로 자른다 (srcRect 업데이트).\n * 모든 인자 단위: 퍼센트 (0~100, UI 단위).\n *\n * @param left - 왼쪽 crop 퍼센트 (기본값: 기존 값 유지)\n * @param top - 위쪽 crop 퍼센트 (기본값: 기존 값 유지)\n * @param right - 오른쪽 crop 퍼센트 (기본값: 기존 값 유지)\n * @param bottom - 아래쪽 crop 퍼센트 (기본값: 기존 값 유지)\n */\n cropImage(left?: number, top?: number, right?: number, bottom?: number): Promise<void>;\n }\n\n /** 연결선을 다루는 핸들로, 시작·끝 화살표 모양 설정(setLineHeadEnd/setLineTailEnd)을 제공하며, 선 색·두께·점선 등 선 서식은 BasePathShape 공통 API 를 그대로 쓴다. */\n export interface Line extends BasePathShape {\n /**\n * 선언 전용 명목 브랜드 — 멤버 구성이 같은 핸들 타입이 서로 대입 가능해져 가드\n * 내로잉이 무력화되는 것을 막는다. 런타임에 존재하지 않으며, 키 심볼이 비-export 라\n * 외부 코드에서 접근할 수 없다.\n */\n readonly [__proxyBrand]?: 'Line';\n /**\n * 연결선의 시작 화살표(headEnd)를 설정한다.\n *\n * @param type - 화살표 타입\n * @param width - 화살표 너비 (기본값: LineEndSize.MEDIUM)\n * @param length - 화살표 길이 (기본값: LineEndSize.MEDIUM)\n */\n setLineHeadEnd(type: LineEndType, width?: LineEndSize, length?: LineEndSize): Promise<void>;\n /**\n * 연결선의 끝 화살표(tailEnd)를 설정한다.\n *\n * @param type - 화살표 타입\n * @param width - 화살표 너비 (기본값: LineEndSize.MEDIUM)\n * @param length - 화살표 길이 (기본값: LineEndSize.MEDIUM)\n */\n setLineTailEnd(type: LineEndType, width?: LineEndSize, length?: LineEndSize): Promise<void>;\n }\n\n /** 그룹 도형을 다루는 핸들로, 하위 도형 조회(getChildren)와 그룹 해제(ungroup)를 제공하며, 위치·크기·정렬·순서는 BaseShape 공통 API 를 그대로 쓴다. */\n export interface Group extends BaseShape {\n /**\n * 선언 전용 명목 브랜드 — 멤버 구성이 같은 핸들 타입이 서로 대입 가능해져 가드\n * 내로잉이 무력화되는 것을 막는다. 런타임에 존재하지 않으며, 키 심볼이 비-export 라\n * 외부 코드에서 접근할 수 없다.\n */\n readonly [__proxyBrand]?: 'Group';\n /**\n * 그룹의 자식 도형 목록을 반환한다.\n *\n * @returns 자식 도형 목록\n */\n getChildren(): Promise<(Shape | Image | Line | Group | Chart | Table | Diagram | OleObject | Control)[]>;\n /**\n * 그룹을 해제하여 자식 도형들을 슬라이드 루트로 분리한다.\n * 해제 후 이 Group 인스턴스는 더 이상 유효하지 않다.\n */\n ungroup(): Promise<void>;\n }\n\n /** 차트 도형을 다루는 핸들로, 차트 종류·스타일(setType/setStyle), 제목·축 제목(setTitle/setAxisTitle), 범례·데이터 라벨 위치(setLegendPosition/setDataLabelPosition), 눈금선(setGridLine) 편집과 현재 서식 상태 조회(getType/getTitle/getState 등)를 제공한다. */\n export interface Chart extends BaseShape {\n /**\n * 선언 전용 명목 브랜드 — 멤버 구성이 같은 핸들 타입이 서로 대입 가능해져 가드\n * 내로잉이 무력화되는 것을 막는다. 런타임에 존재하지 않으며, 키 심볼이 비-export 라\n * 외부 코드에서 접근할 수 없다.\n */\n readonly [__proxyBrand]?: 'Chart';\n // ChartApiMixin\n /**\n * 차트 타입을 enum 문자열로 반환한다. 미지원/미매핑 타입(파일 로드 stock/surface 등)은 \"unknown\".\n */\n getType(): Promise<string>;\n /**\n * 차트가 편집 가능한지 반환한다. 대상 부재·복원 불가·외부 데이터 차트는 false (throw 하지 않는다).\n */\n isEditable(): Promise<boolean>;\n /**\n * 차트 제목을 반환한다. 미설정 시 빈 문자열.\n */\n getTitle(): Promise<string>;\n /**\n * 축 제목을 반환한다. 미설정 시 빈 문자열,\n * 축 제목을 갖지 않는 차트 종류(원형 계열·도넛·방사형)는 null.\n *\n * @param axis - 그 외 CHART_AXIS_INVALID throw.\n */\n getAxisTitle(axis: ChartAxis): Promise<string | null>;\n /**\n * 범례 위치를 반환한다. 범례가 없으면 \"none\".\n */\n getLegendPosition(): Promise<ChartLegendPosition>;\n /**\n * 데이터레이블 위치를 반환한다. 레이블이 없으면 \"none\".\n */\n getDataLabelPosition(): Promise<ChartDataLabelPosition>;\n /**\n * 축별 눈금선 종류를 반환한다. 꺼져 있으면 \"none\",\n * 해당 눈금선을 갖지 않는 차트 종류는 null.\n *\n * @param axis - 그 외 CHART_AXIS_INVALID throw.\n */\n getGridLine(axis: ChartAxis): Promise<ChartGridLineType | null>;\n /**\n * 차트의 공통 서식 상태를 모델 조회 1회로 반환한다. 각 값은 동명 getter 와 같은 규약이다 —\n * axisTitle/gridLine 의 null 은 그 차트 종류에 해당 축의 제목·눈금선이 없다는 뜻이고,\n * \"none\" 은 지원하지만 꺼져 있다는 뜻이다.\n *\n * 개별 getter 는 호출마다 대상 실존 확인(hasChart)을 반복하므로, 여러 값을 함께 읽을 때는 이 쪽을 쓴다.\n */\n getState(): Promise<{ type: string; title: string; legendPosition: ChartLegendPosition; dataLabelPosition: ChartDataLabelPosition; axisTitle: { horizontal: string | null; vertical: string | null }; gridLine: { horizontal: ChartGridLineType | null; vertical: ChartGridLineType | null } }>;\n /**\n * 차트 종류를 변경한다. 현재 종류와 같으면 아무것도 하지 않는다 —\n * 종류가 그대로인데 스타일 미지정 차트의 스타일만 기본값으로 바뀌는 부작용을 막는다.\n *\n * @param chartType - 차트 종류 enum 값(= enum 문자열, 예: \"clustered_column\"). 미정의/미지원이면 CHART_TYPE_UNSUPPORTED throw.\n */\n setType(chartType: ChartType): Promise<void>;\n /**\n * 차트 프리셋 스타일을 변경한다. 번호별 실제 색은 문서 테마에 종속된다.\n *\n * @param style - 스타일 번호 (1~12 정수). 3개 단위로 색 그룹이 나뉘고(1~3=그룹1, 4~6=그룹2, 7~9=그룹3, 10~12=그룹4), 그룹 내 순서는 배경 변형이다(1번째=반투명 배경, 2번째=흰색 배경, 3번째=색상 배경+계열 테두리 — 정의는 chartInfo.setStyle JSDoc). 형태 위반 시 CHART_STYLE_INVALID throw.\n */\n setStyle(style: number): Promise<void>;\n /**\n * 차트 제목을 설정한다.\n */\n setTitle(title: string): Promise<void>;\n /**\n * 축 제목을 설정한다. 축 제목을 갖지 않는 차트 종류(원형 계열·도넛·방사형)는\n * CHART_AXIS_TITLE_UNSUPPORTED throw.\n *\n * @param axis - 그 외 CHART_AXIS_INVALID throw.\n */\n setAxisTitle(axis: ChartAxis, title: string): Promise<void>;\n /**\n * 범례 위치를 설정한다. \"none\"이면 범례를 숨긴다.\n *\n * @param position - 그 외 CHART_LEGEND_POSITION_INVALID throw.\n */\n setLegendPosition(position: ChartLegendPosition): Promise<void>;\n /**\n * 데이터레이블 위치를 설정한다. \"none\"이면 숨긴다.\n * 차트 타입별 유효 위치까지 검증한다 — 타입 그룹 미정의는 CHART_DATALABEL_UNSUPPORTED,\n * 그룹에 없는 위치는 CHART_DATALABEL_POSITION_INVALID throw. \"none\"은 전 타입 허용.\n *\n * @param position - 그 외 CHART_DATALABEL_POSITION_INVALID throw.\n */\n setDataLabelPosition(position: ChartDataLabelPosition): Promise<void>;\n /**\n * 차트 눈금선을 설정한다. \"none\"이면 해당 축 눈금선을 숨긴다.\n * 차트 타입별 지원 여부까지 검증한다 — 원형 계열·도넛은 양축, 방사형은 세로 축이\n * CHART_GRID_LINE_UNSUPPORTED throw.\n *\n * @param axis - 그 외 CHART_AXIS_INVALID throw.\n * @param gridType - 그 외 CHART_GRID_LINE_INVALID throw.\n */\n setGridLine(axis: ChartAxis, gridType: ChartGridLineType): Promise<void>;\n }\n\n /** 표 도형을 다루는 핸들로, 셀·행·열 조회와 검색(getCell/getCells/findCells 등), 행·열 삽입·삭제(insertRow/deleteRow/insertCol 등), 셀 병합·해제(mergeCell/unmergeCell), 표 스타일(setStyle/setStyleOption), 행 높이·열 너비 조정(setRowHeight/setColWidth)을 제공한다. */\n export interface Table extends BaseShape {\n /**\n * 선언 전용 명목 브랜드 — 멤버 구성이 같은 핸들 타입이 서로 대입 가능해져 가드\n * 내로잉이 무력화되는 것을 막는다. 런타임에 존재하지 않으며, 키 심볼이 비-export 라\n * 외부 코드에서 접근할 수 없다.\n */\n readonly [__proxyBrand]?: 'Table';\n /**\n * 표의 행 개수를 반환한다.\n *\n * @returns 행 개수\n */\n getRowCount(): Promise<number>;\n /**\n * 표의 열 개수를 반환한다.\n *\n * @returns 열 개수\n */\n getColCount(): Promise<number>;\n /**\n * 병합된 셀 내부 좌표를 지정하면 해당 병합 영역의 대표 셀을 반환한다.\n *\n * @param row - 행 인덱스 (0-based)\n * @param col - 열 인덱스 (0-based)\n * @returns 해당 셀 (범위를 벗어나면 null)\n */\n getCell(row: number, col: number): Promise<TableCell | null>;\n /**\n * 모든 셀을 배열로 반환한다.\n * 병합된 셀은 대표 셀 하나만 포함한다.\n *\n * @returns 셀 목록\n */\n getCells(): Promise<TableCell[]>;\n /**\n * 조건에 맞는 셀 배열을 반환한다.\n * 복수 조건은 AND로 결합. range 는 셀 본체가 범위와 겹치면 매칭 (병합 대표 셀이 범위 밖에 있어도 셀 일부가 범위 안이면 결과에 포함됨).\n * 그 외 조건은 병합된 셀의 대표 셀 좌표/속성 기준으로 평가.\n *\n * @param filter - 검색 조건 (기본값: 전체 셀)\n * @returns 조건에 맞는 셀 목록\n */\n findCells(filter?: CellFilter): Promise<TableCell[]>;\n /**\n * 지정 열의 너비를 반환한다. (setColWidth 대칭)\n *\n * @param colIndex - 열 인덱스 (0-based)\n * @returns 너비 (px 단위), 범위 밖이면 null\n */\n getColWidth(colIndex: number): Promise<number | null>;\n /**\n * 지정 행의 높이를 반환한다. (setRowHeight 대칭)\n *\n * @param rowIndex - 행 인덱스 (0-based)\n * @returns 높이 (px 단위), 범위 밖이면 null\n */\n getRowHeight(rowIndex: number): Promise<number | null>;\n /**\n * 지정 행의 셀 배열을 반환한다.\n * 병합된 셀은 대표 셀 하나만 포함한다.\n *\n * @param rowIndex - 0-based 행 인덱스\n * @returns 해당 행의 셀 목록\n */\n getRow(rowIndex: number): Promise<TableCell[]>;\n /**\n * 지정 열의 셀 배열을 반환한다.\n * 병합된 셀은 대표 셀 하나만 포함한다.\n *\n * @param colIndex - 0-based 열 인덱스\n * @returns 해당 열의 셀 목록\n */\n getColumn(colIndex: number): Promise<TableCell[]>;\n /**\n * 표 스타일을 변경한다.\n *\n * @param styleName - 표 스타일 이름 (doc.getTableStyleNames() 결과). 목록에 없는 이름이면 throw\n */\n setStyle(styleName: string): Promise<void>;\n /**\n * 표 스타일 옵션(머리글 행, 줄무늬 행 등)을 변경한다.\n *\n * @param option - 옵션 유형 (apiConstants.TableStyleOption)\n * @param enabled - 활성화 여부\n */\n setStyleOption(option: TableStyleOption, enabled: boolean): Promise<void>;\n /**\n * 지정 범위의 셀을 병합한다.\n *\n * @param startRow - 병합 시작 행 인덱스 (0-based)\n * @param startCol - 병합 시작 열 인덱스 (0-based)\n * @param endRow - 병합 끝 행 인덱스\n * @param endCol - 병합 끝 열 인덱스\n */\n mergeCell(startRow: number, startCol: number, endRow: number, endCol: number): Promise<void>;\n /**\n * 지정 범위의 병합된 셀을 해제한다.\n *\n * @param startRow - 해제 시작 행 인덱스 (0-based)\n * @param startCol - 해제 시작 열 인덱스 (0-based)\n * @param endRow - 해제 끝 행 인덱스\n * @param endCol - 해제 끝 열 인덱스\n */\n unmergeCell(startRow: number, startCol: number, endRow: number, endCol: number): Promise<void>;\n /**\n * 기준 행의 위 또는 아래에 행을 삽입한다.\n * 새 행은 기준 행의 서식을 상속한다.\n *\n * @param baseRowIndex - 삽입 기준 행 인덱스 (0-based)\n * @param position - InsertPosition.ABOVE | InsertPosition.BELOW\n * @param insertNum - 삽입할 행 개수\n */\n insertRow(baseRowIndex: number, position: InsertPosition, insertNum: number): Promise<void>;\n /**\n * 지정 범위의 행을 삭제한다.\n *\n * @param startRow - 삭제 시작 행 인덱스 (0-based)\n * @param endRow - 삭제 끝 행 인덱스\n */\n deleteRow(startRow: number, endRow: number): Promise<void>;\n /**\n * 기준 열의 왼쪽 또는 오른쪽에 열을 삽입한다.\n * 새 열은 기준 열의 서식을 상속한다.\n *\n * @param baseColIndex - 삽입 기준 열 인덱스 (0-based)\n * @param position - InsertPosition.LEFT | InsertPosition.RIGHT\n * @param insertNum - 삽입할 열 개수\n */\n insertCol(baseColIndex: number, position: InsertPosition, insertNum: number): Promise<void>;\n /**\n * 지정 범위의 열을 삭제한다.\n *\n * @param startCol - 삭제 시작 열 인덱스 (0-based)\n * @param endCol - 삭제 끝 열 인덱스\n */\n deleteCol(startCol: number, endCol: number): Promise<void>;\n /**\n * 지정 행의 높이를 변경한다.\n *\n * @param rowIndex - 행 인덱스 (0-based)\n * @param newHeight - 새 높이 (px 단위)\n */\n setRowHeight(rowIndex: number, newHeight: number): Promise<void>;\n /**\n * 지정 열의 너비를 변경한다.\n *\n * @param colIndex - 열 인덱스 (0-based)\n * @param newWidth - 새 너비 (px 단위)\n */\n setColWidth(colIndex: number, newWidth: number): Promise<void>;\n }\n\n /** 표 셀 하나를 다루는 핸들로, 셀 텍스트 조회·편집과 글자·문단 서식(getText/setText/setFontStyle 등), 셀 배경 채우기(setSolidFill/setFill), 테두리(getBorderStyle/setBorderStyle), 행·열 위치 조회(getRowIndex/getColIndex)를 제공한다. */\n export interface TableCell {\n /**\n * 이 핸들이 `Shape` 인지 판별한다 (union 좁히기용 type guard).\n * SDK 핸들의 내부 판별값을 동기 검사한다 — postMessage 왕복 없음, await 불필요.\n */\n isShape(): this is Shape;\n // BaseText\n /**\n * 대표 단락(range 가 걸친 첫 단락)의 단락 서식을 반환한다. (setParagraphStyle 대칭)\n * 반환 객체를 그대로 다른 개체의 setParagraphStyle 에 넘길 수 있다. 값이 없는 속성은 키를 생략한다.\n * 값은 레이아웃/마스터 상속이 반영된 해석값이다. 단락이 직접 지정한 값만 골라낼 수는 없다.\n * 같은 단락에 그대로 되돌려주면 상속값과 같은 속성은 오버라이드로 굳지 않고 지워진다. (updateTextPPr 동작)\n * 목록 수준은 서식 값이 아니라 상속 프리셋이라 이 객체에 담지 않는다. (getLevel 대칭)\n *\n * @param range - 읽을 텍스트 구간 (기본값: 전체 텍스트)\n * @returns 단락 서식 (baseText.ParagraphStyle). 텍스트/단락 없으면 null\n */\n getParagraphStyle(range?: { from: number; to: number }): Promise<ParagraphStyle | null>;\n /**\n * 대표 단락의 가로 정렬을 반환한다. (setAlignH 대칭)\n *\n * @param range - 읽을 텍스트 구간 (기본값: 전체 텍스트)\n * @returns 가로 정렬. 텍스트/단락 없으면 null\n */\n getAlignH(range?: { from: number; to: number }): Promise<TextAlignH | null>;\n /**\n * 대표 단락의 줄 간격 값을 반환한다. (setLineSpacing 대칭)\n *\n * @param range - 읽을 텍스트 구간 (기본값: 전체 텍스트)\n * @returns 줄 간격 값 (MULTIPLE: 배수%, EXACT: pt). 텍스트/단락 없으면 null\n */\n getLineSpacing(range?: { from: number; to: number }): Promise<number | null>;\n /**\n * 대표 단락의 줄 간격 유형을 반환한다. (setLineSpacing 의 type 대칭)\n *\n * @param range - 읽을 텍스트 구간 (기본값: 전체 텍스트)\n * @returns 줄 간격 유형. 텍스트/단락 없으면 null\n */\n getLineSpacingType(range?: { from: number; to: number }): Promise<LineSpacingType | null>;\n /**\n * 대표 단락의 단락 앞 간격(UI \"문단 위\")을 반환한다. (setSpaceBefore 대칭)\n *\n * @param range - 읽을 텍스트 구간 (기본값: 전체 텍스트)\n * @returns 단락 앞 간격 (pt). 배수(%) 저장/텍스트 없음이면 null\n */\n getSpaceBefore(range?: { from: number; to: number }): Promise<number | null>;\n /**\n * 대표 단락의 단락 뒤 간격(UI \"문단 아래\")을 반환한다. (setSpaceAfter 대칭)\n *\n * @param range - 읽을 텍스트 구간 (기본값: 전체 텍스트)\n * @returns 단락 뒤 간격 (pt). 배수(%) 저장/텍스트 없음이면 null\n */\n getSpaceAfter(range?: { from: number; to: number }): Promise<number | null>;\n /**\n * 대표 단락의 왼쪽 여백(UI \"텍스트 앞\")을 반환한다. (setMarginLeft 대칭)\n *\n * @param range - 읽을 텍스트 구간 (기본값: 전체 텍스트)\n * @returns 왼쪽 여백 (pt). 텍스트/단락 없으면 null\n */\n getMarginLeft(range?: { from: number; to: number }): Promise<number | null>;\n /**\n * 대표 단락의 첫 줄 들여쓰기(UI \"첫 줄\")를 반환한다. (setFirstLineIndent 대칭)\n *\n * @param range - 읽을 텍스트 구간 (기본값: 전체 텍스트)\n * @returns 첫 줄 들여쓰기 (pt, 음수는 내어쓰기). 텍스트/단락 없으면 null\n */\n getFirstLineIndent(range?: { from: number; to: number }): Promise<number | null>;\n /**\n * 대표 단락의 목록 수준을 반환한다. (setLevel 대칭)\n *\n * @param range - 읽을 텍스트 구간 (기본값: 전체 텍스트)\n * @returns 목록 수준 (1~9). 텍스트/단락 없으면 null\n */\n getLevel(range?: { from: number; to: number }): Promise<number | null>;\n /**\n * 텍스트를 plain text로 반환한다.\n *\n * @param range - 읽을 텍스트 구간 (기본값: 전체 텍스트)\n * @returns 해당 구간의 텍스트 (plain text). 텍스트 모델이 없거나 빈 구간이면 \"\"\n */\n getText(range?: { from: number; to: number }): Promise<string>;\n /**\n * 대표 run(첫 run)의 글꼴 스타일을 반환한다. (setFontStyle 대칭)\n * 반환 객체를 그대로 다른 개체의 setFontStyle 에 넘길 수 있다. 값이 없는 속성은 키를 생략한다.\n *\n * @returns 글꼴 스타일 (baseText.FontStyle). 런/스타일 없으면 빈 객체 `{}`, 텍스트 모델 없음(협업 삭제 등)이면 null\n */\n getFontStyle(): Promise<FontStyle | null>;\n /**\n * 대표 run 의 굵게 여부를 반환한다. (setBold 대칭)\n *\n * @returns 굵게 여부. 명시 안 됨(상속)/텍스트 없음이면 null\n */\n getBold(): Promise<boolean | null>;\n /**\n * 대표 run 의 기울임 여부를 반환한다. (setItalic 대칭)\n *\n * @returns 기울임 여부. 명시 안 됨/텍스트 없음이면 null\n */\n getItalic(): Promise<boolean | null>;\n /**\n * 대표 run 의 밑줄 유형을 반환한다. (setUnderline 대칭)\n *\n * @returns 밑줄 유형. 명시 안 됨/텍스트 없음이면 null\n */\n getUnderline(): Promise<Underline | null>;\n /**\n * 대표 run 의 취소선 유형을 반환한다. (setStrike 대칭)\n *\n * @returns 취소선 유형. 명시 안 됨/텍스트 없음이면 null\n */\n getStrike(): Promise<Strike | null>;\n /**\n * 대표 run 의 글자 크기(pt)를 반환한다. (setFontSize 대칭)\n *\n * @returns 글자 크기 (pt). 명시 안 됨/텍스트 없음이면 null\n */\n getFontSize(): Promise<number | null>;\n /**\n * 대표 run 의 글꼴 이름을 반환한다. (setFontFamily 대칭)\n *\n * @returns 글꼴 이름. 명시 안 됨/텍스트 없음이면 null\n */\n getFontFamily(): Promise<string | null>;\n /**\n * 대표 run 의 글자 색상을 반환한다. (setTextColor 대칭)\n *\n * @returns 글자 색상 (hex \"#RRGGBB\"/scheme). solid 아님/명시 안 됨/텍스트 없음이면 null\n */\n getTextColor(): Promise<string | null>;\n /**\n * 텍스트 구간의 하이퍼링크를 반환한다. (setTextHyperlink 대칭 —\n * 반환 객체를 그대로 넘겨 하이퍼링크를 복사할 수 있다)\n * range 를 주면 그 구간의 첫 글자, 없으면 텍스트 첫 글자가 속한 run 기준이다.\n * 도형 자체에 걸린 하이퍼링크는 getHyperlink 로 읽는다.\n *\n * @param range - 조회할 텍스트 구간 (기본값: 텍스트 첫 글자)\n * @returns 하이퍼링크 정보 (baseShape 의 Hyperlink). 링크 없음/텍스트 없음/미노출 action 이면 null\n */\n getTextHyperlink(range?: { from: number; to: number }): Promise<Hyperlink | null>;\n /**\n * 텍스트 상자 자동 맞춤 유형을 반환한다. (setTextboxAutoFit 대칭)\n *\n * @returns 자동 맞춤 유형. 텍스트 모델 없으면 null\n */\n getTextboxAutoFit(): Promise<AutoFitType | null>;\n /**\n * 텍스트를 설정한다. 인자 조합에 따라 다음과 같이 동작한다.\n * - range 없음: 전체 텍스트를 text 로 교체\n * - range 있음: 지정한 구간만 text 로 교체\n * - text 가 빈 문자열(\"\")이면 교체 대신 해당 범위를 삭제\n *\n * 삭제 없이 끼워넣는 삽입은 insertText 를 사용한다.\n * (단, from이 텍스트 끝(마지막 글자 다음 위치)이면 지울 글자가 없어 끝 삽입으로 동작한다)\n *\n * 대체된 자리의 글자 서식은 구간 시작 위치의 런 서식을, 문단 서식은 기존 문단의 서식을 따른다.\n *\n * @param text - 설정할 텍스트. 빈 문자열(\"\")이면 삭제로 동작\n * @param range - 교체할 텍스트 구간 to = from + 글자수 - 1 (0-based) 예: \"가나다\" 전체 = {from: 0, to: 2}, \"가나다\" 중 \"가\" = {from: 0, to: 0} (기본값: 전체 텍스트)\n */\n setText(text: string, range?: { from: number; to: number }): Promise<void>;\n /**\n * 텍스트를 삽입한다.\n * 삽입한 글자의 서식은 삽입 지점 바로 앞 글자의 런 서식을 따른다.\n *\n * @param text - 삽입할 텍스트\n * @param textOffset - 삽입 위치 offset (기본값: 텍스트 끝)\n */\n insertText(text: string, textOffset?: number): Promise<void>;\n /**\n * 글꼴 스타일을 설정한다. 단일 속성은 setBold/setItalic/setFontSize/setFontFamily/setTextColor 사용 권장.\n *\n * @param style - 글꼴 스타일 설정\n * @param range - 적용할 텍스트 구간 (기본값: 전체 텍스트)\n */\n setFontStyle(style: FontStyle, range?: { from: number; to: number }): Promise<void>;\n /**\n * 글자 굵게 설정.\n *\n * @param enabled - true: 굵게, false: 해제\n * @param range - 적용할 텍스트 구간 (기본값: 전체 텍스트)\n */\n setBold(enabled: boolean, range?: { from: number; to: number }): Promise<void>;\n /**\n * 글자 기울임 설정.\n *\n * @param enabled - true: 기울임, false: 해제\n * @param range - 적용할 텍스트 구간 (기본값: 전체 텍스트)\n */\n setItalic(enabled: boolean, range?: { from: number; to: number }): Promise<void>;\n /**\n * 글자 밑줄 설정.\n *\n * @param underline - 밑줄 유형\n * @param range - 적용할 텍스트 구간 (기본값: 전체 텍스트)\n */\n setUnderline(underline: Underline, range?: { from: number; to: number }): Promise<void>;\n /**\n * 글자 취소선 설정.\n *\n * @param strike - 취소선 유형\n * @param range - 적용할 텍스트 구간 (기본값: 전체 텍스트)\n */\n setStrike(strike: Strike, range?: { from: number; to: number }): Promise<void>;\n /**\n * 글자 크기 설정.\n *\n * @param fontSize - pt 단위\n * @param range - 적용할 텍스트 구간 (기본값: 전체 텍스트)\n */\n setFontSize(fontSize: number, range?: { from: number; to: number }): Promise<void>;\n /**\n * 글꼴 설정.\n *\n * @param fontFamily - 글꼴 이름\n * @param range - 적용할 텍스트 구간 (기본값: 전체 텍스트)\n */\n setFontFamily(fontFamily: string, range?: { from: number; to: number }): Promise<void>;\n /**\n * 글자 색상 설정.\n *\n * @param color - hex (#RRGGBB) 또는 scheme color\n * @param range - 적용할 텍스트 구간 (기본값: 전체 텍스트)\n */\n setTextColor(color: string, range?: { from: number; to: number }): Promise<void>;\n /**\n * 텍스트에 하이퍼링크를 설정한다. (getTextHyperlink 대칭 — 반환 객체를 그대로 넘겨 링크를 복사할 수 있다)\n * 도형 전체에 링크를 거는 setHyperlink 와 달리 글자(run)에 걸려 하이퍼링크 서식으로 표시된다.\n * other(program/macro/ole 등)와 유효하지 않은 대상(없는 슬라이드 id·ShowJumpType 밖의 값)은 무시한다.\n *\n * @param hyperlink - getTextHyperlink() 반환값 (baseShape 의 Hyperlink). type 이 없으면 무시한다\n * @param range - 적용할 텍스트 구간 (기본값: 전체 텍스트)\n */\n setTextHyperlink(hyperlink: Hyperlink, range?: { from: number; to: number }): Promise<void>;\n /**\n * 텍스트의 하이퍼링크를 제거한다. (도형 자체에 걸린 하이퍼링크는 removeHyperlink)\n *\n * @param range - 제거할 텍스트 구간 (기본값: 전체 텍스트)\n */\n removeTextHyperlink(range?: { from: number; to: number }): Promise<void>;\n /**\n * 지정한 offset 위치에 특수문자(symbol)를 삽입한다.\n *\n * @param textOffset - 삽입 위치 offset\n * @param symbol - 삽입할 특수문자\n */\n insertSymbol(textOffset: number, symbol: string): Promise<void>;\n /**\n * 텍스트 가로 정렬을 설정한다. range 를 주면 그 구간이 걸친 단락에만 적용한다.\n *\n * @param align - 가로 정렬\n * @param range - 적용할 텍스트 구간 (기본값: 전체 텍스트)\n */\n setAlignH(align: TextAlignH, range?: { from: number; to: number }): Promise<void>;\n /**\n * 단락 서식을 한 번에 설정한다. range 를 주면 그 구간이 걸친 단락에만 적용한다.\n * 문단 모양 대화상자의 입력 항목과 1:1 로 대응하며, 대화상자와 같이 한 액션으로 적용해 실행 취소 단위가 하나다.\n * 값을 준 속성만 바뀐다. null/undefined 는 \"변경 없음\"으로 무시하며, 지정한 값을 상속 상태로 되돌리는 방법은 아직 없다.\n * 단일 속성은 setLineSpacing/setMarginLeft/setFirstLineIndent/setSpaceBefore/setSpaceAfter 사용 권장.\n * 목록 수준은 부수 효과(글머리 기호·글자 크기)가 달라 여기 담지 않는다. (setLevel 참고)\n * alignH 만 별도 액션(setAlignH)으로 나가므로 다른 속성과 함께 주면 실행 취소 단위가 2개로 나뉜다.\n *\n * @param style - 단락 서식 설정\n * @param range - 적용할 텍스트 구간 (기본값: 전체 텍스트)\n */\n setParagraphStyle(style: ParagraphStyle, range?: { from: number; to: number }): Promise<void>;\n /**\n * 줄 간격을 설정한다. range 를 주면 그 구간이 걸친 단락에만 적용한다.\n * MULTIPLE 이면 \"100%\" 형태, EXACT 이면 pt 입력을 twip view 값으로 변환한다\n *\n * @param lineSpacing - 줄 간격 값 (MULTIPLE: 배수%, EXACT: pt)\n * @param type - 줄 간격 유형 (기본값: LineSpacingType.MULTIPLE)\n * @param range - 적용할 텍스트 구간 (기본값: 전체 텍스트)\n */\n setLineSpacing(lineSpacing: number, type?: LineSpacingType, range?: { from: number; to: number }): Promise<void>;\n /**\n * 단락 앞 간격(UI \"문단 위\")을 설정한다.\n *\n * @param spaceBefore - 단락 앞 간격 (pt)\n * @param range - 적용할 텍스트 구간 (기본값: 전체 텍스트)\n */\n setSpaceBefore(spaceBefore: number, range?: { from: number; to: number }): Promise<void>;\n /**\n * 단락 뒤 간격(UI \"문단 아래\")을 설정한다.\n *\n * @param spaceAfter - 단락 뒤 간격 (pt)\n * @param range - 적용할 텍스트 구간 (기본값: 전체 텍스트)\n */\n setSpaceAfter(spaceAfter: number, range?: { from: number; to: number }): Promise<void>;\n /**\n * 단락 전체의 왼쪽 여백(UI \"텍스트 앞\")을 설정한다. 첫 줄만 밀려면 setFirstLineIndent 를 쓴다.\n *\n * @param marginLeft - 왼쪽 여백 (pt)\n * @param range - 적용할 텍스트 구간 (기본값: 전체 텍스트)\n */\n setMarginLeft(marginLeft: number, range?: { from: number; to: number }): Promise<void>;\n /**\n * 단락 첫 줄의 들여쓰기(UI \"첫 줄\")를 설정한다. 둘째 줄부터는 marginLeft 를 따른다.\n * 양수는 들여쓰기, 음수는 내어쓰기, 0 은 없음이다. (UI 의 없음/들여쓰기/내어쓰기 구분을 부호 하나로 표현한다)\n * 글머리 기호 목록의 계층 깊이를 바꾸려는 것이면 setLevel 이다.\n *\n * @param firstLineIndent - 첫 줄 들여쓰기 (pt)\n * @param range - 적용할 텍스트 구간 (기본값: 전체 텍스트)\n */\n setFirstLineIndent(firstLineIndent: number, range?: { from: number; to: number }): Promise<void>;\n /**\n * 목록 수준(개요 계층 깊이)을 설정한다. range 가 걸친 단락을 모두 같은 수준으로 맞춘다.\n * pt 단위 들여쓰기(setFirstLineIndent/setMarginLeft)와 달리 수준은 상속 프리셋 선택이라,\n * 바꾸면 그 수준의 글머리 기호와 글자 크기가 함께 따라온다.\n * marginLeft 는 새 수준의 값으로 덮인다. setMarginLeft 로 지정한 값도 버려지므로\n * 둘을 함께 쓸 때는 setLevel 을 먼저 호출한다. (firstLineIndent 는 유지된다)\n * 대상 텍스트가 허용하는 범위(제목 개체는 1 단계뿐)로 clamp 한다.\n *\n * @param level - 목록 수준 (1=최상위 ~ 9)\n * @param range - 적용할 텍스트 구간 (기본값: 전체 텍스트)\n */\n setLevel(level: number, range?: { from: number; to: number }): Promise<void>;\n /**\n * 글머리 기호 스타일을 설정한다.\n *\n * @param bulletType - 글머리 기호 유형\n * @param subType - BulletType.AUTO_NUM: 번호 매기기 유형 (기본값 NumberedType.NUMBER_WITH_DOT), BulletType.CHAR: 글머리 문자 유형 (기본값 CharType.DOT)\n * @param startAt - 시작 번호 (BulletType.AUTO_NUM 일 때만 사용) (기본값: 1)\n * @param range - 적용할 텍스트 구간 (기본값: 전체 텍스트)\n */\n setBulletStyle(bulletType: BulletType, subType?: NumberedType | CharType, startAt?: number, range?: { from: number; to: number }): Promise<void>;\n /**\n * 텍스트 세로 정렬을 설정한다.\n *\n * @param align - 세로 정렬\n */\n setAlignV(align: TextAlignV): Promise<void>;\n /**\n * 텍스트 상자 자동 맞춤 유형을 설정한다.\n *\n * @param autoAlignType - 자동 맞춤 유형\n */\n setTextboxAutoFit(autoAlignType: AutoFitType): Promise<void>;\n // own\n /**\n * 셀의 행 인덱스를 반환한다.\n *\n * @returns 행 인덱스 (0-based)\n */\n getRowIndex(): Promise<number>;\n /**\n * 셀의 열 인덱스를 반환한다.\n *\n * @returns 열 인덱스 (0-based)\n */\n getColIndex(): Promise<number>;\n /**\n * 셀에 명시적으로 설정된 배경 채우기를 반환한다. (setSolidFill 대칭)\n * 스타일 상속분은 포함하지 않으며(tcPr 에 명시된 fill 만), alpha 는 setSolidFill 과 동일한\n * 투명도(0~100, 0=불투명)로 역변환되어 반환된다.\n *\n * @returns 채우기 정보. 명시적 fill 없으면 `{ type: FillType.NONE }`, 표 모델 없음(stale)이면 null\n */\n getFill(): Promise<Fill | null>;\n /**\n * 지정 위치의 셀 테두리 스타일을 반환한다. (setBorderStyle 대칭)\n * 해당 위치에 명시적 테두리가 없으면 null. ALL 등 복수 위치는 조회 미지원(null).\n *\n * @param position - 테두리 위치 (TOP/BOTTOM/LEFT/RIGHT/DIAGONAL_DOWN/DIAGONAL_UP)\n * @returns 테두리 스타일. 없으면 null\n */\n getBorderStyle(position: BorderPosition): Promise<BorderStyle | null>;\n /**\n * 셀 안의 모든 텍스트를 제거한다.\n */\n deleteText(): Promise<void>;\n /**\n * 셀 배경을 단색으로 채운다.\n *\n * @param color - hex (#RRGGBB) 또는 scheme color\n * @param alpha - 투명도 (0~100, 100=완전 투명) (기본값: 0(불투명))\n */\n setSolidFill(color: string, alpha?: number): Promise<void>;\n /**\n * getFill() 이 반환한 채우기 객체를 그대로 적용한다. (getFill 대칭 — 셀 채우기 복사)\n * 셀은 단색만 지원하므로 solid 만 적용하고 gradient/image/pattern/none 은 무시한다.\n *\n * @param fill - getFill() 반환값\n */\n setFill(fill: Fill): Promise<void>;\n /**\n * 셀 테두리 스타일을 설정한다. color/width/lineDash 를 모두 생략하면 아무 것도 변경하지 않는다.\n * 색상은 hex / scheme color 모두 ValueMapper.colorToFillObj 가 자동 판정.\n *\n * @param position - 테두리 위치\n * @param color - hex (#RRGGBB) 또는 scheme color name (기본값: 기존 값 유지)\n * @param width - 선 두께 (pt 단위) (기본값: 기존 값 유지)\n * @param lineDash - 선 대시 유형 (기본값: 기존 값 유지)\n */\n setBorderStyle(position: BorderPosition, color?: string, width?: number, lineDash?: LineDash): Promise<void>;\n }\n\n /** 다이어그램 개체를 다루는 핸들로, 내용 편집은 지원하지 않으며 위치·크기·정렬·순서 등 BaseShape 공통 API 만 제공한다. */\n export interface Diagram extends BaseShape {\n /**\n * 선언 전용 명목 브랜드 — 멤버 구성이 같은 핸들 타입이 서로 대입 가능해져 가드\n * 내로잉이 무력화되는 것을 막는다. 런타임에 존재하지 않으며, 키 심볼이 비-export 라\n * 외부 코드에서 접근할 수 없다.\n */\n readonly [__proxyBrand]?: 'Diagram';\n }\n\n /** OLE 개체를 다루는 핸들로, 내용 편집은 지원하지 않으며 위치·크기·정렬·순서 등 BaseShape 공통 API 만 제공한다. */\n export interface OleObject extends BaseShape {\n /**\n * 선언 전용 명목 브랜드 — 멤버 구성이 같은 핸들 타입이 서로 대입 가능해져 가드\n * 내로잉이 무력화되는 것을 막는다. 런타임에 존재하지 않으며, 키 심볼이 비-export 라\n * 외부 코드에서 접근할 수 없다.\n */\n readonly [__proxyBrand]?: 'OleObject';\n }\n\n /** 컨트롤 개체를 다루는 핸들로, 내용 편집은 지원하지 않으며 위치·크기·정렬·순서 등 BaseShape 공통 API 만 제공한다. */\n export interface Control extends BaseShape {\n /**\n * 선언 전용 명목 브랜드 — 멤버 구성이 같은 핸들 타입이 서로 대입 가능해져 가드\n * 내로잉이 무력화되는 것을 막는다. 런타임에 존재하지 않으며, 키 심볼이 비-export 라\n * 외부 코드에서 접근할 수 없다.\n */\n readonly [__proxyBrand]?: 'Control';\n }\n}\n"],"mappings":";AAqDO,IAAM,gBAAgB;AAAA,EACzB,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AACV;AAMO,IAAM,gBAAgB;AACtB,IAAM,cAAc;AAapB,IAAM,cACT,OAA0C,UAAsB;AAwC7D,IAAM,cAAc;AAAA,EACvB,SAAS;AAAA,EACT,MAAM;AACV;AA2CO,IAAM,iBAAiB;AAAA;AAAA,EAE1B,kBAAkB;AAAA;AAAA,EAElB,SAAS;AAAA;AAAA,EAET,WAAW;AAAA;AAAA,EAEX,kBAAkB;AAAA;AAAA,EAElB,eAAe;AAAA;AAAA,EAEf,iBAAiB;AACrB;AAaO,IAAM,WAAN,MAAM,kBAAiB,MAAM;AAAA,EAKhC,YAAY,SAAiB,MAAoB,MAAgB;AAC7D,UAAM,OAAO;AACb,SAAK,OAAO;AACZ,SAAK,OAAO;AACZ,SAAK,OAAO;AAGZ,QAAI,OAAQ,MAA0C,sBAAsB,YAAY;AACpF,MACI,MAGF,kBAAkB,MAAM,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","Cell","Show"]}
1
+ {"version":3,"sources":["../src/types.ts","../src/reference.ts","../src/sdkTools.ts","../src/registerWith.ts","../src/systemPrompt.ts","../src/proxyConstants.ts","../src/cellNavigation.ts","../src/postMessage.ts","../src/execute.ts","../src/proxyClient.ts","../src/init.ts","../src/app.ts","../src/builtin/common-api.generated.ts","../src/builtin/word-api.generated.ts","../src/builtin/cell-api.generated.ts","../src/builtin/show-api.generated.ts"],"sourcesContent":["/**\n * Foundation types and constants shared across all SDK layers.\n *\n * Defines:\n * - ThinkfreeWeboffice message envelope (TfoMessage, TfoMessageBody)\n * - OfficeModule ('word' | 'cell' | 'show')\n * - Constants: MODULE_APP_ID, API_NAMESPACE, API_VERSION\n * - Error codes: RESULT_CODE, SDK_ERROR_CODE\n * - SDKError class\n * - ToolSchema (server-side 카탈로그 schema)\n * - OfficeHandle (createOffice 반환; 공개명 Office<M>)\n */\n\n// ⚠ import 순서 유지 (word → cell → show): 이 파일이 번들 진입에서 모듈 타입을 처음\n// 참조하므로, 여기 순서가 곧 번들 d.ts 의 모듈 섹션 순서가 된다 (tsup dts 롤업의\n// 최초 도달 순서). biome organizeImports 는 이 파일에서 예외 처리되어 있다.\nimport type { Word } from './builtin/word-api.generated.js';\nimport type { Cell } from './builtin/cell-api.generated.js';\nimport type { Show } from './builtin/show-api.generated.js';\n\n// ============================================================\n// 모듈 타입\n// ============================================================\n\n/** 오피스 모듈 식별자 — word(문서) · cell(스프레드시트) · show(프레젠테이션) */\nexport type OfficeModule = 'word' | 'cell' | 'show';\n\n/**\n * 오피스 애플리케이션 종류 상수 — `app.getApplicationType()` 반환값 비교용.\n *\n * 값은 `OfficeModule` 리터럴과 동일한 소문자 문자열이라 `app.module` 과 그대로\n * 상호운용된다 (`app.getApplicationType() === OfficeType.WORD` ⇔ `app.module === 'word'`).\n */\nexport const OfficeType = {\n WORD: 'word',\n CELL: 'cell',\n SHOW: 'show',\n} as const satisfies Record<string, OfficeModule>;\n\n/** `OfficeType` 상수의 값 타입 (= `OfficeModule`). */\nexport type OfficeType = (typeof OfficeType)[keyof typeof OfficeType];\n\n/**\n * 모듈 → `getDocument()` 최상위 핸들 타입 매핑.\n *\n * `createOffice({ module: 'cell', ... })` 처럼 module 리터럴이 추론되면\n * `getDocument()` 가 캐스트 없이 모듈별 정확한 핸들 타입을 반환한다.\n *\n * word/cell/show 모두 배선됨 — 세 모듈 모두 office 측 `SDK.proxyInvoke` 브리지로 동작\n * (word: webword `wordProxies.js`, cell: webCell `cellProxies.js`, show: webShow `showProxies.js`).\n */\nexport interface DocumentHandleByModule {\n word: Word.WordDocument;\n cell: Cell.Workbook;\n show: Show.Document;\n}\n\n/**\n * 모듈 무관 문서 공통 메서드 — `getDocument()` 가 돌려주는 모든 최상위 핸들에 있다.\n *\n * 모듈 proxy(allowlist)가 아니라 framework 공통 cmd `SDK.appInfo` 로 답하므로\n * 세 모듈에서 동일하게 동작한다. 캐시하지 않는다 — rename 등 런타임 변화를\n * 매 호출 반영한다 (호출마다 1왕복).\n */\nexport interface DocumentCommonApi {\n /**\n * 현재 문서 파일명 (확장자 포함, 예: `'report.docx'`).\n *\n * 문서 이름 변경(rename)이 반영된 현재 값이다 — 열 때 URL 에 있던 파일명이 아니다.\n * 편집기가 파일명을 갖지 않는 상태면 `null`.\n * @throws SDKError(TIMEOUT) - 편집기(framework)가 `SDK.appInfo` 를 지원하지 않는 구버전이면\n */\n getFileName(): Promise<string | null>;\n}\n\n/**\n * `getDocument()` 반환 타입 — 모듈별 최상위 핸들에 모듈 무관 공통 메서드를 더한 것.\n */\nexport type DocumentHandle<M extends OfficeModule = OfficeModule> = DocumentHandleByModule[M] &\n DocumentCommonApi;\n\n/**\n * `SDK.appInfo` cmd 응답 — 앱/문서 메타 정보 (framework commonFrame 소유).\n *\n * `getApplicationName()`/`getApplicationVersion()`/`getFileName()` 이\n * 공유하는 단일 조회다. 개별 값은 배포/상태에 따라 `null` 일 수 있다.\n */\nexport interface AppInfo {\n /** SDK 모듈 식별자 — 연결 모듈과 일치 (`'word' | 'cell' | 'show'`), 판별 불가 시 null */\n module: OfficeModule | null;\n /** 앱 공식 표시명 (예: 'Word') */\n name: string | null;\n /** 오피스 빌드 번호 (모듈 `/version` 의 Build-Number, 예: 'V17.0.0') — 미배포/개발 서버는 null */\n version: string | null;\n /** 오피스 빌드 일시 (모듈 `/version` 의 Build-Date) */\n buildDate: string | null;\n /** 현재 문서 파일명 (rename 반영) */\n fileName: string | null;\n /** 문서 식별자 (열기 URL 의 docId) */\n docId: string | null;\n}\n\n/**\n * 모듈별 app ID — office 측 앱 식별 상수(`MSG_API_APP_NAME`)와 일치해야 한다.\n * 수신측(framework `apiCmdMsgManager`)이 `msgBody.app` 비교로 메시지를 검증하므로 임의 변경 금지.\n *\n * 정본 (이 표와 수동 동기화 쌍):\n * - word: webword/src/main/webapp/js/define/defineAPI.js (MSG_API_APP_NAME)\n * - cell: webcell/src/main/webapp/js/common/constants.js (MSG_API_APP_NAME)\n * - show: webShow/src/main/webapp/js/constant/commonConstants.js (MSG_API_APP_NAME)\n */\nexport const MODULE_APP_ID = {\n word: 'HWriteApp',\n cell: 'HCalcApp',\n show: 'webshowApp',\n} as const satisfies Record<OfficeModule, string>;\n\n// ============================================================\n// API 네임스페이스 / 프로토콜 상수\n// ============================================================\n\nexport const API_NAMESPACE = 'ThinkfreeWeboffice' as const;\nexport const API_VERSION = 'v1.0' as const;\n\n/** 빌드 시 tsup define 이 package.json version 으로 치환하는 전역 (dev/test 실행은 미정의) */\ndeclare const __TFO_SDK_VERSION__: string | undefined;\n\n/**\n * tfo-sdk 패키지 버전 (package.json 단일 원천 — 빌드 시 주입).\n *\n * `API_VERSION`(프로토콜 버전, 수신부 등호 필터)과 다르다 — 이 값은 envelope 의\n * `sdkVersion` 필드로 매 호출에 실려, 모듈이 호출자 SDK 버전을 알고 API/도구별\n * 최소 버전 게이트(minSdkVersion)를 적용할 수 있게 한다. 자기 신고 값이므로\n * 보안 경계가 아니라 호환성 협상용이다.\n */\nexport const SDK_VERSION: string =\n typeof __TFO_SDK_VERSION__ === 'string' ? __TFO_SDK_VERSION__ : '0.0.0-dev';\n\n// ============================================================\n// 메시지 envelope (ThinkfreeWeboffice 프로토콜)\n// ============================================================\n\nexport type MessageType = 'cmd' | 'result' | 'event';\n\n/**\n * ThinkfreeWeboffice envelope의 내부 body.\n *\n * - cmd: 요청 메시지 (params 사용)\n * - result: 응답 메시지 (code, data 사용)\n * - event: framework → consumer 이벤트\n */\nexport interface TfoMessageBody {\n app: string;\n version: string;\n type: MessageType;\n method: string;\n params?: unknown[];\n code?: number;\n data?: unknown;\n id: string;\n /** 호출자 tfo-sdk 패키지 버전 (SDK→모듈 cmd 에만 실림 — 모듈측 minSdkVersion 게이트 입력) */\n sdkVersion?: string;\n}\n\n/**\n * postMessage로 송수신되는 최상위 envelope.\n * 네임스페이스 키(`ThinkfreeWeboffice`)로 다른 라이브러리 메시지와 구분.\n */\nexport type TfoMessage = {\n [K in typeof API_NAMESPACE]: TfoMessageBody;\n};\n\n// ============================================================\n// 결과 코드 (Framework 응답)\n// ============================================================\n\nexport const RESULT_CODE = {\n SUCCEED: 1,\n FAIL: -1,\n} as const;\n\nexport type ResultCode = (typeof RESULT_CODE)[keyof typeof RESULT_CODE];\n\n// ============================================================\n// API 응답 래퍼 (office 모듈 계약)\n// ============================================================\n\n/**\n * 실패 응답의 `error` — office 측 구조화 에러 코드(`OperationErrorCode`) 기반.\n *\n * `code` 는 `'SHEET_NOT_FOUND'` 같은 UPPERCASE_SNAKE 상수, `message` 는 사람이\n * 읽을 실패 사유(네비게이션 스텝 컨텍스트 포함)다.\n */\nexport interface ApiErrorInfo {\n code: string;\n message: string;\n}\n\n/** 성공 응답 — 반환값이 없는 동작은 `result` 를 생략한다. */\nexport interface ApiSuccessResponse<T = unknown> {\n success: true;\n result?: T;\n}\n\n/** 실패 응답 — `SDKError.data` 로 전파되는 shape. */\nexport interface ApiErrorResponse {\n success: false;\n error: ApiErrorInfo;\n}\n\n/**\n * office proxy 가 회신하는 API 응답. 전송 계층 envelope(`{code, data}` — `RESULT_CODE`)와\n * **별개 계층**이다:\n * - 성공(`code:1`): 래핑된 응답이 `data` 에 실려 오고 proxyClient 가 unwrap 해 `result` 만 resolve.\n * - 실패(`code:-1`): postMessage 계층이 먼저 reject 하므로 응답이 `SDKError.data` 로 노출.\n */\nexport type ApiResponse<T = unknown> = ApiSuccessResponse<T> | ApiErrorResponse;\n\n// ============================================================\n// SDK 에러 코드\n// ============================================================\n\nexport const SDK_ERROR_CODE = {\n /** options 검증 실패 (module/origin/target 등) */\n INVALID_ARGUMENT: 1001,\n /** sendCommand 응답 타임아웃 */\n TIMEOUT: 1002,\n /** disconnect() 호출 후 사용 시도 */\n DESTROYED: 1003,\n /** 응답 envelope 파싱·구조 오류 */\n INVALID_RESPONSE: 1004,\n /** postMessage 송신 자체 실패 */\n NETWORK_ERROR: 1005,\n /** Framework 측 비즈니스 에러 (RESULT_CODE.FAIL 등) — code는 그대로 전달 */\n FRAMEWORK_ERROR: 2000,\n} as const;\n\nexport type SdkErrorCode = (typeof SDK_ERROR_CODE)[keyof typeof SDK_ERROR_CODE] | number;\n\n/**\n * SDK·Framework 모두에서 발생한 오류를 표현.\n * Framework 측 비즈니스 오류는 `code`가 `FRAMEWORK_ERROR`가 아닌 Framework 코드 그대로 노출됨.\n *\n * `data` 는 framework result 의 `data` 필드 원문이라 실패 종류에 따라 shape 가 다르다:\n * - proxy 실패: 구조화 실패 응답 `ApiErrorResponse` — `err.data.error.code` /\n * `err.data.error.message` 로 분기한다.\n * - 그 외 cmd 실패: 실패 사유 문자열.\n */\nexport class SDKError extends Error {\n public readonly code: SdkErrorCode;\n /** framework `data` 원문 — proxy 실패 시 `ApiErrorResponse`, 그 외 cmd 는 문자열. */\n public readonly data?: unknown;\n\n constructor(message: string, code: SdkErrorCode, data?: unknown) {\n super(message);\n this.name = 'SDKError';\n this.code = code;\n this.data = data;\n\n // V8 stack capture (지원 시)\n if (typeof (Error as { captureStackTrace?: unknown }).captureStackTrace === 'function') {\n (\n Error as unknown as {\n captureStackTrace: (target: object, ctor: unknown) => void;\n }\n ).captureStackTrace(this, SDKError);\n }\n }\n}\n\n// ============================================================\n// JSON Schema 별칭 (ToolSchema 의 inputSchema 등에 사용)\n// ============================================================\n\n/**\n * JSON Schema 일부 — `ToolSchema.inputSchema` 의 타입.\n * 본 SDK 는 schema 를 검증하지 않으며 그대로 통과. 검증은 외부(LLM 측) 책임.\n */\nexport type JsonSchema = Record<string, unknown>;\n\n// ============================================================\n// SDK 함수 시그니처\n// ============================================================\n\n/**\n * `execute` 함수 시그니처 — 동적 dispatch API.\n *\n * Office Agent는 LLM이 호출한 tool name 문자열로 이 함수를 호출합니다.\n *\n * @example\n * ```ts\n * const result = await sdk.execute('Document.insertText', [{ text: 'Hi' }]);\n * ```\n *\n * @param method - `${Namespace}.${method}` 형식 (예: 'Document.insertText')\n * @param params - postMessage envelope의 `params` 배열로 그대로 전달\n * @returns Framework 응답의 `data` 필드. 실패 시 `SDKError`로 reject.\n */\nexport type ExecuteFn = (method: string, params?: unknown[]) => Promise<unknown>;\n\n// ============================================================\n// Server-side tool catalog\n// ============================================================\n\n/**\n * `SDK.toolList` 가 반환하는 도구 schema. execute/module/method 는 포함하지 않음.\n * WebOffice 모듈이 자기 도구 카탈로그를 server-side 로 제공(SSOT)하는 패턴.\n */\nexport interface ToolSchema {\n name: string;\n description?: string;\n inputSchema?: unknown;\n}\n\n/**\n * 실행 가능한 오피스 도구 — `office.getTools()` 의 원소.\n *\n * MCP 클라이언트 SDK 관례(Vercel AI SDK `client.tools()`, LangChain `client.getTools()`)와 같은 shape:\n * 스키마(`name`/`description`/`inputSchema` — JSON Schema)와 실행기(`execute`)가 한 객체에 있다.\n * `execute` 는 `SDK.toolExecute` 로 위임하며, 기본값으로 모듈이 회신한 응답을 **그대로** 돌려준다\n * (모듈이 최종 MCP `CallToolResult` `{content, isError?}` 를 소유).\n */\nexport interface OfficeTool {\n name: string;\n description?: string | undefined;\n inputSchema?: unknown;\n execute: (args: unknown) => Promise<unknown>;\n}\n\n/**\n * `getTools()` 옵션.\n *\n * - `include`: 허용 목록 — 도구 이름 배열 또는 predicate. 모델에 보내는 도구 수를 줄여 선택 품질을 높인다.\n * - `formatResult`/`formatError`: 실행 결과·오류 변환 훅. 기본은 **통과**(모듈 응답 그대로 / 오류는 reject).\n * - `module`: SDK 정의 도구(get_api_reference·execute_script — sdkTools.ts) 활성화. 인스턴스\n * 경로(`office.getTools()`)는 자동 주입되고, standalone 호출만 직접 넘긴다. 미지정이면\n * 모듈 카탈로그 도구만 반환(레거시 동작).\n */\nexport interface GetToolsOptions {\n include?: string[] | ((tool: ToolSchema) => boolean);\n formatResult?: (result: unknown) => unknown;\n formatError?: (error: unknown) => unknown;\n module?: OfficeModule | undefined;\n}\n\n/**\n * Agent SDK modelContext 의 최소 계약 — `registerTools()` 가 사용하는 부분만.\n */\nexport interface ModelContextLike {\n registerTool(tool: {\n name: string;\n description?: string | undefined;\n inputSchema?: unknown;\n execute: (args: unknown) => Promise<unknown>;\n }): void;\n}\n\n/**\n * `registerTools()` 옵션 — 결과/에러를 LLM framework shape 로 변환하는 훅.\n * 기본값은 MCP-shape (`{ content: [{ type: 'text', text }] }`).\n * `module` 은 getTools 와 동일(SDK 정의 도구 활성화 — 인스턴스 경로 자동 주입).\n */\nexport interface RegisterToolsOptions {\n formatResult?: (result: unknown) => unknown;\n formatError?: (error: unknown) => unknown;\n module?: OfficeModule | undefined;\n}\n\n\n/**\n * `createOffice()` 가 반환하는 **오피스 편집기 연결 핸들** — Office Agent·OfficeSuite Facade의 의존 계약.\n * 공개 표면에서는 같은 타입을 `Office<M>` 이름으로도 export 한다(app.ts — 값 `Office` 네임스페이스와 짝).\n *\n * 이미 떠 있는 편집기 iframe 에 postMessage 로 *연결* 된 객체다 (편집기를 생성하지 않는다).\n * `disconnect()` 는 연결만 끊고 문서·편집기에는 영향이 없다.\n *\n * @example\n * ```ts\n * // Office Agent 측 — server-side 카탈로그 자동 등록\n * const office = createOffice({ module: 'word', ... });\n * await office.registerTools(modelContext); // SDK.toolList 회수 + modelContext 등록\n *\n * // 또는 직접 dispatch\n * await office.execute('insert_text', [{ text: 'Hi' }]);\n *\n * office.disconnect();\n * ```\n */\nexport interface OfficeHandle<M extends OfficeModule = OfficeModule> {\n /** 현재 모듈 — 'word' | 'cell' | 'show' */\n readonly module: M;\n /**\n * 동적 dispatch — AI/Office Agent 진입점.\n *\n * LLM tool call dispatch처럼 method 이름이 런타임에 결정되는 경우 사용.\n */\n execute: ExecuteFn;\n /**\n * WebOffice server-side 카탈로그(`SDK.toolList`)에서 도구 schema 목록을 조회.\n * WebOffice 모듈이 자기 도구를 책임지는 SSOT 경로.\n */\n getToolSchemas: () => Promise<ToolSchema[]>;\n /**\n * WebOffice 모듈(`SDK.systemPrompt`)의 문서 모델 · API 사용 규약 프롬프트를 조회해 제공.\n *\n * @returns 최종 프롬프트. 모듈이 미구현이면 빈 문자열\n */\n getSystemPrompt: () => Promise<string>;\n /**\n * **실행 가능한 도구 목록** — 개발자가 자기 LLM 프레임워크에 직접 연결하는 기본 경로.\n * `SDK.toolList` 카탈로그 각 항목에 `execute(args)`(→ `SDK.toolExecute`)를 붙여 배열로 돌려준다.\n *\n * @example\n * ```ts\n * const tools = await office.getTools({ include: ['insert_text'] });\n * // OpenAI: tools.map(t => ({ type: 'function', function: { name: t.name, description: t.description, parameters: t.inputSchema } }))\n * // Anthropic: tools.map(t => ({ name: t.name, description: t.description, input_schema: t.inputSchema }))\n * const result = await tools.find(t => t.name === call.name)!.execute(call.arguments);\n * ```\n */\n getTools: (options?: GetToolsOptions) => Promise<OfficeTool[]>;\n /**\n * 모듈의 도구 카탈로그(`SDK.toolList`)를 modelContext 에 **도구로 등록**한다 (AI Agent 흐름).\n * `getTools()` 위의 편의 함수 — tf-agent-sdk 처럼 `registerTool` 콜백을 받는 프레임워크용.\n * 기본 포맷은 MCP-shape 래핑(`RegisterToolsOptions`).\n * 각 도구 실행은 `SDK.toolExecute` generic cmd 로 위임.\n *\n * @returns 등록한 도구 schema 원본 목록\n */\n registerTools: (\n modelContext: ModelContextLike,\n options?: RegisterToolsOptions,\n ) => Promise<ToolSchema[]>;\n /**\n * 개발자 API 진입점 — 문서 최상위 핸들을 반환한다. 모듈에 따라 알맞은 최상위\n * 핸들을 회신한다: word 는 `WordDocument`, cell 은 `Workbook`, show 는 `Document`.\n * `createOffice` 의 module 리터럴 추론(`DocumentHandleByModule`)으로 캐스트\n * 없이 정확한 타입이 반환된다.\n *\n * 반환 핸들의 메서드는 모두 postMessage 왕복이라 Promise를 반환하며, 다른 엔티티\n * 핸들(`Slide`/`Worksheet` 등)을 다시 반환한다. office `SDK.proxyInvoke` 계약 기반.\n *\n * **모든 메서드는 `await` 로 호출한다.** 핸들은 공통 proxy 라 반환이 언제나 Promise 이며,\n * `await` 없이 체이닝하면 타입상 `Promise<T>` 라 자동완성이 끊기고 런타임도 깨진다.\n *\n * cell 핸들은 **경로 참조(lazy)** 다: `getRange`/`getChart`/`getFilter` 등 네비게이션\n * 메서드는 통신 없이 하위 핸들을 즉시 반환하고(존재 확인 안 함), 실제 실행 메서드\n * (`getValues`/`setValues` 등)를 호출하는 시점에 1왕복으로 경로를 평가한다.\n * 경로 중간 대상이 없으면 그 실행 호출이 `SDKError` 로 reject 되고, `SDKError.data` 에\n * 구조화 실패 응답(`ApiErrorResponse` — `{success:false, error:{code, message}}`)이\n * 실린다. 소비자는 `err.data.error.code`(`'SHEET_NOT_FOUND'` 등)로 분기한다.\n *\n * `getWorksheet` 는 **eager** 다 — 첫 왕복으로 office 가 발급한 시트 식별자를 받아\n * 그 시트에 고정된 `Worksheet` 를 돌려준다. 그래서 핸들을 얻은 뒤 시트를 옮기거나\n * 앞에 시트를 끼워 넣어도, 다른 사용자가 원격으로 그렇게 해도 **처음 지목한 시트**를\n * 계속 가리킨다. 그 시트가 삭제되면 이후 호출이 `SHEET_NOT_FOUND` 로 reject 된다\n * (예전처럼 옆 시트를 조용히 가리키지 않는다).\n * `getSelection`/`getUsedRange`(호출 시점 좌표로 확정된 anchored Range 회신 —\n * 빈 시트의 usedRange 는 A1 단일 셀)와 `addChart`/`addTable`(팩토리)도 eager 로\n * 즉시 1왕복한다.\n *\n * 모든 모듈의 최상위 핸들에 모듈 무관 공통 메서드(`DocumentCommonApi` —\n * `getFileName()`)가 더해져 있다. 이들은 모듈 proxy 가 아니라\n * framework 공통 cmd(`SDK.appInfo`)로 답한다.\n *\n * @example\n * ```ts\n * // show: Document\n * const office = createOffice({ module: 'show', ... });\n * const doc = office.getDocument();\n * const slides = await doc.getSlides();\n * await slides[0].insertShape('rect');\n * console.log(await doc.getFileName());\n *\n * // cell: Workbook — module 리터럴 추론, 캐스트 불필요\n * const office = createOffice({ module: 'cell', ... });\n * const wb = office.getDocument(); // 통신 0\n * const ws = await wb.getWorksheet('Sheet1'); // 1왕복 — 시트를 확정해 고정한다\n * const rg = await ws.getRange('A1:J10'); // 통신 0 (좌표 객체도 가능: { row1: 0, col1: 0, row2: 9, col2: 9 })\n * const values = await rg.getValues(); // 여기서 1왕복 + 존재 검증\n * // ⚠ 모든 호출에 await — 생략하면 Promise 가 잡혀 체이닝이 깨진다\n * ```\n */\n getDocument: () => DocumentHandle<M>;\n /**\n * 오피스 애플리케이션 종류 — 연결한 `module` 을 `OfficeType` 값으로 반환한다.\n *\n * 동기·왕복 없음. `OfficeType.WORD === 'word'` 라 `app.module` 과 값이 같다.\n *\n * @example\n * if (app.getApplicationType() === OfficeType.SHOW) { ... }\n */\n getApplicationType: () => OfficeType;\n /**\n * 오피스 애플리케이션 표시명을 조회한다 (예: `'Word'`).\n *\n * 편집기(framework)가 답하는 값이라 배포별 브랜딩을 서버 측에서 바꿀 수 있다.\n * @throws SDKError(TIMEOUT) - 편집기가 `SDK.appInfo` 를 지원하지 않는 구버전이면\n */\n getApplicationName: () => Promise<string | null>;\n /**\n * 오피스 애플리케이션(편집기) 빌드 버전을 조회한다 (예: `'V17.0.0'`).\n *\n * `getVersion()`(이 SDK 번들의 버전, 동기)과 다른 값이다 — 이쪽은 연결된 오피스\n * 서버 빌드의 버전이며 postMessage 1왕복 + 편집기 내부의 `/version` 조회로 얻는다\n * (편집기가 결과를 캐시하므로 반복 호출 부담은 없다). 버전 정보가 없는 배포\n * (개발 서버 등)에서는 `null`.\n * @throws SDKError(TIMEOUT) - 편집기가 `SDK.appInfo` 를 지원하지 않는 구버전이면\n */\n getApplicationVersion: () => Promise<string | null>;\n /**\n * SDK 클라이언트 라이브러리 버전 (예: `'0.2.0'`).\n *\n * `package.json` 의 version 을 빌드 시 주입한 상수로, **연결 여부와 무관**하다 —\n * `disconnect()` 후에도 호출할 수 있고 왕복도 없다. 연결된 편집기(오피스)의 버전이\n * 아니라 이 SDK 번들 자체의 버전이며, 매 호출 envelope 의 `sdkVersion` 과 같은 값이다.\n *\n * @returns semver 문자열 (미주입 개발 빌드는 `'0.0.0-dev'`)\n */\n getVersion: () => string;\n /**\n * 편집기와의 연결을 끊는다 — postMessage 리스너 제거, pending 요청 모두 SDKError(DESTROYED)로 reject.\n * 편집기·문서 자체에는 영향이 없다(iframe 은 그대로 남는다).\n *\n * 호출 후 `execute`·`getToolSchemas`·`registerTools` 모두 reject/throw.\n * 멱등(idempotent) — 두 번 호출해도 안전.\n */\n disconnect: () => void;\n}\n\n// ============================================================\n// createOffice 옵션\n// ============================================================\n\n/** `createOffice()` 옵션 */\nexport interface OfficeOptions<M extends OfficeModule = OfficeModule> {\n /** 모듈 식별자 — 리터럴로 주면 `getDocument()` 반환 타입이 모듈별로 추론됨 */\n module: M;\n /** 통신 대상 origin — '*' 금지 */\n frameworkOrigin: string;\n /** iframe 요소 (targetWindow와 택1) */\n iframeEl?: HTMLIFrameElement;\n /** 통신 대상 Window (iframeEl과 택1) */\n targetWindow?: Window;\n /** sendCommand 응답 타임아웃 (ms, 기본 5000) */\n timeoutMs?: number;\n}\n\n// ============================================================\n// 메시지 ID 생성 유틸 (재export 용 시그니처)\n// ============================================================\n\n/**\n * office 측 기존 메시지 ID 포맷(framework `apiMessageManager`)과 호환되는 생성기.\n * `${appId}Msg${timestamp}${counter}`\n */\nexport type MessageIdGenerator = (appId: string) => string;\n","/**\n * API 레퍼런스 — LLM 코드 실행 도구용 API 표면 명세.\n *\n * 데이터는 `src/builtin/apiReference.generated.json`(generate:types 산출, 3모듈 통합 —\n * 커밋 없음)이며 **dynamic import 별도 청크**로 로드한다: `get_api_reference` 첫 호출\n * 전에는 다운로드·파싱 비용이 0이라 chat-ui 초기 로딩에 영향이 없다.\n *\n * 조회 3모드(webword get_api_reference 이식 — 토큰 효율을 위해 필요한 부분만 반환):\n * - 인자 없음: 인덱스(진입점 + 클래스/typedef/enum 목록)\n * - { name }: 상세 (클래스 → typedef → enum 순 매칭). 이름 배열이면 { items } 로 여러 개 한 번에\n * - { query }: 키워드 검색 (이름·설명·타입 속성·enum 값까지 부분일치, 대소문자·공백 무시)\n *\n * enum 상세는 word 레거시(값만)와 달리 **members(key+value)를 그대로** 돌려준다 —\n * show 처럼 실행 스코프에 `constants` 를 주는 모듈은 key 가 곧 API 입력이기 때문\n * (generate-dts.cjs buildReference 주석 참고).\n */\n\nimport type { OfficeModule } from './types.js';\n\n// ── 레퍼런스 데이터 형태 (generate-dts.cjs buildReference 산출) ────────────────\n\nexport interface ApiReferenceMethod {\n name: string;\n signature: string;\n summary?: string | undefined;\n}\n\nexport interface ApiReferenceClass {\n name: string;\n extends?: string | null | undefined;\n role?: string | undefined;\n methods: ApiReferenceMethod[];\n}\n\nexport interface ApiReferenceTypedef {\n name: string;\n properties: Array<Record<string, unknown>>;\n}\n\nexport interface ApiReferenceEnum {\n name: string;\n description?: string | undefined;\n members: Array<Record<string, unknown>>;\n}\n\nexport interface ApiReferenceSlice {\n classes: ApiReferenceClass[];\n typedefs: ApiReferenceTypedef[];\n enums: ApiReferenceEnum[];\n}\n\n// ── 로더 — 별도 청크 (첫 조회 때 1회) ─────────────────────────────────────────\n\nlet referencePromise: Promise<Partial<Record<OfficeModule, ApiReferenceSlice>>> | null = null;\n\n/** 통합 레퍼런스 { word, cell, show } — 첫 호출에서만 dynamic import, 이후 캐시. */\nexport function loadApiReference(): Promise<Partial<Record<OfficeModule, ApiReferenceSlice>>> {\n if (!referencePromise) {\n referencePromise = import('./builtin/apiReference.generated.json').then(\n (mod) => mod.default as Partial<Record<OfficeModule, ApiReferenceSlice>>,\n );\n }\n return referencePromise;\n}\n\n/** 모듈 슬라이스 — 없으면 null (생성기 미실행 등). */\nexport async function loadModuleReference(module: OfficeModule): Promise<ApiReferenceSlice | null> {\n const all = await loadApiReference();\n return all[module] ?? null;\n}\n\n// ── 실행 스코프 표기 — word/cell 확정, show 는 잠정(doc) ──────────────────────\n// cell 은 2026-09-01 모듈 팀 결정으로 workbook 확정 (webCell cellProxies.js 스코프 키와 쌍).\n\n/** execute_script 실행 스코프에서 문서 루트를 가리키는 변수명 (모듈별). */\nexport const SCRIPT_ROOT_BY_MODULE: Record<OfficeModule, string> = {\n word: 'word',\n cell: 'workbook',\n show: 'doc',\n};\n\n// ── 검색 유틸 ────────────────────────────────────────────────────────────────\n\n/** 키워드 검색이 한 번에 실어 보낼 최대 건수 — 설명까지 훑으면 흔한 낱말이 수십 건 걸려 응답이 커진다. */\nconst SEARCH_MATCH_LIMIT = 20;\n\n/** 검색 비교용 — 소문자화 + 공백 제거(\"줄간격\"이 \"줄 간격\" 설명과도 맞도록). */\nfunction squashForSearch(text: unknown): string {\n return String(text ?? '').toLowerCase().replace(/\\s+/g, '');\n}\n\n// ── 조회 3모드 렌더러 (순수 함수 — 단위 테스트 대상) ──────────────────────────\n\n/** 인덱스 — 진입점 + 목록. 상세는 { name } / { query } 로 재조회하게 안내한다. */\nexport function referenceIndex(module: OfficeModule, slice: ApiReferenceSlice): unknown {\n const root = SCRIPT_ROOT_BY_MODULE[module];\n const entryClass = slice.classes[0]?.name ?? '(unknown)';\n\n return {\n entry: `${root} (= ${entryClass}, execute_script 에 바인딩됨)`,\n usage: `${root} 에서 트리를 따라 조회·편집한다. 특정 클래스/타입 상세는 get_api_reference({ name }), 키워드 검색은 { query }.`,\n classes: slice.classes.map((c) => ({ name: c.name, role: c.role, methodCount: c.methods.length })),\n typedefs: slice.typedefs.map((t) => t.name),\n enums: slice.enums.map((e) => e.name),\n };\n}\n\n/** 단건 상세 — 클래스 → typedef → enum 순으로 이름 매칭. 미발견은 { name, found:false }. */\nexport function referenceDetail(slice: ApiReferenceSlice, name: string): unknown {\n const cls = slice.classes.find((c) => c.name === name);\n if (cls) {\n return { kind: 'class', name: cls.name, extends: cls.extends, role: cls.role, methods: cls.methods };\n }\n\n const typedef = slice.typedefs.find((t) => t.name === name);\n if (typedef) {\n return { kind: 'typedef', name: typedef.name, props: typedef.properties };\n }\n\n const en = slice.enums.find((e) => e.name === name);\n if (en) {\n return { kind: 'enum', name: en.name, description: en.description, members: en.members };\n }\n\n return { name, found: false };\n}\n\n/** 다중 상세 — 이름 배열을 요청 순서대로 조회해 { items } 로 반환(못 찾은 이름은 found:false 로 섞임). */\nexport function referenceDetails(slice: ApiReferenceSlice, names: string[]): unknown {\n return { items: names.map((n) => referenceDetail(slice, n)) };\n}\n\n/**\n * 키워드 검색 — 클래스·메서드 이름과 설명(summary), 타입 속성(이름·설명), enum 값·key 까지\n * 부분일치(대소문자·공백 무시). 이름 일치가 앞, 설명·값 일치가 뒤. 최대 SEARCH_MATCH_LIMIT 건이며\n * 넘으면 truncated 로 알린다(모델이 검색어를 좁히거나 name 으로 바로 조회하도록).\n */\nexport function referenceSearch(slice: ApiReferenceSlice, query: string): unknown {\n const keyword = squashForSearch(query);\n const nameHits: unknown[] = [];\n const textHits: unknown[] = [];\n\n for (const cls of slice.classes) {\n const classNameHit = squashForSearch(cls.name).includes(keyword);\n for (const method of cls.methods) {\n // 검색 결과는 \"어디에 있나\"만 알려주므로 summary 는 첫 줄만 싣는다(전문은 name 조회로).\n const match = {\n kind: 'method',\n class: cls.name,\n name: method.name,\n signature: method.signature,\n summary: String(method.summary ?? '').split('\\n')[0],\n };\n if (classNameHit || squashForSearch(method.name).includes(keyword)) {\n nameHits.push(match);\n } else if (squashForSearch(method.summary).includes(keyword)) {\n textHits.push(match);\n }\n }\n }\n\n for (const typedef of slice.typedefs) {\n const typeNameHit = squashForSearch(typedef.name).includes(keyword);\n // 타입명이 맞으면 속성 전부, 아니면 검색어가 걸린 속성만 싣는다.\n const props = (typedef.properties ?? []).filter(\n (p) =>\n typeNameHit ||\n squashForSearch((p as { name?: unknown }).name).includes(keyword) ||\n squashForSearch((p as { description?: unknown }).description).includes(keyword),\n );\n if (props.length > 0) {\n const match = { kind: 'typedef', name: typedef.name, props };\n (typeNameHit ? nameHits : textHits).push(match);\n }\n }\n\n for (const en of slice.enums) {\n // enum 은 값 목록이 짧아 어느 쪽으로 걸려도 members 전량을 싣는다(SDK 는 key+value 보존).\n const match = { kind: 'enum', name: en.name, members: en.members };\n if (squashForSearch(en.name).includes(keyword)) {\n nameHits.push(match);\n } else if (\n en.members.some(\n (m) =>\n squashForSearch((m as { value?: unknown }).value).includes(keyword) ||\n squashForSearch((m as { key?: unknown }).key).includes(keyword),\n )\n ) {\n textHits.push(match);\n }\n }\n\n const all = nameHits.concat(textHits);\n const matches = all.slice(0, SEARCH_MATCH_LIMIT);\n const result: { query: string; matches: unknown[]; truncated?: { total: number; shown: number } } = {\n query,\n matches,\n };\n if (all.length > matches.length) {\n result.truncated = { total: all.length, shown: matches.length };\n }\n return result;\n}\n","/**\n * SDK 정의 LLM 도구 표면.\n *\n * 모듈 카탈로그(SDK.toolList)와 별개로 SDK 가 직접 정의하는 도구 2종:\n * - get_api_reference — 개발자 API 레퍼런스 조회(3모드). 데이터가 SDK 번들 안(별도 청크)에\n * 있으므로 **SDK 가 즉답** — 모듈 왕복 0.\n * - execute_script — 코드 문자열만 `SDK.executeScript` cmd 로 모듈에 위임. 실행 코어는\n * commonFrame runScriptReported(비throw {ok, status, logs} 계약 — show 식 채택).\n *\n * 합류 지점은 registerWith.ts getTools() — options.module 이 있을 때만 카탈로그 뒤에 붙는다.\n * **모듈 카탈로그에 같은 이름이 이미 있으면 SDK 쪽을 건너뛴다**(과도기 게이트): word/show 가\n * 자기 도구를 카탈로그에서 내리는 순간 SDK 도구가 자동 활성화된다.\n *\n * 실행 스코프 표기(SCRIPT_ROOT_BY_MODULE)는 잠정 — 모듈 핸들러 확정 시 조정.\n */\n\nimport {\n loadModuleReference,\n referenceDetail,\n referenceDetails,\n referenceIndex,\n referenceSearch,\n SCRIPT_ROOT_BY_MODULE,\n} from './reference.js';\nimport type { ExecuteFn, OfficeModule, ToolSchema } from './types.js';\n\n/** execute_script 가 모듈에 위임할 때 쓰는 cmd (모듈 핸들러는 모듈 측에서 등록). */\nexport const SDK_EXECUTE_SCRIPT_METHOD = 'SDK.executeScript';\n\n/** SDK 정의 도구 1개 — schema(LLM 노출) + run(실행기, format 훅 적용 전 원시 결과). */\nexport interface SdkToolDef {\n schema: ToolSchema;\n run: (args: unknown) => Promise<unknown>;\n}\n\nfunction referenceToolSchema(module: OfficeModule): ToolSchema {\n const root = SCRIPT_ROOT_BY_MODULE[module];\n\n return {\n name: 'get_api_reference',\n description:\n `execute_script 로 코드를 쓰기 전에 문서 SDK 의 정확한 메서드 시그니처를 조회합니다. ` +\n `인자 없이 부르면 진입점(\\`${root}\\`)과 클래스/타입/enum 목록(인덱스)을 반환하고, ` +\n `name 으로 특정 클래스·타입·enum 의 상세(메서드 시그니처·요약, 옵션 객체 형태, 허용값)를 조회합니다 ` +\n `(배열로 여러 개를 한 번에 — 상세는 요청 순서대로 items 로 반환). ` +\n `query 로 키워드 검색합니다(이름은 물론 설명·타입 속성·enum 값까지 부분일치, 공백 무시). 필요한 부분만 조회해 토큰을 아끼세요. ` +\n `예: 표 편집 전에 get_api_reference({ name: [\"…Table\", \"Border\"] }), 하나만 볼 때도 name: [\"Border\"] 처럼 배열, 서식 관련이면 get_api_reference({ query: \"format\" }).`,\n inputSchema: {\n type: 'object',\n properties: {\n name: {\n // 단일 type 만 쓴다 — Gemini function declaration 은 type 유니언(string|array)을 받지 않고,\n // 첫 멤버(string)로 접히면 items 가 남아 도구 목록 전체가 거부된다(2026-09-16 릴리즈 서버 400).\n // 실행부는 문자열 하나도 그대로 받으므로(하위호환) 스키마만 배열로 고정한다.\n type: 'array',\n items: { type: 'string' },\n minItems: 1,\n description:\n '상세를 볼 클래스/typedef/enum 이름 배열. 하나만 볼 때도 [\"Table\"] 처럼 배열로 넘긴다(인덱스 조회 결과의 이름을 그대로 사용).',\n },\n query: {\n type: 'string',\n description:\n '키워드 검색(부분일치) — 이름·설명·타입 속성·enum 값까지 훑는다(공백 무시). 이름 일치가 앞에 오고 최대 20건, 잘리면 truncated 로 알린다.',\n },\n },\n required: [],\n additionalProperties: false,\n },\n };\n}\n\nfunction executeScriptSchema(module: OfficeModule): ToolSchema {\n const root = SCRIPT_ROOT_BY_MODULE[module];\n\n return {\n name: 'execute_script',\n description:\n `여러 단계·반복·조건이 필요한 편집을 JavaScript 코드로 한 번에 실행합니다. ` +\n `[스코프] 문서 SDK 루트가 \\`${root}\\` 로 주어지고 트리를 따라 조회·편집합니다. ` +\n `\\`log(...)\\` 로 진행 기록을 남길 수 있고(모듈에 따라 \\`constants\\` 등 추가 스코프), 최상위 await 를 쓸 수 있습니다. ` +\n `정확한 메서드 시그니처는 먼저 get_api_reference 로 조회하세요 — 시그니처를 추측하지 마세요. ` +\n `[결과] 성공은 {ok:true, result, logs}, 실패는 {ok:false, error:{name,message}, status, logs} 입니다. ` +\n `실패도 오류 응답이 아니라 정상 응답으로 오므로 반드시 ok 필드로 판별하세요. ` +\n `[status 별 행동] \"not_started\": 코드가 한 줄도 실행되지 않음 — 고쳐서 그대로 재시도. ` +\n `\"partial\": 에러 직전까지의 편집이 문서에 남음 — 같은 코드 재실행은 중복 적용되니, 적용된 것을 먼저 조회한 뒤 나머지만 처리. ` +\n `\"timeout\": 실행이 아직 문서를 고치고 있을 수 있음 — 이어서 편집하지 말고, 조회만 하거나 사용자에게 알리고 지시를 기다리세요. ` +\n `[실행 시간] 한 번의 실행은 4.5초 안에 끝나야 합니다 — 대상이 많으면 나눠서 여러 번 호출하세요. ` +\n `[로그] 실패 지점을 알 수 있는 단서는 log 뿐이므로 반복문에서는 매 회차 log 를 남기세요. ` +\n `[반환값] return 값은 문자열/숫자/일반 객체 등 직렬화 가능한 데이터로 주세요. ` +\n `여러 대상을 순회했다면 { applied, skipped } 를 return 하세요(skipped 에 건너뛴 이유 포함).`,\n inputSchema: {\n type: 'object',\n properties: {\n code: {\n type: 'string',\n description: `실행할 JavaScript. \\`${root}\\`(문서 SDK 루트)와 \\`log(...)\\` 가 주어지며 await·return 을 쓸 수 있습니다.`,\n },\n description: {\n type: 'string',\n description: '이 코드가 무엇을 하는지 한 줄 요약(선택). 실행에는 쓰이지 않고 도구 호출 UI 에서 code 대신 읽힙니다.',\n },\n },\n required: ['code'],\n additionalProperties: false,\n },\n };\n}\n\n/**\n * SDK 정의 도구 목록 — getTools() 가 options.module 과 함께 호출한다.\n * run() 결과는 모듈 도구와 동일하게 formatResult/formatError 훅을 통과한다.\n */\nexport function buildSdkTools(module: OfficeModule, execute: ExecuteFn): SdkToolDef[] {\n return [\n {\n schema: referenceToolSchema(module),\n run: async (args: unknown) => {\n const { name, query } = (args ?? {}) as { name?: string | string[]; query?: string };\n const slice = await loadModuleReference(module);\n if (!slice) {\n // 생성물 부재(개발 환경에서 generate:types 미실행 등) — LLM 이 읽는 정상 응답으로 알린다.\n return { error: `API reference for module '${module}' is not bundled in this SDK build.` };\n }\n if (name) {\n // 배열은 요청 순서대로 { items }, 문자열 하나는 단건 상세(하위호환).\n return Array.isArray(name) ? referenceDetails(slice, name) : referenceDetail(slice, name);\n }\n if (query) {\n return referenceSearch(slice, query);\n }\n return referenceIndex(module, slice);\n },\n },\n {\n schema: executeScriptSchema(module),\n run: (args: unknown) => {\n // 계약 검증·실행·직렬화는 모듈(runScriptReported)이 소유 — SDK 는 전달만 한다.\n return execute(SDK_EXECUTE_SCRIPT_METHOD, [args ?? {}]);\n },\n },\n ];\n}\n","/**\n * Server-side tool catalog 어댑터.\n *\n * office 모듈이 `SDK.toolList` 로 도구 카탈로그를 server-side 제공(SSOT)한다.\n * 본 SDK 는 `SDK.toolList` 로 schema 를 받아 modelContext 에 자동 등록하고,\n * 각 도구 실행은 `SDK.toolExecute` generic cmd 로 dispatch 한다.\n *\n * 이 경로는 office 측 `SDK.*` dispatcher(framework 공통 + 모듈 브리지 — 예: webShow `sdkBridge.js`)와 짝을 이룬다.\n */\n\nimport { buildSdkTools } from './sdkTools.js';\nimport {\n type ExecuteFn,\n type GetToolsOptions,\n type ModelContextLike,\n type OfficeTool,\n type RegisterToolsOptions,\n SDKError,\n SDK_ERROR_CODE,\n SDK_VERSION,\n type ToolSchema,\n} from './types.js';\n\n/** WebOffice server-side 카탈로그 조회 cmd */\nexport const SDK_TOOL_LIST_METHOD = 'SDK.toolList';\n/** WebOffice server-side 도구 실행 cmd */\nexport const SDK_TOOL_EXECUTE_METHOD = 'SDK.toolExecute';\n\n/** 기본 결과 포맷 — MCP-shape */\nfunction defaultFormatResult(result: unknown): unknown {\n return { content: [{ type: 'text', text: JSON.stringify(result ?? null) }] };\n}\n\n/** 기본 에러 포맷 — MCP-shape (isError) */\nfunction defaultFormatError(error: unknown): unknown {\n const err = error as { code?: unknown; message?: unknown };\n const code =\n typeof err?.code === 'string' || typeof err?.code === 'number'\n ? err.code\n : 'TOOL_EXECUTE_ERROR';\n const message =\n typeof err?.message === 'string' ? err.message : '도구 실행 중 오류가 발생했습니다.';\n\n return { isError: true, content: [{ type: 'text', text: JSON.stringify({ code, message }) }] };\n}\n\n/** 응답을 ToolSchema 배열로 정규화 — `[...]` 또는 `{ tools: [...] }` 모두 수용 */\nfunction extractTools(schemas: unknown): ToolSchema[] {\n const isToolSchema = (t: unknown): t is ToolSchema => t !== null && typeof t === 'object';\n\n if (Array.isArray(schemas)) {\n return schemas.filter(isToolSchema);\n }\n\n if (\n schemas !== null &&\n typeof schemas === 'object' &&\n Array.isArray((schemas as { tools?: unknown }).tools)\n ) {\n return (schemas as { tools: unknown[] }).tools.filter(isToolSchema);\n }\n\n return [];\n}\n\n/**\n * WebOffice server-side 카탈로그(`SDK.toolList`)에서 도구 schema 목록을 조회.\n */\nexport async function getToolSchemas(execute: ExecuteFn): Promise<ToolSchema[]> {\n // 호출자 SDK 버전 전달 — 모듈이 minSdkVersion 미달 도구를 응답에서 필터링(사전 차단)할\n // 수 있게 한다. 현행 모듈 핸들러는 params 를 무시하므로 추가만으로 하위 호환.\n const schemas = await execute(SDK_TOOL_LIST_METHOD, [{ sdkVersion: SDK_VERSION }]);\n\n return extractTools(schemas);\n}\n\n/** `include` 옵션을 predicate 로 정규화 — 미지정이면 전부 통과 */\nfunction toIncludeFilter(include: GetToolsOptions['include']): (tool: ToolSchema) => boolean {\n if (include === undefined) {\n return () => true;\n }\n if (typeof include === 'function') {\n return include;\n }\n if (Array.isArray(include)) {\n const allowed = new Set(include);\n return (tool) => allowed.has(tool.name);\n }\n throw new SDKError(\n '[TFO-SDK] getTools(): options.include must be a string[] or a predicate function.',\n SDK_ERROR_CODE.INVALID_ARGUMENT,\n );\n}\n\n/**\n * **실행 가능한 도구 목록** — `SDK.toolList` 카탈로그 각 항목에 `execute(args)` 를 붙여 돌려준다.\n * `execute` 는 `SDK.toolExecute` generic cmd 로 위임한다.\n *\n * 기본 동작은 **통과**: 모듈이 회신한 결과(최종 MCP `CallToolResult`)를 그대로 resolve 하고,\n * 전송/framework 실패는 `SDKError` 로 reject 한다. 프레임워크가 다른 shape 를 원하면\n * `formatResult`/`formatError` 로 변환한다.\n *\n * `options.module` 이 있으면 SDK 정의 도구(get_api_reference — 번들 레퍼런스 즉답 ·\n * execute_script — `SDK.executeScript` 위임)가 카탈로그 뒤에 합류한다. 모듈 카탈로그에 같은\n * 이름이 있으면 모듈 쪽을 우선한다(과도기 게이트 — sdkTools.ts 참고).\n *\n * 일반적으로는 인스턴스 메서드 `office.getTools()` 를 쓴다. 본 standalone 함수는 커스텀\n * `execute` 를 wrap 할 때 사용.\n */\nexport async function getTools(\n execute: ExecuteFn,\n options: GetToolsOptions = {},\n): Promise<OfficeTool[]> {\n const include = toIncludeFilter(options.include);\n const { formatResult, formatError } = options;\n\n // 실행 결과·오류의 format 훅 적용 — 모듈 카탈로그 도구·SDK 정의 도구 공통 경로.\n const applyHooks = async (invoke: () => Promise<unknown>): Promise<unknown> => {\n try {\n const result = await invoke();\n\n return formatResult ? formatResult(result) : result;\n } catch (error) {\n if (formatError) {\n return formatError(error);\n }\n throw error;\n }\n };\n\n const schemas = (await getToolSchemas(execute)).filter(include);\n\n // 카탈로그 원본을 spread 로 보존 — 모듈이 실어 보낸 여분 필드도 그대로 남는다.\n const tools: OfficeTool[] = schemas.map((tool) => ({\n ...tool,\n execute: (args: unknown) =>\n applyHooks(() => execute(SDK_TOOL_EXECUTE_METHOD, [{ name: tool.name, args }])),\n }));\n\n // SDK 정의 도구(get_api_reference·execute_script) 합류 — options.module 이 있을 때만.\n // 모듈 카탈로그에 같은 이름이 이미 있으면 건너뛴다(과도기 게이트): word/show 가 자기 도구를\n // 카탈로그에서 내리는 순간 SDK 도구가 자동 활성화된다.\n if (options.module) {\n const taken = new Set(tools.map((t) => t.name));\n for (const { schema, run } of buildSdkTools(options.module, execute)) {\n if (!include(schema) || taken.has(schema.name)) {\n continue;\n }\n tools.push({ ...schema, execute: (args: unknown) => applyHooks(() => run(args)) });\n }\n }\n\n return tools;\n}\n\n/**\n * 모듈의 도구 카탈로그(`SDK.toolList`)를 modelContext 에 **도구로 등록**한다 (AI Agent 흐름).\n * `getTools()` 위의 편의 함수 — `registerTool` 콜백을 받는 프레임워크(tf-agent-sdk 등)용.\n * 기본 포맷은 MCP-shape 래핑(결과 `{content:[{type:'text', text}]}`, 오류 `{isError:true, …}`).\n *\n * 일반적으로는 인스턴스 메서드 `office.registerTools(modelContext)` 를 쓴다. 본 standalone\n * 함수는 커스텀 `execute` 를 wrap 할 때 사용.\n *\n * @returns 등록한 도구 schema 원본 목록 — `SDK.toolList` 가 회신한 필드를 그대로 보존한다\n * (`execute` 만 제외. 모듈이 실어 보낸 여분 필드 포함).\n */\nexport async function registerTools(\n execute: ExecuteFn,\n modelContext: ModelContextLike,\n options: RegisterToolsOptions = {},\n): Promise<ToolSchema[]> {\n if (!modelContext || typeof modelContext.registerTool !== 'function') {\n throw new SDKError(\n '[TFO-SDK] registerTools() requires a modelContext with a registerTool() method.',\n SDK_ERROR_CODE.INVALID_ARGUMENT,\n );\n }\n\n const tools = await getTools(execute, {\n module: options.module,\n formatResult: options.formatResult ?? defaultFormatResult,\n formatError: options.formatError ?? defaultFormatError,\n });\n\n for (const tool of tools) {\n modelContext.registerTool(tool);\n }\n\n // 원본 보존 계약: getTools 가 만든 도구에서 execute 만 떼어내면 곧 카탈로그 원본이다.\n return tools.map(({ execute: _execute, ...schema }) => schema as ToolSchema);\n}\n","/**\n * Server-side system prompt 어댑터 (`SDK.toolList` 와 같은 경로).\n *\n * WebOffice 모듈이 `SDK.systemPrompt` 로 자기 문서 모델 · API 사용 규약을 제공(SSOT).\n * 미구현 모듈(현재 word/cell)은 빈 문자열.\n */\n\nimport type { ExecuteFn } from './types.js';\n\n/** WebOffice server-side system prompt 조회 cmd */\nexport const SDK_SYSTEM_PROMPT_METHOD = 'SDK.systemPrompt';\n\n/** 프롬프트 응답을 문자열로 정규화 — 미구현 모듈의 undefined/null 은 빈 문자열 */\nfunction normalizePrompt(value: unknown): string {\n return typeof value === 'string' ? value : '';\n}\n\n/**\n * WebOffice server-side 프롬프트(`SDK.systemPrompt`)에서 system prompt 를 조회.\n */\nexport async function getSystemPrompt(execute: ExecuteFn): Promise<string> {\n // 미구현 모듈에서 cmd 미등록으로 reject 될 수 있다. 프롬프트는 없어도 동작해야 하므로 삼킨다.\n let modulePrompt: unknown;\n\n try {\n modulePrompt = await execute(SDK_SYSTEM_PROMPT_METHOD, []);\n } catch {\n return '';\n }\n\n return normalizePrompt(modulePrompt);\n}\n","/**\n * 개발자 API(proxy) 관련 상수.\n *\n * office 모듈의 `SDK.proxyInvoke` 계약과 짝을 이룬다.\n */\n\n/**\n * proxy 엔티티 타입 — office 내부 `ProxyType` 상수(show: webShow `showProxies.js`,\n * cell: webCell `api/apiConstants.js`)와 동일해야 한다 (수동 동기화 쌍).\n * 직렬화 descriptor(`{__proxy, type, attrs}`)의 `type` 값으로 사용.\n * 내부 직렬화 어휘 — index.ts 에서 재수출하지 않는다 (개발자 판별은 가드 메서드로).\n *\n * attrs 계약은 모듈별로 다르다:\n * - show: identity-attrs — attrs = 식별자 스냅샷 (`{slideId}` 등)\n * - cell: path-attrs — attrs = `{root?, steps}` 네비게이션 경로 (proxyClient 의\n * navigationMap 옵션과 office 측 경로 resolver — webCell `api/cellProxies.js` — 가 짝). CHART/TABLE 문자열은\n * show와 공유하지만 dispatcher가 모듈(iframe)별 독립이라 충돌 없음.\n */\nexport const PROXY_TYPE = {\n // show 모듈 (webShow api/showProxies.js)\n DOCUMENT: 'Document',\n SLIDE: 'Slide',\n SHAPE: 'Shape',\n IMAGE: 'Image',\n LINE: 'Line',\n GROUP: 'Group',\n CHART: 'Chart',\n TABLE: 'Table',\n TABLE_CELL: 'TableCell',\n COMMENT: 'Comment',\n DIAGRAM: 'Diagram',\n OLE_OBJECT: 'OleObject',\n CONTROL: 'Control',\n // cell 모듈 (webCell api/apiConstants.js — CHART/TABLE 은 위 문자열 재사용)\n WORKBOOK: 'Workbook',\n WORKSHEET: 'Worksheet',\n RANGE: 'Range',\n FILTER: 'Filter',\n NAME: 'Name',\n} as const;\n\n/**\n * show 핸들의 타입 가드 메서드 맵 — `{ 가드명: 핸들 내부 판별값 }`.\n *\n * proxyClient 의 `guardMethods` 옵션으로 주입되어, 핸들에서 `s.isImage()` 처럼\n * 호출하면 postMessage 왕복 없이 내부 `type` 과 동기 비교한 boolean 을 돌려준다.\n * 생성물(show-api.generated.ts)의 `this is T` predicate 선언과 짝 —\n * scripts/show-api.dts.config.json 의 `typeGuards` 와 수동 동기화한다.\n *\n * ⚠️ 여기 등록된 이름은 show 모든 핸들에서 원격 메서드로 전달되지 않는다(예약어).\n * office 프록시에 동명 메서드가 생기면 generate-dts 가 생성 단계에서 충돌 에러를 낸다.\n */\nexport const SHOW_GUARD_METHODS = {\n isShape: PROXY_TYPE.SHAPE,\n isImage: PROXY_TYPE.IMAGE,\n isLine: PROXY_TYPE.LINE,\n isGroup: PROXY_TYPE.GROUP,\n isChart: PROXY_TYPE.CHART,\n isTable: PROXY_TYPE.TABLE,\n isDiagram: PROXY_TYPE.DIAGRAM,\n isOleObject: PROXY_TYPE.OLE_OBJECT,\n isControl: PROXY_TYPE.CONTROL,\n} as const;\n","/**\n * cell 모듈 lazy 네비게이션 맵 — path-attrs 핸들이 **통신 없이** 스텝을 누적하며\n * 하위 타입 핸들을 동기 반환하는 메서드 목록 (8종).\n *\n * ⚠️ office 측 cell 프록시의 스텝 allowlist(webCell `js/api/cellProxies.js` 의 `_NAV_STEPS`)와 **수동 동기화 쌍**.\n * 메서드 추가/제거 시 양쪽을 함께 갱신할 것 — 여기만 추가하면 office 가\n * METHOD_NOT_ALLOWED 를 회신하고, office 만 추가하면 eager 왕복으로 동작한다.\n *\n * 여기 없는 메서드는 전부 eager(호출 즉시 1왕복 실행). 특히 다음 6종은 의도적 제외:\n * - getWorksheet : 스텝으로 두면 매 실행 이름/인덱스로 시트를 다시 찾아 지목이 흔들린다\n * (시트 이동·중간 삽입·삭제·원격 편집). 첫 왕복으로 office 가 발급한 sheetId 를 받아\n * anchored Worksheet 핸들(`root: {sheetId}`)을 회신하며, 이후 그 핸들은 시트 순서가\n * 어떻게 바뀌어도 같은 시트를 가리키고 그 시트가 삭제되면 SHEET_NOT_FOUND 로 실패한다.\n * sheetId 는 office 내부 값이라 SDK 공개 표면에는 드러나지 않는다.\n * - getSelection / getUsedRange : 상태 조회형 — 호출 시점 좌표를 확정해 anchored\n * Range 핸들(`root: {sheetId, address}`)을 회신. 빈 시트의 getUsedRange 는\n * A1 단일 셀 Range 로 취급 (null 을 돌려주지 않는다).\n * - addChart / addTable / addDefinedName : 팩토리(문서 변경 부수효과) — 즉시 실행,\n * anchored 핸들 회신 (addDefinedName → anchored Name 핸들 `root: {name, sheet}`).\n * (Filter 는 getFilter 스텝으로 핸들을 얻은 뒤 create() 로 생성한다 — create 는\n * FILTER 핸들의 terminal 메서드라 스텝이 아니다.)\n *\n * lazy semantics: 네비게이션은 존재를 확인하지 않는다. 존재 검증은 실행 메서드 호출\n * 시점에 office 가 경로를 fresh resolve 하며 수행하고, 부재 시 `SDKError` 로 reject 된다\n * (`err.data.error.code` = SHEET_NOT_FOUND / CHART_NOT_FOUND / TABLE_NOT_FOUND /\n * NAME_NOT_FOUND / INVALID_ARGUMENT ..., `err.data.error.message` 에 스텝 컨텍스트).\n */\nimport { PROXY_TYPE } from './proxyConstants.js';\n\n/** 모듈별 lazy 네비게이션 맵 — `{ 핸들타입: { 메서드명: 하위 핸들타입 } }`. */\nexport type NavigationMap = Readonly<Record<string, Readonly<Record<string, string>>>>;\n\nexport const CELL_NAVIGATION_MAP: NavigationMap = {\n [PROXY_TYPE.WORKBOOK]: {\n getObjectById: PROXY_TYPE.CHART,\n getTable: PROXY_TYPE.TABLE,\n getDefinedName: PROXY_TYPE.NAME,\n },\n [PROXY_TYPE.WORKSHEET]: {\n getRange: PROXY_TYPE.RANGE,\n getChart: PROXY_TYPE.CHART,\n getFilter: PROXY_TYPE.FILTER,\n },\n [PROXY_TYPE.TABLE]: {\n getRange: PROXY_TYPE.RANGE,\n getFilter: PROXY_TYPE.FILTER,\n },\n};\n","/**\n * postMessage transport layer.\n *\n * Responsibilities:\n * - Build TfoMessage envelope and send via target.postMessage()\n * - Listen for response messages with origin validation\n * - Match request-response by message ID (pending Map)\n * - Handle timeouts (default 5000ms)\n * - Clear pending on destroy (reject all in-flight)\n */\n\nimport {\n API_NAMESPACE,\n API_VERSION,\n type ApiErrorInfo,\n MODULE_APP_ID,\n type OfficeModule,\n RESULT_CODE,\n SDKError,\n SDK_ERROR_CODE,\n SDK_VERSION,\n type TfoMessage,\n type TfoMessageBody,\n} from './types.js';\n\n// ============================================================\n// 상수\n// ============================================================\n\nexport const DEFAULT_TIMEOUT_MS = 5000;\n\n// ============================================================\n// PostMessageContext\n// ============================================================\n\ninterface PendingEntry {\n resolve: (data: unknown) => void;\n reject: (err: SDKError) => void;\n method: string;\n timer: ReturnType<typeof setTimeout>;\n}\n\nexport interface PostMessageContext {\n readonly module: OfficeModule;\n readonly appId: string;\n readonly frameworkOrigin: string;\n readonly frameworkTarget: Window;\n readonly pending: Map<string, PendingEntry>;\n}\n\n/**\n * PostMessageContext를 생성한다.\n * @param module - 'word' | 'cell' | 'show'\n * @param frameworkOrigin - 통신 대상 origin (절대 '*' 금지)\n * @param frameworkTarget - postMessage 대상 Window (iframe.contentWindow 등)\n */\nexport function createPostMessageContext(\n module: OfficeModule,\n frameworkOrigin: string,\n frameworkTarget: Window,\n): PostMessageContext {\n return {\n module,\n appId: MODULE_APP_ID[module],\n frameworkOrigin,\n frameworkTarget,\n pending: new Map(),\n };\n}\n\n// ============================================================\n// 메시지 ID 생성\n// ============================================================\n\nlet _msgCounter = 0;\n\n/**\n * office 측 기존 메시지 ID 포맷(framework `apiMessageManager`)과 호환되는 생성.\n * `${appId}Msg${timestamp}${counter}`\n * 예: \"HWriteAppMsg17151234567891\"\n */\nexport function generateMessageId(appId: string): string {\n _msgCounter += 1;\n return `${appId}Msg${Date.now()}${_msgCounter}`;\n}\n\n// ============================================================\n// sendCommand\n// ============================================================\n\n/**\n * cmd 메시지를 framework에 송신하고 result를 기다린다.\n *\n * @param ctx - postMessage 컨텍스트\n * @param method - 'Document.insertText' 등\n * @param params - 메서드 파라미터 배열 (기본 [])\n * @param timeoutMs - 응답 타임아웃 (기본 5000ms)\n * @returns result.data 또는 reject(SDKError)\n */\nexport function sendCommand(\n ctx: PostMessageContext,\n method: string,\n params?: unknown[],\n timeoutMs: number = DEFAULT_TIMEOUT_MS,\n): Promise<unknown> {\n const id = generateMessageId(ctx.appId);\n\n return new Promise<unknown>((resolve, reject) => {\n const timer = setTimeout(() => {\n ctx.pending.delete(id);\n reject(\n new SDKError(\n `[TFO-SDK] Request timed out: ${method} (${id})`,\n SDK_ERROR_CODE.TIMEOUT,\n ),\n );\n }, timeoutMs);\n\n ctx.pending.set(id, {\n resolve: (data) => {\n clearTimeout(timer);\n resolve(data);\n },\n reject: (err) => {\n clearTimeout(timer);\n reject(err);\n },\n method,\n timer,\n });\n\n const message: TfoMessage = {\n [API_NAMESPACE]: {\n app: ctx.appId,\n version: API_VERSION,\n // 호출자 SDK 버전 자기 신고 — 모듈이 API/도구별 minSdkVersion 게이트에 사용.\n // 수신부 필터는 알려진 필드만 검사하므로 구 framework 에서도 무시되어 안전.\n sdkVersion: SDK_VERSION,\n type: 'cmd',\n method,\n params: params ?? [],\n id,\n },\n };\n\n try {\n ctx.frameworkTarget.postMessage(JSON.stringify(message), ctx.frameworkOrigin);\n } catch (err) {\n ctx.pending.delete(id);\n clearTimeout(timer);\n reject(\n new SDKError(\n `[TFO-SDK] Failed to send: ${method}`,\n SDK_ERROR_CODE.NETWORK_ERROR,\n err,\n ),\n );\n }\n });\n}\n\n// ============================================================\n// 응답 리스너\n// ============================================================\n\n/**\n * window 'message' 이벤트 리스너를 등록한다. origin 검증 후 envelope 파싱하여\n * pending Map에서 매칭되는 요청을 resolve/reject.\n *\n * @param ctx - postMessage 컨텍스트\n * @returns 리스너 해제 함수 (destroy 시 호출)\n */\nexport function createMessageListener(ctx: PostMessageContext): () => void {\n const listener = (event: MessageEvent): void => {\n // 1. origin 검증\n if (event.origin !== ctx.frameworkOrigin) {\n return;\n }\n\n // 2. envelope 파싱\n const msgBody = parseEnvelope(event.data);\n if (!msgBody) {\n return;\n }\n\n // 3. result 메시지만 처리 (cmd · event 는 무시)\n if (msgBody.type !== 'result' || !msgBody.id) {\n return;\n }\n\n // 4. pending 매칭\n const entry = ctx.pending.get(msgBody.id);\n if (!entry) {\n return;\n }\n ctx.pending.delete(msgBody.id);\n\n // 5. resolve / reject\n // `data` 는 framework result 원문을 그대로 전달한다 (해석은 상위 계층 몫).\n // proxy 는 래핑된 응답을 실어 보내므로 실패 시 `SDKError.data` 가\n // `ApiErrorResponse`(`{success:false, error:{code, message}}`) 가 되고,\n // 그 외 cmd 는 실패 사유 문자열이 된다.\n if (msgBody.code === RESULT_CODE.SUCCEED) {\n entry.resolve(msgBody.data);\n } else {\n // proxy 실패는 transport code:-1 과 payload({success:false, error})로 함께 온다.\n // payload 에 API 에러가 있으면 그 code/message 를 SDKError 메시지에 반영한다(원문은 data 에 보존).\n const data = msgBody.data as { success?: unknown; error?: ApiErrorInfo } | undefined;\n const apiError = data && data.success === false ? data.error : undefined;\n let message: string;\n if (apiError) {\n const detail = apiError.message\n ? `${apiError.code}: ${apiError.message}`\n : apiError.code;\n message = `[TFO-SDK] ${msgBody.method} failed: ${detail}`;\n } else {\n message = `[TFO-SDK] Command failed: ${msgBody.method} (code: ${msgBody.code})`;\n }\n entry.reject(\n new SDKError(message, msgBody.code ?? SDK_ERROR_CODE.FRAMEWORK_ERROR, msgBody.data),\n );\n }\n };\n\n window.addEventListener('message', listener);\n return () => window.removeEventListener('message', listener);\n}\n\n/**\n * event.data 를 TfoMessageBody 로 안전하게 파싱한다.\n * 문자열·객체 양쪽 지원. 잘못된 형식은 undefined 반환.\n */\nfunction parseEnvelope(data: unknown): TfoMessageBody | undefined {\n let parsed: unknown;\n\n if (typeof data === 'string') {\n try {\n parsed = JSON.parse(data);\n } catch {\n return undefined;\n }\n } else if (data !== null && typeof data === 'object') {\n parsed = data;\n } else {\n return undefined;\n }\n\n if (parsed === null || typeof parsed !== 'object') {\n return undefined;\n }\n\n const envelope = (parsed as Record<string, unknown>)[API_NAMESPACE];\n if (envelope === null || typeof envelope !== 'object') {\n return undefined;\n }\n\n return envelope as TfoMessageBody;\n}\n\n// ============================================================\n// clearPending — disconnect 시 호출\n// ============================================================\n\n/**\n * 대기 중인 모든 pending 요청을 SDKError(DESTROYED)로 reject 하고 정리한다.\n */\nexport function clearPending(ctx: PostMessageContext): void {\n for (const [, entry] of ctx.pending) {\n clearTimeout(entry.timer);\n entry.reject(\n new SDKError(\n `[TFO-SDK] Office handle disconnected while request pending: ${entry.method}`,\n SDK_ERROR_CODE.DESTROYED,\n ),\n );\n }\n ctx.pending.clear();\n}\n","/**\n * execute API — dynamic dispatch by method name string.\n *\n * 호출 흐름:\n * sdk.execute(\"Document.insertText\", [{text: \"Hi\"}])\n * → createExecute가 반환한 함수\n * → destroyed 검사 → sendCommand → postMessage → Framework\n */\n\nimport { type PostMessageContext, sendCommand } from './postMessage.js';\nimport { type ExecuteFn, SDKError, SDK_ERROR_CODE } from './types.js';\n\n/**\n * execute 함수를 생성한다.\n *\n * @param ctx - postMessage 컨텍스트\n * @param isDestroyed - destroyed 상태를 반환하는 getter (init.ts에서 closure로 관리)\n * @param timeoutMs - 응답 타임아웃 (옵션)\n */\nexport function createExecute(\n ctx: PostMessageContext,\n isDestroyed: () => boolean,\n timeoutMs?: number,\n): ExecuteFn {\n return function execute(method: string, params?: unknown[]): Promise<unknown> {\n if (isDestroyed()) {\n return Promise.reject(\n new SDKError(\n '[TFO-SDK] SDK instance has been destroyed.',\n SDK_ERROR_CODE.DESTROYED,\n ),\n );\n }\n return sendCommand(ctx, method, params, timeoutMs);\n };\n}\n","/**\n * 개발자 API host 클라이언트 — office `SDK.proxyInvoke` 계약의 거울상.\n *\n * office 모듈(webShow `showProxies.js` 등)은 가벼운 핸들(`{proxyType, attrs}`)로 메서드를\n * 동적 dispatch 한다. 본 모듈은 그 host 쪽 대칭 구현:\n * - 엔티티 핸들 = ES6 Proxy. 메서드 호출을 `execute(\"SDK.proxyInvoke\", [payload])`로 직렬화.\n * - 인자의 핸들 → `{__proxy, type, attrs}` descriptor (office 측 `_materializeArgs` 가 복원).\n * - 응답의 `{__proxy, type, attrs}` → 다시 핸들로 복원 (office 측 `_serializeResult` 의 역).\n *\n * 핸들 kind 2종 (모듈별 attrs 계약):\n * - identity (기본: show·word): attrs = 식별자 스냅샷. 모든 메서드 호출이 1왕복.\n * - path (opt-in, cell): `navigationMap` 옵션 지정 시. attrs = `{root?, steps}` 네비게이션\n * 경로. 맵에 등재된 네비게이션 메서드는 **통신 없이** 스텝을 누적한 하위 핸들을 동기\n * 반환하고(then-guard 로 `await` 호환 유지), 그 외(실행/eager) 메서드만 1왕복한다.\n * office 측(webCell `cellProxies.js`)이 실행 시점에 경로를 fresh resolve 한다.\n *\n * 응답 래핑: office 는 `{success, result/error}` 로 회신한다.\n * 성공 응답은 여기서 unwrap 해 `result` 만 노출하므로 **개발자 표면은 동일**하고,\n * 실패 응답은 transport code 가 FAIL 이라 postMessage 계층이 `SDKError.data` 에\n * 실어 reject 한다 (소비자는 `err.data.error.code` 로 분기).\n */\n\nimport type { NavigationMap } from './cellNavigation.js';\nimport { type ApiErrorResponse, type ExecuteFn, SDKError, SDK_ERROR_CODE } from './types.js';\n\n/** 핸들 식별용 내부 심볼 — 인자 직렬화 시 host 핸들을 구분한다. */\nconst HANDLE = Symbol('tfoProxyHandle');\n\n/** path-attrs 핸들의 네비게이션 스텝 — office 측(`_resolvePath`)이 순차 재생한다. */\ninterface PathStep {\n m: string;\n a: unknown[];\n}\n\n/** path kind 핸들의 attrs 형태. root 생략 시 루트는 office 측 최상위 싱글턴. */\ninterface PathAttrs extends Record<string, unknown> {\n root?: Record<string, unknown>;\n steps: PathStep[];\n}\n\n/** 핸들 내부 상태 — office에 보낼 식별자(identity) 또는 경로(path). */\ninterface HandleState {\n kind: 'identity' | 'path';\n type: string;\n attrs: Record<string, unknown>;\n [HANDLE]: true;\n}\n\n/** office가 보내는 직렬화된 proxy descriptor. */\ninterface ProxyDescriptor {\n __proxy: true;\n type: string;\n attrs: Record<string, unknown>;\n}\n\n/** createProxyClient 옵션. */\nexport interface ProxyClientOptions {\n /**\n * 모듈별 lazy 네비게이션 맵 (`{ 핸들타입: { 메서드명: 하위타입 } }`).\n * 지정 시 핸들이 path kind 로 동작한다 (cell — `CELL_NAVIGATION_MAP`).\n * 미지정 시 identity kind (show·word).\n */\n navigationMap?: NavigationMap;\n /**\n * 타입 가드 메서드 맵 (`{ 가드명: 핸들 내부 판별값 }` — show 는 `SHOW_GUARD_METHODS`).\n *\n * 등록된 이름을 핸들에서 호출하면 원격으로 가지 않고 내부 `type` 과 동기 비교한\n * boolean 을 반환한다 (생성물의 `this is T` predicate 선언과 짝, postMessage 왕복 없음).\n * 미지정 시 기존 동작 그대로 — 모든 프로퍼티가 원격 메서드로 위임된다 (cell/word 무변경).\n *\n * ⚠️ 등록된 이름은 원격 메서드로 전달되지 않는다(예약어) — office 프록시에 동명\n * 메서드를 추가하면 안 된다 (generate-dts 가 생성 단계에서 충돌을 검출).\n */\n guardMethods?: Record<string, string>;\n}\n\nfunction isProxyDescriptor(v: unknown): v is ProxyDescriptor {\n return v != null && typeof v === 'object' && (v as { __proxy?: unknown }).__proxy === true;\n}\n\nfunction isHandle(v: unknown): v is HandleState {\n return v != null && (typeof v === 'object' || typeof v === 'function') &&\n (v as { [HANDLE]?: unknown })[HANDLE] === true;\n}\n\nfunction isPlainObject(v: unknown): v is Record<string, unknown> {\n if (v == null || typeof v !== 'object') {\n return false;\n }\n const proto = Object.getPrototypeOf(v);\n return proto === Object.prototype || proto === null;\n}\n\n/**\n * proxy 클라이언트를 생성한다.\n *\n * @param execute - SDK 인스턴스의 execute (postMessage 왕복)\n * @param options - `navigationMap` 지정 시 path kind (cell). 미지정 시 identity (show·word).\n * @returns `makeHandle(type, attrs)` — 타입드 엔티티 핸들 팩토리\n */\nexport function createProxyClient(execute: ExecuteFn, options?: ProxyClientOptions): {\n makeHandle: (type: string, attrs: Record<string, unknown>) => unknown;\n} {\n const navigationMap = options?.navigationMap;\n const guardMethods = options?.guardMethods;\n const kind: HandleState['kind'] = navigationMap ? 'path' : 'identity';\n\n /**\n * 인자 직렬화 — 핸들을 descriptor로. 배열과 값 객체를 재귀한다\n * (핸들은 인자 객체의 필드로도 올 수 있다 — office 측 `_materializeArgs` 와 동일 깊이).\n */\n function serializeArgs(value: unknown): unknown {\n if (Array.isArray(value)) {\n return value.map(serializeArgs);\n }\n if (isHandle(value)) {\n return { __proxy: true, type: value.type, attrs: value.attrs };\n }\n if (isPlainObject(value)) {\n const out: Record<string, unknown> = {};\n for (const key of Object.keys(value)) {\n out[key] = serializeArgs(value[key]);\n }\n return out;\n }\n return value;\n }\n\n /**\n * 결과 역직렬화 — descriptor를 핸들로 (office 측 `_serializeResult` 의 역).\n * 배열/평범한 객체는 재귀, 원시값은 그대로.\n * path kind 에서는 descriptor(eager/팩토리 응답의 anchored 식별자)를\n * `{root: {type, ...attrs}, steps: []}` anchored 경로 핸들로 복원한다.\n */\n function deserializeResult(value: unknown): unknown {\n if (value == null || typeof value !== 'object') {\n return value;\n }\n if (Array.isArray(value)) {\n return value.map(deserializeResult);\n }\n if (isProxyDescriptor(value)) {\n if (kind === 'path') {\n return makeHandle(value.type, {\n root: { type: value.type, ...value.attrs },\n steps: [],\n } satisfies PathAttrs);\n }\n return makeHandle(value.type, value.attrs);\n }\n\n const out: Record<string, unknown> = {};\n for (const key of Object.keys(value)) {\n out[key] = deserializeResult((value as Record<string, unknown>)[key]);\n }\n return out;\n }\n\n /**\n * 래핑된 응답에서 개발자 표면 값을 꺼낸다.\n *\n * 실패 응답은 transport code 가 `FAIL` 이라 postMessage 계층이 먼저 reject 하므로\n * 정상 흐름에서는 여기 도달하지 않는다. 도달했다면 프로토콜 불일치이므로\n * resolve 대신 SDKError 로 전환해 \"resolve = 성공\" 계약을 지킨다.\n * 래핑되지 않은 응답은 그대로 통과시킨다.\n */\n function unwrapResponse(raw: unknown, method: string): unknown {\n if (raw == null || typeof raw !== 'object') {\n return raw;\n }\n const response = raw as { success?: unknown; result?: unknown };\n if (response.success === true) {\n return response.result;\n }\n if (response.success === false) {\n const { error } = raw as ApiErrorResponse;\n const detail = error?.message ? `${error.code}: ${error.message}` : (error?.code ?? 'UNKNOWN');\n throw new SDKError(\n `[TFO-SDK] ${method} failed: ${detail}`,\n SDK_ERROR_CODE.FRAMEWORK_ERROR,\n raw,\n );\n }\n return raw;\n }\n\n async function invoke(state: HandleState, method: string, args: unknown[]): Promise<unknown> {\n const payload = {\n proxyType: state.type,\n attrs: state.attrs,\n method,\n args: serializeArgs(args),\n };\n // office 개발자 proxy 메서드 실행 cmd\n const raw = await execute(\"SDK.proxyInvoke\", [payload]);\n return deserializeResult(unwrapResponse(raw, method));\n }\n\n /** path kind 네비게이션 — 통신 없이 스텝을 누적한 하위 타입 핸들을 동기 생성한다. */\n function makeChildHandle(state: HandleState, method: string, childType: string, args: unknown[]): unknown {\n const attrs = state.attrs as PathAttrs;\n const steps: PathStep[] = [\n ...(attrs.steps ?? []),\n { m: method, a: serializeArgs(args) as unknown[] },\n ];\n const childAttrs: PathAttrs =\n attrs.root !== undefined ? { root: attrs.root, steps } : { steps };\n return makeHandle(childType, childAttrs);\n }\n\n function makeHandle(type: string, attrs: Record<string, unknown>): unknown {\n const state: HandleState = { [HANDLE]: true, kind, type, attrs };\n\n return new Proxy(state, {\n get(target, prop) {\n // 내부 상태 / 핸들 마커는 그대로 노출 (직렬화에서 사용).\n if (prop === HANDLE) {\n return true;\n }\n if (prop === 'type') {\n return target.type;\n }\n if (prop === 'attrs') {\n return target.attrs;\n }\n // ⚠️ thenable 오인 방지 — 핸들은 await method() 결과로 반환되므로\n // then 조회 시 함수를 돌려주면 Promise가 무한 풀림에 빠진다.\n if (prop === 'then' || typeof prop === 'symbol') {\n return undefined;\n }\n // path kind: navigationMap 등재 메서드 = lazy 네비게이션 (통신 0, 동기 반환).\n if (navigationMap) {\n const typeNav = navigationMap[target.type];\n if (typeNav && Object.prototype.hasOwnProperty.call(typeNav, prop)) {\n const childType = typeNav[prop as string] as string;\n return (...args: unknown[]) =>\n makeChildHandle(target, String(prop), childType, args);\n }\n }\n // 타입 가드: 내부 판별값과 동기 비교 (통신 0). 원격 위임보다만 먼저 가로챈다.\n if (guardMethods && Object.prototype.hasOwnProperty.call(guardMethods, prop)) {\n return () => target.type === guardMethods[prop as string];\n }\n // 그 외 모든 prop = 원격 메서드. 인자를 직렬화해 proxyInvoke로 위임.\n return (...args: unknown[]) => invoke(target, String(prop), args);\n },\n });\n }\n\n return { makeHandle };\n}\n","/**\n * createOffice factory — SDK의 단일 저수준 진입점.\n *\n * 이미 떠 있는 오피스 편집기(iframe/window)에 postMessage 로 **연결**한다 — 편집기를\n * 생성하지 않으며, `disconnect()` 도 연결만 끊는다. iframe 요소만 있으면 상위 facade\n * `Office.word/cell/show(iframe)` (app.ts) 가 더 간편하다.\n *\n * Options (`OfficeOptions`):\n * - module: 'word' | 'cell' | 'show' (필수)\n * - frameworkOrigin: string (필수, '*' 금지)\n * - iframeEl?: HTMLIFrameElement (iframeEl 또는 targetWindow 중 1개 필수)\n * - targetWindow?: Window\n * - timeoutMs?: number (기본 5000ms)\n *\n * 반환 (`Office<M>` = `OfficeHandle<M>`):\n * - module: OfficeModule\n * - execute: (method, params) => Promise<unknown> AI/Office Agent 진입점\n * - getToolSchemas: () => Promise<ToolSchema[]> SDK.toolList 호출\n * - getSystemPrompt:() => Promise<string> SDK.systemPrompt 호출 (제공)\n * - getTools: (options?) => Promise<OfficeTool[]> 실행 가능한 도구 배열 (개발자 기본 경로)\n * - registerTools: (modelContext, options?) => Promise getTools 위의 콜백 등록 편의 함수\n * - getDocument: () => 모듈별 문서 최상위 핸들\n * - disconnect: () => void 리스너 제거 + pending reject\n *\n * Wires together:\n * - postMessage context (postMessage.ts)\n * - execute function (execute.ts)\n * - registerTools (registerWith.ts)\n *\n * server-only — LLM 이 `office.execute(\"도구이름\", [args])` 로 동적 dispatch. 옛 정적\n * 개발자 표면(`sdk.api.X.Y`) + 도구 큐(`registerTool`) 는 2026-06-01 폐기.\n */\n\nimport { CELL_NAVIGATION_MAP } from './cellNavigation.js';\nimport { createExecute } from './execute.js';\nimport { clearPending, createMessageListener, createPostMessageContext } from './postMessage.js';\nimport { createProxyClient } from './proxyClient.js';\nimport { PROXY_TYPE, SHOW_GUARD_METHODS } from './proxyConstants.js';\nimport { getToolSchemas, getTools, registerTools } from './registerWith.js';\nimport { getSystemPrompt } from './systemPrompt.js';\nimport {\n type AppInfo,\n type DocumentCommonApi,\n type DocumentHandle,\n MODULE_APP_ID,\n type OfficeHandle,\n type OfficeModule,\n type OfficeOptions,\n type OfficeType,\n SDKError,\n SDK_ERROR_CODE,\n SDK_VERSION,\n} from './types.js';\n\n/**\n * 오피스 편집기에 연결된 `Office` 핸들을 만든다. 통신 컨텍스트·리스너를 wire-up.\n *\n * `module` 을 리터럴로 주면(`{ module: 'cell', ... }`) `getDocument()` 반환\n * 타입이 모듈별로 추론된다 (`DocumentHandleByModule` — cell→Workbook,\n * show→Document, word→WordDocument).\n *\n * @param options - 연결 옵션\n * @throws SDKError(INVALID_ARGUMENT) - 옵션 검증 실패 시\n */\nexport function createOffice<M extends OfficeModule>(options: OfficeOptions<M>): OfficeHandle<M> {\n // ─── 1. 입력 검증 ─────────────────────────────────────────\n if (!options || typeof options !== 'object') {\n throw new SDKError(\n '[TFO-SDK] createOffice() requires an options object.',\n SDK_ERROR_CODE.INVALID_ARGUMENT,\n );\n }\n\n const { module, frameworkOrigin, iframeEl, targetWindow, timeoutMs } = options;\n\n if (!module || !(module in MODULE_APP_ID)) {\n throw new SDKError(\n `[TFO-SDK] Invalid module: ${String(module)}. Expected 'word' | 'cell' | 'show'.`,\n SDK_ERROR_CODE.INVALID_ARGUMENT,\n );\n }\n\n if (!frameworkOrigin || frameworkOrigin === '*') {\n throw new SDKError(\n \"[TFO-SDK] frameworkOrigin is required and must not be '*'.\",\n SDK_ERROR_CODE.INVALID_ARGUMENT,\n );\n }\n\n const target: Window | null = targetWindow ?? iframeEl?.contentWindow ?? null;\n if (!target) {\n throw new SDKError(\n \"[TFO-SDK] No target window available. Provide either 'targetWindow' or an 'iframeEl' with a valid contentWindow.\",\n SDK_ERROR_CODE.INVALID_ARGUMENT,\n );\n }\n\n // ─── 2. 컨텍스트·리스너 생성 ───────────────────────────────\n const ctx = createPostMessageContext(module, frameworkOrigin, target);\n const removeListener = createMessageListener(ctx);\n\n let disconnected = false;\n const isDisconnected = (): boolean => disconnected;\n\n const execute = createExecute(ctx, isDisconnected, timeoutMs);\n // path-attrs(lazy 네비게이션)는 cell 만. 응답 래핑은 전 모듈 공통이라 proxyClient 가 항상 unwrap.\n // show 는 타입 가드 메서드(s.isImage() 등 동기 판별) opt-in.\n const { makeHandle } = createProxyClient(\n execute,\n module === 'cell' ? { navigationMap: CELL_NAVIGATION_MAP } :\n module === 'show' ? { guardMethods: SHOW_GUARD_METHODS } : undefined\n );\n\n const assertConnected = (): void => {\n if (disconnected) {\n throw new SDKError(\n '[TFO-SDK] Office handle has been disconnected.',\n SDK_ERROR_CODE.DESTROYED,\n );\n }\n };\n\n /**\n * 앱/문서 메타 정보 조회 — framework 공통 cmd `SDK.appInfo` (모듈 배선 불필요).\n * 캐시하지 않는다 — rename 같은 런타임 변화를 매 호출 반영한다.\n * cmd 를 모르는 구버전 framework 는 응답하지 않아 TIMEOUT 으로 reject 된다.\n */\n const fetchAppInfo = async (): Promise<AppInfo> => {\n const raw = await execute('SDK.appInfo', []);\n if (raw == null || typeof raw !== 'object') {\n throw new SDKError(\n '[TFO-SDK] SDK.appInfo returned an invalid response.',\n SDK_ERROR_CODE.INVALID_RESPONSE,\n raw,\n );\n }\n return raw as AppInfo;\n };\n\n // 문서 공통 메서드 — 모듈 proxy(allowlist)가 아니라 framework SDK.appInfo 로 답한다.\n const documentCommonApi: DocumentCommonApi = {\n async getFileName(): Promise<string | null> {\n return (await fetchAppInfo()).fileName ?? null;\n },\n };\n\n /**\n * 문서 최상위 핸들에 모듈 무관 공통 메서드를 입힌다.\n * ⚠ 가로채는 이름(getFileName)은 최상위 핸들에서 원격 메서드로 전달되지\n * 않는 예약어다 — 모듈 proxy 에 동명 메서드를 추가하면 여기 구현이 가린다.\n */\n const withDocumentCommonApi = (handle: unknown): DocumentHandle<M> => {\n return new Proxy(handle as object, {\n get(target, prop, receiver) {\n if (prop === 'getFileName') {\n return documentCommonApi[prop];\n }\n // 그 외(HANDLE 심볼·type/attrs·then 가드 포함)는 내부 핸들에 그대로 위임\n return Reflect.get(target, prop, receiver);\n },\n }) as DocumentHandle<M>;\n };\n\n const disconnect = (): void => {\n if (disconnected) {\n return;\n }\n disconnected = true;\n removeListener();\n clearPending(ctx);\n };\n\n // ─── 3. Office 반환 ──────────────────────────────────────\n return {\n module,\n execute,\n getToolSchemas() {\n assertConnected();\n return getToolSchemas(execute);\n },\n getSystemPrompt() {\n assertConnected();\n return getSystemPrompt(execute);\n },\n getTools(options) {\n assertConnected();\n return getTools(execute, { ...options, module });\n },\n registerTools(modelContext, registerOptions) {\n assertConnected();\n return registerTools(execute, modelContext, { ...registerOptions, module });\n },\n // 반환 캐스트는 구현부 한정 — 공개 시그니처는 DocumentHandle<M> 로 정확.\n getDocument(): DocumentHandle<M> {\n assertConnected();\n if (module === 'show') {\n return withDocumentCommonApi(makeHandle(PROXY_TYPE.DOCUMENT, {}));\n }\n if (module === 'cell') {\n // 빈 경로의 path 루트 핸들 — 통신 0회 (office 루트는 apiWorkbook 싱글턴).\n return withDocumentCommonApi(makeHandle(PROXY_TYPE.WORKBOOK, { steps: [] }));\n }\n if (module === 'word') {\n // identity 루트 핸들 — 통신 0회 (office 루트는 wordDocument facade). navigationMap 미지정 = identity.\n return withDocumentCommonApi(makeHandle(PROXY_TYPE.DOCUMENT, {}));\n }\n throw new SDKError(\n `[TFO-SDK] getDocument(): unsupported module '${module}'.`,\n SDK_ERROR_CODE.INVALID_ARGUMENT,\n );\n },\n // 앱 종류 — 연결한 module 그대로 (OfficeType 값과 동일 리터럴, 동기·왕복 없음).\n getApplicationType(): OfficeType {\n return module;\n },\n getApplicationName(): Promise<string | null> {\n assertConnected();\n return fetchAppInfo().then((info) => info.name ?? null);\n },\n getApplicationVersion(): Promise<string | null> {\n assertConnected();\n return fetchAppInfo().then((info) => info.version ?? null);\n },\n // 클라이언트 번들 버전 — 연결 상수라 assertConnected 하지 않는다(disconnect 후에도 유효).\n getVersion(): string {\n return SDK_VERSION;\n },\n disconnect,\n };\n}\n","/**\n * `Office` 앱 핸들 진입점 — iframe 요소에서 바로 시작하는 **권장 개발자 표면**.\n *\n * ```js\n * import { Office } from '@thinkfree.dev/tfo-sdk';\n *\n * const word1 = Office.word(document.getElementById('tfo_word_1'));\n * const word2 = Office.word(document.getElementById('tfo_word_2'));\n *\n * await word1.whenReady(); // 편집기 부팅 대기 (선택)\n * const doc1 = word1.getDocument(); // 문서 최상위 핸들 (WordDocument)\n * const body1 = await doc1.getBody();\n * console.log(await body1.getText());\n *\n * word1.disconnect(); // 연결 해제 (편집기·문서는 그대로)\n * ```\n *\n * `Office.word/cell/show(iframe)` 는 **오피스 애플리케이션(앱) 핸들**이다. 문서 자체가\n * 아니라 문서를 담은 편집기를 가리키며, 문서는 `.getDocument()` 로 받는다\n * (`Office.word(el).getDocument()` → WordDocument, `Office.cell(el).getDocument()` → Workbook,\n * `Office.show(el).getDocument()` → Document).\n *\n * `createOffice` 위의 얇은 facade 다:\n * - **get-or-create 레지스트리** — 같은 iframe 요소로 다시 부르면 같은 앱 핸들을\n * 반환한다 (disconnect 전까지). disconnect 후 다시 부르면 새로 만든다.\n * - **frameworkOrigin 자동 유도** — 생략 시 iframe 의 `src` 에서 origin 을 읽는다.\n * src 가 없거나 데이터/블랍 URL 이면 `options.frameworkOrigin` 을 명시해야 한다.\n * - **whenReady(limitMs?)** — 편집기(SDK 브리지)가 응답할 때까지 짧은 타임아웃\n * probe 로 폴링한다. 문서는 보이는데 SDK 핸들러 등록이 늦는 부팅 구간을 흡수.\n *\n * 같은 페이지에 여러 iframe(여러 문서)을 띄워도 안전하다 — 인스턴스마다 pending\n * 맵이 분리되고 메시지 ID 가 페이지 전역 유니크라 응답이 섞이지 않는다.\n *\n * ⚠ iframe 의 src 를 다른 문서/모듈로 바꿀 때는 기존 핸들을 `disconnect()` 하고\n * 다시 얻는다 (레지스트리가 요소 기준이라 옛 핸들이 재사용되는 것 방지).\n *\n * ⚠ 이름 충돌 — MS Office.js 를 같은 페이지에서 쓰면 전역 `Office` 와 겹친다.\n * 그 경우 `import { Office as TfoOffice } from '@thinkfree.dev/tfo-sdk'` 로 별칭 import 한다.\n */\n\nimport { createOffice } from './init.js';\nimport {\n type DocumentHandle,\n type OfficeHandle,\n type OfficeModule,\n type OfficeOptions,\n SDKError,\n SDK_ERROR_CODE,\n} from './types.js';\n\n// ============================================================\n// 상수\n// ============================================================\n\n/** whenReady probe 1회의 응답 타임아웃 (ms) */\nconst READY_PROBE_TIMEOUT_MS = 1000;\n/** whenReady probe 재시도 간격 (ms) */\nconst READY_PROBE_INTERVAL_MS = 300;\n/** whenReady 기본 대기 한도 (ms) */\nconst DEFAULT_READY_LIMIT_MS = 60000;\n\n// ============================================================\n// 타입\n// ============================================================\n\n/** `Office.word/cell/show(iframe, options?)` 옵션 — `OfficeOptions` 중 iframe 진입에서 선택인 것들 */\nexport interface OfficeAppOptions {\n /** 통신 대상 origin — 생략 시 iframe `src` 에서 유도. '*' 금지 */\n frameworkOrigin?: string;\n /** sendCommand 응답 타임아웃 (ms, 기본 5000) */\n timeoutMs?: number;\n}\n\n/**\n * 앱 핸들 — 오피스 애플리케이션(편집기)을 가리킨다. 연결 핸들(`OfficeHandle`)의 멤버\n * (`execute`/`getDocument`/`getTools`/`registerTools`/`getVersion`/`disconnect` …)에\n * 부팅 대기 `whenReady` 를 더한 것이다.\n *\n * 문서 자체가 아니라 **문서를 담은 앱**이다. 문서 최상위 핸들은 `getDocument()` 로 받는다\n * (`app.getDocument()` → 모듈별 WordDocument / Workbook / Document). 문서 메서드를 앱\n * 핸들에서 바로 부르던 위임은 제거됐다 — `app.getBody()` 가 아니라\n * `app.getDocument().getBody()` 로 호출한다.\n *\n * cell 앱 핸들에는 도메인 용어 편의 별칭 `getWorkbook()` 이 추가로 있다 —\n * `getDocument()` 와 완전히 동일한 Workbook 을 돌려주는 alias 다(Excel 관용어 대응).\n * word/show 는 최상위 핸들 용어가 이미 document 계열이라 별칭이 없다.\n */\nexport type OfficeApp<M extends OfficeModule = OfficeModule> = OfficeHandle<M> & {\n /**\n * 편집기(SDK 브리지)가 응답할 때까지 기다린다.\n * 이미 준비된 상태면 1왕복으로 즉시 resolve 된다.\n *\n * @param limitMs - 최대 대기 시간 (ms, 기본 60000)\n * @throws SDKError(TIMEOUT) - 한도 안에 편집기가 응답하지 않으면\n */\n whenReady: (limitMs?: number) => Promise<void>;\n // 비분배 조건부([M] extends ['cell']) — 무인자 OfficeApp(= OfficeApp<OfficeModule>)이\n // 별칭을 요구하지 않게 하고, OfficeApp<'cell'> 에만 노출한다.\n} & ([M] extends ['cell']\n ? {\n /**\n * `getDocument()` 의 cell 전용 별칭 — 같은 Workbook 을 돌려준다(Excel 관용어).\n * `app.getWorkbook() === app.getDocument()` 결과가 동일하다.\n */\n getWorkbook: () => DocumentHandle<'cell'>;\n }\n : Record<never, never>);\n\n/** Word Processor 앱 핸들 (`Office.word()` 반환) */\nexport type WordApp = OfficeApp<'word'>;\n/** Spreadsheet 앱 핸들 (`Office.cell()` 반환) */\nexport type CellApp = OfficeApp<'cell'>;\n/** Presentation 앱 핸들 (`Office.show()` 반환) */\nexport type ShowApp = OfficeApp<'show'>;\n\ninterface AppRecord {\n module: OfficeModule;\n app: OfficeApp;\n}\n\n// ============================================================\n// 레지스트리\n// ============================================================\n\nconst registry = new WeakMap<HTMLIFrameElement, AppRecord>();\n\n/**\n * iframe `src` 에서 통신 대상 origin 을 유도한다.\n * @throws SDKError(INVALID_ARGUMENT) - src 가 없거나 origin 을 알 수 없는 URL 이면\n */\nfunction deriveFrameworkOrigin(iframeEl: HTMLIFrameElement): string {\n const src = iframeEl.getAttribute('src') ?? '';\n\n if (!src || src === 'about:blank') {\n throw new SDKError(\n \"[TFO-SDK] Cannot derive frameworkOrigin: the iframe has no 'src'. Pass options.frameworkOrigin explicitly.\",\n SDK_ERROR_CODE.INVALID_ARGUMENT,\n );\n }\n\n // blob: 은 new URL().origin 이 생성 주체의 origin 을 그대로 돌려줘(예: blob:https://host/uuid → https://host)\n // 아래 'null' 검사에 걸리지 않지만, 그 origin 은 blob 을 만든 문서의 것이지 편집기 프레임워크의\n // origin 이라는 보장이 없다. data: 와 동일하게 명시 지정을 요구한다.\n if (src.startsWith('blob:') || src.startsWith('data:')) {\n throw new SDKError(\n `[TFO-SDK] Cannot derive frameworkOrigin from a '${src.slice(0, src.indexOf(':') + 1)}' URL. Pass options.frameworkOrigin explicitly.`,\n SDK_ERROR_CODE.INVALID_ARGUMENT,\n );\n }\n\n let origin: string;\n try {\n origin = new URL(src, window.location.href).origin;\n } catch {\n throw new SDKError(\n `[TFO-SDK] Cannot derive frameworkOrigin from iframe src: ${src}. Pass options.frameworkOrigin explicitly.`,\n SDK_ERROR_CODE.INVALID_ARGUMENT,\n );\n }\n\n if (!origin || origin === 'null') {\n throw new SDKError(\n `[TFO-SDK] Iframe src has an opaque origin (${src}). Pass options.frameworkOrigin explicitly.`,\n SDK_ERROR_CODE.INVALID_ARGUMENT,\n );\n }\n\n return origin;\n}\n\n/**\n * 편집기(SDK 브리지)가 `SDK.ready` 에 응답할 때까지 짧은 타임아웃 probe 로 폴링한다.\n * probe 는 전용 인스턴스(1초 timeout)로 만들어 성공/실패와 무관하게 정리한다 — 브리지가\n * 뜨기 전에 보낸 요청은 응답 없이 유실되므로, 본 인스턴스(기본 5초)로 폴링하면 유실 1회당\n * 그만큼 블록되는 것을 피한다.\n *\n * `Office.word/cell/show(iframe).whenReady()` 가 내부에서 사용하는 것과 동일 루틴의\n * 공개 export — iframe 없이 `targetWindow` 로 붙는 소비자(office-agent headless 등)가\n * 같은 폴링을 중복 구현하지 않도록 제공한다.\n *\n * @param options - probe 인스턴스 생성 옵션 (module/frameworkOrigin + iframeEl 또는 targetWindow)\n * @param limitMs - 최대 대기 시간(ms, 기본 60000)\n * @throws SDKError(TIMEOUT) - 제한 시간 내 미응답\n */\nexport async function waitForOfficeReady(\n options: Omit<OfficeOptions, 'timeoutMs'>,\n limitMs: number = DEFAULT_READY_LIMIT_MS,\n): Promise<void> {\n const probe = createOffice({ ...options, timeoutMs: READY_PROBE_TIMEOUT_MS });\n const startedAt = Date.now();\n\n try {\n for (;;) {\n try {\n await probe.execute('SDK.ready', []);\n return;\n } catch {\n if (Date.now() - startedAt >= limitMs) {\n throw new SDKError(\n `[TFO-SDK] waitForOfficeReady(): editor did not become ready within ${limitMs}ms.`,\n SDK_ERROR_CODE.TIMEOUT,\n );\n }\n await new Promise((resolve) => setTimeout(resolve, READY_PROBE_INTERVAL_MS));\n }\n }\n } finally {\n probe.disconnect();\n }\n}\n\n/**\n * iframe 요소로 앱 핸들을 얻는다 (get-or-create).\n * @throws SDKError(INVALID_ARGUMENT) - iframe 이 아니거나, 같은 요소가 이미 다른\n * 모듈로 등록됐거나, origin 을 유도할 수 없으면\n */\nfunction getApp<M extends OfficeModule>(\n module: M,\n iframeEl: HTMLIFrameElement,\n options?: OfficeAppOptions,\n): OfficeApp<M> {\n if (!iframeEl || typeof iframeEl !== 'object' || iframeEl.tagName !== 'IFRAME') {\n throw new SDKError(\n '[TFO-SDK] Office.word/cell/show requires an <iframe> element.',\n SDK_ERROR_CODE.INVALID_ARGUMENT,\n );\n }\n\n const existing = registry.get(iframeEl);\n if (existing) {\n if (existing.module !== module) {\n throw new SDKError(\n `[TFO-SDK] This iframe is already bound to module '${existing.module}'. Call disconnect() on the existing app first.`,\n SDK_ERROR_CODE.INVALID_ARGUMENT,\n );\n }\n // 레지스트리는 모듈 무관 OfficeApp 으로 보관 — 위에서 module 일치를 검증했으므로 안전한 좁히기.\n return existing.app as unknown as OfficeApp<M>;\n }\n\n const frameworkOrigin = options?.frameworkOrigin ?? deriveFrameworkOrigin(iframeEl);\n const office = createOffice({\n module,\n frameworkOrigin,\n iframeEl,\n ...(options?.timeoutMs !== undefined ? { timeoutMs: options.timeoutMs } : {}),\n });\n\n // 앱 핸들 = 연결 핸들 + whenReady. 문서 메서드 위임은 없다 — 문서는 getDocument() 로 받는다.\n const app: OfficeHandle<M> & { whenReady: (limitMs?: number) => Promise<void> } = {\n ...office,\n whenReady(limitMs: number = DEFAULT_READY_LIMIT_MS): Promise<void> {\n return waitForOfficeReady({ module, frameworkOrigin, iframeEl }, limitMs);\n },\n disconnect(): void {\n registry.delete(iframeEl);\n office.disconnect();\n },\n };\n\n // cell 전용 별칭 getWorkbook — getDocument() 와 동일한 Workbook 을 돌려준다(Excel 관용어).\n if (module === 'cell') {\n (app as { getWorkbook?: () => DocumentHandle<'cell'> }).getWorkbook =\n office.getDocument as unknown as () => DocumentHandle<'cell'>;\n }\n\n // 좁히기 캐스트 — getDocument 반환(DocumentHandle<M>)이 generic M 에서 구체 모듈과\n // 겹침 판정이 안 되므로 unknown 경유 (dts 빌드 TS2352 회피 관례와 동일).\n const typedApp = app as unknown as OfficeApp<M>;\n registry.set(iframeEl, { module, app: typedApp as unknown as OfficeApp });\n return typedApp;\n}\n\n// ============================================================\n// 공개 표면\n// ============================================================\n\n/**\n * Word Processor 편집기 iframe 의 앱 핸들을 얻는다 (get-or-create).\n * @example\n * const word = Office.word(document.getElementById('tfo_word_1'));\n * await word.whenReady();\n * const body = await word.getDocument().getBody();\n */\nfunction word(iframeEl: HTMLIFrameElement, options?: OfficeAppOptions): WordApp {\n return getApp('word', iframeEl, options);\n}\n\n/**\n * Spreadsheet 편집기 iframe 의 앱 핸들을 얻는다 (get-or-create).\n * @example\n * const cell = Office.cell(document.getElementById('tfo_cell_1'));\n * const wb = cell.getWorkbook(); // = cell.getDocument() (Excel 관용어 별칭)\n * const ws = await wb.getWorksheet(0);\n * const rg = await ws.getRange('A1:B2');\n * await rg.getValues();\n */\nfunction cell(iframeEl: HTMLIFrameElement, options?: OfficeAppOptions): CellApp {\n return getApp('cell', iframeEl, options);\n}\n\n/**\n * Presentation 편집기 iframe 의 앱 핸들을 얻는다 (get-or-create).\n * @example\n * const show = Office.show(document.getElementById('tfo_show_1'));\n * const slides = await show.getDocument().getSlides();\n */\nfunction show(iframeEl: HTMLIFrameElement, options?: OfficeAppOptions): ShowApp {\n return getApp('show', iframeEl, options);\n}\n\n/**\n * 앱 핸들 진입점 네임스페이스 — `Office.word(iframeEl)` 형태로 사용 (모듈명과 동일: word/cell/show).\n *\n * 같은 이름의 타입 `Office<M>`(연결 핸들)과 값 `Office`(이 네임스페이스)는 이름 공간이 달라\n * 함께 export 된다 — `const office: Office<'word'> = Office.word(el)`.\n */\nexport const Office = {\n word,\n cell,\n show,\n} as const;\n\n/**\n * 연결 핸들 타입 — 값 `Office`(네임스페이스)와 같은 이름으로 짝을 이룬다.\n * `const office: Office<'word'> = Office.word(el)`. 본체는 types.ts 의 `OfficeHandle<M>`.\n */\nexport type Office<M extends OfficeModule = OfficeModule> = OfficeHandle<M>;\n","/* eslint-disable */\n/**\n * Thinkfree Office SDK Type Definitions\n *\n * ⚠️ AUTO-GENERATED — DO NOT EDIT.\n * 오피스 구현 저장소(비공개)의 API JSDoc 에서 생성된다 — 수정은 원본 JSDoc 에서.\n *\n * Generated: 2026-09-22\n */\n\n// Thinkfree Office SDK (Common)\n\n// =============================================================================\n// Constants / Enums\n// =============================================================================\n\n/** 선 대시(점선) 스타일 (OOXML a:prstDash). */\nexport const LineDash = {\n /** 실선 */\n SOLID: \"solid\",\n /** 점선 */\n DOT: \"dot\",\n /** 파선 */\n DASH: \"dash\",\n /** 긴 파선 */\n LG_DASH: \"lgDash\",\n /** 파선-점선 */\n DASH_DOT: \"dashDot\",\n /** 긴 파선-점선 */\n LG_DASH_DOT: \"lgDashDot\",\n /** 긴 파선-점선-점선 */\n LG_DASH_DOT_DOT: \"lgDashDotDot\",\n /** 사각 점선 */\n SYS_DASH: \"sysDash\",\n /** 둥근 점선 */\n SYS_DOT: \"sysDot\",\n /** 사각 점선-점선 */\n SYS_DASH_DOT: \"sysDashDot\",\n /** 사각 점선-점선-점선 */\n SYS_DASH_DOT_DOT: \"sysDashDotDot\",\n} as const;\nexport type LineDash = typeof LineDash[keyof typeof LineDash];\n\n/**\n * 클라이언트가 지원하는 OOXML preset geometry 전체 목록.\n * insertShape 의 preset 에 전달해 해당 모양의 도형을 만든다.\n */\nexport const ShapePreset = {\n /** 직선 */\n LINE: \"line\",\n /** 꺾인 연결선 */\n BENT_CONNECTOR: \"bentConnector3\",\n /** 곡선 연결선 */\n CURVED_CONNECTOR: \"curvedConnector3\",\n /** 직사각형 */\n RECT: \"rect\",\n /** 둥근 모서리 직사각형 */\n ROUND_RECT: \"roundRect\",\n /** 한쪽 모서리가 잘린 직사각형 */\n SNIP_1_RECT: \"snip1Rect\",\n /** 양쪽 모서리가 잘린 직사각형 */\n SNIP_2_SAME_RECT: \"snip2SameRect\",\n /** 대각선 모서리가 잘린 직사각형 */\n SNIP_2_DIAG_RECT: \"snip2DiagRect\",\n /** 한쪽 모서리는 잘리고 다른 쪽은 둥근 직사각형 */\n SNIP_ROUND_RECT: \"snipRoundRect\",\n /** 한쪽 모서리가 둥근 직사각형 */\n ROUND_1_RECT: \"round1Rect\",\n /** 양쪽 모서리가 둥근 직사각형 */\n ROUND_2_SAME_RECT: \"round2SameRect\",\n /** 대각선 모서리가 둥근 직사각형 */\n ROUND_2_DIAG_RECT: \"round2DiagRect\",\n /** 타원 */\n ELLIPSE: \"ellipse\",\n /** 이등변 삼각형 */\n TRIANGLE: \"triangle\",\n /** 직각 삼각형 */\n RT_TRIANGLE: \"rtTriangle\",\n /** 평행 사변형 */\n PARALLELOGRAM: \"parallelogram\",\n /** 사다리꼴 */\n TRAPEZOID: \"trapezoid\",\n /** 다이아몬드(마름모) */\n DIAMOND: \"diamond\",\n /** 정오각형 */\n PENTAGON: \"pentagon\",\n /** 육각형 */\n HEXAGON: \"hexagon\",\n /** 칠각형 */\n HEPTAGON: \"heptagon\",\n /** 팔각형 */\n OCTAGON: \"octagon\",\n /** 십각형 */\n DECAGON: \"decagon\",\n /** 십이각형 */\n DODECAGON: \"dodecagon\",\n /** 1/4 원(파이 조각) */\n PIE_WEDGE: \"pieWedge\",\n /** 부분 원형 */\n PIE: \"pie\",\n /** 현 */\n CHORD: \"chord\",\n /** 눈물 방울 */\n TEARDROP: \"teardrop\",\n /** 액자 */\n FRAME: \"frame\",\n /** 반액자 */\n HALF_FRAME: \"halfFrame\",\n /** 모서리 */\n CORNER: \"corner\",\n /** 대각선 줄무늬 */\n DIAG_STRIPE: \"diagStripe\",\n /** 십자형 */\n PLUS: \"plus\",\n /** 명판 */\n PLAQUE: \"plaque\",\n /** 원통형 */\n CAN: \"can\",\n /** 정육면체 */\n CUBE: \"cube\",\n /** 빗면 */\n BEVEL: \"bevel\",\n /** 도넛 */\n DONUT: \"donut\",\n /** 금지 기호 */\n NO_SMOKING: \"noSmoking\",\n /** 아치형 */\n BLOCK_ARC: \"blockArc\",\n /** 접힌 모서리 */\n FOLDED_CORNER: \"foldedCorner\",\n /** 웃는 얼굴 */\n SMILEY_FACE: \"smileyFace\",\n /** 하트 */\n HEART: \"heart\",\n /** 깔때기 */\n FUNNEL: \"funnel\",\n /** 톱니바퀴(6개) */\n GEAR_6: \"gear6\",\n /** 톱니바퀴(9개) */\n GEAR_9: \"gear9\",\n /** 번개 */\n LIGHTNING_BOLT: \"lightningBolt\",\n /** 해 */\n SUN: \"sun\",\n /** 달 */\n MOON: \"moon\",\n /** 구름 */\n CLOUD: \"cloud\",\n /** 호 */\n ARC: \"arc\",\n /** 대괄호 쌍 */\n BRACKET_PAIR: \"bracketPair\",\n /** 중괄호 쌍 */\n BRACE_PAIR: \"bracePair\",\n /** 왼쪽 대괄호 */\n LEFT_BRACKET: \"leftBracket\",\n /** 오른쪽 대괄호 */\n RIGHT_BRACKET: \"rightBracket\",\n /** 왼쪽 중괄호 */\n LEFT_BRACE: \"leftBrace\",\n /** 오른쪽 중괄호 */\n RIGHT_BRACE: \"rightBrace\",\n /** 오른쪽 화살표 */\n RIGHT_ARROW: \"rightArrow\",\n /** 왼쪽 화살표 */\n LEFT_ARROW: \"leftArrow\",\n /** 위쪽 화살표 */\n UP_ARROW: \"upArrow\",\n /** 아래쪽 화살표 */\n DOWN_ARROW: \"downArrow\",\n /** 왼쪽/오른쪽 화살표 */\n LEFT_RIGHT_ARROW: \"leftRightArrow\",\n /** 위쪽/아래쪽 화살표 */\n UP_DOWN_ARROW: \"upDownArrow\",\n /** 십자형 화살표 */\n QUAD_ARROW: \"quadArrow\",\n /** 왼쪽/오른쪽/위쪽 화살표 */\n LEFT_RIGHT_UP_ARROW: \"leftRightUpArrow\",\n /** 굽은 화살표 */\n BENT_ARROW: \"bentArrow\",\n /** U턴 화살표 */\n UTURN_ARROW: \"uturnArrow\",\n /** 왼쪽/위쪽 화살표 */\n LEFT_UP_ARROW: \"leftUpArrow\",\n /** 위로 굽은 화살표 */\n BENT_UP_ARROW: \"bentUpArrow\",\n /** 오른쪽으로 구부러진 화살표 */\n CURVED_RIGHT_ARROW: \"curvedRightArrow\",\n /** 왼쪽으로 구부러진 화살표 */\n CURVED_LEFT_ARROW: \"curvedLeftArrow\",\n /** 위로 구부러진 화살표 */\n CURVED_UP_ARROW: \"curvedUpArrow\",\n /** 아래로 구부러진 화살표 */\n CURVED_DOWN_ARROW: \"curvedDownArrow\",\n /** 줄무늬 오른쪽 화살표 */\n STRIPED_RIGHT_ARROW: \"stripedRightArrow\",\n /** 톱니 모양 오른쪽 화살표 */\n NOTCHED_RIGHT_ARROW: \"notchedRightArrow\",\n /** 오각형(홈플레이트) */\n HOME_PLATE: \"homePlate\",\n /** 갈매기형 수장 */\n CHEVRON: \"chevron\",\n /** 오른쪽 화살표 설명선 */\n RIGHT_ARROW_CALLOUT: \"rightArrowCallout\",\n /** 왼쪽 화살표 설명선 */\n LEFT_ARROW_CALLOUT: \"leftArrowCallout\",\n /** 위쪽 화살표 설명선 */\n UP_ARROW_CALLOUT: \"upArrowCallout\",\n /** 아래쪽 화살표 설명선 */\n DOWN_ARROW_CALLOUT: \"downArrowCallout\",\n /** 왼쪽/오른쪽 화살표 설명선 */\n LEFT_RIGHT_ARROW_CALLOUT: \"leftRightArrowCallout\",\n /** 위쪽/아래쪽 화살표 설명선 */\n UP_DOWN_ARROW_CALLOUT: \"upDownArrowCallout\",\n /** 십자형 화살표 설명선 */\n QUAD_ARROW_CALLOUT: \"quadArrowCallout\",\n /** 원형 화살표 */\n CIRCULAR_ARROW: \"circularArrow\",\n /** 왼쪽 원형 화살표 */\n LEFT_CIRCULAR_ARROW: \"leftCircularArrow\",\n /** 곡선 화살표(스우시) */\n SWOOSH_ARROW: \"swooshArrow\",\n /** 왼쪽/오른쪽 리본 */\n LEFT_RIGHT_RIBBON: \"leftRightRibbon\",\n /** 폭발: 8pt */\n IRREGULAR_SEAL_1: \"irregularSeal1\",\n /** 폭발: 14pt */\n IRREGULAR_SEAL_2: \"irregularSeal2\",\n /** 포인트가 4개인 별 */\n STAR_4: \"star4\",\n /** 포인트가 5개인 별 */\n STAR_5: \"star5\",\n /** 포인트가 6개인 별 */\n STAR_6: \"star6\",\n /** 포인트가 7개인 별 */\n STAR_7: \"star7\",\n /** 포인트가 8개인 별 */\n STAR_8: \"star8\",\n /** 포인트가 10개인 별 */\n STAR_10: \"star10\",\n /** 포인트가 12개인 별 */\n STAR_12: \"star12\",\n /** 포인트가 16개인 별 */\n STAR_16: \"star16\",\n /** 포인트가 24개인 별 */\n STAR_24: \"star24\",\n /** 포인트가 32개인 별 */\n STAR_32: \"star32\",\n /** 리본: 위로 기울어짐 */\n RIBBON_2: \"ribbon2\",\n /** 리본: 아래로 기울어짐 */\n RIBBON: \"ribbon\",\n /** 구부러진 리본: 위로 */\n ELLIPSE_RIBBON_2: \"ellipseRibbon2\",\n /** 구부러진 리본: 아래로 */\n ELLIPSE_RIBBON: \"ellipseRibbon\",\n /** 세로 두루마리 */\n VERTICAL_SCROLL: \"verticalScroll\",\n /** 가로 두루마리 */\n HORIZONTAL_SCROLL: \"horizontalScroll\",\n /** 물결 */\n WAVE: \"wave\",\n /** 이중 물결 */\n DOUBLE_WAVE: \"doubleWave\",\n /** 사각형 설명선 */\n WEDGE_RECT_CALLOUT: \"wedgeRectCallout\",\n /** 둥근 사각형 설명선 */\n WEDGE_ROUND_RECT_CALLOUT: \"wedgeRoundRectCallout\",\n /** 타원형 설명선 */\n WEDGE_ELLIPSE_CALLOUT: \"wedgeEllipseCallout\",\n /** 구름 설명선 */\n CLOUD_CALLOUT: \"cloudCallout\",\n /** 선 설명선 1 */\n CALLOUT_1: \"callout1\",\n /** 선 설명선 2 */\n CALLOUT_2: \"callout2\",\n /** 선 설명선 3 */\n CALLOUT_3: \"callout3\",\n /** 선 설명선 1 (강조선) */\n ACCENT_CALLOUT_1: \"accentCallout1\",\n /** 선 설명선 2 (강조선) */\n ACCENT_CALLOUT_2: \"accentCallout2\",\n /** 선 설명선 3 (강조선) */\n ACCENT_CALLOUT_3: \"accentCallout3\",\n /** 선 설명선 1 (테두리) */\n BORDER_CALLOUT_1: \"borderCallout1\",\n /** 선 설명선 2 (테두리) */\n BORDER_CALLOUT_2: \"borderCallout2\",\n /** 선 설명선 3 (테두리) */\n BORDER_CALLOUT_3: \"borderCallout3\",\n /** 선 설명선 1 (강조선+테두리) */\n ACCENT_BORDER_CALLOUT_1: \"accentBorderCallout1\",\n /** 선 설명선 2 (강조선+테두리) */\n ACCENT_BORDER_CALLOUT_2: \"accentBorderCallout2\",\n /** 선 설명선 3 (강조선+테두리) */\n ACCENT_BORDER_CALLOUT_3: \"accentBorderCallout3\",\n /** 순서도: 처리 */\n FLOW_CHART_PROCESS: \"flowChartProcess\",\n /** 순서도: 대체 처리 */\n FLOW_CHART_ALTERNATE_PROCESS: \"flowChartAlternateProcess\",\n /** 순서도: 판단 */\n FLOW_CHART_DECISION: \"flowChartDecision\",\n /** 순서도: 데이터 */\n FLOW_CHART_INPUT_OUTPUT: \"flowChartInputOutput\",\n /** 순서도: 미리 정의된 처리 */\n FLOW_CHART_PREDEFINED_PROCESS: \"flowChartPredefinedProcess\",\n /** 순서도: 내부 저장소 */\n FLOW_CHART_INTERNAL_STORAGE: \"flowChartInternalStorage\",\n /** 순서도: 문서 */\n FLOW_CHART_DOCUMENT: \"flowChartDocument\",\n /** 순서도: 다중 문서 */\n FLOW_CHART_MULTIDOCUMENT: \"flowChartMultidocument\",\n /** 순서도: 종결 */\n FLOW_CHART_TERMINATOR: \"flowChartTerminator\",\n /** 순서도: 준비 */\n FLOW_CHART_PREPARATION: \"flowChartPreparation\",\n /** 순서도: 수동 입력 */\n FLOW_CHART_MANUAL_INPUT: \"flowChartManualInput\",\n /** 순서도: 수동 연산 */\n FLOW_CHART_MANUAL_OPERATION: \"flowChartManualOperation\",\n /** 순서도: 연결자 */\n FLOW_CHART_CONNECTOR: \"flowChartConnector\",\n /** 순서도: 페이지 연결자 */\n FLOW_CHART_OFFPAGE_CONNECTOR: \"flowChartOffpageConnector\",\n /** 순서도: 카드 */\n FLOW_CHART_PUNCHED_CARD: \"flowChartPunchedCard\",\n /** 순서도: 천공 테이프 */\n FLOW_CHART_PUNCHED_TAPE: \"flowChartPunchedTape\",\n /** 순서도: 합 접합 */\n FLOW_CHART_SUMMING_JUNCTION: \"flowChartSummingJunction\",\n /** 순서도: 논리합 */\n FLOW_CHART_OR: \"flowChartOr\",\n /** 순서도: 대조 */\n FLOW_CHART_COLLATE: \"flowChartCollate\",\n /** 순서도: 정렬 */\n FLOW_CHART_SORT: \"flowChartSort\",\n /** 순서도: 추출 */\n FLOW_CHART_EXTRACT: \"flowChartExtract\",\n /** 순서도: 병합 */\n FLOW_CHART_MERGE: \"flowChartMerge\",\n /** 순서도: 저장 데이터 */\n FLOW_CHART_ONLINE_STORAGE: \"flowChartOnlineStorage\",\n /** 순서도: 지연 */\n FLOW_CHART_DELAY: \"flowChartDelay\",\n /** 순서도: 순차 액세스 저장소 */\n FLOW_CHART_MAGNETIC_TAPE: \"flowChartMagneticTape\",\n /** 순서도: 자기 디스크 */\n FLOW_CHART_MAGNETIC_DISK: \"flowChartMagneticDisk\",\n /** 순서도: 직접 액세스 저장소 */\n FLOW_CHART_MAGNETIC_DRUM: \"flowChartMagneticDrum\",\n /** 순서도: 화면 표시 */\n FLOW_CHART_DISPLAY: \"flowChartDisplay\",\n /** 실행 단추: 뒤로 또는 이전 */\n ACTION_BUTTON_BACK_PREVIOUS: \"actionButtonBackPrevious\",\n /** 실행 단추: 앞으로 또는 다음 */\n ACTION_BUTTON_FORWARD_NEXT: \"actionButtonForwardNext\",\n /** 실행 단추: 처음으로 이동 */\n ACTION_BUTTON_BEGINNING: \"actionButtonBeginning\",\n /** 실행 단추: 끝으로 이동 */\n ACTION_BUTTON_END: \"actionButtonEnd\",\n /** 실행 단추: 홈으로 이동 */\n ACTION_BUTTON_HOME: \"actionButtonHome\",\n /** 실행 단추: 정보 */\n ACTION_BUTTON_INFORMATION: \"actionButtonInformation\",\n /** 실행 단추: 돌아가기 */\n ACTION_BUTTON_RETURN: \"actionButtonReturn\",\n /** 실행 단추: 비디오 */\n ACTION_BUTTON_MOVIE: \"actionButtonMovie\",\n /** 실행 단추: 문서 */\n ACTION_BUTTON_DOCUMENT: \"actionButtonDocument\",\n /** 실행 단추: 소리 */\n ACTION_BUTTON_SOUND: \"actionButtonSound\",\n /** 실행 단추: 도움말 */\n ACTION_BUTTON_HELP: \"actionButtonHelp\",\n /** 실행 단추: 빈 단추(사용자 지정) */\n ACTION_BUTTON_BLANK: \"actionButtonBlank\",\n /** 더하기 기호 */\n MATH_PLUS: \"mathPlus\",\n /** 빼기 기호 */\n MATH_MINUS: \"mathMinus\",\n /** 곱하기 기호 */\n MATH_MULTIPLY: \"mathMultiply\",\n /** 나누기 기호 */\n MATH_DIVIDE: \"mathDivide\",\n /** 등호 */\n MATH_EQUAL: \"mathEqual\",\n /** 부등호 */\n MATH_NOT_EQUAL: \"mathNotEqual\",\n} as const;\nexport type ShapePreset = typeof ShapePreset[keyof typeof ShapePreset];\n\n/** 도형 z-order(앞뒤 순서) 변경 종류. */\nexport const ShapeZOrder = {\n /** 맨 앞으로 */\n FRONT: \"front\",\n /** 맨 뒤로 */\n BACK: \"back\",\n /** 앞으로 (한 단계) */\n FORWARD: \"forward\",\n /** 뒤로 (한 단계) */\n BACKWARD: \"backward\",\n} as const;\nexport type ShapeZOrder = typeof ShapeZOrder[keyof typeof ShapeZOrder];\n\n/**\n * addChart/setType 의 chartType. 단순 (type, range) 생성이 가능한 20종만 있으며,\n * 그 밖의 종류는 CHART_TYPE_UNSUPPORTED 로 거부된다.\n */\nexport const ChartType = {\n clusteredColumn: \"clustered_column\",\n stackedColumn: \"stacked_column\",\n _3dClusteredColumn: \"3d_clustered_column\",\n _3dStackedColumn: \"3d_stacked_column\",\n clusteredBar: \"clustered_bar\",\n stackedBar: \"stacked_bar\",\n _3dClusteredBar: \"3d_clustered_bar\",\n _3dStackedBar: \"3d_stacked_bar\",\n line: \"line\",\n pie: \"pie\",\n _3dPie: \"3d_pie\",\n explodedPie: \"exploded_pie\",\n _3dExplodedPie: \"3d_exploded_pie\",\n scatter: \"scatter\",\n area: \"area\",\n stackedArea: \"stacked_area\",\n _3dArea: \"3d_area\",\n _3dStackedArea: \"3d_stacked_area\",\n doughnut: \"doughnut\",\n radar: \"radar\",\n} as const;\nexport type ChartType = typeof ChartType[keyof typeof ChartType];\n\n/** setGridLine 의 gridType. \"none\" 은 해당 축 눈금선 숨김. */\nexport const ChartGridLineType = {\n none: \"none\",\n major: \"major\",\n minor: \"minor\",\n majorMinor: \"major_minor\",\n} as const;\nexport type ChartGridLineType = typeof ChartGridLineType[keyof typeof ChartGridLineType];\n\n/** setAxisTitle/setGridLine 의 axis — 대상 축을 가리킨다. */\nexport const ChartAxis = {\n horizontal: \"horizontal\",\n vertical: \"vertical\",\n} as const;\nexport type ChartAxis = typeof ChartAxis[keyof typeof ChartAxis];\n\n/** setLegendPosition 의 position. \"none\" 은 범례 숨김. */\nexport const ChartLegendPosition = {\n none: \"none\",\n bottom: \"bottom\",\n topRight: \"top_right\",\n top: \"top\",\n right: \"right\",\n left: \"left\",\n} as const;\nexport type ChartLegendPosition = typeof ChartLegendPosition[keyof typeof ChartLegendPosition];\n\n/**\n * setDataLabelPosition 의 position. \"none\" 은 숨김.\n * 차트 타입별 유효 위치는 부분집합이며 위반 시 CHART_DATALABEL_POSITION_INVALID.\n */\nexport const ChartDataLabelPosition = {\n none: \"none\",\n center: \"center\",\n insideEnd: \"inside_end\",\n insideBase: \"inside_base\",\n outsideEnd: \"outside_end\",\n bestFit: \"best_fit\",\n left: \"left\",\n right: \"right\",\n top: \"top\",\n bottom: \"bottom\",\n} as const;\nexport type ChartDataLabelPosition = typeof ChartDataLabelPosition[keyof typeof ChartDataLabelPosition];\n\n// =============================================================================\n// Classes\n// =============================================================================\n","/* eslint-disable */\n/**\n * Thinkfree Office SDK Type Definitions\n *\n * ⚠️ AUTO-GENERATED — DO NOT EDIT.\n * 오피스 구현 저장소(비공개)의 API JSDoc 에서 생성된다 — 수정은 원본 JSDoc 에서.\n *\n * proxy 메서드는 postMessage bridge 를 거치므로 Promise 를 반환한다.\n * Generated: 2026-09-22\n */\n\n// Thinkfree Office SDK (Word)\n\n// 공통 enum — 정의·값은 common 모듈(SDK flat export)에만 있다. 여기서는 시그니처 참조용 type import 만 한다.\nimport type { LineDash, ShapePreset, ShapeZOrder, ChartType, ChartGridLineType, ChartAxis, ChartLegendPosition, ChartDataLabelPosition } from \"./common-api.generated.js\";\n\n// 실제(비-ambient) 모듈 네임스페이스 — 단일 번들 d.ts 에서 `Word.X` 로 타입·런타임\n// enum 값을 모두 노출한다. index 의 `export * as` 재수출은 tsup dts 롤업에서 const+type\n// 선언 병합의 값 의미가 타입 전용으로 강등되므로 쓰지 않는다 (dts.config 의 namespace 키).\nexport namespace Word {\n // =============================================================================\n // Constants / Enums\n // =============================================================================\n\n /**\n * 삽입 위치 — 기준 객체(receiver)를 기준으로 어디에 넣을지. insert 계열의 옵션 `position` 값.\n * 밖(형제): before/after, 안(콘텐츠 끝단): start/end.\n * start/end 의 기준은 기준 객체 종류로 갈린다 — 단락이면 그 단락 콘텐츠의 맨앞/맨끝,\n * 본문(body)이면 본문 콘텐츠의 맨앞/맨끝(= 첫 단락 앞 / 마지막 단락 뒤).\n */\n export const InsertAt = {\n /** 기준 요소 앞(형제) */\n BEFORE: \"before\",\n /** 기준 요소 뒤(형제) */\n AFTER: \"after\",\n /** 기준 요소 콘텐츠 맨 앞 */\n START: \"start\",\n /** 기준 요소 콘텐츠 맨 끝 */\n END: \"end\",\n } as const;\n export type InsertAt = typeof InsertAt[keyof typeof InsertAt];\n\n /** 범위 조회 위치 — 기준 객체(receiver)의 어느 부분 범위를 반환할지. getRange(RangePosition) 값. */\n export const RangePosition = {\n /** 전체(단락 기호 포함) */\n WHOLE: \"whole\",\n /** 시작 지점(collapsed) */\n START: \"start\",\n /** 끝 지점(단락 기호 앞, collapsed) */\n END: \"end\",\n /** 단락 기호 다음 지점(collapsed) */\n AFTER: \"after\",\n /** 단락 기호 제외한 내용 범위 */\n CONTENT: \"content\",\n /** 시작 앞 지점(collapsed) */\n BEFORE: \"before\",\n } as const;\n export type RangePosition = typeof RangePosition[keyof typeof RangePosition];\n\n /**\n * 선택 영역 기준 위치 — 현재 선택/커서를 어느 지점으로 잡을지.\n * - select: 선택 영역 전체, start/end: 선택(커서)의 시작/끝 지점(collapsed).\n */\n export const SelectionMode = {\n /** 현재 선택 영역 전체 */\n SELECT: \"select\",\n /** 선택/커서 시작 지점(collapsed) */\n START: \"start\",\n /** 선택/커서 끝 지점(collapsed) */\n END: \"end\",\n } as const;\n export type SelectionMode = typeof SelectionMode[keyof typeof SelectionMode];\n\n /**\n * RangeBuilder.fromView() 인자 타입.\n * View 환경에서 어떤 정보를 ModelRange로 변환할지 결정한다.\n */\n export const ViewContextType = {\n /** 현재 커서 (selection.getModelRange(false)) */\n CURSOR: \"cursor\",\n /** 현재 선택 영역 (selection.getModelRange(true)) */\n SELECTION: \"selection\",\n } as const;\n export type ViewContextType = typeof ViewContextType[keyof typeof ViewContextType];\n\n /** 문서 구조 조회 타입 필터 — getStructure({ type }) / get_document_structure 의 type 값. */\n export const StructureFilter = {\n /** 표 */\n TABLE: \"table\",\n /** 목록 단락 */\n LIST: \"list\",\n } as const;\n export type StructureFilter = typeof StructureFilter[keyof typeof StructureFilter];\n\n /**\n * WordRange 가 \"무엇을 가리키는지\" 적어 두는 방식(종류).\n *\n * OFFSET 만 좌표를 직접 들고 있고, 나머지는 대상의 id·이름만 들고 있다가 **쓸 때 위치를 찾는다**\n * — 그래서 선택 영역이 바뀌거나 편집으로 표시가 밀려도 항상 지금 위치를 가리킨다.\n */\n export const RangeKind = {\n /** 단락 ID + 글자 위치를 직접 지정(좌표를 들고 있음 — 이후 편집으로 어긋날 수 있다) */\n OFFSET: \"offset\",\n /** 영역의 어느 부분인지로 지정(맨앞/맨끝/전체 등 — RangePosition) */\n RANGE_POSITION: \"rangePosition\",\n /** 화면의 선택 영역/커서(쓸 때마다 현재 선택을 다시 읽는다) */\n VIEW: \"view\",\n /** 그 댓글이 달린 본문 구간 */\n COMMENT: \"comment\",\n /** 각주/미주 표시가 놓인 자리 */\n NOTE: \"note\",\n /** 책갈피 표시가 놓인 자리(글자 한 칸) */\n BOOKMARK: \"bookmark\",\n /** 도형·이미지가 놓인 자리(글자 한 칸 — floating 이면 앵커 자리) */\n SHAPE: \"shape\",\n /** 하이퍼링크의 표시 텍스트 구간(앞뒤 마커는 제외 — 링크를 유지한 채 글자만 다룬다) */\n HYPERLINK: \"hyperlink\",\n /** 변경 추적 항목이 차지하는 구간 */\n CHANGE_TRACKING: \"changeTracking\",\n } as const;\n export type RangeKind = typeof RangeKind[keyof typeof RangeKind];\n\n /**\n * WordBody.search()/WordRange.search() 로 찾을 수 있는 특수 문자(눈에 보이지 않는 비-텍스트 런) 종류.\n * Word 찾기/바꾸기의 \"특수 문자\"에 대응 — 텍스트 검색(search)이 문자로 매칭하지 못하는 요소를 종류로 지목해 위치(Range)를 얻는다.\n * 값은 코어 모델 런 타입(DefineTypes.element)의 키와 동일하다.\n */\n export const SpecialCharacter = {\n /** 페이지 나누기 */\n PAGE_BREAK: \"pageBreak\",\n /** 단 나누기 */\n COLUMN_BREAK: \"columnBreak\",\n /** 줄바꿈(Shift+Enter) */\n SOFT_BREAK: \"softBreak\",\n /** 탭 */\n TAB: \"tab\",\n /** 기호 */\n SYMBOL: \"symbol\",\n } as const;\n export type SpecialCharacter = typeof SpecialCharacter[keyof typeof SpecialCharacter];\n\n /**\n * 보기 배율/맞춤 모드.\n * WordDocument.setZoom() 에서 사용한다. 코어에 정의된 배율 프리셋(50~200%)과 맞춤·단계 모드.\n */\n export const ZoomMode = {\n /** 50% */\n SCALE_50: \"50\",\n /** 66% */\n SCALE_66: \"66\",\n /** 75% */\n SCALE_75: \"75\",\n /** 100% (원래 배율) */\n SCALE_100: \"100\",\n /** 125% */\n SCALE_125: \"125\",\n /** 150% */\n SCALE_150: \"150\",\n /** 200% */\n SCALE_200: \"200\",\n /** 폭 맞춤 */\n FIT_WIDTH: \"fitWidth\",\n /** 쪽 맞춤 */\n FIT_WINDOW: \"fitInWindow\",\n /** 한 단계 확대 */\n ZOOM_IN: \"zoomIn\",\n /** 한 단계 축소 */\n ZOOM_OUT: \"zoomOut\",\n } as const;\n export type ZoomMode = typeof ZoomMode[keyof typeof ZoomMode];\n\n /**\n * 머리글/바닥글 종류.\n * - PRIMARY: 기본(홀수/모든 페이지) — 별도 \"odd\" 는 없고 PRIMARY 가 그 역할\n */\n export const HeaderFooterType = {\n /** 기본 머리글/바닥글 (OOXML default) */\n PRIMARY: \"primary\",\n /** 첫 페이지 (OOXML first) */\n FIRST_PAGE: \"firstPage\",\n /** 짝수 페이지 (OOXML even) */\n EVEN_PAGES: \"evenPages\",\n } as const;\n export type HeaderFooterType = typeof HeaderFooterType[keyof typeof HeaderFooterType];\n\n /**\n * 머리글/바닥글 종류의 OOXML/모델 어휘 (WordSection.getHeader/getFooter type 으로도 허용).\n * - HeaderFooterType(primary/firstPage/evenPages)과 1:1 동의어 — 둘 중 어느 어휘로도 호출 가능.\n */\n export const HeaderFooterVariant = {\n /** 기본(= HeaderFooterType.PRIMARY) */\n DEFAULT: \"default\",\n /** 첫 페이지(= HeaderFooterType.FIRST_PAGE) */\n FIRST: \"first\",\n /** 짝수 페이지(= HeaderFooterType.EVEN_PAGES) */\n EVEN: \"even\",\n } as const;\n export type HeaderFooterVariant = typeof HeaderFooterVariant[keyof typeof HeaderFooterVariant];\n\n /**\n * 구역(section) 나누기 유형 (WordSection.setBreakType type — getPageSetup().breakType 과 대칭).\n * setBreakType 으로 지정한 값은 getPageSetup().breakType 으로 그대로 다시 읽힌다.\n * - \"단 나누기\"(nextColumn)는 구역 나누기 유형이 아니라 본문 inline 나누기다 — WordRange.insertColumnBreak / SpecialCharacter.COLUMN_BREAK 로 다룬다.\n */\n export const SectionBreakType = {\n /** 이어서 (이어나누기) */\n CONTINUOUS: \"continuous\",\n /** 다음 페이지부터 */\n NEXT_PAGE: \"nextPage\",\n /** 짝수 페이지부터 */\n EVEN_PAGE: \"evenPage\",\n /** 홀수 페이지부터 */\n ODD_PAGE: \"oddPage\",\n } as const;\n export type SectionBreakType = typeof SectionBreakType[keyof typeof SectionBreakType];\n\n /**\n * 각주/미주 종류.\n * 값은 코어 DefineTypes.noteTypes / DefineActions.type.footnote·endnote 와 동일해 매핑 없이 그대로 쓰인다.\n */\n export const NoteType = {\n /** 각주 (페이지 하단) */\n FOOTNOTE: \"footnote\",\n /** 미주 (문서 끝) */\n ENDNOTE: \"endnote\",\n } as const;\n export type NoteType = typeof NoteType[keyof typeof NoteType];\n\n /**\n * 하이퍼링크 종류 (WordHyperlink.getLinkType()).\n * 종류는 별도 입력축이 아니라 url 에서 정해진다: \"#이름\"→BOOKMARK, \"mailto:\"→MAILTO, 그 외→LINK.\n */\n export const HyperlinkType = {\n /** 웹 주소 (http/https) */\n LINK: \"link\",\n /** 이메일 */\n MAILTO: \"mailto\",\n /** 문서 내부 북마크 */\n BOOKMARK: \"bookmark\",\n } as const;\n export type HyperlinkType = typeof HyperlinkType[keyof typeof HyperlinkType];\n\n /**\n * 변경 추적 항목(change tracking) 공개 유형 (WordChangeTracking.getInfo().type).\n * 코어 revisionType(ins/del/change)을 정규화한 공개 값 — 변환 맵은 소비자(extractors)가 보유한다.\n */\n export const ChangeTrackingType = {\n /** 삽입 (코어 ins) */\n ADDED: \"added\",\n /** 삭제 (코어 del) */\n DELETED: \"deleted\",\n /** 서식 변경 (코어 change) */\n FORMATTED: \"formatted\",\n } as const;\n export type ChangeTrackingType = typeof ChangeTrackingType[keyof typeof ChangeTrackingType];\n\n /**\n * 도형 wrap(텍스트 배치) 종류.\n * 워드 모델이 지원하는 3가지 ([defineTypes.js] shapeWrapType) 만 노출.\n */\n export const ShapeWrap = {\n /** 텍스트 흐름 안에 글자처럼 박힘 (paragraphId + offset 으로 위치) */\n INLINE: \"inline\",\n /** 텍스트 위에 떠있음 */\n INFRONT: \"infront\",\n /** 텍스트 뒤에 깔림 */\n BEHIND: \"behind\",\n } as const;\n export type ShapeWrap = typeof ShapeWrap[keyof typeof ShapeWrap];\n\n /** floating 도형 가로 위치 기준 (OOXML wp:positionH @relativeFrom). */\n export const PositionRelativeFromH = {\n PAGE: \"page\",\n MARGIN: \"margin\",\n COLUMN: \"column\",\n } as const;\n export type PositionRelativeFromH = typeof PositionRelativeFromH[keyof typeof PositionRelativeFromH];\n\n /** floating 도형 세로 위치 기준 (OOXML wp:positionV @relativeFrom). */\n export const PositionRelativeFromV = {\n PAGE: \"page\",\n MARGIN: \"margin\",\n PARAGRAPH: \"paragraph\",\n } as const;\n export type PositionRelativeFromV = typeof PositionRelativeFromV[keyof typeof PositionRelativeFromV];\n\n /** 도형 종류. */\n export const ShapeType = {\n /** preset geometry 도형 */\n SHAPE: \"sp\",\n /** 이미지 */\n PICTURE: \"pic\",\n } as const;\n export type ShapeType = typeof ShapeType[keyof typeof ShapeType];\n\n /** 도형 채우기 종류 (setFill type). */\n export const FillType = {\n NONE: \"noFill\",\n SOLID: \"solidFill\",\n GRADIENT: \"gradFill\",\n IMAGE: \"blipFill\",\n } as const;\n export type FillType = typeof FillType[keyof typeof FillType];\n\n /**\n * 텍스트박스 세로 정렬 (setTextVerticalAlign align — bodyPr anchor).\n * 가로 텍스트(flow=horz) 기준. 모델 anchor 값과 1:1.\n */\n export const TextVerticalAlign = {\n TOP: \"top\",\n MIDDLE: \"middle\",\n BOTTOM: \"bottom\",\n } as const;\n export type TextVerticalAlign = typeof TextVerticalAlign[keyof typeof TextVerticalAlign];\n\n /** 선 겹선(compound) 스타일 (setShapeLine compound — OOXML a:ln @cmpd). */\n export const LineCompound = {\n SINGLE: \"sng\",\n DOUBLE: \"dbl\",\n THICK_THIN: \"thickThin\",\n THIN_THICK: \"thinThick\",\n TRIPLE: \"tri\",\n } as const;\n export type LineCompound = typeof LineCompound[keyof typeof LineCompound];\n\n /** 텍스트/단락 정렬. */\n export const TextAlign = {\n LEFT: \"left\",\n CENTER: \"center\",\n RIGHT: \"right\",\n JUSTIFY: \"justify\",\n } as const;\n export type TextAlign = typeof TextAlign[keyof typeof TextAlign];\n\n /** 표 상자의 페이지 내 가로 위치. */\n export const TableAlign = {\n LEFT: \"left\",\n CENTER: \"center\",\n RIGHT: \"right\",\n } as const;\n export type TableAlign = typeof TableAlign[keyof typeof TableAlign];\n\n /** 표 셀 세로 정렬. */\n export const CellVerticalAlign = {\n TOP: \"top\",\n CENTER: \"center\",\n BOTTOM: \"bottom\",\n } as const;\n export type CellVerticalAlign = typeof CellVerticalAlign[keyof typeof CellVerticalAlign];\n\n /** 개요 수준(outline level) — 단락의 개요/목차 상 수준. \"body\"=본문(개요 수준 없음). */\n export const OutlineLevel = {\n LEVEL_1: \"level1\",\n LEVEL_2: \"level2\",\n LEVEL_3: \"level3\",\n LEVEL_4: \"level4\",\n LEVEL_5: \"level5\",\n LEVEL_6: \"level6\",\n LEVEL_7: \"level7\",\n LEVEL_8: \"level8\",\n LEVEL_9: \"level9\",\n BODY: \"body\",\n } as const;\n export type OutlineLevel = typeof OutlineLevel[keyof typeof OutlineLevel];\n\n /**\n * 문서 기본 제공(내장) 스타일 키. setStyle(style) 에 그대로 넘긴다(값 = getStyles() 의 style 키).\n * 내장 스타일은 문서 로드 시 항상 존재하므로 이 enum 값은 어느 문서에서든 유효하다.\n * 커스텀 문서 스타일은 이 enum 없이 getStyles() 로 얻은 style 값(String)을 직접 넘긴다.\n */\n export const Style = {\n /** 본문(기본 단락 스타일) */\n NORMAL: \"normal\",\n TITLE: \"title\",\n SUBTITLE: \"subtitle\",\n HEADING_1: \"heading_1\",\n HEADING_2: \"heading_2\",\n HEADING_3: \"heading_3\",\n QUOTE: \"quote\",\n /** ↓ 글자 스타일 */\n STRONG: \"strong\",\n EMPHASIS: \"emphasis\",\n SUBTLE_EMPHASIS: \"subtle_emphasis\",\n INTENSE_EMPHASIS: \"intense_emphasis\",\n } as const;\n export type Style = typeof Style[keyof typeof Style];\n\n /** 들여쓰기 상대 조정. */\n export const IndentType = {\n INDENT: \"indent\",\n OUTDENT: \"outdent\",\n } as const;\n export type IndentType = typeof IndentType[keyof typeof IndentType];\n\n /** 문서 기본 제공 목록 서식. */\n export const ListType = {\n /** ● */\n BULLET_CIRCLE: \"bulletCircle\",\n /** ■ */\n BULLET_SQUARE: \"bulletSquare\",\n /** ◆ */\n BULLET_DIAMOND: \"bulletDiamond\",\n /** ✓ */\n BULLET_CHECK: \"bulletCheck\",\n /** ➢ */\n BULLET_ARROW: \"bulletArrow\",\n /** ✧ */\n BULLET_STAR: \"bulletStar\",\n /** 1. */\n NUMBER_DECIMAL: \"numberDecimal\",\n /** A. */\n NUMBER_UPPER_LETTER: \"numberUpperLetter\",\n /** I. */\n NUMBER_UPPER_ROMAN: \"numberUpperRoman\",\n /** ① */\n NUMBER_CIRCLED: \"numberCircled\",\n /** a. */\n NUMBER_LOWER_LETTER: \"numberLowerLetter\",\n /** i. */\n NUMBER_LOWER_ROMAN: \"numberLowerRoman\",\n /** 1. / A. / i. */\n MULTILEVEL_NUMBER_LETTER_ROMAN: \"multilevelNumberLetterRoman\",\n /** 1. / A. / a. */\n MULTILEVEL_NUMBER_LETTER_LETTER: \"multilevelNumberLetterLetter\",\n /** I. / A. / i. */\n MULTILEVEL_ROMAN_LETTER_ROMAN: \"multilevelRomanLetterRoman\",\n /** 1 / 1.1 / 1.1.1 */\n MULTILEVEL_NESTED_NUMBER: \"multilevelNestedNumber\",\n /** 1. / 1.1. / 1.1.1. */\n MULTILEVEL_NESTED_NUMBER_DOT: \"multilevelNestedNumberDot\",\n /** 1 / 1-1 / 1-1-1 */\n MULTILEVEL_NESTED_FULL_WIDTH: \"multilevelNestedFullWidth\",\n } as const;\n export type ListType = typeof ListType[keyof typeof ListType];\n\n /** 페이지 번호 대상 영역 (setPageNumber area). */\n export const PageNumberArea = {\n /** 머리글 */\n HEADER: \"header\",\n /** 바닥글 */\n FOOTER: \"footer\",\n } as const;\n export type PageNumberArea = typeof PageNumberArea[keyof typeof PageNumberArea];\n\n /** 페이지 번호 정렬 (setPageNumber align). */\n export const PageNumberAlign = {\n /** 왼쪽 정렬 */\n LEFT: \"left\",\n /** 가운데 정렬 */\n CENTER: \"center\",\n /** 오른쪽 정렬 */\n RIGHT: \"right\",\n } as const;\n export type PageNumberAlign = typeof PageNumberAlign[keyof typeof PageNumberAlign];\n\n /** 테두리 선 스타일 (셀·단락 테두리 공용). */\n export const BorderStyle = {\n SOLID: \"solid\",\n DASHED: \"dashed\",\n DOTTED: \"dotted\",\n DOUBLE: \"double\",\n NONE: \"none\",\n HIDDEN: \"hidden\",\n } as const;\n export type BorderStyle = typeof BorderStyle[keyof typeof BorderStyle];\n\n /**\n * 테두리 적용 위치(면/영역) (셀·단락 테두리 공용).\n * - 단락 테두리: top/bottom/left/right/all/between 유효 (between=단락 사이 가로선, 단락 전용).\n * - 표 셀 테두리: top/bottom/left/right/all/outer/inner/betweenRows/betweenColumns 유효.\n */\n export const BorderLocation = {\n TOP: \"top\",\n RIGHT: \"right\",\n BOTTOM: \"bottom\",\n LEFT: \"left\",\n ALL: \"all\",\n OUTER: \"outer\",\n INNER: \"inner\",\n BETWEEN_ROWS: \"betweenRows\",\n BETWEEN_COLUMNS: \"betweenColumns\",\n BETWEEN: \"between\",\n } as const;\n export type BorderLocation = typeof BorderLocation[keyof typeof BorderLocation];\n\n /** 탭 스톱 정렬 (값은 코어 tab val 과 동일). */\n export const TabAlignment = {\n LEFT: \"left\",\n CENTER: \"center\",\n RIGHT: \"right\",\n DECIMAL: \"decimal\",\n } as const;\n export type TabAlignment = typeof TabAlignment[keyof typeof TabAlignment];\n\n /** 탭 스톱 리더(빈 공간 채움 문자) (값은 코어 tab leader 와 동일). */\n export const TabLeader = {\n NONE: \"none\",\n DOT: \"dot\",\n HYPHEN: \"hyphen\",\n UNDERSCORE: \"underscore\",\n MIDDLE_DOT: \"middleDot\",\n } as const;\n export type TabLeader = typeof TabLeader[keyof typeof TabLeader];\n\n /** 페이지 방향 (setPageSize orientation). */\n export const PageOrientation = {\n /** 세로 */\n PORTRAIT: \"portrait\",\n /** 가로 */\n LANDSCAPE: \"landscape\",\n } as const;\n export type PageOrientation = typeof PageOrientation[keyof typeof PageOrientation];\n\n /** 용지 크기 프리셋 (setPageSize 프리셋 이름). */\n export const PaperSize = {\n A3: \"A3\",\n A4: \"A4\",\n A5: \"A5\",\n LETTER: \"Letter\",\n LEGAL: \"Legal\",\n EXECUTIVE: \"Executive\",\n } as const;\n export type PaperSize = typeof PaperSize[keyof typeof PaperSize];\n\n /** 페이지 번호 형식 (setPageNumbering formatType / getPageSetup().pageNumber.formatType). */\n export const NumberFormat = {\n /** 1, 2, 3 */\n DECIMAL: \"decimal\",\n /** ①, ②, ③ */\n DECIMAL_CIRCLE: \"decimalEnclosedCircle\",\n /** (1), (2), (3) */\n DECIMAL_PAREN: \"decimalEnclosedParen\",\n /** 1., 2., 3. */\n DECIMAL_FULLSTOP: \"decimalEnclosedFullstop\",\n /** 01, 02, 03 */\n DECIMAL_ZERO: \"decimalZero\",\n /** 1, 2, 3 (전각) */\n DECIMAL_FULL_WIDTH: \"decimalFullWidth\",\n /** 1, 2, 3 (반각) */\n DECIMAL_HALF_WIDTH: \"decimalHalfWidth\",\n /** -1-, -2-, -3- */\n NUMBER_DASH: \"numberInDash\",\n /** One, Two, Three */\n CARDINAL_TEXT: \"cardinalText\",\n /** 1st, 2nd, 3rd */\n ORDINAL: \"ordinal\",\n /** First, Second, Third */\n ORDINAL_TEXT: \"ordinalText\",\n /** *, †, ‡, § */\n CHICAGO: \"chicago\",\n /** 1, 2, ..., 9, A, B */\n HEX: \"hex\",\n /** a, b, c */\n LOWER_LETTER: \"lowerLetter\",\n /** A, B, C */\n UPPER_LETTER: \"upperLetter\",\n /** i, ii, iii */\n LOWER_ROMAN: \"lowerRoman\",\n /** I, II, III */\n UPPER_ROMAN: \"upperRoman\",\n /** ㄱ, ㄴ, ㄷ */\n HANGUL_CHOSUNG: \"chosung\",\n /** 가, 나, 다 */\n HANGUL_GANADA: \"ganada\",\n /** 일, 이, 삼 */\n KOREAN_COUNT: \"koreanCounting\",\n /** 하나, 둘, 셋 */\n KOREAN_LEGAL: \"koreanLegal\",\n /** 一, 二, 三 */\n KOREAN_DIGITAL: \"koreanDigital\",\n /** 壹, 貳, 參 */\n KOREAN_DIGITAL2: \"koreanDigital2\",\n /** 一, 二, 三 */\n CHINESE_COUNT: \"chineseCounting\",\n /** 一, 二, 三 (천 단위) */\n CHINESE_COUNTING_THOUSAND: \"chineseCountingThousand\",\n /** 壹, 贰, 叁 */\n CHINESE_LEGAL: \"chineseLegalSimplified\",\n /** 一, 二, 三 (자릿수 나열) */\n CHINESE_DIGITAL: \"chineseDigital\",\n /** 〇, 一, 二 */\n CHINESE_ZERO_TAIWANESE_DIGITAL: \"chineseZeroTaiwaneseDigital\",\n /** 一, 二, 三 */\n TAIWANESE_COUNT: \"taiwaneseCounting\",\n /** 一, 二, 三 (천 단위) */\n TAIWANESE_COUNTING_THOUSAND: \"taiwaneseCountingThousand\",\n /** 一, 二, 三 (자릿수 나열) */\n TAIWANESE_DIGITAL: \"taiwaneseDigital\",\n /** 一, 二, 三 */\n IDEOGRAPH_DIGITAL: \"ideographDigital\",\n /** ㊀, ㊁, ㊂ */\n IDEOGRAPH_CIRCLE: \"ideographEnclosedCircle\",\n /** 壹, 貳, 參 */\n IDEOGRAPH_LEGAL: \"ideographLegalTraditional\",\n /** 갑, 을, 병 (십간) */\n IDEOGRAPH_TRADITIONAL: \"ideographTraditional\",\n /** 자, 축, 인 (십이지) */\n IDEOGRAPH_ZODIAC: \"ideographZodiac\",\n /** 갑자, 을축, 병인 (육십갑자) */\n IDEOGRAPH_ZODIAC_TRADITIONAL: \"ideographZodiacTraditional\",\n /** 一, 二, 三 */\n JAPANESE_COUNT: \"japaneseCounting\",\n /** 一, 二, 三 (만 단위) */\n JAPANESE_DIGITAL: \"japaneseDigitalTenThousand\",\n /** 壱, 弐, 参 */\n JAPANESE_LEGAL: \"japaneseLegal\",\n /** ア, イ, ウ (반각) */\n JAPANESE_AIUEO: \"aiueo\",\n /** ア, イ, ウ (전각) */\n JAPANESE_AIUEO_FULL_WIDTH: \"aiueoFullWidth\",\n /** イ, ロ, ハ (반각) */\n JAPANESE_IROHA: \"iroha\",\n /** イ, ロ, ハ (전각) */\n JAPANESE_IROHA_FULL_WIDTH: \"irohaFullWidth\",\n /** 번호 표시 안 함 */\n NONE: \"none\",\n } as const;\n export type NumberFormat = typeof NumberFormat[keyof typeof NumberFormat];\n\n // =============================================================================\n // Typedefs\n // =============================================================================\n\n export interface RangeData {\n /** start paragraph ID */\n startParaId?: string;\n /** start offset (default: start of paragraph) */\n startOffset?: number;\n /** end paragraph ID (default: startParaId) */\n endParaId?: string;\n /** end offset (default: end of paragraph) */\n endOffset?: number;\n }\n\n export interface PageSetupInfo {\n /** paper dimensions (pt; null if unset) */\n pageSize: Size | null;\n /** orientation (null if unset) */\n orientation: PageOrientation | null;\n /** name of the matched paper preset (null if no match) */\n paperSize: PaperSize | null;\n /** margins (pt) */\n margins: PageMargins;\n /** whether \"different first page\" is enabled */\n titlePage: boolean;\n /** section break type (nextPage/continuous, etc.; nextColumn for column-break documents) */\n breakType: string;\n /** page numbering settings of the section (null if unset) */\n pageNumber: PageNumbering | null;\n }\n\n export interface PageMargins {\n /** top margin (pt) */\n top?: number;\n /** bottom margin (pt) */\n bottom?: number;\n /** left margin (pt) */\n left?: number;\n /** right margin (pt) */\n right?: number;\n /** header area margin (pt) */\n header?: number;\n /** footer area margin (pt) */\n footer?: number;\n }\n\n export interface PageNumbering {\n /** starting number for the first page of this section (integer ≥ 0) */\n start?: number;\n /** page number display format (decimal, roman numerals, etc.) */\n formatType?: NumberFormat;\n }\n\n export interface ColumnLayout {\n /** number of columns (1~12; 1 removes columns) */\n count: number;\n /** whether all columns have the same width (default: false if widths is given, otherwise current value) */\n equalWidth?: boolean;\n /** spacing between columns (pt; used when a column does not specify its own spacing) (default: current value (initially 36)) */\n space?: number;\n /** whether to show a separator line between columns (default: current value (initially false)) */\n separator?: boolean;\n /** width of each column (pt; the count must equal count, and specifying it makes the columns unequal. Included on read only when unequal) (default: current value) */\n widths?: ColumnWidth[];\n }\n\n export interface ColumnWidth {\n /** column width (pt) */\n width: number;\n /** spacing after this column (pt) (default: parent space) */\n space?: number;\n }\n\n export interface TextFormat {\n /** bold (null removes the property) */\n bold?: boolean | null;\n /** italic (null removes the property) */\n italic?: boolean | null;\n /** underline (null removes the property) */\n underline?: boolean | null;\n /** font size (pt, null removes the property) */\n size?: number | null;\n /** text color (hex, e.g. \"#FF0000\", null removes the property) */\n color?: string | null;\n /** font name (null removes the property) */\n font?: string | null;\n /** strikethrough (null removes the property) */\n strikeThrough?: boolean | null;\n /** highlight color (hex, e.g. \"#FFFF00\"; null/\"transparent\" removes it) */\n highlightColor?: string | null;\n /** superscript (mutually exclusive with subscript; takes precedence if both are true, null removes it) */\n superscript?: boolean | null;\n /** subscript (mutually exclusive with superscript, null removes it) */\n subscript?: boolean | null;\n /** character spacing (pt, negative tightens; range -12~400, null removes the property) */\n spacing?: number | null;\n }\n\n export interface ParagraphFormat {\n /** alignment (\"left\"|\"center\"|\"right\"|\"justify\", null removes it) */\n align?: TextAlign | null;\n /** line spacing — number = multiple (e.g. 1.5), \"Npx\" = the same multiple fixed (e.g. \"1.5px\"; N is a line-height multiple, not pixels), null = remove */\n lineSpacing?: number | string | null;\n /** left indent (pt, null removes it) */\n leftIndent?: number | null;\n /** right indent (pt, null removes it) */\n rightIndent?: number | null;\n /** first-line indent (pt, negative for a hanging indent, null removes it) */\n firstLineIndent?: number | null;\n /** space before the paragraph (pt, null removes it) */\n spaceBefore?: number | null;\n /** space after the paragraph (pt, null removes it) */\n spaceAfter?: number | null;\n /** paragraph background color (shading fill, hex \"#RRGGBB\", null removes it) */\n backgroundColor?: string | null;\n /** outline level (\"level1\"~\"level9\"; \"body\" or null means body text) */\n outlineLevel?: OutlineLevel | null;\n }\n\n export interface Border {\n /** target side (for paragraph borders, top/bottom/left/right/all and between (horizontal line between paragraphs) are valid) */\n location: BorderLocation;\n /** line style (solid/dashed/dotted/double/none/hidden) */\n style: BorderStyle;\n /** line color (hex \"#RRGGBB\") */\n color: string;\n /** line width (pt) */\n width: number;\n }\n\n export interface TabStop {\n /** tab stop position (pt) */\n position: number;\n /** alignment (\"left\"|\"center\"|\"right\"|\"decimal\", default \"left\") */\n alignment?: TabAlignment;\n /** leader fill (\"none\"|\"dot\"|\"hyphen\"|\"underscore\"|\"middleDot\", default \"none\") */\n leader?: TabLeader;\n }\n\n export interface CellRange {\n /** anchor row (0-based, relative to the table) */\n row: number;\n /** anchor column (0-based, relative to the table) */\n col: number;\n /** number of rows (default: 1) */\n rowSpan?: number;\n /** number of columns (default: 1) */\n colSpan?: number;\n }\n\n export interface Padding {\n /** left padding (pt) */\n left?: number;\n /** right padding (pt) */\n right?: number;\n /** top padding (pt) */\n top?: number;\n /** bottom padding (pt) */\n bottom?: number;\n }\n\n export interface ShapeInfo {\n /** 도형 ID (영구 GUID) */\n shapeId: string;\n /** 도형 종류 (\"sp\"=도형/텍스트박스, \"pic\"=이미지) */\n shapeType: ShapeType;\n /** 도형이 속한 영역 ID (본문 \"0\") */\n storyId: string;\n /** 너비(pt) */\n width: number;\n /** 높이(pt) */\n height: number;\n /** 배치 모드 (inline/infront/behind) */\n wrap: ShapeWrap;\n /** 앞뒤 순서 (floating 전용 의미) */\n zIndex: number;\n /** 소속 위치 (offset 은 inline 전용 단락 내 글자 위치) */\n anchor: { paragraphId: string; offset?: number };\n /** floating 전용 가로 위치(pt, relativeFromH 기준 — move 에 그대로 재사용 가능) */\n x?: number;\n /** floating 전용 세로 위치(pt, relativeFromV 기준) */\n y?: number;\n /** floating 전용 가로 기준점 */\n relativeFromH?: PositionRelativeFromH;\n /** floating 전용 세로 기준점 */\n relativeFromV?: PositionRelativeFromV;\n /** 채우기 readback (setFill 입력과 대칭) */\n fill: ShapeFill | null;\n /** 선 readback (setLine 입력과 대칭) */\n line: ShapeLine | null;\n /** 링크 readback */\n hyperlink: { url: string; tooltip: string; linkType: string; anchor?: string } | null;\n /** 텍스트 영역 보유 여부(텍스트박스) */\n isTextbox?: boolean;\n /** 텍스트박스 내부 텍스트 영역 ID */\n textboxStoryId?: string;\n /** 대체 텍스트 */\n altText?: string;\n }\n\n export interface Size {\n /** width (positive) */\n width?: number;\n /** height (positive) */\n height?: number;\n }\n\n export interface ShapeFill {\n /** fill kind (noFill/solidFill/blipFill/gradFill) */\n type: FillType;\n /** solidFill color \"#RRGGBB\" (null/\"\" removes the fill) */\n color?: string | null;\n /** blipFill image source (exactly one of src, url, base64) */\n image?: { src?: string; url?: string; base64?: string };\n /** gradFill color stops (≥2, position 0~100) */\n stops?: { position: number; color: string }[];\n /** gradFill angle (degrees) (default: 0 (left→right)) */\n angle?: number;\n }\n\n export interface ShapeLine {\n /** line color \"#RRGGBB\" (null or \"\" removes it) */\n color?: string | null;\n /** line width (pt) */\n width?: number;\n /** dash style (null removes it) */\n dash?: LineDash | null;\n /** compound line style (null removes it) */\n compound?: LineCompound | null;\n }\n\n export interface StyleInfo {\n /** style key */\n style: string;\n /** display name */\n name: string;\n /** style type */\n type: \"paragraph\" | \"character\";\n /** key of the parent style it inherits from (if any) */\n basedOn?: string;\n /** key of the style for the next paragraph (if any) */\n next?: string;\n }\n\n // =============================================================================\n // Classes\n // =============================================================================\n\n /**\n * The entry point to the document. Navigate to the body and sections, find document elements, and change document-wide settings.\n * - Use getBody() and getSection() to access the body and sections, and to get paragraphs, tables, shapes, charts, bookmarks, and more.\n * - Provides page numbers, change tracking, view settings, and document save, download, and print.\n */\n export interface WordDocument {\n /**\n * Returns the paragraph with the given ID.\n * - The area the paragraph belongs to (body/header/footer) is found and bound automatically, so header/footer paragraphs can be formatted and edited the same way as body paragraphs.\n *\n * @param paragraphId - paragraph ID\n * @returns paragraph object (area bound automatically)\n */\n getParagraph(paragraphId: string): Promise<WordParagraph>;\n /**\n * Returns the table with the given ID.\n * - The area the table belongs to (body/header/footer/text box) is found and bound automatically, so tables in those areas can be handled the same way.\n *\n * @param tableId - table ID\n * @returns table object (area bound automatically)\n */\n getTable(tableId: string): Promise<WordTable>;\n /**\n * Returns the range at the given coordinates (RangeData), or the whole body when called with no argument.\n * - The area the paragraph belongs to (body/header/footer) is found and bound automatically, so passing the paragraphId of a header/footer paragraph works the same as for the body.\n * - Calling it with no argument is a shortcut for `getBody().getRange(RangePosition.WHOLE)`. A range lives in one area, so this covers the body only, not headers, footers, or notes.\n * - Passing coordinates requires startParaId. An options object without it is rejected right away, so a mistyped key cannot turn into the whole body by accident.\n * - Use `getBody().getRange(RangePosition.START/END)` for the start/end of an area and `getSelection()` for the selection.\n *\n * @param options - coordinate range information. Omit it for the whole body (default: whole body)\n * @returns range object\n * @throws {Error} if an options object is given without startParaId\n * @example\n * doc.getRange(); // whole body\n * doc.getRange({ startParaId: \"p1\" }); // whole paragraph\n * doc.getRange({ startParaId: \"p1\", startOffset: 0, endOffset: 5 }); // characters 0~5 within the paragraph\n */\n getRange(options?: RangeData): Promise<WordRange>;\n /**\n * Returns the current selection.\n * - If nothing is selected, returns an empty (collapsed) range at the cursor position.\n *\n * @returns selection range\n */\n getSelection(): Promise<WordRange>;\n /**\n * Returns the content area of the document body.\n * - Use it to get body text and structure and to insert paragraphs and tables.\n *\n * @returns document body\n * @example\n * doc.getBody().getText(); // get body text\n * doc.getBody().insertParagraph(\"New paragraph\"); // append a paragraph at the end of the body\n */\n getBody(): Promise<WordBody>;\n /**\n * Returns the section at the given index.\n * - Use it to get the section's body, header, and footer and for page setup.\n *\n * @param index - section index (0-based, in document order; 0 = first section) (default: 0)\n * @returns section object (the index is validated when header/footer/page setup is called)\n * @example\n * doc.getSection(); // first section (index omitted)\n * doc.getSection(1).getBody(); // body of the second section\n * doc.getSection(0).getHeader(HeaderFooterVariant.DEFAULT); // default header of the first section\n */\n getSection(index?: number): Promise<WordSection>;\n /**\n * Returns the list of sections in the document, in document order.\n *\n * @returns section list (empty array if none)\n */\n getSections(): Promise<WordSection[]>;\n /**\n * Sets or removes the page number in the header or footer.\n * - Creates the area automatically if it does not exist, and replaces any existing page number.\n * - If remove is true, only the page number paragraph is removed. Nothing changes if the area or the number does not exist.\n *\n * @param area - target area (header/footer)\n * @param options - page number settings\n * @param options.align - alignment (left/center/right). Ignored when remove:true (default: PageNumberAlign.LEFT)\n * @param options.variant - header/footer variant (default/first/even) (default: HeaderFooterVariant.DEFAULT)\n * @param options.sectionIndex - 0-based section index (0 = first section) (default: 0)\n * @param options.remove - if true, removes the page number (align ignored) (default: false)\n * @example\n * doc.setPageNumber(PageNumberArea.FOOTER); // show page number in the footer\n * doc.setPageNumber(PageNumberArea.FOOTER, { align: PageNumberAlign.CENTER }); // center alignment\n * doc.setPageNumber(PageNumberArea.FOOTER, { remove: true }); // remove page number\n */\n setPageNumber(area: PageNumberArea, options?: { align?: PageNumberAlign; variant?: HeaderFooterVariant; sectionIndex?: number; remove?: boolean }): Promise<void>;\n /**\n * Turns change tracking (track changes) on or off.\n * - When on, subsequent edits are tracked as insertions/deletions/format changes; when off, editing returns to normal (already recorded changes are kept).\n *\n * @param enabled - true to turn on, false to turn off\n * @example\n * doc.setChangeTracking(true); // track subsequent edits\n * doc.setChangeTracking(false); // stop tracking, keeping existing tracked changes\n */\n setChangeTracking(enabled: boolean): Promise<void>;\n /**\n * Returns whether change tracking (track changes) is on.\n *\n * @returns true if on, false if off\n */\n isChangeTrackingEnabled(): Promise<boolean>;\n /**\n * Saves the document.\n * - Does nothing if there are no edits or a save is already in progress.\n */\n save(): Promise<void>;\n /**\n * Downloads the document in its original format.\n */\n download(): Promise<void>;\n /**\n * Prints the current document.\n * - Uses browser printing on desktop Chrome and Edge; in other environments, converts to PDF and downloads it.\n * - Does nothing if printing is disabled for the document.\n */\n print(): Promise<void>;\n /**\n * Changes the view zoom.\n *\n * @param mode - zoom preset (50~200%), fit (fitWidth/fitInWindow), or step (zoomIn/zoomOut)\n * @throws {Error} if mode is not a ZoomMode value\n * @example\n * doc.setZoom(ZoomMode.SCALE_100); // 100% zoom\n * doc.setZoom(ZoomMode.FIT_WIDTH); // fit to screen width\n */\n setZoom(mode: ZoomMode): Promise<void>;\n /**\n * Shows or hides all formatting marks (paragraph marks, spaces, tabs, etc.).\n *\n * @param visible - true to show, false to hide\n * @example\n * doc.setFormattingMarks(true); // show formatting marks\n * doc.setFormattingMarks(false); // hide formatting marks\n */\n setFormattingMarks(visible: boolean): Promise<void>;\n /**\n * Sets or removes the document (page) background color.\n *\n * @param color - background color (\"#RRGGBB\"). null or an empty string removes the background color.\n * @throws {Error} if color is not in \"#RRGGBB\" format\n * @example\n * doc.setBackgroundColor(\"#FFF8DC\"); // set page background color\n * doc.setBackgroundColor(null); // remove background color\n */\n setBackgroundColor(color: string | null): Promise<void>;\n /**\n * Sets the whole document to use different headers and footers on odd and even pages.\n *\n * @param enabled - true to turn on, false to turn off\n * @throws {Error} if enabled is not a boolean\n * @example\n * doc.setEvenAndOddHeaders(true); // separate odd/even headers\n * doc.getSection().getHeader(HeaderFooterVariant.EVEN).insertText(\"Even page\", { replace: true }); // enter the even-page header\n */\n setEvenAndOddHeaders(enabled: boolean): Promise<void>;\n /**\n * Returns the bookmark with the given name.\n * - Entry point for per-bookmark operations such as delete, go to, exists, and info.\n *\n * @param name - bookmark name\n * @returns bookmark object\n */\n getBookmark(name: string): Promise<WordBookmark>;\n /**\n * Returns the list of bookmarks in the document.\n *\n * @param includeHidden - if true, also includes hidden bookmarks (\"_\" prefix) (default: false)\n * @returns bookmark list (empty array if none)\n * @example\n * doc.getBookmarks(); // get regular bookmarks\n * doc.getBookmarks(true); // include hidden bookmarks\n */\n getBookmarks(includeHidden?: boolean): Promise<WordBookmark[]>;\n /**\n * Returns the comment with the given ID.\n *\n * @param commentId - comment ID\n * @returns comment object\n */\n getComment(commentId: string): Promise<WordComment>;\n /**\n * Returns the list of comments in the document.\n *\n * @returns comment list\n */\n getComments(): Promise<WordComment[]>;\n /**\n * Returns the list of change tracking entries in the whole document, in document order.\n *\n * @returns change tracking list\n */\n getChangeTrackings(): Promise<WordChangeTracking[]>;\n /**\n * Returns the change tracking entry with the given ID.\n *\n * @param id - change tracking entry ID\n * @returns change tracking object\n */\n getChangeTracking(id: string): Promise<WordChangeTracking>;\n /**\n * Accepts all change tracking entries in the whole document at once.\n *\n * @returns processing result\n */\n acceptChangeTrackings(): Promise<{ processedCount: number; remainingCount: number; failedIds: string[] }>;\n /**\n * Rejects all change tracking entries in the whole document at once.\n *\n * @returns processing result\n */\n rejectChangeTrackings(): Promise<{ processedCount: number; remainingCount: number; failedIds: string[] }>;\n /**\n * Returns the footnote or endnote with the given ID.\n *\n * @param noteId - footnote/endnote area ID\n * @returns note object\n */\n getNote(noteId: string): Promise<WordNote>;\n /**\n * Returns the list of footnotes and endnotes in the document, in document order.\n *\n * @returns footnote/endnote list\n * @example\n * word.getNotes().forEach(note => console.log(note.getBody().getText())); // get footnote/endnote content\n * word.getFootnotes().forEach(note => note.delete()); // delete all footnotes\n */\n getNotes(): Promise<WordNote[]>;\n /**\n * Returns the list of footnotes in the document, in document order.\n *\n * @returns footnote list\n */\n getFootnotes(): Promise<WordNote[]>;\n /**\n * Returns the list of endnotes in the document, in document order.\n *\n * @returns endnote list\n */\n getEndnotes(): Promise<WordNote[]>;\n /**\n * Returns the style with the given key.\n * - Use it to get or modify style information and the defined formatting.\n *\n * @param style - Style enum for built-in styles (value = key); for custom document styles, the style value from getStyles() (e.g. \"heading_1\"/\"strong\")\n * @returns style object\n */\n getStyle(style: Style | string): Promise<WordStyle>;\n /**\n * Returns the list of styles defined in the document.\n *\n * @returns style list (empty array if none)\n */\n getStyles(): Promise<WordStyle[]>;\n /**\n * Returns the shape with the given ID.\n * - Returns an object matching the kind of shape: image, chart, or general shape.\n *\n * @param shapeId - shape ID (obtained from getShapes / insertShape)\n * @returns shape object (picture → WordImage, chart → WordChart)\n */\n getShape(shapeId: string): Promise<WordShape | WordImage | WordChart>;\n /**\n * Returns the list of shapes in the document.\n * - Includes both inline shapes (placed like text) and floating shapes (placed in front of or behind text).\n *\n * @param options - list filter\n * @param options.storyId - target area ID (body if omitted) (default: \"0\")\n * @param options.type - shape type filter (default: all types)\n * @param options.anchorParagraphId - anchor paragraph filter (default: all)\n * @returns shape list (pictures as WordImage, charts as WordChart; empty array if none)\n * @throws {Error} if type is not a ShapeType value\n * @example\n * doc.getShapes(); // shapes in the body\n * doc.getShapes({ type: ShapeType.PICTURE }); // images only\n */\n getShapes(options?: { storyId?: string; type?: ShapeType; anchorParagraphId?: string }): Promise<(WordShape | WordImage | WordChart)[]>;\n /**\n * Returns the chart with the given ID.\n *\n * @param shapeId - chart shape ID (obtained from getCharts / getShapes)\n * @returns chart object\n */\n getChart(shapeId: string): Promise<WordChart>;\n /**\n * Returns the list of charts in the document.\n *\n * @param options - list filter\n * @param options.storyId - target area ID (body if omitted) (default: \"0\")\n * @param options.anchorParagraphId - anchor paragraph filter (default: all)\n * @returns chart list (empty array if none)\n * @example\n * doc.getCharts(); // get all charts\n * doc.getCharts({ anchorParagraphId: id }); // charts anchored to the given paragraph\n */\n getCharts(options?: { storyId?: string; anchorParagraphId?: string }): Promise<WordChart[]>;\n /**\n * Returns the hyperlink with the given ID.\n *\n * @param hyperlinkId - hyperlink ID (obtained from range.insertHyperlink / getHyperlinks)\n * @returns hyperlink object\n */\n getHyperlink(hyperlinkId: string): Promise<WordHyperlink>;\n /**\n * Returns the list of hyperlinks in the document (or in a specific area).\n *\n * @param options - list filter\n * @param options.storyId - target area ID (body if omitted) (default: \"0\")\n * @param options.anchorParagraphId - only links that start in the given paragraph (default: whole area)\n * @returns hyperlink list (empty array if none)\n * @example\n * doc.getHyperlinks(); // hyperlinks in the body\n * doc.getHyperlinks({ anchorParagraphId: id }); // links that start in the given paragraph\n */\n getHyperlinks(options?: { storyId?: string; anchorParagraphId?: string }): Promise<WordHyperlink[]>;\n }\n\n /**\n * Gets and edits a single content area such as the body, header, or footer.\n * - Gets the text and paragraphs in the area, searches, inserts, or replaces content, or clears it.\n * - The content of footnotes, endnotes, comments, and text boxes is also accessed through that object's getBody().\n * - Editing at a specific location uses the range returned by getRange().\n */\n export interface WordBody {\n /**\n * Returns the identifier of this area.\n *\n * @returns ID of the content area\n */\n getStoryId(): Promise<string>;\n /**\n * Checks whether this content area actually exists.\n * - A header or footer that has not been created yet is created on the first content insertion.\n *\n * @returns true if the area exists, false if it has not been created yet\n */\n exists(): Promise<boolean>;\n /**\n * Returns the range for the given position or coordinates within this area.\n *\n * @param range - coordinate RangeData object, or an area position RangePosition (\"whole\"/\"start\"/\"end\"/\"content\"); omitted means the whole area (default: RangePosition.WHOLE)\n * @returns range that can be inspected and edited within this area\n * @example\n * body.getRange(); // the whole area\n * body.getRange(RangePosition.END); // end of the area (empty range)\n * body.getRange({ startParaId: id, startOffset: 0 }); // coordinate range\n */\n getRange(range?: (RangeData | RangePosition)): Promise<WordRange>;\n /**\n * Sets this whole area as the on-screen selection (does not change document content).\n *\n * @param mode - \"select\" (whole area) / \"start\" (cursor at the start of the area) / \"end\" (cursor at the end of the area) (default: SelectionMode.SELECT)\n * @throws {Error} if the position of the area cannot be determined\n * @example\n * body.select(); // select the whole area\n * body.select(SelectionMode.END); // place the cursor at the end of the area\n */\n select(mode?: SelectionMode): Promise<void>;\n /**\n * Searches this area for text or a special character and returns a list of editable ranges.\n *\n * @param query - a string searches for text; a `{ character }` object searches for a special character\n * @param options - text search options (ignored for special character search)\n * @param options.caseSensitive - case-sensitive matching (default: false)\n * @param options.wholeWord - whole-word matching (default: false)\n * @returns list of matched range proxies (empty array if none)\n * @throws {Error} if query is missing, malformed, or an unsupported special character\n * @example\n * body.search(\"hello\"); // plain text search\n * body.search(\"Hello\", { caseSensitive: true }); // case-sensitive match\n * body.search(\"cat\", { wholeWord: true }); // only the standalone word \"cat\" (excludes cat inside catalog)\n * body.search({ character: SpecialCharacter.PAGE_BREAK }); // find page breaks\n * const ranges = body.search(\"draft\"); // returned ranges are directly editable\n * ranges.forEach((range) => range.setTextFormat({ bold: true })); // e.g. make every match bold\n */\n search(query: string | { character: SpecialCharacter }, options?: { caseSensitive?: boolean; wholeWord?: boolean }): Promise<WordRange[]>;\n /**\n * Returns the entire content of this area as plain text.\n * - For footnotes/endnotes, the automatic number marker and separator space are excluded.\n *\n * @returns full text for reading. Empty string if the area does not exist\n */\n getText(): Promise<string>;\n /**\n * Returns the paragraph/table structure of this area. Empty list if the area does not exist.\n * - The text of a paragraph entry includes the trailing boundary newline — the final \"\\n\" is always the paragraph boundary, so the character count within that paragraph is `text.length - 1`,\n * and a \"\\n\" in the middle is one line-break object (manual line break, page break, or column break).\n *\n * @param options - lookup options. The target area is fixed to this body.\n * @param options.type - get only a specific type (table=tables only / list=list paragraphs only) (default: all)\n * @returns list of paragraph/table entries (document order). id is a common identifier (type tells the kind); type=\"p\" includes text, tables include rows/columns\n * @example\n * body.getStructure(); // all paragraphs and tables\n * body.getStructure({ type: StructureFilter.TABLE }); // tables only\n * body.getStructure({ type: StructureFilter.LIST }); // list paragraphs only\n */\n getStructure(options?: { type?: StructureFilter }): Promise<{ paragraphs: { index: number; type: string; id: string; storyId: string; text?: string; rows?: number; columns?: number }[] }>;\n /**\n * Returns the entire content of this area as HTML with formatting.\n * - Paragraphs are represented as <p> elements.\n *\n * @returns HTML and paragraph count. Empty string and 0 if the area does not exist\n */\n getContentHtml(): Promise<{ html: string; paragraphCount: number }>;\n /**\n * Returns the list of paragraphs in this area.\n *\n * @returns list of paragraphs that can be inspected and edited. Empty array if the area does not exist\n */\n getParagraphs(): Promise<WordParagraph[]>;\n /**\n * Returns the paragraph at the given index in this area.\n *\n * @param index - zero-based paragraph index (default: 0)\n * @returns paragraph that can be inspected and edited. null if the area or that paragraph does not exist\n */\n getParagraph(index?: number): Promise<WordParagraph | null>;\n /**\n * Returns the list of tables in this area, in document order.\n * - The area boundary is the story: a table inside another table's cell belongs to the same story and is included,\n * while a table inside a text box has its own story and is not. Get those through that text box's getBody().\n *\n * @returns list of tables that can be inspected and edited. Empty array if the area does not exist\n * @example\n * body.getTables(); // all tables in this area\n * body.getTables()[0].getCell(0, 0).setText(\"Item\"); // edit the first table\n */\n getTables(): Promise<WordTable[]>;\n /**\n * Returns the list of comments in this area. Works only for the body area; other areas return an empty array.\n *\n * @returns array of comment proxies\n */\n getComments(): Promise<WordComment[]>;\n /**\n * Returns the list of change tracking items in this area in document order.\n *\n * @returns array of change tracking proxies\n */\n getChangeTrackings(): Promise<WordChangeTracking[]>;\n /**\n * Accepts all change tracking items in this area.\n *\n * @returns processing result\n */\n acceptChangeTrackings(): Promise<{ processedCount: number; remainingCount: number; failedIds: string[] }>;\n /**\n * Rejects all change tracking items in this area.\n *\n * @returns processing result\n */\n rejectChangeTrackings(): Promise<{ processedCount: number; remainingCount: number; failedIds: string[] }>;\n /**\n * Returns the list of footnotes/endnotes in the body. (body area only)\n *\n * @returns array of note proxies\n */\n getNotes(): Promise<WordNote[]>;\n /**\n * Returns the list of footnotes in the body. (body area only)\n *\n * @returns array of footnote proxies\n */\n getFootnotes(): Promise<WordNote[]>;\n /**\n * Returns the list of endnotes in the body. (body area only)\n *\n * @returns array of endnote proxies\n */\n getEndnotes(): Promise<WordNote[]>;\n /**\n * Inserts a new paragraph; if the position is omitted, appends it at the end of the area.\n * - Creates the area automatically if it does not exist. The new paragraph inherits the direct paragraph formatting of the reference paragraph, such as alignment, spacing, and indentation.\n * - If paragraphId is omitted, the first or last paragraph of the area is used as the reference depending on the insert position.\n * - To reset the inherited direct formatting, call clearFormat() on the returned paragraph.\n *\n * @param text - text of the new paragraph\n * @param options - insert options\n * @param options.paragraphId - reference paragraph ID\n * @param options.position - with a reference paragraph, \"before\" (above) / \"after\" (below) relative to that paragraph; without one, the area position \"start\" (very beginning) / \"end\" (very end) (default: after if a reference paragraph is given, otherwise end)\n * @returns new paragraph that can be inspected and edited after insertion\n * @throws {Error} if the reference paragraph given by paragraphId does not exist or position is not an InsertAt value\n * @example\n * body.insertParagraph(\"New paragraph\"); // append at the end\n * body.insertParagraph(\"First\", { position: InsertAt.START }); // add at the very beginning\n * body.insertParagraph(\"After\", { paragraphId: id, position: InsertAt.AFTER }); // after a specific paragraph\n */\n insertParagraph(text: string, options?: { paragraphId?: string; position?: InsertAt }): Promise<WordParagraph>;\n /**\n * Inserts a table; if the position is omitted, appends it at the end of the area.\n * - Cannot insert inside a table cell. An error is thrown if the insertion point is inside a cell.\n *\n * @param rows - number of rows\n * @param columns - number of columns\n * @param options - insert options\n * @param options.paragraphId - reference paragraph ID\n * @param options.position - with a reference paragraph, \"before\" (above) / \"after\" (below) relative to that paragraph; without one, the area position \"start\" (very beginning) / \"end\" (very end) (default: after if a reference paragraph is given, otherwise end)\n * @param options.values - cell values to fill right after creation (2D array; throws before issuing if it exceeds the table size)\n * @returns proxy of the inserted table\n * @throws {Error} if rows/columns are not 1 or greater, values exceeds the table size, the reference paragraph does not exist, or the insertion point is inside a table cell (nested tables not supported)\n * @example\n * body.insertTable(3, 4); // empty 3x4 table at the end\n * body.insertTable(2, 2, { paragraphId: id, position: InsertAt.BEFORE }); // before a specific paragraph\n * body.insertTable(2, 2, { values: [[\"Name\", \"Score\"], [\"Kim Minsu\", \"95\"]] }); // fill at creation\n */\n insertTable(rows: number, columns: number, options?: { paragraphId?: string; position?: InsertAt; values?: string[][] }): Promise<WordTable>;\n /**\n * Inserts HTML and returns the range of the inserted content.\n * - If the position is omitted, creates a new paragraph at the end of the area and inserts there.\n * - If <img> is included, the images are uploaded first and their src replaced. Images that fail to upload are excluded and the rest is inserted.\n * - Plain text without tags (`\"hello\"`) and non-block tags (`\"<div>abc</div>\"`) are also normalized as text within a paragraph,\n * and multi-paragraph HTML (`\"<p>a</p><p>b</p>\"`) returns a range covering all of those paragraphs.\n * - Since it goes through the same path as paste, **anything paste does not support is not inserted**:\n * - List styles are not applied — `<ul>`/`<ol>`/`<li>` become plain paragraphs without numbers or bullets (set lists separately with `WordParagraph.setList`).\n * - Heading styles are not applied either — `<h1>`~`<h6>` become plain paragraphs without a style (set styles separately with `WordRange.setStyle`).\n * - Tags that are not document content (`<script>`/`<style>`/`<iframe>`, etc.) are discarded along with their inner text.\n * - If change tracking (track changes) is on, the inserted content remains as a revision, as with normal paste (except inside comments).\n * - Because block HTML (`<p>`, `<h1>`, etc.) inserts a paragraph break with each block, **one empty paragraph remains after the last block** (plain text and inline do not leave one).\n *\n * @param html - HTML to insert. If an empty string (whitespace-only counts too), returns only an empty range at the insertion point without changing the document\n * @param options - insert position options\n * @param options.paragraphId - reference paragraph ID\n * @param options.position - without a reference paragraph, creates a new paragraph at \"start\" (very beginning of the area) / \"end\" (very end of the area) and inserts into it. With a reference paragraph, this is the **insertion point**, not a sibling position — \"after\" is the end point of that paragraph, \"before\" is its start point. \"after\" appends at the end of the anchor paragraph, so the first content merges into that paragraph (`<p>A</p><p>B</p>` = A merged into the anchor + B as a new paragraph), while \"before\" becomes a new paragraph before the anchor for block HTML, or merges at the very start of the anchor for inline HTML (default: after if a reference paragraph is given, otherwise end)\n * @returns range of the inserted content. If there is nothing to insert (empty HTML or HTML without content), an empty (collapsed) range at the insertion point. Insertion failures are reported as exceptions.\n * @throws {Error} if html is not a string, the reference paragraph does not exist, the HTML cannot be parsed, or a table is inserted inside a cell (Promise reject)\n * @example\n * const range = await body.insertHtml(\"<p>Paragraph</p>\"); // append at the end of the area + get the inserted range\n * range.setTextFormat({ bold: true }); // returned range is directly editable\n * body.insertHtml(\"<p>First</p>\", { position: InsertAt.START }); // very beginning of the area\n * body.insertHtml(\"<p>After paragraph</p>\", { paragraphId: id, position: InsertAt.AFTER }); // new paragraph after that paragraph\n * body.insertHtml(\"<b>appended</b>\", { paragraphId: id }); // inline HTML — appended at the end of that paragraph\n * body.insertHtml(\"<ul><li>a</li></ul>\"); // list style is not applied — inserted as paragraphs, then set with setList\n * (await body.insertHtml(\"\")).isCollapsed(); // empty HTML — no change, empty range\n */\n insertHtml(html: string, options?: { paragraphId?: string; position?: InsertAt }): Promise<WordRange>;\n /**\n * Finds and replaces all matching text within this area.\n * - When called on the body, the scope is the whole body; when called on a header, footer, etc., it is limited to that area.\n *\n * @param findText - text to find\n * @param replaceText - replacement text\n * @param options - replace options\n * @param options.caseSensitive - case-sensitive matching (default: false)\n * @returns number of actual replacements (0 if no match)\n * @throws {Error} if findText is empty\n * @example\n * doc.getBody().replaceAll(\"hello\", \"HI\").replacedCount; // replacement count\n * doc.getBody().replaceAll(\"Draft\", \"Final\", { caseSensitive: true }); // case-sensitive\n * doc.getSection().getHeader().replaceAll(\"v1\", \"v2\"); // replace only in the header area\n * doc.getFootnotes()[0].getBody().replaceAll(\"insert\", \"update\"); // replace only within the footnote content\n * doc.getShape(shapeId).getBody().replaceAll(\"old\", \"new\"); // replace only inside the text box\n */\n replaceAll(findText: string, replaceText: string, options?: { caseSensitive?: boolean }): Promise<{ replacedCount: number }>;\n /**\n * Puts text into this area, either at the very beginning or in place of the whole content.\n * - Without replace, the text goes in at the very start of the area and the existing content stays.\n * - With replace, the whole content is replaced and a single paragraph is left, so several paragraphs become one.\n * - If the area does not exist yet, it is created and this text becomes its first content.\n * - In a footnote or endnote area, replace keeps the automatic number marker and the space after it and replaces only the text that follows.\n * - Only the text changes — the formatting of the area stays as it is. Apply formatting to the returned range when you need it.\n *\n * @param text - text to put in. An empty string with replace empties the area\n * @param options - insert options\n * @param options.replace - true replaces the whole content of the area; omitted adds at the very beginning (default: false)\n * @returns range of the text that was put in. For a footnote/endnote replace it covers the first paragraph including the number marker. null when a footnote/endnote has no content to replace\n * @throws {Error} if the paragraph of the area cannot be found\n * @example\n * doc.getBody().insertText(\"Preface\"); // add at the very beginning of the body\n * section.getHeader().insertText(\"Report\", { replace: true }); // replace the header (created if missing)\n * note.getBody().insertText(\"Footnote content\", { replace: true }); // replace the footnote text (number marker kept)\n */\n insertText(text: string, options?: { replace?: boolean }): Promise<WordRange | null>;\n /**\n * Clears the content of this area, leaving one empty paragraph.\n * - The content area itself is kept.\n *\n * @returns true if the area exists (including an already empty area), false if the area does not exist\n */\n clear(): Promise<boolean>;\n /**\n * Replaces multiple paragraphs in place at once. Changes text only; unless keepFormat is set, resets the formatting of the replaced range.\n *\n * @param items - list of paragraphs to replace, looked up within this area. keepFormat defaults to false (reset formatting)\n * @returns number of successful replacements\n * @throws {Error} paragraphId missing or paragraph not found\n */\n replaceParagraphs(items: { paragraphId: string; text: string; keepFormat?: boolean }[]): Promise<number>;\n }\n\n /**\n * Gets and edits the page setup and headers/footers of a single document section.\n * - Configures paper size, margins, column layout, page number format, and section breaks.\n * - Access content areas via getBody(), getHeader(), and getFooter().\n * - Sections are identified by a 0-based index in document order.\n */\n export interface WordSection {\n /**\n * Returns the index of this section.\n *\n * @returns 0-based section index\n */\n getIndex(): Promise<number>;\n /**\n * Returns the section body.\n * - The body is shared by all sections, so calling this on any section returns the same body.\n *\n * @returns body area\n */\n getBody(): Promise<WordBody>;\n /**\n * Returns the header area of this section.\n * - An area that does not exist yet is created on first content insertion.\n *\n * @param type - kind: HeaderFooterType (primary/firstPage/evenPages) or HeaderFooterVariant (default/first/even) (default: HeaderFooterType.PRIMARY)\n * @returns header area of the given kind\n * @throws {Error} if type is not a HeaderFooterType/HeaderFooterVariant value or the section does not exist\n * @example\n * section.getHeader(); // default header\n * section.getHeader(HeaderFooterVariant.FIRST); // first-page header\n * section.getHeader(HeaderFooterVariant.EVEN); // even-page header\n */\n getHeader(type?: HeaderFooterType | HeaderFooterVariant): Promise<WordBody>;\n /**\n * Returns the footer area of this section.\n * - An area that does not exist yet is created on first content insertion.\n *\n * @param type - kind: HeaderFooterType (primary/firstPage/evenPages) or HeaderFooterVariant (default/first/even) (default: HeaderFooterType.PRIMARY)\n * @returns footer area of the given kind\n * @throws {Error} if type is not a HeaderFooterType/HeaderFooterVariant value or the section does not exist\n * @example\n * section.getFooter(); // default footer\n * section.getFooter(HeaderFooterVariant.FIRST); // first-page footer\n */\n getFooter(type?: HeaderFooterType | HeaderFooterVariant): Promise<WordBody>;\n /**\n * Returns the next section in document order.\n *\n * @returns the next section; null if this is the last section\n */\n getNext(): Promise<WordSection | null>;\n /**\n * Returns the previous section in document order.\n *\n * @returns the previous section; null if this is the first section\n */\n getPrevious(): Promise<WordSection | null>;\n /**\n * Returns the page setup of this section.\n * - Paper size and margins are returned in pt.\n *\n * @returns page setup of this section\n * @throws {Error} if the section does not exist\n */\n getPageSetup(): Promise<PageSetupInfo>;\n /**\n * Returns the column (multi-column) layout of this section.\n * - count, equalWidth, space and separator are always included; widths is added only when the column widths differ.\n * - A single column is always reported as equal width, so the result is { count: 1, equalWidth: true, space, separator } with no widths.\n * - The return value can be passed to setColumns() as is.\n *\n * @returns column layout (same shape as the setColumns input)\n * @throws {Error} if the section does not exist\n */\n getColumns(): Promise<ColumnLayout>;\n /**\n * Sets the paper size and orientation of this section.\n * - Specify a paper preset or a width/height in pt. Unspecified dimensions are kept.\n * - When an orientation is given, width and height are aligned to it. Changing only the preset keeps the current orientation.\n *\n * @param size - paper dimensions (pt; an omitted axis keeps its current value) or a paper preset name (A3/A4/A5/Letter/Legal/Executive). null keeps the size (changes orientation only)\n * @param orientation - orientation (portrait/landscape)\n * @throws {Error} if the section does not exist, the preset or orientation is invalid, a dimension is negative, or both size and orientation are omitted\n * @example\n * section.setPageSize(PaperSize.A4); // paper preset (keeps current orientation)\n * section.setPageSize(PaperSize.A4, PageOrientation.LANDSCAPE); // preset + landscape\n * section.setPageSize({ width: 595.3, height: 841.9 }); // explicit dimensions (pt — A4)\n * section.setPageSize({ width: 900 }); // change width only (keeps height)\n * section.setPageSize(null, PageOrientation.PORTRAIT); // change orientation only (keeps size)\n */\n setPageSize(size: Size | PaperSize | null, orientation?: PageOrientation): Promise<void>;\n /**\n * Sets the page margins of this section.\n * - Only the specified sides are changed; the unit is pt.\n *\n * @param margins - margins (pt)\n * @throws {Error} if the section does not exist, margins is not an object, or a margin is negative\n * @example\n * section.setPageMargin({ top: 72, bottom: 72 }); // top/bottom only (pt; other sides kept)\n * section.setPageMargin({ left: 120, right: 120, header: 48, footer: 48 }); // left/right + header/footer margins\n */\n setPageMargin(margins: PageMargins): Promise<void>;\n /**\n * Enables a separate header/footer for the first page of this section.\n * - Does nothing if the value equals the current one. After enabling, enter the first-page content separately.\n * - Check the setting via getPageSetup().titlePage.\n *\n * @param enabled - enable (true) / disable (false)\n * @throws {Error} if the section does not exist or enabled is not a boolean\n * @example\n * section.setTitlePage(true); // separate first-page header/footer\n * section.setTitlePage(false); // remove the distinction\n */\n setTitlePage(enabled: boolean): Promise<void>;\n /**\n * Changes the page numbering settings of this section.\n * - Only the specified fields are changed; null removes the whole setting. Does nothing if the value equals the current one.\n * - Check the setting via getPageSetup().pageNumber.\n *\n * @param options - page numbering settings, or null (remove)\n * @throws {Error} if the section does not exist or start/formatType is invalid\n * @example\n * section.setPageNumbering({ start: 1 }); // start the section's page numbers at 1\n * section.setPageNumbering({ formatType: NumberFormat.UPPER_ROMAN }); // roman numerals\n * section.setPageNumbering(null); // remove page numbering settings\n */\n setPageNumbering(options: PageNumbering | null): Promise<void>;\n /**\n * Changes the break type of this section (continuous, next page, etc.). Does nothing if the value equals the current one.\n * - Same as the value read via getPageSetup().breakType.\n *\n * @param type - break type (continuous/nextPage/evenPage/oddPage)\n * @throws {Error} if type is not a SectionBreakType value or the section does not exist\n * @example\n * section.setBreakType(SectionBreakType.CONTINUOUS); // continue from the previous section\n * section.setBreakType(SectionBreakType.NEXT_PAGE); // start on the next page\n */\n setBreakType(type: SectionBreakType): Promise<void>;\n /**\n * Changes the column (multi-column) layout of this section.\n * - Only the specified fields are changed; the rest keep their current values. Does nothing if the value equals the current one. The unit is pt.\n * - To give each column a different width, specify widths; otherwise all columns share the same width. When count is 1, equalWidth and widths are ignored.\n * - Check the setting via getColumns(); its return value can be passed back as is.\n *\n * @param layout - column layout\n * @throws {Error} if the section does not exist, layout is not an object, count is missing or not an integer in 1~12, or the columns are unequal but the number of widths differs from count\n * @example\n * section.setColumns({ count: 2 }); // two equal columns\n * section.setColumns({ count: 3, separator: true }); // three equal columns + separator line\n * section.setColumns({ count: 1 }); // remove columns (single column)\n * section.setColumns({ count: 2, widths: [{ width: 300 }, { width: 200 }] }); // individual widths (unequal)\n * section.setColumns(section.getColumns()); // write back the read value (no change)\n */\n setColumns(layout: ColumnLayout): Promise<void>;\n /**\n * Removes the break of this section and merges it with the next section.\n * - The last section has no break to remove.\n *\n * @throws {Error} if this is the last section or the section does not exist\n */\n deleteBreak(): Promise<void>;\n }\n\n /**\n * Gets and edits the content and formatting of a single paragraph.\n * - Provides text, table, shape and image insertion, text and paragraph formatting, list editing and deletion.\n * - Use getRange() to get and edit a specific character range within the paragraph.\n */\n export interface WordParagraph {\n /**\n * Returns the paragraph ID.\n *\n * @returns paragraph ID\n */\n getId(): Promise<string>;\n /**\n * Returns the text of the paragraph.\n * - Character positions computed from the returned text are used as the offset of insertText() or the character positions of getRange().\n * - A tab is represented as \"\\t\", line/page/column breaks as \"\\n\", and objects such as footnotes and shapes as the single character \"\\uFFFC\".\n * - The line break that marks the end of the paragraph is not included.\n *\n * @returns the concatenated text of the characters in the paragraph (\"\" if none)\n * @throws {Error} if the paragraph does not exist in the document\n * @example\n * const text = para.getText(); // \"Cherry\\uFFFCQuality\" — the footnote takes one slot\n * const at = text.indexOf(\"Quality\");\n * para.getRange(at, at + 7).insertText(\"Status\", { replace: true }); // replace only the found span\n */\n getText(): Promise<string>;\n /**\n * Returns the structure information of this paragraph.\n * - Includes index, type, paragraph ID, area ID and text.\n *\n * @returns a list containing this single paragraph entry\n * @throws {Error} if the paragraph does not exist in the document\n */\n getStructure(): Promise<{ paragraphs: { index: number; type: string; id: string; storyId: string; text: string }[] }>;\n /**\n * Returns the content of this paragraph as HTML with formatting.\n * - The paragraph is represented as a <p> element.\n *\n * @returns HTML of this paragraph and the paragraph count\n * @throws {Error} if the paragraph does not exist in the document\n */\n getContentHtml(): Promise<{ html: string; paragraphCount: number }>;\n /**\n * Inserts text into the paragraph or replaces the entire paragraph content.\n * - Formatting is preserved. To change or reset formatting, use setTextFormat(), clearFormat() or setStyle() on the returned range.\n *\n * @param text - text to insert\n * @param options - insert/replace options\n * @param options.offset - character position within the paragraph (0-based); takes precedence over position\n * @param options.position - append position (when offset is absent). start (paragraph start) | end (paragraph end) (default: InsertAt.START)\n * @param options.replace - if true, replaces the entire paragraph content with the new text (position arguments ignored) (default: false)\n * @returns range of the text just inserted (or replaced, when replacing)\n * @throws {Error} if the paragraph does not exist in the document or the offset/position combination is invalid\n * @example\n * para.insertText(\"hello\"); // append at paragraph start (default)\n * para.insertText(\"world\", { position: InsertAt.END }); // append at paragraph end\n * para.insertText(\"X\", { offset: 3 }); // insert at the 3rd character position\n * para.insertText(\"new text\", { replace: true }); // replace the entire paragraph\n */\n insertText(text: string, options?: { offset?: number; position?: InsertAt; replace?: boolean }): Promise<WordRange>;\n /**\n * Inserts a shape of the given preset into the paragraph.\n * - After insertion, use the returned shape to set formatting and placement.\n *\n * @param preset - base shape of the shape (e.g. \"rect\", \"ellipse\", \"roundRect\")\n * @param options - shape insertion options\n * @param options.width - width (pt) (default: 75)\n * @param options.height - height (pt) (default: 75)\n * @param options.offset - character position within the paragraph (0-based); takes precedence over position\n * @param options.position - insertion position (when offset is absent). start (paragraph start) | end (paragraph end) (default: InsertAt.START)\n * @returns the inserted shape\n * @throws {Error} if preset is not a ShapePreset value, width/height is not positive, or the insertion position is invalid\n * @example\n * para.insertShape(ShapePreset.RECT); // 100x100 rectangle at paragraph start (default)\n * para.insertShape(ShapePreset.ELLIPSE, { offset: 3 }); // insert at the 3rd character position\n * para.insertShape(ShapePreset.RECT, { position: InsertAt.END }); // insert at paragraph end\n */\n insertShape(preset: ShapePreset, options?: { width?: number; height?: number; offset?: number; position?: InsertAt }): Promise<WordShape>;\n /**\n * Inserts a text box into the paragraph.\n *\n * @param options - text box insertion options\n * @param options.width - width (pt) (default: 75)\n * @param options.height - height (pt) (default: 75)\n * @param options.text - initial content text\n * @param options.offset - character position within the paragraph (0-based); takes precedence over position\n * @param options.position - insertion position (when offset is absent). start (paragraph start) | end (paragraph end) (default: InsertAt.START)\n * @returns creation result (shape: shape object / storyId: text box area ID / paragraphId: first paragraph ID)\n * @throws {Error} if width/height is not positive or text is not a string\n * @example\n * para.insertTextbox({ text: \"Notice\" }); // insert a text box\n * para.insertTextbox({ width: 200, height: 100, offset: 3 }); // specify size and position\n */\n insertTextbox(options?: { width?: number; height?: number; text?: string; offset?: number; position?: InsertAt }): Promise<{ shape: WordShape; storyId: string; paragraphId: string }>;\n /**\n * Inserts an image into the paragraph, placed inline like a character.\n * - Processed asynchronously regardless of the image source.\n *\n * @param options - image insertion options (exactly one source among src/url/base64 is required)\n * @param options.src - path of an already uploaded image\n * @param options.url - image URL (uploaded first, then inserted)\n * @param options.base64 - base64 data (uploaded first, then inserted)\n * @param options.width - width (pt) (default: original size)\n * @param options.height - height (pt) (default: original size)\n * @param options.offset - character position within the paragraph (0-based); takes precedence over position\n * @param options.position - insertion position (when offset is absent). start (paragraph start) | end (paragraph end) (default: InsertAt.START)\n * @returns the inserted image\n * @throws {Error} if exactly one source (src/url/base64) is not specified, the insertion position is invalid, or the image download/upload fails (Promise reject)\n * @example\n * await para.insertImage({ url: \"https://example.com/image.png\" }); // insert an external image\n * await para.insertImage({ src: imagePath, width: 200, offset: 3 }); // specify size and position of an uploaded image\n */\n insertImage(options: { src?: string; url?: string; base64?: string; width?: number; height?: number; offset?: number; position?: InsertAt }): Promise<WordImage>;\n /**\n * Inserts a web video into the paragraph, placed inline like a character.\n * - Supports YouTube and 3DS 3DEXPERIENCE URLs and is processed asynchronously.\n * - Uses a fallback image if the preview image cannot be fetched.\n *\n * @param url - web video URL (YouTube / 3DS 3DEXPERIENCE)\n * @param options - web video insertion options\n * @param options.width - width (pt) (default: original thumbnail size)\n * @param options.height - height (pt) (default: original thumbnail size)\n * @param options.offset - character position within the paragraph (0-based); takes precedence over position\n * @param options.position - insertion position (when offset is absent). start (paragraph start) | end (paragraph end) (default: InsertAt.START)\n * @returns the inserted web video image object\n * @throws {Error} if url is missing or unsupported, the insertion position is invalid, or both the preview and fallback image uploads fail (Promise reject)\n * @example\n * await para.insertWebVideo(videoUrl); // insert a video from a supported URL\n * await para.insertWebVideo(videoUrl, { width: 320, height: 180, position: InsertAt.END }); // specify size at paragraph end\n */\n insertWebVideo(url: string, options?: { width?: number; height?: number; offset?: number; position?: InsertAt }): Promise<WordImage>;\n /**\n * Inserts a line break into the paragraph.\n * - Breaks the line while keeping the paragraph, like Shift+Enter.\n *\n * @param options - insertion position options\n * @param options.offset - character position within the paragraph (0-based); a position past the end of the paragraph is adjusted to the paragraph end. takes precedence over position\n * @param options.position - insertion position (when offset is absent). start (paragraph start) | end (paragraph end) (default: InsertAt.START)\n * @throws {Error} if the paragraph does not exist in the document or position is not \"start\" or \"end\"\n * @example\n * para.insertLineBreak(); // line break at paragraph start\n * para.insertLineBreak({ offset: 3 }); // line break at the given character position\n */\n insertLineBreak(options?: { offset?: number; position?: InsertAt }): Promise<void>;\n /**\n * Inserts a tab character into the paragraph.\n * - Tab stop positions are set separately with setTabs().\n *\n * @param options - insertion position options\n * @param options.offset - character position within the paragraph (0-based); a position past the end of the paragraph is adjusted to the paragraph end. takes precedence over position\n * @param options.position - insertion position (when offset is absent). start (paragraph start) | end (paragraph end) (default: InsertAt.START)\n * @throws {Error} if the paragraph does not exist in the document or position is not \"start\" or \"end\"\n * @example\n * para.insertTab(); // insert a tab at paragraph start\n * para.insertTab({ position: InsertAt.END }); // insert a tab at paragraph end\n */\n insertTab(options?: { offset?: number; position?: InsertAt }): Promise<void>;\n /**\n * Inserts a symbol into the paragraph.\n * - font not specified: inserts the Unicode character as plain text.\n * - font specified: inserts the symbol glyph of that font.\n *\n * @param charCode - Unicode code point (hex string \"2605\" | \"0x2605\" | number 0x2605)\n * @param options - symbol insertion options\n * @param options.font - if specified, inserts the symbol glyph of that font\n * @param options.offset - character position within the paragraph (0-based); takes precedence over position\n * @param options.position - insertion position (when offset is absent). start (paragraph start) | end (paragraph end) (default: InsertAt.START)\n * @throws {Error} if charCode is not a valid code point or the insertion position is invalid\n * @example\n * para.insertSymbol(\"2605\"); // insert ★ at paragraph start\n * para.insertSymbol(\"F0FC\", { font: \"Wingdings\" }); // Wingdings check mark symbol\n */\n insertSymbol(charCode: string | number, options?: { font?: string; offset?: number; position?: InsertAt }): Promise<void>;\n /**\n * Inserts a section break at the paragraph position to create a new section.\n * - Section breaks can only be inserted in the body (not in header/footer/text box).\n *\n * @param type - start type of the new section (continuous: continues / nextPage: from the next page / evenPage: from the next even page / oddPage: from the next odd page)\n * @param options - insertion position options\n * @param options.offset - character position within the paragraph (0-based); takes precedence over position\n * @param options.position - insertion position (when offset is absent). start (paragraph start) | end (paragraph end) (default: InsertAt.START)\n * @throws {Error} if the area is outside the body, type is not a SectionBreakType value, or the insertion position is invalid\n * @example\n * para.insertSectionBreak(SectionBreakType.NEXT_PAGE); // break at paragraph start (default)\n * para.insertSectionBreak(SectionBreakType.CONTINUOUS, { position: InsertAt.END }); // break at paragraph end\n * para.insertSectionBreak(SectionBreakType.CONTINUOUS, { offset: 5 }); // break at the 5th character position\n */\n insertSectionBreak(type: SectionBreakType, options?: { offset?: number; position?: InsertAt }): Promise<void>;\n /**\n * Inserts a page break into the paragraph.\n * - The following content starts on the next page. Can only be inserted in the body.\n *\n * @param options - insertion position options\n * @param options.offset - character position within the paragraph (0-based); takes precedence over position\n * @param options.position - insertion position (when offset is absent). start (paragraph start) | end (paragraph end) (default: InsertAt.START)\n * @throws {Error} if the area is outside the body or the insertion position is invalid\n * @example\n * para.insertPageBreak(); // page break at paragraph start\n * para.insertPageBreak({ offset: 3 }); // break at the given character position\n */\n insertPageBreak(options?: { offset?: number; position?: InsertAt }): Promise<void>;\n /**\n * Inserts a column break into the paragraph.\n * - The following content starts in the next column, or on the next page if the section has a single column. Can only be inserted in the body.\n *\n * @param options - insertion position options\n * @param options.offset - character position within the paragraph (0-based); takes precedence over position\n * @param options.position - insertion position (when offset is absent). start (paragraph start) | end (paragraph end) (default: InsertAt.START)\n * @throws {Error} if the area is outside the body or the insertion position is invalid\n * @example\n * para.insertColumnBreak(); // column break at paragraph start\n * para.insertColumnBreak({ position: InsertAt.END }); // break at paragraph end\n */\n insertColumnBreak(options?: { offset?: number; position?: InsertAt }): Promise<void>;\n /**\n * Inserts a footnote at the paragraph position.\n *\n * @param text - initial text of the footnote content (default: empty footnote)\n * @param options - insertion position options\n * @param options.offset - character position within the paragraph (0-based); takes precedence over position\n * @param options.position - insertion position (when offset is absent). start (paragraph start) | end (paragraph end) (default: InsertAt.START)\n * @returns the created footnote object\n * @throws {Error} if text is not a string or the insertion position is invalid\n * @example\n * para.insertFootnote(\"Source: report\"); // insert a footnote at paragraph start\n * para.insertFootnote(\"Additional note\", { offset: 3 }); // insert at the given character position\n */\n insertFootnote(text?: string, options?: { offset?: number; position?: InsertAt }): Promise<WordNote>;\n /**\n * Inserts an endnote at the paragraph position.\n *\n * @param text - initial text of the endnote content (default: empty endnote)\n * @param options - insertion position options\n * @param options.offset - character position within the paragraph (0-based); takes precedence over position\n * @param options.position - insertion position (when offset is absent). start (paragraph start) | end (paragraph end) (default: InsertAt.START)\n * @returns the created endnote object\n * @throws {Error} if text is not a string or the insertion position is invalid\n * @example\n * para.insertEndnote(\"References\"); // insert an endnote at paragraph start\n * para.insertEndnote(\"Further note\", { position: InsertAt.END }); // insert at paragraph end\n */\n insertEndnote(text?: string, options?: { offset?: number; position?: InsertAt }): Promise<WordNote>;\n /**\n * Inserts a new paragraph above or below this paragraph, or splits the paragraph at the given character position.\n * - The new paragraph inherits this paragraph's direct paragraph formatting such as alignment, spacing and indentation.\n * - To reset the inherited direct formatting, call clearFormat() on the returned paragraph.\n *\n * @param text - text of the new paragraph (empty string creates an empty paragraph — a pure split when offset is given)\n * @param options - insertion options\n * @param options.offset - splits at the character position within the paragraph (0-based); the following content is preserved as the new paragraph. a position past the end of the paragraph is adjusted to the paragraph end. position is ignored when specified\n * @param options.position - for sibling insertion, \"before\" (above) / \"after\" (below) relative to this paragraph (default: InsertAt.AFTER)\n * @returns the newly created paragraph object\n * @throws {Error} if the paragraph does not exist in the document or position is not \"before\" or \"after\"\n * @example\n * para.insertParagraph(\"below\"); // add below this paragraph\n * para.insertParagraph(\"above\", { position: InsertAt.BEFORE }); // add above this paragraph\n * para.insertParagraph(\"\", { offset: 3 }); // split the paragraph at the 3rd character position (following content preserved)\n */\n insertParagraph(text: string, options?: { offset?: number; position?: InsertAt }): Promise<WordParagraph>;\n /**\n * Inserts a table above or below this paragraph, or splits the paragraph at a character position and inserts the table between the parts.\n * - Cannot be inserted inside a table cell (nested tables are not supported — an error is thrown if the insertion point is inside a cell).\n *\n * @param rows - number of rows\n * @param columns - number of columns\n * @param options - insertion options\n * @param options.offset - splits at the character position within the paragraph (0-based) and inserts the table between the parts; the following content is preserved as a new paragraph. position is ignored when specified\n * @param options.position - for sibling insertion, \"before\" (above) / \"after\" (below) relative to this paragraph (default: InsertAt.AFTER)\n * @param options.values - cell values to fill right after creation (2D array; an error is thrown before execution if it exceeds the table size)\n * @returns the inserted table object\n * @throws {Error} if rows/columns are not integers 1 or greater, values exceeds the table size, the reference paragraph does not exist, or the insertion point is inside a table cell (nested tables are not supported)\n * @example\n * para.insertTable(3, 4); // 3x4 table below this paragraph\n * para.insertTable(2, 2, { position: InsertAt.BEFORE }); // insert above this paragraph\n * para.insertTable(2, 2, { offset: 3 }); // split at the 3rd character position and insert between the parts\n * para.insertTable(2, 2, { values: [[\"a\", \"b\"], [\"c\", \"d\"]] }); // fill cells on creation\n */\n insertTable(rows: number, columns: number, options?: { offset?: number; position?: InsertAt; values?: string[][] }): Promise<WordTable>;\n /**\n * Applies text formatting to the entire text of the paragraph.\n *\n * @param options - text formatting to apply\n * @throws {Error} if the paragraph does not exist in the document\n * @example\n * para.setTextFormat({ bold: true }); // make all text in the paragraph bold\n * para.setTextFormat({ size: 12, color: \"#FF0000\" }); // set size and color\n */\n setTextFormat(options: TextFormat): Promise<void>;\n /**\n * Resets the text formatting and paragraph formatting of the entire paragraph.\n *\n * @throws {Error} if the paragraph does not exist in the document\n */\n clearFormat(): Promise<void>;\n /**\n * Sets this paragraph as the on-screen selection.\n * - Does not change document content.\n *\n * @param mode - \"select\" (entire paragraph) / \"start\" (cursor at paragraph start) / \"end\" (cursor at paragraph end) (default: SelectionMode.SELECT)\n * @throws {Error} if the paragraph does not exist in the document\n * @example\n * para.select(); // select the entire paragraph\n * para.select(SelectionMode.END); // place the cursor at paragraph end\n */\n select(mode?: SelectionMode): Promise<void>;\n /**\n * Applies the given paragraph formatting to this paragraph.\n * - Only the specified fields are changed. Text formatting is set with setTextFormat().\n *\n * @param options - paragraph formatting to apply\n * @throws {Error} if the paragraph does not exist in the document\n * @example\n * para.setParagraphFormat({ align: TextAlign.CENTER }); // center alignment\n * para.setParagraphFormat({ lineSpacing: 1.5, spaceAfter: 10 }); // 1.5x line spacing, 10pt space after paragraph\n * para.setParagraphFormat({ leftIndent: 20, align: null }); // 20pt left indent, remove alignment\n */\n setParagraphFormat(options: ParagraphFormat): Promise<void>;\n /**\n * Sets the border of this paragraph.\n * - Uses the same Border format as cell borders.\n *\n * @param border - border value\n * @throws {Error} if the border value is invalid or the paragraph does not exist in the document\n * @example\n * para.setParagraphBorder({ location: BorderLocation.ALL, style: BorderStyle.SOLID, color: \"#0000FF\", width: 1 }); // blue solid line on all four sides and between paragraphs\n * para.setParagraphBorder({ location: BorderLocation.BOTTOM, style: BorderStyle.DOUBLE, color: \"#000000\", width: 2 }); // double line on the bottom only\n * para.setParagraphBorder({ location: BorderLocation.ALL, style: BorderStyle.NONE, color: \"#000000\", width: 0 }); // remove borders\n */\n setParagraphBorder(border: Border): Promise<void>;\n /**\n * Sets the tab stop positions of this paragraph.\n * - Replaces the existing setting with the given array; an empty array removes all tab stops.\n *\n * @param tabs - array of tab stops\n * @throws {Error} if the tabs value is invalid or the paragraph does not exist in the document\n * @example\n * para.setTabs([{ position: 72, alignment: TabAlignment.LEFT }]); // left-aligned tab at 72pt (1 inch)\n * para.setTabs([]); // remove all tab stops\n */\n setTabs(tabs: TabStop[]): Promise<void>;\n /**\n * Applies a style to this paragraph.\n * - Applying a style resets the existing direct formatting.\n * - A paragraph style is applied to the paragraph; a character style is applied to the entire text of the paragraph.\n *\n * @param style - Style enum for built-in styles (value = key), or the style value from getStyles() for custom document styles. null removes the style (reverts to default)\n * @throws {Error} if the paragraph does not exist in the document or the style does not exist in the document\n * @example\n * para.setStyle(Style.HEADING_1); // Heading 1 paragraph style\n * para.setStyle(\"MyCustomStyle\"); // custom document style (key obtained from getStyles)\n * para.setStyle(null); // remove the style (revert to default)\n */\n setStyle(style: Style | string | null): Promise<void>;\n /**\n * Adjusts indent/outdent by one level.\n * - For a list paragraph the list level moves; otherwise the paragraph's left indent moves.\n * - Even for the first item of a list, only that item's level moves.\n *\n * @param type - \"indent\"|\"outdent\"\n * @throws {Error} if type is not an IndentType value or the paragraph does not exist in the document\n * @example\n * para.setIndent(IndentType.INDENT); // indent one level\n * para.setIndent(IndentType.OUTDENT); // outdent one level\n */\n setIndent(type: IndentType): Promise<void>;\n /**\n * Returns the range for the given character position span within this paragraph.\n *\n * @param startOffset - start character position (0-based) (default: paragraph start)\n * @param endOffset - end character position (default: paragraph end)\n * @returns range object bound to the offset span within the paragraph\n * @example\n * para.getRange(); // range of the paragraph content\n * para.getRange(0, 5); // range of characters 0 to 5\n * para.getRange(3); // from the 3rd character to paragraph end\n */\n getRange(startOffset?: number, endOffset?: number): Promise<WordRange>;\n /**\n * Returns the list of comments overlapping this paragraph's range.\n *\n * @returns list of comments\n */\n getComments(): Promise<WordComment[]>;\n /**\n * Returns the list of change tracking entries overlapping this paragraph.\n *\n * @returns list of change tracking entries\n */\n getChangeTrackings(): Promise<WordChangeTracking[]>;\n /**\n * Accepts all change tracking entries overlapping this paragraph.\n *\n * @returns processing result\n */\n acceptChangeTrackings(): Promise<{ processedCount: number; remainingCount: number; failedIds: string[] }>;\n /**\n * Rejects all change tracking entries overlapping this paragraph.\n *\n * @returns processing result\n */\n rejectChangeTrackings(): Promise<{ processedCount: number; remainingCount: number; failedIds: string[] }>;\n /**\n * Returns the list of footnotes/endnotes in this paragraph.\n *\n * @returns list of footnotes and endnotes\n */\n getNotes(): Promise<WordNote[]>;\n /**\n * Returns the list of footnotes in this paragraph.\n *\n * @returns list of footnotes\n */\n getFootnotes(): Promise<WordNote[]>;\n /**\n * Returns the list of endnotes in this paragraph.\n *\n * @returns list of endnotes\n */\n getEndnotes(): Promise<WordNote[]>;\n /**\n * Returns the immediately preceding paragraph.\n * - Returns null if the preceding element is not a paragraph (e.g. a table) or does not exist. Does not cross section boundaries.\n *\n * @returns the previous paragraph; null if none or the preceding element is not a paragraph\n * @throws {Error} if the paragraph does not exist in the document\n */\n getPreviousSibling(): Promise<WordParagraph | null>;\n /**\n * Returns the immediately following paragraph.\n * - Returns null if the following element is not a paragraph (e.g. a table) or does not exist. Does not cross section boundaries.\n *\n * @returns the next paragraph; null if none or the following element is not a paragraph\n * @throws {Error} if the paragraph does not exist in the document\n */\n getNextSibling(): Promise<WordParagraph | null>;\n /**\n * Returns the area (body/header/footer, etc.) this paragraph belongs to.\n *\n * @returns the area this paragraph belongs to\n * @throws {Error} if the paragraph does not exist in the document\n */\n getParentBody(): Promise<WordBody>;\n /**\n * Returns the nearest table this paragraph belongs to.\n * - Returns null for a paragraph outside a table. For nested tables, returns the inner table.\n *\n * @returns the parent table object; null if outside a table\n * @throws {Error} if the paragraph does not exist in the document\n */\n getParentTable(): Promise<WordTable | null>;\n /**\n * Returns the nearest table cell this paragraph belongs to.\n * - Returns null for a paragraph outside a cell. For nested tables, returns the inner cell.\n *\n * @returns the parent cell object; null if outside a cell\n * @throws {Error} if the paragraph does not exist in the document\n */\n getParentTableCell(): Promise<WordTableCell | null>;\n /**\n * Applies the given list format to this paragraph.\n * - When applied to an existing list, items at the same level of the same list change as well.\n * - Applying a multilevel list affects the entire list.\n * - After applying, change the list level with setLevel() on the list obtained from getList().\n *\n * @param listType - list type to apply. Choose from the built-in bullet, numbered and multilevel lists.\n * @throws {Error} if listType is not a ListType value or the paragraph does not exist in the document\n * @example\n * para.setList(ListType.BULLET_CIRCLE); // circle bullet ●\n * para.setList(ListType.NUMBER_CIRCLED); // circled number ①\n * para.setList(ListType.MULTILEVEL_NESTED_NUMBER); // multilevel 1 / 1.1 / 1.1.1\n */\n setList(listType: ListType): Promise<void>;\n /**\n * Returns the list of this paragraph.\n * - Used to change the list level and restart numbering.\n *\n * @returns list handle; null if the paragraph is not a list item\n * @throws {Error} if the paragraph does not exist in the document\n * @example\n * const list = para.getList();\n * if (list) {\n * list.setLevel(IndentType.INDENT); // one level deeper\n * list.restartNumbering(); // restart numbering from this paragraph\n * }\n */\n getList(): Promise<WordList | null>;\n /**\n * Removes the list from this paragraph.\n * - To remove lists from multiple paragraphs at once, use clearList of WordRange.\n *\n * @throws {Error} if the paragraph does not exist in the document\n */\n clearList(): Promise<void>;\n /**\n * Deletes the paragraph.\n * - If no other paragraph follows, keeps the paragraph and deletes only its characters.\n *\n * @throws {Error} if the paragraph does not exist in the document\n */\n delete(): Promise<void>;\n }\n\n /**\n * Reads and edits content within a specified range of the document.\n * - Provides text and paragraph formatting, content insertion, search, list editing, and deletion.\n * - Handles ranges obtained from document coordinates, the selection, or getRange() of a paragraph, footnote, etc. in the same way.\n * - Ranges obtained from the selection or a footnote marker position use the position at call time.\n */\n export interface WordRange {\n /**\n * Returns the start/end positions of this range as paragraph coordinates.\n * - Ranges created without coordinates, such as the selection, cursor, or a footnote marker, also have their current position computed and returned.\n * The return shape matches the `getRange` argument, so passing it back recreates the same range.\n *\n * @returns start/end paragraph IDs, character offsets, and area ID\n * @throws {Error} if the range position cannot be resolved (no selection, etc.)\n * @example\n * range.getLocation(); // get the start/end paragraphs and character positions\n * doc.getSelection().getLocation(); // get the coordinates of the current selection\n */\n getLocation(): Promise<{ startParaId: string; startOffset: number; endParaId: string; endOffset: number; storyId: string }>;\n /**\n * Returns the text contained in this range.\n * - Paragraph boundaries are separated by \"\\n\". Within a single paragraph, add getLocation().startOffset to a character position in the returned text to get the paragraph character position.\n * - This calculation cannot be used for ranges spanning multiple paragraphs.\n * - Tabs are represented as \"\\t\", line/page/column breaks as \"\\n\", and objects such as footnotes and shapes as the single character \"\".\n *\n * @returns range text (\"\" for an empty range/cursor)\n * @throws {Error} if the range position cannot be resolved\n * @example\n * range.getText(); // get the text of this range\n * doc.getSelection().getText(); // get the selected text\n */\n getText(): Promise<string>;\n /**\n * Checks whether this range is empty, with the same start and end.\n * - Returns true for a cursor-only range, and false for a range containing selected characters or a search result.\n *\n * @returns true if the range is empty\n * @throws {Error} if the range position cannot be resolved (no selection, etc.)\n * @example\n * doc.getRange({ startParaId: id, startOffset: 3, endOffset: 3 }).isCollapsed(); // empty range: true\n * doc.getRange({ startParaId: id, startOffset: 0, endOffset: 5 }).isCollapsed(); // character range: false\n */\n isCollapsed(): Promise<boolean>;\n /**\n * Returns the paragraph/table structure spanned by this range.\n * - Contains, in document order, everything from the start paragraph to the end paragraph (including tables in between).\n *\n * @returns list of paragraph and table entries spanned by the range\n * @throws {Error} if the range position cannot be resolved\n */\n getStructure(): Promise<{ paragraphs: { index: number; type: string; id: string; storyId: string; text?: string; rows?: number; columns?: number }[] }>;\n /**\n * Returns the paragraph content spanned by this range as HTML with formatting.\n * - Includes paragraphs from the start to the end paragraph in document order; paragraphs inside tables are also represented as <p> elements.\n *\n * @returns range HTML and paragraph count\n * @throws {Error} if the range position cannot be resolved\n */\n getContentHtml(): Promise<{ html: string; paragraphCount: number }>;\n /**\n * Finds text or special characters (page break/column break/line break/tab/symbol) within this range and returns editable ranges.\n *\n * @param query - a string searches text; a `{ character }` object searches special characters\n * @param options - text search options (ignored for special character search)\n * @param options.caseSensitive - case-sensitive matching (default: false)\n * @param options.wholeWord - whole-word search (a match is accepted only when bounded by whitespace, punctuation, or a document boundary) (default: false)\n * @returns list of matched ranges within this range (empty array if none)\n * @throws {Error} if query is missing or malformed, the special character is unsupported, or the range position cannot be resolved\n * @example\n * range.search(\"hello\"); // plain text search within this range\n * range.search(\"Hello\", { caseSensitive: true }); // case-sensitive matching\n * range.search(\"cat\", { wholeWord: true }); // only the standalone word \"cat\" (excludes cat in catalog)\n * range.search({ character: SpecialCharacter.TAB }); // find tab characters\n * const hits = range.search(\"draft\"); // only matches fully contained in this range\n * hits.forEach((hit) => hit.setTextFormat({ bold: true })); // returned ranges are directly editable\n */\n search(query: string | { character: SpecialCharacter }, options?: { caseSensitive?: boolean; wholeWord?: boolean }): Promise<WordRange[]>;\n /**\n * Applies text formatting to the range.\n *\n * @param options - text formatting to apply (only the specified fields change; passing null instead of a value removes that property and reverts to style inheritance)\n * @throws {Error} if the range position cannot be resolved\n * @example\n * range.setTextFormat({ bold: true }); // bold\n * range.setTextFormat({ size: 12, color: \"#FF0000\" }); // set size and color together\n * range.setTextFormat({ bold: null }); // remove the bold property (restore inheritance)\n */\n setTextFormat(options: TextFormat): Promise<void>;\n /**\n * Resets the text formatting and paragraph formatting of the range.\n * - Paragraph formatting is reset only for paragraphs whose paragraph mark falls inside the range.\n *\n * @throws {Error} if the range position cannot be resolved\n */\n clearFormat(): Promise<void>;\n /**\n * Applies a style to this range.\n * - Existing direct formatting is reset. A paragraph style applies to the paragraphs spanned by the range; a character style applies to the range text.\n *\n * @param style - built-in styles use the Style enum (value = key); custom document styles use the style value from getStyles(). null removes the character style only, leaving the paragraph style in place\n * @throws {Error} if the range position cannot be resolved or the style does not exist in the document\n * @example\n * range.setStyle(Style.HEADING_1); // apply the Heading 1 style\n * range.setStyle(null); // remove the character style (the paragraph style stays)\n */\n setStyle(style: Style | string | null): Promise<void>;\n /**\n * Deletes the text of the range.\n *\n * @throws {Error} if the range position cannot be resolved\n */\n delete(): Promise<void>;\n /**\n * Attaches a hyperlink to this range.\n * - With displayText, that text replaces the range text and carries the link; without it, the existing range text is linked as is.\n * - An empty range has no text to link, so displayText is required there.\n * - The link type is determined automatically from the url (web `http(s)://`, email `mailto:`, bookmark `#name`; https:// is assumed when no scheme is given).\n *\n * @param url - link destination\n * @param options - hyperlink options\n * @param options.tooltip - mouse-over tooltip (default: url)\n * @param options.displayText - text to show in place of the range text (required for an empty range)\n * @returns the inserted hyperlink, or null if the new id could not be identified\n * @throws {Error} if url is missing, or the range is empty and displayText is not specified\n * @example\n * range.insertHyperlink(\"https://example.com\"); // web link on the range text\n * doc.getSelection().insertHyperlink(\"mailto:a@b.com\", { displayText: \"Email\" }); // insert as new text at the cursor\n * range.insertHyperlink(\"#bookmark1\", { tooltip: \"Go to\" }); // bookmark link + tooltip\n */\n insertHyperlink(url: string, options?: { tooltip?: string; displayText?: string }): Promise<WordHyperlink | null>;\n /**\n * Returns the hyperlink attached to this range.\n * - The link at the start point is used; if there is none, the link at the end point is used. So a range spanning several links gives the one at the start.\n * - Only the two end points are examined — a link that lies entirely inside the range, touching neither point, is not found.\n *\n * @returns hyperlink object, or null if neither point has a link\n * @throws {Error} if the range position cannot be resolved\n */\n getHyperlink(): Promise<WordHyperlink | null>;\n /**\n * Applies paragraph formatting to the paragraphs spanned by this range.\n * - Only the specified fields change; null removes that property so the style's formatting applies.\n *\n * @param options - paragraph formatting to apply\n * @throws {Error} if the range position cannot be resolved\n * @example\n * range.setParagraphFormat({ align: TextAlign.CENTER }); // center alignment\n * range.setParagraphFormat({ lineSpacing: 1.5, spaceAfter: 10 }); // line spacing and space after the paragraph\n */\n setParagraphFormat(options: ParagraphFormat): Promise<void>;\n /**\n * Returns the text formatting and paragraph formatting at the start position of this range.\n * - Even if formatting varies within the range, the direct formatting at the start position is returned.\n *\n * @returns text and paragraph formatting at the start position (missing items are omitted)\n * @throws {Error} if the range position cannot be resolved\n */\n getFormat(): Promise<{ textFormat?: TextFormat; paragraphFormat?: ParagraphFormat }>;\n /**\n * Copies the style and formatting (text + paragraph) at the start position of this range to the target range.\n * - The source is read from the **start point only** of this range — even if the range spans multiple paragraphs, only the first paragraph's formatting is taken.\n * - For the same reason, paragraph formatting is applied only to the **first paragraph** of the target range.\n * - **If the target is an empty paragraph or a cursor, only paragraph formatting is applied and text formatting is not** — there are no characters to format,\n * and characters entered into that paragraph later do not follow the source text formatting.\n *\n * @param targetRange - range that receives the formatting\n * @throws {Error} if targetRange is not a WordRange or the range position cannot be resolved\n * @example\n * range.copyFormatTo(targetRange); // copy the formatting at the start position to the target range\n */\n copyFormatTo(targetRange: WordRange): Promise<void>;\n /**\n * Sets borders on the paragraphs spanned by this range.\n * - Uses the same Border format as cell borders; location specifies which sides to apply.\n *\n * @param border - border value (shared by paragraphs, cells, and pages)\n * @throws {Error} if the border's location, style, color, or width is invalid, or the range position cannot be resolved\n * @example\n * range.setParagraphBorder({ location: BorderLocation.ALL, style: BorderStyle.SOLID, color: \"#0000FF\", width: 1 }); // all four sides of the paragraphs in the range + lines between them\n * range.setParagraphBorder({ location: BorderLocation.TOP, style: BorderStyle.DOTTED, color: \"#888888\", width: 1 }); // dotted line on the top only\n */\n setParagraphBorder(border: Border): Promise<void>;\n /**\n * Sets the tab stops of the paragraphs spanned by this range.\n * - Replaces the existing setting with the given array; an empty array removes all tab stops.\n *\n * @param tabs - array of tab stops\n * @throws {Error} if the tabs value is invalid or the range position cannot be resolved\n * @example\n * range.setTabs([{ position: 96, alignment: TabAlignment.LEFT }]); // set tab stops on the paragraphs in the range\n * range.setTabs([]); // remove all tab stops\n */\n setTabs(tabs: TabStop[]): Promise<void>;\n /**\n * Adjusts the indent/outdent of the paragraphs spanned by the range by one step.\n * - For list paragraphs the list level moves; for non-list paragraphs the paragraph left margin moves.\n * - Even if the start paragraph is the first item of a list, only that item's level moves.\n *\n * @param type - \"indent\"|\"outdent\"\n * @throws {Error} if type is not an IndentType value or the range position cannot be resolved\n * @example\n * range.setIndent(IndentType.INDENT); // indent the paragraphs in the range\n * range.setIndent(IndentType.OUTDENT); // outdent the paragraphs in the range\n */\n setIndent(type: IndentType): Promise<void>;\n /**\n * Applies list formatting to the paragraphs spanned by this range.\n * - An empty range applies to the paragraph containing the cursor. If multiple paragraphs are included, all of them are affected.\n * - If the cursor is inside an existing list, items of the same list at the same level change too. Multi-level lists are updated as a whole.\n *\n * @param listType - list type to apply. Choose from the built-in bullet, numbered, and multi-level lists.\n * @throws {Error} if listType is missing or the range position cannot be resolved\n * @example\n * doc.getSelection().setList(ListType.NUMBER_DECIMAL); // number the selected paragraphs\n */\n setList(listType: ListType): Promise<void>;\n /**\n * Removes list formatting from the paragraphs spanned by the range.\n *\n * @throws {Error} if the range position cannot be resolved\n * @example\n * doc.getSelection().clearList(); // remove lists from the selected range\n */\n clearList(): Promise<void>;\n /**\n * Returns the start paragraph of this range.\n * - Use the returned paragraph to edit the content and formatting of the whole paragraph.\n * - A coordinate range is not checked here — if the paragraph ID does not exist, the error surfaces when the returned paragraph is used.\n *\n * @returns start paragraph object\n * @throws {Error} if the position of a selection or cursor range cannot be resolved\n */\n getParagraph(): Promise<WordParagraph>;\n /**\n * Returns the section containing the start position of this range.\n * - Returns null when the section cannot be determined outside the body, such as in headers and footers.\n *\n * @returns section object, or null if no body section is found\n * @throws {Error} if the range position cannot be resolved (no selection, etc.)\n */\n getParentSection(): Promise<WordSection | null>;\n /**\n * Returns the list of comments overlapping this range.\n *\n * @returns list of comments\n */\n getComments(): Promise<WordComment[]>;\n /**\n * Returns the list of change-tracking entries overlapping this range, in document order.\n *\n * @returns list of change-tracking entries\n */\n getChangeTrackings(): Promise<WordChangeTracking[]>;\n /**\n * Accepts all change-tracking entries overlapping this range.\n *\n * @returns processing result\n */\n acceptChangeTrackings(): Promise<{ processedCount: number; remainingCount: number; failedIds: string[] }>;\n /**\n * Rejects all change-tracking entries overlapping this range.\n *\n * @returns processing result\n */\n rejectChangeTrackings(): Promise<{ processedCount: number; remainingCount: number; failedIds: string[] }>;\n /**\n * Returns the list of footnotes and endnotes within this range.\n *\n * @returns list of footnotes and endnotes\n */\n getNotes(): Promise<WordNote[]>;\n /**\n * Returns the list of footnotes within this range.\n *\n * @returns list of footnotes\n */\n getFootnotes(): Promise<WordNote[]>;\n /**\n * Returns the list of endnotes within this range.\n *\n * @returns list of endnotes\n */\n getEndnotes(): Promise<WordNote[]>;\n /**\n * Returns the list of shapes, images, and charts within this range.\n * - Includes both inline shapes and shapes placed in front of or behind text.\n *\n * @returns list of shapes (pictures as WordImage, charts as WordChart; empty array if none)\n */\n getShapes(): Promise<(WordShape | WordImage | WordChart)[]>;\n /**\n * Returns the list of bookmarks whose markers lie within the range.\n *\n * @returns list of bookmarks (empty array if none)\n */\n getBookmarks(): Promise<WordBookmark[]>;\n /**\n * Returns the list of text hyperlinks overlapping this range.\n *\n * @returns list of hyperlinks (empty array if none)\n */\n getHyperlinks(): Promise<WordHyperlink[]>;\n /**\n * Inserts text into this range.\n * - replace not specified: inserts at one end point of the range (the original text remains even for a span). position determines which end.\n * - replace: true: replaces the range text with the new text (for a single point, inserts there; position is ignored).\n * Handles text only and leaves formatting as-is. Apply formatting changes separately to the returned range.\n *\n * @param text - text to insert\n * @param options - insert/replace options\n * @param options.position - relative to the range: \"before\" (start point, before the match) / \"after\" (end point, after the match). Ignored when replace:true. (default: InsertAt.BEFORE)\n * @param options.replace - if true, replaces the range text with the new text (position ignored)\n * @returns range of the newly inserted or replaced text (setTextFormat etc. can be applied to it directly)\n * @throws {Error} if the range position cannot be resolved or position is not before/after\n * @example\n * range.insertText(\"prepended\"); // insert at the range start\n * range.insertText(\"appended\", { position: InsertAt.AFTER }); // insert at the range end\n * range.insertText(\"new content\", { replace: true }); // replace the range content\n */\n insertText(text: string, options?: { position?: InsertAt; replace?: boolean }): Promise<WordRange>;\n /**\n * Sets this range as the on-screen selection.\n * - Does not change document content.\n *\n * @param mode - \"select\" (whole range) / \"start\" (cursor at the start point) / \"end\" (cursor at the end point) (default: SelectionMode.SELECT)\n * @throws {Error} if mode is not a SelectionMode value or the range position cannot be resolved\n * @example\n * range.select(); // select the whole range\n * range.select(SelectionMode.END); // place the cursor at the range end\n * doc.getSelection().select(SelectionMode.START); // collapse the current selection to a cursor at its start\n */\n select(mode?: SelectionMode): Promise<void>;\n /**\n * Inserts a new paragraph above or below the anchor paragraph of this range.\n * - The new paragraph inherits the anchor paragraph's direct paragraph formatting such as alignment, spacing, and indents.\n * - To reset the inherited direct formatting, call clearFormat() on the returned paragraph.\n *\n * @param text - text of the new paragraph\n * @param options - insert options\n * @param options.position - relative to the range paragraph: \"before\" (above) / \"after\" (below) (default: InsertAt.AFTER)\n * @returns the newly created paragraph\n * @throws {Error} if the anchor paragraph of the range cannot be found, or position is not \"before\" or \"after\"\n * @example\n * range.insertParagraph(\"new paragraph\"); // add below the range paragraph\n * range.insertParagraph(\"above\", { position: InsertAt.BEFORE }); // add above the range paragraph\n */\n insertParagraph(text: string, options?: { position?: InsertAt }): Promise<WordParagraph>;\n /**\n * Inserts a table relative to the paragraph of the range.\n * - Cannot insert inside a table cell (nested tables are not supported — an error occurs if the insertion point is inside a cell).\n *\n * @param rows - number of rows\n * @param columns - number of columns\n * @param options - insert options\n * @param options.position - relative to the range paragraph: \"before\" (above) / \"after\" (below) (default: InsertAt.AFTER)\n * @param options.values - cell values to fill right after creation (2D array; exceeding the table size raises an error before issuing)\n * @returns the inserted table\n * @throws {Error} if rows/columns are not 1 or greater, position is not \"before\" or \"after\", the anchor paragraph does not exist, or the insertion point is inside a table cell (nested tables are not supported)\n * @example\n * range.insertTable(3, 4); // 3x4 table below the range paragraph\n * range.insertTable(2, 2, { position: InsertAt.BEFORE }); // insert above the range paragraph\n * range.insertTable(2, 2, { values: [[\"a\", \"b\"], [\"c\", \"d\"]] }); // fill cells on creation\n */\n insertTable(rows: number, columns: number, options?: { position?: InsertAt; values?: string[][] }): Promise<WordTable>;\n /**\n * Inserts a shape of the given preset into the paragraph of this range.\n * - Use the returned shape to set formatting and placement.\n *\n * @param preset - basic shape of the shape (e.g. \"rect\", \"ellipse\", \"roundRect\")\n * @param options - size (pt; an omitted axis defaults to 75)\n * @returns the inserted shape\n * @throws {Error} if preset is not a ShapePreset value, width/height are not positive, or the range position cannot be resolved\n * @example\n * range.insertShape(ShapePreset.RECT); // insert a rectangle\n * range.insertShape(ShapePreset.ELLIPSE, { width: 200, height: 100 }); // ellipse with a specified size\n */\n insertShape(preset: ShapePreset, options?: Size): Promise<WordShape>;\n /**\n * Inserts a text box into the paragraph of the range.\n *\n * @param options - text box creation options (an omitted size axis defaults to 100; text is the initial content)\n * @returns creation result (shape: shape object / storyId: text box area ID / paragraphId: first paragraph ID)\n * @throws {Error} if width/height are not positive or text is not a string\n * @example\n * range.insertTextbox({ text: \"Notice\" }); // insert a text box\n * range.insertTextbox({ width: 200, height: 100, text: \"Description\" }); // specify size and content\n */\n insertTextbox(options?: Size & { text?: String }): Promise<{ shape: WordShape; storyId: string; paragraphId: string }>;\n /**\n * Inserts an image inline at the start position of this range.\n * - Processed asynchronously regardless of the image source.\n *\n * @param options - image insert options (exactly one source among src/url/base64 is required)\n * @param options.src - path of an already uploaded image\n * @param options.url - image URL (uploaded first, then inserted)\n * @param options.base64 - base64 data (uploaded first, then inserted)\n * @param options.width - width (pt). Required with src — the original size is only known for url/base64, which are measured on upload (default: original size)\n * @param options.height - height (pt). Required with src — the original size is only known for url/base64, which are measured on upload (default: original size)\n * @returns the inserted image\n * @throws {Error} if exactly one source (src/url/base64) is not specified, width/height are missing or not positive with src, the range position cannot be resolved, or the image download/upload fails (Promise reject)\n * @example\n * await range.insertImage({ url: \"https://example.com/image.png\" }); // insert an external image\n * await range.insertImage({ src: imagePath, width: 200, height: 150 }); // insert an uploaded image (size required)\n */\n insertImage(options: { src?: string; url?: string; base64?: string; width?: number; height?: number }): Promise<WordImage>;\n /**\n * Inserts a web video inline at the start position of this range.\n * - Supports YouTube and 3DS 3DEXPERIENCE URLs and is processed asynchronously.\n * - If the preview image cannot be fetched, a fallback image is used.\n *\n * @param url - web video URL (YouTube / 3DS 3DEXPERIENCE)\n * @param options - size (pt) (default: thumbnail original size)\n * @returns the inserted web video image object\n * @throws {Error} if url is missing or unsupported, the range position cannot be resolved, or both the preview and fallback image uploads fail (Promise reject)\n * @example\n * await range.insertWebVideo(videoUrl); // insert a video from a supported URL\n * await range.insertWebVideo(videoUrl, { width: 320, height: 180 }); // specify the size\n */\n insertWebVideo(url: string, options?: Size): Promise<WordImage>;\n /**\n * Inserts a line break at the start position of this range.\n * - Breaks the line while keeping the paragraph, like Shift+Enter.\n *\n * @throws {Error} if the range position cannot be resolved\n * @example\n * range.insertLineBreak(); // line break at the range start\n */\n insertLineBreak(): Promise<void>;\n /**\n * Inserts a tab character at the start position of this range.\n * - Tab stop positions are set separately with setTabs().\n *\n * @throws {Error} if the range position cannot be resolved\n * @example\n * range.insertTab(); // insert a tab at the range start\n */\n insertTab(): Promise<void>;\n /**\n * Inserts a symbol at the start position of this range.\n * - font not specified: inserts the Unicode character as plain text.\n * - font specified: inserts it as a symbol glyph of that font.\n *\n * @param charCode - Unicode code point (hex string \"2605\" | \"0x2605\" | number 0x2605)\n * @param options - when font is specified, inserts the symbol in that font\n * @throws {Error} if charCode is not a valid code point or the range position cannot be resolved\n * @example\n * range.insertSymbol(\"2605\"); // insert the star symbol ★\n * range.insertSymbol(\"F0FC\", { font: \"Wingdings\" }); // check mark symbol in the specified font\n */\n insertSymbol(charCode: string | number, options?: { font?: string }): Promise<void>;\n /**\n * Inserts a section break at this range position to create a new section.\n * - Section breaks can only be inserted in the body (not in headers/footers/text boxes).\n *\n * @param type - start type of the new section (continuous: continues on the same page / nextPage: from the next page / evenPage: from the next even page / oddPage: from the next odd page)\n * @throws {Error} if the area is outside the body, type is not a SectionBreakType value, or the range position cannot be resolved\n * @example\n * doc.getSelection().insertSectionBreak(SectionBreakType.NEXT_PAGE); // next-page section break at the selection\n * doc.getBody().getRange(RangePosition.END).insertSectionBreak(SectionBreakType.CONTINUOUS); // continuous section break at the end of the document\n */\n insertSectionBreak(type: SectionBreakType): Promise<void>;\n /**\n * Inserts a page break at this range position.\n * - The following content starts on the next page. Can only be inserted in the body.\n *\n * @throws {Error} if the area is outside the body or the range position cannot be resolved\n * @example\n * doc.getSelection().insertPageBreak(); // page break at the selection\n * doc.getRange({ startParaId: id, startOffset: 5, endOffset: 5 }).insertPageBreak(); // break at the specified character position\n */\n insertPageBreak(): Promise<void>;\n /**\n * Inserts a column break at this range position.\n * - The following content starts in the next column, or on the next page if the section has a single column. Can only be inserted in the body.\n *\n * @throws {Error} if the area is outside the body or the range position cannot be resolved\n * @example\n * doc.getSelection().insertColumnBreak(); // column break at the selection\n * doc.getRange({ startParaId: id, startOffset: 5, endOffset: 5 }).insertColumnBreak(); // break at the specified character position\n */\n insertColumnBreak(): Promise<void>;\n /**\n * Inserts a bookmark at the start position of this range.\n * - If a bookmark with the same name exists, it is replaced. The name cannot start with a digit, special character, or space.\n *\n * @param name - bookmark name\n * @returns the inserted bookmark\n * @throws {Error} if name is missing or invalid, or the range position cannot be resolved\n * @example\n * range.insertBookmark(\"intro\"); // bookmark at the range start\n * doc.getSelection().insertBookmark(\"here\").goTo(); // insert and move there immediately\n */\n insertBookmark(name: string): Promise<WordBookmark>;\n /**\n * Inserts a comment on this range.\n *\n * @param text - comment body\n * @param options - author metadata\n * @returns the inserted comment\n * @throws {Error} if text is not a string or the range position cannot be resolved\n * @example\n * range.insertComment(\"Please check\"); // add a comment on the range\n * range.insertComment(\"Review note\", { authorName: \"Reviewer\", initials: \"RV\" }); // specify the author\n */\n insertComment(text: string, options?: { authorName?: string; initials?: string }): Promise<WordComment>;\n /**\n * Inserts a footnote at the end of this range.\n * - The marker is placed in the body and the content goes into the footnote area at the bottom of the page.\n *\n * @param text - initial text of the footnote content (default: empty footnote)\n * @returns the created footnote\n * @throws {Error} if text is not a string or the range position cannot be resolved\n * @example\n * range.insertFootnote(\"Source: report\"); // insert a footnote at the range end\n * para.getRange(5, 5).insertFootnote(\"Additional note\"); // insert a footnote at the specified character position\n */\n insertFootnote(text?: string): Promise<WordNote>;\n /**\n * Inserts an endnote at the end of this range.\n * - The marker is placed in the body and the content goes into the endnote area at the end of the document.\n *\n * @param text - initial text of the endnote content (default: empty endnote)\n * @returns the created endnote\n * @throws {Error} if text is not a string or the range position cannot be resolved\n * @example\n * range.insertEndnote(\"Reference\"); // insert an endnote at the range end\n * doc.getSelection().insertEndnote(\"Further details\"); // insert an endnote at the end of the selection\n */\n insertEndnote(text?: string): Promise<WordNote>;\n }\n\n /**\n * Changes the level and numbering restart position of a paragraph that belongs to a list.\n * - Obtained via WordParagraph.getList(); returns null for a paragraph that is not in a list.\n * - To apply a new list format, use setList() on a paragraph or range.\n */\n export interface WordList {\n /**\n * Changes the list level of this paragraph.\n * - Moves one level at a time with IndentType, or sets the target level with a 0-based number.\n * - Even on the first item of the list, only this paragraph's level changes. The change can be undone in one step.\n * - If the given level is deeper than the list supports, moves to the last level of that list.\n * - To remove the list, use clearList() on the paragraph or range.\n *\n * @param value - \"indent\" (one level in) | \"outdent\" (one level out) | target level (integer 0~8)\n * @throws {Error} if value is neither an IndentType value nor an integer 0~8, or the paragraph is not in the document\n * @example\n * list.setLevel(IndentType.INDENT); // 1 → 1.1\n * list.setLevel(2); // set to level 2\n * list.setLevel(0); // to the outermost level (list kept)\n * list.setLevel(8); // innermost level (maximum allowed)\n */\n setLevel(value: IndentType | number): Promise<void>;\n /**\n * Restarts numbering from this paragraph.\n *\n * @throws {Error} if the paragraph is not in the document\n * @example\n * para.getList().restartNumbering(); // restart list numbering from this paragraph\n */\n restartNumbering(): Promise<void>;\n }\n\n /**\n * Gets and edits the structure of a table and the content and formatting of its cells.\n * - Provides row/column insertion and deletion, cell merging and splitting, and size, alignment, border, and padding settings.\n * - Use getRow() and getCell() to access a row or cell, and specify a cell range to edit multiple cells together.\n */\n export interface WordTable {\n /**\n * Returns the table ID.\n *\n * @returns table ID\n */\n getId(): Promise<string>;\n /**\n * Returns the number of rows in the table.\n *\n * @returns number of rows in the table\n */\n getRowCount(): Promise<number>;\n /**\n * Returns the total number of columns in the table, including the columns occupied by merged cells.\n *\n * @returns total number of columns in the table, taking merges into account\n */\n getColumnCount(): Promise<number>;\n /**\n * Returns the row at the given position.\n *\n * @param rowIndex - row index (0-based)\n * @returns the row at that index\n */\n getRow(rowIndex: number): Promise<WordTableRow>;\n /**\n * Returns the cell at the given position.\n *\n * @param rowIndex - row index (0-based)\n * @param columnIndex - column index (0-based)\n * @returns the cell at that row and column\n */\n getCell(rowIndex: number, columnIndex: number): Promise<WordTableCell>;\n /**\n * Replaces the content of multiple cells with text from a 2D array.\n * - Puts values[r][c] into row r, column c. Cells not covered by the array and cells whose value is null or undefined are left unchanged.\n * - Throws if the array exceeds the table size.\n *\n * @param values - array of values per row (rows may have different column lengths)\n * @throws {Error} if the table does not exist, values is not an array, or the array exceeds the table size\n * @example\n * table.setValues([[\"Name\", \"Score\"], [\"John\", \"95\"]]); // fill 2x2\n * table.setValues([[null, \"Changed\"]]); // update only the second cell of the first row (null is skipped)\n */\n setValues(values: string[][]): Promise<void>;\n /**\n * Deletes the table.\n *\n * @throws {Error} if the table is not in the document\n */\n delete(): Promise<void>;\n /**\n * Sets the horizontal position of the table within the page.\n * - Set the horizontal alignment of cell content with setParagraphFormat() on the cell paragraph, and vertical alignment with setCellVerticalAlignment().\n *\n * @param align - horizontal position \"left\" | \"center\" | \"right\"\n * @throws {Error} if align is not a TableAlign value or the table is not in the document\n * @example\n * table.setAlignment(TableAlign.CENTER); // center the table on the page\n */\n setAlignment(align: TableAlign): Promise<void>;\n /**\n * Sets the widths of all columns in the table.\n * - The array length must equal the total number of columns. Columns with null keep their current width.\n * - Values smaller than the minimum width are raised to the minimum.\n *\n * @param widths - array of column widths (pt). A null slot keeps the current value\n * @throws {Error} if widths is not an array, its length differs from the column count, or a value is not positive\n * @example\n * table.setColumnWidths([120, 200, 80]); // set each of 3 columns in pt\n * table.setColumnWidths([100, null, null]); // change only the first column, keep the rest\n */\n setColumnWidths(widths: (number | null)[]): Promise<void>;\n /**\n * Sets the row heights of the table row by row.\n * - The array length must equal the number of rows. Rows with null keep their current height.\n *\n * @param heights - array of row heights (pt). A null slot keeps the current value\n * @throws {Error} if heights is not an array, its length differs from the row count, or a value is not positive\n * @example\n * table.setRowHeights([30, 30, 60]); // set height per row\n * table.setRowHeights([null, 40, null]); // change only the second row\n */\n setRowHeights(heights: (number | null)[]): Promise<void>;\n /**\n * Makes the widths of the target columns equal.\n * - Divides the total width of the target columns evenly while preserving it; other columns are unchanged.\n *\n * @param range - target column range. Only the column span (col/colSpan) is used (default: whole table)\n * @throws {Error} if the table does not exist or range is invalid\n * @example\n * table.distributeColumns(); // distribute all column widths evenly\n * table.distributeColumns({ col: 0, colSpan: 2 }); // distribute only the first two columns evenly\n */\n distributeColumns(range?: CellRange): Promise<void>;\n /**\n * Sets the target rows to the same given height.\n *\n * @param height - row height (pt, positive)\n * @param range - target row range. Only the row span (row/rowSpan) is used (default: whole table)\n * @throws {Error} if height is not positive, the table does not exist, or range is invalid\n * @example\n * table.setRowHeight(30); // set all rows of the table to 30pt\n * table.setRowHeight(45, { row: 0, rowSpan: 2 }); // set only the first two rows to 45pt\n */\n setRowHeight(height: number, range?: CellRange): Promise<void>;\n /**\n * Inserts a new row before or after the reference row.\n *\n * @param rowIndex - reference row index (0-based)\n * @param position - insert position \"before\" (above the reference row) | \"after\" (below the reference row) (default: InsertAt.AFTER)\n * @returns the newly created row\n * @throws {Error} if the table does not exist, rowIndex is missing, or it is out of range\n * @example\n * const row = table.insertRow(0); // add below the first row\n * table.insertRow(0, InsertAt.BEFORE).getCell(0).setText(\"Header\"); // add at the very top and fill it right away\n */\n insertRow(rowIndex: number, position?: InsertAt): Promise<WordTableRow>;\n /**\n * Deletes a row.\n *\n * @param rowIndex - index of the row to delete (0-based)\n */\n deleteRow(rowIndex: number): Promise<void>;\n /**\n * Inserts a new column to the left or right of the reference column.\n * - Access the cells of the new column by passing row and column indices to getCell().\n *\n * @param columnIndex - reference column index (0-based)\n * @param position - insert position \"before\" (left of the reference column) | \"after\" (right of the reference column) (default: InsertAt.AFTER)\n * @throws {Error} if the table does not exist, columnIndex is missing, or it is out of range\n * @example\n * table.insertColumn(0); // add to the right of the first column\n * table.getCell(0, 1).setText(\"Header\"); // fill the first cell of the new column\n */\n insertColumn(columnIndex: number, position?: InsertAt): Promise<void>;\n /**\n * Deletes a column.\n *\n * @param columnIndex - index of the column to delete (0-based)\n */\n deleteColumn(columnIndex: number): Promise<void>;\n /**\n * Merges a cell range.\n *\n * @param range - target cell range (anchor + count; at least one of rowSpan/colSpan must be 2 or more)\n * @throws {Error} if both rowSpan and colSpan are 1 or less, or range is invalid\n * @example\n * table.mergeCells({ row: 0, col: 0, colSpan: 2 }); // merge two columns of the first row horizontally\n * table.mergeCells({ row: 1, col: 1, rowSpan: 2, colSpan: 2 }); // merge a 2×2 rectangular range\n */\n mergeCells(range: CellRange): Promise<void>;\n /**\n * Splits the merged cells within the given range.\n *\n * @param range - target cell range (omit the counts for a single cell)\n * @example\n * table.unmergeCells({ row: 0, col: 0 }); // split the specified merged cell\n */\n unmergeCells(range: CellRange): Promise<void>;\n /**\n * Sets the background color of a cell range.\n *\n * @param range - target cell range (anchor + count)\n * @param color - background color (hex \"#RRGGBB\"; null or \"\" removes it)\n * @example\n * table.setCellBackgroundColor({ row: 0, col: 0 }, \"#FFEB3B\"); // single cell\n * table.setCellBackgroundColor({ row: 0, col: 0, colSpan: 3 }, null); // remove background of the first 3 columns\n */\n setCellBackgroundColor(range: CellRange, color: string | null): Promise<void>;\n /**\n * Sets the vertical alignment of a cell range.\n *\n * @param range - target cell range (anchor + count)\n * @param align - vertical alignment \"top\" | \"center\" | \"bottom\"\n * @example\n * table.setCellVerticalAlignment({ row: 0, col: 0, colSpan: 2 }, CellVerticalAlign.CENTER); // vertically center the first two cells\n */\n setCellVerticalAlignment(range: CellRange, align: CellVerticalAlign): Promise<void>;\n /**\n * Sets the inner padding of the given cell range.\n *\n * @param range - target cell range (anchor + count)\n * @param padding - padding on 4 sides (pt; only the specified sides change)\n * @example\n * table.setCellPadding({ row: 0, col: 0 }, { top: 4, bottom: 4 }); // top and bottom only\n * table.setCellPadding({ row: 0, col: 0, rowSpan: 2 }, { left: 8, right: 8 }); // left and right only, two rows\n */\n setCellPadding(range: CellRange, padding: Padding): Promise<void>;\n /**\n * Sets the borders of a cell range.\n *\n * @param range - target cell range (anchor + count)\n * @param border - border value (shared by paragraph/cell/page — see the Border typedef of WordRange.setParagraphBorder for field definitions)\n * @example\n * table.setCellBorder({ row: 0, col: 0 }, { location: BorderLocation.ALL, style: BorderStyle.SOLID, color: \"#000000\", width: 1 }); // 1pt solid line on all four sides of the cell\n */\n setCellBorder(range: CellRange, border: Border): Promise<void>;\n }\n\n /**\n * Gets a single table row and inserts or deletes adjacent rows.\n * - Use getCell()/getCells() to access the cells in the row.\n * - Use getIndex() to check the row position and getTable() to get the table this row belongs to.\n */\n export interface WordTableRow {\n /**\n * Returns the table this row belongs to.\n *\n * @returns the table this row belongs to\n */\n getTable(): Promise<WordTable>;\n /**\n * Returns the row index.\n *\n * @returns 0-based row index\n */\n getIndex(): Promise<number>;\n /**\n * Returns the list of cells in this row.\n * - Returned in column order, including merged cells.\n *\n * @returns cells in column order\n */\n getCells(): Promise<WordTableCell[]>;\n /**\n * Returns the cell at the given column in this row.\n *\n * @param columnIndex - 0-based column index\n * @returns the cell at that column\n */\n getCell(columnIndex: number): Promise<WordTableCell>;\n /**\n * Deletes this row.\n */\n delete(): Promise<void>;\n /**\n * Inserts a new row above or below this row.\n *\n * @param position - insert position: \"before\" (above) | \"after\" (below) (default: InsertAt.AFTER)\n * @returns the newly created row\n * @throws {Error} if the table does not exist or the row index is out of range\n * @example\n * row.insertSibling(); // insert below the current row\n * row.insertSibling(InsertAt.BEFORE); // insert above the current row\n */\n insertSibling(position?: InsertAt): Promise<WordTableRow>;\n }\n\n /**\n * Fills a single table cell with content and sets its formatting.\n * - Sets the background color, vertical alignment, inner padding and borders.\n * - Use setText() to replace the text of the first paragraph, and getParagraph()/getParagraphs() to read the text or edit it in detail.\n */\n export interface WordTableCell {\n /**\n * Returns the table this cell belongs to.\n *\n * @returns the table this cell belongs to\n */\n getTable(): Promise<WordTable>;\n /**\n * Returns the row index.\n *\n * @returns 0-based row index\n */\n getRow(): Promise<number>;\n /**\n * Returns the column index.\n *\n * @returns 0-based column index\n */\n getColumn(): Promise<number>;\n /**\n * Returns all paragraphs in the cell, in order.\n *\n * @returns array of paragraphs inside the cell (empty array if the cell is empty)\n */\n getParagraphs(): Promise<WordParagraph[]>;\n /**\n * Returns the paragraph at the given index inside the cell.\n * - Use the returned paragraph to read its text and edit its content and formatting.\n *\n * @param index - 0-based paragraph index (default: 0)\n * @returns the paragraph, or null if none\n */\n getParagraph(index?: number): Promise<WordParagraph | null>;\n /**\n * Replaces the text of the first paragraph in the cell with the given text.\n * - Only the first paragraph is changed; the other paragraphs of the cell are left as they are.\n *\n * @param text - text to set\n * @throws {Error} if the table does not exist or the cell coordinates are out of range\n * @example\n * cell.setText(\"New content\"); // replace the text of the first paragraph\n * cell.setText(\"\"); // clear the text of the first paragraph\n */\n setText(text: string): Promise<void>;\n /**\n * Sets the cell background color.\n *\n * @param color - \"#RRGGBB\" hex color; null/\"\" removes the background\n * @example\n * cell.setBackgroundColor(\"#FFEB3B\"); // yellow background\n * cell.setBackgroundColor(null); // remove background\n */\n setBackgroundColor(color: string | null): Promise<void>;\n /**\n * Sets the vertical alignment of the cell.\n *\n * @param align - \"top\" | \"center\" | \"bottom\"\n * @example\n * cell.setVerticalAlignment(CellVerticalAlign.CENTER); // vertically center\n */\n setVerticalAlignment(align: CellVerticalAlign): Promise<void>;\n /**\n * Sets the inner padding of the cell.\n * - Only the specified sides are changed.\n *\n * @param padding - padding for the four sides\n * @example\n * cell.setPadding({ left: 8, right: 8 }); // set only left/right padding to 8pt\n */\n setPadding(padding: Padding): Promise<void>;\n /**\n * Sets the cell border.\n *\n * @param border - border value\n * @example\n * cell.setBorder({ location: BorderLocation.BOTTOM, style: BorderStyle.SOLID, color: \"#000000\", width: 1 }); // solid bottom border\n */\n setBorder(border: Border): Promise<void>;\n }\n\n /**\n * Gets and edits the content and formatting of a shape or text box.\n * - Sets size, position and wrap, fill and line, hyperlink, text and inner margins, or deletes the shape.\n * - Obtained via WordDocument.getShape() or getShapes().\n */\n export interface WordShape {\n /**\n * Returns the range of the position the shape occupies.\n * - The shape occupies a single character position, so start = end.\n *\n * @returns range of the shape position (errors at use time if the shape does not exist)\n * @example\n * word.getShape(id).getRange().getLocation(); // { startParaId, startOffset, ... }\n */\n getRange(): Promise<WordRange>;\n /**\n * Returns the text area inside the shape.\n *\n * @returns text area container, null if the shape is not a text box\n * @throws {Error} if the shape does not exist in the document\n */\n getBody(): Promise<WordBody | null>;\n /**\n * Returns the current fill settings of the shape.\n * - The return value can be passed to setFill() as-is.\n * - A theme color fill or a radial gradient fill returns only type, so passing such a value back to setFill() fails.\n *\n * @returns fill information (same shape as the setFill input), null if there is no fill information\n * @throws {Error} if the shape does not exist in the document\n */\n getFill(): Promise<ShapeFill | null>;\n /**\n * Returns the current line settings of the shape.\n * - The return value can be passed to setLine() as-is.\n *\n * @returns line information (same shape as the setLine input), null if there is no line information\n * @throws {Error} if the shape does not exist in the document\n */\n getLine(): Promise<ShapeLine | null>;\n /**\n * Returns the hyperlink information attached to the shape.\n * - A shape can have one hyperlink.\n *\n * @returns link information, null if none. For a bookmark, url=\"#name\" and anchor=\"name\"\n * @throws {Error} if the shape does not exist in the document\n * @example\n * const link = shape.getHyperlink();\n * if (link) { shape.updateHyperlink({ url: \"https://new.com\" }); } // update if present\n */\n getHyperlink(): Promise<{ url: string; tooltip: string | null; linkType: HyperlinkType; anchor?: string } | null>;\n /**\n * Changes the size of the shape.\n * - Specify at least one of width or height. The size of the unspecified dimension is kept.\n *\n * @param options - new size (pt). Each field is optional, at least one required; omitted axes keep their current value\n * @throws {Error} if the shape does not exist, both width and height are omitted, or a given value is not positive\n * @example\n * shape.resize({ width: 200, height: 100 }); // change width and height together\n * shape.resize({ width: 200 }); // change width only (height kept)\n */\n resize(options: Size): Promise<void>;\n /**\n * Changes the wrap mode of the shape.\n * - Switches between inline with text and in front of / behind text.\n *\n * @param wrap - \"inline\"|\"infront\"|\"behind\"\n * @throws {Error} if the shape does not exist or wrap is not a ShapeWrap value\n * @example\n * shape.setWrap(ShapeWrap.INLINE); // inline with text\n * shape.setWrap(ShapeWrap.INFRONT); // in front of text\n * shape.setWrap(ShapeWrap.BEHIND); // behind text\n */\n setWrap(wrap: ShapeWrap): Promise<void>;\n /**\n * Changes the z-order of a shape placed in front of or behind text.\n * - Specifying the same position for a shape already at the very front or back makes no change.\n *\n * @param order - \"front\"|\"back\"|\"forward\"|\"backward\"\n * @throws {Error} if the shape does not exist, order is not a ShapeZOrder value, or the shape is inline (z-order applies only to shapes in front of / behind text)\n * @example\n * shape.setZOrder(ShapeZOrder.FRONT); // bring to front\n * shape.setZOrder(ShapeZOrder.BACKWARD); // send backward one step\n */\n setZOrder(order: ShapeZOrder): Promise<void>;\n /**\n * Changes the position of a shape placed in front of or behind text.\n * - x and y are pt coordinates relative to relativeFromH and relativeFromV; unspecified fields are kept.\n * - A reference point must be given together with its coordinate, because changing the reference point changes the meaning of the coordinate.\n * - If anchorParagraphId is given, the shape moves to that paragraph; otherwise only the position within the current paragraph changes.\n *\n * @param options - move options (x/y in pt). Omitted fields keep their current value\n * @throws {Error} if the shape does not exist, all fields are omitted, x or y is not a number, a relativeFrom value is invalid, the shape is inline, a reference point is given without its coordinate, the current position of an omitted axis is not a coordinate (aligned or percentage based), or the target paragraph does not exist or is outside the body\n * @example\n * shape.move({ x: 100, y: 50 }); // move coordinates only, keeping the current reference points\n * shape.move({ x: 0, relativeFromH: PositionRelativeFromH.PAGE }); // move while changing the horizontal reference to the page\n * shape.move({ anchorParagraphId: \"p1\", x: 30, y: 30 }); // re-anchor to another paragraph\n */\n move(options: { x?: number; y?: number; relativeFromH?: PositionRelativeFromH; relativeFromV?: PositionRelativeFromV; anchorParagraphId?: string }): Promise<void>;\n /**\n * Sets the shape fill.\n * - For blipFill, give image as one of { src } (file name already uploaded to the server) / { url } (external image address) / { base64 }.\n * url and base64 are uploaded to the server first and then applied, so the result must be awaited in every case — always call with await.\n * - The input has the same shape as the getFill() return value (ShapeFill), so a read value can be re-applied as-is.\n *\n * @param fill - fill information (type determines which fields are valid)\n * @returns no return value\n * @throws {Error} if the shape does not exist, type/color/sub-fields are invalid, or the image upload fails (Promise reject)\n * @example\n * await shape.setFill({ type: FillType.SOLID, color: \"#FF0000\" }); // solid color\n * await shape.setFill({ type: FillType.NONE }); // remove fill\n * await shape.setFill({ type: FillType.GRADIENT, stops: [{ position: 0, color: \"#FFFFFF\" }, { position: 100, color: \"#000000\" }], angle: 90 }); // gradient\n * await shape.setFill({ type: FillType.IMAGE, image: { url: \"https://example.com/a.png\" } }); // external image (uploaded first)\n */\n setFill(fill: ShapeFill): Promise<void>;\n /**\n * Sets the shape line.\n * - Omitted = no change, null (color/dash/compound) = remove. null or a non-number for width is rejected (no \"remove\" meaning).\n *\n * @param options - line options. Omitted = no change, null for color/dash/compound = remove\n * @throws {Error} if the shape does not exist, all fields are omitted, a value is invalid, or width is not a number ≥ 0\n * @example\n * shape.setLine({ color: \"#000000\", width: 2 }); // black 2pt line\n * shape.setLine({ dash: LineDash.DASH }); // change dash style only\n * shape.setLine({ color: null }); // remove line\n */\n setLine(options: ShapeLine): Promise<void>;\n /**\n * Sets a hyperlink on the shape.\n * - Replaces an existing link if present. Web address, email and bookmark are distinguished by URL format; a web address without a protocol gets https:// prepended.\n *\n * @param url - link destination\n * @param options - additional options\n * @param options.tooltip - mouse-over tooltip (default: url)\n * @throws {Error} if the shape does not exist, url is not a string or is an empty string, or the shape is a web video (its link slot holds the playback address)\n * @example\n * shape.insertHyperlink(\"https://example.com\"); // web link\n * shape.insertHyperlink(\"mailto:a@b.com\", { tooltip: \"Send mail\" }); // email + tooltip\n * shape.insertHyperlink(\"#bookmark1\"); // bookmark within the document\n */\n insertHyperlink(url: string, options?: { tooltip?: string }): Promise<void>;\n /**\n * Updates the address or tooltip of the hyperlink attached to the shape.\n * - Throws if there is no existing link. Unspecified fields are kept.\n *\n * @param options - items to update (at least one of url/tooltip)\n * @param options.url - new URL (web `http(s)://` · email `mailto:` · bookmark `#name`) (default: current value)\n * @param options.tooltip - new tooltip (default: current value)\n * @throws {Error} if the shape does not exist, there is no hyperlink, or no field to change is given\n * @example\n * shape.updateHyperlink({ url: \"https://new.com\" }); // change link target only\n * shape.updateHyperlink({ tooltip: \"Description\" }); // change tooltip only\n */\n updateHyperlink(options: { url?: string; tooltip?: string }): Promise<void>;\n /**\n * Removes the hyperlink from the shape.\n * - The shape itself is kept. Use getHyperlink() to check whether a link exists.\n *\n * @throws {Error} if the shape does not exist or has no hyperlink\n * @example\n * if (shape.getHyperlink()) { shape.removeHyperlink(); } // remove only if present\n */\n removeHyperlink(): Promise<void>;\n /**\n * Replaces the text content of the shape.\n * - For a plain shape, a new text area is created. Throws for shapes that cannot hold text, such as images.\n * - An empty string clears the content.\n *\n * @param text - text to fill in (\"\" clears the content)\n * @throws {Error} if the shape does not exist, text is not a string, or the shape cannot hold text (e.g. an image)\n * @example\n * shape.setText(\"Notice text\"); // set or replace text\n * shape.setText(\"\"); // clear content\n */\n setText(text: string): Promise<void>;\n /**\n * Sets the vertical alignment of the shape text.\n * - Applies only to shapes with a text area. If there is none, add text first with setText().\n *\n * @param align - \"top\"|\"middle\"|\"bottom\"\n * @throws {Error} if the shape does not exist, has no text area, or align is not a TextVerticalAlign value\n * @example\n * shape.setTextVerticalAlign(TextVerticalAlign.MIDDLE); // vertically centered\n */\n setTextVerticalAlign(align: TextVerticalAlign): Promise<void>;\n /**\n * Sets the inner margins of the shape text area.\n * - Specifies all four margins of a shape that has a text area.\n *\n * @param options - four margins (pt, each ≥ 0)\n * @throws {Error} if the shape does not exist, has no text area, or a value is not a number ≥ 0\n * @example\n * shape.setTextMargin({ left: 6, top: 6, right: 6, bottom: 6 }); // 6pt margin on all four sides\n */\n setTextMargin(options: { left: number; top: number; right: number; bottom: number }): Promise<void>;\n /**\n * Deletes the shape.\n * - Both inline shapes and shapes placed in front of or behind text can be deleted.\n *\n * @throws {Error} if the shape does not exist in the document\n */\n delete(): Promise<void>;\n }\n\n /**\n * Edits the size, position, wrap, and hyperlink of an image in the document.\n * - Edit or delete the image with the methods provided by WordShape.\n * - To insert an image, use insertImage() on a paragraph or range.\n */\n export interface WordImage extends WordShape {\n }\n\n /**\n * Gets and edits the type and formatting of a chart.\n * - Sets the type, style, title, axis titles, legend, data labels, and gridlines.\n * - Obtained via WordDocument.getChart() or getCharts().\n * - For size, position, and wrap changes and for deletion, use the methods provided by WordShape.\n */\n export interface WordChart extends WordShape {\n // ChartApiMixin\n /**\n * 차트 종류를 반환한다. ChartType 에 없는 종류는 \"unknown\" 을 반환한다.\n */\n getType(): Promise<string>;\n /**\n * 이 차트를 편집할 수 있는지 반환한다. 외부 데이터를 소스로 하는 차트는 조회만 되고 편집은 되지 않는다.\n */\n isEditable(): Promise<boolean>;\n /**\n * 차트 제목을 반환한다. 제목을 설정하지 않았으면 빈 문자열을 반환한다.\n */\n getTitle(): Promise<string>;\n /**\n * 지정한 축의 제목을 반환한다. 제목을 설정하지 않았으면 빈 문자열이고, 축 제목을 갖지 않는 차트 종류(원형 계열·도넛·방사형)는 null 을 반환한다.\n *\n * @param axis - 제목을 읽을 축(가로축 또는 세로축)\n */\n getAxisTitle(axis: ChartAxis): Promise<string | null>;\n /**\n * 범례 위치를 반환한다. 범례를 숨긴 차트는 \"none\" 이고, 위치를 알아낼 수 없는 차트는 \"right\" 로 보고한다.\n */\n getLegendPosition(): Promise<ChartLegendPosition>;\n /**\n * 데이터레이블 위치를 반환한다. 데이터레이블을 표시하지 않는 차트는 \"none\" 을 반환한다.\n */\n getDataLabelPosition(): Promise<ChartDataLabelPosition>;\n /**\n * 지정한 축의 눈금선 종류를 반환한다. 눈금선을 꺼 둔 축은 \"none\" 이고, 그 축의 눈금선을 갖지 않는 차트 종류(원형 계열·도넛은 양축, 방사형은 세로축)는 null 을 반환한다.\n *\n * @param axis - 눈금선을 읽을 축(가로축 또는 세로축)\n */\n getGridLine(axis: ChartAxis): Promise<ChartGridLineType | null>;\n /**\n * 차트의 서식 상태를 한 번에 반환한다. 각 값은 이름이 같은 조회 메서드와 같은 규약을 따른다. axisTitle 과 gridLine 의 null 은 그 차트 종류에 해당 축의 제목·눈금선이 아예 없다는 뜻이고, \"none\" 은 쓸 수는 있지만 꺼져 있다는 뜻이다.\n */\n getChartInfo(): Promise<{ type: string; title: string; legendPosition: ChartLegendPosition; dataLabelPosition: ChartDataLabelPosition; axisTitle: { horizontal: string | null; vertical: string | null }; gridLine: { horizontal: ChartGridLineType | null; vertical: ChartGridLineType | null } }>;\n /**\n * 차트 종류를 바꾼다. 지금 종류와 같은 값을 넘기면 아무것도 바뀌지 않는다.\n *\n * @param chartType - 바꿀 차트 종류(enum 문자열, 예: \"clustered_column\")\n */\n setType(chartType: ChartType): Promise<void>;\n /**\n * 차트의 프리셋 스타일을 바꾼다. 번호에 대응하는 실제 색은 문서 테마를 따른다.\n *\n * @param style - 스타일 번호(1~12 정수). 세 개씩 색 그룹이 나뉘고(1~3, 4~6, 7~9, 10~12), 한 그룹 안의 세 번호는 배경만 다르다(반투명 배경, 흰색 배경, 색상 배경과 계열 테두리 순)\n */\n setStyle(style: number): Promise<void>;\n /**\n * 차트 제목을 설정한다.\n *\n * @param title - 차트에 표시할 제목\n */\n setTitle(title: string): Promise<void>;\n /**\n * 지정한 축의 제목을 설정한다. 축 제목은 원형 계열·도넛·방사형을 뺀 차트 종류에서 지원한다.\n *\n * @param axis - 제목을 설정할 축(가로축 또는 세로축)\n * @param title - 축에 표시할 제목\n */\n setAxisTitle(axis: ChartAxis, title: string): Promise<void>;\n /**\n * 범례 위치를 설정한다. \"none\" 을 넘기면 범례를 숨긴다.\n *\n * @param position - 범례를 놓을 자리\n */\n setLegendPosition(position: ChartLegendPosition): Promise<void>;\n /**\n * 데이터레이블 위치를 설정한다. \"none\" 을 넘기면 데이터레이블을 숨긴다.\n * 쓸 수 있는 위치는 차트 종류마다 다르며, \"none\" 은 모든 종류에서 쓸 수 있다.\n *\n * @param position - 데이터레이블을 놓을 자리\n */\n setDataLabelPosition(position: ChartDataLabelPosition): Promise<void>;\n /**\n * 지정한 축의 눈금선을 설정한다. \"none\" 을 넘기면 그 축의 눈금선을 숨긴다.\n * 그 축의 눈금선을 갖지 않는 차트 종류(원형 계열·도넛은 양축, 방사형은 세로축)는 \"none\" 을 포함해 어떤 값을 넘겨도 오류가 발생한다.\n *\n * @param axis - 눈금선을 설정할 축(가로축 또는 세로축)\n * @param gridType - 표시할 눈금선 종류\n */\n setGridLine(axis: ChartAxis, gridType: ChartGridLineType): Promise<void>;\n // own\n /**\n * Returns the chart shape ID.\n *\n * @returns chart shape ID (permanent GUID)\n */\n getId(): Promise<string>;\n }\n\n /**\n * Looks up a bookmark identified by name, deletes it, or moves to its position.\n * - Bookmarks are obtained via WordDocument.getBookmark() or getBookmarks().\n * - New bookmarks are inserted with WordRange.insertBookmark().\n */\n export interface WordBookmark {\n /**\n * Returns the bookmark name.\n *\n * @returns bookmark name\n */\n getName(): Promise<string>;\n /**\n * Returns whether the bookmark exists.\n *\n * @returns true if it exists\n */\n exists(): Promise<boolean>;\n /**\n * Deletes the bookmark.\n *\n * @throws {Error} if no bookmark with the given name exists\n */\n delete(): Promise<void>;\n /**\n * Moves the cursor to the bookmark position.\n * - Does not change document content; does nothing if the bookmark does not exist.\n */\n goTo(): Promise<void>;\n /**\n * Returns the range at which the bookmark marker is placed.\n *\n * @returns marker position range\n * @example\n * word.getBookmark(\"intro\").getRange().getLocation(); // get the bookmark position\n * word.getBookmark(\"intro\").getRange().insertText(\"headerText\");\n */\n getRange(): Promise<WordRange>;\n }\n\n /**\n * Gets, updates or deletes a hyperlink attached to text.\n * - Gets the address, tooltip and type, and edits the link text via getRange().\n * - Links to web addresses, email addresses starting with mailto:, and bookmarks starting with #.\n * - For hyperlinks on shapes and images, use the hyperlink methods of WordShape.\n */\n export interface WordHyperlink {\n /**\n * Returns the hyperlink ID.\n *\n * @returns hyperlink ID, or null if not yet inserted\n */\n getId(): Promise<string | null>;\n /**\n * Returns whether the hyperlink exists.\n *\n * @returns true if it exists\n */\n exists(): Promise<boolean>;\n /**\n * Returns the link target address.\n * - Bookmarks are returned as \"#name\". Web addresses entered without a protocol are returned as \"https://…\".\n *\n * @returns destination url\n * @throws {Error} if no hyperlink with the given ID exists\n * @example\n * word.getHyperlinks().filter(link => link.getUrl().startsWith(\"http://\")); // pick out insecure links\n */\n getUrl(): Promise<string>;\n /**\n * Returns the link tooltip (the description shown on mouse hover).\n *\n * @returns tooltip, or null if not set\n * @throws {Error} if no hyperlink with the given ID exists\n */\n getTooltip(): Promise<string | null>;\n /**\n * Returns the link type.\n *\n * @returns link type (link/mailto/bookmark)\n * @throws {Error} if no hyperlink with the given ID exists\n */\n getLinkType(): Promise<HyperlinkType>;\n /**\n * Returns the range of the display text the link is attached to.\n * - The link start/end markers are not included. Editing the returned range changes only the text while keeping the link.\n *\n * @returns display text range\n * @example\n * word.getHyperlink(id).getRange().getText(); // text the link is attached to\n * word.getHyperlink(id).getRange().insertText(\"Shortcut\", { replace: true }); // replace only the text, keeping the link\n * word.getHyperlink(id).getRange().setTextFormat({ bold: true }); // format only the link text\n */\n getRange(): Promise<WordRange>;\n /**\n * Updates the hyperlink's address, tooltip and display text.\n * - Specify at least one field to change. Giving only url keeps the display text; giving displayText replaces it.\n *\n * @param options - update options (all fields optional, at least one required)\n * @param options.url - new URL (web `http(s)://` · email `mailto:` · bookmark `#name`) (default: current value)\n * @param options.tooltip - new tooltip (omitted: keeps the current tooltip, but becomes the new url when url is also changed)\n * @param options.displayText - new display text (if given, the visible text is replaced) (default: current value)\n * @throws {Error} if no field to change is given or the hyperlink does not exist\n * @example\n * link.update({ url: \"https://example.com\" }); // change only the link target\n * link.update({ url: \"mailto:a@b.com\", displayText: \"mail\" }); // replace target + display text\n * link.update({ tooltip: \"description\" }); // change only the tooltip\n */\n update(options: { url?: string; tooltip?: string; displayText?: string }): Promise<void>;\n /**\n * Deletes the hyperlink.\n * - The display text remains in the document.\n *\n * @throws {Error} if no hyperlink with the given ID exists\n */\n delete(): Promise<void>;\n }\n\n /**\n * Looks up a comment and edits its content or deletes it.\n * - Obtained via WordDocument.getComment() or getComments().\n * - Use getRange() to locate where the comment is attached and getBody() to edit the comment content.\n * - New comments are inserted with WordRange.insertComment().\n */\n export interface WordComment {\n /**\n * Returns the comment ID.\n *\n * @returns comment ID\n */\n getId(): Promise<string>;\n /**\n * Returns whether the comment exists.\n *\n * @returns true if it exists\n */\n exists(): Promise<boolean>;\n /**\n * Returns the body range the comment is attached to.\n *\n * @returns body range the comment is linked to\n */\n getRange(): Promise<WordRange>;\n /**\n * Returns the content area of the comment.\n *\n * @returns comment body area, null if none\n */\n getBody(): Promise<WordBody | null>;\n /**\n * Deletes the comment.\n *\n * @throws {Error} if no comment with the given ID exists\n */\n delete(): Promise<void>;\n }\n\n /**\n * Gets and updates the information and formatting defined in a style.\n * - Obtained via WordDocument.getStyle() or getStyles(). Lookups on an invalid style return null.\n * - To apply a style to the document, use setStyle() on a paragraph or range.\n */\n export interface WordStyle {\n /**\n * Returns the information and formatting defined directly on this style.\n * - Formatting from parent styles linked via basedOn is not included.\n * - textFormat and paragraphFormat can be reused to set text and paragraph formatting respectively. Character styles have no paragraphFormat.\n *\n * @returns null if none\n */\n getStyle(): Promise<(StyleInfo & { textFormat?: TextFormat, paragraphFormat?: ParagraphFormat }) | null>;\n /**\n * Returns the final style information including formatting inherited from parent styles.\n * - Returned in the same shape as getStyle(), with formatting inheritance via basedOn applied.\n *\n * @returns null if none\n */\n getResolvedStyle(): Promise<(StyleInfo & { textFormat?: TextFormat, paragraphFormat?: ParagraphFormat }) | null>;\n /**\n * Partially updates the formatting defined in the style.\n * - Only the specified fields are changed; the rest are kept. null removes the property so the parent style's formatting applies.\n * - Paragraph styles accept both text and paragraph formatting; character styles accept text formatting only.\n *\n * @param changes - formatting to change (partial, at least one)\n * @throws {Error} if no field to change is given, an unknown key is present, the style is invalid, or paragraphFormat is given for a character style\n * @example\n * style.update({ textFormat: { bold: true, color: \"#FF0000\" } }); // change text formatting only\n * style.update({ paragraphFormat: { align: TextAlign.CENTER } }); // change paragraph formatting only\n * style.update({ textFormat: { size: null } }); // remove property (revert to inherited)\n */\n update(changes: { textFormat?: TextFormat; paragraphFormat?: ParagraphFormat }): Promise<void>;\n }\n\n /**\n * Looks up a footnote or endnote and edits its content or deletes it.\n * - Use getRange() to locate the reference mark in the body and getBody() to edit the footnote/endnote content.\n * - New footnotes/endnotes are inserted with insertFootnote()/insertEndnote() on a paragraph or range.\n */\n export interface WordNote {\n /**\n * Returns the footnote/endnote ID.\n *\n * @returns footnote/endnote ID\n */\n getId(): Promise<string>;\n /**\n * Returns whether the footnote/endnote exists.\n *\n * @returns true if it exists\n */\n exists(): Promise<boolean>;\n /**\n * Returns the body range at which the footnote/endnote reference mark is placed.\n *\n * @returns marker position range\n * @example\n * word.getNote(id).getRange().getLocation(); // { startParaId, startOffset, ... }\n */\n getRange(): Promise<WordRange>;\n /**\n * Returns the content area of the footnote/endnote.\n *\n * @returns content area, null if none\n * @example\n * word.getNote(id).getBody().getText(); // get the footnote/endnote content\n * word.getNote(id).getBody().insertText(\"new content\", { replace: true }); // replace the whole content\n */\n getBody(): Promise<WordBody | null>;\n /**\n * Returns the ordinal position among footnotes/endnotes of the same kind within the document.\n *\n * @returns ordinal position, -1 if none\n */\n getIndex(): Promise<number>;\n /**\n * Deletes the footnote/endnote.\n * - Deletes both the reference mark in the body and the footnote/endnote content.\n *\n * @throws {Error} if no footnote/endnote with the given ID exists or its reference mark cannot be found in the body\n */\n delete(): Promise<void>;\n }\n\n /**\n * Looks up a change tracking entry and accepts or rejects it.\n * - The list of entries is obtained via getChangeTrackings() on a document, area, paragraph, or range.\n * - Use getRange() to locate the change and accept() or reject() to process an individual entry.\n */\n export interface WordChangeTracking {\n /**\n * Returns the ID of the change tracking entry.\n *\n * @returns change tracking entry ID\n */\n getId(): Promise<string>;\n /**\n * Checks whether the change tracking entry still exists.\n * - An entry that has been accepted or rejected is considered no longer existing.\n *\n * @returns true if it exists\n */\n exists(): Promise<boolean>;\n /**\n * Returns the document range occupied by the change entry.\n * - When several changes are grouped, the range spans from the first to the last; null if there is no target.\n *\n * @returns change range, null if there is no target\n */\n getRange(): Promise<WordRange | null>;\n /**\n * Accepts the change tracking entry.\n * - Confirms insertions, deletions, and formatting changes. An already processed entry is not changed again.\n *\n * @returns true if accepted, false if there is no target\n */\n accept(): Promise<boolean>;\n /**\n * Rejects the change tracking entry.\n * - Cancels insertions and deletions and restores the original formatting. An already processed entry is not changed again.\n *\n * @returns true if rejected, false if there is no target\n */\n reject(): Promise<boolean>;\n }\n}\n","/* eslint-disable */\n/**\n * Thinkfree Office SDK Type Definitions\n *\n * ⚠️ AUTO-GENERATED — DO NOT EDIT.\n * 오피스 구현 저장소(비공개)의 API JSDoc 에서 생성된다 — 수정은 원본 JSDoc 에서.\n *\n * proxy 메서드는 postMessage bridge 를 거치므로 Promise 를 반환한다.\n * Generated: 2026-09-22\n */\n\n// Thinkfree Office SDK (Cell)\n\n// 공통 enum — 정의·값은 common 모듈(SDK flat export)에만 있다. 여기서는 시그니처 참조용 type import 만 한다.\nimport type { LineDash, ShapePreset, ShapeZOrder, ChartType, ChartGridLineType, ChartAxis, ChartLegendPosition, ChartDataLabelPosition } from \"./common-api.generated.js\";\n\n// 실제(비-ambient) 모듈 네임스페이스 — 단일 번들 d.ts 에서 `Cell.X` 로 타입·런타임\n// enum 값을 모두 노출한다. index 의 `export * as` 재수출은 tsup dts 롤업에서 const+type\n// 선언 병합의 값 의미가 타입 전용으로 강등되므로 쓰지 않는다 (dts.config 의 namespace 키).\nexport namespace Cell {\n // =============================================================================\n // Constants / Enums\n // =============================================================================\n\n /**\n * `Range.setHorizontalAlign` 에 넘기는 셀 가로 정렬이다.\n *\n * 지정하지 않은 셀은 데이터 종류에 따라 그려진다(문자는 왼쪽, 숫자는 오른쪽). 조회는 명시 지정된 값만 돌려주므로 기본 상태에서는 값이 없다.\n */\n export const HorizontalAlign = {\n LEFT: \"left\",\n CENTER: \"center\",\n RIGHT: \"right\",\n JUSTIFY: \"justify\",\n DISTRIBUTED: \"distributed\",\n } as const;\n export type HorizontalAlign = typeof HorizontalAlign[keyof typeof HorizontalAlign];\n\n /**\n * `Range.setVerticalAlign` 에 넘기는 셀 세로 정렬이다.\n *\n * 지정하지 않은 셀은 아래쪽으로 그려진다. 조회는 명시 지정된 값만 돌려준다.\n */\n export const VerticalAlign = {\n TOP: \"top\",\n CENTER: \"center\",\n BOTTOM: \"bottom\",\n JUSTIFY: \"justify\",\n } as const;\n export type VerticalAlign = typeof VerticalAlign[keyof typeof VerticalAlign];\n\n /**\n * `Range.setBorder` 의 첫 인자로 넘기는 테두리 적용 위치다.\n *\n * 값은 모델 어휘(`Constants.ot.BORDER_TYPE_*`)와 같은 문자열이다.\n */\n export const BorderType = {\n /** 바깥 네 변과 내부 선 전체 */\n ALL: \"all\",\n /** 바깥 네 변 */\n RECTANGLE: \"rectangle\",\n /** 내부의 가로선과 세로선 */\n CROSS: \"cross\",\n /** 위쪽 변 */\n TOP: \"top\",\n /** 아래쪽 변 */\n BOTTOM: \"bottom\",\n /** 왼쪽 변 */\n LEFT: \"left\",\n /** 오른쪽 변 */\n RIGHT: \"right\",\n /** 내부의 세로선 */\n CENTER: \"center\",\n /** 내부의 가로선 */\n MIDDLE: \"middle\",\n /** 방향이 정해지지 않아 테두리가 그려지지 않는다. 대각선은 DIAGONAL_UP·DIAGONAL_DOWN·DIAGONAL_CROSS 로 지정한다 */\n DIAGONAL: \"diagonal\",\n /** 각 셀의 왼쪽 아래에서 오른쪽 위로 긋는 대각선 */\n DIAGONAL_UP: \"diagonal_up\",\n /** 각 셀의 왼쪽 위에서 오른쪽 아래로 긋는 대각선 */\n DIAGONAL_DOWN: \"diagonal_down\",\n /** 각 셀의 대각선 두 방향 */\n DIAGONAL_CROSS: \"diagonal_cross\",\n /** 테두리 제거. 선 스타일과 색은 무시된다 */\n NONE: \"none\",\n } as const;\n export type BorderType = typeof BorderType[keyof typeof BorderType];\n\n /**\n * `Range.setBorder` 의 두 번째 인자로 넘기는 테두리 선 스타일이다. 생략하면 `THIN` 이다.\n *\n * 값은 렌더러가 아는 선 스타일 전부(`view/util/borderStyleUtils.js` 의 우선순위 목록 · 조건부 서식이 쓰는 `controller/dxfStyle.js` 의 `CF_PROFILE.border.styles`)와 같아야 한다. 목록 밖의 문자열은 검증 없이 저장되고 화면에는 테두리가 지정한 모양으로 그려지지 않는다.\n * 생성기가 객체 리터럴만 읽으므로 그 목록에서 파생할 수 없다. 대신 dispatch 테스트가 어긋남을 잡는다.\n */\n export const BorderLineStyle = {\n HAIR: \"hair\",\n THIN: \"thin\",\n MEDIUM: \"medium\",\n THICK: \"thick\",\n DOUBLE: \"double\",\n DOTTED: \"dotted\",\n DASHED: \"dashed\",\n DASH_DOT: \"dashDot\",\n DASH_DOT_DOT: \"dashDotDot\",\n MEDIUM_DASHED: \"mediumDashed\",\n MEDIUM_DASH_DOT: \"mediumDashDot\",\n MEDIUM_DASH_DOT_DOT: \"mediumDashDotDot\",\n SLANT_DASH_DOT: \"slantDashDot\",\n NONE: \"none\",\n } as const;\n export type BorderLineStyle = typeof BorderLineStyle[keyof typeof BorderLineStyle];\n\n /** `Range.sort` 와 `Filter.sort` 에 넘기는 정렬 방향이다. */\n export const SortOrder = {\n ASCENDING: \"asc\",\n DESCENDING: \"desc\",\n } as const;\n export type SortOrder = typeof SortOrder[keyof typeof SortOrder];\n\n /**\n * `Range.setHyperlink` 의 `options.type` 에 넘기는 하이퍼링크 종류다.\n *\n * `BOOK` 은 같은 문서 안의 위치로 이동하는 링크이며 `location` 에 시트·범위를 준다.\n */\n export const HyperlinkType = {\n WEB: \"web\",\n EMAIL: \"email\",\n BOOK: \"book\",\n } as const;\n export type HyperlinkType = typeof HyperlinkType[keyof typeof HyperlinkType];\n\n /**\n * `Range.setDataValidation` 의 `rule.type` 에 넘기는 데이터 유효성 규칙 종류다.\n *\n * `ANY` 는 입력을 제한하지 않고 안내 메시지만 붙이는 종류이므로 수식이 필요 없다.\n * `LIST` 는 `formula1` 에 콤마 목록(`=` 없이) 또는 단일 열·행 범위 참조(`=` 필수)를 받고, `CUSTOM` 은 불리언 수식을 받는다. 나머지는 `operator` 와 짝으로 경계값을 받는다.\n */\n export const DataValidationType = {\n ANY: \"any\",\n LIST: \"list\",\n WHOLE: \"whole\",\n DECIMAL: \"decimal\",\n DATE: \"date\",\n TIME: \"time\",\n TEXT_LENGTH: \"textLength\",\n CUSTOM: \"custom\",\n } as const;\n export type DataValidationType = typeof DataValidationType[keyof typeof DataValidationType];\n\n /**\n * `Range.setDataValidation` 의 `rule.operator` 에 넘기는 데이터 유효성 비교 연산자다.\n *\n * 숫자·날짜·시간·길이 종류에서만 쓴다. `BETWEEN`/`NOT_BETWEEN` 은 `formula2` 로 두 번째 경계를 함께 받는다.\n */\n export const DataValidationOperator = {\n BETWEEN: \"between\",\n NOT_BETWEEN: \"notBetween\",\n EQUAL: \"equal\",\n NOT_EQUAL: \"notEqual\",\n LESS_THAN: \"lessThan\",\n LESS_THAN_OR_EQUAL: \"lessThanOrEqual\",\n GREATER_THAN: \"greaterThan\",\n GREATER_THAN_OR_EQUAL: \"greaterThanOrEqual\",\n } as const;\n export type DataValidationOperator = typeof DataValidationOperator[keyof typeof DataValidationOperator];\n\n /**\n * `Range.setDataValidation` 의 `rule.errorStyle` 에 넘기는 데이터 유효성 위반 시 오류 표시 방식이다. 생략하면 `STOP` 이다.\n *\n * `STOP` 은 입력을 거부하고, `WARNING`/`INFORMATION` 은 경고 후 입력을 허용한다.\n */\n export const DataValidationErrorStyle = {\n STOP: \"stop\",\n WARNING: \"warning\",\n INFORMATION: \"information\",\n } as const;\n export type DataValidationErrorStyle = typeof DataValidationErrorStyle[keyof typeof DataValidationErrorStyle];\n\n /**\n * `Range.addConditionalFormat` 의 `rule.type` 에 넘기는 조건부 서식 규칙 종류다.\n *\n * `CELL_IS` 는 `operator` + 경계값, `EXPRESSION` 은 불리언 수식, 텍스트 계열은 비교 문자열, `TOP10` 은 순위(`rank`), `TIME_PERIOD` 는 기간 토큰을 함께 받는다. 여기까지는 수식 계열로 강조 서식을 `style` 로 직접 지정한다.\n *\n * `COLOR_SCALE`/`DATA_BAR`/`ICON_SET` 은 시각 규칙이라 `style` 을 받지 않고 색 목록 또는 프리셋 식별자와 임계값(`cfvo`)으로 서술한다.\n */\n export const ConditionalFormatRuleType = {\n CELL_IS: \"cellIs\",\n EXPRESSION: \"expression\",\n CONTAINS_TEXT: \"containsText\",\n NOT_CONTAINS_TEXT: \"notContainsText\",\n BEGINS_WITH: \"beginsWith\",\n ENDS_WITH: \"endsWith\",\n CONTAINS_BLANKS: \"containsBlanks\",\n NOT_CONTAINS_BLANKS: \"notContainsBlanks\",\n CONTAINS_ERRORS: \"containsErrors\",\n NOT_CONTAINS_ERRORS: \"notContainsErrors\",\n TOP10: \"top10\",\n ABOVE_AVERAGE: \"aboveAverage\",\n BELOW_AVERAGE: \"belowAverage\",\n DUPLICATE_VALUES: \"duplicateValues\",\n UNIQUE_VALUES: \"uniqueValues\",\n TIME_PERIOD: \"timePeriod\",\n COLOR_SCALE: \"colorScale\",\n DATA_BAR: \"dataBar\",\n ICON_SET: \"iconSet\",\n } as const;\n export type ConditionalFormatRuleType = typeof ConditionalFormatRuleType[keyof typeof ConditionalFormatRuleType];\n\n /**\n * `cellIs` 규칙의 `operator` 에 넘기는 조건부 서식 비교 연산자다.\n *\n * `BETWEEN`/`NOT_BETWEEN` 은 `formula2` 로 두 번째 경계를 함께 받는다.\n */\n export const ConditionalFormatOperator = {\n EQUAL: \"equal\",\n NOT_EQUAL: \"notEqual\",\n BETWEEN: \"between\",\n NOT_BETWEEN: \"notBetween\",\n GREATER_THAN: \"greaterThan\",\n GREATER_THAN_OR_EQUAL: \"greaterThanOrEqual\",\n LESS_THAN: \"lessThan\",\n LESS_THAN_OR_EQUAL: \"lessThanOrEqual\",\n } as const;\n export type ConditionalFormatOperator = typeof ConditionalFormatOperator[keyof typeof ConditionalFormatOperator];\n\n /**\n * 규칙 종류가 `timePeriod` 일 때 `rule.timePeriod` 에 넘기는 기간 토큰이다.\n *\n * 기준일은 문서를 여는 시점의 오늘 날짜이므로 규칙이 가리키는 셀 집합은 날짜가 바뀌면 달라진다.\n */\n export const ConditionalFormatTimePeriod = {\n YESTERDAY: \"yesterday\",\n TODAY: \"today\",\n TOMORROW: \"tomorrow\",\n LAST_7_DAYS: \"last7Days\",\n LAST_WEEK: \"lastWeek\",\n THIS_WEEK: \"thisWeek\",\n NEXT_WEEK: \"nextWeek\",\n LAST_MONTH: \"lastMonth\",\n THIS_MONTH: \"thisMonth\",\n NEXT_MONTH: \"nextMonth\",\n } as const;\n export type ConditionalFormatTimePeriod = typeof ConditionalFormatTimePeriod[keyof typeof ConditionalFormatTimePeriod];\n\n /**\n * `cfvo[].type` 에 넘기는 조건부 서식 시각 규칙 임계값의 기준이다.\n *\n * `NUM`/`PERCENT`/`PERCENTILE`/`FORMULA` 는 `formula` 로 값을 함께 받고, `MIN`/`MAX` 는 범위의 최소·최대를 쓴다. `AUTO_MIN`/`AUTO_MAX` 는 데이터 막대 프리셋의 기본 임계값이라 조회에만 나오고 입력은 받지 않는다.\n */\n export const ConditionalFormatValueType = {\n NUM: \"num\",\n MIN: \"min\",\n MAX: \"max\",\n PERCENT: \"percent\",\n PERCENTILE: \"percentile\",\n FORMULA: \"formula\",\n AUTO_MIN: \"autoMin\",\n AUTO_MAX: \"autoMax\",\n } as const;\n export type ConditionalFormatValueType = typeof ConditionalFormatValueType[keyof typeof ConditionalFormatValueType];\n\n /**\n * `Filter.applyFilter` 의 `criteria.filterType` 에 넘기는 필터 조건 종류다.\n *\n * 종류에 따라 criteria 의 나머지 필드가 달라진다. `VALUES` 는 표시할 값 목록을, `CUSTOM` 은 조건식 1~2개를, `TOP10` 은 개수나 비율을, `DYNAMIC` 은 평균 기준 토큰을 함께 받는다.\n *\n * `Filter.getInfo` 의 `columns[].filterType` 도 같은 어휘다. 단 단일 `EQUAL` 조건으로 적용한 `CUSTOM` 은 모델에서 값 목록으로 저장되어 조회 시 `VALUES` 로 나온다.\n */\n export const FilterType = {\n VALUES: \"values\",\n CUSTOM: \"custom\",\n TOP10: \"top10\",\n DYNAMIC: \"dynamic\",\n } as const;\n export type FilterType = typeof FilterType[keyof typeof FilterType];\n\n /**\n * `custom` criteria 의 `conditions[].operator` 에 넘기는 사용자 지정 필터 조건식의 연산자다.\n *\n * `EQUAL` 은 단일 조건에서만 쓸 수 있다(두 조건 조합에서는 지원하지 않는다).\n * \"사이\"·\"사이 제외\" 는 별도 연산자가 아니라 두 조건의 AND·OR 조합으로 표현한다.\n */\n export const FilterOperator = {\n EQUAL: \"equal\",\n NOT_EQUAL: \"notEqual\",\n GREATER_THAN: \"greaterThan\",\n GREATER_OR_EQUAL: \"greaterOrEqual\",\n LESS_THAN: \"lessThan\",\n LESS_OR_EQUAL: \"lessOrEqual\",\n BEGINS_WITH: \"beginsWith\",\n NOT_BEGINS_WITH: \"notBeginsWith\",\n ENDS_WITH: \"endsWith\",\n NOT_ENDS_WITH: \"notEndsWith\",\n CONTAINS: \"contains\",\n NOT_CONTAINS: \"notContains\",\n } as const;\n export type FilterOperator = typeof FilterOperator[keyof typeof FilterOperator];\n\n /** `dynamic` criteria 의 `type` 에 넘기는 동적 필터의 기준이다. */\n export const FilterDynamicType = {\n ABOVE_AVERAGE: \"aboveAverage\",\n BELOW_AVERAGE: \"belowAverage\",\n } as const;\n export type FilterDynamicType = typeof FilterDynamicType[keyof typeof FilterDynamicType];\n\n // =============================================================================\n // Typedefs\n // =============================================================================\n\n export interface RangeCoords {\n /** 영역이 시작하는 행(0-based) */\n row1: number;\n /** 영역이 시작하는 열(0-based) */\n col1: number;\n /** 영역이 끝나는 행(0-based). col2 와 함께 생략하면 row1·col1 이 가리키는 단일 셀이 된다 */\n row2?: number;\n /** 영역이 끝나는 열(0-based). row2 와 함께 생략하면 row1·col1 이 가리키는 단일 셀이 된다 */\n col2?: number;\n }\n\n export interface SheetRangeCoords {\n sheetIndex: number;\n row1: number;\n col1: number;\n row2: number;\n col2: number;\n }\n\n export interface CommandResult {\n /** 이번 실행을 되돌릴 수 있는지 여부 */\n undoable: boolean;\n /** 되돌리기 기록이 모두 지워졌는지 여부 */\n undoBufferCleared: boolean;\n }\n\n export interface SheetSummary {\n name: string;\n /** 활성 시트 여부 */\n active: boolean;\n }\n\n export interface SheetRef {\n /** 0-based 시트 인덱스 */\n sheetIndex: number;\n sheetName: string;\n }\n\n export interface DocumentProperties {\n /** 문서를 만든 애플리케이션 이름 (\"Cell\" 등) */\n application: string | undefined;\n /** 문서 작성자 */\n creator: string | undefined;\n /** 문서 생성 일시. 날짜 문자열이거나 epoch 밀리초다 */\n created: string | number | undefined;\n /** 마지막 저장 일시. created 와 같은 형식 */\n lastModified: string | number | undefined;\n /** 문서 포맷 (\"xlsx\", \"ods\", \"xls\") */\n fileType: string;\n /** 문서 로캘 (\"ko_KR\") */\n locale: string;\n }\n\n export interface FreezePanes {\n /** 고정된 상단 행 수. 고정하지 않았으면 0 이다 */\n rows: number;\n /** 고정된 좌측 열 수. 고정하지 않았으면 0 이다 */\n cols: number;\n }\n\n export interface SheetInfo {\n /** 시트 이름 */\n name: string;\n /** 숨김 여부 */\n hidden: boolean;\n /** 탭 색(\"#RRGGBB\"). 색을 지정하지 않았으면 빈 문자열 */\n tabColor: string;\n /** 값이나 셀 서식이 있는 범위(A1 표기). 값도 셀 서식도 없는 시트에서는 null */\n usedRange: string | null;\n /** 선택 영역(A1 표기) */\n selection: string;\n /** 틀 고정 상태 */\n freezePanes: FreezePanes;\n /** 눈금선 표시 여부 */\n gridlinesVisible: boolean;\n /** 화면 확대 배율(1 이 100%) */\n zoom: number;\n }\n\n export interface SelectionInfo {\n /** 시트 이름 */\n sheet: string;\n /** A1 표기 문자열 */\n selection: string;\n }\n\n export interface AddChartOptions {\n /** 시리즈 방향. rows 는 행 하나가 시리즈 하나, columns 는 열 하나가 시리즈 하나이며, 생략하면 데이터 모양에 따라 정한다. 분산형·거품형은 방향을 지정할 수 없다 */\n seriesBy?: \"auto\" | \"rows\" | \"columns\";\n }\n\n export interface ChartInfo {\n /** 차트를 식별하는 고유 ID */\n oid: string;\n /** 차트 종류 */\n type: ChartType;\n /** 차트 제목 */\n title: string;\n /** 범례 위치 */\n legendPosition: ChartLegendPosition;\n /** 데이터레이블 위치 */\n dataLabelPosition: ChartDataLabelPosition;\n /** 축별 축 제목. null 은 그 차트 종류에 해당 축의 제목이 아예 없다는 뜻이다 */\n axisTitle: { horizontal: string | null; vertical: string | null };\n /** 축별 눈금선. null 은 그 차트 종류에 해당 축의 눈금선이 아예 없다는 뜻이고, \"none\" 은 쓸 수는 있지만 꺼져 있다는 뜻이다 */\n gridLine: { horizontal: ChartGridLineType | null; vertical: ChartGridLineType | null };\n /** 데이터 범위. 시트명을 포함한 A1 표기다(\"Sheet1!A1:C5\"). 하나의 사각 범위로 묶이지 않으면 null */\n range: string | null;\n }\n\n export interface ConditionalFormatPriorityMove {\n /** 옮길 규칙의 현재 우선순위 */\n priority: number;\n /** 옮겨 놓을 우선순위 */\n to: number;\n }\n\n export interface ConditionalFormatRangeSet {\n /** 대상 규칙의 현재 우선순위 */\n priority: number;\n /** 바꿀 적용 영역. 콤마로 이어 붙인 A1 표기 문자열(\"A1:B2,D4:E5\")로도 지정할 수 있으며, 문자열 배열과 빈 배열은 받지 않는다 */\n ranges: string | RangeCoords[];\n }\n\n export interface ConditionalFormatUpdate {\n /** 삭제할 규칙의 우선순위 목록 */\n deletes?: number[];\n /** 규칙별로 바꿀 적용 영역 */\n setRanges?: ConditionalFormatRangeSet[];\n /** 우선순위 이동. 한 번에 한 건만 지정할 수 있다 */\n movePriority?: ConditionalFormatPriorityMove;\n }\n\n export interface ConditionalFormatFont {\n /** 굵게 여부 */\n bold?: boolean;\n /** 기울임 여부 */\n italic?: boolean;\n /** 취소선 여부 */\n strikethrough?: boolean;\n /** 밑줄 종류 */\n underline?: \"single\" | \"double\" | \"singleAccounting\" | \"doubleAccounting\" | \"none\";\n /** 글꼴 색 \"#RRGGBB\" */\n color?: string;\n /** 글꼴 크기(pt). 현재는 조회만 지원한다 */\n size?: number;\n /** 글꼴 이름. 현재는 조회만 지원한다 */\n name?: string;\n }\n\n export interface ConditionalFormatGradientStop {\n /** 0~1 사이의 위치 */\n position: number;\n /** 그 위치의 색 \"#RRGGBB\" */\n color: string;\n }\n\n export interface ConditionalFormatGradient {\n /** 선형이면 true, 방사형이면 false */\n isLinear?: boolean;\n /** 선형일 때의 각도 */\n degree?: number;\n /** 방사형의 왼쪽 여백 비율 */\n left?: number;\n /** 방사형의 오른쪽 여백 비율 */\n right?: number;\n /** 방사형의 위쪽 여백 비율 */\n top?: number;\n /** 방사형의 아래쪽 여백 비율 */\n bottom?: number;\n /** 색이 바뀌는 지점 목록 */\n stops?: ConditionalFormatGradientStop[];\n }\n\n export interface ConditionalFormatFill {\n /** 바탕색 \"#RRGGBB\". 이것만 주면 단색 채우기다 */\n backgroundColor?: string;\n /** 무늬 종류(\"lightGrid\", \"darkVertical\" 등). solid·none 은 무늬가 아니다 */\n patternType?: string;\n /** 무늬색 \"#RRGGBB\". 무늬가 아닌 채우기에는 없다 */\n patternColor?: string;\n /** 그라데이션 채우기. 현재는 조회만 지원한다 */\n gradient?: ConditionalFormatGradient;\n }\n\n export interface ConditionalFormatBorderLine {\n /** 선 스타일. 색만 주면 가는 실선으로 그린다 */\n style?: BorderLineStyle;\n /** 선 색 \"#RRGGBB\". 선 스타일만 주면 검정으로 그린다 */\n color?: string;\n }\n\n export interface ConditionalFormatBorder {\n /** 네 변에 함께 줄 선 스타일. 변별 지정이 있으면 그쪽이 이긴다 */\n style?: BorderLineStyle;\n /** 네 변에 함께 줄 선 색 \"#RRGGBB\". 변별 지정이 있으면 그쪽이 이긴다 */\n color?: string;\n /** 위쪽 변. 조회는 네 변이 같아도 각 변을 따로 준다 */\n top?: ConditionalFormatBorderLine;\n /** 아래쪽 변 */\n bottom?: ConditionalFormatBorderLine;\n /** 왼쪽 변 */\n left?: ConditionalFormatBorderLine;\n /** 오른쪽 변 */\n right?: ConditionalFormatBorderLine;\n }\n\n export interface ConditionalFormatStyle {\n /** 글꼴 */\n font?: ConditionalFormatFont;\n /** 채우기 */\n fill?: ConditionalFormatFill;\n /** 테두리 */\n border?: ConditionalFormatBorder;\n /** 숫자 서식 코드. 현재는 조회만 지원한다 */\n numberFormat?: string;\n }\n\n export interface ConditionalFormatValue {\n /** 시각 규칙이 값 범위를 나누는 기준점 종류. min·max·autoMin·autoMax 는 데이터에서 잡으므로 formula 를 쓰지 않는다 */\n type: ConditionalFormatValueType;\n /** num·percent·percentile 의 값, formula 의 수식 */\n formula?: string | number;\n }\n\n export interface ConditionalFormatRule {\n /** 규칙 종류. 나머지 필드 가운데 무엇을 함께 쓰는지 이 값이 정한다 */\n type: ConditionalFormatRuleType;\n /** cellIs 가 값을 견주는 방식 */\n operator?: ConditionalFormatOperator;\n /** cellIs 의 비교값, expression 의 참·거짓 수식 */\n formula1?: string | number;\n /** cellIs 가 between·notBetween 일 때 쓰는 두 번째 경계값 */\n formula2?: string | number;\n /** containsText·notContainsText·beginsWith·endsWith 가 찾을 문자열 */\n text?: string;\n /** timePeriod 가 볼 기간 */\n timePeriod?: ConditionalFormatTimePeriod;\n /** top10 이 고를 개수. percent 가 참이면 1~100, 아니면 1~1000 */\n rank?: number;\n /** top10 의 rank 를 개수가 아니라 백분율로 읽는다 */\n percent?: boolean;\n /** top10 을 위에서가 아니라 아래에서 고른다 */\n bottom?: boolean;\n /** colorScale 의 눈금 색 \"#RRGGBB\" 2~3개. dataBar 에서는 현재 조회만 지원한다 */\n colors?: string[];\n /** colorScale·iconSet 의 기준점. 생략하면 데이터 범위를 고르게 나눈다. dataBar 에서는 현재 조회만 지원한다 */\n cfvo?: ConditionalFormatValue[];\n /** dataBar 막대를 단색이 아니라 그라데이션으로 그린다. 현재는 조회만 지원한다 */\n gradient?: boolean;\n /** dataBar 가 쓸 막대 프리셋. 막대는 이 프리셋으로만 만들 수 있다. 조회는 막대 모양이 프리셋과 같을 때 이 이름을 준다 */\n dataBar?: string;\n /** iconSet 이 쓸 아이콘 묶음 */\n iconSet?: string;\n /** iconSet 의 아이콘을 반대 순서로 매긴다 */\n reverse?: boolean;\n /** 조건이 맞은 셀에 입힐 강조 서식. 생략하면 기본 강조를 쓰며, 시각 규칙에는 지정할 수 없다 */\n style?: ConditionalFormatStyle;\n }\n\n export interface ConditionalFormatInfo {\n /** 우선순위 */\n priority: number;\n /** 조건이 맞으면 뒤 규칙을 적용하지 않을지 여부 */\n stopIfTrue: boolean;\n /** 적용 영역(콤마로 구분된 참조 영역) */\n ranges: string;\n /** 규칙 내용. 강조 서식은 그 안의 style 에 담긴다 */\n rule: ConditionalFormatRule;\n }\n\n export interface DataValidationRule {\n /** 적용 영역. 절대 참조 표기(\"$A$1:$B$2\")이며 떨어져 있는 여러 영역은 콤마로 이어 붙인 한 문자열이다 */\n ranges: string;\n /** 검사 종류 */\n type: DataValidationType;\n /** 검사에 쓰는 값·참조·수식. any 종류에는 없다 */\n formula1?: string | number;\n /** 비교 연산자. 숫자·날짜·시간·길이 종류에만 있다 */\n operator?: DataValidationOperator;\n /** between·notBetween 의 두 번째 경계 */\n formula2?: string | number;\n /** 빈 셀을 허용하는지 여부 */\n allowBlank: boolean;\n /** 목록을 드롭다운으로 보여줄지 여부. list 종류에만 있다 */\n showDropDown?: boolean;\n /** 셀을 선택했을 때 안내 메시지를 보여줄지 여부 */\n showInputMessage: boolean;\n /** 안내 메시지 제목 */\n inputTitle?: string;\n /** 안내 메시지 본문 */\n inputMessage?: string;\n /** 규칙을 어겼을 때 오류 메시지를 보여줄지 여부 */\n showErrorMessage: boolean;\n /** 오류 표시 방식 */\n errorStyle: DataValidationErrorStyle;\n /** 오류 메시지 제목 */\n errorTitle?: string;\n /** 오류 메시지 본문 */\n errorMessage?: string;\n }\n\n export interface CommentInfo {\n /** 메모가 붙은 셀(A1 표기) */\n cell: string;\n /** 메모 내용 문자열. 여러 줄은 \"\\n\" 으로 이어진다 */\n text: string;\n /** 항상 보이는지 여부. false 인 메모는 셀에 마우스를 올릴 때만 보인다 */\n visible: boolean;\n }\n\n export interface CellContent {\n /** 셀 값. 수식 셀은 계산 결과값이고 빈 셀은 undefined 다 */\n value: string | number | boolean | undefined;\n /** 화면에 보이는 문자열(서식 적용 후) */\n displayValue: string;\n /** 수식. 수식이 아니면 null */\n formula: string | null;\n }\n\n export interface HyperlinkInfo {\n range: string;\n type: \"web\" | \"email\" | \"book\" | \"document\" | \"file\" | \"\";\n location: string;\n display: string;\n }\n\n export interface HyperlinkOptions {\n /** 링크 대상. 웹 주소, 이메일 주소, 문서 안의 참조(\"Sheet1!A1\"), 정의된 이름을 받으며 type 에 맞는 형식이 아니면 걸 수 없다 */\n location: string;\n /** 좌상단 셀에 넣을 표시 텍스트. 셀 값이 숫자이거나 줄바꿈이 든 문자열이면 무시되고 셀 값이 그대로 남는다. 셀 값이 그 밖의 문자열이면 display 로 바뀌고, 셀이 비어 있으면 display 가 들어가며 생략하면 location 이 들어간다 */\n display?: string | null;\n /** 링크 종류. 생략하면 location 을 보고 판별한다 */\n type?: HyperlinkType | null;\n }\n\n export interface BorderLine {\n /** 선 스타일 */\n style: BorderLineStyle;\n /** 선 색 \"#RRGGBB\" */\n color?: string;\n }\n\n export interface BorderDiagonal {\n /** 선 스타일 */\n style: BorderLineStyle;\n /** 선 색 \"#RRGGBB\" */\n color?: string;\n /** 대각선 방향. setBorder 의 type 으로 그대로 넘길 수 있다 */\n direction: \"diagonal_up\" | \"diagonal_down\" | \"diagonal_cross\";\n }\n\n export interface BorderInfo {\n /** 테두리가 없으면 null */\n top: BorderLine | null;\n bottom: BorderLine | null;\n left: BorderLine | null;\n right: BorderLine | null;\n diagonal: BorderDiagonal | null;\n }\n\n export interface FillPattern {\n /** 무늬 종류(\"lightGrid\", \"darkVertical\" 등) */\n type: string;\n /** 무늬선 색 \"#RRGGBB\" */\n color?: string;\n }\n\n export interface FillInfo {\n type: \"solid\" | \"pattern\" | \"gradient\";\n /** 바탕색 \"#RRGGBB\" */\n backgroundColor?: string;\n /** 바탕색 위에 겹쳐 그리는 무늬 */\n pattern?: FillPattern;\n }\n\n export interface TableOptionUpdate {\n /** 머리글 행을 둘지 여부 */\n headerRow?: boolean;\n /** 요약 행을 둘지 여부 */\n totalsRow?: boolean;\n /** 첫 열에 강조 서식을 줄지 여부 */\n firstColumn?: boolean;\n /** 끝 열에 강조 서식을 줄지 여부 */\n lastColumn?: boolean;\n /** 행을 한 줄씩 번갈아 다른 색으로 칠할지 여부 */\n bandedRows?: boolean;\n /** 열을 한 줄씩 번갈아 다른 색으로 칠할지 여부 */\n bandedColumns?: boolean;\n }\n\n export interface TableOptions {\n /** 머리글 행을 두는지 여부 */\n headerRow: boolean;\n /** 요약 행을 두는지 여부 */\n totalsRow: boolean;\n /** 첫 열에 강조 서식을 주는지 여부 */\n firstColumn: boolean;\n /** 끝 열에 강조 서식을 주는지 여부 */\n lastColumn: boolean;\n /** 행을 한 줄씩 번갈아 다른 색으로 칠하는지 여부 */\n bandedRows: boolean;\n /** 열을 한 줄씩 번갈아 다른 색으로 칠하는지 여부 */\n bandedColumns: boolean;\n /** 표에 적용된 표 스타일 이름 (\"TableStyleMedium2\" 등) */\n style: string;\n }\n\n export interface TableInfo {\n /** 표 이름 */\n name: string;\n /** 표가 놓인 시트 이름 */\n sheet: string;\n /** 표 전체 영역의 A1 표기. 머리글 행과 요약 행이 함께 들어간다 */\n range: string;\n /** 머리글 행을 두는지 여부 */\n headerRow: boolean;\n /** 요약 행을 두는지 여부 */\n totalsRow: boolean;\n /** 첫 열에 강조 서식을 주는지 여부 */\n firstColumn: boolean;\n /** 끝 열에 강조 서식을 주는지 여부 */\n lastColumn: boolean;\n /** 행을 한 줄씩 번갈아 다른 색으로 칠하는지 여부 */\n bandedRows: boolean;\n /** 열을 한 줄씩 번갈아 다른 색으로 칠하는지 여부 */\n bandedColumns: boolean;\n /** 표에 적용된 표 스타일 이름 (\"TableStyleMedium2\" 등) */\n style: string;\n }\n\n export interface FilterColumn {\n /** 필터 영역 첫 열부터 센 0-based 오프셋. applyFilter·clearFilter·sort 에 그대로 넘길 수 있다 */\n colId: number;\n /** 필터 종류 */\n filterType: FilterType;\n /** applyFilter 에 넘기는 조건과 같은 형태. 알 수 없는 필터 종류면 null 이다 */\n criteria: Record<string, unknown> | null;\n }\n\n export interface FilterSortState {\n /** 필터 영역 첫 열부터 센 0-based 오프셋. sort 에 넘기는 colId 와 같다 */\n colId: number;\n /** 정렬 방향 */\n order: SortOrder;\n }\n\n export interface FilterInfo {\n /** 필터가 있는지 여부. false 면 이 필드만 들어 있다 */\n enabled: boolean;\n /** 필터 영역의 A1 표기 (예: \"A1:D20\") */\n range?: string;\n /** 조건이 걸린 열의 목록 */\n columns?: FilterColumn[];\n /** 필터 조건에 걸려 숨겨진 행 수. 사용자가 직접 숨긴 행은 세지 않는다 */\n hiddenRowCount?: number;\n /** 정렬 상태. 정렬한 적이 없으면 null 이고, 정렬 키가 여럿인 문서는 첫 기준만 담는다 */\n sort?: FilterSortState | null;\n }\n\n export interface NameUpdate {\n /** 새 이름. 공백이나 허용되지 않는 문자를 쓸 수 없고, 예약된 이름이나 셀 참조로 읽히는 이름, 최대 길이를 넘는 이름도 받지 않는다 */\n newName?: string;\n /** 새 수식 또는 참조. `=` 로 시작해도 되고 아니어도 된다 */\n formula?: string;\n }\n\n export interface NameInfo {\n /** 정의된 이름 */\n name: string;\n /** 특정 시트에서만 쓰는 이름이면 그 시트. 문서 전체에서 쓰는 이름이면 null */\n sheet: string | null;\n /** `=` 로 시작하는 수식 */\n formula: string;\n /** 이름이 가리키는 실제 영역이다. 시트 이름을 붙인 A1 주소를 콤마로 이어 붙이며, 상수나 오류를 가리키는 이름과 지원하지 않는 함수를 쓴 이름은 빈 문자열이다 */\n ranges: string;\n }\n\n export interface FontInfo {\n /** 굵게 여부 */\n bold: boolean | undefined;\n /** 기울임 여부 */\n italic: boolean | undefined;\n /** 밑줄 종류 */\n underline: \"single\" | \"double\" | \"none\";\n /** 취소선 여부 */\n strikethrough: boolean | undefined;\n /** 글꼴 이름 */\n name: string | undefined;\n /** 글꼴 크기(pt) */\n size: number | undefined;\n /** 글꼴 색 \"#RRGGBB\" */\n color: string | undefined;\n }\n\n export interface AlignmentInfo {\n /** 가로 정렬. 값 어휘는 HorizontalAlign */\n horizontalAlign: string | undefined;\n /** 세로 정렬. 값 어휘는 VerticalAlign */\n verticalAlign: string | undefined;\n /** 텍스트 줄바꿈 여부 */\n wrapText: boolean | undefined;\n /** 들여쓰기 수준 */\n indent: number;\n }\n\n // =============================================================================\n // Classes\n // =============================================================================\n\n /**\n * 통합 문서 전체를 다루는 최상위 객체이자 셀 API 의 진입점이다.\n * 시트·표·정의된 이름처럼 문서에 속한 요소를 조회하고 관리한다.\n */\n export interface Workbook {\n /**\n * 문서의 시트 구성을 배열로 반환한다. 배열 인덱스가 곧 시트 인덱스(0-based)이며 숨긴 시트도 포함한다.\n * 각 시트의 상세 속성은 Worksheet 에서 조회한다.\n */\n getSheetList(): Promise<SheetSummary[]>;\n /**\n * 시트 핸들을 반환한다. 시트 이름으로 지정할 때는 대소문자를 구분한다.\n * sheet 를 생략하면 활성 시트를 대상으로 한다.\n *\n * @param sheet - 시트 인덱스(0-based, getSheetList() 결과의 배열 인덱스) 또는 시트 이름\n */\n getWorksheet(sheet?: number | string): Promise<Worksheet>;\n /**\n * ID 로 객체 핸들을 반환한다. 문서의 모든 시트를 대상으로 하며, 현재는 차트 객체만 지원한다.\n * 차트가 아닌 객체는 null 을 반환한다.\n *\n * @param oid - 객체를 식별하는 고유 ID\n */\n getObjectById(oid: string): Promise<Chart>;\n /**\n * 이름으로 표 핸들을 반환한다. 이름은 대소문자를 구분하지 않으며, 핸들에는 실제 저장된 표 이름이 담긴다.\n *\n * @param name - 표 이름. 문서 전체에서 유일하다\n */\n getTable(name: string): Promise<Table>;\n /**\n * 전달한 name 을 이름으로 하는 정의된 이름을 반환한다. 이름은 대소문자를 구분하지 않는다.\n * sheet 를 생략하면 문서 전체에서 쓰는 이름만 찾는다.\n *\n * @param name - 찾을 이름\n * @param sheet - 특정 시트에서만 쓰는 이름이면 그 시트\n */\n getDefinedName(name: string, sheet?: number | string): Promise<Name>;\n /**\n * 정의된 이름을 만든다. formula 는 `=` 로 시작해도 되고 아니어도 된다.\n * 수식에서 시트를 지정하지 않은 참조는 활성 시트 기준으로 해석한다.\n * sheet 를 생략하면 문서 전체에서 쓰는 이름으로 만든다.\n * 같은 이름의 정의된 이름이나 표가 이미 있으면 만들어지지 않고 오류가 발생한다.\n *\n * @param name - 만들 이름\n * @param formula - 이름이 가리킬 수식 또는 참조\n * @param sheet - 특정 시트에서만 쓸 이름이면 그 시트\n */\n addDefinedName(name: string, formula: string, sheet?: number | string): Promise<Name>;\n /**\n * 정의된 이름 목록을 반환한다. 내장 이름, 숨긴 이름, 수식이 없는 이름은 제외한다.\n * sheet 를 생략하면 문서 전체에서 쓰는 이름을 반환한다. formula 는 `=` 으로 시작한다.\n *\n * @param sheet - 특정 시트에서만 쓰는 이름이면 그 시트\n */\n getDefinedNameList(sheet?: number | string): Promise<NameInfo[]>;\n /**\n * 새 시트를 시트 목록 맨 뒤에 추가하고, 추가한 시트를 활성 시트로 만든다.\n *\n * @param name - 새 시트 이름\n */\n addSheet(name: string): Promise<SheetRef>;\n /**\n * 시트를 삭제한다. 활성 시트를 삭제하면 인접한 시트가 활성 시트가 된다.\n * 남은 시트가 하나뿐이거나 숨기지 않은 시트가 하나뿐이면 삭제할 수 없다.\n *\n * @param sheet - 삭제할 시트\n */\n removeSheet(sheet: number | string): Promise<void>;\n /**\n * 시트를 복사해 원본 바로 뒤에 넣고, 복사본을 활성 시트로 만든다.\n *\n * @param sheet - 복사할 시트\n */\n copySheet(sheet: number | string): Promise<SheetRef>;\n /**\n * 시트 위치를 이동한다.\n *\n * @param from - 옮길 시트\n * @param to - 옮겨 놓을 자리의 시트 인덱스(0-based)\n */\n moveSheet(from: number | string, to: number): Promise<void>;\n /**\n * 활성 시트를 변경한다. 숨긴 시트는 활성화할 수 없다.\n *\n * @param sheet - 활성화할 시트\n */\n setActiveSheet(sheet: number | string): Promise<void>;\n /**\n * 문서 속성을 반환한다. 문서에 없는 속성은 undefined 값을 가진다.\n */\n getDocumentProperties(): Promise<DocumentProperties>;\n }\n\n /**\n * 시트 하나를 다루는 핸들이다.\n * 시트 자체의 속성과 그 시트에 속한 범위·차트·표·필터·규칙을 조회하고 관리한다.\n */\n export interface Worksheet {\n /**\n * 시트 이름을 반환한다.\n */\n getName(): Promise<string>;\n /**\n * 시트가 숨겨져 있는지 반환한다.\n */\n isHidden(): Promise<boolean>;\n /**\n * 시트 탭 색을 \"#RRGGBB\" 형태로 반환한다. 색을 지정하지 않은 시트는 빈 문자열이다.\n */\n getTabColor(): Promise<string>;\n /**\n * 이 시트의 선택 영역을 가리키는 Range 핸들을 반환한다.\n * 선택 영역은 시트마다 따로 보관되므로 활성 시트가 아닌 시트에서도 조회할 수 있다.\n */\n getSelection(): Promise<Range>;\n /**\n * 값이나 셀 서식이 있는 셀을 모두 감싸는 사각 범위를 반환한다.\n * 차트·도형과 행 높이·열 너비는 이 범위에 반영하지 않는다.\n *\n * @returns 값도 셀 서식도 없는 시트에서는 null 이다\n */\n getUsedRange(): Promise<Range>;\n /**\n * 이 시트의 병합 셀 목록을 반환한다. 특정 범위와 겹치는 병합만 필요하면 Range.getMergeCellList() 를 쓴다.\n *\n * @returns 병합된 영역을 A1 표기로 담은 배열\n */\n getMergeCellList(): Promise<string[]>;\n /**\n * 이 시트의 하이퍼링크 목록을 반환한다.\n */\n getHyperlinkList(): Promise<HyperlinkInfo[]>;\n /**\n * 틀 고정 상태를 반환한다.\n */\n getFreezePanes(): Promise<FreezePanes>;\n /**\n * 눈금선을 표시하는지 반환한다.\n */\n isGridlinesVisible(): Promise<boolean>;\n /**\n * 화면 확대 배율을 반환한다.\n *\n * @returns 1 이 100% 인 배율. 퍼센트로 환산하지 않는다\n */\n getZoom(): Promise<number>;\n /**\n * 시트 속성을 한 번에 반환한다. 각 항목은 같은 이름의 개별 조회 메서드와 같은 값이다.\n */\n getSheetInfo(): Promise<SheetInfo>;\n /**\n * 시트 이름을 변경한다.\n *\n * @param name - 새 시트 이름\n */\n setName(name: string): Promise<void>;\n /**\n * 시트를 숨기거나 다시 표시한다.\n * 숨기지 않은 시트가 이 시트 하나뿐이면 동작하지 않는다.\n * 활성 시트를 숨기면 인접한 숨기지 않은 시트가 활성 시트가 된다.\n *\n * @param hidden - true 면 숨기고 false 면 다시 표시한다\n */\n setHidden(hidden: boolean): Promise<void>;\n /**\n * 시트 탭 색을 설정한다. 빈 문자열이나 null 을 넘기거나 생략하면 지정된 탭 색을 지운다.\n *\n * @param color - 탭 색. \"#RRGGBB\" 외에 3·4·8 자리 hex, \"#\" 을 생략한 hex, \"red\" 같은 색 이름도 받는다\n */\n setTabColor(color?: string | null): Promise<void>;\n /**\n * 선택 영역을 설정한다. 대상 시트가 활성 시트가 아니면 먼저 활성 시트로 만들며, 숨긴 시트는 활성화할 수 없어 오류가 발생한다.\n * 선택한 영역이 보이도록 화면을 스크롤하려면 goto() 를 쓴다.\n *\n * @param range - 선택할 영역. A1 표기 문자열로도 지정할 수 있다(\"A1:B2\", 단일 셀은 \"E10\")\n */\n setSelection(range: string | RangeCoords): Promise<SelectionInfo>;\n /**\n * 지정한 영역을 선택하고 그 영역이 보이도록 화면을 스크롤한다.\n * 대상 시트가 활성 시트가 아니면 먼저 활성 시트로 만들고, 숨긴 시트를 지정하면 숨기지 않은 다른 시트로 대체해 이동한다.\n *\n * @param range - 이동할 영역. A1 표기 문자열로도 지정할 수 있다(\"A1:B2\", 단일 셀은 \"E10\")\n * @returns 숨긴 시트를 지정했다면 대체해 이동한 시트의 이름이 담긴다\n */\n goto(range: string | RangeCoords): Promise<SelectionInfo>;\n /**\n * 틀 고정을 설정한다. 0 이하이거나 null 을 넘기면 그 방향의 고정을 해제한다.\n *\n * @param rows - 고정할 상단 행 수 (기본값: 0)\n * @param cols - 고정할 좌측 열 수 (기본값: 0)\n */\n setFreezePanes(rows?: number | null, cols?: number | null): Promise<void>;\n /**\n * 눈금선 표시 여부를 설정한다.\n *\n * @param visible - true 면 눈금선을 표시하고 false 면 감춘다\n */\n setGridlinesVisible(visible: boolean): Promise<void>;\n /**\n * 화면 확대 배율을 설정한다. 허용 범위를 벗어난 값은 경계값으로 맞추지 않고 오류가 발생한다.\n *\n * @param zoomFactor - 1 이 100% 인 배율. 0.5 이상 1.5 이하여야 한다\n */\n setZoom(zoomFactor: number): Promise<void>;\n /**\n * 이 시트의 영역을 가리키는 Range 핸들을 반환한다.\n * 핸들은 행이나 열을 삽입·삭제해도 처음 지정한 좌표를 유지한다.\n *\n * @param range - 대상 영역. A1 표기 문자열로도 지정할 수 있다(\"A1:B2\", 단일 셀은 \"E10\", 행 전체는 \"5:5\", 열 전체는 \"A:C\")\n */\n getRange(range: string | RangeCoords): Promise<Range>;\n /**\n * 이 시트에 차트를 추가하고 그 차트의 핸들을 반환한다. 제목은 데이터에서 뽑아 자동으로 붙는다.\n * 시리즈로 쓸 행이나 열은 100 개까지 지원한다.\n * 데이터 범위는 이 시트의 것만 받는다.\n *\n * @param chartType - 차트 종류. 지원하지 않는 종류는 오류가 발생한다\n * @param dataRange - 차트가 사용할 데이터 범위. A1 표기 문자열로도 지정할 수 있다(\"A1:B2\", 단일 셀은 \"E10\")\n * @param opts - 추가 옵션\n */\n addChart(chartType: ChartType, dataRange: string | RangeCoords, opts?: AddChartOptions): Promise<Chart>;\n /**\n * ID 로 차트 핸들을 반환한다. 이 시트에 있는 차트만 대상으로 한다.\n *\n * @param oid - 차트를 식별하는 고유 ID. getChartList() 결과의 oid 다\n */\n getChart(oid: string): Promise<Chart>;\n /**\n * 이 시트의 차트 정보 목록을 반환한다. 핸들이 필요하면 항목의 oid 로 getChart() 를 호출한다.\n */\n getChartList(): Promise<ChartInfo[]>;\n /**\n * 이 시트에 표를 만들고 그 표의 핸들을 반환한다. 표 이름은 자동으로 정해진다.\n * 머리글을 쓰지 않거나 범위가 한 행뿐이면 맨 위에 빈 머리글 행이 들어가, 아래 내용이 한 행씩 밀리고 표는 범위보다 한 행 넓어진다.\n * 공동 편집 중이거나, 범위가 행 전체·열 전체이거나 시트의 마지막 행을 포함하면 만들 수 없다.\n *\n * @param dataRange - 표로 만들 범위. A1 표기 문자열로도 지정할 수 있다(\"A1:B2\", 단일 셀은 \"E10\")\n * @param hasHeaders - 범위의 첫 행을 머리글로 쓸지 여부 (기본값: true)\n */\n addTable(dataRange: string | RangeCoords, hasHeaders?: boolean): Promise<Table>;\n /**\n * 이 시트의 표 요약 목록을 반환한다. 핸들이 필요하면 요약의 name 으로 Workbook.getTable() 을 호출한다.\n */\n getTableList(): Promise<TableInfo[]>;\n /**\n * 이 시트의 자동 필터 핸들을 반환한다. 자동 필터가 설정돼 있지 않아도 핸들은 돌려주므로, 설정 여부는 핸들의 getInfo() 가 주는 enabled 로 확인하고 설정은 create() 로 한다.\n */\n getFilter(): Promise<Filter>;\n /**\n * 이 시트의 조건부 서식 규칙 목록을 반환한다.\n * 각 항목의 rule 은 규칙을 다시 추가할 때 그대로 넘길 수 있다. 적용 영역과 우선순위는 규칙 밖이라 따로 준다.\n * rule.style 의 글꼴 크기·이름, 그라데이션, 숫자 서식은 현재 조회만 지원한다.\n * 파일에서 읽어 프리셋에 없는 모양이 된 dataBar 는 colors·gradient·cfvo 로 나오며, 이 셋은 현재 조회만 지원한다.\n */\n getConditionalFormatList(): Promise<ConditionalFormatInfo[]>;\n /**\n * 이 시트의 데이터 유효성 규칙 목록을 반환한다.\n */\n getDataValidationList(): Promise<DataValidationRule[]>;\n /**\n * 이 시트의 셀 메모 목록을 반환한다.\n */\n getCommentList(): Promise<CommentInfo[]>;\n /**\n * 조건부 서식 규칙을 한 번에 편집한다. 규칙 삭제·적용 영역 변경·우선순위 이동을 한 묶음으로 처리해 하나라도 적용할 수 없으면 아무것도 바뀌지 않는다.\n * 편집 하나만 적용할 때는 동작별 메서드를 쓴다.\n * 규칙의 조건 자체는 바꿀 수 없어, 조건을 바꾸려면 규칙을 지우고 다시 추가한다.\n *\n * @param descriptor - 적용할 편집 내용\n */\n updateConditionalFormatRules(descriptor: ConditionalFormatUpdate): Promise<void>;\n /**\n * 조건부 서식 규칙을 삭제한다.\n *\n * @param priorities - 삭제할 규칙 priority 목록. 빈 목록은 받지 않는다\n */\n deleteConditionalFormatRules(priorities: number[]): Promise<void>;\n /**\n * 조건부 서식 규칙 하나의 적용영역을 교체한다.\n * 두 인자는 ConditionalFormatRangeSet 의 필드와 같은 계약이다.\n *\n * @param priority - 대상 규칙 priority\n * @param ranges - 새 적용 영역\n */\n setConditionalFormatRuleRanges(priority: number, ranges: string | RangeCoords[]): Promise<void>;\n /**\n * 조건부 서식 규칙 하나를 다른 우선순위 자리로 옮긴다. 사이 규칙은 한 칸씩 shift 된다(Excel/Sheets 동일).\n *\n * @param priority - 옮길 규칙 priority\n * @param to - 옮겨 갈 자리. 지금 그 자리에 있는 규칙의 priority 를 넘긴다\n */\n moveConditionalFormatRule(priority: number, to: number): Promise<void>;\n }\n\n /**\n * 시트 안의 한 영역(셀 하나, 여러 셀, 행 전체, 열 전체)을 다루는 핸들이다.\n * 영역에 담긴 값·수식과 셀 서식, 그리고 영역에 걸린 병합·메모·하이퍼링크·규칙을 다룬다.\n */\n export interface Range {\n /**\n * 이 범위의 A1 주소를 반환한다(\"B2:C5\", 단일 셀이면 \"E10\").\n * 시트 이름을 붙이면 공백이나 특수문자가 든 이름은 따옴표로 감싼다. 이 형태는 getRange() 가 받지 않는다.\n *\n * @param includeSheetName - true 면 시트 이름을 붙이고, false 면 주소만 반환한다 (기본값: false)\n */\n getAddress(includeSheetName?: boolean): Promise<string>;\n /**\n * 이 범위의 0-based 좌표를 반환한다. A1 주소가 필요하면 getAddress() 를 쓴다.\n * 시트가 삭제됐으면 SHEET_NOT_FOUND 를 throw 한다.\n */\n getCoordinates(): Promise<SheetRangeCoords>;\n /**\n * 범위가 셀 하나인지 반환한다. 여러 행이나 여러 열에 걸친 범위는 false 다.\n */\n isSingleCell(): Promise<boolean>;\n /**\n * 범위 좌상단 셀의 원시값인 문자열·숫자·불리언 중 하나의 타입 값이 반환되며, 수식 셀은 계산 결과값을 반환한다.\n *\n * @returns 빈 셀은 undefined 다\n */\n getValue(): Promise<string | number | boolean | undefined>;\n /**\n * 범위 전체의 값을 행 우선 2차원 배열로 반환한다. 바깥 배열이 행, 안쪽 배열이 열이며 배열 크기는 범위 크기와 같다.\n * 각 값의 형태는 getValue 와 같다.\n *\n * @returns 빈 셀 자리는 undefined 로 채운다\n */\n getValues(): Promise<(string | number | boolean | undefined)[][]>;\n /**\n * 범위 좌상단 셀의 수식 문자열을 반환한다. 수식이 아닌 셀(상수·빈 셀)이면 undefined 다.\n */\n getFormula(): Promise<string | undefined>;\n /**\n * 범위 좌상단 셀의 화면 표시 문자열을 반환한다. 표시 형식이 적용된 결과라 저장된 값과 다를 수 있다.\n *\n * @returns 셀이 비어 있으면 빈 문자열\n */\n getDisplayValue(): Promise<string>;\n /**\n * 범위 전체의 수식을 행 우선 2차원 배열로 반환한다. 배열 크기는 범위 크기와 같다.\n *\n * @returns 수식이 아닌 셀 자리는 null 이다\n */\n getFormulas(): Promise<(string | null)[][]>;\n /**\n * 범위 전체의 화면 표시 문자열을 행 우선 2차원 배열로 반환한다. 배열 크기는 범위 크기와 같다.\n *\n * @returns 빈 셀 자리는 빈 문자열이다\n */\n getDisplayValues(): Promise<string[][]>;\n /**\n * 범위 좌상단 셀의 값·표시 문자열·수식을 한 번에 반환한다. 각 항목은 getValue·getDisplayValue·getFormula 와 같다.\n */\n getCellContent(): Promise<CellContent>;\n /**\n * 범위 전체의 값·표시 문자열·수식을 행 우선 2차원 배열로 반환한다. 배열 크기는 범위 크기와 같다.\n */\n getCellContents(): Promise<CellContent[][]>;\n /**\n * 범위 첫 행의 높이(px)를 반환한다.\n */\n getRowHeight(): Promise<number>;\n /**\n * 범위 첫 열의 너비(px)를 반환한다.\n */\n getColumnWidth(): Promise<number>;\n /**\n * 범위에 걸친 행의 높이를 지정한다. 숨긴 행에 높이를 지정하면 숨김도 함께 풀린다.\n * 0 이하를 주면 높이를 바꾸지 않고 행을 숨긴다.\n * 지정한 행은 높이가 고정되어 내용이 바뀌어도 자동으로 맞춰지지 않는다.\n *\n * @param height - 행 높이(px)\n */\n setRowHeight(height: number): Promise<void>;\n /**\n * 범위에 걸친 열의 너비를 지정한다. 숨긴 열에 너비를 지정하면 숨김도 함께 풀린다.\n * 0 이하를 주면 너비를 바꾸지 않고 열을 숨긴다.\n * 지정한 열은 너비가 고정되어 내용이 바뀌어도 자동으로 넓어지지 않는다.\n *\n * @param width - 열 너비(px)\n */\n setColumnWidth(width: number): Promise<void>;\n /**\n * 범위에 걸친 행의 높이를 각 행의 내용에 맞춰 조정한다. 조정한 행은 이후 내용이 바뀔 때도 높이가 자동으로 맞춰진다.\n */\n autofitRows(): Promise<void>;\n /**\n * 범위에 걸친 열의 너비를 각 열의 내용에 맞춰 조정한다. 조정한 열은 이후 값을 넣거나 글꼴 크기·들여쓰기를 바꿀 때 숫자 셀의 내용에 맞춰 너비가 넓어질 수 있다.\n */\n autofitColumns(): Promise<void>;\n /**\n * 범위의 첫 행 자리에 행을 삽입한다. 앞 행의 서식을 따라간다. 시트의 첫 행 자리에 삽입하면 서식 없는 행이 들어간다.\n *\n * @param count - 삽입할 행 수. 1 이상이 아니면 범위의 행 수만큼 삽입한다\n */\n insertRow(count?: number | null): Promise<void>;\n /**\n * 범위에 걸친 행을 삭제한다. 범위가 표의 데이터 영역을 통째로 덮으면 표가 사라지지 않도록 데이터 행 하나를 남긴다.\n */\n deleteRow(): Promise<void>;\n /**\n * 범위의 첫 열 자리에 열을 삽입한다. 앞 열의 서식을 따라간다. 시트의 첫 열 자리에 삽입하면 서식 없는 열이 들어간다.\n *\n * @param count - 삽입할 열 수. 1 이상이 아니면 범위의 열 수만큼 삽입한다\n */\n insertColumn(count?: number | null): Promise<void>;\n /**\n * 범위에 걸친 열을 삭제한다.\n * 시트의 모든 열이나 숨기지 않은 마지막 열까지 없어질 때, 틀 고정 오른쪽 영역이 통째로 없어질 때는 삭제할 수 없다.\n */\n deleteColumn(): Promise<void>;\n /**\n * 범위에 걸친 행을 표시하거나 숨긴다. visible 이 null 이거나 undefined 면 아무것도 하지 않는다.\n *\n * @param visible - true 면 표시, false 면 숨김\n */\n setRowVisible(visible: boolean): Promise<void>;\n /**\n * 범위에 걸친 열을 표시하거나 숨긴다. visible 이 null 이거나 undefined 면 아무것도 하지 않는다.\n *\n * @param visible - true 면 표시, false 면 숨김\n */\n setColumnVisible(visible: boolean): Promise<void>;\n /**\n * 범위 첫 행이 표시 상태인지 반환한다.\n */\n isRowVisible(): Promise<boolean | undefined>;\n /**\n * 범위 첫 열이 표시 상태인지 반환한다.\n */\n isColumnVisible(): Promise<boolean | undefined>;\n /**\n * 범위의 모든 셀에 같은 값을 넣는다. 값은 문자열로 바꾼 뒤 해석하므로 \"=\" 로 시작하면 수식이 되고, \"{=...}\" 형태이면 범위 전체를 한 덩어리로 묶는 배열 수식이 된다.\n * 범위가 기존 배열 수식 영역 안의 셀 하나이면 그 영역 전체를 다시 입력한다.\n * 배열 수식은 병합 셀이나 표 영역에 넣을 수 없다.\n * null 은 빈 셀이 되고, 객체는 JSON 표기로 들어가며, Date 처럼 문자열 표기를 갖는 객체는 그 문자열이 들어간다.\n * 배열은 원소를 각각 같은 규칙으로 바꿔 콤마로 이어 넣는다.\n *\n * @param value - 넣을 값. 자기 자신을 품은 배열·객체처럼 문자열 표기를 얻을 수 없는 값은 넣을 수 없다\n */\n setValue(value: string | number | boolean | null | Date | Record<string, unknown> | any[]): Promise<void>;\n /**\n * 범위의 셀마다 다른 값을 넣는다. 바깥 배열 인덱스가 범위 안의 행, 안쪽 배열 인덱스가 범위 안의 열에 대응하며 크기가 범위와 정확히 같아야 한다.\n * 각 값의 해석은 setValue 와 같지만 배열 수식은 넣을 수 없다.\n * null 과 undefined 는 빈 셀이 된다.\n * 전체 행·열 범위에는 쓸 수 없다.\n *\n * @param values - 범위 크기와 같은 행 우선 2차원 배열\n */\n setValues(values: (string | number | boolean | null | undefined | Date | Record<string, unknown> | any[])[][]): Promise<void>;\n /**\n * 범위 안 모든 셀의 값과 수식을 지운다. 서식은 그대로 남는다.\n */\n deleteValue(): Promise<void>;\n /**\n * 범위에 굵게를 적용하거나 해제한다.\n *\n * @param isOn - true 면 적용, false 면 해제\n */\n setFontBold(isOn: boolean): Promise<void>;\n /**\n * 범위에 기울임을 적용하거나 해제한다.\n *\n * @param isOn - true 면 적용, false 면 해제\n */\n setFontItalic(isOn: boolean): Promise<void>;\n /**\n * 범위에 밑줄을 적용하거나 해제한다.\n *\n * @param isOn - true 면 적용, false 면 해제. false 면 isDouble 은 무시된다\n * @param isDouble - true 면 이중 밑줄, false 면 실선 밑줄 (기본값: false)\n */\n setFontUnderline(isOn: boolean, isDouble?: boolean): Promise<void>;\n /**\n * 범위에 취소선을 적용하거나 해제한다.\n *\n * @param isOn - true 면 적용, false 면 해제\n */\n setFontStrikethrough(isOn: boolean): Promise<void>;\n /**\n * 범위 좌상단 셀이 굵게인지 반환한다.\n *\n * @returns 굵게가 아니면 undefined 다\n */\n isFontBold(): Promise<boolean | undefined>;\n /**\n * 범위 좌상단 셀이 기울임인지 반환한다.\n *\n * @returns 기울임이 아니면 undefined 다\n */\n isFontItalic(): Promise<boolean | undefined>;\n /**\n * 범위 좌상단 셀의 밑줄 종류를 반환한다.\n *\n * @returns 밑줄이 없으면 undefined 다\n */\n getFontUnderline(): Promise<\"single\" | \"double\" | undefined>;\n /**\n * 범위 좌상단 셀에 취소선이 있는지 반환한다.\n *\n * @returns 취소선이 없으면 undefined 다\n */\n isFontStrikethrough(): Promise<boolean | undefined>;\n /**\n * 범위의 글꼴을 바꾼다.\n *\n * @param name - 글꼴 이름\n */\n setFontName(name: string): Promise<void>;\n /**\n * 범위의 글꼴 크기를 바꾼다.\n *\n * @param size - 글꼴 크기(pt)\n */\n setFontSize(size: number | string): Promise<void>;\n /**\n * 범위의 글꼴 색을 바꾼다.\n *\n * @param color - \"#RRGGBB\" 형식의 색\n */\n setFontColor(color: string): Promise<void>;\n /**\n * 범위 좌상단 셀의 글꼴 이름을 반환한다. 글꼴을 따로 지정하지 않은 셀에는 문서 기본 글꼴 이름이 담긴다.\n */\n getFontName(): Promise<string | undefined>;\n /**\n * 범위 좌상단 셀의 글꼴 크기(pt)를 반환한다. 크기를 따로 지정하지 않은 셀에는 문서 기본 크기가 담긴다.\n */\n getFontSize(): Promise<number | undefined>;\n /**\n * 범위 좌상단 셀의 글꼴 색을 반환한다. 색을 따로 지정하지 않은 셀에는 문서 기본 색이 담긴다.\n *\n * @returns \"#RRGGBB\" 형식의 색\n */\n getFontColor(): Promise<string | undefined>;\n /**\n * 범위 좌상단 셀의 글꼴 서식을 한 번에 반환한다. 각 항목은 같은 이름의 개별 조회 메서드와 같되, underline 만 밑줄이 없을 때 undefined 가 아니라 \"none\" 이다.\n *\n * @returns 셀에 서식 정보가 없으면 undefined 다\n */\n getFont(): Promise<FontInfo | undefined>;\n /**\n * 범위를 단색 바탕색으로 채운다. 색을 주지 않으면 채우기를 지운다.\n *\n * @param color - \"#RRGGBB\" 형식의 색. null·undefined·빈 문자열이면 채우기를 지운다\n */\n setBackgroundColor(color?: string | null): Promise<void>;\n /**\n * 범위의 가로 정렬을 지정한다. 지정과 함께 범위의 들여쓰기가 0 으로 초기화된다.\n * HorizontalAlign 밖의 값도 검증 없이 저장되며, \"centerContinuous\" 와 \"center-across\" 는 가운데로, 그 밖의 값은 왼쪽으로 그려진다.\n *\n * @param value - 가로 정렬\n */\n setHorizontalAlign(value: HorizontalAlign): Promise<void>;\n /**\n * 범위의 세로 정렬을 지정한다. VerticalAlign 밖의 값도 검증 없이 저장되며, \"distributed\" 는 가운데로, 그 밖의 값은 아래로 그려진다.\n *\n * @param value - 세로 정렬\n */\n setVerticalAlign(value: VerticalAlign): Promise<void>;\n /**\n * 범위에 텍스트 줄바꿈을 적용하거나 해제한다.\n *\n * @param isOn - true 면 적용, false 면 해제\n */\n setWrapText(isOn: boolean): Promise<void>;\n /**\n * 범위 좌상단 셀의 바탕색을 반환한다. 채우기가 없을 때는 물론 그라디언트 채우기일 때도 색 하나로 표현할 수 없어 undefined 다. 채우기 종류까지 알아야 하면 getFill 을 쓴다.\n *\n * @returns \"#RRGGBB\" 형식의 색\n */\n getBackgroundColor(): Promise<string | undefined>;\n /**\n * 범위 좌상단 셀의 가로 정렬을 반환한다. 명시 지정된 값만 반환하며, HorizontalAlign 밖의 값이 반환될 수 있다.\n *\n * @returns 지정이 없으면 undefined 다\n */\n getHorizontalAlign(): Promise<string | undefined>;\n /**\n * 범위 좌상단 셀의 세로 정렬을 반환한다. 명시 지정된 값만 반환하며, VerticalAlign 밖의 값이 반환될 수 있다.\n * 지정이 없는 셀은 아래쪽으로 그려진다.\n *\n * @returns 지정이 없으면 undefined 다\n */\n getVerticalAlign(): Promise<string | undefined>;\n /**\n * 범위 좌상단 셀에 텍스트 줄바꿈이 적용되어 있는지 반환한다.\n *\n * @returns 줄바꿈이 적용되어 있지 않으면 undefined 다\n */\n isWrapText(): Promise<boolean | undefined>;\n /**\n * 범위 좌상단 셀의 채우기를 반환한다. 그라디언트 채우기는 종류만 담기고 색·방향 등 나머지는 담기지 않는다.\n *\n * @returns 채우기가 없으면 undefined 다\n */\n getFill(): Promise<FillInfo | undefined>;\n /**\n * 범위 좌상단 셀의 정렬 서식을 한 번에 반환한다. 각 항목은 같은 이름의 개별 조회 메서드와 같다.\n *\n * @returns 셀에 서식 정보가 없으면 undefined 다\n */\n getAlignment(): Promise<AlignmentInfo | undefined>;\n /**\n * 범위의 들여쓰기 수준을 1 올린다. 범위의 가로 정렬이 왼쪽이나 오른쪽 하나로 통일되어 있지 않으면 먼저 범위 전체를 왼쪽 정렬로 바꾼 뒤 올린다.\n */\n increaseIndent(): Promise<void>;\n /**\n * 범위의 들여쓰기 수준을 1 내린다. 0 보다 아래로는 내려가지 않는다.\n */\n decreaseIndent(): Promise<void>;\n /**\n * 범위 좌상단 셀의 들여쓰기 수준을 반환한다.\n *\n * @returns 들여쓰기가 지정되어 있지 않으면 0 이다\n */\n getIndent(): Promise<number>;\n /**\n * 범위에 테두리를 적용하거나 지운다. type 이 \"none\" 이면 범위의 테두리를 모두 지우고, 그 밖의 type 은 기존 테두리에 type 이 가리키는 테두리를 병합한다.\n * lineStyle 이 \"none\" 이면 type 이 가리키는 자리의 선만 지우며 color 는 무시된다.\n * 그릴 내부 선이 없으면 \"center\"·\"middle\"·\"cross\" 는 아무것도 하지 않는다.\n *\n * @param type - 테두리를 그릴 자리\n * @param lineStyle - 선 스타일 (기본값: \"thin\")\n * @param color - \"#RRGGBB\" 형식의 선 색 (기본값: \"#000000\")\n */\n setBorder(type: BorderType, lineStyle?: BorderLineStyle | null, color?: string | null): Promise<void>;\n /**\n * 범위 좌상단 셀의 테두리를 네 변과 대각선으로 나눠 반환한다. 실제로 그려진 선만 담긴다.\n *\n * @returns 셀에 서식 정보가 없으면 undefined 다\n */\n getBorder(): Promise<BorderInfo | undefined>;\n /**\n * 범위의 셀 서식(글꼴·채우기·정렬·테두리·표시 형식)을 지우고 범위 안의 병합을 해제한다. 값과 수식은 남는다.\n * 행 전체·열 전체 범위가 병합과 겹치면 오류가 난다.\n */\n clearFormat(): Promise<void>;\n /**\n * 범위의 모든 내용을 지운다. 값·수식·서식·병합·하이퍼링크·메모·데이터 유효성·스파크라인·필터·표가 대상이다.\n * 행 전체·열 전체 범위가 병합과 겹치면 오류가 난다.\n */\n clearAll(): Promise<void>;\n /**\n * 범위의 셀을 하나로 병합한다. 병합한 셀에는 좌상단 셀의 값만 남고 나머지 값은 사라진다.\n * 범위가 셀 하나이거나 표와 겹치면 아무것도 하지 않는다.\n * 병합이 범위 밖까지 걸쳐 있으면 오류가 난다.\n */\n merge(): Promise<void>;\n /**\n * 범위와 겹치는 병합을 모두 해제한다.\n */\n unmerge(): Promise<void>;\n /**\n * 범위와 겹치는 병합 영역의 주소를 A1 문자열 배열로 반환한다. 일부만 겹치는 병합도 범위에 맞춰 잘라내지 않고 병합 영역 전체 주소를 준다. 시트 전체의 병합 목록은 Worksheet.getMergeCellList 로 조회한다.\n */\n getMergeCellList(): Promise<string[]>;\n /**\n * 범위의 표시 형식을 형식 코드로 지정한다. 넘긴 코드는 사용자 정의 형식으로 저장된다.\n *\n * @param formatCode - 엑셀 호환 형식 코드 (\"#,##0.00\", \"yyyy-mm-dd\", \"0.00%\" 등)\n */\n setNumberFormat(formatCode: string): Promise<void>;\n /**\n * 범위 좌상단 셀의 표시 형식을 반환한다. 형식을 따로 지정하지 않은 셀에도 문서 기본 형식의 코드가 담긴다.\n *\n * @returns formatCode 는 setNumberFormat 에 그대로 넘길 수 있는 형식 코드다\n */\n getNumberFormat(): Promise<{ formatCode: string }>;\n /**\n * 범위에 조건부 서식 규칙을 추가한다. 추가한 규칙이 기존 규칙보다 먼저 적용된다.\n * 규칙 내용이 잘못되었다면 동작하지 않는다.\n *\n * @param rule - 추가할 규칙\n */\n addConditionalFormat(rule: ConditionalFormatRule): Promise<void>;\n /**\n * 범위와 겹치는 조건부 서식 규칙을 지운다. 규칙이 범위 밖까지 걸쳐 있으면 겹치는 부분만 규칙의 적용 범위에서 빼고, 규칙 전체가 범위 안에 들면 규칙 자체를 지운다.\n */\n clearConditionalFormats(): Promise<void>;\n /**\n * 범위에 데이터 유효성 검사 규칙을 적용한다. 셀 하나에는 규칙 하나만 걸리므로, 겹치는 기존 규칙은 겹치는 만큼 적용 범위에서 물러나고 이 규칙으로 바뀐다.\n * 규칙 내용이 잘못되었다면 동작하지 않는다.\n *\n * @param rule - 규칙 객체. type 은 DataValidationType, operator 는 DataValidationOperator, errorStyle 은 DataValidationErrorStyle 어휘를 쓰며, 타입에 따라 formula 와 안내·오류 메시지를 함께 담는다\n */\n setDataValidation(rule: Record<string, unknown>): Promise<void>;\n /**\n * 범위와 겹치는 데이터 유효성 검사 규칙을 지운다. 규칙이 범위 밖까지 걸쳐 있으면 겹치는 부분만 적용 범위에서 뺀다.\n */\n clearDataValidation(): Promise<void>;\n /**\n * 범위를 지정한 열의 값 기준으로 정렬한다. 범위가 필터나 표 영역 안의 셀 하나이면 그 필터의 정렬로 처리되어 정렬 상태가 문서에 남는다. 머리글 행은 자동으로 가려낸다.\n * 정렬할 값이 없거나 범위 안 병합의 크기가 제각각이면 정렬할 수 없다.\n *\n * @param key - 정렬 기준 열. 범위의 첫 열을 0 으로 세는 0-based 오프셋이며 범위 너비를 벗어날 수 없다\n * @param order - 정렬 방향. SortOrder 의 오름차순·내림차순 두 값만 받는다\n * @param options - 아직 지원하지 않는 예약 인자. 값이 담긴 객체를 주면 정렬하지 않는다\n */\n sort(key: number, order: SortOrder, options?: Record<string, unknown>): Promise<void>;\n /**\n * 범위 좌상단 셀에 메모를 넣는다. 메모가 이미 있으면 본문만 바꾸고 표시 상태와 위치는 그대로 둔다.\n *\n * @param text - 메모 본문. 서식 없는 텍스트이며 줄바꿈은 \"\\n\" 이다\n */\n setComment(text: string): Promise<void>;\n /**\n * 범위 안의 메모를 모두 지운다.\n */\n deleteComment(): Promise<void>;\n /**\n * 범위 좌상단 셀 메모의 표시 상태를 바꾼다. 메모가 없다면 동작하지 않는다.\n *\n * @param visible - true 면 항상 표시, false 면 마우스를 올렸을 때만 표시\n */\n setCommentVisible(visible: boolean): Promise<void>;\n /**\n * 범위와 겹치는 하이퍼링크 목록을 반환한다. 일부만 겹치는 링크도 포함한다.\n */\n getHyperlinkList(): Promise<HyperlinkInfo[]>;\n /**\n * 범위에 하이퍼링크를 넣는다. 링크와 링크 서식(파란색 밑줄)은 범위 전체에 들어가지만 표시 텍스트는 좌상단 셀에만 들어간다.\n */\n setHyperlink(options: HyperlinkOptions): Promise<void>;\n /**\n * 범위와 포함 관계인 하이퍼링크를 지운다. 범위가 링크를 품거나 링크가 범위를 품는 경우이며, 일부만 겹치는 링크는 남는다.\n * 셀 값은 그대로 두고 링크 서식(파란색 밑줄)만 함께 지우며, 지운 링크와 겹쳐 있던 다른 링크의 서식은 되살린다.\n */\n removeHyperlink(): Promise<void>;\n }\n\n /**\n * 워크시트에 놓인 차트 하나를 가리키는 핸들이다.\n * 차트의 종류와 스타일, 제목·축 제목·범례·데이터레이블·눈금선, 데이터 소스 범위와 놓인 자리를 다룬다.\n */\n export interface Chart {\n // ChartApiMixin\n /**\n * 차트 종류를 반환한다. ChartType 에 없는 종류는 \"unknown\" 을 반환한다.\n */\n getType(): Promise<string>;\n /**\n * 이 차트를 편집할 수 있는지 반환한다. 외부 데이터를 소스로 하는 차트는 조회만 되고 편집은 되지 않는다.\n */\n isEditable(): Promise<boolean>;\n /**\n * 차트 제목을 반환한다. 제목을 설정하지 않았으면 빈 문자열을 반환한다.\n */\n getTitle(): Promise<string>;\n /**\n * 지정한 축의 제목을 반환한다. 제목을 설정하지 않았으면 빈 문자열이고, 축 제목을 갖지 않는 차트 종류(원형 계열·도넛·방사형)는 null 을 반환한다.\n *\n * @param axis - 제목을 읽을 축(가로축 또는 세로축)\n */\n getAxisTitle(axis: ChartAxis): Promise<string | null>;\n /**\n * 범례 위치를 반환한다. 범례를 숨긴 차트는 \"none\" 이고, 위치를 알아낼 수 없는 차트는 \"right\" 로 보고한다.\n */\n getLegendPosition(): Promise<ChartLegendPosition>;\n /**\n * 데이터레이블 위치를 반환한다. 데이터레이블을 표시하지 않는 차트는 \"none\" 을 반환한다.\n */\n getDataLabelPosition(): Promise<ChartDataLabelPosition>;\n /**\n * 지정한 축의 눈금선 종류를 반환한다. 눈금선을 꺼 둔 축은 \"none\" 이고, 그 축의 눈금선을 갖지 않는 차트 종류(원형 계열·도넛은 양축, 방사형은 세로축)는 null 을 반환한다.\n *\n * @param axis - 눈금선을 읽을 축(가로축 또는 세로축)\n */\n getGridLine(axis: ChartAxis): Promise<ChartGridLineType | null>;\n /**\n * 차트 종류를 바꾼다. 지금 종류와 같은 값을 넘기면 아무것도 바뀌지 않는다.\n *\n * @param chartType - 바꿀 차트 종류(enum 문자열, 예: \"clustered_column\")\n */\n setType(chartType: ChartType): Promise<void>;\n /**\n * 차트의 프리셋 스타일을 바꾼다. 번호에 대응하는 실제 색은 문서 테마를 따른다.\n *\n * @param style - 스타일 번호(1~12 정수). 세 개씩 색 그룹이 나뉘고(1~3, 4~6, 7~9, 10~12), 한 그룹 안의 세 번호는 배경만 다르다(반투명 배경, 흰색 배경, 색상 배경과 계열 테두리 순)\n */\n setStyle(style: number): Promise<void>;\n /**\n * 차트 제목을 설정한다.\n *\n * @param title - 차트에 표시할 제목\n */\n setTitle(title: string): Promise<void>;\n /**\n * 지정한 축의 제목을 설정한다. 축 제목은 원형 계열·도넛·방사형을 뺀 차트 종류에서 지원한다.\n *\n * @param axis - 제목을 설정할 축(가로축 또는 세로축)\n * @param title - 축에 표시할 제목\n */\n setAxisTitle(axis: ChartAxis, title: string): Promise<void>;\n /**\n * 범례 위치를 설정한다. \"none\" 을 넘기면 범례를 숨긴다.\n *\n * @param position - 범례를 놓을 자리\n */\n setLegendPosition(position: ChartLegendPosition): Promise<void>;\n /**\n * 데이터레이블 위치를 설정한다. \"none\" 을 넘기면 데이터레이블을 숨긴다.\n * 쓸 수 있는 위치는 차트 종류마다 다르며, \"none\" 은 모든 종류에서 쓸 수 있다.\n *\n * @param position - 데이터레이블을 놓을 자리\n */\n setDataLabelPosition(position: ChartDataLabelPosition): Promise<void>;\n /**\n * 지정한 축의 눈금선을 설정한다. \"none\" 을 넘기면 그 축의 눈금선을 숨긴다.\n * 그 축의 눈금선을 갖지 않는 차트 종류(원형 계열·도넛은 양축, 방사형은 세로축)는 \"none\" 을 포함해 어떤 값을 넘겨도 오류가 발생한다.\n *\n * @param axis - 눈금선을 설정할 축(가로축 또는 세로축)\n * @param gridType - 표시할 눈금선 종류\n */\n setGridLine(axis: ChartAxis, gridType: ChartGridLineType): Promise<void>;\n // own\n /**\n * 이 차트를 식별하는 고유 ID 를 반환한다.\n */\n getId(): Promise<string>;\n /**\n * 차트가 데이터로 삼는 셀 범위를 시트 이름을 앞에 붙인 A1 표기 문자열로 반환한다(\"Sheet1!A1:C5\").\n * 참조가 여러 시트에 걸쳐 있거나 하나의 사각 영역으로 합쳐지지 않으면 null 을 반환한다.\n */\n getDataRange(): Promise<string | null>;\n /**\n * 차트의 서식 상태에 이 차트의 식별자와 데이터 범위를 더해 반환한다.\n * 서식 값은 공통 표면이 주는 것과 같고, oid 와 range 만 셀이 더한다.\n */\n getChartInfo(): Promise<ChartInfo>;\n /**\n * 차트를 삭제한다.\n */\n delete(): Promise<CommandResult>;\n /**\n * 차트의 데이터 소스 범위를 바꾼다. 행과 열은 각각 100 개까지 지원한다.\n * 시트를 지정하지 않으면 차트가 놓인 시트의 영역으로 처리한다.\n * seriesBy 를 생략하면 지금의 시리즈 방향을 유지한다.\n *\n * @param dataRange - 새 데이터 범위. A1 표기 문자열로도 지정할 수 있다(\"A1:B2\", 단일 셀은 \"E10\", 다른 시트는 \"Sheet2!A1:C5\")\n * @param seriesBy - 시리즈 방향. rows 는 행 하나가, columns 는 열 하나가 시리즈가 되고, auto 는 새 범위의 모양에 맞춰 정한다. 분산형과 거품형 차트는 rows·columns 를 받지 않는다\n */\n setDataRange(dataRange: string | SheetRangeCoords | RangeCoords, seriesBy?: \"auto\" | \"rows\" | \"columns\"): Promise<void>;\n /**\n * 데이터의 행과 열을 맞바꿔 시리즈 방향을 전환한다. 호출할 때마다 방향이 번갈아 바뀐다.\n * 분산형과 거품형 차트는 전환할 수 없고, 데이터 범위가 없거나 행이나 열이 100개를 넘는 차트도 전환할 수 없다.\n */\n switchRowColumn(): Promise<void>;\n /**\n * 차트의 왼쪽 위 모서리를 지정한 셀로 옮긴다. 크기는 그대로 둔다.\n * startCell 에 여러 셀로 이루어진 범위를 넘기면 그 범위의 왼쪽 위 셀만 쓰고 나머지는 무시한다.\n *\n * @param startCell - 옮겨 놓을 셀. A1 표기 문자열로도 지정할 수 있다(\"A1:B2\", 단일 셀은 \"E10\")\n */\n setPosition(startCell: string | RangeCoords): Promise<void>;\n }\n\n /**\n * 워크시트에 놓인 표 하나를 다루는 핸들이다.\n * 표의 영역과 표시 옵션, 표에 딸린 자동 필터를 다룬다.\n * 문서를 공동 편집하는 중에는 표를 바꿀 수 없다.\n */\n export interface Table {\n /**\n * 지정된 표 이름을 반환한다.\n */\n getName(): Promise<string>;\n /**\n * 머리글 행과 요약 행을 포함한 표 전체 영역의 Range 핸들을 반환한다.\n * 반환한 Range 는 호출 시점의 좌표를 담고 있어, 이후 표 영역이 바뀌어도 따라가지 않는다.\n */\n getRange(): Promise<Range>;\n /**\n * 표의 표시 옵션을 한 번에 반환한다.\n */\n getOptions(): Promise<TableOptions>;\n /**\n * 표를 삭제한다. 표 정의와 표에 딸린 자동 필터를 없애고 표 영역의 셀 내용까지 지운다.\n */\n delete(): Promise<void>;\n /**\n * 표 영역을 새 범위로 변경한다.\n * 새 영역은 머리글 행 위치를 그대로 두면서 현재 표 영역과 겹쳐야 하고 두 셀 이상이어야 하며, 전체 행이나 전체 열은 지정할 수 없다.\n * 현재 영역과 같은 영역을 넘기면 아무것도 바꾸지 않는다.\n *\n * @param range - 새 표 영역. A1 표기 문자열로도 지정할 수 있다(\"A1:B2\", 단일 셀은 \"E10\")\n */\n resize(range: string | RangeCoords): Promise<void>;\n /**\n * 표의 표시 옵션을 변경한다. 지정한 옵션만 적용하고 나머지는 현재 값을 그대로 둔다.\n * 머리글 행이나 요약 행을 켤 때 표 바로 바깥의 인접한 행이 비어 있지 않으면 시트에 행을 새로 삽입해 아래 내용을 밀어내고, 끌 때는 그 행의 셀 값을 지운다.\n * 머리글 행을 켜면 표의 자동 필터가 함께 만들어지고, 끄면 제거된다.\n * 표 스타일은 이 메서드로 바꿀 수 없다.\n *\n * @param options - 바꿀 옵션\n */\n setOptions(options: TableOptionUpdate): Promise<void>;\n /**\n * 머리글 행 표시 여부를 변경한다.\n * 켤 때 표 바로 바깥의 인접한 행이 비어 있지 않으면 시트에 행을 새로 삽입해 아래 내용을 밀어내고, 끌 때는 그 행의 셀 값을 지운다.\n * 머리글 행을 켜면 표의 자동 필터가 함께 만들어지고, 끄면 제거된다.\n */\n setHeaderRow(isOn: boolean): Promise<void>;\n /**\n * 요약 행 표시 여부를 변경한다.\n * 켤 때 표 바로 바깥의 인접한 행이 비어 있지 않으면 시트에 행을 새로 삽입해 아래 내용을 밀어내고, 끌 때는 그 행의 셀 값을 지운다.\n */\n setTotalsRow(isOn: boolean): Promise<void>;\n /**\n * 첫 열 강조 여부를 변경한다.\n */\n setFirstColumn(isOn: boolean): Promise<void>;\n /**\n * 마지막 열 강조 여부를 변경한다.\n */\n setLastColumn(isOn: boolean): Promise<void>;\n /**\n * 행 줄무늬 표시 여부를 변경한다.\n */\n setBandedRows(isOn: boolean): Promise<void>;\n /**\n * 열 줄무늬 표시 여부를 변경한다.\n */\n setBandedColumns(isOn: boolean): Promise<void>;\n /**\n * 표 이름을 변경한다. 표 이름을 참조하는 수식은 새 이름으로 함께 갱신된다.\n * 이 핸들은 새 이름을 가리키므로 계속 쓸 수 있지만, 같은 표를 가리키던 다른 핸들과 이 표에서 미리 받아 둔 Filter 핸들은 더 이상 쓸 수 없다.\n * 다른 표가 같은 이름을 쓰고 있으면 변경할 수 없으며, 이때 대소문자는 구분하지 않는다.\n *\n * @param name - 새 표 이름. 공백이나 허용되지 않는 문자를 쓸 수 없고, 셀 참조로 읽히는 이름이나 최대 길이를 넘는 이름도 받지 않는다\n */\n setName(name: string): Promise<void>;\n /**\n * 이 표의 자동 필터 핸들을 반환한다.\n * 표의 필터링은 표 구조에 내재하므로 아직 필터가 만들어지지 않았어도 핸들을 반환하며, 필터가 있는지는 Filter 의 getInfo() 로 확인한다.\n */\n getFilter(): Promise<Filter>;\n /**\n * 표의 이름·위치·영역과 표시 옵션을 한 번에 반환한다.\n */\n getInfo(): Promise<TableInfo>;\n }\n\n /**\n * 시트 또는 표의 자동 필터를 가리키는 핸들이다.\n * 필터 영역과 열별 필터 조건, 필터 영역의 정렬 상태를 다룬다.\n */\n export interface Filter {\n /**\n * 자동 필터를 만든다.\n * 시트 필터는 range 로 지정한 영역에 만들며, range 를 생략하면 현재 선택 영역을 둘러싼 데이터 영역으로 넓혀 잡는다.\n * 표 필터는 range 를 무시하고 요약 행을 뺀 표 영역에 만든다.\n * 대상에 이미 필터가 있으면 만들 수 없고, range 를 생략했는데 선택 영역이 빈 셀 하나뿐이어도 만들 수 없다.\n *\n * @param range - 필터를 만들 영역. A1 표기 문자열로도 지정할 수 있다(\"A1:B2\", 단일 셀은 \"E10\")\n */\n create(range?: string | RangeCoords): Promise<void>;\n /**\n * 지정한 열에 필터 조건을 적용한다. criteria 가 null 이면 그 열의 조건을 해제한다.\n * 머리글 셀이 병합된 열을 지정하면 병합 영역의 첫 열에 적용된다.\n * 시트 필터는 미리 create() 로 만들어 두어야 하지만, 표는 필터가 없을 때 조건을 적용하면 필터가 함께 만들어진다.\n *\n * @param colId - 대상 열. 필터 영역 첫 열부터 센 0-based 오프셋이며(0 = 첫 열), getInfo() 의 columns[].colId 와 같은 좌표계다\n * @param criteria - 적용할 조건. filterType 에 따라 값 목록·사용자 지정·상위 하위·동적 필터 중 한 스키마를 쓰며, 종류와 연산자 어휘는 FilterType·FilterOperator·FilterDynamicType 상수로 지정한다. null 이면 조건을 해제한다\n */\n applyFilter(colId: number, criteria: Record<string, unknown> | null): Promise<void>;\n /**\n * 필터 조건을 해제한다. colId 를 지정하면 그 열만, 생략하면 조건이 걸린 모든 열을 해제한다.\n * 필터 버튼은 그대로 남는다.\n * 해제할 조건이 없거나 표에 아직 필터가 없으면 아무것도 바꾸지 않는다.\n *\n * @param colId - 해제할 열. 필터 영역 첫 열부터 센 0-based 오프셋이며(0 = 첫 열), 생략하면 모든 열을 해제한다\n */\n clearFilter(colId?: number): Promise<void>;\n /**\n * 필터 영역을 지정한 열 기준으로 정렬하고, 정렬 상태를 필터에 남긴다.\n * 머리글 셀이 병합된 열을 지정하면 병합 영역의 첫 열을 기준으로 정렬한다.\n * 표는 필터가 없으면 정렬하면서 함께 만들지만, 시트는 자동으로 만들지 않아 create() 로 먼저 만들어야 한다.\n *\n * @param colId - 정렬 기준 열. 필터 영역 첫 열부터 센 0-based 오프셋이며(0 = 첫 열), getInfo() 의 sort.colId 와 같은 좌표계다\n * @param order - 정렬 방향. SortOrder 의 오름차순·내림차순 두 값만 받는다\n * @returns 이어서 호출할 수 있도록 이 핸들을 그대로 반환한다\n */\n sort(colId: number, order: SortOrder): Promise<Filter>;\n /**\n * 자동 필터를 없앤다. 필터 영역과 열 조건이 함께 사라진다.\n */\n remove(): Promise<void>;\n /**\n * 필터 영역과 열별 조건, 필터로 숨겨진 행 수, 정렬 상태를 반환한다.\n * 필터가 아직 없으면 enabled 만 false 로 담고 나머지 필드는 넣지 않는다.\n */\n getInfo(): Promise<FilterInfo>;\n }\n\n /**\n * 통합 문서에 정의된 이름 하나를 다루는 핸들이다.\n * 이름이 가리키는 수식과 그 이름의 사용 범위를 다룬다.\n */\n export interface Name {\n /**\n * 지정된 이름을 반환한다.\n */\n getName(): Promise<string>;\n /**\n * 이 이름의 사용 범위인 시트 이름을 반환한다.\n *\n * @returns 특정 시트에서만 쓰는 이름이면 그 시트 이름, 문서 전체에서 쓰는 이름이면 null\n */\n getSheetName(): Promise<string | null>;\n /**\n * 이 이름이 가리키는 수식을 `=` 로 시작하는 형태로 반환한다.\n * 수식의 상대 참조는 활성 시트의 활성 셀을 기준으로 풀어 쓰므로, 같은 이름이라도 활성 셀이 달라지면 반환값이 달라질 수 있다.\n */\n getFormula(): Promise<string>;\n /**\n * 이 이름이 실제로 가리키는 영역을 반환한다. 영역이 여럿이면 콤마로 이어 붙이고, 각 영역에는 시트 이름을 항상 붙인다.\n * 행이나 열이 삽입·삭제되어 참조가 밀려도 지금 가리키는 위치를 돌려준다.\n *\n * @returns 상수나 오류를 가리키는 이름, 지원하지 않는 함수를 쓴 이름이면 빈 문자열\n */\n getRanges(): Promise<string>;\n /**\n * 정의된 이름의 이름을 바꾼다. 이 핸들도 새 이름을 가리키므로 바꾼 뒤에도 계속 쓸 수 있다.\n * 같은 범위에 같은 이름이 이미 있거나 같은 이름의 표가 있으면 바꿀 수 없다. 이때 대소문자는 구분하지 않지만, 대소문자만 바꾸는 변경은 중복으로 보지 않는다.\n *\n * @param newName - 새 이름. 공백이나 허용되지 않는 문자를 쓸 수 없고, 예약된 이름이나 셀 참조로 읽히는 이름, 최대 길이를 넘는 이름도 받지 않는다\n */\n setName(newName: string): Promise<void>;\n /**\n * 정의된 이름이 가리킬 수식을 바꾼다.\n * 수식에 시트를 적지 않은 참조는 이름의 사용 범위와 무관하게 활성 시트 기준으로 해석한다.\n *\n * @param formula - 새 수식 또는 참조. `=` 로 시작해도 되고 아니어도 된다\n */\n setFormula(formula: string): Promise<void>;\n /**\n * 정의된 이름의 이름과 수식을 한 번에 바꾼다.\n * 바꿀 항목을 하나도 주지 않으면 오류가 난다.\n *\n * @param fields - 바꿀 항목\n */\n update(fields: NameUpdate): Promise<void>;\n /**\n * 정의된 이름을 삭제한다. 삭제한 뒤에는 이 핸들로 수식을 조회하거나 내용을 바꿀 수 없다.\n */\n delete(): Promise<void>;\n /**\n * 이름과 사용 범위 시트, 수식을 한 번에 반환한다.\n * name 은 getName(), formula 는 getFormula() 와 같은 규칙을 따른다.\n */\n getInfo(): Promise<NameInfo>;\n }\n}\n","/* eslint-disable */\n/**\n * Thinkfree Office SDK Type Definitions\n *\n * ⚠️ AUTO-GENERATED — DO NOT EDIT.\n * 오피스 구현 저장소(비공개)의 API JSDoc 에서 생성된다 — 수정은 원본 JSDoc 에서.\n *\n * proxy 메서드는 postMessage bridge 를 거치므로 Promise 를 반환한다.\n * Generated: 2026-09-22\n */\n\n// Thinkfree Office SDK (Show)\n\n// 공통 enum — 정의·값은 common 모듈(SDK flat export)에만 있다. 여기서는 시그니처 참조용 type import 만 한다.\nimport type { LineDash, ShapePreset, ShapeZOrder, ChartType, ChartGridLineType, ChartAxis, ChartLegendPosition, ChartDataLabelPosition } from \"./common-api.generated.js\";\n\n// 실제(비-ambient) 모듈 네임스페이스 — 단일 번들 d.ts 에서 `Show.X` 로 타입·런타임\n// enum 값을 모두 노출한다. index 의 `export * as` 재수출은 tsup dts 롤업에서 const+type\n// 선언 병합의 값 의미가 타입 전용으로 강등되므로 쓰지 않는다 (dts.config 의 namespace 키).\nexport namespace Show {\n // =============================================================================\n // Constants / Enums\n // =============================================================================\n\n /** 도형 종류 (모델 shape type 값). 도형 조회·판별에서 도형의 유형을 구분하는 값으로 사용한다. */\n export const ShapeType = {\n /** 일반 도형 */\n SHAPE: \"sp\",\n /** 이미지(그림) */\n IMAGE: \"pic\",\n /** 연결선 */\n CONNECTOR: \"cxnSp\",\n /** 그룹 */\n GROUP: \"grpSp\",\n /** 차트 */\n CHART: \"chart\",\n /** 표 */\n TABLE: \"tbl\",\n /** 다이어그램 */\n DIAGRAM: \"diagram\",\n /** OLE 개체 */\n OLE_OBJECT: \"ole\",\n /** 컨트롤 개체 */\n CONTROL: \"control\",\n } as const;\n export type ShapeType = typeof ShapeType[keyof typeof ShapeType];\n\n /** 슬라이드 레이아웃의 개체 틀(placeholder) 종류 (OOXML ST_PlaceholderType). */\n export const PlaceholderType = {\n /** 제목 */\n TITLE: \"title\",\n /** 가운데 제목 (제목 슬라이드용) */\n CTR_TITLE: \"ctrTitle\",\n /** 부제목 */\n SUB_TITLE: \"subTitle\",\n /** 본문 */\n BODY: \"body\",\n /** 개체(내용) */\n OBJECT: \"obj\",\n /** 차트 */\n CHART: \"chart\",\n /** 표 */\n TABLE: \"tbl\",\n /** 클립아트 */\n CLIP_ART: \"clipArt\",\n /** 다이어그램 */\n DIAGRAM: \"dgm\",\n /** 미디어 */\n MEDIA: \"media\",\n /** 날짜 */\n DATE: \"dt\",\n /** 슬라이드 번호 */\n SLIDE_NUM: \"sldNum\",\n /** 바닥글 */\n FOOTER: \"ftr\",\n /** 머리글 (유인물·슬라이드 노트용) */\n HEADER: \"hdr\",\n /** 그림 */\n PICTURE: \"pic\",\n /** 슬라이드 이미지 (슬라이드 노트용) */\n SLIDE_IMAGE: \"sldImg\",\n } as const;\n export type PlaceholderType = typeof PlaceholderType[keyof typeof PlaceholderType];\n\n /**\n * 슬라이드 레이아웃 종류 (OOXML ST_SlideLayoutType).\n * setLayout/insertSlide/findSlides 에서 레이아웃을 지정·필터하는 값으로 사용한다.\n * 한 마스터에 같은 type 이 여럿일 수 있으며, 이때는 순서상 첫 번째가 선택된다.\n */\n export const SlideLayoutType = {\n /** 제목 슬라이드 */\n TITLE: \"title\",\n /** 제목과 텍스트 */\n TX: \"tx\",\n /** 제목과 2단 텍스트 */\n TWO_COL_TX: \"twoColTx\",\n /** 제목과 표 */\n TBL: \"tbl\",\n /** 텍스트(왼쪽)와 차트(오른쪽) */\n TX_AND_CHART: \"txAndChart\",\n /** 차트(왼쪽)와 텍스트(오른쪽) */\n CHART_AND_TX: \"chartAndTx\",\n /** 다이어그램 */\n DGM: \"dgm\",\n /** 차트 */\n CHART: \"chart\",\n /** 텍스트와 클립아트 */\n TX_AND_CLIP_ART: \"txAndClipArt\",\n /** 클립아트와 텍스트 */\n CLIP_ART_AND_TX: \"clipArtAndTx\",\n /** 제목만 */\n TITLE_ONLY: \"titleOnly\",\n /** 빈 화면 */\n BLANK: \"blank\",\n /** 텍스트와 개체 */\n TX_AND_OBJ: \"txAndObj\",\n /** 개체와 텍스트 */\n OBJ_AND_TX: \"objAndTx\",\n /** 개체만 */\n OBJ_ONLY: \"objOnly\",\n /** 제목과 개체 */\n OBJ: \"obj\",\n /** 텍스트와 미디어 */\n TX_AND_MEDIA: \"txAndMedia\",\n /** 미디어와 텍스트 */\n MEDIA_AND_TX: \"mediaAndTx\",\n /** 텍스트 위에 개체 */\n OBJ_OVER_TX: \"objOverTx\",\n /** 개체 위에 텍스트 */\n TX_OVER_OBJ: \"txOverObj\",\n /** 텍스트와 개체 2개 */\n TX_AND_TWO_OBJ: \"txAndTwoObj\",\n /** 개체 2개와 텍스트 */\n TWO_OBJ_AND_TX: \"twoObjAndTx\",\n /** 텍스트 위에 개체 2개 */\n TWO_OBJ_OVER_TX: \"twoObjOverTx\",\n /** 개체 4개 */\n FOUR_OBJ: \"fourObj\",\n /** 세로 텍스트 */\n VERT_TX: \"vertTx\",\n /** 클립아트와 세로 텍스트 */\n CLIP_ART_AND_VERT_TX: \"clipArtAndVertTx\",\n /** 세로 제목과 텍스트 */\n VERT_TITLE_AND_TX: \"vertTitleAndTx\",\n /** 세로 제목과 차트 위 텍스트 */\n VERT_TITLE_AND_TX_OVER_CHART: \"vertTitleAndTxOverChart\",\n /** 개체 2개 */\n TWO_OBJ: \"twoObj\",\n /** 개체 1개와 개체 2개 */\n OBJ_AND_TWO_OBJ: \"objAndTwoObj\",\n /** 개체 2개와 개체 1개 */\n TWO_OBJ_AND_OBJ: \"twoObjAndObj\",\n /** 사용자 정의 */\n CUST: \"cust\",\n /** 구역 머리글 */\n SEC_HEAD: \"secHead\",\n /** 텍스트 2개와 개체 2개 */\n TWO_TX_TWO_OBJ: \"twoTxTwoObj\",\n /** 제목, 개체, 캡션 텍스트 */\n OBJ_TX: \"objTx\",\n /** 그림과 캡션 텍스트 */\n PIC_TX: \"picTx\",\n } as const;\n export type SlideLayoutType = typeof SlideLayoutType[keyof typeof SlideLayoutType];\n\n /** 보기 배율/맞춤. */\n export const ViewMode = {\n /** 창 크기에 맞춤 */\n FIT_IN_WINDOW: \"fitInWindow\",\n /** 50% */\n ZOOM_50: \"50\",\n /** 75% */\n ZOOM_75: \"75\",\n /** 100% */\n ZOOM_100: \"100\",\n /** 150% */\n ZOOM_150: \"150\",\n /** 200% */\n ZOOM_200: \"200\",\n /** 300% */\n ZOOM_300: \"300\",\n /** 400% */\n ZOOM_400: \"400\",\n } as const;\n export type ViewMode = typeof ViewMode[keyof typeof ViewMode];\n\n /** 모두 선택(select_all) 범위. */\n export const SelectScope = {\n /** 현재 슬라이드의 모든 도형 */\n SHAPE: \"shape\",\n /** 모든 슬라이드 */\n SLIDE: \"slide\",\n /** 편집 중인 텍스트 전체 */\n TEXT: \"text\",\n } as const;\n export type SelectScope = typeof SelectScope[keyof typeof SelectScope];\n\n /** 텍스트 런(run) 서식 속성 이름. 서식 조회·적용 시 대상 속성을 지정하는 키로 사용한다. */\n export const RunProperty = {\n /** 글자 크기 */\n FONT_SIZE: \"fontSize\",\n /** 굵게 */\n BOLD: \"bold\",\n /** 기울임꼴 */\n ITALIC: \"italic\",\n /** 밑줄 */\n UNDERLINE: \"underline\",\n /** 취소선 */\n STRIKE: \"strike\",\n /** 글꼴 */\n FONT_FAMILY: \"fontFamily\",\n /** 기준선 이동(위/아래 첨자) */\n BASELINE_SHIFT: \"baselineShift\",\n } as const;\n export type RunProperty = typeof RunProperty[keyof typeof RunProperty];\n\n /** 도형 대칭(뒤집기) 방향. */\n export const FlipDirection = {\n /** 좌우 대칭 */\n HORIZONTAL: \"horizontal\",\n /** 상하 대칭 */\n VERTICAL: \"vertical\",\n } as const;\n export type FlipDirection = typeof FlipDirection[keyof typeof FlipDirection];\n\n /** 도형 효과 종류 — 그림자·반사·네온·부드러운 가장자리. */\n export const EffectType = {\n /** 바깥쪽 그림자 */\n OUTER_SHADOW: \"outerShdw\",\n /** 안쪽 그림자 */\n INNER_SHADOW: \"innerShdw\",\n /** 반사 */\n REFLECTION: \"reflection\",\n /** 네온 */\n GLOW: \"glow\",\n /** 부드러운 가장자리 */\n SOFT_EDGE: \"softEdge\",\n } as const;\n export type EffectType = typeof EffectType[keyof typeof EffectType];\n\n /** 선 끝 모양 (OOXML ST_LineCap). */\n export const LineCap = {\n /** 평면 끝 */\n FLAT: \"flat\",\n /** 둥근 끝 */\n ROUND: \"rnd\",\n /** 사각형 끝 */\n SQUARE: \"sq\",\n } as const;\n export type LineCap = typeof LineCap[keyof typeof LineCap];\n\n /** 선 연결(모서리) 모양. */\n export const LineJoin = {\n /** 둥근 모서리 */\n ROUND: \"round\",\n /** 빗면(경사) 모서리 */\n BEVEL: \"bevel\",\n /** 각진 모서리 */\n MITER: \"miter\",\n } as const;\n export type LineJoin = typeof LineJoin[keyof typeof LineJoin];\n\n /** 선 끝 화살표 머리 모양 (OOXML ST_LineEndType). */\n export const LineEndType = {\n /** 없음 */\n NONE: \"none\",\n /** 삼각형 화살표 */\n TRIANGLE: \"triangle\",\n /** 스텔스(오목한) 화살표 */\n STEALTH: \"stealth\",\n /** 마름모 */\n DIAMOND: \"diamond\",\n /** 원형 */\n OVAL: \"oval\",\n /** 열린 화살표 */\n ARROW: \"arrow\",\n } as const;\n export type LineEndType = typeof LineEndType[keyof typeof LineEndType];\n\n /** 선 끝 화살표 머리 크기. */\n export const LineEndSize = {\n /** 작게 */\n SMALL: \"sm\",\n /** 보통 */\n MEDIUM: \"med\",\n /** 크게 */\n LARGE: \"lg\",\n } as const;\n export type LineEndSize = typeof LineEndSize[keyof typeof LineEndSize];\n\n /** 텍스트 가로 정렬 (OOXML ST_TextAlignType). */\n export const TextAlignH = {\n /** 왼쪽 정렬 */\n LEFT: \"l\",\n /** 가운데 정렬 */\n CENTER: \"ctr\",\n /** 오른쪽 정렬 */\n RIGHT: \"r\",\n /** 양쪽 맞춤 */\n JUSTIFY: \"just\",\n /** 균등 분할 */\n DISTRIBUTE: \"dist\",\n } as const;\n export type TextAlignH = typeof TextAlignH[keyof typeof TextAlignH];\n\n /** 줄 간격 지정 방식. */\n export const LineSpacingType = {\n /** 줄 높이의 배수 */\n MULTIPLE: \"multiple\",\n /** 고정 값(포인트) */\n EXACT: \"exact\",\n } as const;\n export type LineSpacingType = typeof LineSpacingType[keyof typeof LineSpacingType];\n\n /** 슬라이드 전환 속도 (모델 spd 값). */\n export const SpeedType = {\n /** 느리게 */\n SLOW: \"slow\",\n /** 보통 */\n MED: \"med\",\n /** 빠르게 */\n FAST: \"fast\",\n } as const;\n export type SpeedType = typeof SpeedType[keyof typeof SpeedType];\n\n /** 슬라이드 전환 효과 종류 (setTransition 의 type). */\n export const TransitionType = {\n /** 없음 */\n NONE: \"none\",\n /** 임의(무작위 전환) */\n RANDOM: \"random\",\n /** 밝기 변화 */\n FADE: \"fade\",\n /** 밀어내기 */\n PUSH: \"push\",\n /** 덮기 */\n COVER: \"cover\",\n /** 자르기 */\n CUT: \"cut\",\n /** 나누기 */\n SPLIT: \"split\",\n /** 닦아내기 */\n WIPE: \"wipe\",\n /** 대각선 닦아내기 */\n STRIPS: \"strips\",\n /** 당기기(벗기기) */\n PULL: \"pull\",\n /** 빗질 */\n COMB: \"comb\",\n /** 원형 */\n CIRCLE: \"circle\",\n /** 마름모형 */\n DIAMOND: \"diamond\",\n /** 십자형 */\n PLUS: \"plus\",\n /** 확대/축소 */\n ZOOM: \"zoom\",\n /** 시계 방향 회전 */\n WHEEL: \"wheel\",\n /** 시계 반대 방향 회전 */\n WHEEL_REVERSE: \"wheelReverse\",\n /** 쐐기형 */\n WEDGE: \"wedge\",\n /** 넘기기(뒤집기) */\n FLIP: \"flip\",\n } as const;\n export type TransitionType = typeof TransitionType[keyof typeof TransitionType];\n\n /** 슬라이드 전환 방향 / 분할 방향 (setTransition 의 dir·orient). */\n export const TransitionEffectDir = {\n /** 아래로 */\n DOWN: \"d\",\n /** 왼쪽으로 */\n LEFT: \"l\",\n /** 오른쪽으로 */\n RIGHT: \"r\",\n /** 위로 */\n UP: \"u\",\n /** 왼쪽 아래로 */\n LEFT_DOWN: \"ld\",\n /** 왼쪽 위로 */\n LEFT_UP: \"lu\",\n /** 오른쪽 아래로 */\n RIGHT_DOWN: \"rd\",\n /** 오른쪽 위로 */\n RIGHT_UP: \"ru\",\n /** 안쪽으로 */\n IN: \"in\",\n /** 바깥쪽으로 */\n OUT: \"out\",\n /** 가로 (분할 방향) */\n HORIZONTAL: \"horz\",\n /** 세로 (분할 방향) */\n VERTICAL: \"vert\",\n } as const;\n export type TransitionEffectDir = typeof TransitionEffectDir[keyof typeof TransitionEffectDir];\n\n /**\n * 머리글/바닥글 날짜 자동갱신(update) 모드의 날짜 표시 형식 (모델 fldType 값).\n * 실제 출력 문자열은 언어(DateLanguage)에 따라 달라진다.\n * 값은 Const.FldType 에서 파생하며, 날짜 형식이 아닌 SlideNum 과\n * datetime1 과 동일한 기본 sentinel 인 DatetimeFigureOut 은 제외한다.\n *\n * 형식 참고(기본 언어): datetime1=2026-06-30, datetime2=전체 날짜+요일, datetime3=특수 연호,\n * datetime4=년 월 일, datetime5=2026/6/30, datetime6=년 월, datetime7=특수 연호 년 월,\n * datetime8=날짜+시:분:초, datetime9=날짜+오전/오후 시:분, datetime10=시:분,\n * datetime11=시:분:초, datetime12=오전/오후 시:분, datetime13=오전/오후 시:분:초\n */\n export const DateFormat = {\n /** 년-월-일 (예: 2026-06-30) */\n Datetime1: \"datetime1\",\n /** 전체 날짜와 요일 (예: 2026년 6월 30일 화요일) */\n Datetime2: \"datetime2\",\n /** 연호 날짜 (한국어·일본어 전용) */\n Datetime3: \"datetime3\",\n /** 년 월 일 */\n Datetime4: \"datetime4\",\n /** 년/월/일 (예: 2026/6/30) */\n Datetime5: \"datetime5\",\n /** 년 월 */\n Datetime6: \"datetime6\",\n /** 연호 년 월 (한국어·일본어 전용) */\n Datetime7: \"datetime7\",\n /** 날짜 + 시:분:초 */\n Datetime8: \"datetime8\",\n /** 날짜 + 오전/오후 시:분 */\n Datetime9: \"datetime9\",\n /** 시:분 */\n Datetime10: \"datetime10\",\n /** 시:분:초 */\n Datetime11: \"datetime11\",\n /** 오전/오후 시:분 */\n Datetime12: \"datetime12\",\n /** 오전/오후 시:분:초 */\n Datetime13: \"datetime13\",\n } as const;\n export type DateFormat = typeof DateFormat[keyof typeof DateFormat];\n\n /** 머리글/바닥글 날짜의 언어 (모델 fontScript 값). */\n export const DateLanguage = {\n /** 영어(미국) */\n ENGLISH: \"en-US\",\n /** 한국어 */\n KOREAN: \"ko-KR\",\n /** 일본어 */\n JAPANESE: \"ja-JP\",\n /** 러시아어 */\n RUSSIAN: \"ru-RU\",\n } as const;\n export type DateLanguage = typeof DateLanguage[keyof typeof DateLanguage];\n\n /** 글머리 기호 종류 (모델 bullet type 값). */\n export const BulletType = {\n /** 글머리 없음 */\n NONE: \"buNone\",\n /** 문자 글머리 기호 */\n CHAR: \"buChar\",\n /** 자동 번호 매기기 */\n AUTO_NUM: \"buAutoNum\",\n /** 그림 글머리 기호 */\n BLIP: \"buBlip\",\n } as const;\n export type BulletType = typeof BulletType[keyof typeof BulletType];\n\n /** 밑줄 스타일 (OOXML ST_TextUnderlineType). */\n export const Underline = {\n /** 없음 */\n NONE: \"none\",\n /** 단어에만(공백 제외) */\n WORDS: \"words\",\n /** 실선 */\n SINGLE: \"sng\",\n /** 이중선 */\n DOUBLE: \"dbl\",\n /** 굵은 실선 */\n HEAVY: \"heavy\",\n /** 점선 */\n DOTTED: \"dotted\",\n /** 굵은 점선 */\n DOTTED_HEAVY: \"dottedHeavy\",\n /** 파선 */\n DASH: \"dash\",\n /** 굵은 파선 */\n DASH_HEAVY: \"dashHeavy\",\n /** 긴 파선 */\n DASH_LONG: \"dashLong\",\n /** 굵은 긴 파선 */\n DASH_LONG_HEAVY: \"dashLongHeavy\",\n /** 일점쇄선(점·파선) */\n DOT_DASH: \"dotDash\",\n /** 굵은 일점쇄선 */\n DOT_DASH_HEAVY: \"dotDashHeavy\",\n /** 이점쇄선(점·점·파선) */\n DOT_DOT_DASH: \"dotDotDash\",\n /** 굵은 이점쇄선 */\n DOT_DOT_DASH_HEAVY: \"dotDotDashHeavy\",\n /** 물결선 */\n WAVY: \"wavy\",\n /** 굵은 물결선 */\n WAVY_HEAVY: \"wavyHeavy\",\n /** 이중 물결선 */\n WAVY_DOUBLE: \"wavyDbl\",\n } as const;\n export type Underline = typeof Underline[keyof typeof Underline];\n\n /** 취소선 스타일 (OOXML ST_TextStrikeType). */\n export const Strike = {\n /** 없음 */\n NONE: \"noStrike\",\n /** 한 줄 취소선 */\n SINGLE: \"sngStrike\",\n /** 두 줄 취소선 */\n DOUBLE: \"dblStrike\",\n } as const;\n export type Strike = typeof Strike[keyof typeof Strike];\n\n /** 텍스트 자동 맞춤 방식 (OOXML bodyPr autofit). */\n export const AutoFitType = {\n /** 자동 맞춤 안 함 */\n NO_AUTOFIT: \"noAutofit\",\n /** 넘치면 텍스트 크기 축소 */\n NORMAL: \"normAutofit\",\n /** 텍스트에 맞춰 도형 크기 조정 */\n SHAPE_AUTOFIT: \"spAutoFit\",\n } as const;\n export type AutoFitType = typeof AutoFitType[keyof typeof AutoFitType];\n\n /** 텍스트 쓰기 방향 (OOXML ST_TextVerticalType). */\n export const WriteMode = {\n /** 가로쓰기 */\n HORIZONTAL: \"horz\",\n /** 세로쓰기(동아시아 글자는 세워서 표시) */\n VERTICAL_EAST: \"eaVert\",\n /** 세로쓰기(전체 90° 회전) */\n VERTICAL: \"vert\",\n /** 세로쓰기(270° 회전) */\n VERTICAL_270: \"vert270\",\n /** 워드아트 세로쓰기(오른쪽에서 왼쪽) */\n WORDART_VERTICAL_RTL: \"wordArtVertRtl\",\n /** 워드아트 세로쓰기(글자를 세로로 쌓음) */\n WORDART_VERTICAL: \"wordArtVert\",\n /** 몽골식 세로쓰기(위에서 아래, 줄은 왼쪽에서 오른쪽) */\n MONGOLIAN_VERTICAL: \"mongolianVert\",\n } as const;\n export type WriteMode = typeof WriteMode[keyof typeof WriteMode];\n\n /** 댓글 메모 스타일(색 프리셋). 값 순서는 메모 스타일 목록 1~10 과 같다. */\n export const CommentStyle = {\n /** 분홍 */\n PINK: \"pink\",\n /** 주황 */\n ORANGE: \"orange\",\n /** 노랑 */\n YELLOW: \"yellow\",\n /** 연두 */\n LIGHT_GREEN: \"lightGreen\",\n /** 초록 */\n GREEN: \"green\",\n /** 하늘 */\n SKY_BLUE: \"skyBlue\",\n /** 파랑 */\n BLUE: \"blue\",\n /** 남색 */\n NAVY: \"navy\",\n /** 보라 */\n PURPLE: \"purple\",\n /** 회색 */\n GRAY: \"gray\",\n } as const;\n export type CommentStyle = typeof CommentStyle[keyof typeof CommentStyle];\n\n /** 텍스트 세로 정렬 — 세로 위치와 가로 가운데 배치 여부의 조합 (모델 anchor·anchorCtr). */\n export const TextAlignV = {\n /** 위쪽 */\n TOP: 0,\n /** 세로 가운데 */\n MIDDLE: 1,\n /** 아래쪽 */\n BOTTOM: 2,\n /** 위쪽 + 가로 가운데 */\n TOP_CENTER: 3,\n /** 세로 가운데 + 가로 가운데 */\n MIDDLE_CENTER: 4,\n /** 아래쪽 + 가로 가운데 */\n BOTTOM_CENTER: 5,\n } as const;\n export type TextAlignV = typeof TextAlignV[keyof typeof TextAlignV];\n\n /**\n * 번호 매기기 유형 (BulletType.AUTO_NUM 용).\n * 값은 Const.Bullet.Numbered.Type 에서 파생하며, 내부 sentinel 인 NOT_SUPPORTED 는 제외한다.\n */\n export const NumberedType = {\n /** 1. 2. 3. */\n NUMBER_WITH_DOT: \"arabicPeriod\",\n /** ① ② ③ */\n CIRCLE_NUMBER: \"circleNumDbPlain\",\n /** I. II. III. */\n ROMAN_NUMERAL_UPPERCASE: \"romanUcPeriod\",\n /** A. B. C. */\n UPPERCASE_ALPHABET: \"alphaUcPeriod\",\n /** 1) 2) 3) */\n NUMBER_WITH_ROUND_BRACKET: \"arabicParenR\",\n /** a. b. c. */\n LOWERCASE_ALPHABET: \"alphaLcPeriod\",\n /** 一. 二. 三. (한자 숫자) */\n CHINESE: \"ea1JpnKorPeriod\",\n /** i. ii. iii. */\n ROMAN_NUMERAL_LOWERCASE: \"romanLcPeriod\",\n /** a) b) c) */\n LOWERCASE_ALPHABET_WITH_ROUND_BRACKET: \"alphaLcParenR\",\n } as const;\n export type NumberedType = typeof NumberedType[keyof typeof NumberedType];\n\n /** 글머리 문자 스타일 (BulletType.CHAR 용, Const.Bullet.Char.InfoMap 의 키와 동일) */\n export const CharType = {\n /** • (Arial) */\n DOT: \"1\",\n /** ◆ (Wingdings) */\n DIAMOND: \"2\",\n /** ▪ (Wingdings) */\n SQUARE: \"3\",\n /** ● (Wingdings) */\n CIRCLE: \"4\",\n /** ❖ (Wingdings) */\n FOUR_DIAMONDS: \"5\",\n /** ➢ (Wingdings) */\n ARROW: \"6\",\n /** ✓ (Wingdings) */\n CHECK: \"7\",\n } as const;\n export type CharType = typeof CharType[keyof typeof CharType];\n\n /** 하이퍼링크 종류. */\n export const HyperlinkType = {\n /** 웹 주소 */\n URL: \"url\",\n /** 이메일 주소 */\n EMAIL: \"email\",\n /** 문서 안 슬라이드로 이동 */\n SLIDE_JUMP: \"slideJump\",\n /** 쇼 진행 이동(다음/이전 슬라이드 등) */\n SHOW_JUMP: \"showJump\",\n /** 파일 링크 */\n FILE: \"file\",\n } as const;\n export type HyperlinkType = typeof HyperlinkType[keyof typeof HyperlinkType];\n\n /**\n * 쇼 점프(showJump) 대상. 쇼 모드 액션 맵(actionHandlerShowMode 의 _showJumpMap)이\n * 참조하는 상수를 그대로 쓴다.\n */\n export const ShowJumpType = {\n /** 첫 슬라이드로 */\n FIRST: \"first\",\n /** 마지막 슬라이드로 */\n LAST: \"last\",\n /** 다음 슬라이드로 */\n NEXT: \"next\",\n /** 이전 슬라이드로 */\n PREV: \"prev\",\n /** 쇼 마침 */\n EXIT: \"endShow\",\n /** 마지막으로 본 슬라이드로 */\n LAST_VIEWED: \"lastSlideViewed\",\n } as const;\n export type ShowJumpType = typeof ShowJumpType[keyof typeof ShowJumpType];\n\n /** 그라데이션 채우기 모양. */\n export const GradientType = {\n /** 선형 */\n LINEAR: \"lin\",\n /** 원형(방사형) */\n CIRCLE: \"circle\",\n /** 사각형 */\n RECT: \"rect\",\n /** 도형 모양 따라 */\n SHAPE: \"shape\",\n } as const;\n export type GradientType = typeof GradientType[keyof typeof GradientType];\n\n /** 채우기 유형 (모델 fill type 값, ShapeConst 와 동일). */\n export const FillType = {\n /** 단색 채우기 */\n SOLID: \"solidFill\",\n /** 그라데이션 채우기 */\n GRADIENT: \"gradFill\",\n /** 채우기 없음 */\n NONE: \"noFill\",\n /** 그림 채우기 */\n IMAGE: \"blipFill\",\n /** 패턴(무늬) 채우기 */\n PATTERN: \"pattFill\",\n } as const;\n export type FillType = typeof FillType[keyof typeof FillType];\n\n /** 이미지 채우기 방식. */\n export const ImageFillMode = {\n /** 늘이기 */\n STRETCH: \"stretch\",\n /** 바둑판식 배열 */\n TILE: \"tile\",\n } as const;\n export type ImageFillMode = typeof ImageFillMode[keyof typeof ImageFillMode];\n\n /** 이미지 채우기 바둑판(tile) 대칭. */\n export const ImageTileFlip = {\n /** 대칭 없음 */\n NONE: \"none\",\n /** 가로 대칭 */\n HORIZONTAL: \"x\",\n /** 세로 대칭 */\n VERTICAL: \"y\",\n /** 가로·세로 대칭 */\n BOTH: \"xy\",\n } as const;\n export type ImageTileFlip = typeof ImageTileFlip[keyof typeof ImageTileFlip];\n\n /**\n * 사각 영역 기준 정렬점 (OOXML ST_RectAlignment).\n * 바둑판 채우기 정렬·그림자/반사 배치(algn)가 같은 값 집합을 쓴다.\n */\n export const RectAlign = {\n /** 왼쪽 위 */\n TOP_LEFT: \"tl\",\n /** 위쪽 */\n TOP: \"t\",\n /** 오른쪽 위 */\n TOP_RIGHT: \"tr\",\n /** 왼쪽 */\n LEFT: \"l\",\n /** 가운데 */\n CENTER: \"ctr\",\n /** 오른쪽 */\n RIGHT: \"r\",\n /** 왼쪽 아래 */\n BOTTOM_LEFT: \"bl\",\n /** 아래쪽 */\n BOTTOM: \"b\",\n /** 오른쪽 아래 */\n BOTTOM_RIGHT: \"br\",\n } as const;\n export type RectAlign = typeof RectAlign[keyof typeof RectAlign];\n\n /** 패턴(무늬) 채우기 프리셋 (OOXML ST_PresetPatternVal 전체 54종). */\n export const PatternPreset = {\n /** 5% 음영 */\n PERCENT_5: \"pct5\",\n /** 10% 음영 */\n PERCENT_10: \"pct10\",\n /** 20% 음영 */\n PERCENT_20: \"pct20\",\n /** 25% 음영 */\n PERCENT_25: \"pct25\",\n /** 30% 음영 */\n PERCENT_30: \"pct30\",\n /** 40% 음영 */\n PERCENT_40: \"pct40\",\n /** 50% 음영 */\n PERCENT_50: \"pct50\",\n /** 60% 음영 */\n PERCENT_60: \"pct60\",\n /** 70% 음영 */\n PERCENT_70: \"pct70\",\n /** 75% 음영 */\n PERCENT_75: \"pct75\",\n /** 80% 음영 */\n PERCENT_80: \"pct80\",\n /** 90% 음영 */\n PERCENT_90: \"pct90\",\n /** 밝은 하향 대각선 */\n LIGHT_DOWNWARD_DIAGONAL: \"ltDnDiag\",\n /** 밝은 상향 대각선 */\n LIGHT_UPWARD_DIAGONAL: \"ltUpDiag\",\n /** 어두운 하향 대각선 */\n DARK_DOWNWARD_DIAGONAL: \"dkDnDiag\",\n /** 어두운 상향 대각선 */\n DARK_UPWARD_DIAGONAL: \"dkUpDiag\",\n /** 넓은 하향 대각선 */\n WIDE_DOWNWARD_DIAGONAL: \"wdDnDiag\",\n /** 넓은 상향 대각선 */\n WIDE_UPWARD_DIAGONAL: \"wdUpDiag\",\n /** 밝은 세로선 */\n LIGHT_VERTICAL: \"ltVert\",\n /** 밝은 가로선 */\n LIGHT_HORIZONTAL: \"ltHorz\",\n /** 좁은 세로선 */\n NARROW_VERTICAL: \"narVert\",\n /** 좁은 가로선 */\n NARROW_HORIZONTAL: \"narHorz\",\n /** 어두운 세로선 */\n DARK_VERTICAL: \"dkVert\",\n /** 어두운 가로선 */\n DARK_HORIZONTAL: \"dkHorz\",\n /** 파선 하향 대각선 */\n DASHED_DOWNWARD_DIAGONAL: \"dashDnDiag\",\n /** 파선 상향 대각선 */\n DASHED_UPWARD_DIAGONAL: \"dashUpDiag\",\n /** 파선 가로선 */\n DASHED_HORIZONTAL: \"dashHorz\",\n /** 파선 세로선 */\n DASHED_VERTICAL: \"dashVert\",\n /** 작은 색종이 */\n SMALL_CONFETTI: \"smConfetti\",\n /** 큰 색종이 */\n LARGE_CONFETTI: \"lgConfetti\",\n /** 지그재그 */\n ZIGZAG: \"zigZag\",\n /** 물결 */\n WAVE: \"wave\",\n /** 대각선 벽돌 */\n DIAGONAL_BRICK: \"diagBrick\",\n /** 가로 벽돌 */\n HORIZONTAL_BRICK: \"horzBrick\",\n /** 짜임 */\n WEAVE: \"weave\",\n /** 격자 무늬(체크) */\n PLAID: \"plaid\",\n /** 잔디 */\n DIVOT: \"divot\",\n /** 점선 격자 */\n DOTTED_GRID: \"dotGrid\",\n /** 점선 마름모 */\n DOTTED_DIAMOND: \"dotDmnd\",\n /** 지붕널 */\n SHINGLE: \"shingle\",\n /** 격자 울타리 */\n TRELLIS: \"trellis\",\n /** 구 모양 */\n SPHERE: \"sphere\",\n /** 작은 격자 */\n SMALL_GRID: \"smGrid\",\n /** 큰 격자 */\n LARGE_GRID: \"lgGrid\",\n /** 작은 바둑판 */\n SMALL_CHECKER_BOARD: \"smCheck\",\n /** 큰 바둑판 */\n LARGE_CHECKER_BOARD: \"lgCheck\",\n /** 윤곽선 마름모 */\n OUTLINED_DIAMOND: \"openDmnd\",\n /** 단색 마름모 */\n SOLID_DIAMOND: \"solidDmnd\",\n /** 가로선 */\n HORIZONTAL: \"horz\",\n /** 세로선 */\n VERTICAL: \"vert\",\n /** 십자 */\n CROSS: \"cross\",\n /** 하향 대각선 */\n DOWNWARD_DIAGONAL: \"dnDiag\",\n /** 상향 대각선 */\n UPWARD_DIAGONAL: \"upDiag\",\n /** 대각선 십자 */\n DIAGONAL_CROSS: \"diagCross\",\n } as const;\n export type PatternPreset = typeof PatternPreset[keyof typeof PatternPreset];\n\n /** 도형 정렬 기준 (슬라이드 영역 기준 개별 정렬). */\n export const AlignType = {\n /** 왼쪽 맞춤 */\n LEFT: \"left\",\n /** 가운데 맞춤(가로) */\n CENTER: \"center\",\n /** 오른쪽 맞춤 */\n RIGHT: \"right\",\n /** 위쪽 맞춤 */\n TOP: \"top\",\n /** 중간 맞춤(세로) */\n MIDDLE: \"middle\",\n /** 아래쪽 맞춤 */\n BOTTOM: \"bottom\",\n } as const;\n export type AlignType = typeof AlignType[keyof typeof AlignType];\n\n /** 도형 균등 분배(distribute) 방향 - 여러 도형 사이 간격을 동일하게 재배치. */\n export const DistributeDirection = {\n /** 가로 균등 분배 */\n HORIZONTAL: \"horizontal\",\n /** 세로 균등 분배 */\n VERTICAL: \"vertical\",\n } as const;\n export type DistributeDirection = typeof DistributeDirection[keyof typeof DistributeDirection];\n\n /** 슬라이드 9등분 기준 위치 (도형 center 기준). */\n export const GridPosition = {\n /** 왼쪽 위 */\n TOP_LEFT: \"top-left\",\n /** 위 가운데 */\n TOP_CENTER: \"top-center\",\n /** 오른쪽 위 */\n TOP_RIGHT: \"top-right\",\n /** 왼쪽 가운데 */\n CENTER_LEFT: \"center-left\",\n /** 정중앙 */\n CENTER: \"center\",\n /** 오른쪽 가운데 */\n CENTER_RIGHT: \"center-right\",\n /** 왼쪽 아래 */\n BOTTOM_LEFT: \"bottom-left\",\n /** 아래 가운데 */\n BOTTOM_CENTER: \"bottom-center\",\n /** 오른쪽 아래 */\n BOTTOM_RIGHT: \"bottom-right\",\n } as const;\n export type GridPosition = typeof GridPosition[keyof typeof GridPosition];\n\n /** 슬라이드 면적 대비 상대 크기 (small ~10%↓ / medium ~10~40% / large ~40%↑). */\n export const SizeCategory = {\n /** 작게(슬라이드 면적의 약 10% 미만) */\n SMALL: \"small\",\n /** 보통(약 10~40%) */\n MEDIUM: \"medium\",\n /** 크게(약 40% 이상) */\n LARGE: \"large\",\n } as const;\n export type SizeCategory = typeof SizeCategory[keyof typeof SizeCategory];\n\n /** 표 셀 테두리 위치. */\n export const BorderPosition = {\n /** 위쪽 테두리 */\n TOP: \"top\",\n /** 아래쪽 테두리 */\n BOTTOM: \"bottom\",\n /** 왼쪽 테두리 */\n LEFT: \"left\",\n /** 오른쪽 테두리 */\n RIGHT: \"right\",\n /** 하향 대각선(↘) */\n DIAGONAL_DOWN: \"diagonalDown\",\n /** 상향 대각선(↗) */\n DIAGONAL_UP: \"diagonalUp\",\n /** 모든 테두리 */\n ALL: \"all\",\n } as const;\n export type BorderPosition = typeof BorderPosition[keyof typeof BorderPosition];\n\n /** 표 행/열 삽입 위치 — 기준 셀을 기준으로 어느 쪽에 넣을지. */\n export const InsertPosition = {\n /** 기준 행의 위 */\n ABOVE: 0,\n /** 기준 행의 아래 */\n BELOW: 1,\n /** 기준 열의 왼쪽 */\n LEFT: 2,\n /** 기준 열의 오른쪽 */\n RIGHT: 3,\n } as const;\n export type InsertPosition = typeof InsertPosition[keyof typeof InsertPosition];\n\n /** 표 스타일 강조 옵션 — 머리글 행·줄무늬 행처럼 켜고 끄는 강조 영역. */\n export const TableStyleOption = {\n /** 머리글 행 */\n FIRST_ROW: 0,\n /** 요약 행(마지막 행) */\n LAST_ROW: 1,\n /** 줄무늬 행 */\n BAND_ROW: 2,\n /** 첫째 열 */\n FIRST_COL: 3,\n /** 마지막 열 */\n LAST_COL: 4,\n /** 줄무늬 열 */\n BAND_COL: 5,\n } as const;\n export type TableStyleOption = typeof TableStyleOption[keyof typeof TableStyleOption];\n\n /** 표 프리셋 스타일 색상 그룹. */\n export const TableStyleColor = {\n /** 테마 텍스트 1 색 */\n TX1: \"tx1\",\n /** 테마 강조 1 색 */\n ACCENT1: \"accent1\",\n /** 테마 강조 2 색 */\n ACCENT2: \"accent2\",\n /** 테마 강조 3 색 */\n ACCENT3: \"accent3\",\n /** 테마 강조 4 색 */\n ACCENT4: \"accent4\",\n /** 테마 강조 5 색 */\n ACCENT5: \"accent5\",\n /** 테마 강조 6 색 */\n ACCENT6: \"accent6\",\n } as const;\n export type TableStyleColor = typeof TableStyleColor[keyof typeof TableStyleColor];\n\n /** 표 프리셋 스타일 명도 타입. */\n export const TableStyleType = {\n /** 일반 스타일 1 */\n GENERIC1: \"generic1\",\n /** 일반 스타일 2 */\n GENERIC2: \"generic2\",\n /** 밝은 스타일 1 */\n LIGHT1: \"light1\",\n /** 밝은 스타일 2 */\n LIGHT2: \"light2\",\n /** 밝은 스타일 3 */\n LIGHT3: \"light3\",\n /** 중간 스타일 1 */\n NORMAL1: \"normal1\",\n /** 중간 스타일 2 */\n NORMAL2: \"normal2\",\n /** 중간 스타일 3 */\n NORMAL3: \"normal3\",\n /** 중간 스타일 4 */\n NORMAL4: \"normal4\",\n /** 어두운 스타일 1 */\n DARK1: \"dark1\",\n /** 어두운 스타일 2 */\n DARK2: \"dark2\",\n } as const;\n export type TableStyleType = typeof TableStyleType[keyof typeof TableStyleType];\n\n /**\n * ShapePreset family 정의 (family ID → preset 목록).\n * findShapes 의 presetId 에 family 키(\"rectangle\" 등)를 전달하면 해당 계열 전체를, ShapePreset 값(\"rect\" 등)을 전달하면 그 도형만 매칭한다.\n */\n export const ShapePresetFamily = {\n /** 사각형 계열 — 기본·둥근/잘린 모서리 사각형 */\n rectangle: [\"rect\", \"roundRect\", \"snip1Rect\", \"snip2SameRect\", \"snip2DiagRect\", \"snipRoundRect\", \"round1Rect\", \"round2SameRect\", \"round2DiagRect\"],\n /** 화살표 계열 — 블록 화살표·화살표 설명선 */\n arrow: [\"rightArrow\", \"leftArrow\", \"upArrow\", \"downArrow\", \"leftRightArrow\", \"upDownArrow\", \"quadArrow\", \"leftRightUpArrow\", \"bentArrow\", \"uturnArrow\", \"leftUpArrow\", \"bentUpArrow\", \"curvedRightArrow\", \"curvedLeftArrow\", \"curvedUpArrow\", \"curvedDownArrow\", \"stripedRightArrow\", \"notchedRightArrow\", \"homePlate\", \"chevron\", \"rightArrowCallout\", \"leftArrowCallout\", \"upArrowCallout\", \"downArrowCallout\", \"leftRightArrowCallout\", \"upDownArrowCallout\", \"quadArrowCallout\", \"circularArrow\", \"leftCircularArrow\", \"swooshArrow\", \"leftRightRibbon\"],\n /** 기본 도형 계열 — 원·다각형·괄호·기호 등 */\n basicShape: [\"ellipse\", \"triangle\", \"rtTriangle\", \"parallelogram\", \"trapezoid\", \"diamond\", \"pentagon\", \"hexagon\", \"heptagon\", \"octagon\", \"decagon\", \"dodecagon\", \"pieWedge\", \"pie\", \"chord\", \"teardrop\", \"frame\", \"halfFrame\", \"corner\", \"diagStripe\", \"plus\", \"plaque\", \"can\", \"cube\", \"bevel\", \"donut\", \"noSmoking\", \"blockArc\", \"foldedCorner\", \"smileyFace\", \"heart\", \"funnel\", \"gear6\", \"gear9\", \"lightningBolt\", \"sun\", \"moon\", \"cloud\", \"arc\", \"bracketPair\", \"bracePair\", \"leftBracket\", \"rightBracket\", \"leftBrace\", \"rightBrace\"],\n /** 별 계열 — 별·폭발 */\n star: [\"irregularSeal1\", \"irregularSeal2\", \"star4\", \"star5\", \"star6\", \"star7\", \"star8\", \"star10\", \"star12\", \"star16\", \"star24\", \"star32\"],\n /** 현수막 계열 — 리본·두루마리·물결 */\n banner: [\"ribbon2\", \"ribbon\", \"ellipseRibbon2\", \"ellipseRibbon\", \"verticalScroll\", \"horizontalScroll\", \"wave\", \"doubleWave\"],\n /** 설명선 계열 — 말풍선·선 설명선 */\n callout: [\"wedgeRectCallout\", \"wedgeRoundRectCallout\", \"wedgeEllipseCallout\", \"cloudCallout\", \"callout1\", \"callout2\", \"callout3\", \"accentCallout1\", \"accentCallout2\", \"accentCallout3\", \"borderCallout1\", \"borderCallout2\", \"borderCallout3\", \"accentBorderCallout1\", \"accentBorderCallout2\", \"accentBorderCallout3\"],\n /** 순서도 계열 — 프로세스·판단·저장소 등 */\n flowchart: [\"flowChartProcess\", \"flowChartAlternateProcess\", \"flowChartDecision\", \"flowChartInputOutput\", \"flowChartPredefinedProcess\", \"flowChartInternalStorage\", \"flowChartDocument\", \"flowChartMultidocument\", \"flowChartTerminator\", \"flowChartPreparation\", \"flowChartManualInput\", \"flowChartManualOperation\", \"flowChartConnector\", \"flowChartOffpageConnector\", \"flowChartPunchedCard\", \"flowChartPunchedTape\", \"flowChartSummingJunction\", \"flowChartOr\", \"flowChartCollate\", \"flowChartSort\", \"flowChartExtract\", \"flowChartMerge\", \"flowChartOnlineStorage\", \"flowChartDelay\", \"flowChartMagneticTape\", \"flowChartMagneticDisk\", \"flowChartMagneticDrum\", \"flowChartDisplay\"],\n /** 실행 단추 계열 — 앞으로/뒤로·홈·도움말 등 */\n actionButton: [\"actionButtonBackPrevious\", \"actionButtonForwardNext\", \"actionButtonBeginning\", \"actionButtonEnd\", \"actionButtonHome\", \"actionButtonInformation\", \"actionButtonReturn\", \"actionButtonMovie\", \"actionButtonDocument\", \"actionButtonSound\", \"actionButtonHelp\", \"actionButtonBlank\"],\n /** 수식 기호 계열 — 더하기·빼기·곱하기·나누기·등호·부등호 */\n equation: [\"mathPlus\", \"mathMinus\", \"mathMultiply\", \"mathDivide\", \"mathEqual\", \"mathNotEqual\"],\n /** 선 계열 — 직선·꺾인 연결선·곡선 연결선 */\n line: [\"line\", \"bentConnector3\", \"curvedConnector3\"],\n } as const;\n export type ShapePresetFamily = keyof typeof ShapePresetFamily;\n\n // =============================================================================\n // Typedefs\n // =============================================================================\n\n export interface SlideFilter {\n /** 0-based 인덱스 목록 (빈 배열은 대상 없음) */\n indexes?: number[];\n /** 숨김 슬라이드 여부 */\n isHidden?: boolean;\n /** 레이아웃 종류 */\n layoutType?: SlideLayoutType;\n /** 슬라이드 내 포함 텍스트 */\n textContains?: string;\n /** 댓글 존재 여부 */\n hasComment?: boolean;\n /** 전환 효과 존재 여부 */\n hasTransition?: boolean;\n }\n\n export interface HeaderFooterDate {\n /** 자동갱신 날짜 형식 (text 지정 시 무시) (기본값: DateFormat.Datetime1) */\n format?: DateFormat;\n /** 자동갱신 날짜 언어 (text 지정 시 무시) (기본값: DateLanguage.ENGLISH) */\n language?: DateLanguage;\n /** 지정 시 고정 텍스트로 처리 (자동갱신 안 함) */\n text?: string;\n }\n\n export interface ColorScheme {\n /** 사용자 정의 색상 테마 이름 */\n name: string;\n /** 텍스트/배경 어두운 색 1 (#RRGGBB) */\n tb_color_dark_1: string;\n /** 텍스트/배경 밝은 색 1 (#RRGGBB) */\n tb_color_light_1: string;\n /** 텍스트/배경 어두운 색 2 (#RRGGBB) */\n tb_color_dark_2: string;\n /** 텍스트/배경 밝은 색 2 (#RRGGBB) */\n tb_color_light_2: string;\n /** 강조 색 1 (#RRGGBB) */\n accent_1: string;\n /** 강조 색 2 (#RRGGBB) */\n accent_2: string;\n /** 강조 색 3 (#RRGGBB) */\n accent_3: string;\n /** 강조 색 4 (#RRGGBB) */\n accent_4: string;\n /** 강조 색 5 (#RRGGBB) */\n accent_5: string;\n /** 강조 색 6 (#RRGGBB) */\n accent_6: string;\n /** 하이퍼링크 색 (#RRGGBB) */\n hyperlink: string;\n /** 방문한 하이퍼링크 색 (#RRGGBB) */\n opened_hyperlink: string;\n }\n\n export interface ShapeFilter {\n /** placeholder 제외 여부 */\n excludePlaceholder?: boolean;\n /** placeholder 유형 */\n placeholderType?: PlaceholderType;\n /** 도형 종류 */\n shapeType?: ShapeType;\n /** 도형 프리셋. ShapePreset 값(정확 매칭) 또는 ShapePresetFamily 키(계열 매칭). 배열로 여러 개 지정 가능 */\n presetId?: ShapePreset | ShapePresetFamily | string | (ShapePreset | ShapePresetFamily | string)[];\n /** 도형 텍스트에 포함된 문자열 */\n textContains?: string;\n /** 텍스트 존재 여부 */\n hasText?: boolean;\n /** 채우기 유형 */\n fillType?: FillType;\n /** 채우기 색상 (hex) */\n fillColor?: string;\n /** 선 존재 여부 */\n hasLine?: boolean;\n /** 선 색상 (hex) */\n lineColor?: string;\n /** 슬라이드 9등분 기준 위치 */\n position?: GridPosition;\n /** 슬라이드 대비 상대 크기 */\n size?: SizeCategory;\n /** 하이퍼링크 존재 여부 */\n hasHyperlink?: boolean;\n /** 효과 적용 여부 */\n hasEffect?: boolean;\n }\n\n export interface TableFilter {\n /** 셀 텍스트에 포함된 문자열 */\n textContains?: string;\n /** 행 수 */\n rowCount?: number;\n /** 열 수 */\n colCount?: number;\n }\n\n export interface CommentFilter {\n /** 댓글 텍스트에 포함된 문자열 */\n textContains?: string;\n /** 답글 여부 */\n isReply?: boolean;\n }\n\n export interface Transition {\n /** 전환 효과 종류 */\n type: TransitionType;\n /** 전환 속도 (기본값: 효과별 기본 속도) */\n speed?: SpeedType;\n /** 전환 방향. 효과별 유효값 상이 — push/cover/pull/wipe/flip:l/r/u/d, comb:horz/vert, split/plus/zoom:in/out, strips:lu/ld/ru/rd (기본값: 효과별 기본 방향) */\n dir?: TransitionEffectDir;\n /** 분할 방향 (SPLIT 효과 전용: horz|vert) (기본값: 효과 기본값) */\n orient?: TransitionEffectDir;\n /** 검은 화면을 거쳐 전환 (FADE/CUT 효과 전용) (기본값: false) */\n thruBlack?: boolean;\n /** 자동 진행 시간 (ms) (기본값: 자동 진행 안 함) */\n advTm?: number;\n /** 클릭으로 진행 여부 (기본값: true) */\n advClick?: boolean;\n }\n\n export interface ChartFilter {\n /** 차트 종류 필터 */\n chartType?: ChartType;\n }\n\n export interface CommentPosition {\n /** X 좌표 (px 단위) */\n x: number;\n /** Y 좌표 (px 단위) */\n y: number;\n }\n\n export interface ShapeTransform {\n /** 좌상단 X 좌표 (px 단위, 반전·회전과 무관한 모델 기준) */\n x: number;\n /** 좌상단 Y 좌표 (px 단위, 반전·회전과 무관한 모델 기준) */\n y: number;\n /** 너비 (px 단위) */\n width: number;\n /** 높이 (px 단위) */\n height: number;\n /** 회전 각도 (degree) */\n angle: number;\n }\n\n export interface Hyperlink {\n /** 하이퍼링크 타입 (url/email/slideJump/showJump/file) */\n type: HyperlinkType;\n /** url/email 일 때의 대상 (email 은 mailto 접두어 제거) */\n urlOrEmail?: string;\n /** slideJump 일 때 대상 슬라이드 */\n slide?: Slide;\n /** showJump 일 때 쇼 점프 유형 */\n showJumpType?: ShowJumpType;\n /** file 일 때 파일 경로 */\n path?: string;\n }\n\n export interface ShapeMoveDistance {\n /** X 이동량 (px 단위, 양수 = 오른쪽). 생략하면 X 는 이동하지 않음 */\n x?: number;\n /** Y 이동량 (px 단위, 양수 = 아래). 생략하면 Y 는 이동하지 않음 */\n y?: number;\n }\n\n export interface Fill {\n /** 채우기 종류 (apiConstants.FillType). getFill 출력과 findShapes({fillType}) 필터가 같은 어휘를 쓴다 */\n type: FillType;\n /** solid: hex \"#RRGGBB\" 또는 scheme color */\n color?: string;\n /** solid/image: 투명도 (0~100, 0=불투명). 불투명이면 키를 생략한다 */\n alpha?: number;\n /** gradient: 그라데이션 유형(lin/circle/rect/shape) */\n gradientType?: GradientType;\n /** gradient: 각도(degree). 조회값은 0.1도 단위이며 [0, 360) 으로 정규화된다(360 은 0) */\n angle?: number;\n /** gradient: 색상 변화점 */\n stops?: { color: string; pos?: number; alpha?: number }[];\n /** image: 이미지 채우기 방식 */\n fillMode?: ImageFillMode;\n /** image: 같은 문서 안 setFill 왕복용 업로드 리소스 id */\n embed?: string;\n /** image: 원본 이미지 너비 (px) */\n width?: number;\n /** image: 원본 이미지 높이 (px) */\n height?: number;\n /** image: 바둑판 오프셋 (pt). fillMode=ImageFillMode.TILE 일 때만 존재 */\n offset?: { x: number; y: number };\n /** image: 바둑판 배율 (%). fillMode=ImageFillMode.TILE 일 때만 존재 */\n scale?: { x: number; y: number };\n /** image: 바둑판 대칭. fillMode=ImageFillMode.TILE 일 때만 존재 */\n mirror?: ImageTileFlip;\n /** image: 바둑판 정렬 기준점. fillMode=ImageFillMode.TILE 일 때만 존재 */\n align?: RectAlign;\n /** image: 도형과 함께 회전 여부 (tile/stretch 공통) */\n rotateWithShape?: boolean;\n /** pattern: 무늬 프리셋 (apiConstants.PatternPreset) */\n preset?: PatternPreset;\n /** pattern: 전경색 (hex \"#RRGGBB\"/scheme) */\n foreColor?: string;\n /** pattern: 배경색 (hex \"#RRGGBB\"/scheme) */\n backColor?: string;\n /** pattern: 전경색 투명도 (0~100, 0=불투명). 불투명이면 키를 생략한다 */\n foreAlpha?: number;\n /** pattern: 배경색 투명도 (0~100, 0=불투명). 불투명이면 키를 생략한다 */\n backAlpha?: number;\n }\n\n export interface LineStyle {\n /** 선 채우기 종류 (apiConstants.FillType). getFill 출력과 같은 어휘 */\n type: FillType;\n /** solid: 선 색상 (hex \"#RRGGBB\"/scheme) */\n color?: string | null;\n /** solid: 투명도 (0~100, 0=불투명). 불투명이면 키를 생략한다 */\n alpha?: number;\n /** gradient: 그라데이션 유형(lin/circle/rect/shape) */\n gradientType?: GradientType;\n /** gradient: 색상 변화점 */\n stops?: { color: string; pos?: number; alpha?: number }[];\n /** gradient: 각도(degree). 조회값은 0.1도 단위이며 [0, 360) 으로 정규화된다(360 은 0) */\n angle?: number;\n /** 선 두께 (pt). 선 없음(noFill)이어도 두께는 그대로 담긴다 */\n width: number | null;\n /** 선 대시 유형 */\n dash: LineDash | null;\n /** 선 끝 모양 */\n cap: LineCap | null;\n /** 선 연결(모서리) 유형 */\n join: LineJoin | null;\n }\n\n export interface LineEnd {\n /** 화살표 타입 */\n type: LineEndType;\n /** 화살표 너비 */\n width: LineEndSize;\n /** 화살표 길이 */\n length: LineEndSize;\n }\n\n export interface ImageCrop {\n /** 왼쪽 crop 퍼센트 */\n left: number;\n /** 위쪽 crop 퍼센트 */\n top: number;\n /** 오른쪽 crop 퍼센트 */\n right: number;\n /** 아래쪽 crop 퍼센트 */\n bottom: number;\n }\n\n export interface BulletStyle {\n /** 글머리 기호 유형 */\n type: BulletType;\n /** BulletType.AUTO_NUM: 번호 매기기 유형, BulletType.CHAR: 글머리 문자 유형 (CharType 7종 프리셋의 문자와 글꼴이 모두 일치할 때만 포함) */\n subType?: NumberedType | CharType;\n /** 시작 번호 (BulletType.AUTO_NUM 일 때만 포함) */\n startAt?: number;\n /** 글머리 문자 원문 (BulletType.CHAR 일 때만 포함. 프리셋 밖의 문자도 그대로 반환) */\n char?: string;\n }\n\n export interface OuterShadow {\n /** hex (#RRGGBB) 또는 scheme color (기본값: \"#000000\") */\n color?: string;\n /** 투명도 (0~100, 0=불투명) (기본값: 50) */\n alpha?: number;\n /** 흐림 반경 (pt) (기본값: 6) */\n blur?: number;\n /** 거리 (pt) (기본값: 6) */\n dist?: number;\n /** 방향 (degree) (기본값: 90) */\n dir?: number;\n /** 가로 배율 (%) (기본값: 100) */\n sx?: number;\n /** 세로 배율 (%) (기본값: 100) */\n sy?: number;\n /** 가로 기울임 (degree) (기본값: 0) */\n kx?: number;\n /** 세로 기울임 (degree) (기본값: 0) */\n ky?: number;\n /** 정렬 기준 (기본값: RectAlign.CENTER) */\n algn?: RectAlign;\n /** 도형 회전 연동 (기본값: false) */\n rotWithShape?: boolean;\n }\n\n export interface InnerShadow {\n /** hex (#RRGGBB) 또는 scheme color (기본값: \"#000000\") */\n color?: string;\n /** 투명도 (0~100, 0=불투명) (기본값: 50) */\n alpha?: number;\n /** 흐림 반경 (pt) (기본값: 6) */\n blur?: number;\n /** 거리 (pt) (기본값: 6) */\n dist?: number;\n /** 방향 (degree) (기본값: 90) */\n dir?: number;\n }\n\n export interface Glow {\n /** hex (#RRGGBB) 또는 scheme color (기본값: \"#356FFF\") */\n color?: string;\n /** 투명도 (0~100, 0=불투명) (기본값: 50) */\n alpha?: number;\n /** 광선 반경 (pt) (기본값: 10) */\n rad?: number;\n }\n\n export interface SoftEdge {\n /** 반경 (pt) (기본값: 5) */\n rad?: number;\n }\n\n export interface Reflection {\n /** 흐림 반경 (pt) (기본값: 0.5) */\n blur?: number;\n /** 거리 (pt) (기본값: 0) */\n dist?: number;\n /** 시작 위치 (0~100). 렌더링에는 반영되지 않는다 (기본값: 0) */\n stPos?: number;\n /** 반사 크기 (0~100) (기본값: 50) */\n endPos?: number;\n /** 시작 투명도 (0~100, 0=불투명) (기본값: 50) */\n startAlpha?: number;\n /** 끝 투명도 (0~100, 0=불투명) (기본값: 99.7) */\n endAlpha?: number;\n /** 방향 (degree). 렌더링에는 반영되지 않는다 (기본값: 90) */\n dir?: number;\n /** 페이드 방향 (degree). 렌더링에는 반영되지 않는다 (기본값: 90) */\n fadeDir?: number;\n /** 가로 배율 (%) (기본값: 100) */\n sx?: number;\n /** 세로 배율 (%) (기본값: -100) */\n sy?: number;\n /** 가로 기울임 (degree) (기본값: 0) */\n kx?: number;\n /** 세로 기울임 (degree) (기본값: 0) */\n ky?: number;\n /** 정렬 기준 (기본값: RectAlign.BOTTOM_LEFT) */\n algn?: RectAlign;\n /** 도형 회전 연동 (기본값: false) */\n rotWithShape?: boolean;\n }\n\n export interface Effects {\n /** 외부 그림자 */\n outerShadow?: OuterShadow;\n /** 내부 그림자 */\n innerShadow?: InnerShadow;\n /** 네온(광선) */\n glow?: Glow;\n /** 옅은 테두리 */\n softEdge?: SoftEdge;\n /** 반사 */\n reflection?: Reflection;\n /** 카메라(회전) 3D */\n scene3d?: Scene3d;\n /** 입체(깊이) 3D */\n sp3d?: Sp3d;\n }\n\n export interface ImageFillDetail {\n /** 바둑판 오프셋 (pt) (기본값: {x: 0, y: 0}) */\n offset?: { x?: number; y?: number };\n /** 바둑판 배율 (%) (기본값: {x: 100, y: 100}) */\n scale?: { x?: number; y?: number };\n /** 바둑판 대칭 (기본값: ImageTileFlip.NONE) */\n mirror?: ImageTileFlip;\n /** 바둑판 정렬 기준점 (기본값: RectAlign.TOP_LEFT) */\n align?: RectAlign;\n /** 도형과 함께 회전 여부. 생략하면 기존 동작 유지 (모델 기본 true) */\n rotateWithShape?: boolean;\n }\n\n export interface Scene3d {\n /** camera 프리셋 (orthographicFront, isometricLeftDown 등) */\n prst?: string;\n /** longitude (degree) */\n x?: number;\n /** latitude (degree) */\n y?: number;\n /** revolution (degree) */\n z?: number;\n }\n\n export interface Sp3d {\n /** z 값 (pt 단위) */\n z?: number;\n }\n\n export interface AdjustValue {\n /** 조절값 이름 */\n name: string;\n /** 현재 조절값(단위 기준 정수) */\n value: number;\n /** 설정 가능한 최솟값, 범위를 알 수 없으면 null */\n min: number | null;\n /** 설정 가능한 최댓값, 범위를 알 수 없으면 null */\n max: number | null;\n /** 값의 단위 (pct 는 1/1000%, ang 는 1/60000도). 범위를 알 수 없으면 null */\n unit: string | null;\n }\n\n export interface AdjustValueUpdate {\n /** 조절값 이름(getAdjustValues 결과) */\n name: string;\n /** 조절값. 정수로 반올림되며 허용 범위를 벗어나면 최솟값 또는 최댓값으로 제한됨 */\n value: number;\n }\n\n export interface CellFilter {\n /** 셀 범위 (0-based, inclusive) */\n range?: { startRow: number; startCol: number; endRow: number; endCol: number };\n /** 특정 행만 (0-based, 대표 셀 기준) */\n rowIndex?: number;\n /** 특정 열만 (0-based, 대표 셀 기준) */\n colIndex?: number;\n /** true: 텍스트가 비어 있는 셀, false: 텍스트가 있는 셀 */\n isEmpty?: boolean;\n /** true: 병합 대표 셀, false: 단일 셀 */\n isMerged?: boolean;\n /** 셀 텍스트에 포함된 문자열 */\n textContains?: string;\n /** 셀 배경색 일치 (hex \"#RRGGBB\", 대소문자 무시, 스타일 상속분 미포함) */\n fillColor?: string;\n /** tcPr 에 fill 이 명시적으로 설정됐는지 (스타일 상속분 미포함) */\n hasFill?: boolean;\n /** tcPr 에 상하좌우 테두리 1개 이상 명시적으로 설정됐는지 (스타일 상속분 미포함) */\n hasBorder?: boolean;\n }\n\n export interface BorderStyle {\n /** 테두리 색상 (hex \"#RRGGBB\"). 색 없음이면 null */\n color: string | null;\n /** 선 두께 (pt) */\n width: number | null;\n /** 선 대시 유형 */\n dash: LineDash | null;\n }\n\n export interface TextRange {\n /** 시작 글자 offset (0-based) */\n from: number;\n /** 끝 글자 offset (포함) */\n to: number;\n }\n\n export interface FontStyle {\n /** 글자 크기 (pt) */\n fontSize?: number;\n /** 굵게 여부 */\n bold?: boolean;\n /** 기울임 여부 */\n italic?: boolean;\n /** 밑줄 유형 */\n underline?: Underline;\n /** 취소선 유형 */\n strike?: Strike;\n /** 글자 색상 (hex #RRGGBB 또는 scheme color) */\n textColor?: string;\n /** 글꼴 이름 */\n fontFamily?: string;\n /** 기준선 이동 (양수: 위 첨자, 음수: 아래 첨자) */\n baselineShift?: number;\n }\n\n export interface ParagraphStyle {\n /** 가로 정렬 */\n alignH?: TextAlignH;\n /** 줄 간격 값. MULTIPLE 이면 배수 백분율(150=1.5배), EXACT 이면 pt */\n lineSpacing?: number;\n /** 줄 간격 유형 (기본값: LineSpacingType.MULTIPLE) */\n lineSpacingType?: LineSpacingType;\n /** 단락 전체의 왼쪽 여백 (pt) */\n marginLeft?: number;\n /** 첫 줄에만 적용되는 들여쓰기 (pt). 양수는 들여쓰기, 음수는 내어쓰기, 0 은 들여쓰기 없음 */\n firstLineIndent?: number;\n /** 단락 앞 간격 (pt) */\n spaceBefore?: number;\n /** 단락 뒤 간격 (pt) */\n spaceAfter?: number;\n }\n\n // =============================================================================\n // Classes\n // =============================================================================\n\n // 가드 target 핸들의 명목 브랜드 키 — 비-export 선언 전용 심볼이라 런타임 값이 없고\n // 외부 코드가 키를 참조할 수도 없다. 인터페이스의 [__proxyBrand] 멤버에서만 사용한다.\n declare const __proxyBrand: unique symbol;\n\n /**\n * 문서 전체를 다루는 진입점으로, 슬라이드 조회·검색(getSlide/findShapes/findText 등),\n * 슬라이드 삽입·삭제·복제·이동(insertSlide/deleteSlide/duplicateSlide 등),\n * 날짜·슬라이드 번호·바닥글 일괄 설정(setDate/setSlideNumber/setFooter 등),\n * 테마 적용(setColorScheme/setFontScheme/setFormatScheme 등),\n * 저장·다운로드·인쇄(save/download/print 등), 슬라이드 쇼 시작(startSlideShow)을 제공한다.\n */\n export interface Document {\n /**\n * 문서(캔버스) 정보를 반환한다.\n *\n * @returns 슬라이드 영역의 가로·세로 크기 (px) 와 전체 슬라이드 수\n */\n getDocumentInfo(): Promise<{ width: number; height: number; slideCount: number }>;\n /**\n * 슬라이드 영역 크기 (px). 문서 내 모든 슬라이드가 공유하는 단일 값.\n *\n * @returns 슬라이드 영역의 가로·세로 크기 (px)\n */\n getSlideSize(): Promise<{ width: number; height: number }>;\n /**\n * 인덱스로 슬라이드를 가져온다.\n *\n * @param index - 0-based\n * @returns 해당 슬라이드 (범위를 벗어나면 null)\n */\n getSlide(index: number): Promise<Slide | null>;\n /**\n * 슬라이드의 0-based 인덱스를 찾는다.\n *\n * @param slideProxy - 대상 슬라이드\n * @returns 문서에 없는 슬라이드면 -1\n */\n getSlideIndex(slideProxy: Slide): Promise<number>;\n /**\n * 문서의 모든 슬라이드를 순서대로 반환한다.\n *\n * @returns 슬라이드 목록\n */\n getSlides(): Promise<Slide[]>;\n /**\n * 지정한 슬라이드가 속한 마스터의 레이아웃 목록을 반환한다.\n * 레이아웃은 마스터 단위의 상위 개념이라 문서 레벨에서 조회한다.\n *\n * @param slideProxy - 대상 슬라이드\n * @returns 레이아웃 목록 (대상 슬라이드가 없으면 빈 배열 반환)\n */\n getLayoutList(slideProxy: Slide): Promise<{ name: string; type: SlideLayoutType }[]>;\n /**\n * @returns 문서의 전체 슬라이드 수\n */\n getSlideCount(): Promise<number>;\n /**\n * 현재 보기의 슬라이드를 반환한다.\n *\n * @returns 현재 슬라이드 (문서에 슬라이드가 없으면 null)\n */\n getCurrentSlide(): Promise<Slide | null>;\n /**\n * 조건에 맞는 슬라이드를 검색한다.\n *\n * @param filter - 검색 조건 (기본값: 전체 슬라이드)\n * @returns 조건에 맞는 슬라이드 목록\n */\n findSlides(filter?: SlideFilter): Promise<Slide[]>;\n /**\n * 여러 슬라이드에서 조건에 맞는 도형을 검색한다.\n * 슬라이드별 검색은 Slide.findShapes 와 동일하며, 결과를 슬라이드 순서대로 합친다.\n *\n * @param slides - 검색 대상 슬라이드\n * @param filter - 검색 조건 (Slide.findShapes 와 동일) (기본값: 전체 도형)\n * @returns 조건에 맞는 도형 목록\n */\n findShapes(slides: Slide[], filter?: ShapeFilter): Promise<(Shape | Image | Line | Group | Chart | Table | Diagram | OleObject | Control)[]>;\n /**\n * 여러 슬라이드에서 조건에 맞는 표를 검색한다.\n *\n * @param slides - 검색 대상 슬라이드\n * @param filter - 검색 조건 (Slide.findTables 와 동일) (기본값: 전체 표)\n * @returns 조건에 맞는 표 목록\n */\n findTables(slides: Slide[], filter?: TableFilter): Promise<Table[]>;\n /**\n * 여러 슬라이드에서 조건에 맞는 차트를 검색한다.\n *\n * @param slides - 검색 대상 슬라이드\n * @param filter - 검색 조건 (Slide.findCharts 와 동일) (기본값: 전체 차트)\n * @returns 조건에 맞는 차트 목록\n */\n findCharts(slides: Slide[], filter?: ChartFilter): Promise<Chart[]>;\n /**\n * 여러 슬라이드에서 조건에 맞는 댓글을 검색한다.\n *\n * @param slides - 검색 대상 슬라이드\n * @param filter - 검색 조건 (Slide.findComments 와 동일) (기본값: 전체 댓글)\n * @returns 조건에 맞는 댓글 목록\n */\n findComments(slides: Slide[], filter?: CommentFilter): Promise<Comment[]>;\n /**\n * 텍스트를 검색한다. slideProxyList 를 주면 그 슬라이드들만 검색한다.\n * 매치는 문서 순서(슬라이드 → 도형 → 표 셀)로 반환된다.\n * 병합으로 숨겨진 표 셀, 슬라이드 번호·날짜 같은 자동 갱신 필드, 문단 경계를 가로지르는 매치는 검색되지 않는다.\n *\n * @param query - 찾을 텍스트\n * @param slideProxyList - 검색 대상 슬라이드 (기본값: 전체 슬라이드)\n * @param caseSensitive - 대소문자 구분 (기본값: false)\n * @returns 매치 목록. target 은 표 셀 매치면 TableCell, 아니면 도형 프록시(Shape)이며, range 를 그대로 서식 API 에 넘겨 매치 구간만 편집할 수 있다 (예: `m.target.setBold(true, m.range)`). range 의 from/to 는 글자 offset(to 포함), text 는 검색 시점의 매치 텍스트다.\n */\n findText(query: string, slideProxyList?: Slide[], caseSensitive?: boolean): Promise<{ target: (TableCell | Shape); range: TextRange; text: string }[]>;\n /**\n * 적용 가능한 표 스타일 이름 목록을 반환한다.\n * 여기서 얻은 이름을 slide.insertTable / table.setStyle 에 그대로 넘긴다.\n *\n * @returns 표 스타일 이름 목록 (편집기 '표 스타일' 갤러리와 동일)\n */\n getTableStyleNames(): Promise<string[]>;\n /**\n * 적용 가능한 색상 테마(빌트인 + 사용자 정의) 목록을 반환한다.\n *\n * @returns 색상 테마 목록 (prst: 프리셋 이름, name: 표시 이름, colors: 슬롯 이름 → #RRGGBB)\n */\n getColorSchemeList(): Promise<{ prst: string; name: string; colors: Record<string, unknown> }[]>;\n /**\n * 문서의 색상 테마를 반환한다. (setColorScheme 대칭)\n * 현재 슬라이드가 속한 마스터의 테마이며, setSlideColorScheme 으로 준 슬라이드별 재정의는 포함하지 않는다.\n * 슬라이드별 조회는 slide.getColorScheme() 을 사용한다.\n *\n * @returns 색상 테마 (prst: getColorSchemeList 에 있는 테마일 때만 채워지고 파일에서 읽은 문서 고유 테마면 null, name: 테마 이름, colors: 슬롯 이름 → #RRGGBB). 문서에 슬라이드가 없으면 null\n */\n getColorScheme(): Promise<{ prst: string | null; name: string; colors: Record<string, unknown> } | null>;\n /**\n * 문서의 테마 글꼴을 반환한다. (setFontScheme 대칭)\n *\n * @returns 현재 테마 글꼴 (prst: getFontSchemeList 에 있는 테마일 때만 채워지고 목록에 없는 문서 고유 테마면 null, name: 테마 이름). 문서에 슬라이드가 없으면 null\n */\n getFontScheme(): Promise<{ prst: string | null; name: string } | null>;\n /**\n * 문서의 테마 효과를 반환한다. (setFormatScheme 대칭)\n *\n * @returns 현재 테마 효과 (prst: getFormatSchemeList 에 있는 테마일 때만 채워짐, name: 표시 이름, 목록에 없으면 테마 원본 이름). 문서에 슬라이드가 없으면 null\n */\n getFormatScheme(): Promise<{ prst: string | null; name: string } | null>;\n /**\n * 문서 전체의 댓글 표시 여부를 반환한다. (showComments 대칭)\n *\n * @returns 댓글이 표시 중이면 true\n */\n isCommentsVisible(): Promise<boolean>;\n /**\n * 적용 가능한 테마 글꼴(빌트인 + 사용자 정의) 목록을 반환한다.\n *\n * @returns 테마 글꼴 목록 (prst: 프리셋 이름, name: 표시 이름)\n */\n getFontSchemeList(): Promise<{ prst: string; name: string }[]>;\n /**\n * 적용 가능한 테마 효과 목록을 반환한다.\n *\n * @returns 테마 효과 목록 (prst: 프리셋 이름, name: 표시 이름)\n */\n getFormatSchemeList(): Promise<{ prst: string; name: string }[]>;\n /**\n * 차트 프리셋 스타일(1~12)별 계열 색 팔레트를 현재 슬라이드에 적용된 테마 기준으로 반환한다.\n * set_chart_style 의 style 을 고를 때 참고용.\n * style 은 색 그룹(4) × 배경/선 변형(3) 조합. 색은 그룹으로만 결정되므로 같은 그룹(예: 1~3)은 colors 가 동일하고,\n * 그룹 내 차이(뒤 1/2/3)는 배경/선 변형(variant)이다. 색은 테마 accent 에 종속 — 테마가 바뀌면 값도 바뀐다.\n *\n * @returns 차트 스타일 목록. 문서에 슬라이드가 없으면 빈 배열\n */\n getChartStyleList(): Promise<{ style: number; colors: string[]; variant: string }[]>;\n /**\n * 검색 텍스트를 찾아 모두 새 텍스트로 바꾼다. (모두 바꾸기) slideProxyList 를 주면 그 슬라이드들만 바꾼다.\n * 병합으로 숨겨진 표 셀, 슬라이드 번호·날짜 같은 자동 갱신 필드, 문단 경계를 가로지르는 매치는 바뀌지 않는다.\n * 협업 잠금 등으로 편집할 수 없는 텍스트의 매치도 바꾸지 않고 skippedCount 로 반환한다.\n *\n * @param query - 찾을 텍스트\n * @param replacement - 바꿀 텍스트. 빈 문자열이면 매치를 삭제한다 (기본값: \"\")\n * @param slideProxyList - 치환 대상 슬라이드 (기본값: 전체 슬라이드)\n * @param caseSensitive - 대소문자 구분 (기본값: false)\n * @returns 치환한 매치 수 / 제외한 매치 수\n */\n replaceText(query: string, replacement?: string, slideProxyList?: Slide[], caseSensitive?: boolean): Promise<{ replacedCount: number; skippedCount: number }>;\n /**\n * 새 슬라이드를 삽입한다.\n *\n * @param index - 삽입 위치 (0-based) (기본값: 마지막에 추가)\n * @param layoutType - 레이아웃 종류. 같은 type 이 여럿이면 첫 번째. 지정한 type 미존재 시 BLANK (문서에 BLANK 가 없으면 첫 번째 마스터의 첫 번째 레이아웃) (기본값: SlideLayoutType.BLANK)\n * @returns 삽입된 슬라이드\n */\n insertSlide(index?: number, layoutType?: SlideLayoutType): Promise<Slide>;\n /**\n * 이미지(URL / data:URI)를 서버 파일 DB 에 업로드한다. (SVG 임포트의 이미지 처리)\n * 업로드 해소는 ApiUtils.uploadImageLink 로 공통화돼 있다(도형/배경 setImageFill·htmlImport 공유).\n *\n * @param url - 이미지 URL 또는 data URI\n * @returns 성공 시 로더의 imgFileInfo 원본 그대로(src/width/height, isError 없음) resolve, 실패 시 { isError: true } resolve\n */\n uploadImageFromUrl(url: string): Promise<{isError?:boolean, src?:string, width?:number, height?:number}>;\n /**\n * 슬라이드 하나를 삭제한다.\n *\n * @param slideProxy - 삭제할 슬라이드\n */\n deleteSlide(slideProxy: Slide): Promise<void>;\n /**\n * 여러 슬라이드를 일괄 삭제한다.\n *\n * @param slideProxyList - 삭제할 슬라이드 배열\n */\n deleteSlides(slideProxyList: Slide[]): Promise<void>;\n /**\n * 슬라이드 하나를 복제한다.\n *\n * @param slideProxy - 복제할 슬라이드\n * @returns 복제된 슬라이드 Proxy\n */\n duplicateSlide(slideProxy: Slide): Promise<Slide | null>;\n /**\n * 여러 슬라이드를 일괄 복제한다.\n *\n * @param slideProxyList - 복제할 슬라이드 배열\n * @returns 복제된 슬라이드 Proxy 배열\n */\n duplicateSlides(slideProxyList: Slide[]): Promise<Slide[]>;\n /**\n * 슬라이드를 다른 위치로 이동한다.\n *\n * @param fromIndex - 이동 원본 인덱스 (0-based)\n * @param toIndex - 이동 대상 인덱스 (0-based)\n */\n moveSlide(fromIndex: number, toIndex: number): Promise<void>;\n /**\n * 지정한 슬라이드로 현재 보기를 전환한다.\n *\n * @param slideProxy - 이동할 슬라이드\n */\n goToSlide(slideProxy: Slide): Promise<void>;\n /**\n * 모든 슬라이드의 날짜 머리글/바닥글을 설정한다. (없으면 생성, 있으면 갱신)\n *\n * @param date - 날짜 설정 (기본값: 자동갱신 날짜)\n */\n setDate(date?: HeaderFooterDate): Promise<void>;\n /**\n * 모든 슬라이드의 날짜 머리글/바닥글을 제거한다.\n */\n removeDate(): Promise<void>;\n /**\n * 모든 슬라이드에 슬라이드 번호를 표시한다.\n */\n setSlideNumber(): Promise<void>;\n /**\n * 모든 슬라이드의 슬라이드 번호를 제거한다.\n */\n removeSlideNumber(): Promise<void>;\n /**\n * 모든 슬라이드의 바닥글을 설정한다. (없으면 생성, 있으면 갱신)\n *\n * @param text - 바닥글 텍스트\n */\n setFooter(text: string): Promise<void>;\n /**\n * 모든 슬라이드의 바닥글을 제거한다.\n */\n removeFooter(): Promise<void>;\n /**\n * 여러 슬라이드의 숨김 상태를 일괄 변경한다.\n *\n * @param slideProxyList - 대상 슬라이드 배열\n * @param isHidden - true: 숨김, false: 표시\n */\n hideSlides(slideProxyList: Slide[], isHidden: boolean): Promise<void>;\n /**\n * 여러 슬라이드의 배경을 일괄 초기화한다.\n *\n * @param slideProxyList - 대상 슬라이드 배열\n */\n resetBackgrounds(slideProxyList: Slide[]): Promise<void>;\n /**\n * 여러 슬라이드에 전환 효과를 일괄 적용한다. (단일 undo 로 처리)\n * 효과가 지원하는 옵션만 반영되며, 주지 않은 값은 기본 모델에서 채운다.\n * 효과 제거는 type 으로 하지 않고 removeTransition() 을 사용한다.\n *\n * @param slideProxyList - 대상 슬라이드 배열 (전체 적용은 getSlides() 를 넘긴다)\n * @param transition - 전환 효과 설정\n */\n setTransition(slideProxyList: Slide[], transition: Transition): Promise<void>;\n /**\n * 여러 슬라이드의 전환 효과를 제거한다. (단일 undo 로 처리)\n *\n * @param slideProxyList - 대상 슬라이드 배열\n */\n removeTransition(slideProxyList: Slide[]): Promise<void>;\n /**\n * 문서 전체의 색상 테마를 변경한다.\n * getColorSchemeList 로 목록을 확인한 뒤 prst 를 전달한다.\n *\n * @param colorSchemePrst - 색상 테마 프리셋 이름\n * @throws {Error} 목록에 없는 prst 인 경우 (error.code = \"SCHEME_NOT_FOUND\"),\n * 문서에 슬라이드가 없는 경우 (error.code = \"EXECUTION_ERROR\")\n */\n setColorScheme(colorSchemePrst: string): Promise<void>;\n /**\n * 지정한 슬라이드들에만 색상 테마를 적용한다.\n * 이후 setColorScheme 으로 문서 전체 테마를 바꾸면 여기서 준 슬라이드별 재정의는 모두 해제된다.\n * getColorSchemeList 로 목록을 확인한 뒤 prst 를 전달한다.\n *\n * @param slideProxyList - 대상 슬라이드 배열\n * @param colorSchemePrst - 색상 테마 프리셋 이름\n * @throws {Error} 목록에 없는 prst 인 경우 (error.code = \"SCHEME_NOT_FOUND\")\n */\n setSlideColorScheme(slideProxyList: Slide[], colorSchemePrst: string): Promise<void>;\n /**\n * 사용자 정의 색상 테마를 생성하고 현재 문서에 적용한다.\n *\n * @param colorScheme - 새 색상 테마 정보\n * @throws {Error} 이름이 이미 있거나 문서에 슬라이드가 없는 경우 (error.code = \"EXECUTION_ERROR\")\n */\n createColorScheme(colorScheme: ColorScheme): Promise<void>;\n /**\n * 문서의 테마 글꼴을 변경한다.\n * getFontSchemeList 로 목록을 확인한 뒤 prst 를 전달한다.\n *\n * @param fontSchemePrst - 테마 글꼴 프리셋 이름\n * @throws {Error} 목록에 없는 prst 인 경우 (error.code = \"SCHEME_NOT_FOUND\"),\n * 문서에 슬라이드가 없는 경우 (error.code = \"EXECUTION_ERROR\")\n */\n setFontScheme(fontSchemePrst: string): Promise<void>;\n /**\n * 문서의 테마 효과를 변경한다.\n * getFormatSchemeList 로 목록을 확인한 뒤 prst 를 전달한다.\n *\n * @param formatSchemePrst - 테마 효과 프리셋 이름\n * @throws {Error} 목록에 없는 prst 인 경우 (error.code = \"SCHEME_NOT_FOUND\"),\n * 문서에 슬라이드가 없는 경우 (error.code = \"EXECUTION_ERROR\")\n */\n setFormatScheme(formatSchemePrst: string): Promise<void>;\n /**\n * 문서를 저장한다.\n * (서버 I/O 이므로 Actor 경유)\n */\n save(): Promise<void>;\n /**\n * 문서를 닫는다.\n * (앱 레벨 동작이므로 Actor 경유)\n */\n close(): Promise<void>;\n /**\n * 문서를 다운로드한다.\n * (서버 I/O 이므로 Actor 경유)\n */\n download(): Promise<void>;\n /**\n * 문서를 PDF 로 변환해 다운로드한다. 원본 형식(pptx 등)으로 받으려면 download() 를 사용한다.\n * 요청만 보내고 변환 완료를 기다리지 않는다 — 변환 진행·실패는 앱 상태 UI 가 표시한다.\n * OfficeFilter 사용 시 해당 API 미지원 (미구현)\n * (서버 변환·I/O 이므로 Actor 경유)\n */\n downloadAsPdf(): Promise<void>;\n /**\n * 현재 문서를 인쇄한다.\n * (브라우저 인쇄/PDF 등 앱 레벨 동작이므로 Actor 경유)\n */\n print(): Promise<void>;\n /**\n * 문서 전체의 댓글 표시 여부를 설정한다.\n *\n * @param show - true: 댓글 표시, false: 댓글 숨김\n */\n showComments(show: boolean): Promise<void>;\n /**\n * 슬라이드 쇼(전체화면 발표)를 시작한다.\n *\n * @param fromCurrent - true: 현재 슬라이드부터, false: 처음부터 (기본값: false)\n */\n startSlideShow(fromCurrent?: boolean): Promise<void>;\n /**\n * 지정한 범위를 모두 선택한다.\n *\n * @param scope - \"shape\": 현재 슬라이드의 모든 도형 - \"slide\": 모든 슬라이드 - \"text\": 현재 편집 중인 텍스트 전체 (텍스트 편집 중이 아니면 아무것도 선택 안 함) (기본값: SelectScope.SHAPE)\n * @returns 선택 대상이 없으면 false\n */\n selectAll(scope?: SelectScope): Promise<boolean>;\n /**\n * 편집 화면의 보기 배율/맞춤을 변경한다.\n *\n * @param mode - 보기 배율 또는 창 맞춤. 허용값은 ViewMode 의 8개뿐이다.\n */\n setViewMode(mode: ViewMode): Promise<void>;\n }\n\n /**\n * 슬라이드 한 장을 다루는 핸들로, 도형·표·차트·댓글 조회와 검색(getShapes/findShapes/findText 등),\n * 개체 삽입(insertShape/insertTable/insertImage 등),\n * 도형 그룹·복제·삭제·배분(groupShapes/duplicateShape/deleteShape 등), 배경 채우기(setFill 계열),\n * 레이아웃·전환 효과(setLayout/setTransition 등), 슬라이드 노트 편집(setSlideNoteText 등)을 제공하며,\n * 대상 슬라이드가 없으면(협업 중 삭제 등) getter 는 null(목록은 빈 배열)을 반환하고\n * setter 는 SLIDE_NOT_FOUND 로 실패한다.\n */\n export interface Slide {\n /**\n * 슬라이드의 모든 도형을 반환한다.\n *\n * @returns 도형 목록\n */\n getShapes(): Promise<(Shape | Image | Line | Group | Chart | Table | Diagram | OleObject | Control)[]>;\n /**\n * 인덱스로 도형을 가져온다.\n *\n * @param index - 0-based\n * @returns 해당 도형 (범위를 벗어나면 null)\n */\n getShape(index: number): Promise<Shape | Image | Line | Group | Chart | Table | Diagram | OleObject | Control | null>;\n /**\n * 조건에 맞는 도형을 검색한다.\n *\n * @param filter - 검색 조건 (기본값: 전체 도형)\n * @returns 조건에 맞는 도형 목록\n */\n findShapes(filter?: ShapeFilter): Promise<(Shape | Image | Line | Group | Chart | Table | Diagram | OleObject | Control)[]>;\n /**\n * 조건에 맞는 표를 검색한다.\n *\n * @param filter - 검색 조건 (기본값: 전체 표)\n * @returns 조건에 맞는 표 목록\n */\n findTables(filter?: TableFilter): Promise<Table[]>;\n /**\n * 조건에 맞는 차트 배열을 반환한다.\n *\n * @param filter - 검색 조건 (기본값: 전체 차트)\n */\n findCharts(filter?: ChartFilter): Promise<Chart[]>;\n /**\n * 슬라이드의 최상위 댓글(답글 제외) 목록을 반환한다.\n *\n * @returns 댓글 목록\n */\n getComments(): Promise<Comment[]>;\n /**\n * UI의 메모 탐색 기준으로 이전 최상위 댓글을 반환한다.\n *\n * @param commentProxy - 기준 최상위 댓글\n * @returns 이전 댓글 (없으면 null)\n */\n getPrevComment(commentProxy: Comment): Promise<Comment | null>;\n /**\n * UI의 메모 탐색 기준으로 다음 최상위 댓글을 반환한다.\n *\n * @param commentProxy - 기준 최상위 댓글\n * @returns 다음 댓글 (없으면 null)\n */\n getNextComment(commentProxy: Comment): Promise<Comment | null>;\n /**\n * 조건에 맞는 댓글을 검색한다.\n *\n * @param filter - 검색 조건 (기본값: 전체 댓글)\n * @returns 조건에 맞는 댓글 목록\n */\n findComments(filter?: CommentFilter): Promise<Comment[]>;\n /**\n * 이 슬라이드에서 텍스트를 검색한다. 매치는 도형 → 표 셀 순서로 반환된다.\n * 병합으로 숨겨진 표 셀, 슬라이드 번호·날짜 같은 자동 갱신 필드, 문단 경계를 가로지르는 매치는 검색되지 않는다.\n *\n * @param query - 찾을 텍스트\n * @param caseSensitive - 대소문자 구분 (기본값: false)\n * @returns 매치 목록. target 은 표 셀 매치면 TableCell, 아니면 도형 프록시(Shape)이며, range(글자 offset, to 포함)를 그대로 서식 API 에 넘겨 매치 구간만 편집할 수 있다 (예: `m.target.setBold(true, m.range)`). text 는 검색 시점의 매치 텍스트다.\n */\n findText(query: string, caseSensitive?: boolean): Promise<{ target: (TableCell | Shape); range: TextRange; text: string }[]>;\n /**\n * 슬라이드 노트의 텍스트를 plain text 로 반환한다.\n * 노트 슬라이드가 없으면 생성하지 않고 빈 문자열을 반환한다.\n *\n * @returns 노트 텍스트. 대상 슬라이드가 없으면 null\n */\n getSlideNoteText(): Promise<string | null>;\n /**\n * 슬라이드에 명시적으로 설정된 배경 채우기를 반환한다. (setSolidFill/setGradientFill/setImageFill/setPatternFill 대칭)\n * 레이아웃/마스터 상속 배경은 포함하지 않으며, 슬라이드 자체 배경이 없으면 `{ type: \"none\" }`.\n *\n * @returns 배경 채우기 정보. 대상 슬라이드가 없으면 null\n */\n getBackgroundFill(): Promise<Fill | null>;\n /**\n * 슬라이드에 적용된 레이아웃 종류를 반환한다. (setLayout 대칭)\n *\n * @returns 레이아웃 종류. 없으면 null\n */\n getLayoutType(): Promise<SlideLayoutType | null>;\n /**\n * 슬라이드 전환 효과를 setTransition 의 평면 입력 형태로 반환한다. (setTransition 대칭)\n * 표준 효과는 완전 대칭이나, 한쇼 확장 저장 케이스(대각선 wipe/strips 는 wipeout,\n * plus 안쪽은 fourboxwipe)는 부분 복원된다: wipeout 은 type=strips 로 되돌아가며(대각선 wipe 와 strips 는\n * 동일 애니메이션이라 strips 로 통일), dur/spokes 등 setTransition 입력이 아닌 값은 반환하지 않는다.\n *\n * @returns 전환 효과 설정. 효과가 없거나 대상 슬라이드가 없으면 null\n */\n getTransition(): Promise<Transition | null>;\n /**\n * 슬라이드 숨김 여부를 반환한다.\n *\n * @returns 숨김 슬라이드면 true. 대상 슬라이드가 없으면 null\n */\n isHidden(): Promise<boolean | null>;\n /**\n * 마스터(레이아웃)의 배경 도형 표시 여부를 반환한다.\n * 이 슬라이드에 설정된 값 기준이다.\n *\n * @returns 마스터 도형이 표시 중이면 true. 대상 슬라이드가 없으면 null\n */\n isShowMasterShapes(): Promise<boolean | null>;\n /**\n * 슬라이드 번호 표시 여부를 반환한다.\n *\n * @returns 슬라이드 번호가 표시 중이면 true. 대상 슬라이드가 없으면 null\n */\n isSlideNumberVisible(): Promise<boolean | null>;\n /**\n * 날짜 머리글/바닥글 설정을 반환한다. (setDate 대칭)\n * 자동갱신 날짜는 { format, language }, 고정 텍스트 날짜는 { text } 로 반환한다.\n *\n * @returns 날짜 설정. 날짜 머리글/바닥글이 없거나 대상 슬라이드가 없으면 null. DateFormat/DateLanguage 밖의 파일 저장값은 해당 필드를 생략한다\n */\n getDate(): Promise<HeaderFooterDate | null>;\n /**\n * 바닥글 텍스트를 반환한다.\n *\n * @returns 바닥글 텍스트. 바닥글이 없거나 대상 슬라이드가 없으면 null\n */\n getFooter(): Promise<string | null>;\n /**\n * 이 슬라이드에 적용된 색상 테마를 반환한다.\n * 슬라이드 재정의가 없으면 마스터(문서) 테마가 반환된다.\n *\n * @returns 색상 테마 (prst: doc.getColorSchemeList() 에 있는 테마일 때만 채워짐, name: 표시 이름, colors: 슬롯 이름 → #RRGGBB). 대상 슬라이드가 없으면 null\n */\n getColorScheme(): Promise<{ prst: string | null; name: string; colors: Record<string, unknown> } | null>;\n /**\n * 이 슬라이드에서 검색 텍스트를 찾아 모두 새 텍스트로 바꾼다. (모두 바꾸기)\n * 병합으로 숨겨진 표 셀, 슬라이드 번호·날짜 같은 자동 갱신 필드, 문단 경계를 가로지르는 매치는 바뀌지 않는다.\n * 협업 잠금 등으로 편집할 수 없는 텍스트의 매치도 바꾸지 않고 skippedCount 로 반환한다.\n *\n * @param query - 찾을 텍스트\n * @param replacement - 바꿀 텍스트. 빈 문자열이면 매치를 삭제한다 (기본값: \"\")\n * @param caseSensitive - 대소문자 구분 (기본값: false)\n * @returns 치환한 매치 수 / 제외한 매치 수\n */\n replaceText(query: string, replacement?: string, caseSensitive?: boolean): Promise<{ replacedCount: number; skippedCount: number }>;\n /**\n * 도형을 삽입한다.\n *\n * @param presetId - 도형 프리셋 ID (ShapePreset enum 참조) (기본값: ShapePreset.RECT)\n * @param transform - 위치/크기 (px 단위) (기본값: 슬라이드 중앙, 기본 크기)\n * @param transform.x - X 좌표 (px) (기본값: 가로 중앙)\n * @param transform.y - Y 좌표 (px) (기본값: 세로 중앙)\n * @param transform.width - 너비 (px) (기본값: 프리셋 기본 크기)\n * @param transform.height - 높이 (px) (기본값: 프리셋 기본 크기)\n * @param transform.angle - 회전 각도 (degree) (기본값: 0)\n * @returns 삽입된 도형\n */\n insertShape(presetId?: ShapePreset, transform?: { x?: number; y?: number; width?: number; height?: number; angle?: number }): Promise<Shape | Line>;\n /**\n * 글상자(텍스트박스)를 삽입한다. 삽입 후 반환된 프록시의 setText/insertText 로 텍스트를 넣는다.\n *\n * @param transform - 위치/크기 (px 단위) (기본값: 슬라이드 중앙, 기본 크기)\n * @param transform.x - X 좌표 (px) (기본값: 가로 중앙)\n * @param transform.y - Y 좌표 (px) (기본값: 세로 중앙)\n * @param transform.width - 너비 (px) (기본값: 기본 크기)\n * @param transform.height - 높이 (px) (기본값: 기본 크기)\n * @param transform.angle - 회전 각도 (degree) (기본값: 0)\n */\n insertTextBox(transform?: { x?: number; y?: number; width?: number; height?: number; angle?: number }): Promise<Shape>;\n /**\n * 표를 삽입한다.\n *\n * @param rowNum - 행 수\n * @param colNum - 열 수\n * @param styleName - 표 스타일 이름 (doc.getTableStyleNames() 결과). 목록에 없는 이름이면 throw (기본값: 문서 기본 스타일)\n * @returns 삽입된 표\n */\n insertTable(rowNum: number, colNum: number, styleName?: string): Promise<Table>;\n /**\n * 웹 이미지를 삽입한다.\n *\n * @param url - 이미지 URL\n * @returns 삽입된 이미지 도형 Proxy\n */\n insertImage(url: string): Promise<Image>;\n /**\n * 웹 동영상(YouTube / 3DS)을 삽입한다.\n *\n * @param url - 웹 동영상 URL (YouTube watch/embed/shorts/youtu.be, 3DS media)\n * @returns 삽입된 웹 동영상 도형 Proxy\n * @throws {Error} 지원하지 않는 URL 이거나 미디어 해석에 실패한 경우 (error.code = \"INVALID_ARGUMENT\")\n */\n insertWebVideo(url: string): Promise<Image>;\n /**\n * 슬라이드의 도형들을 하나의 이미지로 저장한다. (기존 UI 동작과 동일)\n *\n * @param shapeProxyList - 이미지로 저장할 도형 Proxy 배열\n */\n saveAsPicture(shapeProxyList: (Shape | Image | Line | Group | Chart | Table | Diagram | OleObject | Control)[]): Promise<void>;\n /**\n * 여러 도형을 하나의 그룹으로 묶는다.\n * 묶인 도형은 그룹의 자식으로 다시 만들어지므로 넘긴 프록시는 더 이상 유효하지 않다.\n * 자식은 반환된 그룹의 getChildren() 으로 다시 얻는다.\n *\n * @param shapeProxyList - 그룹화할 도형 Proxy 배열 (서로 다른 도형 2개 미만이면 throw)\n * @returns 생성된 그룹 도형 (실패 시 null)\n * @throws {Error} 그룹 안의 자식 도형이나 그룹 잠금(noGrp) 도형이 포함된 경우 (error.code = \"EXECUTION_ERROR\")\n */\n groupShapes(shapeProxyList: (Shape | Image | Line | Group | Chart | Table | Diagram | OleObject | Control)[]): Promise<Group | null>;\n /**\n * 그룹을 해제해 자식 도형으로 분리한다.\n * 분리된 자식은 새 도형으로 다시 만들어지므로 해제 전에 얻어 둔 자식 프록시는 더 이상 유효하지 않다.\n * 분리된 도형은 반환값으로 받는다.\n *\n * @param shapeProxy - 그룹 해제할 그룹 도형 Proxy\n * @returns 분리된 자식 도형 배열\n * @throws {Error} 그룹 해제할 수 없는 도형인 경우 (error.code = \"EXECUTION_ERROR\")\n */\n ungroupShapes(shapeProxy: Group): Promise<(Shape | Image | Line | Group | Chart | Table | Diagram | OleObject | Control)[]>;\n /**\n * 도형 하나를 삭제한다.\n *\n * @param shapeProxy - 삭제할 도형 Proxy\n */\n deleteShape(shapeProxy: Shape | Image | Line | Group | Chart | Table | Diagram | OleObject | Control): Promise<void>;\n /**\n * 여러 도형을 일괄 삭제한다.\n *\n * @param shapeProxyList - 삭제할 도형 Proxy 배열\n */\n deleteShapes(shapeProxyList: (Shape | Image | Line | Group | Chart | Table | Diagram | OleObject | Control)[]): Promise<void>;\n /**\n * 도형을 복제한다. 차트는 복제할 수 없어 null을 반환한다.\n *\n * @param shapeProxy - 복제할 도형 Proxy\n * @returns 새로 생성된 도형 Proxy\n */\n duplicateShape(shapeProxy: Shape | Image | Line | Group | Chart | Table | Diagram | OleObject | Control): Promise<Shape | Image | Line | Group | Chart | Table | Diagram | OleObject | Control | null>;\n /**\n * 도형을 복제한다. 차트는 복제할 수 없어 결과에서 제외된다.\n *\n * @param shapeProxyList - 복제할 도형 Proxy 배열\n * @returns 새로 생성된 도형 Proxy 배열\n */\n duplicateShapes(shapeProxyList: (Shape | Image | Line | Group | Chart | Table | Diagram | OleObject | Control)[]): Promise<(Shape | Image | Line | Group | Chart | Table | Diagram | OleObject | Control)[]>;\n /**\n * 여러 도형을 균등하게 분배(distribute) 한다.\n * bbox 중심 기준으로 정렬한 뒤, 양 끝 도형 사이 간격이 모두 같아지도록 재배치한다. (2개 미만이면 변경 없음)\n *\n * @param shapeProxyList - 분배할 도형 Proxy 배열\n * @param direction - 분배 방향\n */\n distributeShapes(shapeProxyList: (Shape | Image | Line | Group | Chart | Table | Diagram | OleObject | Control)[], direction: DistributeDirection): Promise<void>;\n /**\n * 이 슬라이드의 숨김 상태를 설정한다.\n *\n * @param isHidden - true: 슬라이드 숨김, false: 슬라이드 표시\n */\n hide(isHidden: boolean): Promise<void>;\n /**\n * 슬라이드에 레이아웃을 적용한다.\n * 같은 type 이 여럿이면 마스터 순서상 첫 번째 레이아웃이 선택된다.\n *\n * @param layoutType - 레이아웃 종류. doc.getLayoutList(slide) 로 사용 가능한 type 확인\n * @returns 적용 여부 (해당 type 이 이 슬라이드의 마스터에 없으면 false)\n */\n setLayout(layoutType: SlideLayoutType): Promise<boolean>;\n /**\n * 슬라이드 레이아웃을 초기화한다.\n */\n resetLayout(): Promise<void>;\n /**\n * 슬라이드 배경을 초기화한다.\n */\n resetBackground(): Promise<void>;\n /**\n * 마스터(레이아웃)의 배경 도형 표시 여부를 설정한다.\n *\n * @param show - true: 마스터 도형 표시, false: 숨김\n */\n setShowMasterShapes(show: boolean): Promise<void>;\n /**\n * 슬라이드 배경을 단색으로 설정한다.\n *\n * @param color - hex (#RRGGBB) 또는 scheme color\n * @param alpha - 투명도 (0~100, 0=불투명) (기본값: 기존 값 유지)\n */\n setSolidFill(color: string, alpha?: number): Promise<void>;\n /**\n * 슬라이드 배경을 그라데이션으로 설정한다.\n *\n * @param type - 그라데이션 유형 (lin/circle/rect/shape) (기본값: GradientType.LINEAR)\n * @param stops - 색상 변화점. pos 생략 시 균등 분배, alpha 는 투명도(0~100) (기본값: [{ color: \"accent1\", pos: 0 }, { color: \"bg1\", pos: 100 }])\n * @param angle - 그라데이션 각도 (lin 일 때만 사용) (기본값: 45)\n * @example\n * slide.setGradientFill(\"lin\", [{ color: \"#FF0000\" }, { color: \"#0000FF\" }], 90);\n */\n setGradientFill(type?: GradientType, stops?: { color: string; pos?: number; alpha?: number }[], angle?: number): Promise<void>;\n /**\n * 슬라이드 배경을 이미지로 설정한다.\n *\n * @param imageUrl - 이미지 URL\n * @param fillMode - 이미지 채우기 방식 (기본값: ImageFillMode.STRETCH)\n * @param alpha - 투명도 (0~100) (기본값: 0(불투명))\n * @param detail - 세부 옵션. offset/scale/mirror/align 은 fillMode=ImageFillMode.TILE 일 때만 반영 (기본값: {})\n * @returns 이미지 업로드 후 배경 적용이 끝나면 resolve. 업로드 실패 시 EXECUTION_ERROR 로 reject\n */\n setImageFill(imageUrl: string, fillMode?: ImageFillMode, alpha?: number, detail?: ImageFillDetail): Promise<void>;\n /**\n * 슬라이드 배경 채우기를 제거한다.\n */\n removeFill(): Promise<void>;\n /**\n * 슬라이드 배경을 패턴(무늬)으로 설정한다. (getBackgroundFill 왕복 대칭 — setFill 의 pattern 경로)\n *\n * @param preset - 무늬 프리셋 (apiConstants.PatternPreset)\n * @param foreColor - 전경색 hex (#RRGGBB) 또는 scheme color (기본값: accent1(테마 강조색1))\n * @param backColor - 배경색 hex (#RRGGBB) 또는 scheme color (기본값: bg1(테마 배경색1))\n * @param foreAlpha - 전경색 투명도 (0~100) (기본값: 0(불투명))\n * @param backAlpha - 배경색 투명도 (0~100) (기본값: 0(불투명))\n */\n setPatternFill(preset: PatternPreset, foreColor?: string, backColor?: string, foreAlpha?: number, backAlpha?: number): Promise<void>;\n /**\n * getBackgroundFill() 이 반환한 채우기 객체를 그대로 슬라이드 배경에 적용한다. (getBackgroundFill 대칭)\n * type 으로 분기해 대응 setter 를 호출한다. image 는 readback 의 embed 를 재사용해 같은 문서 안에서 복원한다.\n * embed 가 없는 image 입력은 무시된다(새 이미지는 개별 setImageFill 사용).\n *\n * @param fill - getBackgroundFill() 반환값\n */\n setFill(fill?: Fill): Promise<void>;\n /**\n * 댓글을 추가한다.\n *\n * @param text - 댓글 텍스트\n * @returns 생성된 댓글 (실패 시 null)\n */\n insertComment(text: string): Promise<Comment | null>;\n /**\n * 댓글에 답글을 추가한다.\n *\n * @param commentProxy - 부모 댓글\n * @param text - 답글 텍스트\n * @returns 생성된 답글\n * @throws {Error} 부모 댓글이 없는 경우 (error.code = \"COMMENT_NOT_FOUND\")\n */\n replyComment(commentProxy: Comment, text: string): Promise<Comment | null>;\n /**\n * 댓글 하나를 삭제한다. 부모 댓글이면 그 답글도 함께 삭제된다.\n *\n * @param commentProxy - 삭제할 댓글\n */\n deleteComment(commentProxy: Comment): Promise<void>;\n /**\n * 여러 댓글을 일괄 삭제한다. 부모 댓글이 포함되면 그 답글도 함께 삭제된다. (UI 동작과 일치)\n *\n * @param commentProxyList - 삭제할 댓글 배열\n * @throws {Error} 슬라이드에 없는 댓글이 포함된 경우 (error.code = \"COMMENT_NOT_FOUND\")\n */\n deleteComments(commentProxyList: Comment[]): Promise<void>;\n /**\n * 슬라이드 전환 효과를 설정한다. 평면 입력을 모델 포맷으로 변환해 적용한다.\n * 효과가 지원하는 옵션만 반영되며, 주지 않은 값은 기본 모델에서 채운다.\n * 효과 제거는 type 으로 하지 않고 removeTransition() 을 사용한다.\n *\n * @param transition - 전환 효과 설정\n */\n setTransition(transition: Transition): Promise<void>;\n /**\n * 전환 효과를 제거한다.\n */\n removeTransition(): Promise<void>;\n /**\n * 이 슬라이드에 설정된 전환 효과 미리보기를 화면에서 재생한다.\n * 미리보기는 현재 보고 있는 슬라이드에서만 동작하므로, 이 슬라이드가 현재 슬라이드가\n * 아니면 재생하지 않고 예외를 던진다. 다른 슬라이드는 먼저 goToSlide 로 이동한 뒤 호출한다.\n * 문서를 변경하지 않는 표시용 동작이다.\n *\n * @param autoPreview - 지정하면 재생 대신 '자동 미리보기 설정'을 on/off 로 토글한다 (전환 효과 설정 시 자동으로 미리보기를 재생할지 여부, 앱 전역 설정) (기본값: 없음(즉시 미리보기 재생))\n */\n previewTransition(autoPreview?: boolean): Promise<void>;\n /**\n * 이 슬라이드의 날짜 머리글/바닥글을 설정한다. (없으면 생성, 있으면 갱신)\n *\n * @param date - 날짜 설정 (기본값: 자동갱신 날짜)\n */\n setDate(date?: HeaderFooterDate): Promise<void>;\n /**\n * 이 슬라이드의 날짜 머리글/바닥글을 제거한다.\n */\n removeDate(): Promise<void>;\n /**\n * 이 슬라이드에 슬라이드 번호를 표시한다.\n */\n setSlideNumber(): Promise<void>;\n /**\n * 이 슬라이드의 슬라이드 번호를 제거한다.\n */\n removeSlideNumber(): Promise<void>;\n /**\n * 이 슬라이드의 바닥글을 설정한다. (없으면 생성, 있으면 갱신)\n *\n * @param text - 바닥글 텍스트\n */\n setFooter(text: string): Promise<void>;\n /**\n * 이 슬라이드의 바닥글을 제거한다.\n */\n removeFooter(): Promise<void>;\n /**\n * 슬라이드 노트 텍스트를 설정한다. (기존 노트 내용은 대체됨)\n *\n * @param text - 노트 텍스트\n */\n setSlideNoteText(text: string): Promise<void>;\n /**\n * 슬라이드 노트 끝에 텍스트를 이어 붙인다.\n *\n * @param text - 추가할 노트 텍스트\n */\n appendSlideNoteText(text: string): Promise<void>;\n }\n\n /**\n * 댓글 하나를 다루는 핸들로, 내용·작성자·작성 시각·위치 조회(getText/getAuthorName/getDateTime 등),\n * 답글 관계 조회(isReply/getParent/getReplies 등), 내용 수정(setText/appendText),\n * 위치 이동(moveBy/setPosition), 표시 스타일 변경(setStyle)을 제공하며,\n * 대상 댓글이 없으면(협업 중 삭제 등) getter 는 null(목록은 빈 배열)을 반환하고\n * setter 는 COMMENT_NOT_FOUND 로 실패한다.\n */\n export interface Comment {\n /**\n * 댓글 텍스트를 반환한다.\n *\n * @returns 댓글 텍스트. 대상 댓글이 없으면 null\n */\n getText(): Promise<string | null>;\n /**\n * 댓글 작성자 이름을 반환한다.\n *\n * @returns 작성자 이름 (작성자 정보가 없으면 빈 문자열). 대상 댓글이 없으면 null\n */\n getAuthorName(): Promise<string | null>;\n /**\n * 댓글 작성 일시를 반환한다.\n *\n * @returns 작성 일시 'YYYY-MM-DDTHH:mm:ss.SSS'. 대상 댓글이 없으면 null\n */\n getDateTime(): Promise<string | null>;\n /**\n * 댓글 메모 아이콘의 슬라이드 기준 위치를 반환한다.\n *\n * @returns 댓글 메모 아이콘의 위치 (px 단위). 대상 댓글이 없으면 null\n */\n getPosition(): Promise<CommentPosition | null>;\n /**\n * 이 댓글이 답글인지 여부를 반환한다.\n *\n * @returns 답글이면 true. 대상 댓글이 없으면 null\n */\n isReply(): Promise<boolean | null>;\n /**\n * 해당 댓글의 부모 댓글을 반환한다.\n *\n * @returns 부모 댓글. 답글이 아니거나 대상 댓글이 없으면 null\n */\n getParent(): Promise<Comment | null>;\n /**\n * 답글이 하나라도 있는지 여부를 반환한다.\n *\n * @returns 답글이 있으면 true. 대상 댓글이 없으면 null\n */\n hasReplies(): Promise<boolean | null>;\n /**\n * 댓글 메모 스타일을 반환한다. (setStyle 대칭)\n * 스타일을 지정한 적 없는 댓글도 작성자별 기본 스타일로 반환된다.\n *\n * @returns 메모 스타일. 대상 댓글이 없거나 프리셋 밖 스타일이면 null\n */\n getStyle(): Promise<CommentStyle | null>;\n /**\n * 이 댓글의 답글 목록을 반환한다.\n *\n * @returns 답글 목록. 대상 댓글이 없으면 빈 배열\n */\n getReplies(): Promise<Comment[]>;\n /**\n * 댓글 텍스트를 설정한다. (기존 내용은 대체됨)\n *\n * @param text - 댓글 텍스트\n */\n setText(text: string): Promise<void>;\n /**\n * 댓글 텍스트 끝에 이어 붙인다.\n *\n * @param text - 추가할 텍스트\n */\n appendText(text: string): Promise<void>;\n /**\n * 댓글 메모를 x, y 만큼 상대 이동시킨다.\n *\n * @param distance - { x, y } (px 단위 이동량). 양수 = 오른쪽/아래\n */\n moveBy(distance: Record<string, unknown>): Promise<void>;\n /**\n * 댓글 메모를 슬라이드 기준 절대 위치로 이동시킨다. (상대 이동은 moveBy)\n *\n * @param position - { x, y } (px 단위 절대 좌표). 생략한 축은 현재값 유지\n */\n setPosition(position: Partial<CommentPosition>): Promise<void>;\n /**\n * 댓글 메모 스타일을 변경한다. (getStyle 대칭)\n *\n * @param style - 메모 스타일\n */\n setStyle(style: CommentStyle): Promise<void>;\n }\n\n /**\n * 모든 도형 종류가 공유하는 공통 API 로, 위치·크기·회전 조회와 변경(getTransform/moveBy/setRotation 등),\n * 정렬·순서·뒤집기(align/reorder/flip), 하이퍼링크(getHyperlink/setHyperlink/removeHyperlink),\n * 도형 종류 판별 가드(isShape/isImage/isChart 등)를 제공한다.\n * 대상 도형이 없으면(협업 중 삭제 등) getter 는 null 을 반환하고 setter 는 SHAPE_NOT_FOUND 로 실패한다.\n *\n * 프록시는 (슬라이드 id, 도형 id) 를 담은 값 핸들이라 조회할 때마다 새 인스턴스가 온다.\n * 같은 도형을 가리키는지 === 로 비교하거나 Set/Map 의 키로 쓸 수 없다.\n */\n export interface BaseShape {\n /**\n * 이 핸들이 `Shape` 인지 판별한다 (union 좁히기용 type guard).\n * SDK 핸들의 내부 판별값을 동기 검사한다 — postMessage 왕복 없음, await 불필요.\n */\n isShape(): this is Shape;\n /**\n * 이 핸들이 `Image` 인지 판별한다 (union 좁히기용 type guard).\n * SDK 핸들의 내부 판별값을 동기 검사한다 — postMessage 왕복 없음, await 불필요.\n */\n isImage(): this is Image;\n /**\n * 이 핸들이 `Line` 인지 판별한다 (union 좁히기용 type guard).\n * SDK 핸들의 내부 판별값을 동기 검사한다 — postMessage 왕복 없음, await 불필요.\n */\n isLine(): this is Line;\n /**\n * 이 핸들이 `Group` 인지 판별한다 (union 좁히기용 type guard).\n * SDK 핸들의 내부 판별값을 동기 검사한다 — postMessage 왕복 없음, await 불필요.\n */\n isGroup(): this is Group;\n /**\n * 이 핸들이 `Chart` 인지 판별한다 (union 좁히기용 type guard).\n * SDK 핸들의 내부 판별값을 동기 검사한다 — postMessage 왕복 없음, await 불필요.\n */\n isChart(): this is Chart;\n /**\n * 이 핸들이 `Table` 인지 판별한다 (union 좁히기용 type guard).\n * SDK 핸들의 내부 판별값을 동기 검사한다 — postMessage 왕복 없음, await 불필요.\n */\n isTable(): this is Table;\n /**\n * 이 핸들이 `Diagram` 인지 판별한다 (union 좁히기용 type guard).\n * SDK 핸들의 내부 판별값을 동기 검사한다 — postMessage 왕복 없음, await 불필요.\n */\n isDiagram(): this is Diagram;\n /**\n * 이 핸들이 `OleObject` 인지 판별한다 (union 좁히기용 type guard).\n * SDK 핸들의 내부 판별값을 동기 검사한다 — postMessage 왕복 없음, await 불필요.\n */\n isOleObject(): this is OleObject;\n /**\n * 이 핸들이 `Control` 인지 판별한다 (union 좁히기용 type guard).\n * SDK 핸들의 내부 판별값을 동기 검사한다 — postMessage 왕복 없음, await 불필요.\n */\n isControl(): this is Control;\n /**\n * 도형의 위치, 크기, 회전 정보를 반환한다.\n * x/y 는 반전(flip) 여부와 무관하게 도형의 좌상단이라, 반환값을 다른 도형의 setTransform 에 그대로 넘기면\n * 두 도형이 같은 자리에 놓인다.\n * 값은 에디터 입력 단위로 반올림해 반환한다 - 크기는 소수 한 자리, 위치는 정수.\n * setter 도 같은 단위로 넣으므로, 임포트 문서처럼 더 잘게 놓인 도형은 되넘길 때 그만큼 움직인다.\n *\n * @returns 도형의 위치·크기·회전 정보. 대상 도형이 없으면(협업 중 삭제 등) null\n */\n getTransform(): Promise<ShapeTransform | null>;\n /**\n * 도형의 너비를 반환한다. (setWidth 대칭)\n *\n * @returns 너비 (px 단위). 대상 도형이 없으면 null\n */\n getWidth(): Promise<number | null>;\n /**\n * 도형의 높이를 반환한다. (setHeight 대칭)\n *\n * @returns 높이 (px 단위). 대상 도형이 없으면 null\n */\n getHeight(): Promise<number | null>;\n /**\n * 도형의 X 좌표를 반환한다. (setX 대칭)\n *\n * @returns X 좌표 (px 단위). 대상 도형이 없으면 null\n */\n getX(): Promise<number | null>;\n /**\n * 도형의 Y 좌표를 반환한다. (setY 대칭)\n *\n * @returns Y 좌표 (px 단위). 대상 도형이 없으면 null\n */\n getY(): Promise<number | null>;\n /**\n * 도형의 회전 각도를 반환한다. (setRotation 대칭)\n *\n * @returns 회전 각도 (degree). 대상 도형이 없으면 null\n */\n getRotation(): Promise<number | null>;\n /**\n * 도형의 OOXML preset id (prst) 를 반환한다.\n *\n * @returns preset id (prst), 없으면 null\n */\n getPresetId(): Promise<string | null>;\n /**\n * 도형이 placeholder(제목 · 본문 틀 등)인지 반환한다.\n *\n * @returns placeholder 여부. 대상 도형이 없으면 null\n */\n isPlaceholder(): Promise<boolean | null>;\n /**\n * 도형의 placeholder 종류를 반환한다.\n *\n * @returns placeholder 종류. placeholder 가 아니거나 대상 도형이 없으면 null\n */\n getPlaceholderType(): Promise<PlaceholderType | null>;\n /**\n * 도형이 텍스트를 담고 있는지 반환한다. 에디터가 텍스트를 비었다고 보는 기준과 같다 —\n * 공백만 있거나 빈 문단이 둘 이상(개행만 넣은 상태)이면 true, 빈 문단 하나뿐이면 false 다.\n * 도형 레벨 텍스트가 없는 종류(표·그룹·차트)는 항상 false 다. (표는 셀 단위로 조회)\n *\n * @returns 텍스트 존재 여부. 대상 도형이 없으면 null\n */\n hasText(): Promise<boolean | null>;\n /**\n * 부모(슬라이드, 그룹 자식이면 그 그룹) 안에서 도형의 z-order 순번을 반환한다. 0 이 맨 뒤이며, 클수록 앞이다.\n *\n * @returns z-order 순번. 대상 도형이 없으면 null\n */\n getZOrderIndex(): Promise<number | null>;\n /**\n * 도형이 좌우로 반전된 상태인지 반환한다. (flip(FlipDirection.HORIZONTAL) 을 호출하면 이 값이 뒤집힌다)\n *\n * @returns 좌우 반전 여부. 대상 도형이 없으면 null\n */\n isFlippedH(): Promise<boolean | null>;\n /**\n * 도형이 상하로 반전된 상태인지 반환한다. (flip(FlipDirection.VERTICAL) 을 호출하면 이 값이 뒤집힌다)\n *\n * @returns 상하 반전 여부. 대상 도형이 없으면 null\n */\n isFlippedV(): Promise<boolean | null>;\n /**\n * 도형에 설정된 하이퍼링크를 반환한다. 반환 객체를 그대로 setHyperlink 에 넘길 수 있다.\n * 지원하지 않는 종류(프로그램 실행·매크로 등)가 걸려 있으면 null 이다.\n *\n * @returns 하이퍼링크 정보. 하이퍼링크(action)가 없으면 null\n */\n getHyperlink(): Promise<Hyperlink | null>;\n /**\n * 도형의 너비를 설정한다. 크기 조정이 불가능한 도형이면 무시된다.\n *\n * @param width - 너비 (px 단위, 소수 한 자리로 반올림)\n */\n setWidth(width: number): Promise<void>;\n /**\n * 도형의 높이를 설정한다. 크기 조정이 불가능한 도형이면 무시된다.\n *\n * @param height - 높이 (px 단위, 소수 한 자리로 반올림)\n */\n setHeight(height: number): Promise<void>;\n /**\n * 도형의 X 좌표를 절대값으로 설정한다. 이동이 불가능한 도형이면 무시된다. (상대 이동은 moveBy)\n *\n * @param x - X 좌표 (px 단위, 정수로 반올림)\n */\n setX(x: number): Promise<void>;\n /**\n * 도형의 Y 좌표를 절대값으로 설정한다. 이동이 불가능한 도형이면 무시된다.\n *\n * @param y - Y 좌표 (px 단위, 정수로 반올림)\n */\n setY(y: number): Promise<void>;\n /**\n * 도형을 현재 위치 기준으로 x, y 만큼 상대 이동한다. (절대 좌표 설정은 setX / setY)\n *\n * @param distance - 이동량 (px 단위)\n * @throws {Error} 이동한 결과 좌표가 setX/setY 와 같은 위치 범위를 벗어나는 경우 (error.code = \"INVALID_ARGUMENT\")\n */\n moveBy(distance: ShapeMoveDistance): Promise<void>;\n /**\n * 도형의 회전 각도를 절대값으로 설정한다. 회전이 불가능한 도형이면 무시된다. (getRotation 대칭)\n *\n * @param rotation - 회전 각도 (degree)\n */\n setRotation(rotation: number): Promise<void>;\n /**\n * 도형의 위치·크기·회전을 한 번에 설정한다. getTransform() 반환값을 그대로 넘길 수 있다. (getTransform 대칭)\n * 값을 준 필드만 크기→위치→회전 순으로 적용하고, 생략한 필드는 현재 값을 유지한다.\n * 각 필드는 개별 setter 와 같이 해당 조작(크기/이동/회전)이 불가능한 도형에서 무시된다.\n *\n * @param transform - 위치/크기 (px) · 회전 (degree)\n */\n setTransform(transform?: Partial<ShapeTransform>): Promise<void>;\n /**\n * 도형을 상하 또는 좌우로 반전한다. 현재 반전 상태를 뒤집는 토글이며, 지금 반전돼 있는지는\n * isFlippedH()/isFlippedV() 로 읽는다. 회전이 불가능한 도형에서는 반전도 무시된다.\n * 회전된 도형은 각도도 거울상으로 함께 바뀐다 (getRotation() 값이 360 - 기존 각도 로 바뀐다).\n *\n * @param direction - 반전 방향\n */\n flip(direction: FlipDirection): Promise<void>;\n /**\n * 도형의 정렬 순서(앞으로/뒤로)를 변경한다. 이미 목표 위치라 바뀔 것이 없으면 무시된다.\n *\n * @param order - 순서 변경 타입\n */\n reorder(order: ShapeZOrder): Promise<void>;\n /**\n * 도형을 슬라이드 기준으로 정렬한다. 이동이 불가능한 도형이면 무시된다.\n * 그룹 자식도 그룹 안이 아니라 슬라이드를 기준으로 움직인다(에디터와 같다).\n * 자식이 그룹 밖으로 나가면 그룹이 자식을 담도록 함께 넓어진다.\n *\n * @param alignType - 정렬 타입\n */\n align(alignType: AlignType): Promise<void>;\n /**\n * 도형에 하이퍼링크를 설정한다. (getHyperlink 대칭 — 반환 객체를 그대로 넘겨 하이퍼링크를 복사할 수 있다)\n * 지원하지 않는 종류나 유효하지 않은 대상(삭제된 슬라이드 등)은 무시한다.\n *\n * @param hyperlink - getHyperlink() 반환값과 같은 Hyperlink 객체. type 이 없으면 무시한다\n */\n setHyperlink(hyperlink: Hyperlink): Promise<void>;\n /**\n * 도형의 하이퍼링크를 제거한다.\n */\n removeHyperlink(): Promise<void>;\n }\n\n /**\n * 채우기·선·효과를 지원하는 도형들의 공통 API 로, 채우기(setSolidFill/setGradientFill/setImageFill 등),\n * 선 서식(setLineColor/setLineWidth/setLineDash 등),\n * 그림자·네온·부드러운 가장자리·반사 효과(setOuterShadow/setGlow/setSoftEdge 등),\n * 3D 서식(set3d/remove3d)을 제공한다.\n * 대상 도형이 없으면(협업 중 삭제 등) getter 는 null 을 반환하고 setter 는 SHAPE_NOT_FOUND 로 실패한다.\n */\n export interface BasePathShape extends BaseShape {\n /**\n * 도형 채우기를 반환한다. (setFill 대칭 - 반환 객체를 그대로 넘길 수 있다)\n * type 별 개별 setter 는 setSolidFill/setGradientFill/setImageFill/setPatternFill/removeFill 이다.\n *\n * @returns 채우기 정보. noFill 이면 `{ type: FillType.NONE }`, 대상 도형이 없으면(협업 중 삭제 등) null\n */\n getFill(): Promise<Fill | null>;\n /**\n * 선 스타일을 반환한다. (setLineStyle 대칭 - 반환 객체를 그대로 넘길 수 있다)\n * 개별 setter 는 setLineColor/setLineGradient/setLineWidth/setLineDash/setLineCap/setLineJoin 이다.\n *\n * 선 채우기는 getFill 과 같은 형태로 담는다.\n *\n * @returns 선 스타일. 대상 도형이 없으면 null\n */\n getLineStyle(): Promise<LineStyle | null>;\n /**\n * 선 색상을 반환한다. (setLineColor 대칭. 투명도까지 필요하면 getLineStyle 사용)\n *\n * @returns 선 색상 (hex \"#RRGGBB\" — scheme color 도 hex 로 풀려서 나온다). 선이 없거나 대상 도형이 없으면 null\n */\n getLineColor(): Promise<string | null>;\n /**\n * 선 두께(pt)를 반환한다. (setLineWidth 대칭)\n *\n * @returns 선 두께 (pt). 선 없음(noFill)이어도 두께는 그대로 반환한다. 대상 도형이 없으면 null\n */\n getLineWidth(): Promise<number | null>;\n /**\n * 선 대시 유형을 반환한다. (setLineDash 대칭)\n *\n * @returns 선 대시 유형. LineDash enum 이 아니거나 대상 도형이 없으면 null\n */\n getLineDash(): Promise<LineDash | null>;\n /**\n * 선 끝 모양(cap)을 반환한다. (setLineCap 대칭)\n *\n * @returns 선 끝 모양. 설정이 없거나 대상 도형이 없으면 null\n */\n getLineCap(): Promise<LineCap | null>;\n /**\n * 선 연결 유형(join)을 반환한다. (setLineJoin 대칭)\n *\n * @returns 선 연결(모서리) 유형. 설정이 없거나 대상 도형이 없으면 null\n */\n getLineJoin(): Promise<LineJoin | null>;\n /**\n * 도형에 적용된 효과를 반환한다. 적용된 효과만 키로 포함된다.\n * 각 값은 대응 setter(setOuterShadow/setInnerShadow/setGlow/setSoftEdge/setReflection/set3d) 의 인자와 같은 형태다.\n * 그림자·네온의 alpha 는 불투명(0)이어도 항상 포함되고, 길이(pt)·비율(%)은 소수 첫째 자리로 반올림된다.\n * outerShadow·innerShadow 가 함께 실린 문서면 둘 다 담는다 (setter 로는 하나만 넣을 수 있다).\n *\n * @returns 효과 정보. 적용된 효과가 없으면 빈 객체 `{}`, 대상 도형이 없으면(협업 중 삭제 등) null\n */\n getEffects(): Promise<Effects | null>;\n /**\n * 도형 채우기를 단색으로 설정한다.\n *\n * @param color - hex (#RRGGBB) 또는 scheme color\n * @param alpha - 투명도 (0~100, 0=불투명). 소수점 셋째 자리까지 저장된다 (기본값: 기존 값 유지)\n */\n setSolidFill(color: string, alpha?: number): Promise<void>;\n /**\n * 그라데이션 채우기를 설정한다.\n *\n * @param type - 그라데이션 유형 (lin/circle/rect/shape) (기본값: GradientType.LINEAR)\n * @param stops - 색상 변화점. pos 생략 시 균등 분배, alpha 는 투명도(0~100, 0=불투명) (기본값: [{ color: \"accent1\", pos: 0 }, { color: \"bg1\", pos: 100 }])\n * @param angle - 그라데이션 각도 (lin 일 때만 사용) (기본값: 45)\n * @example shape.setGradientFill(\"lin\", [{ color: \"#FF0000\" }, { color: \"#0000FF\" }], 90);\n */\n setGradientFill(type?: GradientType, stops?: { color: string; pos?: number; alpha?: number }[], angle?: number): Promise<void>;\n /**\n * 이미지 채우기를 설정한다.\n *\n * @param imageUrl - 이미지 URL\n * @param fillMode - 이미지 채우기 방식 (기본값: ImageFillMode.STRETCH)\n * @param alpha - 투명도 (0~100, 0=불투명) (기본값: 0)\n * @param detail - 세부 옵션. offset/scale/mirror/align 은 fillMode=ImageFillMode.TILE 일 때만 반영 (기본값: {})\n * @returns 이미지 업로드 후 채우기 적용이 끝나면 resolve. 대상 도형이 없으면(업로드 중 삭제 포함) SHAPE_NOT_FOUND 로, 업로드 실패 시 EXECUTION_ERROR 로 reject\n * @example shape.setImageFill(url, ImageFillMode.TILE, 0, { scale: { x: 50, y: 50 }, mirror: \"x\", align: \"tl\", rotateWithShape: true });\n */\n setImageFill(imageUrl: string, fillMode?: ImageFillMode, alpha?: number, detail?: ImageFillDetail): Promise<void>;\n /**\n * 채우기를 제거한다 (noFill).\n */\n removeFill(): Promise<void>;\n /**\n * 패턴(무늬) 채우기를 설정한다. (getFill 왕복 대칭)\n *\n * @param preset - 무늬 프리셋 (apiConstants.PatternPreset)\n * @param foreColor - 전경색 hex (#RRGGBB) 또는 scheme color (기본은 테마 강조색1) (기본값: \"accent1\")\n * @param backColor - 배경색 hex (#RRGGBB) 또는 scheme color (기본은 테마 배경색1) (기본값: \"bg1\")\n * @param foreAlpha - 전경색 투명도 (0~100, 0=불투명) (기본값: 0)\n * @param backAlpha - 배경색 투명도 (0~100, 0=불투명) (기본값: 0)\n */\n setPatternFill(preset: PatternPreset, foreColor?: string, backColor?: string, foreAlpha?: number, backAlpha?: number): Promise<void>;\n /**\n * getFill() 이 반환한 채우기 객체를 그대로 적용한다. (getFill 대칭 — 도형→도형 채우기 복사)\n * image 는 조회 결과의 embed 를 재사용하므로 같은 문서 안에서만 복원된다.\n * embed 없는 image 는 적용할 그림이 없어 거부한다 (새 이미지는 setImageFill).\n *\n * @param fill - getFill() 반환값. 생략하면 아무것도 변경하지 않는다\n * @throws {Error} image 인데 embed 가 없는 경우 (error.code = \"INVALID_ARGUMENT\")\n */\n setFill(fill?: Fill): Promise<void>;\n /**\n * 선 색상을 설정한다.\n *\n * @param color - hex (#RRGGBB) 또는 scheme color\n * @param alpha - 투명도 (0~100, 0=불투명). 소수점 셋째 자리까지 저장된다 (기본값: 기존 값 유지)\n */\n setLineColor(color: string, alpha?: number): Promise<void>;\n /**\n * 선(테두리) 그라데이션 채우기를 설정한다.\n *\n * @param type - 그라데이션 유형 (lin/circle/rect/shape) (기본값: GradientType.LINEAR)\n * @param stops - 색상 변화점. pos 생략 시 균등 분배, alpha 는 투명도(0~100, 0=불투명) (기본값: [{ color: \"accent1\", pos: 0 }, { color: \"bg1\", pos: 100 }])\n * @param angle - 그라데이션 각도 (lin 일 때만 사용) (기본값: 45)\n * @example shape.setLineGradient(\"lin\", [{ color: \"#FF0000\" }, { color: \"#0000FF\" }], 90);\n */\n setLineGradient(type?: GradientType, stops?: { color: string; pos?: number; alpha?: number }[], angle?: number): Promise<void>;\n /**\n * 선 색상을 제거한다 (noFill).\n */\n removeLineColor(): Promise<void>;\n /**\n * 선 두께를 설정한다.\n *\n * @param lineWidth - 선 두께 (pt 단위)\n */\n setLineWidth(lineWidth: number): Promise<void>;\n /**\n * 선 스타일(대시)을 설정한다.\n *\n * @param lineDash - 선 대시 스타일\n */\n setLineDash(lineDash: LineDash): Promise<void>;\n /**\n * 선 끝 모양(cap)을 설정한다.\n *\n * @param lineCap - 선 끝 모양\n */\n setLineCap(lineCap: LineCap): Promise<void>;\n /**\n * 선 연결 유형(join)을 설정한다.\n *\n * @param lineJoin - 선 연결(모서리) 유형\n */\n setLineJoin(lineJoin: LineJoin): Promise<void>;\n /**\n * getLineStyle() 이 반환한 선 스타일 객체를 그대로 적용한다. (getLineStyle 대칭 — 도형→도형 선 복사)\n *\n * @param style - getLineStyle() 반환값. 생략하면 아무것도 변경하지 않는다\n */\n setLineStyle(style?: LineStyle): Promise<void>;\n /**\n * 외부 그림자를 적용한다. (getEffects().outerShadow 대칭 - 반환 객체를 그대로 넘길 수 있다)\n * 생략한 필드는 기본값으로 채운다 (필드별 기본값은 OuterShadow 참조).\n * 도형이 갖는 그림자는 하나다 - 내부 그림자가 걸려 있으면 외부 그림자로 바뀐다.\n *\n * @param shadow - 그림자 설정\n */\n setOuterShadow(shadow?: OuterShadow): Promise<void>;\n /**\n * 내부 그림자를 적용한다. (getEffects().innerShadow 대칭 - 반환 객체를 그대로 넘길 수 있다)\n * 생략한 필드는 기본값으로 채운다 (필드별 기본값은 InnerShadow 참조).\n * 도형이 갖는 그림자는 하나다 - 외부 그림자가 걸려 있으면 내부 그림자로 바뀐다.\n *\n * @param shadow - 그림자 설정\n */\n setInnerShadow(shadow?: InnerShadow): Promise<void>;\n /**\n * 네온(광선) 효과를 적용한다. (getEffects().glow 대칭 - 반환 객체를 그대로 넘길 수 있다)\n * 생략한 필드는 기본값으로 채운다 (필드별 기본값은 Glow 참조).\n *\n * @param glow - 네온(광선) 설정\n */\n setGlow(glow?: Glow): Promise<void>;\n /**\n * 옅은 테두리(softEdge) 효과를 적용한다. (getEffects().softEdge 대칭 - 반환 객체를 그대로 넘길 수 있다)\n * 생략한 필드는 기본값으로 채운다 (필드별 기본값은 SoftEdge 참조).\n *\n * @param softEdge - 옅은 테두리 설정\n */\n setSoftEdge(softEdge?: SoftEdge): Promise<void>;\n /**\n * 반사 효과를 적용한다. (getEffects().reflection 대칭 - 반환 객체를 그대로 넘길 수 있다)\n * 생략한 필드는 기본값으로 채운다 (필드별 기본값은 Reflection 참조).\n *\n * @param reflection - 반사 설정\n */\n setReflection(reflection?: Reflection): Promise<void>;\n /**\n * 효과를 제거한다. 그 효과가 걸려 있지 않으면 아무 일도 하지 않는다.\n * 도형이 직접 가진 효과만 제거한다 - 도형 스타일(effectRef)에서 상속받은 효과는 제거할 수 없어,\n * getEffects() 가 돌려주는데도 아무 일도 하지 않는 경우가 있다.\n *\n * @param effectType - 제거할 효과 타입\n */\n removeEffect(effectType: EffectType): Promise<void>;\n /**\n * 도형에 3D 효과를 적용한다. scene3d 와 sp3d 중 비어 있는 인자는 적용하지 않는다.\n *\n * @param scene3d - 카메라(회전) 설정. 생략하면 적용하지 않음\n * @param sp3d - 입체(깊이) 설정. 생략하면 적용하지 않음\n */\n set3d(scene3d?: Scene3d, sp3d?: Sp3d): Promise<void>;\n /**\n * 도형의 3D 효과를 제거한다.\n */\n remove3d(): Promise<void>;\n /**\n * getEffects() 가 반환한 효과 객체를 그대로 적용한다. (getEffects 대칭 — 도형→도형 효과 복사)\n * 포함된 효과 키만 대응 setter 로 적용한다. scene3d/sp3d 는 set3d 로 함께 넘긴다.\n * 대상의 기존 효과를 지우지는 않는다 - 완전 복사하려면 removeEffect/remove3d 로 먼저 제거한 뒤 적용한다.\n * outerShadow 와 innerShadow 를 함께 넘기면 거부하지 않고 outerShadow → innerShadow 순서로 적용해 항상 innerShadow 가 남는다.\n *\n * @param effects - getEffects() 반환값. 생략하면 아무것도 변경하지 않는다\n */\n setEffects(effects?: Effects): Promise<void>;\n }\n\n /**\n * 일반 도형과 텍스트 상자를 다루는 핸들로, 텍스트 조회·편집(getText/setText/insertText 등),\n * 글자 서식(setFontStyle/setBold/setFontSize 등), 문단 서식(setAlignH/setLineSpacing/setBulletStyle 등),\n * 텍스트 상자 옵션(setAlignV/setTextboxAutoFit), 도형 모양 조절값(getAdjustValues/setAdjustValue 등)을 제공한다.\n */\n export interface Shape extends BasePathShape {\n /**\n * 선언 전용 명목 브랜드 — 멤버 구성이 같은 핸들 타입이 서로 대입 가능해져 가드\n * 내로잉이 무력화되는 것을 막는다. 런타임에 존재하지 않으며, 키 심볼이 비-export 라\n * 외부 코드에서 접근할 수 없다.\n */\n readonly [__proxyBrand]?: 'Shape';\n // BaseText\n /**\n * 대표 단락(range 가 걸친 첫 단락)의 단락 서식을 반환한다. (setParagraphStyle 대칭)\n * 반환 객체를 그대로 다른 개체의 setParagraphStyle 에 넘길 수 있다. 값이 없는 속성은 키를 담지 않는다.\n * 값은 레이아웃/마스터 상속까지 반영해 실제 적용된 값이라 단락이 직접 지정한 값만 골라낼 수는 없고,\n * 같은 단락에 그대로 다시 넘기면 상속값과 같은 속성은 직접 지정으로 남지 않는다.\n * 목록 수준은 서식 값이 아니라 상속 프리셋이라 담지 않는다. (getLevel 대칭)\n *\n * @param range - 읽을 텍스트 구간 (기본값: 전체 텍스트)\n * @returns 단락 서식. 텍스트/단락 없으면 null\n */\n getParagraphStyle(range?: TextRange): Promise<ParagraphStyle | null>;\n /**\n * 대표 단락의 가로 정렬을 반환한다. (setAlignH 대칭)\n *\n * @param range - 읽을 텍스트 구간 (기본값: 전체 텍스트)\n * @returns 가로 정렬. 텍스트/단락 없으면 null\n */\n getAlignH(range?: TextRange): Promise<TextAlignH | null>;\n /**\n * 대표 단락의 줄 간격 값을 반환한다. (setLineSpacing 대칭)\n *\n * @param range - 읽을 텍스트 구간 (기본값: 전체 텍스트)\n * @returns 줄 간격 값 (MULTIPLE: 배수%, EXACT: pt). 텍스트/단락 없으면 null\n */\n getLineSpacing(range?: TextRange): Promise<number | null>;\n /**\n * 대표 단락의 줄 간격 유형을 반환한다. (setLineSpacing 의 type 대칭)\n *\n * @param range - 읽을 텍스트 구간 (기본값: 전체 텍스트)\n * @returns 줄 간격 유형. 텍스트/단락 없으면 null\n */\n getLineSpacingType(range?: TextRange): Promise<LineSpacingType | null>;\n /**\n * 대표 단락의 단락 앞 간격(UI \"문단 위\")을 반환한다. (setSpaceBefore 대칭)\n *\n * @param range - 읽을 텍스트 구간 (기본값: 전체 텍스트)\n * @returns 단락 앞 간격 (pt). 배수(%) 저장/텍스트 없음이면 null\n */\n getSpaceBefore(range?: TextRange): Promise<number | null>;\n /**\n * 대표 단락의 단락 뒤 간격(UI \"문단 아래\")을 반환한다. (setSpaceAfter 대칭)\n *\n * @param range - 읽을 텍스트 구간 (기본값: 전체 텍스트)\n * @returns 단락 뒤 간격 (pt). 배수(%) 저장/텍스트 없음이면 null\n */\n getSpaceAfter(range?: TextRange): Promise<number | null>;\n /**\n * 대표 단락의 왼쪽 여백(UI \"텍스트 앞\")을 반환한다. (setMarginLeft 대칭)\n *\n * @param range - 읽을 텍스트 구간 (기본값: 전체 텍스트)\n * @returns 왼쪽 여백 (pt). 텍스트/단락 없으면 null\n */\n getMarginLeft(range?: TextRange): Promise<number | null>;\n /**\n * 대표 단락의 첫 줄 들여쓰기(UI \"첫 줄\")를 반환한다. (setFirstLineIndent 대칭)\n *\n * @param range - 읽을 텍스트 구간 (기본값: 전체 텍스트)\n * @returns 첫 줄 들여쓰기 (pt, 음수는 내어쓰기). 텍스트/단락 없으면 null\n */\n getFirstLineIndent(range?: TextRange): Promise<number | null>;\n /**\n * 대표 단락의 목록 수준을 반환한다. (setLevel 대칭)\n *\n * @param range - 읽을 텍스트 구간 (기본값: 전체 텍스트)\n * @returns 목록 수준 (1~9). 텍스트/단락 없으면 null\n */\n getLevel(range?: TextRange): Promise<number | null>;\n /**\n * 대표 단락의 글머리 기호 스타일을 반환한다. 반환 필드를 풀어서 setBulletStyle(type, subType, startAt) 에 넘길 수 있다.\n * 값은 레이아웃/마스터 상속까지 반영해 실제 적용된 값이고, 없는 값(시작 번호)과 되넘길 수 없는 값(프리셋 밖 번호 유형)은 키를 담지 않는다.\n * 그림 글머리·프리셋 밖 문자는 조회 전용이라 그대로는 적용되지 않는다. (제약은 setBulletStyle 참조)\n *\n * @param range - 읽을 텍스트 구간 (기본값: 전체 텍스트)\n * @returns 글머리 기호 스타일. 텍스트/단락 없으면 null\n */\n getBulletStyle(range?: TextRange): Promise<BulletStyle | null>;\n /**\n * 텍스트를 plain text로 반환한다. 문단 사이의 개행은 그대로 들어가지만,\n * 마지막 문단을 끝맺는 개행은 글자가 아니라 담지 않는다 (빈 텍스트는 \"\").\n *\n * @param range - 읽을 텍스트 구간 (UTF-16 코드 단위 offset) (기본값: 전체 텍스트)\n * @returns 해당 구간의 텍스트 (plain text). 텍스트 모델이 없거나 빈 구간이면 \"\"\n */\n getText(range?: TextRange): Promise<string>;\n /**\n * 대표 run(range 가 걸친 첫 run)의 글꼴 스타일을 반환한다. (setFontStyle 대칭)\n * 반환 객체를 그대로 다른 개체의 setFontStyle 에 넘길 수 있다. 값이 없는 속성은 키를 담지 않는다.\n * 값은 레이아웃/마스터/표 스타일 상속까지 반영해 실제 적용된 값이라 run 이 직접 지정한 값만 골라낼 수는 없다.\n *\n * @param range - 읽을 텍스트 구간 (기본값: 전체 텍스트)\n * @returns 글꼴 스타일. run/스타일 없으면 빈 객체 `{}`, 대상 텍스트가 없거나(협업 중 삭제 등) 유효하지 않은 구간이면 null\n */\n getFontStyle(range?: TextRange): Promise<FontStyle | null>;\n /**\n * 대표 run 의 굵게 여부를 반환한다. (setBold 대칭 — 상속까지 반영된 실제 적용값)\n *\n * @param range - 읽을 텍스트 구간 (기본값: 전체 텍스트)\n * @returns 굵게 여부. 대상 텍스트가 없거나 유효하지 않은 구간이면 null\n */\n getBold(range?: TextRange): Promise<boolean | null>;\n /**\n * 대표 run 의 기울임 여부를 반환한다. (setItalic 대칭 — 상속까지 반영된 실제 적용값)\n *\n * @param range - 읽을 텍스트 구간 (기본값: 전체 텍스트)\n * @returns 기울임 여부. 대상 텍스트가 없거나 유효하지 않은 구간이면 null\n */\n getItalic(range?: TextRange): Promise<boolean | null>;\n /**\n * 대표 run 의 밑줄 유형을 반환한다. (setUnderline 대칭 — 상속까지 반영된 실제 적용값)\n *\n * @param range - 읽을 텍스트 구간 (기본값: 전체 텍스트)\n * @returns 밑줄 유형. 대상 텍스트가 없거나 유효하지 않은 구간이면 null\n */\n getUnderline(range?: TextRange): Promise<Underline | null>;\n /**\n * 대표 run 의 취소선 유형을 반환한다. (setStrike 대칭 — 상속까지 반영된 실제 적용값)\n *\n * @param range - 읽을 텍스트 구간 (기본값: 전체 텍스트)\n * @returns 취소선 유형. 대상 텍스트가 없거나 유효하지 않은 구간이면 null\n */\n getStrike(range?: TextRange): Promise<Strike | null>;\n /**\n * 대표 run 의 글자 크기(pt)를 반환한다. (setFontSize 대칭 — 상속까지 반영된 실제 적용값)\n *\n * @param range - 읽을 텍스트 구간 (기본값: 전체 텍스트)\n * @returns 글자 크기 (pt). 대상 텍스트가 없거나 유효하지 않은 구간이면 null\n */\n getFontSize(range?: TextRange): Promise<number | null>;\n /**\n * 대표 run 의 글꼴 이름을 반환한다. (setFontFamily 대칭 — 상속까지 반영된 실제 적용값)\n *\n * @param range - 읽을 텍스트 구간 (기본값: 전체 텍스트)\n * @returns 글꼴 이름. 대상 텍스트가 없거나 유효하지 않은 구간이면 null\n */\n getFontFamily(range?: TextRange): Promise<string | null>;\n /**\n * 대표 run 의 글자 색상을 반환한다. (setTextColor 대칭 — 상속까지 반영된 실제 적용값)\n *\n * @param range - 읽을 텍스트 구간 (기본값: 전체 텍스트)\n * @returns 글자 색상 (hex \"#RRGGBB\" — scheme color 도 hex 로 풀려서 나온다). solid 채우기가 아니거나 대상 텍스트가 없거나 유효하지 않은 구간이면 null\n */\n getTextColor(range?: TextRange): Promise<string | null>;\n /**\n * 텍스트 구간의 하이퍼링크를 반환한다. (setTextHyperlink 대칭 — 반환 객체를 그대로 넘겨 복사할 수 있다)\n * range 를 주면 그 구간의 첫 글자, range 가 없으면 텍스트의 첫 글자가 속한 run 을 기준으로 한다.\n * 도형 자체에 걸린 하이퍼링크는 getHyperlink 로 읽는다.\n *\n * @param range - 조회할 텍스트 구간 (기본값: 텍스트 첫 글자)\n * @returns 하이퍼링크 정보 (getHyperlink 와 같은 Hyperlink 객체). 링크 없음/텍스트 없음/미노출 action 이면 null\n */\n getTextHyperlink(range?: TextRange): Promise<Hyperlink | null>;\n /**\n * 텍스트 상자 자동 맞춤 유형을 반환한다. (setTextboxAutoFit 대칭)\n *\n * @returns 자동 맞춤 유형. 대상 텍스트가 없으면 null\n */\n getTextboxAutoFit(): Promise<AutoFitType | null>;\n /**\n * 텍스트 세로 정렬을 반환한다. (setAlignV 대칭)\n * TextAlignV 는 TOP 이 0 인 숫자 enum 이라, 값이 있는지는 truthy 검사가 아니라 null 비교로 본다.\n *\n * @returns 세로 정렬. 대상 텍스트가 없으면 null\n */\n getAlignV(): Promise<TextAlignV | null>;\n /**\n * 텍스트를 설정한다. 인자 조합에 따라 다음과 같이 동작한다.\n * - range 없음: 전체 텍스트를 text 로 교체\n * - range 있음: 지정한 구간만 text 로 교체\n * - text 가 빈 문자열(\"\")이면 교체 대신 해당 범위를 삭제\n *\n * 삭제 없이 끼워넣는 삽입은 insertText 를 사용한다.\n * (단, from 이 텍스트 끝이면 지울 글자가 없어 끝 삽입으로 동작).\n *\n * 대체된 자리의 글자 서식은 구간 시작 위치의 글자 서식을, 문단 서식은 기존 문단의 서식을 따른다.\n *\n * @param text - 설정할 텍스트. 빈 문자열(\"\")이면 삭제로 동작\n * @param range - 교체할 텍스트 구간 to = from + 글자수 - 1 (0-based) 예: \"가나다\" 전체 = {from: 0, to: 2}, \"가나다\" 중 \"가\" = {from: 0, to: 0} offset 은 UTF-16 코드 단위라 서로게이트 페어를 가르는 range 는 반쪽이 아니라 그 글자 전체가 대상이 된다 (range 를 받는 서식 setter 도 같다) (기본값: 전체 텍스트)\n */\n setText(text: string, range?: TextRange): Promise<void>;\n /**\n * 텍스트를 삽입한다.\n * 삽입한 글자의 서식은 삽입 지점 바로 앞 글자의 런 서식을 따른다.\n *\n * @param text - 삽입할 텍스트\n * @param textOffset - 삽입 위치 offset (기본값: 텍스트 끝)\n */\n insertText(text: string, textOffset?: number): Promise<void>;\n /**\n * 글꼴 스타일을 설정한다. 단일 속성은 setBold/setItalic/setFontSize/setFontFamily/setTextColor 사용 권장.\n *\n * @param style - 글꼴 스타일 설정\n * @param range - 적용할 텍스트 구간 (기본값: 전체 텍스트)\n */\n setFontStyle(style: FontStyle, range?: TextRange): Promise<void>;\n /**\n * 글자를 굵게 설정한다.\n *\n * @param enabled - true: 굵게, false: 해제\n * @param range - 적용할 텍스트 구간 (기본값: 전체 텍스트)\n */\n setBold(enabled: boolean, range?: TextRange): Promise<void>;\n /**\n * 글자 기울임을 설정한다.\n *\n * @param enabled - true: 기울임, false: 해제\n * @param range - 적용할 텍스트 구간 (기본값: 전체 텍스트)\n */\n setItalic(enabled: boolean, range?: TextRange): Promise<void>;\n /**\n * 글자 밑줄을 설정한다.\n *\n * @param underline - 밑줄 유형\n * @param range - 적용할 텍스트 구간 (기본값: 전체 텍스트)\n */\n setUnderline(underline: Underline, range?: TextRange): Promise<void>;\n /**\n * 글자 취소선을 설정한다.\n *\n * @param strike - 취소선 유형\n * @param range - 적용할 텍스트 구간 (기본값: 전체 텍스트)\n */\n setStrike(strike: Strike, range?: TextRange): Promise<void>;\n /**\n * 글자 크기를 설정한다.\n *\n * @param fontSize - pt 단위\n * @param range - 적용할 텍스트 구간 (기본값: 전체 텍스트)\n */\n setFontSize(fontSize: number, range?: TextRange): Promise<void>;\n /**\n * 글꼴을 설정한다.\n *\n * @param fontFamily - 글꼴 이름\n * @param range - 적용할 텍스트 구간 (기본값: 전체 텍스트)\n */\n setFontFamily(fontFamily: string, range?: TextRange): Promise<void>;\n /**\n * 글자 색상을 설정한다.\n *\n * @param color - hex (#RRGGBB) 또는 scheme color\n * @param range - 적용할 텍스트 구간 (기본값: 전체 텍스트)\n */\n setTextColor(color: string, range?: TextRange): Promise<void>;\n /**\n * 텍스트에 하이퍼링크를 설정한다. (getTextHyperlink 대칭 — 반환 객체를 그대로 넘겨 링크를 복사할 수 있다)\n * 도형 전체에 링크를 거는 setHyperlink 와 달리 링크가 글자(run) 단위로 걸리며 하이퍼링크 서식으로 표시된다.\n * 지원하지 않는 종류나 유효하지 않은 대상(삭제된 슬라이드 등)은 무시한다.\n *\n * @param hyperlink - getTextHyperlink() 반환값과 같은 Hyperlink 객체. type 이 없으면 무시한다\n * @param range - 적용할 텍스트 구간 (기본값: 전체 텍스트)\n */\n setTextHyperlink(hyperlink: Hyperlink, range?: TextRange): Promise<void>;\n /**\n * 텍스트의 하이퍼링크를 제거한다. (도형 자체에 걸린 하이퍼링크는 removeHyperlink)\n *\n * @param range - 제거할 텍스트 구간 (기본값: 전체 텍스트)\n */\n removeTextHyperlink(range?: TextRange): Promise<void>;\n /**\n * 지정한 offset 위치에 특수문자(symbol)를 삽입한다.\n *\n * @param textOffset - 삽입 위치 offset\n * @param symbol - 삽입할 특수문자 (개행 불가 — 문단을 나누려면 insertText)\n * @throws {Error} textOffset 이 텍스트 끝 offset 을 넘는 경우 (error.code = \"INVALID_ARGUMENT\")\n */\n insertSymbol(textOffset: number, symbol: string): Promise<void>;\n /**\n * 텍스트 가로 정렬을 설정한다. range 를 주면 그 구간이 걸친 단락에만 적용한다.\n *\n * @param align - 가로 정렬\n * @param range - 적용할 텍스트 구간 (기본값: 전체 텍스트)\n */\n setAlignH(align: TextAlignH, range?: TextRange): Promise<void>;\n /**\n * 단락 서식을 한 번에 설정한다. range 를 주면 그 구간이 걸친 단락에만 적용한다.\n * 값을 준 속성만 바뀐다. null/undefined 는 \"변경 없음\"으로 무시하며, 지정한 값을 상속 상태로 되돌리는 방법은 아직 없다.\n * 단일 속성은 setLineSpacing/setMarginLeft/setFirstLineIndent/setSpaceBefore/setSpaceAfter 사용 권장.\n * 목록 수준은 바꿀 때 딸려오는 부수 효과(글머리 기호·글자 크기)가 있어 여기 담지 않는다. (setLevel 참고)\n *\n * @param style - 단락 서식 설정\n * @param range - 적용할 텍스트 구간 (기본값: 전체 텍스트)\n */\n setParagraphStyle(style: ParagraphStyle, range?: TextRange): Promise<void>;\n /**\n * 줄 간격을 설정한다. range 를 주면 그 구간이 걸친 단락에만 적용한다.\n * lineSpacing 의 단위는 유형에 따라 다르다 - MULTIPLE 이면 배수 백분율(150=1.5배), EXACT 이면 pt 다.\n *\n * @param lineSpacing - 줄 간격 값 (MULTIPLE: 배수%, EXACT: pt)\n * @param type - 줄 간격 유형 (기본값: LineSpacingType.MULTIPLE)\n * @param range - 적용할 텍스트 구간 (기본값: 전체 텍스트)\n */\n setLineSpacing(lineSpacing: number, type?: LineSpacingType, range?: TextRange): Promise<void>;\n /**\n * 단락 앞 간격(UI \"문단 위\")을 설정한다.\n *\n * @param spaceBefore - 단락 앞 간격 (pt)\n * @param range - 적용할 텍스트 구간 (기본값: 전체 텍스트)\n */\n setSpaceBefore(spaceBefore: number, range?: TextRange): Promise<void>;\n /**\n * 단락 뒤 간격(UI \"문단 아래\")을 설정한다.\n *\n * @param spaceAfter - 단락 뒤 간격 (pt)\n * @param range - 적용할 텍스트 구간 (기본값: 전체 텍스트)\n */\n setSpaceAfter(spaceAfter: number, range?: TextRange): Promise<void>;\n /**\n * 단락 전체의 왼쪽 여백(UI \"텍스트 앞\")을 설정한다. 첫 줄만 들여쓰려면 setFirstLineIndent 를 사용한다.\n *\n * @param marginLeft - 왼쪽 여백 (pt)\n * @param range - 적용할 텍스트 구간 (기본값: 전체 텍스트)\n */\n setMarginLeft(marginLeft: number, range?: TextRange): Promise<void>;\n /**\n * 단락 첫 줄의 들여쓰기(UI \"첫 줄\")를 설정한다. 둘째 줄부터는 marginLeft 를 따른다.\n * 양수는 들여쓰기, 음수는 내어쓰기, 0 은 들여쓰기 없음이다.\n * 글머리 기호 목록의 계층 깊이를 바꾸려면 setLevel 을 사용한다.\n *\n * @param firstLineIndent - 첫 줄 들여쓰기 (pt)\n * @param range - 적용할 텍스트 구간 (기본값: 전체 텍스트)\n */\n setFirstLineIndent(firstLineIndent: number, range?: TextRange): Promise<void>;\n /**\n * 목록 수준(개요 계층 깊이)을 설정한다. range 가 걸친 단락을 모두 같은 수준으로 맞춘다.\n * pt 단위 들여쓰기(setFirstLineIndent/setMarginLeft)와 달리 수준은 상속 프리셋 선택이라,\n * 바꾸면 그 수준의 글머리 기호·글자 크기가 따라오고 marginLeft 는 새 수준의 값으로 덮인다.\n * setMarginLeft 로 지정한 값도 버려지므로 둘을 함께 쓸 때는 setLevel 을 먼저 호출한다. (firstLineIndent 는 유지)\n * 대상 텍스트가 허용하는 범위(제목 개체는 1 수준뿐)로 제한한다.\n *\n * @param level - 목록 수준 (1=최상위 ~ 9)\n * @param range - 적용할 텍스트 구간 (기본값: 전체 텍스트)\n */\n setLevel(level: number, range?: TextRange): Promise<void>;\n /**\n * 글머리 기호 스타일을 설정한다. (getBulletStyle 대칭)\n * 그림 글머리(BulletType.BLIP)는 적용을 지원하지 않는 조회 전용 유형이라 거부한다.\n * CharType 프리셋 밖의 문자도 적용할 수 없다 (조회 전용이라 받을 인자가 없다).\n *\n * @param bulletType - 글머리 기호 유형\n * @param subType - BulletType.AUTO_NUM: 번호 매기기 유형 (기본값 NumberedType.NUMBER_WITH_DOT), BulletType.CHAR: 글머리 문자 유형 (기본값 CharType.DOT)\n * @param startAt - 시작 번호 (BulletType.AUTO_NUM 일 때만 사용) (기본값: 1)\n * @param range - 적용할 텍스트 구간 (기본값: 전체 텍스트)\n * @throws {Error} bulletType 이 BulletType.BLIP(미지원 타입)이거나 subType 이 bulletType 의 값 집합 밖인 경우 (error.code = \"INVALID_ARGUMENT\")\n */\n setBulletStyle(bulletType: Exclude<BulletType, \"buBlip\">, subType?: NumberedType | CharType, startAt?: number, range?: TextRange): Promise<void>;\n /**\n * 텍스트 세로 정렬을 설정한다. (getAlignV 대칭)\n *\n * @param align - 세로 정렬\n */\n setAlignV(align: TextAlignV): Promise<void>;\n /**\n * 텍스트 상자 자동 맞춤 유형을 설정한다. 이미 같은 유형이면 아무것도 하지 않는다.\n *\n * @param autoAlignType - 자동 맞춤 유형\n */\n setTextboxAutoFit(autoAlignType: AutoFitType): Promise<void>;\n // own\n /**\n * 일반 도형에 정의된 조절값과 조절 가능한 범위를 반환한다. 반환된 name 은 조절값 조회와 변경 API 에서 사용한다.\n *\n * @returns 조절값 목록. 대상 도형이 없으면(협업 중 삭제 등) null\n */\n getAdjustValues(): Promise<AdjustValue[] | null>;\n /**\n * 3D 회전 시 텍스트를 평면으로 유지하는지 반환한다. (setFlatTx 대칭)\n *\n * @returns 텍스트 평면 유지 여부. 대상 도형이 없으면 null\n */\n isFlatTx(): Promise<boolean | null>;\n /**\n * 3D 회전 시 텍스트를 평면으로 유지할지 설정한다. (isFlatTx 대칭)\n *\n * @param enabled - true 이면 텍스트 평면 유지, false 이면 해제\n */\n setFlatTx(enabled: boolean): Promise<void>;\n /**\n * 일반 도형의 조절값(adjust value) 하나를 변경한다. 여러 조절값을 함께 변경하려면 setAdjustValues 를 사용한다.\n *\n * @param name - 조절값 이름(getAdjustValues 결과)\n * @param value - 조절값. 정수로 반올림되며 허용 범위를 벗어나면 최솟값 또는 최댓값으로 제한됨 (getAdjustValues 의 min/max 가 null 인 경우처럼 범위를 알 수 없으면 제한하지 않는다)\n * @throws {Error} name 이 현재 도형에 없는 조절값인 경우 (error.code = \"INVALID_ARGUMENT\")\n */\n setAdjustValue(name: string, value: number): Promise<void>;\n /**\n * 일반 도형의 여러 조절값(adjust value)을 한 번에 변경한다.\n *\n * @param avList - 변경할 조절값 목록\n * @throws {Error} name 이 현재 도형에 없는 조절값인 경우 (error.code = \"INVALID_ARGUMENT\")\n */\n setAdjustValues(avList: AdjustValueUpdate[]): Promise<void>;\n }\n\n /**\n * 이미지 도형을 다루는 핸들로, 원본 크기 되돌리기(resetSize)와 이미지 자르기 조회·설정(getCrop/setCrop)을\n * 제공하며, 위치·크기·채우기·선·효과는 BasePathShape 공통 API 를 그대로 쓴다.\n */\n export interface Image extends BasePathShape {\n /**\n * 선언 전용 명목 브랜드 — 멤버 구성이 같은 핸들 타입이 서로 대입 가능해져 가드\n * 내로잉이 무력화되는 것을 막는다. 런타임에 존재하지 않으며, 키 심볼이 비-export 라\n * 외부 코드에서 접근할 수 없다.\n */\n readonly [__proxyBrand]?: 'Image';\n /**\n * 이미지에 적용된 자르기(crop) 상태를 반환한다. (setCrop 대칭 - 반환 객체를 그대로 넘길 수 있다)\n * 모든 값의 단위는 퍼센트다 (-100~100). 자르지 않은 방향은 0 이고, 음수는 바깥 여백이다.\n *\n * @returns 자르기 상태. 대상 이미지가 없으면 null\n */\n getCrop(): Promise<ImageCrop | null>;\n /**\n * 이미지를 문서에 실린 원본 크기로 되돌린다. 자르기(crop)가 있으면 함께 제거한다.\n */\n resetSize(): Promise<void>;\n /**\n * 이미지를 지정한 방향으로 자른다. (getCrop 대칭 - 반환 객체를 그대로 넘길 수 있다)\n * 지정한 방향만 적용하고 생략한 방향은 기존 값을 유지한다. 자르기를 없애려면 0 을 명시한다.\n * 모든 값의 단위는 퍼센트다 (-100~100). 양수는 그 방향을 잘라 내고, 음수는 바깥 여백을 만든다.\n * 병합 결과가 지금 값과 같으면 아무것도 하지 않는다.\n *\n * @param crop - 자르기 설정\n * @throws {Error} 병합 결과의 left+right 또는 top+bottom 이 100 이상이라 남는 영역이 없는 경우 (error.code = \"INVALID_ARGUMENT\")\n */\n setCrop(crop: Partial<ImageCrop>): Promise<void>;\n }\n\n /**\n * 연결선을 다루는 핸들로, 시작·끝 화살표 조회·설정(getHeadEnd/getTailEnd/setHeadEnd/setTailEnd)을\n * 제공하고 선 색·두께·점선 등 선 서식은 BasePathShape 공통 API 를 그대로 쓰며, 회전·반전은\n * 지원하지 않아(에디터 UI 도 같은 제약) 물려받은 setRotation/flip 은 액션을 만들지 않고 무시된다.\n */\n export interface Line extends BasePathShape {\n /**\n * 선언 전용 명목 브랜드 — 멤버 구성이 같은 핸들 타입이 서로 대입 가능해져 가드\n * 내로잉이 무력화되는 것을 막는다. 런타임에 존재하지 않으며, 키 심볼이 비-export 라\n * 외부 코드에서 접근할 수 없다.\n */\n readonly [__proxyBrand]?: 'Line';\n /**\n * 연결선의 시작 화살표(headEnd)를 반환한다. (setHeadEnd 대칭 - 반환 객체를 그대로 넘길 수 있다)\n *\n * @returns 시작 화살표 설정. 대상 연결선이 없으면 null. 화살표가 없는 상태는 null 이 아니라 type 이 LineEndType.NONE 인 객체다\n */\n getHeadEnd(): Promise<LineEnd | null>;\n /**\n * 연결선의 끝 화살표(tailEnd)를 반환한다. (setTailEnd 대칭 - 반환 객체를 그대로 넘길 수 있다)\n *\n * @returns 끝 화살표 설정. 대상 연결선이 없으면 null. 화살표가 없는 상태는 null 이 아니라 type 이 LineEndType.NONE 인 객체다\n */\n getTailEnd(): Promise<LineEnd | null>;\n /**\n * 연결선의 시작 화살표(headEnd)를 설정한다. (getHeadEnd 대칭 - 반환 객체를 그대로 넘길 수 있다)\n * 화살표를 없애려면 type 에 LineEndType.NONE 을 준다.\n * width/length 를 생략하면 기존 크기가 아니라 기본값(MEDIUM)이 적용된다.\n *\n * @param lineEnd - 화살표 설정\n */\n setHeadEnd(lineEnd: Partial<LineEnd> & {type: LineEndType}): Promise<void>;\n /**\n * 연결선의 끝 화살표(tailEnd)를 설정한다. (getTailEnd 대칭 - 반환 객체를 그대로 넘길 수 있다)\n * 화살표를 없애려면 type 에 LineEndType.NONE 을 준다.\n * width/length 를 생략하면 기존 크기가 아니라 기본값(MEDIUM)이 적용된다.\n *\n * @param lineEnd - 화살표 설정\n */\n setTailEnd(lineEnd: Partial<LineEnd> & {type: LineEndType}): Promise<void>;\n }\n\n /**\n * 그룹 도형을 다루는 핸들로, 하위 도형 조회(getChildren)와 그룹 해제(ungroup)를 제공하며,\n * 위치·크기·정렬·순서는 BaseShape 공통 API 를 그대로 쓴다.\n */\n export interface Group extends BaseShape {\n /**\n * 선언 전용 명목 브랜드 — 멤버 구성이 같은 핸들 타입이 서로 대입 가능해져 가드\n * 내로잉이 무력화되는 것을 막는다. 런타임에 존재하지 않으며, 키 심볼이 비-export 라\n * 외부 코드에서 접근할 수 없다.\n */\n readonly [__proxyBrand]?: 'Group';\n /**\n * 그룹의 자식 도형 목록을 반환한다.\n *\n * @returns 자식 도형 목록. 그룹 도형이 없으면(협업 중 삭제 등) 빈 배열\n */\n getChildren(): Promise<(Shape | Image | Line | Group | Chart | Table | Diagram | OleObject | Control)[]>;\n /**\n * 그룹을 해제하여 자식 도형을 슬라이드 최상위로 분리한다.\n * 해제 후 이 Group 인스턴스와 미리 얻어 둔 자식 프록시는 무효가 된다 (자식이 새 id 를 받는다).\n *\n * @returns 분리된 자식 도형 배열\n */\n ungroup(): Promise<(Shape | Image | Line | Group | Chart | Table | Diagram | OleObject | Control)[]>;\n }\n\n /**\n * 차트 도형을 다루는 핸들로, 차트 종류·스타일(setType/setStyle), 제목·축 제목(setTitle/setAxisTitle),\n * 범례·데이터 라벨 위치(setLegendPosition/setDataLabelPosition), 눈금선(setGridLine) 편집과\n * 현재 서식 상태 조회(getType/getTitle/getChartInfo 등)를 제공한다.\n */\n export interface Chart extends BaseShape {\n /**\n * 선언 전용 명목 브랜드 — 멤버 구성이 같은 핸들 타입이 서로 대입 가능해져 가드\n * 내로잉이 무력화되는 것을 막는다. 런타임에 존재하지 않으며, 키 심볼이 비-export 라\n * 외부 코드에서 접근할 수 없다.\n */\n readonly [__proxyBrand]?: 'Chart';\n // ChartApiMixin\n /**\n * 차트 종류를 반환한다. ChartType 에 없는 종류는 \"unknown\" 을 반환한다.\n */\n getType(): Promise<string>;\n /**\n * 이 차트를 편집할 수 있는지 반환한다. 외부 데이터를 소스로 하는 차트는 조회만 되고 편집은 되지 않는다.\n */\n isEditable(): Promise<boolean>;\n /**\n * 차트 제목을 반환한다. 제목을 설정하지 않았으면 빈 문자열을 반환한다.\n */\n getTitle(): Promise<string>;\n /**\n * 지정한 축의 제목을 반환한다. 제목을 설정하지 않았으면 빈 문자열이고, 축 제목을 갖지 않는 차트 종류(원형 계열·도넛·방사형)는 null 을 반환한다.\n *\n * @param axis - 제목을 읽을 축(가로축 또는 세로축)\n */\n getAxisTitle(axis: ChartAxis): Promise<string | null>;\n /**\n * 범례 위치를 반환한다. 범례를 숨긴 차트는 \"none\" 이고, 위치를 알아낼 수 없는 차트는 \"right\" 로 보고한다.\n */\n getLegendPosition(): Promise<ChartLegendPosition>;\n /**\n * 데이터레이블 위치를 반환한다. 데이터레이블을 표시하지 않는 차트는 \"none\" 을 반환한다.\n */\n getDataLabelPosition(): Promise<ChartDataLabelPosition>;\n /**\n * 지정한 축의 눈금선 종류를 반환한다. 눈금선을 꺼 둔 축은 \"none\" 이고, 그 축의 눈금선을 갖지 않는 차트 종류(원형 계열·도넛은 양축, 방사형은 세로축)는 null 을 반환한다.\n *\n * @param axis - 눈금선을 읽을 축(가로축 또는 세로축)\n */\n getGridLine(axis: ChartAxis): Promise<ChartGridLineType | null>;\n /**\n * 차트의 서식 상태를 한 번에 반환한다. 각 값은 이름이 같은 조회 메서드와 같은 규약을 따른다. axisTitle 과 gridLine 의 null 은 그 차트 종류에 해당 축의 제목·눈금선이 아예 없다는 뜻이고, \"none\" 은 쓸 수는 있지만 꺼져 있다는 뜻이다.\n */\n getChartInfo(): Promise<{ type: string; title: string; legendPosition: ChartLegendPosition; dataLabelPosition: ChartDataLabelPosition; axisTitle: { horizontal: string | null; vertical: string | null }; gridLine: { horizontal: ChartGridLineType | null; vertical: ChartGridLineType | null } }>;\n /**\n * 차트 종류를 바꾼다. 지금 종류와 같은 값을 넘기면 아무것도 바뀌지 않는다.\n *\n * @param chartType - 바꿀 차트 종류(enum 문자열, 예: \"clustered_column\")\n */\n setType(chartType: ChartType): Promise<void>;\n /**\n * 차트의 프리셋 스타일을 바꾼다. 번호에 대응하는 실제 색은 문서 테마를 따른다.\n *\n * @param style - 스타일 번호(1~12 정수). 세 개씩 색 그룹이 나뉘고(1~3, 4~6, 7~9, 10~12), 한 그룹 안의 세 번호는 배경만 다르다(반투명 배경, 흰색 배경, 색상 배경과 계열 테두리 순)\n */\n setStyle(style: number): Promise<void>;\n /**\n * 차트 제목을 설정한다.\n *\n * @param title - 차트에 표시할 제목\n */\n setTitle(title: string): Promise<void>;\n /**\n * 지정한 축의 제목을 설정한다. 축 제목은 원형 계열·도넛·방사형을 뺀 차트 종류에서 지원한다.\n *\n * @param axis - 제목을 설정할 축(가로축 또는 세로축)\n * @param title - 축에 표시할 제목\n */\n setAxisTitle(axis: ChartAxis, title: string): Promise<void>;\n /**\n * 범례 위치를 설정한다. \"none\" 을 넘기면 범례를 숨긴다.\n *\n * @param position - 범례를 놓을 자리\n */\n setLegendPosition(position: ChartLegendPosition): Promise<void>;\n /**\n * 데이터레이블 위치를 설정한다. \"none\" 을 넘기면 데이터레이블을 숨긴다.\n * 쓸 수 있는 위치는 차트 종류마다 다르며, \"none\" 은 모든 종류에서 쓸 수 있다.\n *\n * @param position - 데이터레이블을 놓을 자리\n */\n setDataLabelPosition(position: ChartDataLabelPosition): Promise<void>;\n /**\n * 지정한 축의 눈금선을 설정한다. \"none\" 을 넘기면 그 축의 눈금선을 숨긴다.\n * 그 축의 눈금선을 갖지 않는 차트 종류(원형 계열·도넛은 양축, 방사형은 세로축)는 \"none\" 을 포함해 어떤 값을 넘겨도 오류가 발생한다.\n *\n * @param axis - 눈금선을 설정할 축(가로축 또는 세로축)\n * @param gridType - 표시할 눈금선 종류\n */\n setGridLine(axis: ChartAxis, gridType: ChartGridLineType): Promise<void>;\n }\n\n /**\n * 표 도형을 다루는 핸들로, 셀·행·열 조회와 검색(getCell/getCells/findCells 등),\n * 행·열 삽입·삭제(insertRow/deleteRow/insertCol 등), 셀 병합·해제(mergeCell/unmergeCell),\n * 표 스타일(setStyle/setStyleOption), 행 높이·열 너비 조정(setRowHeight/setColWidth)을 제공한다.\n */\n export interface Table extends BaseShape {\n /**\n * 선언 전용 명목 브랜드 — 멤버 구성이 같은 핸들 타입이 서로 대입 가능해져 가드\n * 내로잉이 무력화되는 것을 막는다. 런타임에 존재하지 않으며, 키 심볼이 비-export 라\n * 외부 코드에서 접근할 수 없다.\n */\n readonly [__proxyBrand]?: 'Table';\n /**\n * 표의 행 개수를 반환한다.\n *\n * @returns 행 개수. 표가 없으면 0\n */\n getRowCount(): Promise<number>;\n /**\n * 표의 열 개수를 반환한다.\n *\n * @returns 열 개수. 표가 없으면 0\n */\n getColCount(): Promise<number>;\n /**\n * 지정 좌표의 셀을 반환한다. 병합 영역 내부 좌표를 지정하면 그 병합 영역의 대표 셀을 반환한다.\n *\n * @param row - 행 인덱스 (0-based)\n * @param col - 열 인덱스 (0-based)\n * @returns 해당 셀 (범위를 벗어나거나 표가 없으면 null)\n */\n getCell(row: number, col: number): Promise<TableCell | null>;\n /**\n * 모든 셀을 배열로 반환한다.\n * 병합된 셀은 대표 셀 하나만 포함한다.\n *\n * @returns 셀 목록\n */\n getCells(): Promise<TableCell[]>;\n /**\n * 조건에 맞는 셀 배열을 반환한다.\n * 복수 조건은 AND 로 결합한다. range 는 셀 본체가 범위와 겹치면 매칭된다\n * (병합 대표 셀이 범위 밖에 있어도 셀 일부가 범위 안이면 결과에 포함된다).\n * 그 외 조건은 병합된 셀의 대표 셀 좌표/속성 기준으로 평가한다.\n *\n * @param filter - 검색 조건. null 도 조건 없음으로 본다 (기본값: 전체 셀)\n * @returns 조건에 맞는 셀 목록\n * @throws {Error} range 가 표 범위를 벗어난 경우 (error.code = \"INVALID_ARGUMENT\")\n */\n findCells(filter?: CellFilter): Promise<TableCell[]>;\n /**\n * 지정 열의 너비를 반환한다. (setColWidth 대칭)\n *\n * @param colIndex - 열 인덱스 (0-based)\n * @returns 너비 (px 단위), 범위 밖이거나 표가 없으면 null\n */\n getColWidth(colIndex: number): Promise<number | null>;\n /**\n * 지정 행의 높이를 반환한다. (setRowHeight 대칭)\n *\n * @param rowIndex - 행 인덱스 (0-based)\n * @returns 높이 (px 단위), 범위 밖이거나 표가 없으면 null\n */\n getRowHeight(rowIndex: number): Promise<number | null>;\n /**\n * 지정 행의 셀 배열을 반환한다.\n * 병합된 셀은 대표 셀 하나만 포함한다.\n *\n * @param rowIndex - 0-based 행 인덱스\n * @returns 해당 행의 셀 목록\n */\n getRow(rowIndex: number): Promise<TableCell[]>;\n /**\n * 지정 열의 셀 배열을 반환한다.\n * 병합된 셀은 대표 셀 하나만 포함한다.\n *\n * @param colIndex - 0-based 열 인덱스\n * @returns 해당 열의 셀 목록\n */\n getColumn(colIndex: number): Promise<TableCell[]>;\n /**\n * 표에 적용된 스타일 이름을 반환한다. (setStyle 대칭)\n * 반환한 이름은 그대로 setStyle 에 되먹일 수 있다. 다만 문서에만 실려 있고 편집기 갤러리에는\n * 없는 스타일이면 doc.getTableStyleNames() 목록에는 나오지 않는다.\n *\n * @returns 표 스타일 이름. 스타일이 없거나 이름이 없는 스타일(문서가 이름을 싣지 않은 경우)이면 null\n */\n getStyleName(): Promise<string | null>;\n /**\n * 표 스타일 옵션(머리글 행, 줄무늬 행 등)의 활성화 여부를 반환한다. (setStyleOption 대칭)\n *\n * @param option - 옵션 유형 (apiConstants.TableStyleOption)\n * @returns 활성화 여부. 표나 표 속성을 읽을 수 없으면 null\n */\n getStyleOption(option: TableStyleOption): Promise<boolean | null>;\n /**\n * 표 스타일을 변경한다. (getStyleName 대칭)\n *\n * @param styleName - 표 스타일 이름 (doc.getTableStyleNames() 결과)\n * @throws {Error} 목록에 없는 이름인 경우 (error.code = \"SCHEME_NOT_FOUND\")\n */\n setStyle(styleName: string): Promise<void>;\n /**\n * 표 스타일 옵션(머리글 행, 줄무늬 행 등)을 변경한다. (getStyleOption 대칭)\n *\n * @param option - 옵션 유형 (apiConstants.TableStyleOption)\n * @param enabled - 활성화 여부\n */\n setStyleOption(option: TableStyleOption, enabled: boolean): Promise<void>;\n /**\n * 지정 범위의 셀을 병합한다.\n *\n * @param startRow - 병합 시작 행 인덱스 (0-based)\n * @param startCol - 병합 시작 열 인덱스 (0-based)\n * @param endRow - 병합 끝 행 인덱스 (0-based, inclusive)\n * @param endCol - 병합 끝 열 인덱스 (0-based, inclusive)\n */\n mergeCell(startRow: number, startCol: number, endRow: number, endCol: number): Promise<void>;\n /**\n * 지정 범위의 병합된 셀을 해제한다.\n *\n * @param startRow - 해제 시작 행 인덱스 (0-based)\n * @param startCol - 해제 시작 열 인덱스 (0-based)\n * @param endRow - 해제 끝 행 인덱스 (0-based, inclusive)\n * @param endCol - 해제 끝 열 인덱스 (0-based, inclusive)\n */\n unmergeCell(startRow: number, startCol: number, endRow: number, endCol: number): Promise<void>;\n /**\n * 기준 행의 위 또는 아래에 행을 삽입한다.\n * 새 행은 기준 행의 서식을 상속한다.\n *\n * @param baseRowIndex - 삽입 기준 행 인덱스 (0-based)\n * @param position - InsertPosition.ABOVE | InsertPosition.BELOW\n * @param insertNum - 삽입할 행 개수\n */\n insertRow(baseRowIndex: number, position: InsertPosition, insertNum: number): Promise<void>;\n /**\n * 지정 범위의 행을 삭제한다. 모든 행을 지울 수는 없다 - 한 행짜리 표에서 그 행을 지우려 하면 오류가 난다.\n * 표 자체를 없애려면 Slide.deleteShape 를 쓴다.\n *\n * @param startRow - 삭제 시작 행 인덱스 (0-based)\n * @param endRow - 삭제 끝 행 인덱스 (0-based, inclusive)\n * @throws {Error} 삭제 후 남는 행이 없는 경우 (error.code = \"INVALID_ARGUMENT\")\n */\n deleteRow(startRow: number, endRow: number): Promise<void>;\n /**\n * 기준 열의 왼쪽 또는 오른쪽에 열을 삽입한다.\n * 새 열은 기준 열의 서식을 상속한다.\n *\n * @param baseColIndex - 삽입 기준 열 인덱스 (0-based)\n * @param position - InsertPosition.LEFT | InsertPosition.RIGHT\n * @param insertNum - 삽입할 열 개수\n */\n insertCol(baseColIndex: number, position: InsertPosition, insertNum: number): Promise<void>;\n /**\n * 지정 범위의 열을 삭제한다. 모든 열을 지울 수는 없다 - 한 열짜리 표에서 그 열을 지우려 하면 오류가 난다.\n * 표 자체를 없애려면 Slide.deleteShape 를 쓴다.\n *\n * @param startCol - 삭제 시작 열 인덱스 (0-based)\n * @param endCol - 삭제 끝 열 인덱스 (0-based, inclusive)\n * @throws {Error} 삭제 후 남는 열이 없는 경우 (error.code = \"INVALID_ARGUMENT\")\n */\n deleteCol(startCol: number, endCol: number): Promise<void>;\n /**\n * 지정 행의 높이를 변경한다.\n *\n * @param rowIndex - 행 인덱스 (0-based)\n * @param newHeight - 새 높이 (px 단위). rowIndex 가 표의 행 수를 벗어나면 무시된다\n */\n setRowHeight(rowIndex: number, newHeight: number): Promise<void>;\n /**\n * 지정 열의 너비를 변경한다.\n *\n * @param colIndex - 열 인덱스 (0-based)\n * @param newWidth - 새 너비 (px 단위). colIndex 가 표의 열 수를 벗어나면 무시된다\n */\n setColWidth(colIndex: number, newWidth: number): Promise<void>;\n }\n\n /**\n * 표 셀 하나를 다루는 핸들로, 셀 텍스트 조회·편집과 글자·문단 서식(getText/setText/setFontStyle 등),\n * 셀 배경 채우기(setSolidFill/setFill), 테두리(getBorderStyle/setBorderStyle),\n * 행·열 위치 조회(getRowIndex/getColIndex)를 제공한다.\n */\n export interface TableCell {\n /**\n * 이 핸들이 `Shape` 인지 판별한다 (union 좁히기용 type guard).\n * SDK 핸들의 내부 판별값을 동기 검사한다 — postMessage 왕복 없음, await 불필요.\n */\n isShape(): this is Shape;\n // BaseText\n /**\n * 대표 단락(range 가 걸친 첫 단락)의 단락 서식을 반환한다. (setParagraphStyle 대칭)\n * 반환 객체를 그대로 다른 개체의 setParagraphStyle 에 넘길 수 있다. 값이 없는 속성은 키를 담지 않는다.\n * 값은 레이아웃/마스터 상속까지 반영해 실제 적용된 값이라 단락이 직접 지정한 값만 골라낼 수는 없고,\n * 같은 단락에 그대로 다시 넘기면 상속값과 같은 속성은 직접 지정으로 남지 않는다.\n * 목록 수준은 서식 값이 아니라 상속 프리셋이라 담지 않는다. (getLevel 대칭)\n *\n * @param range - 읽을 텍스트 구간 (기본값: 전체 텍스트)\n * @returns 단락 서식. 텍스트/단락 없으면 null\n */\n getParagraphStyle(range?: TextRange): Promise<ParagraphStyle | null>;\n /**\n * 대표 단락의 가로 정렬을 반환한다. (setAlignH 대칭)\n *\n * @param range - 읽을 텍스트 구간 (기본값: 전체 텍스트)\n * @returns 가로 정렬. 텍스트/단락 없으면 null\n */\n getAlignH(range?: TextRange): Promise<TextAlignH | null>;\n /**\n * 대표 단락의 줄 간격 값을 반환한다. (setLineSpacing 대칭)\n *\n * @param range - 읽을 텍스트 구간 (기본값: 전체 텍스트)\n * @returns 줄 간격 값 (MULTIPLE: 배수%, EXACT: pt). 텍스트/단락 없으면 null\n */\n getLineSpacing(range?: TextRange): Promise<number | null>;\n /**\n * 대표 단락의 줄 간격 유형을 반환한다. (setLineSpacing 의 type 대칭)\n *\n * @param range - 읽을 텍스트 구간 (기본값: 전체 텍스트)\n * @returns 줄 간격 유형. 텍스트/단락 없으면 null\n */\n getLineSpacingType(range?: TextRange): Promise<LineSpacingType | null>;\n /**\n * 대표 단락의 단락 앞 간격(UI \"문단 위\")을 반환한다. (setSpaceBefore 대칭)\n *\n * @param range - 읽을 텍스트 구간 (기본값: 전체 텍스트)\n * @returns 단락 앞 간격 (pt). 배수(%) 저장/텍스트 없음이면 null\n */\n getSpaceBefore(range?: TextRange): Promise<number | null>;\n /**\n * 대표 단락의 단락 뒤 간격(UI \"문단 아래\")을 반환한다. (setSpaceAfter 대칭)\n *\n * @param range - 읽을 텍스트 구간 (기본값: 전체 텍스트)\n * @returns 단락 뒤 간격 (pt). 배수(%) 저장/텍스트 없음이면 null\n */\n getSpaceAfter(range?: TextRange): Promise<number | null>;\n /**\n * 대표 단락의 왼쪽 여백(UI \"텍스트 앞\")을 반환한다. (setMarginLeft 대칭)\n *\n * @param range - 읽을 텍스트 구간 (기본값: 전체 텍스트)\n * @returns 왼쪽 여백 (pt). 텍스트/단락 없으면 null\n */\n getMarginLeft(range?: TextRange): Promise<number | null>;\n /**\n * 대표 단락의 첫 줄 들여쓰기(UI \"첫 줄\")를 반환한다. (setFirstLineIndent 대칭)\n *\n * @param range - 읽을 텍스트 구간 (기본값: 전체 텍스트)\n * @returns 첫 줄 들여쓰기 (pt, 음수는 내어쓰기). 텍스트/단락 없으면 null\n */\n getFirstLineIndent(range?: TextRange): Promise<number | null>;\n /**\n * 대표 단락의 목록 수준을 반환한다. (setLevel 대칭)\n *\n * @param range - 읽을 텍스트 구간 (기본값: 전체 텍스트)\n * @returns 목록 수준 (1~9). 텍스트/단락 없으면 null\n */\n getLevel(range?: TextRange): Promise<number | null>;\n /**\n * 대표 단락의 글머리 기호 스타일을 반환한다. 반환 필드를 풀어서 setBulletStyle(type, subType, startAt) 에 넘길 수 있다.\n * 값은 레이아웃/마스터 상속까지 반영해 실제 적용된 값이고, 없는 값(시작 번호)과 되넘길 수 없는 값(프리셋 밖 번호 유형)은 키를 담지 않는다.\n * 그림 글머리·프리셋 밖 문자는 조회 전용이라 그대로는 적용되지 않는다. (제약은 setBulletStyle 참조)\n *\n * @param range - 읽을 텍스트 구간 (기본값: 전체 텍스트)\n * @returns 글머리 기호 스타일. 텍스트/단락 없으면 null\n */\n getBulletStyle(range?: TextRange): Promise<BulletStyle | null>;\n /**\n * 텍스트를 plain text로 반환한다. 문단 사이의 개행은 그대로 들어가지만,\n * 마지막 문단을 끝맺는 개행은 글자가 아니라 담지 않는다 (빈 텍스트는 \"\").\n *\n * @param range - 읽을 텍스트 구간 (UTF-16 코드 단위 offset) (기본값: 전체 텍스트)\n * @returns 해당 구간의 텍스트 (plain text). 텍스트 모델이 없거나 빈 구간이면 \"\"\n */\n getText(range?: TextRange): Promise<string>;\n /**\n * 대표 run(range 가 걸친 첫 run)의 글꼴 스타일을 반환한다. (setFontStyle 대칭)\n * 반환 객체를 그대로 다른 개체의 setFontStyle 에 넘길 수 있다. 값이 없는 속성은 키를 담지 않는다.\n * 값은 레이아웃/마스터/표 스타일 상속까지 반영해 실제 적용된 값이라 run 이 직접 지정한 값만 골라낼 수는 없다.\n *\n * @param range - 읽을 텍스트 구간 (기본값: 전체 텍스트)\n * @returns 글꼴 스타일. run/스타일 없으면 빈 객체 `{}`, 대상 텍스트가 없거나(협업 중 삭제 등) 유효하지 않은 구간이면 null\n */\n getFontStyle(range?: TextRange): Promise<FontStyle | null>;\n /**\n * 대표 run 의 굵게 여부를 반환한다. (setBold 대칭 — 상속까지 반영된 실제 적용값)\n *\n * @param range - 읽을 텍스트 구간 (기본값: 전체 텍스트)\n * @returns 굵게 여부. 대상 텍스트가 없거나 유효하지 않은 구간이면 null\n */\n getBold(range?: TextRange): Promise<boolean | null>;\n /**\n * 대표 run 의 기울임 여부를 반환한다. (setItalic 대칭 — 상속까지 반영된 실제 적용값)\n *\n * @param range - 읽을 텍스트 구간 (기본값: 전체 텍스트)\n * @returns 기울임 여부. 대상 텍스트가 없거나 유효하지 않은 구간이면 null\n */\n getItalic(range?: TextRange): Promise<boolean | null>;\n /**\n * 대표 run 의 밑줄 유형을 반환한다. (setUnderline 대칭 — 상속까지 반영된 실제 적용값)\n *\n * @param range - 읽을 텍스트 구간 (기본값: 전체 텍스트)\n * @returns 밑줄 유형. 대상 텍스트가 없거나 유효하지 않은 구간이면 null\n */\n getUnderline(range?: TextRange): Promise<Underline | null>;\n /**\n * 대표 run 의 취소선 유형을 반환한다. (setStrike 대칭 — 상속까지 반영된 실제 적용값)\n *\n * @param range - 읽을 텍스트 구간 (기본값: 전체 텍스트)\n * @returns 취소선 유형. 대상 텍스트가 없거나 유효하지 않은 구간이면 null\n */\n getStrike(range?: TextRange): Promise<Strike | null>;\n /**\n * 대표 run 의 글자 크기(pt)를 반환한다. (setFontSize 대칭 — 상속까지 반영된 실제 적용값)\n *\n * @param range - 읽을 텍스트 구간 (기본값: 전체 텍스트)\n * @returns 글자 크기 (pt). 대상 텍스트가 없거나 유효하지 않은 구간이면 null\n */\n getFontSize(range?: TextRange): Promise<number | null>;\n /**\n * 대표 run 의 글꼴 이름을 반환한다. (setFontFamily 대칭 — 상속까지 반영된 실제 적용값)\n *\n * @param range - 읽을 텍스트 구간 (기본값: 전체 텍스트)\n * @returns 글꼴 이름. 대상 텍스트가 없거나 유효하지 않은 구간이면 null\n */\n getFontFamily(range?: TextRange): Promise<string | null>;\n /**\n * 대표 run 의 글자 색상을 반환한다. (setTextColor 대칭 — 상속까지 반영된 실제 적용값)\n *\n * @param range - 읽을 텍스트 구간 (기본값: 전체 텍스트)\n * @returns 글자 색상 (hex \"#RRGGBB\" — scheme color 도 hex 로 풀려서 나온다). solid 채우기가 아니거나 대상 텍스트가 없거나 유효하지 않은 구간이면 null\n */\n getTextColor(range?: TextRange): Promise<string | null>;\n /**\n * 텍스트 구간의 하이퍼링크를 반환한다. (setTextHyperlink 대칭 — 반환 객체를 그대로 넘겨 복사할 수 있다)\n * range 를 주면 그 구간의 첫 글자, range 가 없으면 텍스트의 첫 글자가 속한 run 을 기준으로 한다.\n * 도형 자체에 걸린 하이퍼링크는 getHyperlink 로 읽는다.\n *\n * @param range - 조회할 텍스트 구간 (기본값: 텍스트 첫 글자)\n * @returns 하이퍼링크 정보 (getHyperlink 와 같은 Hyperlink 객체). 링크 없음/텍스트 없음/미노출 action 이면 null\n */\n getTextHyperlink(range?: TextRange): Promise<Hyperlink | null>;\n /**\n * 텍스트 상자 자동 맞춤 유형을 반환한다. (setTextboxAutoFit 대칭)\n *\n * @returns 자동 맞춤 유형. 대상 텍스트가 없으면 null\n */\n getTextboxAutoFit(): Promise<AutoFitType | null>;\n /**\n * 텍스트 세로 정렬을 반환한다. (setAlignV 대칭)\n * TextAlignV 는 TOP 이 0 인 숫자 enum 이라, 값이 있는지는 truthy 검사가 아니라 null 비교로 본다.\n *\n * @returns 세로 정렬. 대상 텍스트가 없으면 null\n */\n getAlignV(): Promise<TextAlignV | null>;\n /**\n * 텍스트를 설정한다. 인자 조합에 따라 다음과 같이 동작한다.\n * - range 없음: 전체 텍스트를 text 로 교체\n * - range 있음: 지정한 구간만 text 로 교체\n * - text 가 빈 문자열(\"\")이면 교체 대신 해당 범위를 삭제\n *\n * 삭제 없이 끼워넣는 삽입은 insertText 를 사용한다.\n * (단, from 이 텍스트 끝이면 지울 글자가 없어 끝 삽입으로 동작).\n *\n * 대체된 자리의 글자 서식은 구간 시작 위치의 글자 서식을, 문단 서식은 기존 문단의 서식을 따른다.\n *\n * @param text - 설정할 텍스트. 빈 문자열(\"\")이면 삭제로 동작\n * @param range - 교체할 텍스트 구간 to = from + 글자수 - 1 (0-based) 예: \"가나다\" 전체 = {from: 0, to: 2}, \"가나다\" 중 \"가\" = {from: 0, to: 0} offset 은 UTF-16 코드 단위라 서로게이트 페어를 가르는 range 는 반쪽이 아니라 그 글자 전체가 대상이 된다 (range 를 받는 서식 setter 도 같다) (기본값: 전체 텍스트)\n */\n setText(text: string, range?: TextRange): Promise<void>;\n /**\n * 텍스트를 삽입한다.\n * 삽입한 글자의 서식은 삽입 지점 바로 앞 글자의 런 서식을 따른다.\n *\n * @param text - 삽입할 텍스트\n * @param textOffset - 삽입 위치 offset (기본값: 텍스트 끝)\n */\n insertText(text: string, textOffset?: number): Promise<void>;\n /**\n * 글꼴 스타일을 설정한다. 단일 속성은 setBold/setItalic/setFontSize/setFontFamily/setTextColor 사용 권장.\n *\n * @param style - 글꼴 스타일 설정\n * @param range - 적용할 텍스트 구간 (기본값: 전체 텍스트)\n */\n setFontStyle(style: FontStyle, range?: TextRange): Promise<void>;\n /**\n * 글자를 굵게 설정한다.\n *\n * @param enabled - true: 굵게, false: 해제\n * @param range - 적용할 텍스트 구간 (기본값: 전체 텍스트)\n */\n setBold(enabled: boolean, range?: TextRange): Promise<void>;\n /**\n * 글자 기울임을 설정한다.\n *\n * @param enabled - true: 기울임, false: 해제\n * @param range - 적용할 텍스트 구간 (기본값: 전체 텍스트)\n */\n setItalic(enabled: boolean, range?: TextRange): Promise<void>;\n /**\n * 글자 밑줄을 설정한다.\n *\n * @param underline - 밑줄 유형\n * @param range - 적용할 텍스트 구간 (기본값: 전체 텍스트)\n */\n setUnderline(underline: Underline, range?: TextRange): Promise<void>;\n /**\n * 글자 취소선을 설정한다.\n *\n * @param strike - 취소선 유형\n * @param range - 적용할 텍스트 구간 (기본값: 전체 텍스트)\n */\n setStrike(strike: Strike, range?: TextRange): Promise<void>;\n /**\n * 글자 크기를 설정한다.\n *\n * @param fontSize - pt 단위\n * @param range - 적용할 텍스트 구간 (기본값: 전체 텍스트)\n */\n setFontSize(fontSize: number, range?: TextRange): Promise<void>;\n /**\n * 글꼴을 설정한다.\n *\n * @param fontFamily - 글꼴 이름\n * @param range - 적용할 텍스트 구간 (기본값: 전체 텍스트)\n */\n setFontFamily(fontFamily: string, range?: TextRange): Promise<void>;\n /**\n * 글자 색상을 설정한다.\n *\n * @param color - hex (#RRGGBB) 또는 scheme color\n * @param range - 적용할 텍스트 구간 (기본값: 전체 텍스트)\n */\n setTextColor(color: string, range?: TextRange): Promise<void>;\n /**\n * 텍스트에 하이퍼링크를 설정한다. (getTextHyperlink 대칭 — 반환 객체를 그대로 넘겨 링크를 복사할 수 있다)\n * 도형 전체에 링크를 거는 setHyperlink 와 달리 링크가 글자(run) 단위로 걸리며 하이퍼링크 서식으로 표시된다.\n * 지원하지 않는 종류나 유효하지 않은 대상(삭제된 슬라이드 등)은 무시한다.\n *\n * @param hyperlink - getTextHyperlink() 반환값과 같은 Hyperlink 객체. type 이 없으면 무시한다\n * @param range - 적용할 텍스트 구간 (기본값: 전체 텍스트)\n */\n setTextHyperlink(hyperlink: Hyperlink, range?: TextRange): Promise<void>;\n /**\n * 텍스트의 하이퍼링크를 제거한다. (도형 자체에 걸린 하이퍼링크는 removeHyperlink)\n *\n * @param range - 제거할 텍스트 구간 (기본값: 전체 텍스트)\n */\n removeTextHyperlink(range?: TextRange): Promise<void>;\n /**\n * 지정한 offset 위치에 특수문자(symbol)를 삽입한다.\n *\n * @param textOffset - 삽입 위치 offset\n * @param symbol - 삽입할 특수문자 (개행 불가 — 문단을 나누려면 insertText)\n * @throws {Error} textOffset 이 텍스트 끝 offset 을 넘는 경우 (error.code = \"INVALID_ARGUMENT\")\n */\n insertSymbol(textOffset: number, symbol: string): Promise<void>;\n /**\n * 텍스트 가로 정렬을 설정한다. range 를 주면 그 구간이 걸친 단락에만 적용한다.\n *\n * @param align - 가로 정렬\n * @param range - 적용할 텍스트 구간 (기본값: 전체 텍스트)\n */\n setAlignH(align: TextAlignH, range?: TextRange): Promise<void>;\n /**\n * 단락 서식을 한 번에 설정한다. range 를 주면 그 구간이 걸친 단락에만 적용한다.\n * 값을 준 속성만 바뀐다. null/undefined 는 \"변경 없음\"으로 무시하며, 지정한 값을 상속 상태로 되돌리는 방법은 아직 없다.\n * 단일 속성은 setLineSpacing/setMarginLeft/setFirstLineIndent/setSpaceBefore/setSpaceAfter 사용 권장.\n * 목록 수준은 바꿀 때 딸려오는 부수 효과(글머리 기호·글자 크기)가 있어 여기 담지 않는다. (setLevel 참고)\n *\n * @param style - 단락 서식 설정\n * @param range - 적용할 텍스트 구간 (기본값: 전체 텍스트)\n */\n setParagraphStyle(style: ParagraphStyle, range?: TextRange): Promise<void>;\n /**\n * 줄 간격을 설정한다. range 를 주면 그 구간이 걸친 단락에만 적용한다.\n * lineSpacing 의 단위는 유형에 따라 다르다 - MULTIPLE 이면 배수 백분율(150=1.5배), EXACT 이면 pt 다.\n *\n * @param lineSpacing - 줄 간격 값 (MULTIPLE: 배수%, EXACT: pt)\n * @param type - 줄 간격 유형 (기본값: LineSpacingType.MULTIPLE)\n * @param range - 적용할 텍스트 구간 (기본값: 전체 텍스트)\n */\n setLineSpacing(lineSpacing: number, type?: LineSpacingType, range?: TextRange): Promise<void>;\n /**\n * 단락 앞 간격(UI \"문단 위\")을 설정한다.\n *\n * @param spaceBefore - 단락 앞 간격 (pt)\n * @param range - 적용할 텍스트 구간 (기본값: 전체 텍스트)\n */\n setSpaceBefore(spaceBefore: number, range?: TextRange): Promise<void>;\n /**\n * 단락 뒤 간격(UI \"문단 아래\")을 설정한다.\n *\n * @param spaceAfter - 단락 뒤 간격 (pt)\n * @param range - 적용할 텍스트 구간 (기본값: 전체 텍스트)\n */\n setSpaceAfter(spaceAfter: number, range?: TextRange): Promise<void>;\n /**\n * 단락 전체의 왼쪽 여백(UI \"텍스트 앞\")을 설정한다. 첫 줄만 들여쓰려면 setFirstLineIndent 를 사용한다.\n *\n * @param marginLeft - 왼쪽 여백 (pt)\n * @param range - 적용할 텍스트 구간 (기본값: 전체 텍스트)\n */\n setMarginLeft(marginLeft: number, range?: TextRange): Promise<void>;\n /**\n * 단락 첫 줄의 들여쓰기(UI \"첫 줄\")를 설정한다. 둘째 줄부터는 marginLeft 를 따른다.\n * 양수는 들여쓰기, 음수는 내어쓰기, 0 은 들여쓰기 없음이다.\n * 글머리 기호 목록의 계층 깊이를 바꾸려면 setLevel 을 사용한다.\n *\n * @param firstLineIndent - 첫 줄 들여쓰기 (pt)\n * @param range - 적용할 텍스트 구간 (기본값: 전체 텍스트)\n */\n setFirstLineIndent(firstLineIndent: number, range?: TextRange): Promise<void>;\n /**\n * 목록 수준(개요 계층 깊이)을 설정한다. range 가 걸친 단락을 모두 같은 수준으로 맞춘다.\n * pt 단위 들여쓰기(setFirstLineIndent/setMarginLeft)와 달리 수준은 상속 프리셋 선택이라,\n * 바꾸면 그 수준의 글머리 기호·글자 크기가 따라오고 marginLeft 는 새 수준의 값으로 덮인다.\n * setMarginLeft 로 지정한 값도 버려지므로 둘을 함께 쓸 때는 setLevel 을 먼저 호출한다. (firstLineIndent 는 유지)\n * 대상 텍스트가 허용하는 범위(제목 개체는 1 수준뿐)로 제한한다.\n *\n * @param level - 목록 수준 (1=최상위 ~ 9)\n * @param range - 적용할 텍스트 구간 (기본값: 전체 텍스트)\n */\n setLevel(level: number, range?: TextRange): Promise<void>;\n /**\n * 글머리 기호 스타일을 설정한다. (getBulletStyle 대칭)\n * 그림 글머리(BulletType.BLIP)는 적용을 지원하지 않는 조회 전용 유형이라 거부한다.\n * CharType 프리셋 밖의 문자도 적용할 수 없다 (조회 전용이라 받을 인자가 없다).\n *\n * @param bulletType - 글머리 기호 유형\n * @param subType - BulletType.AUTO_NUM: 번호 매기기 유형 (기본값 NumberedType.NUMBER_WITH_DOT), BulletType.CHAR: 글머리 문자 유형 (기본값 CharType.DOT)\n * @param startAt - 시작 번호 (BulletType.AUTO_NUM 일 때만 사용) (기본값: 1)\n * @param range - 적용할 텍스트 구간 (기본값: 전체 텍스트)\n * @throws {Error} bulletType 이 BulletType.BLIP(미지원 타입)이거나 subType 이 bulletType 의 값 집합 밖인 경우 (error.code = \"INVALID_ARGUMENT\")\n */\n setBulletStyle(bulletType: Exclude<BulletType, \"buBlip\">, subType?: NumberedType | CharType, startAt?: number, range?: TextRange): Promise<void>;\n /**\n * 텍스트 세로 정렬을 설정한다. (getAlignV 대칭)\n *\n * @param align - 세로 정렬\n */\n setAlignV(align: TextAlignV): Promise<void>;\n /**\n * 텍스트 상자 자동 맞춤 유형을 설정한다. 이미 같은 유형이면 아무것도 하지 않는다.\n *\n * @param autoAlignType - 자동 맞춤 유형\n */\n setTextboxAutoFit(autoAlignType: AutoFitType): Promise<void>;\n // own\n /**\n * 셀의 행 인덱스를 반환한다.\n *\n * @returns 행 인덱스 (0-based)\n */\n getRowIndex(): Promise<number>;\n /**\n * 셀의 열 인덱스를 반환한다.\n *\n * @returns 열 인덱스 (0-based)\n */\n getColIndex(): Promise<number>;\n /**\n * 셀이 가로로 차지하는 열 수를 반환한다. 병합되지 않았으면 1 이다.\n *\n * @returns 열 병합 수. 표가 없거나 해당 위치에 셀이 없으면 null\n */\n getColSpan(): Promise<number | null>;\n /**\n * 셀이 세로로 차지하는 행 수를 반환한다. 병합되지 않았으면 1 이다.\n *\n * @returns 행 병합 수. 표가 없거나 해당 위치에 셀이 없으면 null\n */\n getRowSpan(): Promise<number | null>;\n /**\n * 셀에 명시적으로 설정된 배경 채우기를 반환한다. (setSolidFill 대칭)\n * 스타일 상속분은 포함하지 않으며(셀에 직접 지정한 채우기만), alpha 는 setSolidFill 과 같은\n * 투명도(0~100, 0=불투명)로 반환한다.\n *\n * @returns 채우기 정보. 명시적 fill 없으면 `{ type: FillType.NONE }`, 표가 없으면 null\n */\n getFill(): Promise<Fill | null>;\n /**\n * 지정 위치의 셀 테두리 스타일을 반환한다. (setBorderStyle 대칭)\n * ALL 일괄 조회는 지원하지 않는다 - 한 변씩 조회한다.\n *\n * @param position - 테두리 위치\n * @returns 테두리 스타일. 해당 위치에 명시적 테두리가 없으면 null\n * @throws {Error} position 이 BorderPosition.ALL(조회 미지원)인 경우 (error.code = \"INVALID_ARGUMENT\")\n */\n getBorderStyle(position: Exclude<BorderPosition, \"all\">): Promise<BorderStyle | null>;\n /**\n * 셀 안의 모든 텍스트를 제거한다.\n */\n deleteText(): Promise<void>;\n /**\n * 셀 배경을 단색으로 채운다.\n *\n * @param color - hex (#RRGGBB) 또는 scheme color\n * @param alpha - 투명도 (0~100, 0=불투명, 100=완전 투명). 생략하면 기존 투명도 유지\n */\n setSolidFill(color: string, alpha?: number): Promise<void>;\n /**\n * getFill() 이 반환한 채우기 객체를 그대로 적용한다. (getFill 대칭 — 셀 채우기 복사)\n * 셀 채우기 설정은 단색만 지원한다 — getFill() 이 다른 타입(none/gradient 등)을 돌려준 셀의 값은 되넘길 수 없다.\n *\n * @param fill - 적용할 단색 채우기\n * @throws {Error} fill.type 이 solid 가 아닌 경우 (error.code = \"INVALID_ARGUMENT\")\n */\n setFill(fill: Fill & { type: \"solidFill\" }): Promise<void>;\n /**\n * 셀 테두리 스타일을 설정한다. 생략한 속성은 유지되지 않고 기본값이 되므로, 일부만 바꾸려면\n * getBorderStyle() 반환값에 바꿀 속성을 덮어 함께 넘긴다. 셋을 모두 생략하면 아무것도 바꾸지 않는다.\n * ALL 은 위/아래/왼쪽/오른쪽 4변만 설정한다 - 대각선은 포함하지 않는다. 색상은 hex / scheme color 모두 자동 판정.\n *\n * @param position - 테두리 위치\n * @param color - hex (#RRGGBB) 또는 scheme color name\n * @param width - 선 두께 (pt 단위)\n * @param lineDash - 선 대시 유형\n */\n setBorderStyle(position: BorderPosition, color?: string, width?: number, lineDash?: LineDash): Promise<void>;\n }\n\n /**\n * 다이어그램 개체를 다루는 핸들로, 내용 편집은 지원하지 않으며\n * 위치·크기·정렬·순서 등 BaseShape 공통 API 만 제공한다.\n */\n export interface Diagram extends BaseShape {\n /**\n * 선언 전용 명목 브랜드 — 멤버 구성이 같은 핸들 타입이 서로 대입 가능해져 가드\n * 내로잉이 무력화되는 것을 막는다. 런타임에 존재하지 않으며, 키 심볼이 비-export 라\n * 외부 코드에서 접근할 수 없다.\n */\n readonly [__proxyBrand]?: 'Diagram';\n }\n\n /**\n * OLE 개체를 다루는 핸들로, 내용 편집은 지원하지 않으며\n * 위치·크기·정렬·순서 등 BaseShape 공통 API 만 제공한다.\n */\n export interface OleObject extends BaseShape {\n /**\n * 선언 전용 명목 브랜드 — 멤버 구성이 같은 핸들 타입이 서로 대입 가능해져 가드\n * 내로잉이 무력화되는 것을 막는다. 런타임에 존재하지 않으며, 키 심볼이 비-export 라\n * 외부 코드에서 접근할 수 없다.\n */\n readonly [__proxyBrand]?: 'OleObject';\n }\n\n /**\n * 컨트롤 개체를 다루는 핸들로, 내용 편집은 지원하지 않으며\n * 위치·크기·정렬·순서 등 BaseShape 공통 API 만 제공한다.\n */\n export interface Control extends BaseShape {\n /**\n * 선언 전용 명목 브랜드 — 멤버 구성이 같은 핸들 타입이 서로 대입 가능해져 가드\n * 내로잉이 무력화되는 것을 막는다. 런타임에 존재하지 않으며, 키 심볼이 비-export 라\n * 외부 코드에서 접근할 수 없다.\n */\n readonly [__proxyBrand]?: 'Control';\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