@workingdevshero/olympia-ait-adapter 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.
Files changed (51) hide show
  1. package/README.md +208 -0
  2. package/dist/index.d.ts +5 -0
  3. package/dist/index.d.ts.map +1 -0
  4. package/dist/index.js +8 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/reader/parse-day-sheet.d.ts +10 -0
  7. package/dist/reader/parse-day-sheet.d.ts.map +1 -0
  8. package/dist/reader/parse-day-sheet.js +199 -0
  9. package/dist/reader/parse-day-sheet.js.map +1 -0
  10. package/dist/reader/parse-workbook.d.ts +3 -0
  11. package/dist/reader/parse-workbook.d.ts.map +1 -0
  12. package/dist/reader/parse-workbook.js +55 -0
  13. package/dist/reader/parse-workbook.js.map +1 -0
  14. package/dist/schema/program.d.ts +692 -0
  15. package/dist/schema/program.d.ts.map +1 -0
  16. package/dist/schema/program.js +125 -0
  17. package/dist/schema/program.js.map +1 -0
  18. package/dist/server.d.ts +4 -0
  19. package/dist/server.d.ts.map +1 -0
  20. package/dist/server.js +58 -0
  21. package/dist/server.js.map +1 -0
  22. package/dist/tools/json-to-xlsx.d.ts +3 -0
  23. package/dist/tools/json-to-xlsx.d.ts.map +1 -0
  24. package/dist/tools/json-to-xlsx.js +5 -0
  25. package/dist/tools/json-to-xlsx.js.map +1 -0
  26. package/dist/tools/xlsx-to-json.d.ts +3 -0
  27. package/dist/tools/xlsx-to-json.d.ts.map +1 -0
  28. package/dist/tools/xlsx-to-json.js +5 -0
  29. package/dist/tools/xlsx-to-json.js.map +1 -0
  30. package/dist/writer/build-workbook.d.ts +3 -0
  31. package/dist/writer/build-workbook.d.ts.map +1 -0
  32. package/dist/writer/build-workbook.js +166 -0
  33. package/dist/writer/build-workbook.js.map +1 -0
  34. package/dist/writer/layout.d.ts +21 -0
  35. package/dist/writer/layout.d.ts.map +1 -0
  36. package/dist/writer/layout.js +40 -0
  37. package/dist/writer/layout.js.map +1 -0
  38. package/dist/writer/stamp-exercise.d.ts +31 -0
  39. package/dist/writer/stamp-exercise.d.ts.map +1 -0
  40. package/dist/writer/stamp-exercise.js +80 -0
  41. package/dist/writer/stamp-exercise.js.map +1 -0
  42. package/dist/writer/styles.d.ts +59 -0
  43. package/dist/writer/styles.d.ts.map +1 -0
  44. package/dist/writer/styles.js +266 -0
  45. package/dist/writer/styles.js.map +1 -0
  46. package/dist/writer/supplemental-template.d.ts +23 -0
  47. package/dist/writer/supplemental-template.d.ts.map +1 -0
  48. package/dist/writer/supplemental-template.js +112 -0
  49. package/dist/writer/supplemental-template.js.map +1 -0
  50. package/package.json +42 -0
  51. package/src/assets/olympia-logo.png +0 -0
@@ -0,0 +1,59 @@
1
+ import type ExcelJS from "exceljs";
2
+ type Style = Partial<ExcelJS.Style>;
3
+ export declare const FILL_GRAY: ExcelJS.Fill;
4
+ export declare const FILL_NONE: ExcelJS.Fill;
5
+ export declare const DATE_LABEL: Style;
6
+ export declare const NOTES_HEADER: Style;
7
+ export declare const SECTION_LABEL: Style;
8
+ export declare const WARMUP_DAY: Style;
9
+ export declare const WARMUP_DAY_LAST: Style;
10
+ export declare const EXERCISE_HEADER: Style;
11
+ export declare const REPS_HEADER: Style;
12
+ export declare const WEIGHT_HEADER: Style;
13
+ export declare const NOTES_HEADER_CELL: Style;
14
+ export declare function headerPadAboveStyle(col: "C" | "reps" | "weight"): Style;
15
+ export declare function headerPadBelowStyle(col: "C" | "reps" | "weight"): Style;
16
+ export type CTopBorder = "medium" | "hair" | "none";
17
+ export type CBottomBorder = "medium" | "none";
18
+ /**
19
+ * Style for the merged exercise-name cell in column C.
20
+ * The top border varies by position:
21
+ * - `medium` for the first exercise of a section OR the first exercise of
22
+ * a new group number (different from previous block).
23
+ * - `hair` for subsequent exercises within the same group number (1A→1B).
24
+ * - `none` is unused in practice (kept for future flexibility).
25
+ * No bottom border: the gray bar continues uninterrupted into the group
26
+ * label row directly below.
27
+ */
28
+ export declare function exerciseNameStyle(topBorder: CTopBorder): Style;
29
+ /**
30
+ * Style for the group-label cell in column C (the bottom row of an exercise
31
+ * block). The bottom border varies by position:
32
+ * - `medium` only on the very last exercise of a section.
33
+ * - `none` everywhere else; the visual separator to the next block is
34
+ * provided by THAT block's top border (medium or hair).
35
+ */
36
+ export declare function groupLabelStyle(bottomBorder: CBottomBorder): Style;
37
+ export declare function weekRepsCellStyle(opts: {
38
+ isTop: boolean;
39
+ isBottom: boolean;
40
+ }): Style;
41
+ export declare function weekWeightCellStyle(opts: {
42
+ isTop: boolean;
43
+ isBottom: boolean;
44
+ }): Style;
45
+ export declare const NOTES_CELL: Style;
46
+ export declare const TPL_C_GRAY: Style;
47
+ export declare const TPL_C_GRAY_BOTTOM: Style;
48
+ export declare const TPL_BOX_TOP_LEFT: Style;
49
+ export declare const TPL_BOX_TOP_RIGHT: Style;
50
+ export declare const TPL_BOX_BOTTOM_LEFT: Style;
51
+ export declare const TPL_BOX_BOTTOM_RIGHT: Style;
52
+ export declare const TPL_ROW_LEFT: Style;
53
+ export declare const TPL_ROW_RIGHT: Style;
54
+ export declare const TPL_ROW_LEFT_BOTTOM: Style;
55
+ export declare const TPL_ROW_RIGHT_BOTTOM: Style;
56
+ export declare const TPL_NOTES_LEFT: Style;
57
+ export declare const TPL_NOTES_LEFT_BOTTOM: Style;
58
+ export {};
59
+ //# sourceMappingURL=styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/writer/styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AAInC,KAAK,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAiBpC,eAAO,MAAM,SAAS,EAAE,OAAO,CAAC,IAK/B,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,OAAO,CAAC,IAG/B,CAAC;AAOF,eAAO,MAAM,UAAU,EAAE,KAKxB,CAAC;AAEF,eAAO,MAAM,YAA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AO,MAAM,iBAAiB,EAAE,KAI/B,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,KAIjC,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,KAIlC,CAAC;AAGF,eAAO,MAAM,YAAY,EAAE,KAI1B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAI3B,CAAC;AAGF,eAAO,MAAM,mBAAmB,EAAE,KAIjC,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,KAIlC,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAI5B,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,KAInC,CAAC"}
@@ -0,0 +1,266 @@
1
+ // ExcelJS's TypeScript declarations don't expose `indexed` colors even though
2
+ // the runtime accepts them. Cast through to keep parity with the source files
3
+ // (which use indexed colors throughout).
4
+ const BLACK = { argb: "FF000000" };
5
+ const SYS_AUTO = { indexed: 64 };
6
+ const GRAY_FILL = { indexed: 22 };
7
+ const GROUP_LABEL_COLOR = { indexed: 48 };
8
+ const SYS_BG = { indexed: 64 };
9
+ const FONT_BASE = {
10
+ name: "Arial",
11
+ family: 2,
12
+ size: 10,
13
+ };
14
+ export const FILL_GRAY = {
15
+ type: "pattern",
16
+ pattern: "solid",
17
+ fgColor: GRAY_FILL,
18
+ bgColor: SYS_BG,
19
+ };
20
+ export const FILL_NONE = {
21
+ type: "pattern",
22
+ pattern: "none",
23
+ };
24
+ const MEDIUM = { style: "medium", color: SYS_AUTO };
25
+ const MEDIUM_BLACK = { style: "medium", color: BLACK };
26
+ const THIN = { style: "thin", color: SYS_AUTO };
27
+ const HAIR = { style: "hair", color: SYS_AUTO };
28
+ export const DATE_LABEL = {
29
+ border: { left: MEDIUM, top: MEDIUM, bottom: MEDIUM },
30
+ font: { ...FONT_BASE, bold: true, italic: true },
31
+ fill: FILL_NONE,
32
+ alignment: { vertical: "middle" },
33
+ };
34
+ export const NOTES_HEADER = {
35
+ border: { left: MEDIUM, top: MEDIUM, bottom: MEDIUM },
36
+ font: { ...FONT_BASE, bold: true },
37
+ fill: FILL_NONE,
38
+ alignment: { horizontal: "right" },
39
+ };
40
+ export const SECTION_LABEL = {
41
+ border: { left: MEDIUM, right: MEDIUM, top: MEDIUM, bottom: MEDIUM },
42
+ font: { ...FONT_BASE, bold: true },
43
+ fill: FILL_GRAY,
44
+ alignment: { horizontal: "center", vertical: "middle" },
45
+ };
46
+ export const WARMUP_DAY = {
47
+ border: { left: MEDIUM, top: MEDIUM, bottom: MEDIUM },
48
+ font: { ...FONT_BASE, bold: true, italic: true },
49
+ fill: FILL_NONE,
50
+ alignment: { horizontal: "center", vertical: "middle" },
51
+ };
52
+ // Same as WARMUP_DAY but with a right border, used on the rightmost cell
53
+ // of the warmup row to close the row's frame at the far edge.
54
+ export const WARMUP_DAY_LAST = {
55
+ border: { left: MEDIUM, right: MEDIUM, top: MEDIUM, bottom: MEDIUM },
56
+ font: { ...FONT_BASE, bold: true, italic: true },
57
+ fill: FILL_NONE,
58
+ alignment: { horizontal: "center", vertical: "middle" },
59
+ };
60
+ export const EXERCISE_HEADER = {
61
+ border: { left: MEDIUM },
62
+ font: { ...FONT_BASE, bold: true },
63
+ fill: FILL_GRAY,
64
+ alignment: { horizontal: "center" },
65
+ };
66
+ export const REPS_HEADER = {
67
+ border: { left: MEDIUM, right: THIN },
68
+ font: { ...FONT_BASE, bold: true },
69
+ fill: FILL_GRAY,
70
+ alignment: { horizontal: "center" },
71
+ };
72
+ export const WEIGHT_HEADER = {
73
+ border: { right: MEDIUM },
74
+ font: { ...FONT_BASE, bold: true },
75
+ fill: FILL_GRAY,
76
+ alignment: { horizontal: "center" },
77
+ };
78
+ export const NOTES_HEADER_CELL = NOTES_HEADER;
79
+ // Gray padding rows above (row 4) and below (row 6) the "Exercise" header row.
80
+ // These wrap the header in a continuous gray block, then transition to the
81
+ // data rows below.
82
+ export function headerPadAboveStyle(col) {
83
+ if (col === "C") {
84
+ return {
85
+ border: { left: MEDIUM, top: MEDIUM },
86
+ font: { ...FONT_BASE },
87
+ fill: FILL_GRAY,
88
+ };
89
+ }
90
+ if (col === "reps") {
91
+ return {
92
+ border: { left: MEDIUM, right: THIN, top: MEDIUM },
93
+ font: { ...FONT_BASE },
94
+ fill: FILL_GRAY,
95
+ };
96
+ }
97
+ return {
98
+ border: { right: MEDIUM, top: MEDIUM },
99
+ font: { ...FONT_BASE },
100
+ fill: FILL_GRAY,
101
+ };
102
+ }
103
+ export function headerPadBelowStyle(col) {
104
+ if (col === "C") {
105
+ return {
106
+ border: { left: MEDIUM, bottom: MEDIUM },
107
+ font: { ...FONT_BASE },
108
+ fill: FILL_GRAY,
109
+ };
110
+ }
111
+ if (col === "reps") {
112
+ return {
113
+ border: { left: MEDIUM, right: THIN, bottom: MEDIUM },
114
+ font: { ...FONT_BASE },
115
+ fill: FILL_GRAY,
116
+ };
117
+ }
118
+ return {
119
+ border: { right: MEDIUM, bottom: MEDIUM },
120
+ font: { ...FONT_BASE },
121
+ fill: FILL_GRAY,
122
+ };
123
+ }
124
+ /**
125
+ * Style for the merged exercise-name cell in column C.
126
+ * The top border varies by position:
127
+ * - `medium` for the first exercise of a section OR the first exercise of
128
+ * a new group number (different from previous block).
129
+ * - `hair` for subsequent exercises within the same group number (1A→1B).
130
+ * - `none` is unused in practice (kept for future flexibility).
131
+ * No bottom border: the gray bar continues uninterrupted into the group
132
+ * label row directly below.
133
+ */
134
+ export function exerciseNameStyle(topBorder) {
135
+ const border = { left: MEDIUM, right: MEDIUM };
136
+ if (topBorder === "medium")
137
+ border.top = MEDIUM;
138
+ else if (topBorder === "hair")
139
+ border.top = HAIR;
140
+ return {
141
+ border: border,
142
+ font: { ...FONT_BASE },
143
+ fill: FILL_GRAY,
144
+ alignment: { horizontal: "center", vertical: "middle", wrapText: true },
145
+ };
146
+ }
147
+ /**
148
+ * Style for the group-label cell in column C (the bottom row of an exercise
149
+ * block). The bottom border varies by position:
150
+ * - `medium` only on the very last exercise of a section.
151
+ * - `none` everywhere else; the visual separator to the next block is
152
+ * provided by THAT block's top border (medium or hair).
153
+ */
154
+ export function groupLabelStyle(bottomBorder) {
155
+ const border = { left: MEDIUM, right: MEDIUM };
156
+ if (bottomBorder === "medium")
157
+ border.bottom = MEDIUM;
158
+ return {
159
+ border: border,
160
+ font: { ...FONT_BASE, bold: true, color: GROUP_LABEL_COLOR },
161
+ fill: FILL_GRAY,
162
+ alignment: { horizontal: "center" },
163
+ };
164
+ }
165
+ export function weekRepsCellStyle(opts) {
166
+ const border = {
167
+ left: MEDIUM_BLACK,
168
+ right: THIN,
169
+ top: opts.isTop ? MEDIUM_BLACK : THIN,
170
+ bottom: opts.isBottom ? MEDIUM_BLACK : THIN,
171
+ };
172
+ return {
173
+ border: border,
174
+ font: { ...FONT_BASE },
175
+ fill: FILL_NONE,
176
+ alignment: { horizontal: "center", vertical: "middle" },
177
+ };
178
+ }
179
+ export function weekWeightCellStyle(opts) {
180
+ const border = {
181
+ left: THIN,
182
+ right: MEDIUM,
183
+ top: opts.isTop ? MEDIUM_BLACK : THIN,
184
+ bottom: opts.isBottom ? MEDIUM_BLACK : THIN,
185
+ };
186
+ return {
187
+ border: border,
188
+ font: { name: "Arial", size: 10 },
189
+ fill: FILL_NONE,
190
+ alignment: { horizontal: "center", vertical: "middle" },
191
+ };
192
+ }
193
+ export const NOTES_CELL = {
194
+ border: { left: MEDIUM },
195
+ font: { ...FONT_BASE },
196
+ fill: FILL_NONE,
197
+ alignment: { horizontal: "center", vertical: "middle", wrapText: true },
198
+ };
199
+ // --- Bottom Sport Specific / Supplemental template styles ---
200
+ export const TPL_C_GRAY = {
201
+ border: { left: MEDIUM },
202
+ font: { ...FONT_BASE, bold: true },
203
+ fill: FILL_GRAY,
204
+ alignment: { horizontal: "center", vertical: "middle" },
205
+ };
206
+ export const TPL_C_GRAY_BOTTOM = {
207
+ border: { left: MEDIUM, bottom: MEDIUM },
208
+ font: { ...FONT_BASE, bold: true },
209
+ fill: FILL_GRAY,
210
+ alignment: { horizontal: "center", vertical: "middle" },
211
+ };
212
+ // Small 2x2 boxed header (D22:E23 etc.) at the top of each week column of the
213
+ // bottom template. Borders on all sides; empty interior.
214
+ export const TPL_BOX_TOP_LEFT = {
215
+ border: { left: MEDIUM, top: MEDIUM },
216
+ font: { ...FONT_BASE },
217
+ fill: FILL_NONE,
218
+ };
219
+ export const TPL_BOX_TOP_RIGHT = {
220
+ border: { right: MEDIUM, top: MEDIUM },
221
+ font: { ...FONT_BASE },
222
+ fill: FILL_NONE,
223
+ };
224
+ export const TPL_BOX_BOTTOM_LEFT = {
225
+ border: { left: MEDIUM, bottom: MEDIUM },
226
+ font: { ...FONT_BASE },
227
+ fill: FILL_NONE,
228
+ };
229
+ export const TPL_BOX_BOTTOM_RIGHT = {
230
+ border: { right: MEDIUM, bottom: MEDIUM },
231
+ font: { ...FONT_BASE },
232
+ fill: FILL_NONE,
233
+ };
234
+ // Content rows: side borders only (open top/bottom, vertical channels).
235
+ export const TPL_ROW_LEFT = {
236
+ border: { left: MEDIUM },
237
+ font: { ...FONT_BASE },
238
+ fill: FILL_NONE,
239
+ };
240
+ export const TPL_ROW_RIGHT = {
241
+ border: { right: MEDIUM },
242
+ font: { ...FONT_BASE },
243
+ fill: FILL_NONE,
244
+ };
245
+ // Final row of the template box: side + bottom borders.
246
+ export const TPL_ROW_LEFT_BOTTOM = {
247
+ border: { left: MEDIUM, bottom: MEDIUM },
248
+ font: { ...FONT_BASE },
249
+ fill: FILL_NONE,
250
+ };
251
+ export const TPL_ROW_RIGHT_BOTTOM = {
252
+ border: { right: MEDIUM, bottom: MEDIUM },
253
+ font: { ...FONT_BASE },
254
+ fill: FILL_NONE,
255
+ };
256
+ export const TPL_NOTES_LEFT = {
257
+ border: { left: MEDIUM },
258
+ font: { ...FONT_BASE },
259
+ fill: FILL_NONE,
260
+ };
261
+ export const TPL_NOTES_LEFT_BOTTOM = {
262
+ border: { left: MEDIUM, bottom: MEDIUM },
263
+ font: { ...FONT_BASE },
264
+ fill: FILL_NONE,
265
+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EAAE,IAAI,EAAE,MAAM,EAAa;IACnC,IAAI,EAAE,EAAE,GAAG,SAAS,EAAE;IACtB,IAAI,EAAE,SAAS;CAChB,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAU;IAClC,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,EAAa;IACpC,IAAI,EAAE,EAAE,GAAG,SAAS,EAAE;IACtB,IAAI,EAAE,SAAS;CAChB,CAAC;AAEF,wDAAwD;AACxD,MAAM,CAAC,MAAM,mBAAmB,GAAU;IACxC,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAa;IACnD,IAAI,EAAE,EAAE,GAAG,SAAS,EAAE;IACtB,IAAI,EAAE,SAAS;CAChB,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAU;IACzC,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAa;IACpD,IAAI,EAAE,EAAE,GAAG,SAAS,EAAE;IACtB,IAAI,EAAE,SAAS;CAChB,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAU;IACnC,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,EAAa;IACnC,IAAI,EAAE,EAAE,GAAG,SAAS,EAAE;IACtB,IAAI,EAAE,SAAS;CAChB,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAU;IAC1C,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAa;IACnD,IAAI,EAAE,EAAE,GAAG,SAAS,EAAE;IACtB,IAAI,EAAE,SAAS;CAChB,CAAC"}
@@ -0,0 +1,23 @@
1
+ import type ExcelJS from "exceljs";
2
+ import type { SupplementalNote } from "../schema/program.js";
3
+ /**
4
+ * Stamps the fixed "Sport Specific / Supplemental" template area at the
5
+ * bottom of a day sheet, then layers in any supplementalNotes the program
6
+ * JSON supplied. The template is 10 rows tall and uses single-row merges
7
+ * in each week-column pair (D-E, F-G, H-I, J-K, L-M, N-O) so the LLM can
8
+ * put a value into any cell by its master address.
9
+ *
10
+ * Layout:
11
+ * row 0: "Sport Specific/" label in col C; top medium borders on the
12
+ * week-column content cells
13
+ * row 1: "Supplemental" label in col C; side borders
14
+ * rows 2-8: empty content rows with side borders
15
+ * row 9: closing row with side + bottom borders
16
+ *
17
+ * `supplementalNotes[i].row` is interpreted as an offset from row 0 of
18
+ * this template. Notes whose row is out of range are silently skipped.
19
+ *
20
+ * @returns the next free row after the template (startRow + 10).
21
+ */
22
+ export declare function stampSupplementalTemplate(ws: ExcelJS.Worksheet, startRow: number, supplementalNotes?: SupplementalNote[]): number;
23
+ //# sourceMappingURL=supplemental-template.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"supplemental-template.d.ts","sourceRoot":"","sources":["../../src/writer/supplemental-template.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AACnC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAkB7D;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,yBAAyB,CACvC,EAAE,EAAE,OAAO,CAAC,SAAS,EACrB,QAAQ,EAAE,MAAM,EAChB,iBAAiB,CAAC,EAAE,gBAAgB,EAAE,GACrC,MAAM,CA8DR"}
@@ -0,0 +1,112 @@
1
+ import { EXERCISE_NAME_COL, NOTES_COL, WEEK_REPS_COLS, WEEK_WEIGHT_COLS, } from "./layout.js";
2
+ import { TPL_C_GRAY, TPL_C_GRAY_BOTTOM, TPL_NOTES_LEFT, TPL_NOTES_LEFT_BOTTOM, } from "./styles.js";
3
+ const TEMPLATE_ROWS = 10;
4
+ const LABEL_SPORT_SPECIFIC_ROW = 0;
5
+ const LABEL_SUPPLEMENTAL_ROW = 1;
6
+ /**
7
+ * Stamps the fixed "Sport Specific / Supplemental" template area at the
8
+ * bottom of a day sheet, then layers in any supplementalNotes the program
9
+ * JSON supplied. The template is 10 rows tall and uses single-row merges
10
+ * in each week-column pair (D-E, F-G, H-I, J-K, L-M, N-O) so the LLM can
11
+ * put a value into any cell by its master address.
12
+ *
13
+ * Layout:
14
+ * row 0: "Sport Specific/" label in col C; top medium borders on the
15
+ * week-column content cells
16
+ * row 1: "Supplemental" label in col C; side borders
17
+ * rows 2-8: empty content rows with side borders
18
+ * row 9: closing row with side + bottom borders
19
+ *
20
+ * `supplementalNotes[i].row` is interpreted as an offset from row 0 of
21
+ * this template. Notes whose row is out of range are silently skipped.
22
+ *
23
+ * @returns the next free row after the template (startRow + 10).
24
+ */
25
+ export function stampSupplementalTemplate(ws, startRow, supplementalNotes) {
26
+ const lastTemplateRow = startRow + TEMPLATE_ROWS - 1;
27
+ // --- Column C: gray bar with labels at the top two rows. ---
28
+ for (let i = 0; i < TEMPLATE_ROWS; i++) {
29
+ const r = startRow + i;
30
+ const c = ws.getCell(`${EXERCISE_NAME_COL}${r}`);
31
+ if (i === LABEL_SPORT_SPECIFIC_ROW)
32
+ c.value = "Sport Specific/";
33
+ else if (i === LABEL_SUPPLEMENTAL_ROW)
34
+ c.value = "Supplemental";
35
+ else
36
+ c.value = null;
37
+ Object.assign(c, i === TEMPLATE_ROWS - 1 ? TPL_C_GRAY_BOTTOM : TPL_C_GRAY);
38
+ }
39
+ // --- Week-column content cells: D, E, F, G, ..., N, O — independent cells
40
+ // (NOT merged). Each cell is plain-white-filled. Borders are only on
41
+ // the "reps" columns (D/F/H/J/L/N) and on O so the rendered area has:
42
+ // - a left edge on D
43
+ // - 5 vertical dividers between adjacent week pairs (E|F, G|H, …)
44
+ // - a right edge on O
45
+ // - top edge on row 0, bottom edge on row 9
46
+ // No interior cell borders inside each week's D-E pair, no horizontal
47
+ // lines between content rows. Text written to col=D overflows visually
48
+ // into the empty E cell, matching how the source files render.
49
+ for (let i = 0; i < TEMPLATE_ROWS; i++) {
50
+ const r = startRow + i;
51
+ const isTop = i === 0;
52
+ const isBottom = i === TEMPLATE_ROWS - 1;
53
+ for (let w = 0; w < 6; w++) {
54
+ const left = WEEK_REPS_COLS[w];
55
+ const right = WEEK_WEIGHT_COLS[w];
56
+ const isLastPair = w === 5;
57
+ Object.assign(ws.getCell(`${left}${r}`), contentCellStyle({ side: "left", isTop, isBottom, isLastPair: false }));
58
+ Object.assign(ws.getCell(`${right}${r}`), contentCellStyle({ side: "right", isTop, isBottom, isLastPair }));
59
+ }
60
+ }
61
+ // --- Notes column P: open above, closed at the bottom. ---
62
+ for (let i = 0; i < TEMPLATE_ROWS; i++) {
63
+ const r = startRow + i;
64
+ Object.assign(ws.getCell(`${NOTES_COL}${r}`), i === TEMPLATE_ROWS - 1 ? TPL_NOTES_LEFT_BOTTOM : TPL_NOTES_LEFT);
65
+ }
66
+ // --- Apply supplementalNotes on top of the template. Cells in the
67
+ // content area aren't merged, so each (row, col) writes directly. ---
68
+ if (supplementalNotes) {
69
+ for (const note of supplementalNotes) {
70
+ if (note.row < 0 || note.row >= TEMPLATE_ROWS)
71
+ continue;
72
+ const r = startRow + note.row;
73
+ ws.getCell(`${note.col}${r}`).value = note.value;
74
+ }
75
+ }
76
+ return lastTemplateRow + 1;
77
+ }
78
+ function contentCellStyle(opts) {
79
+ const MEDIUM = {
80
+ style: "medium",
81
+ color: { indexed: 64 },
82
+ };
83
+ const WHITE_FILL = {
84
+ type: "pattern",
85
+ pattern: "solid",
86
+ fgColor: { argb: "FFFFFFFF" },
87
+ bgColor: { argb: "FFFFFFFF" },
88
+ };
89
+ const border = {};
90
+ // The "left" cell of each week pair carries the dividing border on its
91
+ // LEFT edge (between this week and the previous). For week 0 (D) that's
92
+ // the outer left edge of the whole area.
93
+ if (opts.side === "left")
94
+ border.left = MEDIUM;
95
+ // The "right" cell of the LAST week pair (O) carries the right edge of
96
+ // the whole area. Other "right" cells (E, G, I, K, M) carry no right
97
+ // border — the divider to the next pair is provided by THAT pair's left
98
+ // cell (F, H, J, L, N).
99
+ if (opts.side === "right" && opts.isLastPair)
100
+ border.right = MEDIUM;
101
+ if (opts.isTop)
102
+ border.top = MEDIUM;
103
+ if (opts.isBottom)
104
+ border.bottom = MEDIUM;
105
+ return {
106
+ border: border,
107
+ font: { name: "Arial", family: 2, size: 10 },
108
+ alignment: { horizontal: "center", vertical: "middle" },
109
+ fill: WHITE_FILL,
110
+ };
111
+ }
112
+ //# sourceMappingURL=supplemental-template.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"supplemental-template.js","sourceRoot":"","sources":["../../src/writer/supplemental-template.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,iBAAiB,EACjB,SAAS,EACT,cAAc,EACd,gBAAgB,GACjB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,UAAU,EACV,iBAAiB,EACjB,cAAc,EACd,qBAAqB,GACtB,MAAM,aAAa,CAAC;AAErB,MAAM,aAAa,GAAG,EAAE,CAAC;AACzB,MAAM,wBAAwB,GAAG,CAAC,CAAC;AACnC,MAAM,sBAAsB,GAAG,CAAC,CAAC;AAEjC;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,yBAAyB,CACvC,EAAqB,EACrB,QAAgB,EAChB,iBAAsC;IAEtC,MAAM,eAAe,GAAG,QAAQ,GAAG,aAAa,GAAG,CAAC,CAAC;IAErD,8DAA8D;IAC9D,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,aAAa,EAAE,CAAC,EAAE,EAAE,CAAC;QACvC,MAAM,CAAC,GAAG,QAAQ,GAAG,CAAC,CAAC;QACvB,MAAM,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,GAAG,iBAAiB,GAAG,CAAC,EAAE,CAAC,CAAC;QACjD,IAAI,CAAC,KAAK,wBAAwB;YAAE,CAAC,CAAC,KAAK,GAAG,iBAAiB,CAAC;aAC3D,IAAI,CAAC,KAAK,sBAAsB;YAAE,CAAC,CAAC,KAAK,GAAG,cAAc,CAAC;;YAC3D,CAAC,CAAC,KAAK,GAAG,IAAI,CAAC;QACpB,MAAM,CAAC,MAAM,CAAC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MAAM,CAAC,IAAI,GAAG,MAAM,CAAC;IAC/C,uEAAuE;IACvE,qEAAqE;IACrE,wEAAwE;IACxE,wBAAwB;IACxB,IAAI,IAAI,CAAC,IAAI,KAAK,OAAO,IAAI,IAAI,CAAC,UAAU;QAAE,MAAM,CAAC,KAAK,GAAG,MAAM,CAAC;IACpE,IAAI,IAAI,CAAC,KAAK;QAAE,MAAM,CAAC,GAAG,GAAG,MAAM,CAAC;IACpC,IAAI,IAAI,CAAC,QAAQ;QAAE,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC;IAC1C,OAAO;QACL,MAAM,EAAE,MAAyB;QACjC,IAAI,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE;QAC5C,SAAS,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE;QACvD,IAAI,EAAE,UAAU;KACjB,CAAC;AACJ,CAAC"}
package/package.json ADDED
@@ -0,0 +1,42 @@
1
+ {
2
+ "name": "@workingdevshero/olympia-ait-adapter",
3
+ "version": "0.1.0",
4
+ "description": "MCP adapter that converts between Olympia Fitness & Performance program XLSX workbooks and a strict JSON schema.",
5
+ "type": "module",
6
+ "bin": {
7
+ "olympia-ait-adapter": "./dist/server.js"
8
+ },
9
+ "main": "./dist/index.js",
10
+ "types": "./dist/index.d.ts",
11
+ "files": [
12
+ "dist",
13
+ "src/assets"
14
+ ],
15
+ "scripts": {
16
+ "build": "tsc -p tsconfig.json && chmod +x dist/server.js",
17
+ "start": "node dist/server.js",
18
+ "dev": "tsx src/server.ts",
19
+ "test": "vitest run",
20
+ "test:watch": "vitest",
21
+ "typecheck": "tsc -p tsconfig.json --noEmit",
22
+ "prepublishOnly": "npm run build && npm test"
23
+ },
24
+ "publishConfig": {
25
+ "access": "public"
26
+ },
27
+ "dependencies": {
28
+ "@modelcontextprotocol/sdk": "^1.0.4",
29
+ "exceljs": "^4.4.0",
30
+ "zod": "^3.23.8",
31
+ "zod-to-json-schema": "^3.23.5"
32
+ },
33
+ "devDependencies": {
34
+ "@types/node": "^22.10.0",
35
+ "tsx": "^4.19.2",
36
+ "typescript": "^5.7.2",
37
+ "vitest": "^2.1.8"
38
+ },
39
+ "engines": {
40
+ "node": ">=20"
41
+ }
42
+ }
Binary file