@mccaskie-labs/workbench-library 0.0.0-stage → 0.2.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/dist/words.js ADDED
@@ -0,0 +1,128 @@
1
+ // What the library's pages say, keyed as the project's strings catalogue
2
+ // keys them (`ui.wblibrary.*`), in English, Tagalog and Taglish. A project
3
+ // copies them into its catalogue (or keeps its own) and passes its `t`; a
4
+ // word the catalogue lacks falls back to the English here. The Tagalog and
5
+ // Taglish are starter words: have a fluent reader check them before a client
6
+ // sees them.
7
+ export const LIBRARY_WORD_KEYS = [
8
+ "items_done",
9
+ "preview",
10
+ "opens_on",
11
+ "minutes",
12
+ "episode",
13
+ "start",
14
+ "mark_done",
15
+ "done",
16
+ "next",
17
+ "previous",
18
+ "download",
19
+ "audio_fallback",
20
+ "embed_title",
21
+ "sponsor_label",
22
+ "sign_in",
23
+ "plan",
24
+ "buy",
25
+ "buy_no_price",
26
+ "not_started",
27
+ "opens_later",
28
+ "action_sign_in",
29
+ "action_buy",
30
+ "action_plan",
31
+ "mine_title",
32
+ "mine_empty",
33
+ "started",
34
+ "bought",
35
+ "bought_until",
36
+ ];
37
+ const en = {
38
+ items_done: "{done} of {total} done",
39
+ preview: "Free preview",
40
+ opens_on: "Opens on {date}",
41
+ minutes: "{minutes} min",
42
+ episode: "Episode {n}",
43
+ start: "Start the course",
44
+ mark_done: "Mark as done",
45
+ done: "Done",
46
+ next: "Next: {title}",
47
+ previous: "Back: {title}",
48
+ download: "Download {name} ({size})",
49
+ audio_fallback: "Your browser can't play this here.",
50
+ embed_title: "Video: {title}",
51
+ sponsor_label: "Sponsor",
52
+ sign_in: "Sign in to see this.",
53
+ plan: "This is part of a members' plan.",
54
+ buy: "Buy this for {price} to see it.",
55
+ buy_no_price: "This is for people who've bought it.",
56
+ not_started: "Start the course to open this lesson.",
57
+ opens_later: "This opens on {date}.",
58
+ action_sign_in: "Sign in",
59
+ action_buy: "Buy now",
60
+ action_plan: "See the plans",
61
+ mine_title: "Your courses and shows",
62
+ mine_empty: "Nothing here yet.",
63
+ started: "Started {date}",
64
+ bought: "Bought {date}",
65
+ bought_until: "Bought {date}, yours until {until}",
66
+ };
67
+ const tl = {
68
+ items_done: "{done} sa {total} ang tapos na",
69
+ preview: "Libreng silip",
70
+ opens_on: "Bubukas sa {date}",
71
+ minutes: "{minutes} min",
72
+ episode: "Episode {n}",
73
+ start: "Simulan ang kurso",
74
+ mark_done: "Markahang tapos",
75
+ done: "Tapos na",
76
+ next: "Susunod: {title}",
77
+ previous: "Bumalik: {title}",
78
+ download: "I-download ang {name} ({size})",
79
+ audio_fallback: "Hindi ito ma-play ng browser mo rito.",
80
+ embed_title: "Video: {title}",
81
+ sponsor_label: "Sponsor",
82
+ sign_in: "Mag-sign in para makita ito.",
83
+ plan: "Bahagi ito ng plano para sa mga miyembro.",
84
+ buy: "Bilhin ito sa halagang {price} para makita.",
85
+ buy_no_price: "Para ito sa mga bumili.",
86
+ not_started: "Simulan ang kurso para mabuksan ang araling ito.",
87
+ opens_later: "Bubukas ito sa {date}.",
88
+ action_sign_in: "Mag-sign in",
89
+ action_buy: "Bilhin ngayon",
90
+ action_plan: "Tingnan ang mga plano",
91
+ mine_title: "Ang iyong mga kurso at palabas",
92
+ mine_empty: "Wala pa rito.",
93
+ started: "Sinimulan noong {date}",
94
+ bought: "Binili noong {date}",
95
+ bought_until: "Binili noong {date}, sa iyo hanggang {until}",
96
+ };
97
+ const taglish = {
98
+ items_done: "{done} of {total} tapos na",
99
+ preview: "Free preview",
100
+ opens_on: "Mag-o-open sa {date}",
101
+ minutes: "{minutes} min",
102
+ episode: "Episode {n}",
103
+ start: "I-start ang course",
104
+ mark_done: "Mark as done",
105
+ done: "Done na",
106
+ next: "Next: {title}",
107
+ previous: "Back: {title}",
108
+ download: "I-download ang {name} ({size})",
109
+ audio_fallback: "Hindi ma-play ng browser mo ito dito.",
110
+ embed_title: "Video: {title}",
111
+ sponsor_label: "Sponsor",
112
+ sign_in: "Mag-sign in ka para makita ito.",
113
+ plan: "Part ito ng members' plan.",
114
+ buy: "Bilhin ito for {price} para makita.",
115
+ buy_no_price: "Para ito sa mga nakabili na.",
116
+ not_started: "I-start mo muna ang course para ma-open ang lesson na ito.",
117
+ opens_later: "Mag-o-open ito sa {date}.",
118
+ action_sign_in: "Sign in",
119
+ action_buy: "Buy now",
120
+ action_plan: "Tingnan ang plans",
121
+ mine_title: "Your courses and shows",
122
+ mine_empty: "Wala pa dito.",
123
+ started: "Sinimulan {date}",
124
+ bought: "Binili {date}",
125
+ bought_until: "Binili {date}, sa iyo until {until}",
126
+ };
127
+ /** The words by language, as `ui.wblibrary.<key>` would hold them. */
128
+ export const LIBRARY_WORDS = { en, tl, taglish };
package/package.json CHANGED
@@ -1,6 +1,54 @@
1
1
  {
2
2
  "name": "@mccaskie-labs/workbench-library",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.2.0",
4
+ "description": "Courses, shows and member content for Workbench apps: lessons and episodes with words, embedded videos and files in the app's own R2 bucket, shown to everyone, signed-in members, a plan feature or buyers, with dripped lessons, scheduled items, signed file links and a podcast feed.",
5
+ "license": "UNLICENSED",
6
+ "type": "module",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/mccaskie-labs/workbench.git",
10
+ "directory": "packages/library"
11
+ },
12
+ "engines": {
13
+ "node": ">=24"
14
+ },
15
+ "sideEffects": false,
16
+ "exports": {
17
+ ".": {
18
+ "types": "./dist/index.d.ts",
19
+ "default": "./dist/index.js"
20
+ },
21
+ "./ui": {
22
+ "types": "./dist/ui.d.ts",
23
+ "default": "./dist/ui.js"
24
+ },
25
+ "./styles": {
26
+ "types": "./dist/styles.d.ts",
27
+ "default": "./dist/styles.js"
28
+ },
29
+ "./package.json": "./package.json"
30
+ },
31
+ "bin": {
32
+ "workbench-library": "./dist/cli.js"
33
+ },
34
+ "files": [
35
+ "dist",
36
+ "README.md",
37
+ "CHANGELOG.md"
38
+ ],
39
+ "publishConfig": {
40
+ "access": "public"
41
+ },
42
+ "scripts": {
43
+ "typecheck": "tsc -p tsconfig.check.json && tsc -p test/tsconfig.json",
44
+ "test": "vitest run",
45
+ "test:store": "vitest run --config vitest.db.config.ts",
46
+ "build": "node scripts/build.mjs",
47
+ "prepack": "node scripts/build.mjs"
48
+ },
49
+ "devDependencies": {
50
+ "@types/node": "24.19.2",
51
+ "postgres": "4.1.0",
52
+ "vitest": "^5.1.0"
53
+ }
54
+ }