@sheetxl/workbook-templates 0.1.0 → 0.1.2

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/README.md CHANGED
@@ -1,112 +1,120 @@
1
- # Workbook Templates
2
-
3
- ![SheetXL](https://www.sheetxl.com/logo-text.svg)
4
-
5
- [![License: CC0-1.0](https://img.shields.io/badge/license-CC0--1.0-blue.svg)](LICENSE)
6
- [![Discord](https://img.shields.io/discord/1141404921246257223)](https://discord.gg/NTKdwUgK9p)
7
-
8
- ## Overview
9
-
10
- The workbook templates that appear in the SheetXL **New Workbook** gallery. The repo is published to
11
- npm as [`@sheetxl/workbook-templates`](https://www.npmjs.com/package/@sheetxl/workbook-templates),
12
- and the SheetXL studio reads the catalog straight from unpkg:
13
-
14
- ```text
15
- https://unpkg.com/@sheetxl/workbook-templates/dist/workbook-templates/contents.json
16
- ```
17
-
18
- Every template is original content, dedicated to the public domain under [CC0 1.0](LICENSE). Use
19
- them however you like.
20
-
21
- ## Adding a template
22
-
23
- Drop an `.xlsx` into a category folder under `templates/` and open a pull request. That is all. CI
24
- validates the workbook, builds the index and publishes it.
25
-
26
- - **The file name is the title.** `yearly-calendar.xlsx` is shown as "Yearly Calendar". Use
27
- lowercase-kebab-case names.
28
- - **The folder is the category.** Use an existing folder, or create a new one. There is one level
29
- only; an `.xlsx` directly in `templates/` fails the build.
30
- - **Thumbnails come from CI.** You do not need to make one. CI opens each template in the pinned
31
- SheetXL studio (`render/`) and photographs its first screen. A hand-made `<name>.png` beside the
32
- template is used instead, for a template whose first screen is not its best.
33
-
34
- To check a template before you push, run `npm install` and `npm run build`. To see its thumbnail,
35
- run `npx playwright install chromium` once, then `npm run thumbnails` before the build; the images
36
- land in `.thumbnails/`.
37
-
38
- Templates must be your own work, or carry a license that allows redistribution under CC0. Do not
39
- submit Microsoft Office templates or close copies of them.
40
-
41
- ## Layout
42
-
43
- ```text
44
- templates/
45
- <category>/
46
- _category.json optional: { "title", "description", "order", "icon" }
47
- <name>.xlsx a template
48
- <name>.png optional hand-made thumbnail
49
- config/thumbnails.ts renders .thumbnails/<category>/<name>.webp for each template
50
- config/build.ts validates every template, then writes dist/
51
- render/ the page that renders one template for its thumbnail
52
- ```
53
-
54
- A category folder's `_category.json` sets its display title, description, sort `order` and icon.
55
- Without one, the title comes from the folder name ("project-management" becomes "Project
56
- Management"). Categories sort by `order`, then by title. Templates sort by title within a category.
57
-
58
- The build writes:
59
-
60
- ```text
61
- dist/contents.json root listing of every file and folder
62
- dist/workbook-templates/contents.json the catalog
63
- dist/workbook-templates/<category>/<name>.xlsx
64
- dist/workbook-templates/<category>/<name>.webp the rendered thumbnail, or a hand-made .png
65
- ```
66
-
67
- The catalog looks like this. Entry paths are relative to `dist/workbook-templates/`.
68
-
69
- ```jsonc
70
- {
71
- "kind": "templates",
72
- "package": "workbook-templates",
73
- "meta": {
74
- "schema": 1,
75
- "categories": [{ "id": "finance", "title": "Finance", "description": "..." }]
76
- },
77
- "entries": [
78
- { "path": "finance/loan-calculator.xlsx", "category": "finance", "title": "Loan Calculator" }
79
- ]
80
- }
81
- ```
82
-
83
- ## What the build checks
84
-
85
- Each `.xlsx` must open in the SheetXL SDK and fully recalculate with no `#NAME?` in any cell. The
86
- build also fails on a template that contains any of:
87
-
88
- - SheetXL script modules;
89
- - a VBA project;
90
- - links to other workbooks;
91
- - `WEBSERVICE`, `FILTERXML`, `IMPORTDATA` or another function that fetches from the network;
92
- - a hyperlink that is not `https:`;
93
- - more than 2 MB.
94
-
95
- Any other file in a category folder, besides `_category.json` and thumbnails, also fails the build.
96
-
97
- ## Publishing
98
-
99
- A push to `main` that changes `templates/` or `config/` builds the catalog, bumps the patch version,
100
- tags it, publishes to npm and creates a GitHub release. Put `[publish]` in the commit message to
101
- publish without a template change.
102
-
103
- ## Additional Resources
104
-
105
- - **[Main GitHub](https://github.com/sheetxl)**
106
- - **[Discord](https://discord.gg/NTKdwUgK9p)**
107
- - **[Website](https://www.sheetxl.com)**
108
- - **[Developer Docs](https://www.sheetxl.com/docs)**
109
-
110
- ## License
111
-
112
- The templates are dedicated to the public domain under [CC0 1.0 Universal](LICENSE).
1
+ # Workbook Templates
2
+
3
+ ![SheetXL](https://www.sheetxl.com/logo-text.svg)
4
+
5
+ [![License: CC0-1.0](https://img.shields.io/badge/license-CC0--1.0-blue.svg)](LICENSE)
6
+ [![Discord](https://img.shields.io/discord/1141404921246257223)](https://discord.gg/NTKdwUgK9p)
7
+
8
+ ## Overview
9
+
10
+ The workbook templates that appear in the SheetXL **New Workbook** gallery. The repo is published to
11
+ npm as [`@sheetxl/workbook-templates`](https://www.npmjs.com/package/@sheetxl/workbook-templates),
12
+ and the SheetXL studio reads the catalog straight from unpkg:
13
+
14
+ ```text
15
+ https://unpkg.com/@sheetxl/workbook-templates/dist/workbook-templates/contents.json
16
+ ```
17
+
18
+ Every template is original content, dedicated to the public domain under [CC0 1.0](LICENSE). Use
19
+ them however you like.
20
+
21
+ ## Adding a template
22
+
23
+ Drop an `.xlsx` into a category folder under `templates/` and open a pull request. That is all. CI
24
+ validates the workbook, builds the index and publishes it.
25
+
26
+ - **The file name is the title.** `yearly-calendar.xlsx` is shown as "Yearly Calendar". Use
27
+ lowercase-kebab-case names.
28
+ - **The folder is the category.** Use an existing folder, or create a new one. There is one level
29
+ only; an `.xlsx` directly in `templates/` fails the build.
30
+ - **Thumbnails come from CI.** You do not need to make one. CI opens each template in the pinned
31
+ SheetXL studio (`render/`) and photographs its first screen twice: once light, and once dark with
32
+ the dark grid on. The headers and the selection are left out. A hand-made `<name>.png` (or
33
+ `<name>.dark.png`) beside the template is used instead, for a template whose first screen is not
34
+ its best.
35
+
36
+ To check a template before you push, run `npm install` and `npm run build`. To see its thumbnails,
37
+ run `npx playwright install chromium` once, then `npm run thumbnails` before the build; the images
38
+ land in `.thumbnails/`.
39
+
40
+ Templates must be your own work, or carry a license that allows redistribution under CC0. Do not
41
+ submit Microsoft Office templates or close copies of them.
42
+
43
+ ## Layout
44
+
45
+ ```text
46
+ templates/
47
+ <category>/
48
+ _category.json optional: { "title", "description", "order", "icon" }
49
+ <name>.xlsx a template
50
+ <name>.png optional hand-made thumbnail
51
+ <name>.dark.png optional hand-made dark thumbnail
52
+ config/thumbnails.ts renders .thumbnails/<category>/<name>[.dark].webp for each template
53
+ config/build.ts validates every template, then writes dist/
54
+ render/ the page that renders one template for its thumbnail
55
+ ```
56
+
57
+ A category folder's `_category.json` sets its display title, description, sort `order` and icon.
58
+ Without one, the title comes from the folder name ("project-management" becomes "Project
59
+ Management"). Categories sort by `order`, then by title. Templates sort by title within a category.
60
+
61
+ The build writes:
62
+
63
+ ```text
64
+ dist/contents.json root listing of every file and folder
65
+ dist/workbook-templates/contents.json the catalog
66
+ dist/workbook-templates/<category>/<name>.xlsx
67
+ dist/workbook-templates/<category>/<name>.webp the rendered thumbnail, or a hand-made .png
68
+ dist/workbook-templates/<category>/<name>.dark.webp the same on the dark grid
69
+ ```
70
+
71
+ The catalog looks like this. Entry paths are relative to `dist/workbook-templates/`.
72
+
73
+ ```jsonc
74
+ {
75
+ "kind": "templates",
76
+ "package": "workbook-templates",
77
+ "meta": {
78
+ "schema": 1,
79
+ "categories": [{ "id": "finance", "title": "Finance", "description": "..." }]
80
+ },
81
+ "entries": [
82
+ {
83
+ "path": "finance/loan-calculator.xlsx", "category": "finance", "title": "Loan Calculator",
84
+ "thumbnail": "finance/loan-calculator.webp", "thumbnailDark": "finance/loan-calculator.dark.webp"
85
+ }
86
+ ]
87
+ }
88
+ ```
89
+
90
+ ## What the build checks
91
+
92
+ Each `.xlsx` must open in the SheetXL SDK and fully recalculate with no `#NAME?` in any cell. The
93
+ build also fails on a template that contains any of:
94
+
95
+ - SheetXL script modules;
96
+ - a VBA project;
97
+ - links to other workbooks;
98
+ - `WEBSERVICE`, `FILTERXML`, `IMPORTDATA` or another function that fetches from the network;
99
+ - a hyperlink that is not `https:`;
100
+ - more than 2 MB.
101
+
102
+ Any other file in a category folder, besides `_category.json` and thumbnails, also fails the build.
103
+
104
+ ## Publishing
105
+
106
+ A push to `main` that changes `templates/` or `config/` builds the catalog, bumps the patch version,
107
+ tags it, publishes to npm and creates a GitHub release. To publish without a template change, run
108
+ the workflow from the Actions tab (**Run workflow**), or put `[publish]` in the message of a commit
109
+ that changes `render/`, `package.json` or the workflow.
110
+
111
+ ## Additional Resources
112
+
113
+ - **[Main GitHub](https://github.com/sheetxl)**
114
+ - **[Discord](https://discord.gg/NTKdwUgK9p)**
115
+ - **[Website](https://www.sheetxl.com)**
116
+ - **[Developer Docs](https://www.sheetxl.com/docs)**
117
+
118
+ ## License
119
+
120
+ The templates are dedicated to the public domain under [CC0 1.0 Universal](LICENSE).
@@ -3,24 +3,36 @@
3
3
  {
4
4
  "path": "workbook-templates/contents.json"
5
5
  },
6
+ {
7
+ "path": "workbook-templates/finance/loan-calculator.dark.webp"
8
+ },
6
9
  {
7
10
  "path": "workbook-templates/finance/loan-calculator.webp"
8
11
  },
9
12
  {
10
13
  "path": "workbook-templates/finance/loan-calculator.xlsx"
11
14
  },
15
+ {
16
+ "path": "workbook-templates/finance/monthly-budget.dark.webp"
17
+ },
12
18
  {
13
19
  "path": "workbook-templates/finance/monthly-budget.webp"
14
20
  },
15
21
  {
16
22
  "path": "workbook-templates/finance/monthly-budget.xlsx"
17
23
  },
24
+ {
25
+ "path": "workbook-templates/lifestyle/habit-tracker.dark.webp"
26
+ },
18
27
  {
19
28
  "path": "workbook-templates/lifestyle/habit-tracker.webp"
20
29
  },
21
30
  {
22
31
  "path": "workbook-templates/lifestyle/habit-tracker.xlsx"
23
32
  },
33
+ {
34
+ "path": "workbook-templates/project-management/simple-task-list.dark.webp"
35
+ },
24
36
  {
25
37
  "path": "workbook-templates/project-management/simple-task-list.webp"
26
38
  },
@@ -26,25 +26,29 @@
26
26
  "path": "finance/loan-calculator.xlsx",
27
27
  "category": "finance",
28
28
  "title": "Loan Calculator",
29
- "thumbnail": "finance/loan-calculator.webp"
29
+ "thumbnail": "finance/loan-calculator.webp",
30
+ "thumbnailDark": "finance/loan-calculator.dark.webp"
30
31
  },
31
32
  {
32
33
  "path": "finance/monthly-budget.xlsx",
33
34
  "category": "finance",
34
35
  "title": "Monthly Budget",
35
- "thumbnail": "finance/monthly-budget.webp"
36
+ "thumbnail": "finance/monthly-budget.webp",
37
+ "thumbnailDark": "finance/monthly-budget.dark.webp"
36
38
  },
37
39
  {
38
40
  "path": "lifestyle/habit-tracker.xlsx",
39
41
  "category": "lifestyle",
40
42
  "title": "Habit Tracker",
41
- "thumbnail": "lifestyle/habit-tracker.webp"
43
+ "thumbnail": "lifestyle/habit-tracker.webp",
44
+ "thumbnailDark": "lifestyle/habit-tracker.dark.webp"
42
45
  },
43
46
  {
44
47
  "path": "project-management/simple-task-list.xlsx",
45
48
  "category": "project-management",
46
49
  "title": "Simple Task List",
47
- "thumbnail": "project-management/simple-task-list.webp"
50
+ "thumbnail": "project-management/simple-task-list.webp",
51
+ "thumbnailDark": "project-management/simple-task-list.dark.webp"
48
52
  }
49
53
  ]
50
54
  }
package/package.json CHANGED
@@ -1,64 +1,64 @@
1
- {
2
- "name": "@sheetxl/workbook-templates",
3
- "version": "0.1.0",
4
- "description": "Workbook templates for the SheetXL New Workbook gallery",
5
- "type": "module",
6
- "main": "dist/workbook-templates/contents.json",
7
- "files": [
8
- "dist/**/*"
9
- ],
10
- "scripts": {
11
- "build": "ts-node config/build.ts",
12
- "thumbnails": "ts-node config/thumbnails.ts",
13
- "prebuild": "npm run clean",
14
- "clean": "ts-node config/clean.ts",
15
- "typecheck": "tsc -p .",
16
- "prepare": "npm run build"
17
- },
18
- "keywords": [
19
- "sheetxl",
20
- "templates",
21
- "spreadsheet",
22
- "workbook",
23
- "xlsx"
24
- ],
25
- "author": "SheetXL Team",
26
- "license": "CC0-1.0",
27
- "repository": {
28
- "type": "git",
29
- "url": "git+https://github.com/sheetxl/workbook-templates.git"
30
- },
31
- "bugs": {
32
- "url": "https://github.com/sheetxl/workbook-templates/issues"
33
- },
34
- "homepage": "https://github.com/sheetxl/workbook-templates#readme",
35
- "publishConfig": {
36
- "access": "public"
37
- },
38
- "devDependencies": {
39
- "@emotion/cache": "^11.14.0",
40
- "@emotion/react": "^11.14.0",
41
- "@emotion/styled": "^11.14.1",
42
- "@mui/material": "^9.4.0",
43
- "@mui/styled-engine": "^9.4.0",
44
- "@mui/system": "^9.4.0",
45
- "@mui/utils": "^9.4.0",
46
- "@sheetxl/io": "0.8.0-beta.1",
47
- "@sheetxl/sdk": "0.8.0-beta.1",
48
- "@sheetxl/studio-mui": "0.8.0-beta.1",
49
- "@types/node": "^24.3.0",
50
- "@types/react": "^19.3.0",
51
- "@types/react-dom": "^19.3.0",
52
- "@vitejs/plugin-react": "^6.1.1",
53
- "playwright": "1.63.0",
54
- "react": "^19.3.0",
55
- "react-dom": "^19.3.0",
56
- "sharp": "^0.34.5",
57
- "ts-node": "^10.9.1",
58
- "typescript": "^5.0.0",
59
- "vite": "^8.3.0"
60
- },
61
- "engines": {
62
- "node": ">=22"
63
- }
64
- }
1
+ {
2
+ "name": "@sheetxl/workbook-templates",
3
+ "version": "0.1.2",
4
+ "description": "Workbook templates for the SheetXL New Workbook gallery",
5
+ "type": "module",
6
+ "main": "dist/workbook-templates/contents.json",
7
+ "files": [
8
+ "dist/**/*"
9
+ ],
10
+ "scripts": {
11
+ "build": "ts-node config/build.ts",
12
+ "thumbnails": "ts-node config/thumbnails.ts",
13
+ "prebuild": "npm run clean",
14
+ "clean": "ts-node config/clean.ts",
15
+ "typecheck": "tsc -p .",
16
+ "prepare": "npm run build"
17
+ },
18
+ "keywords": [
19
+ "sheetxl",
20
+ "templates",
21
+ "spreadsheet",
22
+ "workbook",
23
+ "xlsx"
24
+ ],
25
+ "author": "SheetXL Team",
26
+ "license": "CC0-1.0",
27
+ "repository": {
28
+ "type": "git",
29
+ "url": "git+https://github.com/sheetxl/workbook-templates.git"
30
+ },
31
+ "bugs": {
32
+ "url": "https://github.com/sheetxl/workbook-templates/issues"
33
+ },
34
+ "homepage": "https://github.com/sheetxl/workbook-templates#readme",
35
+ "publishConfig": {
36
+ "access": "public"
37
+ },
38
+ "devDependencies": {
39
+ "@emotion/cache": "^11.14.0",
40
+ "@emotion/react": "^11.14.0",
41
+ "@emotion/styled": "^11.14.1",
42
+ "@mui/material": "^9.4.0",
43
+ "@mui/styled-engine": "^9.4.0",
44
+ "@mui/system": "^9.4.0",
45
+ "@mui/utils": "^9.4.0",
46
+ "@sheetxl/io": "0.8.0-beta.1",
47
+ "@sheetxl/sdk": "0.8.0-beta.1",
48
+ "@sheetxl/studio-mui": "0.8.0-beta.1",
49
+ "@types/node": "^24.3.0",
50
+ "@types/react": "^19.3.0",
51
+ "@types/react-dom": "^19.3.0",
52
+ "@vitejs/plugin-react": "^6.1.1",
53
+ "playwright": "1.63.0",
54
+ "react": "^19.3.0",
55
+ "react-dom": "^19.3.0",
56
+ "sharp": "^0.34.5",
57
+ "ts-node": "^10.9.1",
58
+ "typescript": "^5.0.0",
59
+ "vite": "^8.3.0"
60
+ },
61
+ "engines": {
62
+ "node": ">=22"
63
+ }
64
+ }