@aibrains/pdf-renderer 0.4.0 → 0.6.0

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.
@@ -0,0 +1,31 @@
1
+ {
2
+ "title": "बिल",
3
+ "invoiceNumber": "बिल नं.",
4
+ "issuedDate": "जारी मिति",
5
+ "dueDate": "भुक्तानी मिति",
6
+ "academicYear": "शैक्षिक वर्ष",
7
+ "billingPeriod": "बिलिंग अवधि",
8
+ "billedTo": "बिल प्राप्तकर्ता",
9
+ "studentName": "विद्यार्थीको नाम",
10
+ "studentId": "विद्यार्थी आईडी",
11
+ "gradeLevel": "कक्षा",
12
+ "lineItems": "विवरण",
13
+ "description": "विवरण",
14
+ "quantity": "संख्या",
15
+ "amount": "रकम",
16
+ "discount": "छुट",
17
+ "taxRate": "कर %",
18
+ "taxAmount": "कर",
19
+ "total": "जम्मा",
20
+ "subtotal": "उप-योग",
21
+ "totalTax": "जम्मा कर",
22
+ "totalDiscount": "जम्मा छुट",
23
+ "grandTotal": "जम्मा रकम",
24
+ "amountPaid": "भुक्तानी",
25
+ "amountDue": "बाँकी",
26
+ "status": "स्थिति",
27
+ "notes": "टिप्पणी",
28
+ "footerThankYou": "तपाईंको भुक्तानीको लागि धन्यवाद।",
29
+ "watermarkDraft": "मस्यौदा",
30
+ "watermarkCancelled": "रद्द"
31
+ }
@@ -0,0 +1,36 @@
1
+ {
2
+ "title": "भुक्तानी रसिद",
3
+ "subtitle": "सरकारी रसिद",
4
+ "receiptNumber": "रसिद नं.",
5
+ "paymentDate": "भुक्तानी मिति",
6
+ "paymentMethod": "भुक्तानी विधि",
7
+ "transactionId": "कारोबार आईडी",
8
+ "paidBy": "भुक्तानीकर्ता",
9
+ "invoiceNumber": "बिल नं.",
10
+ "invoiceRef": "बिल विरुद्ध",
11
+ "academicYear": "शैक्षिक वर्ष",
12
+ "billingPeriod": "बिलिंग अवधि",
13
+ "studentName": "विद्यार्थीको नाम",
14
+ "studentId": "विद्यार्थी आईडी",
15
+ "gradeLevel": "कक्षा",
16
+ "lineItems": "विवरण",
17
+ "description": "विवरण",
18
+ "amount": "रकम",
19
+ "taxAmount": "कर",
20
+ "total": "जम्मा",
21
+ "subtotal": "उप-योग",
22
+ "totalTax": "जम्मा कर",
23
+ "totalDiscount": "जम्मा छुट",
24
+ "grandTotal": "जम्मा रकम",
25
+ "paidAmount": "भुक्तानी रकम",
26
+ "taxBreakdownTitle": "कर विवरण",
27
+ "panNumber": "प्यान",
28
+ "vatNumber": "मू.अ.कर",
29
+ "taxableAmount": "कर योग्य रकम",
30
+ "taxAmountLabel": "कर रकम",
31
+ "paymentDetailsTitle": "भुक्तानी विवरण",
32
+ "notes": "टिप्पणी",
33
+ "thankYou": "तपाईंको भुक्तानीको लागि धन्यवाद।",
34
+ "watermarkVoided": "रद्द",
35
+ "watermarkRefunded": "फिर्ता"
36
+ }
package/dist/index.d.ts CHANGED
@@ -4,19 +4,29 @@
4
4
  * Sprint C.0.2 ships core utilities (theme tokens, i18n helper, date/currency
5
5
  * /number format helpers). Bikram Sambat support comes via `@aibrains/shared-types`.
6
6
  *
7
- * Subsequent C.0.* tickets add:
8
- * - C.0.3: fonts registration (Noto Sans + Noto Sans Devanagari) + layout
9
- * primitives (Document, Page, BrandedHeader, BrandedFooter, Watermark)
10
- * + reusable components (KeyValueTable, LineItemTable, TotalsBlock,
11
- * SignatureLine) + Devanagari snapshot tests
7
+ * Shipped:
8
+ * - C.0.2: core utilities (fonts + theme + i18n + format)
9
+ * - C.0.3: layout primitives + reusable components + Devanagari R45 canary
12
10
  * - C.0.4: TemplateDescriptor<T> generic + per-docType registry
13
- * Sprint C.1+: <InvoicePdf>, <ReceiptPdf>, <ReportCardPdf>, ...
11
+ * - C.1.1: <InvoicePdf> document + invoice descriptor + invoice i18n
12
+ * - C.1.2: <ReceiptPdf> document + receipt descriptor + receipt i18n
13
+ *
14
+ * Sprint C.1.3+: server-side PdfTemplatesService + finance render endpoints,
15
+ * <ReportCardPdf> (C.3.1), <AdmitCardPdf> (C.5.1), …
14
16
  *
15
17
  * Design source of truth: docs/pilot-greenlight/c-epic-pdf-generation-design.md
16
18
  */
17
- export declare const PDF_RENDERER_PACKAGE_VERSION = "0.4.0";
19
+ export declare const PDF_RENDERER_PACKAGE_VERSION = "0.6.0";
18
20
  export * from './core';
19
21
  export * from './primitives';
20
22
  export * from './components';
21
23
  export * from './descriptors';
24
+ import './descriptors/invoice';
25
+ export { InvoicePdf } from './documents/InvoicePdf';
26
+ export type { InvoiceTemplateConfig, InvoiceDocumentData } from './documents/InvoicePdf';
27
+ export { invoiceDescriptor } from './descriptors/invoice';
28
+ import './descriptors/receipt';
29
+ export { ReceiptPdf } from './documents/ReceiptPdf';
30
+ export type { ReceiptTemplateConfig, ReceiptDocumentData } from './documents/ReceiptPdf';
31
+ export { receiptDescriptor } from './descriptors/receipt';
22
32
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,eAAO,MAAM,4BAA4B,UAAU,CAAC;AAIpD,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,eAAO,MAAM,4BAA4B,UAAU,CAAC;AAGpD,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAM9B,OAAO,uBAAuB,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,YAAY,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AACzF,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAM1D,OAAO,uBAAuB,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,YAAY,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AACzF,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC"}
package/dist/index.js CHANGED
@@ -5,13 +5,15 @@
5
5
  * Sprint C.0.2 ships core utilities (theme tokens, i18n helper, date/currency
6
6
  * /number format helpers). Bikram Sambat support comes via `@aibrains/shared-types`.
7
7
  *
8
- * Subsequent C.0.* tickets add:
9
- * - C.0.3: fonts registration (Noto Sans + Noto Sans Devanagari) + layout
10
- * primitives (Document, Page, BrandedHeader, BrandedFooter, Watermark)
11
- * + reusable components (KeyValueTable, LineItemTable, TotalsBlock,
12
- * SignatureLine) + Devanagari snapshot tests
8
+ * Shipped:
9
+ * - C.0.2: core utilities (fonts + theme + i18n + format)
10
+ * - C.0.3: layout primitives + reusable components + Devanagari R45 canary
13
11
  * - C.0.4: TemplateDescriptor<T> generic + per-docType registry
14
- * Sprint C.1+: <InvoicePdf>, <ReceiptPdf>, <ReportCardPdf>, ...
12
+ * - C.1.1: <InvoicePdf> document + invoice descriptor + invoice i18n
13
+ * - C.1.2: <ReceiptPdf> document + receipt descriptor + receipt i18n
14
+ *
15
+ * Sprint C.1.3+: server-side PdfTemplatesService + finance render endpoints,
16
+ * <ReportCardPdf> (C.3.1), <AdmitCardPdf> (C.5.1), …
15
17
  *
16
18
  * Design source of truth: docs/pilot-greenlight/c-epic-pdf-generation-design.md
17
19
  */
@@ -30,12 +32,29 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
30
32
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
31
33
  };
32
34
  Object.defineProperty(exports, "__esModule", { value: true });
33
- exports.PDF_RENDERER_PACKAGE_VERSION = void 0;
34
- exports.PDF_RENDERER_PACKAGE_VERSION = '0.4.0';
35
- // Re-export the C.0.2 core API surface + C.0.3 primitives + components
36
- // + C.0.4 descriptor registry.
35
+ exports.receiptDescriptor = exports.ReceiptPdf = exports.invoiceDescriptor = exports.InvoicePdf = exports.PDF_RENDERER_PACKAGE_VERSION = void 0;
36
+ exports.PDF_RENDERER_PACKAGE_VERSION = '0.6.0';
37
+ // Core + primitives + components + descriptor registry from Sprint C.0.
37
38
  __exportStar(require("./core"), exports);
38
39
  __exportStar(require("./primitives"), exports);
39
40
  __exportStar(require("./components"), exports);
40
41
  __exportStar(require("./descriptors"), exports);
42
+ // C.1.1 — first concrete document. Importing this module's descriptor file
43
+ // has the side-effect of self-registering it with the registry. Consumers
44
+ // that only `import '@aibrains/pdf-renderer'` (the package root) get
45
+ // `getDescriptor('INVOICE')` working transitively.
46
+ require("./descriptors/invoice");
47
+ var InvoicePdf_1 = require("./documents/InvoicePdf");
48
+ Object.defineProperty(exports, "InvoicePdf", { enumerable: true, get: function () { return InvoicePdf_1.InvoicePdf; } });
49
+ var invoice_1 = require("./descriptors/invoice");
50
+ Object.defineProperty(exports, "invoiceDescriptor", { enumerable: true, get: function () { return invoice_1.invoiceDescriptor; } });
51
+ // C.1.2 — second concrete document. Same self-registration pattern as the
52
+ // invoice descriptor: importing the descriptor file registers it with the
53
+ // registry, so consumers that only `import '@aibrains/pdf-renderer'` get
54
+ // `getDescriptor('RECEIPT')` working without an explicit subpath import.
55
+ require("./descriptors/receipt");
56
+ var ReceiptPdf_1 = require("./documents/ReceiptPdf");
57
+ Object.defineProperty(exports, "ReceiptPdf", { enumerable: true, get: function () { return ReceiptPdf_1.ReceiptPdf; } });
58
+ var receipt_1 = require("./descriptors/receipt");
59
+ Object.defineProperty(exports, "receiptDescriptor", { enumerable: true, get: function () { return receipt_1.receiptDescriptor; } });
41
60
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;;;;;;;;;;;;;;;AAEU,QAAA,4BAA4B,GAAG,OAAO,CAAC;AAEpD,uEAAuE;AACvE,+BAA+B;AAC/B,yCAAuB;AACvB,+CAA6B;AAC7B,+CAA6B;AAC7B,gDAA8B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;;;;;;;;;;;;;;;;AAEU,QAAA,4BAA4B,GAAG,OAAO,CAAC;AAEpD,wEAAwE;AACxE,yCAAuB;AACvB,+CAA6B;AAC7B,+CAA6B;AAC7B,gDAA8B;AAE9B,2EAA2E;AAC3E,0EAA0E;AAC1E,qEAAqE;AACrE,mDAAmD;AACnD,iCAA+B;AAC/B,qDAAoD;AAA3C,wGAAA,UAAU,OAAA;AAEnB,iDAA0D;AAAjD,4GAAA,iBAAiB,OAAA;AAE1B,0EAA0E;AAC1E,0EAA0E;AAC1E,yEAAyE;AACzE,yEAAyE;AACzE,iCAA+B;AAC/B,qDAAoD;AAA3C,wGAAA,UAAU,OAAA;AAEnB,iDAA0D;AAAjD,4GAAA,iBAAiB,OAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aibrains/pdf-renderer",
3
- "version": "0.4.0",
3
+ "version": "0.6.0",
4
4
  "description": "EdForge PDF rendering library. JSX-based document templates built on @react-pdf/renderer, with localization (EN + NE), Bikram Sambat date support, and a TemplateDescriptor registry for cross-domain doc types (invoice, receipt, report card, admit card, etc.).",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",