@sheetxl/workbook-templates 0.1.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.
package/LICENSE ADDED
@@ -0,0 +1,116 @@
1
+ CC0 1.0 Universal
2
+
3
+ Statement of Purpose
4
+
5
+ The laws of most jurisdictions throughout the world automatically confer
6
+ exclusive Copyright and Related Rights (defined below) upon the creator and
7
+ subsequent owner(s) (each and all, an "owner") of an original work of
8
+ authorship and/or a database (each, a "Work").
9
+
10
+ Certain owners wish to permanently relinquish those rights to a Work for the
11
+ purpose of contributing to a commons of creative, cultural and scientific
12
+ works ("Commons") that the public can reliably and without fear of later
13
+ claims of infringement build upon, modify, incorporate in other works, reuse
14
+ and redistribute as freely as possible in any form whatsoever and for any
15
+ purposes, including without limitation commercial purposes. These owners may
16
+ contribute to the Commons to promote the ideal of a free culture and the
17
+ further production of creative, cultural and scientific works, or to gain
18
+ reputation or greater distribution for their Work in part through the use and
19
+ efforts of others.
20
+
21
+ For these and/or other purposes and motivations, and without any expectation
22
+ of additional consideration or compensation, the person associating CC0 with a
23
+ Work (the "Affirmer"), to the extent that he or she is an owner of Copyright
24
+ and Related Rights in the Work, voluntarily elects to apply CC0 to the Work
25
+ and publicly distribute the Work under its terms, with knowledge of his or her
26
+ Copyright and Related Rights in the Work and the meaning and intended legal
27
+ effect of CC0 on those rights.
28
+
29
+ 1. Copyright and Related Rights. A Work made available under CC0 may be
30
+ protected by copyright and related or neighboring rights ("Copyright and
31
+ Related Rights"). Copyright and Related Rights include, but are not limited
32
+ to, the following:
33
+
34
+ i. the right to reproduce, adapt, distribute, perform, display, communicate,
35
+ and translate a Work;
36
+
37
+ ii. moral rights retained by the original author(s) and/or performer(s);
38
+
39
+ iii. publicity and privacy rights pertaining to a person's image or likeness
40
+ depicted in a Work;
41
+
42
+ iv. rights protecting against unfair competition in regards to a Work,
43
+ subject to the limitations in paragraph 4(a), below;
44
+
45
+ v. rights protecting the extraction, dissemination, use and reuse of data in
46
+ a Work;
47
+
48
+ vi. database rights (such as those arising under Directive 96/9/EC of the
49
+ European Parliament and of the Council of 11 March 1996 on the legal
50
+ protection of databases, and under any national implementation thereof,
51
+ including any amended or successor version of such directive); and
52
+
53
+ vii. other similar, equivalent or corresponding rights throughout the world
54
+ based on applicable law or treaty, and any national implementations thereof.
55
+
56
+ 2. Waiver. To the greatest extent permitted by, but not in contravention of,
57
+ applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and
58
+ unconditionally waives, abandons, and surrenders all of Affirmer's Copyright
59
+ and Related Rights and associated claims and causes of action, whether now
60
+ known or unknown (including existing as well as future claims and causes of
61
+ action), in the Work (i) in all territories worldwide, (ii) for the maximum
62
+ duration provided by applicable law or treaty (including future time
63
+ extensions), (iii) in any current or future medium and for any number of
64
+ copies, and (iv) for any purpose whatsoever, including without limitation
65
+ commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes
66
+ the Waiver for the benefit of each member of the public at large and to the
67
+ detriment of Affirmer's heirs and successors, fully intending that such Waiver
68
+ shall not be subject to revocation, rescission, cancellation, termination, or
69
+ any other legal or equitable action to disrupt the quiet enjoyment of the Work
70
+ by the public as contemplated by Affirmer's express Statement of Purpose.
71
+
72
+ 3. Public License Fallback. Should any part of the Waiver for any reason be
73
+ judged legally invalid or ineffective under applicable law, then the Waiver
74
+ shall be preserved to the maximum extent permitted taking into account
75
+ Affirmer's express Statement of Purpose. In addition, to the extent the Waiver
76
+ is so judged Affirmer hereby grants to each affected person a royalty-free,
77
+ non transferable, non sublicensable, non exclusive, irrevocable and
78
+ unconditional license to exercise Affirmer's Copyright and Related Rights in
79
+ the Work (i) in all territories worldwide, (ii) for the maximum duration
80
+ provided by applicable law or treaty (including future time extensions), (iii)
81
+ in any current or future medium and for any number of copies, and (iv) for any
82
+ purpose whatsoever, including without limitation commercial, advertising or
83
+ promotional purposes (the "License"). The License shall be deemed effective as
84
+ of the date CC0 was applied by Affirmer to the Work. Should any part of the
85
+ License for any reason be judged legally invalid or ineffective under
86
+ applicable law, such partial invalidity or ineffectiveness shall not
87
+ invalidate the remainder of the License, and in such case Affirmer hereby
88
+ affirms that he or she will not (i) exercise any of his or her remaining
89
+ Copyright and Related Rights in the Work or (ii) assert any associated claims
90
+ and causes of action with respect to the Work, in either case contrary to
91
+ Affirmer's express Statement of Purpose.
92
+
93
+ 4. Limitations and Disclaimers.
94
+
95
+ a. No trademark or patent rights held by Affirmer are waived, abandoned,
96
+ surrendered, licensed or otherwise affected by this document.
97
+
98
+ b. Affirmer offers the Work as-is and makes no representations or warranties
99
+ of any kind concerning the Work, express, implied, statutory or otherwise,
100
+ including without limitation warranties of title, merchantability, fitness
101
+ for a particular purpose, non infringement, or the absence of latent or
102
+ other defects, accuracy, or the present or absence of errors, whether or not
103
+ discoverable, all to the greatest extent permissible under applicable law.
104
+
105
+ c. Affirmer disclaims responsibility for clearing rights of other persons
106
+ that may apply to the Work or any use thereof, including without limitation
107
+ any person's Copyright and Related Rights in the Work. Further, Affirmer
108
+ disclaims responsibility for obtaining any necessary consents, permissions
109
+ or other rights required for any use of the Work.
110
+
111
+ d. Affirmer understands and acknowledges that Creative Commons is not a
112
+ party to this document and has no duty or obligation with respect to this
113
+ CC0 or use of the Work.
114
+
115
+ For more information, please see
116
+ <http://creativecommons.org/publicdomain/zero/1.0/>
package/README.md ADDED
@@ -0,0 +1,112 @@
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).
@@ -0,0 +1,37 @@
1
+ {
2
+ "entries": [
3
+ {
4
+ "path": "workbook-templates/contents.json"
5
+ },
6
+ {
7
+ "path": "workbook-templates/finance/loan-calculator.webp"
8
+ },
9
+ {
10
+ "path": "workbook-templates/finance/loan-calculator.xlsx"
11
+ },
12
+ {
13
+ "path": "workbook-templates/finance/monthly-budget.webp"
14
+ },
15
+ {
16
+ "path": "workbook-templates/finance/monthly-budget.xlsx"
17
+ },
18
+ {
19
+ "path": "workbook-templates/lifestyle/habit-tracker.webp"
20
+ },
21
+ {
22
+ "path": "workbook-templates/lifestyle/habit-tracker.xlsx"
23
+ },
24
+ {
25
+ "path": "workbook-templates/project-management/simple-task-list.webp"
26
+ },
27
+ {
28
+ "path": "workbook-templates/project-management/simple-task-list.xlsx"
29
+ }
30
+ ],
31
+ "folders": [
32
+ "workbook-templates",
33
+ "workbook-templates/finance",
34
+ "workbook-templates/lifestyle",
35
+ "workbook-templates/project-management"
36
+ ]
37
+ }
@@ -0,0 +1,50 @@
1
+ {
2
+ "kind": "templates",
3
+ "package": "workbook-templates",
4
+ "meta": {
5
+ "schema": 1,
6
+ "categories": [
7
+ {
8
+ "id": "finance",
9
+ "title": "Finance",
10
+ "description": "Budgets, loans and other money math."
11
+ },
12
+ {
13
+ "id": "lifestyle",
14
+ "title": "Lifestyle",
15
+ "description": "Everyday planning and personal tracking."
16
+ },
17
+ {
18
+ "id": "project-management",
19
+ "title": "Project Management",
20
+ "description": "Plan work and keep track of who is doing what."
21
+ }
22
+ ]
23
+ },
24
+ "entries": [
25
+ {
26
+ "path": "finance/loan-calculator.xlsx",
27
+ "category": "finance",
28
+ "title": "Loan Calculator",
29
+ "thumbnail": "finance/loan-calculator.webp"
30
+ },
31
+ {
32
+ "path": "finance/monthly-budget.xlsx",
33
+ "category": "finance",
34
+ "title": "Monthly Budget",
35
+ "thumbnail": "finance/monthly-budget.webp"
36
+ },
37
+ {
38
+ "path": "lifestyle/habit-tracker.xlsx",
39
+ "category": "lifestyle",
40
+ "title": "Habit Tracker",
41
+ "thumbnail": "lifestyle/habit-tracker.webp"
42
+ },
43
+ {
44
+ "path": "project-management/simple-task-list.xlsx",
45
+ "category": "project-management",
46
+ "title": "Simple Task List",
47
+ "thumbnail": "project-management/simple-task-list.webp"
48
+ }
49
+ ]
50
+ }
package/package.json ADDED
@@ -0,0 +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
+ }