216 Commits

Author SHA1 Message Date
hand-dot
cc27790770 Convert CJS helpers to JS 2026-03-24 16:00:44 +09:00
hand-dot
e9bb09a3e6 Promote signature and harden example jobs 2026-03-23 17:55:55 +09:00
hand-dot
c759a120d7 feat: update test script to run workspace tests and refactor schema imports
- Changed the test script in package.json to run workspace tests using a new script.
- Updated imports in generator and helper files to point to specific schema paths.
- Added new builtins and tables exports in schemas package.json and created corresponding files.
- Enhanced error handling in multiVariableText propPanel for JSON parsing.
- Refactored UI components to use React 18 and updated dependencies accordingly.
- Improved snapshot tests to ensure cleaner output by removing empty text nodes.
- Updated documentation to reflect changes in package usage and requirements.
2026-03-21 16:10:48 +09:00
hand-dot
cd3db68070 improve scripts 2026-03-21 10:20:23 +09:00
hand-dot
3d87f977d6 use vp 2026-03-21 09:24:02 +09:00
hand-dot
fc7567b879 Finish Phase 1 cleanup and verification 2026-03-20 22:58:47 +09:00
hand-dot
fa38d3a9aa Relax generator image snapshot comparisons 2026-03-20 20:47:56 +09:00
hand-dot
400fe64dbd Migrate converter schemas and generator builds to Vite 2026-03-20 18:44:57 +09:00
hand-dot
5f70376d12 Fix Node pdf renderer and refresh snapshots 2026-03-20 18:13:04 +09:00
hand-dot
fe08c521ac Fix browser worker entry and refresh generator snapshots 2026-03-20 17:41:56 +09:00
hand-dot
982a3a0fcb Separate build tsconfig from typecheck aliases 2026-03-20 17:20:37 +09:00
hand-dot
11169c6692 Migrate generator and pdf-lib tests to Vitest 2026-03-20 15:48:05 +09:00
hand-dot
58a8c712cb Add TypeScript project references 2026-03-20 15:10:39 +09:00
ryoppippi
38eeecb3ed chore: replace npm-run-all with npm-run-all2 (#1288)
* chore: replace npm-run-all with npm-run-all2

* chore: replace npm-run-all with npm-run-all2 and use run-p shorthand
2025-12-05 09:42:53 +09:00
dependabot[bot]
968dddea63 build(deps-dev): bump typescript from 5.8.3 to 5.9.3 (#1211)
* build(deps-dev): bump typescript from 5.8.3 to 5.9.3

Bumps [typescript](https://github.com/microsoft/TypeScript) from 5.8.3 to 5.9.3.
- [Release notes](https://github.com/microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release-publish.yml)
- [Commits](https://github.com/microsoft/TypeScript/compare/v5.8.3...v5.9.3)

---
updated-dependencies:
- dependency-name: typescript
  dependency-version: 5.9.3
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Apply TypeScript 5.9 compatibility changes

- Update Uint8Array types to Uint8Array<ArrayBuffer> for TypeScript 5.9 compatibility
- Changes based on PR #1145 comment by bnarnold

Co-Authored-By: Kyohei Fukuda <kyoheif@wix.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Kyohei Fukuda <kyoheif@wix.com>
2025-11-09 08:32:15 +09:00
dependabot[bot]
d493f0bd8f build(deps): bump zod from 3.25.67 to 4.1.11 (#1210)
* build(deps): bump zod from 3.25.67 to 4.1.11

Bumps [zod](https://github.com/colinhacks/zod) from 3.25.67 to 4.1.11.
- [Release notes](https://github.com/colinhacks/zod/releases)
- [Commits](https://github.com/colinhacks/zod/compare/v3.25.67...v4.1.11)

---
updated-dependencies:
- dependency-name: zod
  dependency-version: 4.1.11
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Fix zod v4 API compatibility issues

- Update z.function() usage to z.any() for Plugin schema (zod v4 changed z.function() to a function factory)
- Update z.record() calls to use two arguments (key schema, value schema) as required by zod v4
- Add type assertions for Object.entries() to fix type inference issues
- Update test error message to match zod v4 format

Co-Authored-By: Kyohei Fukuda <kyoheif@wix.com>

* Update test expectations for zod v4 error message format

- Update error messages in common package tests to match zod v4 format
- 'Expected array, received string' → 'Invalid input: expected array, received string'
- 'Array must contain at least 1 element(s)' → 'Too small: expected array to have >=1 items'
- 'Required' → 'Invalid input: expected {type}, received undefined'

Co-Authored-By: Kyohei Fukuda <kyoheif@wix.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Kyohei Fukuda <kyoheif@wix.com>
Co-authored-by: Kyohei Fukuda <kyouhei.fukuda0729@gmail.com>
2025-11-08 14:44:27 +09:00
hand-dot
50536d5872 refactor: rename variable 'cd' to 'inputs' for clarity in validation tests 2025-11-08 14:37:58 +09:00
hand-dot
2459891127 Fix CI 2025-11-08 14:20:06 +09:00
Kyohei Fukuda
093f183d74 npm run prettier 2025-07-02 15:21:54 +09:00
hand-dot
4d274827fc Refactor imports and improve code formatting in integration tests; add failure threshold for image snapshots 2025-06-29 00:20:01 +09:00
hand-dot
12fddfab2b Refactor tests to remove jest timeout and mock Date in integration tests 2025-06-28 23:57:55 +09:00
Kyohei Fukuda
41b8dd970c Organize generator test (#1098)
* remove old japanese template

* Add new image snapshots and update font references in tests

* Refactor code structure for improved readability and maintainability
2025-06-27 16:59:02 +09:00
Peter Ward
ef0efbbf2b fix for using MVT in static schema (#1018) 2025-05-20 10:41:54 +09:00
Peter Ward
f137dab01c improve DX with pluginRepository and make plugin checking more robust (#1007)
* add pluginRepository and make plugin checking more robust

* Apply suggestions from code review

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

* f

* f

---------

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2025-05-16 13:54:20 +09:00
dependabot[bot]
48f1511f85 Bump bwip-js from 4.5.3 to 4.6.0 (#976)
* Bump bwip-js from 4.5.3 to 4.6.0

Bumps [bwip-js](https://github.com/metafloor/bwip-js) from 4.5.3 to 4.6.0.
- [Release notes](https://github.com/metafloor/bwip-js/releases)
- [Commits](https://github.com/metafloor/bwip-js/compare/v4.5.3...v4.6.0)

---
updated-dependencies:
- dependency-name: bwip-js
  dependency-version: 4.6.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update pet-1.png snapshot in generator tests

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Kyohei Fukuda <kyoheif@wix.com>
2025-05-14 17:00:08 +09:00
Devin AI
85025868d1 fix: replace file: references with wildcard (*) to fix pnpm compatibility (fixes #843)
Co-Authored-By: Kyohei Fukuda <kyouhei.fukuda0729@gmail.com>
2025-03-12 13:03:20 +00:00
hand-dot
9b37b6e2d3 Refactor cache handling to improve type inference in generator and PDF render functions 2025-03-07 01:25:28 +09:00
Kyohei Fukuda
9fa60cba14 Refactor type definitions and improve type safety in dynamic template handling (#816) 2025-03-06 11:18:13 +09:00
Kyohei Fukuda
9ecd6346a6 Update package dependencies to use local paths for common and converter packages 2025-03-06 10:17:31 +09:00
devin-ai-integration[bot]
2eff1734ca Fix TypeScript type compatibility issues (#813)
* Fix lint errors across multiple packages

- Fixed TypeScript type safety issues in common, schemas, generator, and UI packages
- Replaced 'any' types with more specific types like Map<string | number, unknown>
- Added proper type assertions in UI components to ensure type compatibility
- Created BarcodeRenderOptions interface to improve type safety in barcode rendering
- Fixed unsafe member access and return value issues in helper functions
- Ensured type safety in React components with proper type narrowing

Co-Authored-By: Kyohei Fukuda <kyouhei.fukuda0729@gmail.com>

* Fix type safety issues in tables/pdfRender.ts

Co-Authored-By: Kyohei Fukuda <kyouhei.fukuda0729@gmail.com>

* Fix remaining lint errors in multiple packages

- Fixed type safety issues in DetailView/index.tsx by removing unsafe type assertions
- Improved type safety in select/index.ts with proper type assertions
- Enhanced type safety in generate.ts with proper type narrowing and error handling

Co-Authored-By: Kyohei Fukuda <kyouhei.fukuda0729@gmail.com>

* Fix type error in DetailView/index.tsx

- Added type assertion to i18n function call to satisfy union type constraint

Co-Authored-By: Kyohei Fukuda <kyouhei.fukuda0729@gmail.com>

* Enable problematic test in Playground E2E Tests

* TMP

* Fix TypeScript type compatibility issues across packages

- Update Map type definitions to use consistent Map<string | number, unknown> type
- Fix Plugin type definition to properly handle Schema types
- Update function signatures to maintain type compatibility
- Resolve type errors in UI components and context providers
- Ensure proper type handling in schema implementations

Co-Authored-By: Kyohei Fukuda <kyouhei.fukuda0729@gmail.com>

* Refactor typedI18n function to use a type-safe key assertion for i18n

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Kyohei Fukuda <kyouhei.fukuda0729@gmail.com>
2025-03-05 19:46:54 +09:00
hand-dot
e089e24d36 Merge branch 'main' of https://github.com/pdfme/pdfme 2025-03-05 11:46:30 +09:00
hand-dot
6f97ca260b Set baseUrl in generator tsconfig for improved module resolution 2025-03-05 11:46:27 +09:00
devin-ai-integration[bot]
cba7107b03 Fix easy-to-resolve linting errors in packages/generator (#807)
* Fix easy-to-resolve linting errors in packages/generator

Co-Authored-By: Kyohei Fukuda <kyouhei.fukuda0729@gmail.com>

* Fix build errors related to type definitions

Co-Authored-By: Kyohei Fukuda <kyouhei.fukuda0729@gmail.com>

* Fix remaining type errors in generate.ts

Co-Authored-By: Kyohei Fukuda <kyouhei.fukuda0729@gmail.com>

* Revert unnecessary modification in table case as requested in PR review

Co-Authored-By: Kyohei Fukuda <kyouhei.fukuda0729@gmail.com>

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Kyohei Fukuda <kyouhei.fukuda0729@gmail.com>
2025-03-05 11:42:57 +09:00
devin-ai-integration[bot]
1a58874c32 Update TypeScript to version 5.8.2 (#802)
* Update TypeScript to version 5.8.2 and fix type compatibility issues

Co-Authored-By: Kyohei Fukuda <kyouhei.fukuda0729@gmail.com>

* Update package-lock.json for TypeScript 5.8.2

Co-Authored-By: Kyohei Fukuda <kyouhei.fukuda0729@gmail.com>

* Fix TypeScript errors in generator package

Co-Authored-By: Kyohei Fukuda <kyouhei.fukuda0729@gmail.com>

* Update moduleResolution to esnext in all tsconfig.esm.json files and fix type errors in generator package

Co-Authored-By: Kyohei Fukuda <kyouhei.fukuda0729@gmail.com>

* Update moduleResolution to bundler in all tsconfig.esm.json files

Co-Authored-By: Kyohei Fukuda <kyouhei.fukuda0729@gmail.com>

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Kyohei Fukuda <kyouhei.fukuda0729@gmail.com>
2025-03-04 18:15:28 +09:00
devin-ai-integration[bot]
ac9c20717c Remove unused atob dependency from generator package (#801)
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Kyohei Fukuda <kyouhei.fukuda0729@gmail.com>
2025-03-04 15:22:12 +09:00
Kyohei Fukuda
f134f15007 Fix formatting issues and ensure consistent use of commas in function parameters and object properties 2025-03-04 11:11:23 +09:00
Kyohei Fukuda
102ca8cc62 Fix eslint (#780)
* Refactor ESLint configuration: remove legacy .eslintrc.cjs files and replace with new .mjs configurations

* Remove unnecessary TypeScript ignore comments and simplify async calls in barcode tests

* Refactor date helper: remove TypeScript ignore comments and simplify AirDatepicker usage

* Enhance date helper: add AirDatepickerDate type and improve type annotations for onSelect callback

* Update TypeScript and ESLint configurations: change module to NodeNext, refine file patterns, and enhance lint command

* Refactor ESLint configuration: remove unnecessary language options for TypeScript files
2025-03-03 10:20:36 +09:00
Kyohei Fukuda
afbfa87674 [WIP] Add pdf2img integration for converting PDF to images in e2e tests (#774)
* Add pdf2img integration for converting PDF to images in e2e tests

* Refactor PDF generation tests to convert PDFs to images and validate against snapshots

* Refactor package.json files to remove "type": "module" and update import statements to CommonJS format

* Fix e2e test

* Add new image snapshots for e2e tests and remove obsolete snapshot
2025-03-01 16:24:01 +09:00
Kyohei Fukuda
b0d980c433 Modification to make the library ESM-based. (#770)
* Remove fast-xml-parser dependency and update vite-tsconfig-paths to 5.1.4

* tmp

* Refactor test files and scripts to use ES modules; remove obsolete files

* Enhance tests with new PDF utilities and update Jest configuration for ESM support
2025-03-01 02:23:24 +09:00
Kyohei Fukuda
8d824db3f5 Fix TS2835 (#762)
* tmp

* chore: update TypeScript configuration to use ESNext module and resolution

* fix: update remaining imports with .js extensions and tsconfig files with nodenext

Co-Authored-By: Kyohei Fukuda <kyouhei.fukuda0729@gmail.com>

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2025-02-28 20:49:17 +09:00
hand-dot
1c3b421de6 fix: increase performance threshold for integration tests 2025-02-22 18:31:50 +09:00
Zin Kyaw Kyaw (AJ)
445d014e70 add sparate build for node in generator, common and schema packages (#722) 2025-02-20 12:18:47 +09:00
Kyohei Fukuda
23443bbe20 Improve test (#720)
* use image snapshot

* remove

* Add new feature for user profile customization

* Implement user profile customization feature

* Update snapshots to reflect changes in button class names
2025-02-16 14:48:40 +09:00
Kyohei Fukuda
3aacf2a9b1 Manipulator package (#712)
* TMP

* Implement PDF manipulation functions: merge, split, remove, insert, extract, rotate, and organize with initial test structure

* feat(manipulator): implement merge and split functions (#714)

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Kyohei Fukuda <kyouhei.fukuda0729@gmail.com>

* feat(manipulator): implement remove and insert functions (#715)

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Kyohei Fukuda <kyouhei.fukuda0729@gmail.com>

* feat(manipulator): implement extract and rotate functions (#716)

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Kyohei Fukuda <kyouhei.fukuda0729@gmail.com>

* feat(manipulator): implement organize function (#717)

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Kyohei Fukuda <kyouhei.fukuda0729@gmail.com>

* feat(manipulator): add clean and build scripts for manipulator package

* feat: update .gitignore to exclude repomix-output.txt files

* fix(manipulator): update import paths and improve code consistency

* Minor fix

* add tests

* test(manipulator): add visual snapshot testing to E2E tests

Co-Authored-By: Kyohei Fukuda <kyouhei.fukuda0729@gmail.com>

* fix(manipulator): update pdfToImages function to return Buffer array and add getPDFPageCount utility

---------

Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2025-02-16 13:34:26 +09:00
Yasuyuki Komatsubara
f95d798a18 use Intl.Segmenter for line breaking and support alignment (#686)
* use Intl.Segmenter for line breaking and support  alignment

* fix no justify for single line texts

* remove locale from text schema

* remove unused locale related codes and minor bug fixes

* Update generator snapshot

* prevent overflow if text is longer than box width

* take into account character spacing when splitting lines

* update some assert pdfs

* Fix  bugs on text segmentation in edge cases

* use const, add containsJapanese

---------

Co-authored-by: Kyohei Fukuda <kyouhei.fukuda0729@gmail.com>
Co-authored-by: Kyohei Fukuda <kyoheif@wix.com>
2025-02-09 22:13:54 +09:00
Kyohei Fukuda
2c0749f560 adjust schema positions based on bounding box dimensions (#689)
* adjust schema positions based on bounding box dimensions

* FIx for build

* update snapshot
2025-01-30 10:53:59 +09:00
Kyohei Fukuda
24a48b2e24 fix: remove pdf support from image schema to decouple schemas from converter 2025-01-24 14:40:36 +09:00
Zin Kyaw Kyaw (AJ)
abf0e360a3 [630]: Bug fix on basePdf as array buffer (#659)
* [630]: Bug fix on basePdf as array buffer

* Minor fix

* Fix handling of customPdf in getB64BasePdf to ensure proper conversion to Uint8Array

* TMP

* Fix test

---------

Co-authored-by: hand-dot <kyouhei.fukuda0729@gmail.com>
2024-12-14 15:44:42 +09:00
Kyohei Fukuda
7c14073034 fix preprocessing (#647) 2024-11-27 11:16:46 +09:00
Kyohei Fukuda
564d6f2ae1 Update Readme and docs (#645) 2024-11-24 17:58:12 +09:00