- Move component properties, symbol overrides, derived symbol data, and clone synchronization into @open-pencil/fig\n- Add the public instance-overrides subpath with package tests and packed smoke coverage\n- Remove cross-package forwarding modules and enforce direct owner imports in architecture checks
26 lines
789 B
TypeScript
26 lines
789 B
TypeScript
export {}
|
|
|
|
const mod = await import('../dist/index.js')
|
|
const instanceOverrides = await import('../dist/instance-overrides.js')
|
|
const nodeChange = await import('../dist/node-change.js')
|
|
|
|
if (
|
|
mod.FIG_PACKAGE_STATUS !== 'archive-api' ||
|
|
typeof mod.parseFigBuffer !== 'function' ||
|
|
typeof mod.writeFigArchive !== 'function' ||
|
|
typeof instanceOverrides.populateAndApplyOverrides !== 'function' ||
|
|
typeof nodeChange.convertLineHeight !== 'function'
|
|
) {
|
|
throw new Error('Expected @open-pencil/fig archive API exports')
|
|
}
|
|
|
|
const bytes = mod.writeFigContainer({
|
|
schemaDeflated: new Uint8Array([1]),
|
|
dataRaw: new Uint8Array([2])
|
|
})
|
|
const document = mod.readFigContainer(bytes)
|
|
|
|
if (document.dataRaw[0] !== 2) {
|
|
throw new Error('Expected @open-pencil/fig container round-trip')
|
|
}
|