@pdfme/ui 1.0.0-beta.5 → 1.0.0-beta.6

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.
Files changed (45) hide show
  1. package/dist/index.js +1 -1
  2. package/dist/index.js.LICENSE.txt +3 -1
  3. package/dist/index.js.map +1 -1
  4. package/dist/types/{ui/src/Designer.d.ts → Designer.d.ts} +0 -0
  5. package/dist/types/{ui/src/Form.d.ts → Form.d.ts} +0 -0
  6. package/dist/types/{ui/src/Viewer.d.ts → Viewer.d.ts} +0 -0
  7. package/dist/types/{ui/src/class.d.ts → class.d.ts} +1 -1
  8. package/dist/types/{ui/src/components → components}/Designer/Main/Guides.d.ts +0 -0
  9. package/dist/types/{ui/src/components → components}/Designer/Main/Mask.d.ts +0 -0
  10. package/dist/types/{ui/src/components → components}/Designer/Main/Moveable.d.ts +0 -0
  11. package/dist/types/{ui/src/components → components}/Designer/Main/Selecto.d.ts +0 -0
  12. package/dist/types/{ui/src/components → components}/Designer/Main/index.d.ts +0 -0
  13. package/dist/types/{ui/src/components → components}/Designer/Sidebar/DetailView/ExampleInputEditor.d.ts +0 -0
  14. package/dist/types/{ui/src/components → components}/Designer/Sidebar/DetailView/PositionAndSizeEditor.d.ts +0 -0
  15. package/dist/types/{ui/src/components → components}/Designer/Sidebar/DetailView/TextPropEditor.d.ts +0 -0
  16. package/dist/types/{ui/src/components → components}/Designer/Sidebar/DetailView/TypeAndKeyEditor.d.ts +0 -0
  17. package/dist/types/{ui/src/components → components}/Designer/Sidebar/DetailView/index.d.ts +0 -0
  18. package/dist/types/{ui/src/components → components}/Designer/Sidebar/ListView.d.ts +0 -0
  19. package/dist/types/{ui/src/components → components}/Designer/Sidebar/index.d.ts +0 -1
  20. package/dist/types/{ui/src/components → components}/Designer/index.d.ts +0 -1
  21. package/dist/types/{ui/src/components → components}/Divider.d.ts +0 -0
  22. package/dist/types/{ui/src/components → components}/Error.d.ts +0 -1
  23. package/dist/types/{ui/src/components → components}/Paper.d.ts +0 -0
  24. package/dist/types/{ui/src/components → components}/Preview/Pager/Page.d.ts +0 -1
  25. package/dist/types/{ui/src/components → components}/Preview/Pager/Unit.d.ts +0 -1
  26. package/dist/types/{ui/src/components → components}/Preview/index.d.ts +0 -1
  27. package/dist/types/{ui/src/components → components}/Root.d.ts +0 -0
  28. package/dist/types/{ui/src/components → components}/Schemas/BarcodeSchema.d.ts +0 -0
  29. package/dist/types/{ui/src/components → components}/Schemas/ImageSchema.d.ts +0 -0
  30. package/dist/types/{ui/src/components → components}/Schemas/SchemaUI.d.ts +0 -0
  31. package/dist/types/{ui/src/components → components}/Schemas/TextSchema.d.ts +0 -0
  32. package/dist/types/{ui/src/components → components}/Spinner.d.ts +0 -0
  33. package/dist/types/{ui/src/constants.d.ts → constants.d.ts} +0 -0
  34. package/dist/types/contexts.d.ts +7 -0
  35. package/dist/types/{ui/src/helper.d.ts → helper.d.ts} +0 -0
  36. package/dist/types/{ui/src/hooks.d.ts → hooks.d.ts} +0 -0
  37. package/dist/types/{ui/src/i18n.d.ts → i18n.d.ts} +0 -0
  38. package/dist/types/{ui/src/index.d.ts → index.d.ts} +0 -0
  39. package/package.json +4 -5
  40. package/dist/types/common/src/constants.d.ts +0 -6
  41. package/dist/types/common/src/helper.d.ts +0 -15
  42. package/dist/types/common/src/index.d.ts +0 -6
  43. package/dist/types/common/src/schema.d.ts +0 -3613
  44. package/dist/types/common/src/type.d.ts +0 -64
  45. package/dist/types/ui/src/contexts.d.ts +0 -7
File without changes
File without changes
@@ -7,7 +7,7 @@ export declare abstract class BaseUIClass {
7
7
  private readonly font;
8
8
  private readonly setSize;
9
9
  constructor(props: UIProps);
10
- protected getI18n(): (key: "type" | "select" | "field" | "fieldName" | "require" | "uniq" | "inputExample" | "edit" | "plsSelect" | "plsInputName" | "plsAddNewField" | "fieldMustUniq" | "notUniq" | "noKeyName" | "fieldsList" | "addNewField" | "editField" | "previewWarnMsg" | "previewErrMsg" | "goToFirst" | "goToPrevious" | "goToNext" | "goToEnd" | "errorOccurred") => string;
10
+ protected getI18n(): (key: "type" | "field" | "fieldName" | "require" | "uniq" | "inputExample" | "edit" | "plsSelect" | "plsInputName" | "plsAddNewField" | "fieldMustUniq" | "notUniq" | "noKeyName" | "fieldsList" | "addNewField" | "editField" | "previewWarnMsg" | "previewErrMsg" | "goToFirst" | "goToPrevious" | "goToNext" | "goToEnd" | "select" | "errorOccurred") => string;
11
11
  protected getFont(): Record<string, {
12
12
  fallback?: boolean | undefined;
13
13
  subset?: boolean | undefined;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { SchemaForUI, Size } from '@pdfme/common';
3
2
  export declare type SidebarProps = {
4
3
  height: number;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { DesignerReactProps, Template } from '@pdfme/common';
3
2
  declare const TemplateEditor: ({ template, size, onSaveTemplate, onChangeTemplate, }: {
4
3
  options?: {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { Size } from '@pdfme/common';
3
2
  declare const Error: ({ size, error }: {
4
3
  size: Size;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare type Props = {
3
2
  pageCursor: number;
4
3
  pageNum: number;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare type Props = {
3
2
  unitCursor: number;
4
3
  unitNum: number;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { PreviewReactProps } from '@pdfme/common';
3
2
  declare const Preview: ({ template, inputs, size, onChangeInput }: PreviewReactProps) => JSX.Element;
4
3
  export default Preview;
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ export declare const I18nContext: import("react").Context<(key: "type" | "field" | "fieldName" | "require" | "uniq" | "inputExample" | "edit" | "plsSelect" | "plsInputName" | "plsAddNewField" | "fieldMustUniq" | "notUniq" | "noKeyName" | "fieldsList" | "addNewField" | "editField" | "previewWarnMsg" | "previewErrMsg" | "goToFirst" | "goToPrevious" | "goToNext" | "goToEnd" | "select" | "errorOccurred") => string>;
3
+ export declare const FontContext: import("react").Context<Record<string, {
4
+ fallback?: boolean | undefined;
5
+ subset?: boolean | undefined;
6
+ data: ArrayBuffer | Uint8Array;
7
+ }>>;
File without changes
File without changes
File without changes
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pdfme/ui",
3
- "version": "1.0.0-beta.5",
3
+ "version": "1.0.0-beta.6",
4
4
  "author": "hand-dot",
5
5
  "license": "MIT",
6
6
  "description": "TypeScript base PDF generator and React base UI. Open source, developed by the community, and completely free to use under the MIT license!",
@@ -10,7 +10,7 @@
10
10
  "url": "https://github.com/pdfme/pdfme/issues"
11
11
  },
12
12
  "main": "dist/index.js",
13
- "module": "src/index.ts",
13
+ "module": "dist/index.js",
14
14
  "types": "dist/types/ui/src/index.d.ts",
15
15
  "engines": {
16
16
  "node": ">=14"
@@ -26,7 +26,7 @@
26
26
  "prune": "ts-prune src"
27
27
  },
28
28
  "dependencies": {
29
- "@pdfme/common": "^1.0.0-beta.5",
29
+ "@pdfme/common": "^1.0.0-beta.6",
30
30
  "@scena/react-guides": "^0.16.0",
31
31
  "hotkeys-js": "^3.8.7",
32
32
  "pdfjs-dist": "^2.12.313",
@@ -79,6 +79,5 @@
79
79
  },
80
80
  "publishConfig": {
81
81
  "access": "public"
82
- },
83
- "stableVersion": "1.0.0-beta.4"
82
+ }
84
83
  }
@@ -1,6 +0,0 @@
1
- export declare const DEFAULT_FONT_SIZE = 13;
2
- export declare const DEFAULT_ALIGNMENT = "left";
3
- export declare const DEFAULT_LINE_HEIGHT = 1;
4
- export declare const DEFAULT_CHARACTER_SPACING = 0;
5
- export declare const DEFAULT_FONT_COLOR = "#000";
6
- export declare const BLANK_PDF = "data:application/pdf;base64,JVBERi0xLjcKJeLjz9MKNSAwIG9iago8PAovRmlsdGVyIC9GbGF0ZURlY29kZQovTGVuZ3RoIDM4Cj4+CnN0cmVhbQp4nCvkMlAwUDC1NNUzMVGwMDHUszRSKErlCtfiyuMK5AIAXQ8GCgplbmRzdHJlYW0KZW5kb2JqCjQgMCBvYmoKPDwKL1R5cGUgL1BhZ2UKL01lZGlhQm94IFswIDAgNTk1LjQ0IDg0MS45Ml0KL1Jlc291cmNlcyA8PAo+PgovQ29udGVudHMgNSAwIFIKL1BhcmVudCAyIDAgUgo+PgplbmRvYmoKMiAwIG9iago8PAovVHlwZSAvUGFnZXMKL0tpZHMgWzQgMCBSXQovQ291bnQgMQo+PgplbmRvYmoKMSAwIG9iago8PAovVHlwZSAvQ2F0YWxvZwovUGFnZXMgMiAwIFIKPj4KZW5kb2JqCjMgMCBvYmoKPDwKL3RyYXBwZWQgKGZhbHNlKQovQ3JlYXRvciAoU2VyaWYgQWZmaW5pdHkgRGVzaWduZXIgMS4xMC40KQovVGl0bGUgKFVudGl0bGVkLnBkZikKL0NyZWF0aW9uRGF0ZSAoRDoyMDIyMDEwNjE0MDg1OCswOScwMCcpCi9Qcm9kdWNlciAoaUxvdmVQREYpCi9Nb2REYXRlIChEOjIwMjIwMTA2MDUwOTA5WikKPj4KZW5kb2JqCjYgMCBvYmoKPDwKL1NpemUgNwovUm9vdCAxIDAgUgovSW5mbyAzIDAgUgovSUQgWzwyODhCM0VENTAyOEU0MDcyNERBNzNCOUE0Nzk4OUEwQT4gPEY1RkJGNjg4NkVERDZBQUNBNDRCNEZDRjBBRDUxRDlDPl0KL1R5cGUgL1hSZWYKL1cgWzEgMiAyXQovRmlsdGVyIC9GbGF0ZURlY29kZQovSW5kZXggWzAgN10KL0xlbmd0aCAzNgo+PgpzdHJlYW0KeJxjYGD4/5+RUZmBgZHhFZBgDAGxakAEP5BgEmFgAABlRwQJCmVuZHN0cmVhbQplbmRvYmoKc3RhcnR4cmVmCjUzMgolJUVPRgo=";
@@ -1,15 +0,0 @@
1
- import { Template, BasePdf, Font, BarCodeType } from './type';
2
- export declare const getB64BasePdf: (basePdf: BasePdf) => string | Promise<string>;
3
- export declare const b64toUint8Array: (base64: string) => Uint8Array;
4
- export declare const getFallbackFontName: (font: Font) => string;
5
- export declare const getDefaultFont: () => Font;
6
- export declare const checkFont: (arg: {
7
- font: Font;
8
- template: Template;
9
- }) => void;
10
- export declare const checkTemplate: (data: unknown) => void;
11
- export declare const checkUIProps: (data: unknown) => void;
12
- export declare const checkPreviewProps: (data: unknown) => void;
13
- export declare const checkDesignerProps: (data: unknown) => void;
14
- export declare const checkGenerateProps: (data: unknown) => void;
15
- export declare const validateBarcodeInput: (type: BarCodeType, input: string) => boolean;
@@ -1,6 +0,0 @@
1
- import { DEFAULT_FONT_SIZE, DEFAULT_ALIGNMENT, DEFAULT_LINE_HEIGHT, DEFAULT_CHARACTER_SPACING, DEFAULT_FONT_COLOR, BLANK_PDF } from './constants';
2
- import { schemaTypes, isImageSchema, isBarcodeSchema, isTextSchema } from './type';
3
- import type { Lang, Size, Alignment, SchemaType, BarCodeType, TextSchema, ImageSchema, BarcodeSchema, Schema, SchemaForUI, Font, BasePdf, Template, CommonProps, GeneratorOptions, GenerateProps, UIOptions, UIProps, PreviewProps, PreviewReactProps, DesignerProps, DesignerReactProps } from './type';
4
- import { getB64BasePdf, b64toUint8Array, getFallbackFontName, getDefaultFont, checkFont, checkTemplate, checkUIProps, checkPreviewProps, checkDesignerProps, checkGenerateProps, validateBarcodeInput } from './helper';
5
- export { DEFAULT_FONT_SIZE, DEFAULT_ALIGNMENT, DEFAULT_LINE_HEIGHT, DEFAULT_CHARACTER_SPACING, DEFAULT_FONT_COLOR, BLANK_PDF, schemaTypes, isTextSchema, isImageSchema, isBarcodeSchema, getB64BasePdf, b64toUint8Array, getFallbackFontName, getDefaultFont, checkFont, checkTemplate, checkUIProps, checkPreviewProps, checkDesignerProps, checkGenerateProps, validateBarcodeInput, };
6
- export type { Lang, Size, Alignment, SchemaType, BarCodeType, TextSchema, ImageSchema, BarcodeSchema, Schema, SchemaForUI, Font, BasePdf, Template, CommonProps, GeneratorOptions, GenerateProps, UIOptions, UIProps, PreviewProps, PreviewReactProps, DesignerProps, DesignerReactProps, };