@pyreon/document-primitives 0.11.5 → 0.11.7

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/lib/index.d.ts CHANGED
@@ -1006,7 +1006,7 @@ interface DocumentExportOptions extends ExtractOptions$1 {
1006
1006
  /** Theme object to provide during extraction. */
1007
1007
  theme?: Record<string, unknown>;
1008
1008
  /** Mode: 'light' or 'dark'. */
1009
- mode?: "light" | "dark";
1009
+ mode?: 'light' | 'dark';
1010
1010
  }
1011
1011
  interface DocumentExport {
1012
1012
  /** Extract the DocNode tree from the template. */
package/lib/index.js CHANGED
@@ -34,18 +34,18 @@ const DocumentPreview = rocketstyle({
34
34
  minHeight: "14in"
35
35
  }
36
36
  }).styles((css) => css`
37
- display: flex;
38
- flex-direction: column;
39
- align-items: center;
40
- min-height: 100vh;
37
+ display: flex;
38
+ flex-direction: column;
39
+ align-items: center;
40
+ min-height: 100vh;
41
41
 
42
- & > * {
43
- background: white;
44
- padding: 25mm;
45
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
46
- margin: 20px 0;
47
- }
48
- `).statics({ _documentType: "document" }).attrs((props) => ({
42
+ & > * {
43
+ background: white;
44
+ padding: 25mm;
45
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
46
+ margin: 20px 0;
47
+ }
48
+ `).statics({ _documentType: "document" }).attrs((props) => ({
49
49
  tag: "div",
50
50
  _documentProps: {
51
51
  ...props.size ? { size: props.size } : { size: "A4" },
package/package.json CHANGED
@@ -1,24 +1,13 @@
1
1
  {
2
2
  "name": "@pyreon/document-primitives",
3
- "version": "0.11.5",
3
+ "version": "0.11.7",
4
+ "description": "Rocketstyle document components — render in browser, export to 18 formats",
5
+ "license": "MIT",
4
6
  "repository": {
5
7
  "type": "git",
6
8
  "url": "https://github.com/pyreon/pyreon",
7
9
  "directory": "packages/ui-system/document-primitives"
8
10
  },
9
- "description": "Rocketstyle document components — render in browser, export to 18 formats",
10
- "license": "MIT",
11
- "type": "module",
12
- "sideEffects": false,
13
- "exports": {
14
- ".": {
15
- "bun": "./src/index.ts",
16
- "import": "./lib/index.js",
17
- "types": "./lib/index.d.ts"
18
- }
19
- },
20
- "types": "./lib/index.d.ts",
21
- "main": "./lib/index.js",
22
11
  "files": [
23
12
  "lib",
24
13
  "!lib/**/*.map",
@@ -27,8 +16,16 @@
27
16
  "LICENSE",
28
17
  "src"
29
18
  ],
30
- "engines": {
31
- "node": ">= 22"
19
+ "type": "module",
20
+ "sideEffects": false,
21
+ "main": "./lib/index.js",
22
+ "types": "./lib/index.d.ts",
23
+ "exports": {
24
+ ".": {
25
+ "bun": "./src/index.ts",
26
+ "import": "./lib/index.js",
27
+ "types": "./lib/index.d.ts"
28
+ }
32
29
  },
33
30
  "publishConfig": {
34
31
  "access": "public"
@@ -37,30 +34,34 @@
37
34
  "prepublish": "bun run build",
38
35
  "build": "bun run vl_rolldown_build",
39
36
  "build:watch": "bun run vl_rolldown_build-watch",
40
- "lint": "biome check src/",
37
+ "lint": "oxlint .",
41
38
  "test": "vitest run",
42
39
  "test:coverage": "vitest run --coverage",
43
40
  "test:watch": "vitest",
44
41
  "typecheck": "tsc --noEmit"
45
42
  },
46
- "peerDependencies": {
47
- "@pyreon/core": "^0.11.5",
48
- "@pyreon/document": "^0.11.5",
49
- "@pyreon/elements": "^0.11.5",
50
- "@pyreon/rocketstyle": "^0.11.5",
51
- "@pyreon/styler": "^0.11.5",
52
- "@pyreon/ui-core": "^0.11.5"
53
- },
54
43
  "dependencies": {
55
- "@pyreon/connector-document": "^0.11.5"
44
+ "@pyreon/connector-document": "^0.11.7"
56
45
  },
57
46
  "devDependencies": {
58
- "@pyreon/core": "^0.11.5",
59
- "@pyreon/elements": "^0.11.5",
60
- "@pyreon/rocketstyle": "^0.11.5",
61
- "@pyreon/styler": "^0.11.5",
62
- "@pyreon/ui-core": "^0.11.5",
63
- "@vitus-labs/tools-rolldown": "^1.15.4",
64
- "@pyreon/typescript": "^0.11.5"
47
+ "@pyreon/core": "^0.11.7",
48
+ "@pyreon/elements": "^0.11.7",
49
+ "@pyreon/rocketstyle": "^0.11.7",
50
+ "@pyreon/styler": "^0.11.7",
51
+ "@pyreon/test-utils": "^0.11.7",
52
+ "@pyreon/typescript": "^0.11.7",
53
+ "@pyreon/ui-core": "^0.11.7",
54
+ "@vitus-labs/tools-rolldown": "^1.15.4"
55
+ },
56
+ "peerDependencies": {
57
+ "@pyreon/core": "^0.11.7",
58
+ "@pyreon/document": "^0.11.7",
59
+ "@pyreon/elements": "^0.11.7",
60
+ "@pyreon/rocketstyle": "^0.11.7",
61
+ "@pyreon/styler": "^0.11.7",
62
+ "@pyreon/ui-core": "^0.11.7"
63
+ },
64
+ "engines": {
65
+ "node": ">= 22"
65
66
  }
66
67
  }
@@ -1,48 +1,48 @@
1
- import { Element } from "@pyreon/elements"
2
- import rocketstyle from "@pyreon/rocketstyle"
1
+ import { Element } from '@pyreon/elements'
2
+ import rocketstyle from '@pyreon/rocketstyle'
3
3
 
4
4
  const DocumentPreview = rocketstyle({
5
5
  dimensions: {
6
- sizes: "size",
6
+ sizes: 'size',
7
7
  },
8
8
  useBooleans: true,
9
- })({ name: "DocumentPreview", component: Element })
9
+ })({ name: 'DocumentPreview', component: Element })
10
10
  .theme({
11
- backgroundColor: "#f5f5f5",
11
+ backgroundColor: '#f5f5f5',
12
12
  padding: 40,
13
13
  })
14
14
  .sizes({
15
- A4: { width: "210mm", minHeight: "297mm" },
16
- A3: { width: "297mm", minHeight: "420mm" },
17
- A5: { width: "148mm", minHeight: "210mm" },
18
- letter: { width: "8.5in", minHeight: "11in" },
19
- legal: { width: "8.5in", minHeight: "14in" },
15
+ A4: { width: '210mm', minHeight: '297mm' },
16
+ A3: { width: '297mm', minHeight: '420mm' },
17
+ A5: { width: '148mm', minHeight: '210mm' },
18
+ letter: { width: '8.5in', minHeight: '11in' },
19
+ legal: { width: '8.5in', minHeight: '14in' },
20
20
  })
21
21
  .styles(
22
22
  (css: any) => css`
23
- display: flex;
24
- flex-direction: column;
25
- align-items: center;
26
- min-height: 100vh;
23
+ display: flex;
24
+ flex-direction: column;
25
+ align-items: center;
26
+ min-height: 100vh;
27
27
 
28
- & > * {
29
- background: white;
30
- padding: 25mm;
31
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
32
- margin: 20px 0;
33
- }
34
- `,
28
+ & > * {
29
+ background: white;
30
+ padding: 25mm;
31
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
32
+ margin: 20px 0;
33
+ }
34
+ `,
35
35
  )
36
- .statics({ _documentType: "document" as const })
36
+ .statics({ _documentType: 'document' as const })
37
37
  .attrs<{
38
38
  size?: string
39
39
  showPageBreaks?: boolean
40
40
  tag: string
41
41
  _documentProps: Record<string, unknown>
42
42
  }>((props) => ({
43
- tag: "div",
43
+ tag: 'div',
44
44
  _documentProps: {
45
- ...(props.size ? { size: props.size } : { size: "A4" }),
45
+ ...(props.size ? { size: props.size } : { size: 'A4' }),
46
46
  ...(props.showPageBreaks ? { showPageBreaks: props.showPageBreaks } : {}),
47
47
  },
48
48
  }))