@lemonriver/core 0.5.0 → 0.6.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/{build-CS1goZxt.js → build-RlcGG-Ve.js} +1 -1
- package/dist/cli/bin.js +3 -3
- package/dist/{config-BpbcCbUv.js → config-BJT87wE9.js} +1155 -19
- package/dist/{dev-BpYnfgLL.js → dev-DR-j_xda.js} +1 -1
- package/dist/{preview-HSzPPkSs.js → preview-BTAhTb5B.js} +1 -1
- package/dist/vite/index.js +1 -1
- package/package.json +1 -1
- package/src/app/lemonriver/board/blocks/classify.test.ts +5 -0
- package/src/app/lemonriver/board/blocks/classify.ts +29 -2
- package/src/app/lemonriver/board/blocks/snapshot.ts +34 -4
- package/src/app/lemonriver/board/board-page.tsx +15 -0
- package/src/app/lemonriver/board/model/agent-tasks.ts +33 -1
- package/src/app/lemonriver/board/model/self-check.test.ts +329 -0
- package/src/app/lemonriver/board/model/self-check.ts +489 -0
- package/src/app/lemonriver/board/page-node.tsx +23 -1
- package/src/app/lemonriver/board/self-check-jump.ts +23 -0
- package/src/app/lemonriver/board/self-check-panel.tsx +272 -0
- package/src/app/lemonriver/board/self-check-runner.tsx +150 -0
- package/src/app/lemonriver/board/use-self-check.ts +117 -0
- package/src/app/lemonriver/chrome/filter-pill.tsx +30 -0
- package/src/app/lemonriver/chrome/sidebar-extras.tsx +12 -1
- package/src/app/lemonriver/features.test.ts +5 -0
- package/src/app/lemonriver/features.ts +2 -1
- package/src/app/lemonriver/home/deck-card.tsx +10 -0
- package/src/app/lemonriver/home/home-page.tsx +55 -6
- package/src/app/lemonriver/home/use-deck-times.ts +4 -1
- package/src/app/lemonriver/outline/build-team.tsx +42 -0
- package/src/app/lemonriver/outline/describe-page.tsx +128 -27
- package/src/app/lemonriver/outline/draft.ts +38 -0
- package/src/app/lemonriver/outline/model.test.ts +79 -0
- package/src/app/lemonriver/outline/model.ts +80 -7
- package/src/app/lemonriver/outline/outline-page.tsx +56 -6
- package/src/app/lemonriver/outline/pick-style.tsx +282 -0
- package/src/app/lemonriver/routes.test.tsx +17 -5
- package/src/app/lemonriver/routes.tsx +28 -0
- package/src/app/lemonriver/templates/client.ts +60 -0
- package/src/app/lemonriver/templates/demo-page.tsx +79 -0
- package/src/app/lemonriver/templates/knobs.test.ts +62 -0
- package/src/app/lemonriver/templates/knobs.ts +62 -0
- package/src/app/lemonriver/templates/library-page.tsx +292 -0
- package/src/app/lemonriver/templates/model.test.ts +175 -0
- package/src/app/lemonriver/templates/model.ts +339 -0
- package/src/app/lemonriver/templates/preview-content.test.ts +117 -0
- package/src/app/lemonriver/templates/preview-content.ts +149 -0
- package/src/app/lemonriver/templates/recommend.test.ts +71 -0
- package/src/app/lemonriver/templates/recommend.ts +72 -0
- package/src/app/lemonriver/templates/use-library.ts +58 -0
- package/src/app/lemonriver/templates/virtual.d.ts +28 -0
- package/src/app/lemonriver/text/en.ts +57 -0
- package/src/app/lemonriver/text/es.ts +57 -0
- package/src/app/lemonriver/text/ja.ts +57 -0
- package/src/app/lemonriver/text/types.ts +73 -0
- package/src/app/lemonriver/text/zh-cn.ts +57 -0
- package/src/app/lemonriver/text/zh-tw.ts +57 -0
- package/src/app/lemonriver/theme/pages.test.ts +4 -0
- package/src/app/lemonriver/theme/pages.ts +6 -1
- package/src/app/lemonriver/update/prompt.ts +1 -1
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
export type PreviewOutline = {
|
|
2
|
+
brief: string;
|
|
3
|
+
audience: string;
|
|
4
|
+
items: { title: string; kind: string }[];
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
export type PreviewContent = {
|
|
8
|
+
cover: { title: string; subtitle: string; meta: string; brand: string; mark: string };
|
|
9
|
+
data: {
|
|
10
|
+
title: string;
|
|
11
|
+
value: string;
|
|
12
|
+
unit?: string;
|
|
13
|
+
caption: string;
|
|
14
|
+
context: string;
|
|
15
|
+
/** True when the outline had no number anywhere and the template's own shows. */
|
|
16
|
+
sample: boolean;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const MAX_TITLE = 24;
|
|
21
|
+
const MAX_SUBTITLE = 30;
|
|
22
|
+
const MAX_LINE = 40;
|
|
23
|
+
|
|
24
|
+
const UNITS = [
|
|
25
|
+
'万亿',
|
|
26
|
+
'亿美元',
|
|
27
|
+
'亿元',
|
|
28
|
+
'美元',
|
|
29
|
+
'亿',
|
|
30
|
+
'万',
|
|
31
|
+
'千',
|
|
32
|
+
'%',
|
|
33
|
+
'%',
|
|
34
|
+
'倍',
|
|
35
|
+
'元',
|
|
36
|
+
'人',
|
|
37
|
+
'天',
|
|
38
|
+
'次',
|
|
39
|
+
'家',
|
|
40
|
+
'台',
|
|
41
|
+
'件',
|
|
42
|
+
'个',
|
|
43
|
+
'页',
|
|
44
|
+
];
|
|
45
|
+
|
|
46
|
+
const NUMBER_RE = new RegExp(`(\\d+(?:[.,]\\d+)*)\\s*(${UNITS.join('|')})?`);
|
|
47
|
+
|
|
48
|
+
const DATA_KINDS = new Set(['kpi', 'chart']);
|
|
49
|
+
|
|
50
|
+
function firstSentence(text: string): string {
|
|
51
|
+
const flat = text.replace(/\s+/g, ' ').trim();
|
|
52
|
+
const cut = flat.split(/(?<=[。!?!?])|\.\s/)[0] ?? flat;
|
|
53
|
+
return cut.trim();
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function truncate(text: string, max: number): string {
|
|
57
|
+
const flat = text.replace(/\s+/g, ' ').trim();
|
|
58
|
+
if (flat.length <= max) return flat;
|
|
59
|
+
return `${flat.slice(0, max - 1).trimEnd()}…`;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function readNumber(text: string): { value: string; unit?: string } | null {
|
|
63
|
+
const match = NUMBER_RE.exec(text);
|
|
64
|
+
if (!match) return null;
|
|
65
|
+
const value = match[1] ?? '';
|
|
66
|
+
if (!value) return null;
|
|
67
|
+
return match[2] ? { value, unit: match[2] } : { value };
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
function dateLabel(now: Date, locale?: string): string {
|
|
71
|
+
try {
|
|
72
|
+
return new Intl.DateTimeFormat(locale ?? 'zh-CN', {
|
|
73
|
+
year: 'numeric',
|
|
74
|
+
month: 'long',
|
|
75
|
+
day: 'numeric',
|
|
76
|
+
}).format(now);
|
|
77
|
+
} catch {
|
|
78
|
+
return now.toISOString().slice(0, 10);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
const QUARTER_WORD = /第\s*([一二三四1-4])\s*季度/;
|
|
83
|
+
const QUARTER = /(?:^|[^A-Za-z0-9])Q\s?([1-4])(?![0-9])/i;
|
|
84
|
+
const FISCAL_PREFIX = /\bFY\s?'?(\d{2,4})\b/i;
|
|
85
|
+
const FISCAL_SUFFIX = /(\d{4})\s*财年/;
|
|
86
|
+
const YEAR = /(\d{4})\s*年/;
|
|
87
|
+
|
|
88
|
+
const QUARTER_DIGIT: Record<string, string> = { 一: '1', 二: '2', 三: '3', 四: '4' };
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* The big letter the cover sets beside the title. The user's own quarter or
|
|
92
|
+
* fiscal year when the outline names one, so the preview is never a sample.
|
|
93
|
+
*/
|
|
94
|
+
export function readMark(text: string): string {
|
|
95
|
+
const word = QUARTER_WORD.exec(text);
|
|
96
|
+
if (word) {
|
|
97
|
+
const digit = QUARTER_DIGIT[word[1]] ?? word[1];
|
|
98
|
+
return `Q${digit}`;
|
|
99
|
+
}
|
|
100
|
+
const quarter = QUARTER.exec(text);
|
|
101
|
+
if (quarter) return `Q${quarter[1]}`;
|
|
102
|
+
const fiscalPrefix = FISCAL_PREFIX.exec(text);
|
|
103
|
+
if (fiscalPrefix) return `FY${fiscalPrefix[1].slice(-2)}`;
|
|
104
|
+
const fiscalSuffix = FISCAL_SUFFIX.exec(text);
|
|
105
|
+
if (fiscalSuffix) return `FY${fiscalSuffix[1].slice(-2)}`;
|
|
106
|
+
const year = YEAR.exec(text);
|
|
107
|
+
if (year) return year[1];
|
|
108
|
+
return '';
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/** What the "pick a style" previews draw: the user's own title and number. */
|
|
112
|
+
export function previewContent(
|
|
113
|
+
outline: PreviewOutline,
|
|
114
|
+
options: { now?: Date; locale?: string } = {},
|
|
115
|
+
): PreviewContent {
|
|
116
|
+
const items = outline.items.filter((item) => item.title.trim() !== '');
|
|
117
|
+
const cover = items.find((item) => item.kind === 'cover') ?? items[0] ?? null;
|
|
118
|
+
const sentence = firstSentence(outline.brief);
|
|
119
|
+
|
|
120
|
+
const coverTitle = cover?.title ?? sentence;
|
|
121
|
+
const audience = outline.audience.trim();
|
|
122
|
+
const meta = [dateLabel(options.now ?? new Date(), options.locale), audience]
|
|
123
|
+
.filter((part) => part !== '')
|
|
124
|
+
.join(' · ');
|
|
125
|
+
|
|
126
|
+
const dataPage = items.find((item) => DATA_KINDS.has(item.kind)) ?? null;
|
|
127
|
+
const pageTitle = dataPage?.title ?? sentence;
|
|
128
|
+
const inTitle = readNumber(pageTitle);
|
|
129
|
+
const found = inTitle ?? readNumber(outline.brief);
|
|
130
|
+
const source = inTitle ? pageTitle : sentence;
|
|
131
|
+
|
|
132
|
+
return {
|
|
133
|
+
cover: {
|
|
134
|
+
title: truncate(coverTitle, MAX_TITLE),
|
|
135
|
+
subtitle: truncate(sentence, MAX_SUBTITLE),
|
|
136
|
+
meta,
|
|
137
|
+
brand: '',
|
|
138
|
+
mark: readMark(cover?.title ?? '') || readMark(outline.brief),
|
|
139
|
+
},
|
|
140
|
+
data: {
|
|
141
|
+
title: truncate(pageTitle, MAX_TITLE),
|
|
142
|
+
value: found?.value ?? '',
|
|
143
|
+
unit: found?.unit,
|
|
144
|
+
caption: truncate(source || pageTitle, MAX_LINE),
|
|
145
|
+
context: truncate(audience, MAX_LINE),
|
|
146
|
+
sample: found === null,
|
|
147
|
+
},
|
|
148
|
+
};
|
|
149
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { describe, expect, it } from 'vitest';
|
|
2
|
+
import type { OccasionId } from './model.ts';
|
|
3
|
+
import { type Recommendable, recommendTemplates } from './recommend.ts';
|
|
4
|
+
|
|
5
|
+
const template = (id: string, occasions: OccasionId[]): Recommendable => ({
|
|
6
|
+
id,
|
|
7
|
+
occasions,
|
|
8
|
+
reason: `why ${id}`,
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
const LIBRARY: Recommendable[] = [
|
|
12
|
+
template('a-pitch', ['pitch']),
|
|
13
|
+
template('b-report', ['report']),
|
|
14
|
+
template('c-launch', ['launch']),
|
|
15
|
+
template('d-review', ['review']),
|
|
16
|
+
template('e-both', ['launch', 'report']),
|
|
17
|
+
];
|
|
18
|
+
|
|
19
|
+
const ids = (picks: Recommendable[]) => picks.map((pick) => pick.id);
|
|
20
|
+
|
|
21
|
+
describe('recommendTemplates', () => {
|
|
22
|
+
it('puts the templates whose first occasion matches first', () => {
|
|
23
|
+
const { picks, reasons } = recommendTemplates(LIBRARY, { occasion: 'report' });
|
|
24
|
+
expect(ids(picks)).toEqual(['b-report', 'e-both', 'a-pitch']);
|
|
25
|
+
expect(reasons).toEqual(['why b-report', 'why e-both', 'why a-pitch']);
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
it('fills from the report occasion, then any template, when fewer than three match', () => {
|
|
29
|
+
const narrow = [template('x', ['review']), ...LIBRARY];
|
|
30
|
+
const { picks } = recommendTemplates(narrow, { occasion: 'review' });
|
|
31
|
+
expect(ids(picks)).toEqual(['x', 'd-review', 'b-report']);
|
|
32
|
+
expect(picks).toHaveLength(3);
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
it('takes one template per occasion when the user is unsure', () => {
|
|
36
|
+
const { picks } = recommendTemplates(LIBRARY, { occasion: null });
|
|
37
|
+
expect(ids(picks)).toEqual(['a-pitch', 'b-report', 'c-launch']);
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
it('leaves out the ones already shown and restarts once all have been seen', () => {
|
|
41
|
+
const first = recommendTemplates(LIBRARY, { occasion: 'report' });
|
|
42
|
+
const next = recommendTemplates(LIBRARY, {
|
|
43
|
+
occasion: 'report',
|
|
44
|
+
exclude: ids(first.picks),
|
|
45
|
+
});
|
|
46
|
+
expect(ids(next.picks)).toEqual(['c-launch', 'd-review']);
|
|
47
|
+
|
|
48
|
+
const again = recommendTemplates(LIBRARY, {
|
|
49
|
+
occasion: 'report',
|
|
50
|
+
exclude: ['a-pitch', 'b-report', 'c-launch', 'd-review', 'e-both'],
|
|
51
|
+
});
|
|
52
|
+
expect(ids(again.picks)).toEqual(ids(first.picks));
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
it('returns the one template a one-template library has, without padding', () => {
|
|
56
|
+
const single = [template('only', ['report'])];
|
|
57
|
+
expect(recommendTemplates(single, { occasion: 'report' }).picks).toHaveLength(1);
|
|
58
|
+
expect(recommendTemplates(single, { occasion: null }).picks).toHaveLength(1);
|
|
59
|
+
expect(ids(recommendTemplates(single, { occasion: null }).picks)).toEqual(['only']);
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
it('never repeats a template across the two pools', () => {
|
|
63
|
+
const overlapping = [
|
|
64
|
+
template('one', ['pitch', 'report', 'launch', 'review']),
|
|
65
|
+
template('two', ['report']),
|
|
66
|
+
template('three', ['report']),
|
|
67
|
+
];
|
|
68
|
+
const { picks } = recommendTemplates(overlapping, { occasion: 'report' });
|
|
69
|
+
expect(new Set(ids(picks)).size).toBe(picks.length);
|
|
70
|
+
});
|
|
71
|
+
});
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { OCCASIONS, type OccasionId } from './model.ts';
|
|
2
|
+
|
|
3
|
+
export type Recommendable = { id: string; occasions: OccasionId[]; reason: string };
|
|
4
|
+
|
|
5
|
+
export type RecommendInput = {
|
|
6
|
+
occasion: OccasionId | null;
|
|
7
|
+
/** Accepted so callers can pass the audience; the reason stays the template's own. */
|
|
8
|
+
audience?: string;
|
|
9
|
+
/** Templates already shown, left out of the next round. */
|
|
10
|
+
exclude?: string[];
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export type Recommendation<T> = { picks: T[]; reasons: string[] };
|
|
14
|
+
|
|
15
|
+
const LIMIT = 3;
|
|
16
|
+
|
|
17
|
+
function byOccasion<T extends Recommendable>(pool: T[], occasion: OccasionId): T[] {
|
|
18
|
+
const groups = [
|
|
19
|
+
pool.filter((template) => template.occasions[0] === occasion),
|
|
20
|
+
pool.filter((template) => template.occasions.includes(occasion)),
|
|
21
|
+
pool.filter((template) => template.occasions.includes('report')),
|
|
22
|
+
pool,
|
|
23
|
+
];
|
|
24
|
+
const seen = new Set<string>();
|
|
25
|
+
const picks: T[] = [];
|
|
26
|
+
for (const group of groups) {
|
|
27
|
+
for (const template of group) {
|
|
28
|
+
if (seen.has(template.id)) continue;
|
|
29
|
+
seen.add(template.id);
|
|
30
|
+
picks.push(template);
|
|
31
|
+
if (picks.length === LIMIT) return picks;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
return picks;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/** No occasion: one template per occasion in turn, so the three differ. */
|
|
38
|
+
function byTurns<T extends Recommendable>(pool: T[]): T[] {
|
|
39
|
+
const seen = new Set<string>();
|
|
40
|
+
const picks: T[] = [];
|
|
41
|
+
for (const occasion of OCCASIONS) {
|
|
42
|
+
const found = pool.find(
|
|
43
|
+
(template) => !seen.has(template.id) && template.occasions.includes(occasion.id),
|
|
44
|
+
);
|
|
45
|
+
if (!found) continue;
|
|
46
|
+
seen.add(found.id);
|
|
47
|
+
picks.push(found);
|
|
48
|
+
if (picks.length === LIMIT) return picks;
|
|
49
|
+
}
|
|
50
|
+
return picks;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Three templates to show after the outline. Everything excluded means the user
|
|
55
|
+
* has seen the whole library, so the next round starts over.
|
|
56
|
+
*/
|
|
57
|
+
export function recommendTemplates<T extends Recommendable>(
|
|
58
|
+
templates: readonly T[],
|
|
59
|
+
input: RecommendInput,
|
|
60
|
+
): Recommendation<T> {
|
|
61
|
+
const seen = new Set<string>();
|
|
62
|
+
const unique = templates.filter((template) => {
|
|
63
|
+
if (seen.has(template.id)) return false;
|
|
64
|
+
seen.add(template.id);
|
|
65
|
+
return true;
|
|
66
|
+
});
|
|
67
|
+
const excluded = new Set(input.exclude ?? []);
|
|
68
|
+
const kept = unique.filter((template) => !excluded.has(template.id));
|
|
69
|
+
const pool = kept.length > 0 ? kept : unique;
|
|
70
|
+
const picks = input.occasion ? byOccasion(pool, input.occasion) : byTurns(pool);
|
|
71
|
+
return { picks, reasons: picks.map((template) => template.reason) };
|
|
72
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { useEffect, useState } from 'react';
|
|
2
|
+
import type { TemplateMeta } from './client';
|
|
3
|
+
import type { OccasionId } from './model';
|
|
4
|
+
|
|
5
|
+
export type TemplateLibrary = {
|
|
6
|
+
available: boolean;
|
|
7
|
+
occasions: { id: OccasionId; name: string }[];
|
|
8
|
+
templates: TemplateMeta[];
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
const UNAVAILABLE: TemplateLibrary = { available: false, occasions: [], templates: [] };
|
|
12
|
+
|
|
13
|
+
let cache: TemplateLibrary | null = null;
|
|
14
|
+
let pending: Promise<TemplateLibrary> | null = null;
|
|
15
|
+
|
|
16
|
+
async function fetchLibrary(): Promise<TemplateLibrary> {
|
|
17
|
+
try {
|
|
18
|
+
const res = await fetch('/__lr/templates');
|
|
19
|
+
if (!res.ok) return UNAVAILABLE;
|
|
20
|
+
const body = (await res.json()) as Partial<TemplateLibrary>;
|
|
21
|
+
return {
|
|
22
|
+
available: body.available === true,
|
|
23
|
+
occasions: Array.isArray(body.occasions) ? body.occasions : [],
|
|
24
|
+
templates: Array.isArray(body.templates) ? body.templates : [],
|
|
25
|
+
};
|
|
26
|
+
} catch {
|
|
27
|
+
return UNAVAILABLE;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export function loadTemplateLibrary(): Promise<TemplateLibrary> {
|
|
32
|
+
if (cache) return Promise.resolve(cache);
|
|
33
|
+
pending ??= fetchLibrary().then((library) => {
|
|
34
|
+
cache = library;
|
|
35
|
+
pending = null;
|
|
36
|
+
return library;
|
|
37
|
+
});
|
|
38
|
+
return pending;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/** Null until the server has answered; the sidebar and the pages share one fetch. */
|
|
42
|
+
export function useTemplateLibrary(): TemplateLibrary | null {
|
|
43
|
+
const [library, setLibrary] = useState<TemplateLibrary | null>(cache);
|
|
44
|
+
useEffect(() => {
|
|
45
|
+
if (cache) {
|
|
46
|
+
setLibrary(cache);
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
let cancelled = false;
|
|
50
|
+
void loadTemplateLibrary().then((next) => {
|
|
51
|
+
if (!cancelled) setLibrary(next);
|
|
52
|
+
});
|
|
53
|
+
return () => {
|
|
54
|
+
cancelled = true;
|
|
55
|
+
};
|
|
56
|
+
}, []);
|
|
57
|
+
return library;
|
|
58
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
declare module 'virtual:open-slide/templates' {
|
|
2
|
+
import type { DesignSystem } from '../../lib/design';
|
|
3
|
+
import type { Page } from '../../lib/sdk';
|
|
4
|
+
import type { OccasionId, TemplateKnobs } from './model';
|
|
5
|
+
|
|
6
|
+
export type TemplateMeta = {
|
|
7
|
+
id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
occasions: OccasionId[];
|
|
10
|
+
audience: string;
|
|
11
|
+
object: string;
|
|
12
|
+
reason: string;
|
|
13
|
+
accent: string;
|
|
14
|
+
design: DesignSystem;
|
|
15
|
+
knobs: TemplateKnobs;
|
|
16
|
+
skeletons: string[];
|
|
17
|
+
hasDemo: boolean;
|
|
18
|
+
pages: number;
|
|
19
|
+
previewPages: number[] | null;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export const templates: TemplateMeta[];
|
|
23
|
+
export function loadTemplateDemo(id: string): Promise<{
|
|
24
|
+
default: Page[];
|
|
25
|
+
design?: DesignSystem;
|
|
26
|
+
}>;
|
|
27
|
+
export function loadTemplatePreview(id: string): Promise<unknown>;
|
|
28
|
+
}
|
|
@@ -187,6 +187,28 @@ export const en: LrText = {
|
|
|
187
187
|
durationSeconds: '{s}s',
|
|
188
188
|
durationMinSec: '{m}m {s}s',
|
|
189
189
|
durationMinutes: '{m} min',
|
|
190
|
+
selfCheckPage: 'Page {n}',
|
|
191
|
+
selfCheck: 'Self-check',
|
|
192
|
+
selfCheckPassed: 'Self-check passed',
|
|
193
|
+
selfCheckFindings: '{n} things to look at',
|
|
194
|
+
selfCheckTimes: '{n} places',
|
|
195
|
+
selfCheckHints: 'Hints',
|
|
196
|
+
cardFindings: '{n} to check',
|
|
197
|
+
selfCheckFix: 'Ask the agent to fix',
|
|
198
|
+
selfCheckRunning: 'The agent is fixing what the self-check found…',
|
|
199
|
+
selfCheckDone: 'Fixed, and checked again',
|
|
200
|
+
selfCheckUnread: 'Page {pages} could not be read, so it was not checked',
|
|
201
|
+
selfCheckUnreadMany: '{n} pages could not be read, so they were not checked',
|
|
202
|
+
selfCheckUnreadBadge: '{n} unread',
|
|
203
|
+
selfCheckAgain: 'Check again',
|
|
204
|
+
cardUnread: 'Unread',
|
|
205
|
+
findingTiny: 'Type too small ({size}px)',
|
|
206
|
+
findingSmallBody: 'Body text under 24px',
|
|
207
|
+
findingOverflow: 'Runs off the page',
|
|
208
|
+
findingOverlap: 'Text sits on something else',
|
|
209
|
+
findingNoNotes: 'No speaker notes',
|
|
210
|
+
findingLongTitle: 'Title too long ({n} characters)',
|
|
211
|
+
findingAccent: 'Accent colour used {n} times',
|
|
190
212
|
},
|
|
191
213
|
theme: {
|
|
192
214
|
lime: 'Lime',
|
|
@@ -385,6 +407,41 @@ export const en: LrText = {
|
|
|
385
407
|
kindPage: 'Body',
|
|
386
408
|
kindEnd: 'Closing',
|
|
387
409
|
back: 'Back to slides',
|
|
410
|
+
occasionLabel: 'Occasion',
|
|
411
|
+
audienceLabel: 'Who is it for? (optional)',
|
|
412
|
+
audiencePlaceholder: 'e.g. Board members and executives',
|
|
413
|
+
unsure: 'Not sure',
|
|
414
|
+
selectedTemplate: 'Template: {name}',
|
|
415
|
+
removeTemplate: 'Clear the template',
|
|
416
|
+
pickTitle: 'Pick a look',
|
|
417
|
+
pickHint: 'Drawn with the titles and numbers from your own outline. Pick one, then start.',
|
|
418
|
+
pickBack: 'Back to the outline',
|
|
419
|
+
pickMore: 'Show me others',
|
|
420
|
+
pickYou: 'Choose for me',
|
|
421
|
+
pickNone: 'No template',
|
|
422
|
+
pickStart: 'Build with this look',
|
|
423
|
+
pickToast: 'Using {name}: {reason}',
|
|
424
|
+
pickSample: 'The number is a sample',
|
|
425
|
+
pickKnobsFor: 'Adjust “{name}”',
|
|
426
|
+
knobFormal: 'Formal ↔ Lively',
|
|
427
|
+
knobBright: 'Plain ↔ Bright',
|
|
428
|
+
knobMotion: 'Less motion ↔ More',
|
|
429
|
+
motionHint: 'Motion only shows in presentation',
|
|
430
|
+
},
|
|
431
|
+
templates: {
|
|
432
|
+
title: 'Template library',
|
|
433
|
+
subtitle: 'A template sets the structure and layout; Lemon writes the content for your brief.',
|
|
434
|
+
all: 'All',
|
|
435
|
+
pages: '{n} pages',
|
|
436
|
+
emptyTitle: 'No template library in this workspace',
|
|
437
|
+
emptyHint: 'The template library is only available in development.',
|
|
438
|
+
occasions: 'Best for',
|
|
439
|
+
audience: 'Audience',
|
|
440
|
+
object: 'Borrows from',
|
|
441
|
+
accent: 'Accent colour',
|
|
442
|
+
create: 'Start with this template',
|
|
443
|
+
close: 'Close',
|
|
444
|
+
previews: 'Page previews',
|
|
388
445
|
},
|
|
389
446
|
build: {
|
|
390
447
|
lead: 'Lemon',
|
|
@@ -178,6 +178,28 @@ export const es: LrText = {
|
|
|
178
178
|
durationSeconds: '{s} s',
|
|
179
179
|
durationMinSec: '{m} min {s} s',
|
|
180
180
|
durationMinutes: '{m} min',
|
|
181
|
+
selfCheckPage: 'Page {n}',
|
|
182
|
+
selfCheck: 'Self-check',
|
|
183
|
+
selfCheckPassed: 'Self-check passed',
|
|
184
|
+
selfCheckFindings: '{n} things to look at',
|
|
185
|
+
selfCheckTimes: '{n} sitios',
|
|
186
|
+
selfCheckHints: 'Sugerencias',
|
|
187
|
+
cardFindings: '{n} to check',
|
|
188
|
+
selfCheckFix: 'Ask the agent to fix',
|
|
189
|
+
selfCheckRunning: 'The agent is fixing what the self-check found…',
|
|
190
|
+
selfCheckDone: 'Fixed, and checked again',
|
|
191
|
+
selfCheckUnread: 'No se pudo leer la página {pages}, así que no se revisó',
|
|
192
|
+
selfCheckUnreadMany: 'No se pudieron leer {n} páginas, así que no se revisaron',
|
|
193
|
+
selfCheckUnreadBadge: '{n} sin leer',
|
|
194
|
+
selfCheckAgain: 'Revisar otra vez',
|
|
195
|
+
cardUnread: 'Sin leer',
|
|
196
|
+
findingTiny: 'Type too small ({size}px)',
|
|
197
|
+
findingSmallBody: 'Texto del cuerpo por debajo de 24px',
|
|
198
|
+
findingOverflow: 'Runs off the page',
|
|
199
|
+
findingOverlap: 'Text sits on something else',
|
|
200
|
+
findingNoNotes: 'No speaker notes',
|
|
201
|
+
findingLongTitle: 'Title too long ({n} characters)',
|
|
202
|
+
findingAccent: 'Accent colour used {n} times',
|
|
181
203
|
},
|
|
182
204
|
theme: {
|
|
183
205
|
lime: 'Lima',
|
|
@@ -378,6 +400,41 @@ export const es: LrText = {
|
|
|
378
400
|
kindPage: 'Cuerpo',
|
|
379
401
|
kindEnd: 'Cierre',
|
|
380
402
|
back: 'Volver a las presentaciones',
|
|
403
|
+
occasionLabel: 'Occasion',
|
|
404
|
+
audienceLabel: 'Who is it for? (optional)',
|
|
405
|
+
audiencePlaceholder: 'e.g. Board members and executives',
|
|
406
|
+
unsure: 'Not sure',
|
|
407
|
+
selectedTemplate: 'Template: {name}',
|
|
408
|
+
removeTemplate: 'Clear the template',
|
|
409
|
+
pickTitle: 'Pick a look',
|
|
410
|
+
pickHint: 'Drawn with the titles and numbers from your own outline. Pick one, then start.',
|
|
411
|
+
pickBack: 'Back to the outline',
|
|
412
|
+
pickMore: 'Show me others',
|
|
413
|
+
pickYou: 'Choose for me',
|
|
414
|
+
pickNone: 'No template',
|
|
415
|
+
pickStart: 'Build with this look',
|
|
416
|
+
pickToast: 'Using {name}: {reason}',
|
|
417
|
+
pickSample: 'The number is a sample',
|
|
418
|
+
pickKnobsFor: 'Adjust “{name}”',
|
|
419
|
+
knobFormal: 'Formal ↔ Lively',
|
|
420
|
+
knobBright: 'Plain ↔ Bright',
|
|
421
|
+
knobMotion: 'Less motion ↔ More',
|
|
422
|
+
motionHint: 'Motion only shows in presentation',
|
|
423
|
+
},
|
|
424
|
+
templates: {
|
|
425
|
+
title: 'Template library',
|
|
426
|
+
subtitle: 'A template sets the structure and layout; Lemon writes the content for your brief.',
|
|
427
|
+
all: 'All',
|
|
428
|
+
pages: '{n} pages',
|
|
429
|
+
emptyTitle: 'No template library in this workspace',
|
|
430
|
+
emptyHint: 'The template library is only available in development.',
|
|
431
|
+
occasions: 'Best for',
|
|
432
|
+
audience: 'Audience',
|
|
433
|
+
object: 'Borrows from',
|
|
434
|
+
accent: 'Accent colour',
|
|
435
|
+
create: 'Start with this template',
|
|
436
|
+
close: 'Close',
|
|
437
|
+
previews: 'Page previews',
|
|
381
438
|
},
|
|
382
439
|
build: {
|
|
383
440
|
lead: 'Limón',
|
|
@@ -178,6 +178,28 @@ export const ja: LrText = {
|
|
|
178
178
|
durationSeconds: '{s} 秒',
|
|
179
179
|
durationMinSec: '{m} 分 {s} 秒',
|
|
180
180
|
durationMinutes: '{m} 分',
|
|
181
|
+
selfCheckPage: 'Page {n}',
|
|
182
|
+
selfCheck: 'Self-check',
|
|
183
|
+
selfCheckPassed: 'Self-check passed',
|
|
184
|
+
selfCheckFindings: '{n} things to look at',
|
|
185
|
+
selfCheckTimes: '{n} か所',
|
|
186
|
+
selfCheckHints: 'ヒント',
|
|
187
|
+
cardFindings: '{n} to check',
|
|
188
|
+
selfCheckFix: 'Ask the agent to fix',
|
|
189
|
+
selfCheckRunning: 'The agent is fixing what the self-check found…',
|
|
190
|
+
selfCheckDone: 'Fixed, and checked again',
|
|
191
|
+
selfCheckUnread: 'ページ {pages} を読み取れず、チェックしていません',
|
|
192
|
+
selfCheckUnreadMany: '{n} ページを読み取れず、チェックしていません',
|
|
193
|
+
selfCheckUnreadBadge: '{n} ページ未読',
|
|
194
|
+
selfCheckAgain: 'もう一度チェック',
|
|
195
|
+
cardUnread: '未読',
|
|
196
|
+
findingTiny: 'Type too small ({size}px)',
|
|
197
|
+
findingSmallBody: '本文が 24px 未満',
|
|
198
|
+
findingOverflow: 'Runs off the page',
|
|
199
|
+
findingOverlap: 'Text sits on something else',
|
|
200
|
+
findingNoNotes: 'No speaker notes',
|
|
201
|
+
findingLongTitle: 'Title too long ({n} characters)',
|
|
202
|
+
findingAccent: 'Accent colour used {n} times',
|
|
181
203
|
},
|
|
182
204
|
theme: {
|
|
183
205
|
lime: 'ライム',
|
|
@@ -378,6 +400,41 @@ export const ja: LrText = {
|
|
|
378
400
|
kindPage: '本文',
|
|
379
401
|
kindEnd: '締め',
|
|
380
402
|
back: 'デッキ一覧に戻る',
|
|
403
|
+
occasionLabel: 'Occasion',
|
|
404
|
+
audienceLabel: 'Who is it for? (optional)',
|
|
405
|
+
audiencePlaceholder: 'e.g. Board members and executives',
|
|
406
|
+
unsure: 'Not sure',
|
|
407
|
+
selectedTemplate: 'Template: {name}',
|
|
408
|
+
removeTemplate: 'Clear the template',
|
|
409
|
+
pickTitle: 'Pick a look',
|
|
410
|
+
pickHint: 'Drawn with the titles and numbers from your own outline. Pick one, then start.',
|
|
411
|
+
pickBack: 'Back to the outline',
|
|
412
|
+
pickMore: 'Show me others',
|
|
413
|
+
pickYou: 'Choose for me',
|
|
414
|
+
pickNone: 'No template',
|
|
415
|
+
pickStart: 'Build with this look',
|
|
416
|
+
pickToast: 'Using {name}: {reason}',
|
|
417
|
+
pickSample: 'The number is a sample',
|
|
418
|
+
pickKnobsFor: 'Adjust “{name}”',
|
|
419
|
+
knobFormal: 'Formal ↔ Lively',
|
|
420
|
+
knobBright: 'Plain ↔ Bright',
|
|
421
|
+
knobMotion: 'Less motion ↔ More',
|
|
422
|
+
motionHint: 'Motion only shows in presentation',
|
|
423
|
+
},
|
|
424
|
+
templates: {
|
|
425
|
+
title: 'Template library',
|
|
426
|
+
subtitle: 'A template sets the structure and layout; Lemon writes the content for your brief.',
|
|
427
|
+
all: 'All',
|
|
428
|
+
pages: '{n} pages',
|
|
429
|
+
emptyTitle: 'No template library in this workspace',
|
|
430
|
+
emptyHint: 'The template library is only available in development.',
|
|
431
|
+
occasions: 'Best for',
|
|
432
|
+
audience: 'Audience',
|
|
433
|
+
object: 'Borrows from',
|
|
434
|
+
accent: 'Accent colour',
|
|
435
|
+
create: 'Start with this template',
|
|
436
|
+
close: 'Close',
|
|
437
|
+
previews: 'Page previews',
|
|
381
438
|
},
|
|
382
439
|
build: {
|
|
383
440
|
lead: 'レモン',
|
|
@@ -65,6 +65,40 @@ export type LrText = {
|
|
|
65
65
|
/** The panel that lists the blocks inside the page last clicked. */
|
|
66
66
|
blockPanel: string;
|
|
67
67
|
blockPanelEmpty: string;
|
|
68
|
+
selfCheck: string;
|
|
69
|
+
/** template: "Page {n}" — one row of the findings list. */
|
|
70
|
+
selfCheckPage: string;
|
|
71
|
+
selfCheckPassed: string;
|
|
72
|
+
/** template: "{n} things to look at" */
|
|
73
|
+
selfCheckFindings: string;
|
|
74
|
+
/** template: "{n} places" — how many places one row stands for. */
|
|
75
|
+
selfCheckTimes: string;
|
|
76
|
+
/** The collapsed list of style hints. */
|
|
77
|
+
selfCheckHints: string;
|
|
78
|
+
/** template: "{n} to check" — the badge on a board card. */
|
|
79
|
+
cardFindings: string;
|
|
80
|
+
selfCheckFix: string;
|
|
81
|
+
selfCheckRunning: string;
|
|
82
|
+
selfCheckDone: string;
|
|
83
|
+
/** template: "Page {pages} could not be read, so it was not checked" */
|
|
84
|
+
selfCheckUnread: string;
|
|
85
|
+
/** template: "{n} pages could not be read, so they were not checked" */
|
|
86
|
+
selfCheckUnreadMany: string;
|
|
87
|
+
/** template: "{n} unread" — the board button when pages were unread. */
|
|
88
|
+
selfCheckUnreadBadge: string;
|
|
89
|
+
selfCheckAgain: string;
|
|
90
|
+
/** A board card whose page the check could not read. */
|
|
91
|
+
cardUnread: string;
|
|
92
|
+
/** template: "Type too small ({size}px)" */
|
|
93
|
+
findingTiny: string;
|
|
94
|
+
findingSmallBody: string;
|
|
95
|
+
findingOverflow: string;
|
|
96
|
+
findingOverlap: string;
|
|
97
|
+
findingNoNotes: string;
|
|
98
|
+
/** template: "Title too long ({n} characters)" */
|
|
99
|
+
findingLongTitle: string;
|
|
100
|
+
/** template: "Accent colour used {n} times" */
|
|
101
|
+
findingAccent: string;
|
|
68
102
|
blockKinds: Record<BlockKind, string>;
|
|
69
103
|
blockDrag: string;
|
|
70
104
|
blockMenu: string;
|
|
@@ -398,6 +432,45 @@ export type LrText = {
|
|
|
398
432
|
kindPage: string;
|
|
399
433
|
kindEnd: string;
|
|
400
434
|
back: string;
|
|
435
|
+
occasionLabel: string;
|
|
436
|
+
audienceLabel: string;
|
|
437
|
+
audiencePlaceholder: string;
|
|
438
|
+
unsure: string;
|
|
439
|
+
/** template: "Template: {name}" */
|
|
440
|
+
selectedTemplate: string;
|
|
441
|
+
removeTemplate: string;
|
|
442
|
+
pickTitle: string;
|
|
443
|
+
pickHint: string;
|
|
444
|
+
pickBack: string;
|
|
445
|
+
pickMore: string;
|
|
446
|
+
pickYou: string;
|
|
447
|
+
pickNone: string;
|
|
448
|
+
pickStart: string;
|
|
449
|
+
/** template: "Using {name}: {reason}" */
|
|
450
|
+
pickToast: string;
|
|
451
|
+
pickSample: string;
|
|
452
|
+
/** template: "Adjust {name}" */
|
|
453
|
+
pickKnobsFor: string;
|
|
454
|
+
knobFormal: string;
|
|
455
|
+
knobBright: string;
|
|
456
|
+
knobMotion: string;
|
|
457
|
+
motionHint: string;
|
|
458
|
+
};
|
|
459
|
+
templates: {
|
|
460
|
+
title: string;
|
|
461
|
+
subtitle: string;
|
|
462
|
+
all: string;
|
|
463
|
+
/** template: "{n} pages" */
|
|
464
|
+
pages: string;
|
|
465
|
+
emptyTitle: string;
|
|
466
|
+
emptyHint: string;
|
|
467
|
+
occasions: string;
|
|
468
|
+
audience: string;
|
|
469
|
+
object: string;
|
|
470
|
+
accent: string;
|
|
471
|
+
create: string;
|
|
472
|
+
close: string;
|
|
473
|
+
previews: string;
|
|
401
474
|
};
|
|
402
475
|
build: {
|
|
403
476
|
lead: string;
|