@routinerun/form 0.0.0-stage → 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/README.md +53 -2
- package/bin/routinerun.js +72 -0
- package/package.json +43 -4
- package/schema/skin.v1.schema.json +194 -0
- package/schema/written-routine.v1.schema.json +1722 -0
- package/schema/written-routine.v2.schema.json +2396 -0
- package/src/check.js +102 -0
- package/src/index.js +47 -0
- package/src/link.js +36 -0
- package/src/schema-skin.js +196 -0
- package/src/schema-v1.js +1724 -0
- package/src/schema-v2.js +2398 -0
- package/src/skin.js +14 -0
- package/src/upgrade.js +118 -0
- package/starters/on-call/a-practice-page.json +43 -0
- package/starters/on-call/after-it-is-fixed.json +42 -0
- package/starters/on-call/handing-the-pager-over.json +41 -0
- package/starters/on-call/putting-something-live.json +48 -0
- package/starters/on-call/the-alert-that-keeps-coming-back.json +42 -0
- package/starters/on-call/when-something-pages-you.json +50 -0
- package/starters/starters/a-chapter-at-a-time.json +42 -0
- package/starters/starters/a-glass-of-water.json +51 -0
- package/starters/starters/a-meeting-you-called.json +47 -0
- package/starters/starters/a-post-idea-to-published.json +61 -0
- package/starters/starters/a-shoot-shot-by-shot.json +49 -0
- package/starters/starters/awake-at-three.json +43 -0
- package/starters/starters/before-a-trial-charges-you.json +47 -0
- package/starters/starters/before-people-come-round.json +40 -0
- package/starters/starters/check-a-purchase.json +43 -0
- package/starters/starters/closing-the-day.json +38 -0
- package/starters/starters/count-it-without-looking.json +40 -0
- package/starters/starters/due-diligence-on-a-deal.json +76 -0
- package/starters/starters/fifty-two-and-seventeen.json +37 -0
- package/starters/starters/first-half-hour.json +57 -0
- package/starters/starters/five-sets.json +41 -0
- package/starters/starters/getting-up-when-it-is-dark.json +61 -0
- package/starters/starters/good-night-house.json +53 -0
- package/starters/starters/home-and-the-house-knows.json +42 -0
- package/starters/starters/inbox.json +31 -0
- package/starters/starters/into-deep-work.json +53 -0
- package/starters/starters/leaving-a-note-for-tomorrow.json +37 -0
- package/starters/starters/leaving-it-empty-for-a-week.json +49 -0
- package/starters/starters/out-and-the-house-off.json +43 -0
- package/starters/starters/out-of-the-door.json +37 -0
- package/starters/starters/physio-three-times-a-day.json +60 -0
- package/starters/starters/picking-it-back-up.json +37 -0
- package/starters/starters/pomodoro-four-rounds.json +50 -0
- package/starters/starters/read-it-and-keep-one-thing.json +44 -0
- package/starters/starters/reading-somebodys-code.json +48 -0
- package/starters/starters/receipts-before-they-are-lost.json +45 -0
- package/starters/starters/run-and-walk.json +79 -0
- package/starters/starters/something-that-runs-out.json +42 -0
- package/starters/starters/something-worth-remembering.json +40 -0
- package/starters/starters/standup-before-the-call.json +51 -0
- package/starters/starters/sunday-evening.json +45 -0
- package/starters/starters/tabata-four-minutes.json +73 -0
- package/starters/starters/the-bills-this-month.json +48 -0
- package/starters/starters/the-button-one-press-at-a-time.json +94 -0
- package/starters/starters/the-week-looked-at.json +46 -0
- package/starters/starters/the-weekly-shop.json +50 -0
- package/starters/starters/to-read.json +31 -0
- package/starters/starters/to-watch.json +31 -0
- package/starters/starters/washing-end-to-end.json +43 -0
- package/starters/starters/when-something-breaks.json +46 -0
- package/starters/starters/winding-down.json +58 -0
- package/starters/starters/work-until-you-drift.json +40 -0
package/src/check.js
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
// The part of JSON Schema the written form's schemas use, and nothing more.
|
|
2
|
+
//
|
|
3
|
+
// Moved here from the relay, which now imports it, so the
|
|
4
|
+
// relay, the site and anybody checking a routine on their own machine ask the same
|
|
5
|
+
// questions of it. A keyword the schemas start using is a keyword this has to learn: one it
|
|
6
|
+
// does not know is refused rather than skipped, so a rule cannot be added that a reader
|
|
7
|
+
// quietly ignores. The app's tests check with their own copy of the same rules
|
|
8
|
+
// (SchemaCheck.swift), and the two have to learn a keyword together.
|
|
9
|
+
|
|
10
|
+
const UNDERSTOOD = new Set([
|
|
11
|
+
"$schema", "$id", "$defs", "$ref", "title", "description",
|
|
12
|
+
"type", "const", "enum", "pattern", "minLength", "minimum", "maximum", "minProperties", "minItems", "maxItems",
|
|
13
|
+
"properties", "required", "additionalProperties", "items", "anyOf", "allOf", "not",
|
|
14
|
+
]);
|
|
15
|
+
|
|
16
|
+
/** Every problem with `value` against `schema`, one sentence each, the first most useful. */
|
|
17
|
+
export function problemsAgainst(value, schema) {
|
|
18
|
+
return check(value, schema, schema, "");
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function check(value, schema, root, path) {
|
|
22
|
+
if (!schema || typeof schema !== "object") return [];
|
|
23
|
+
const stranger = Object.keys(schema).find((key) => !UNDERSTOOD.has(key));
|
|
24
|
+
if (stranger) return [`${where(path)}: the schema uses ${stranger}, which this check cannot read.`];
|
|
25
|
+
const found = [];
|
|
26
|
+
if (schema.$ref) {
|
|
27
|
+
const target = root.$defs?.[schema.$ref.replace("#/$defs/", "")];
|
|
28
|
+
if (!target) return [`${where(path)}: ${schema.$ref} names nothing.`];
|
|
29
|
+
found.push(...check(value, target, root, path));
|
|
30
|
+
}
|
|
31
|
+
if (schema.type !== undefined) {
|
|
32
|
+
const allowed = [].concat(schema.type);
|
|
33
|
+
if (!allowed.some((type) => fits(value, type))) return [...found, `${where(path)} should be ${allowed.join(" or ")}.`];
|
|
34
|
+
}
|
|
35
|
+
if ("const" in schema && value !== schema.const) found.push(`${where(path)} should be ${JSON.stringify(schema.const)}.`);
|
|
36
|
+
if (schema.enum && !schema.enum.includes(value)) found.push(`${where(path)} should be one of ${schema.enum.join(", ")}.`);
|
|
37
|
+
if (typeof value === "string") {
|
|
38
|
+
if (schema.pattern && !new RegExp(schema.pattern, "u").test(value)) found.push(`${where(path)} is not written the way it should be: "${value.slice(0, 60)}".`);
|
|
39
|
+
if (schema.minLength !== undefined && [...value].length < schema.minLength) found.push(`${where(path)} is too short.`);
|
|
40
|
+
}
|
|
41
|
+
if (typeof value === "number") {
|
|
42
|
+
if (schema.minimum !== undefined && value < schema.minimum) found.push(`${where(path)} should be at least ${schema.minimum}.`);
|
|
43
|
+
if (schema.maximum !== undefined && value > schema.maximum) found.push(`${where(path)} should be at most ${schema.maximum}.`);
|
|
44
|
+
}
|
|
45
|
+
if (isObject(value)) {
|
|
46
|
+
if (schema.minProperties !== undefined && Object.keys(value).length < schema.minProperties) found.push(`${where(path)} is empty.`);
|
|
47
|
+
for (const key of schema.required ?? []) if (!(key in value)) found.push(`${where(path)} needs "${key}".`);
|
|
48
|
+
for (const [key, field] of Object.entries(value)) {
|
|
49
|
+
const rule = schema.properties?.[key];
|
|
50
|
+
if (rule) found.push(...check(field, rule, root, `${path}.${key}`));
|
|
51
|
+
else if (schema.additionalProperties === false) found.push(`${where(path)} has "${key}", which it cannot have.`);
|
|
52
|
+
else if (schema.additionalProperties) found.push(...check(field, schema.additionalProperties, root, `${path}.${key}`));
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
if (Array.isArray(value)) {
|
|
56
|
+
if (schema.minItems !== undefined && value.length < schema.minItems) found.push(`${where(path)} needs at least ${schema.minItems}.`);
|
|
57
|
+
if (schema.maxItems !== undefined && value.length > schema.maxItems) found.push(`${where(path)} can hold at most ${schema.maxItems}.`);
|
|
58
|
+
if (schema.items) value.forEach((element, index) => found.push(...check(element, schema.items, root, `${path}[${index}]`)));
|
|
59
|
+
}
|
|
60
|
+
for (const rule of schema.allOf ?? []) found.push(...check(value, rule, root, path));
|
|
61
|
+
if (schema.anyOf) {
|
|
62
|
+
const each = schema.anyOf.map((rule) => check(value, rule, root, path));
|
|
63
|
+
if (!each.some((problems) => problems.length === 0)) {
|
|
64
|
+
// The shape that came nearest says what was meant: one whose own word is there — an
|
|
65
|
+
// action whose argument is wrong — before any other, then whichever is wrong least.
|
|
66
|
+
const named = schema.anyOf.map((rule, index) => ({ rule, problems: each[index] }))
|
|
67
|
+
.filter(({ rule }) => isObject(value) && rule.required?.length && rule.required.every((key) => key in value))
|
|
68
|
+
.map(({ problems }) => problems);
|
|
69
|
+
const nearest = (named.length ? named : each).reduce((best, problems) => (problems.length < best.length ? problems : best));
|
|
70
|
+
found.push(nearest[0] ?? `${where(path)} is not a shape the form has.`);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
if (schema.not && check(value, schema.not, root, path).length === 0) {
|
|
74
|
+
found.push(schema.not.description ? `${where(path)} cannot have ${schema.not.description}.` : `${where(path)} is a shape the form does not allow.`);
|
|
75
|
+
}
|
|
76
|
+
return found;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
function fits(value, type) {
|
|
80
|
+
switch (type) {
|
|
81
|
+
case "object": return isObject(value);
|
|
82
|
+
case "array": return Array.isArray(value);
|
|
83
|
+
case "string": return typeof value === "string";
|
|
84
|
+
case "boolean": return typeof value === "boolean";
|
|
85
|
+
case "number": return typeof value === "number" && Number.isFinite(value);
|
|
86
|
+
case "integer": return Number.isInteger(value);
|
|
87
|
+
case "null": return value === null;
|
|
88
|
+
default: return false;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export function isObject(value) {
|
|
93
|
+
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// "steps[2].does[0]" reads as step 3's first action, which is how a person and a model count.
|
|
97
|
+
function where(path) {
|
|
98
|
+
if (!path) return "The routine";
|
|
99
|
+
const step = path.match(/^\.steps\[(\d+)\](.*)$/);
|
|
100
|
+
if (step) return `Step ${Number(step[1]) + 1}${step[2] ? ` (${step[2].replace(/^\./, "")})` : ""}`;
|
|
101
|
+
return `"${path.replace(/^\./, "")}"`;
|
|
102
|
+
}
|
package/src/index.js
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
// @routinerun/form: check, upgrade and link a routine written for Routine Run.
|
|
2
|
+
//
|
|
3
|
+
// The written form is what an assistant, a person or a script writes and what the app reads
|
|
4
|
+
// (developers/written-routine.md). Form 2 is the app's own words; form 1 is still read,
|
|
5
|
+
// and upgrade() turns it into form 2 by the table the app uses. The schemas in schema/ are
|
|
6
|
+
// written by the app's own reader (WrittenRoutineSchema.swift), never by hand.
|
|
7
|
+
|
|
8
|
+
import v1 from "./schema-v1.js";
|
|
9
|
+
import v2 from "./schema-v2.js";
|
|
10
|
+
import { problemsAgainst, isObject } from "./check.js";
|
|
11
|
+
import { upgrade, NEWEST_FORM } from "./upgrade.js";
|
|
12
|
+
|
|
13
|
+
export { upgrade, NEWEST_FORM, problemsAgainst };
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* The form an assistant is taught, and so the one a routine is asked for in and the newest a
|
|
17
|
+
* link takes (WrittenRoutine.teachesForm in the app). Form 2 since 15 November 2026: it waited
|
|
18
|
+
* until a build that reads it was on the App Store, because a link or a prompt is read on
|
|
19
|
+
* whatever phone it reaches. Form 1 is still taken everywhere.
|
|
20
|
+
*/
|
|
21
|
+
export const TAUGHT_FORM = 2;
|
|
22
|
+
|
|
23
|
+
/** Each form's schema, by its number. */
|
|
24
|
+
export const SCHEMAS = { 1: v1, 2: v2 };
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Every problem with a routine, one sentence each, the first the one to fix first: an empty
|
|
28
|
+
* list when there is none. `needsSteps` is for a run, which cannot start with none. `upTo` is
|
|
29
|
+
* the newest form taken: a link, read on any phone, takes only `TAUGHT_FORM`.
|
|
30
|
+
*/
|
|
31
|
+
export function problems(routine, { needsSteps = false, upTo = NEWEST_FORM } = {}) {
|
|
32
|
+
if (!isObject(routine)) return ["Send one routine as a JSON object."];
|
|
33
|
+
const form = routine.routineRun;
|
|
34
|
+
if (!Number.isInteger(form) || form < 1) {
|
|
35
|
+
return [`The routine needs "routineRun": ${TAUGHT_FORM}, so the app knows which form it is in.`];
|
|
36
|
+
}
|
|
37
|
+
if (form > upTo) {
|
|
38
|
+
return [`This is written in form ${form} ("routineRun": ${form}), and the newest form taken here is ${upTo}. Write it in form ${TAUGHT_FORM}.`];
|
|
39
|
+
}
|
|
40
|
+
if (needsSteps && Array.isArray(routine.steps) && routine.steps.length === 0) return ['The routine needs "steps", at least one.'];
|
|
41
|
+
return problemsAgainst(routine, SCHEMAS[form]);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/** The first problem with a routine, or null when there is none. */
|
|
45
|
+
export function problemWith(routine, options) {
|
|
46
|
+
return problems(routine, options)[0] ?? null;
|
|
47
|
+
}
|
package/src/link.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// A link that opens a routine on whatever phone it reaches: https://routinerun.com/w?d=…, the
|
|
2
|
+
// routine's JSON deflated raw and written in base64url. The same link the relay's
|
|
3
|
+
// routine_link makes, with the same longest length.
|
|
4
|
+
//
|
|
5
|
+
// A link is read on any phone, so it carries no form newer than the one an assistant is taught
|
|
6
|
+
// (TAUGHT_FORM), which is the one the app hands out too.
|
|
7
|
+
import { problems, TAUGHT_FORM } from "./index.js";
|
|
8
|
+
|
|
9
|
+
export const SITE = "https://routinerun.com";
|
|
10
|
+
export const MAXIMUM_LINK = 6000;
|
|
11
|
+
|
|
12
|
+
async function deflate(text) {
|
|
13
|
+
const stream = new Blob([new TextEncoder().encode(text)]).stream().pipeThrough(new CompressionStream("deflate-raw"));
|
|
14
|
+
return new Uint8Array(await new Response(stream).arrayBuffer());
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function b64url(bytes) {
|
|
18
|
+
let binary = "";
|
|
19
|
+
for (const byte of bytes) binary += String.fromCharCode(byte);
|
|
20
|
+
return btoa(binary).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* `{ link }` for a routine a phone can open, `{ link: null, json }` for one too long to be a
|
|
25
|
+
* link (copy the JSON instead), or `{ problem }` when it is not one to hand out.
|
|
26
|
+
*/
|
|
27
|
+
export async function linkFor(routine) {
|
|
28
|
+
const found = problems(routine, { needsSteps: true, upTo: TAUGHT_FORM });
|
|
29
|
+
if (found.length) {
|
|
30
|
+
const later = routine?.routineRun > TAUGHT_FORM ? ` A link carries form ${TAUGHT_FORM} until the app that reads form ${routine.routineRun} is on the App Store.` : "";
|
|
31
|
+
return { problem: found[0] + later };
|
|
32
|
+
}
|
|
33
|
+
const json = JSON.stringify(routine);
|
|
34
|
+
const link = `${SITE}/w?d=${b64url(await deflate(json))}`;
|
|
35
|
+
return { json, link: link.length <= MAXIMUM_LINK ? link : null };
|
|
36
|
+
}
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
// The skin schema as a module, for readers without JSON imports. schema/skin.v1.schema.json is
|
|
2
|
+
// the same object, and test/skin.test.js fails while the two differ.
|
|
3
|
+
export default {
|
|
4
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
5
|
+
"$id": "https://routinerun.com/schema/skin.v1.json",
|
|
6
|
+
"title": "Routine Run: a skin (version 1)",
|
|
7
|
+
"description": "How the rows of a page look: their density, their type, their radius and the colours of the ground they stand on. A skin changes nothing about what a row says: the kind word, the dot that says whose a thing is, the routine's group under \"From\" and the order in which a long line is cut are the app's, on every skin. Colours only, no code: a skin is data anybody can write and nobody has to trust.",
|
|
8
|
+
"type": "object",
|
|
9
|
+
"additionalProperties": false,
|
|
10
|
+
"required": [
|
|
11
|
+
"skin",
|
|
12
|
+
"name",
|
|
13
|
+
"light",
|
|
14
|
+
"dark",
|
|
15
|
+
"rows",
|
|
16
|
+
"type"
|
|
17
|
+
],
|
|
18
|
+
"properties": {
|
|
19
|
+
"skin": {
|
|
20
|
+
"const": 1,
|
|
21
|
+
"description": "The version of this shape."
|
|
22
|
+
},
|
|
23
|
+
"name": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"pattern": "\\S"
|
|
26
|
+
},
|
|
27
|
+
"audience": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"description": "Who it is for, in a sentence."
|
|
30
|
+
},
|
|
31
|
+
"light": {
|
|
32
|
+
"$ref": "#/$defs/palette"
|
|
33
|
+
},
|
|
34
|
+
"dark": {
|
|
35
|
+
"$ref": "#/$defs/palette"
|
|
36
|
+
},
|
|
37
|
+
"rows": {
|
|
38
|
+
"type": "object",
|
|
39
|
+
"additionalProperties": false,
|
|
40
|
+
"required": [
|
|
41
|
+
"padding",
|
|
42
|
+
"minHeight",
|
|
43
|
+
"radius",
|
|
44
|
+
"detailLines",
|
|
45
|
+
"layout"
|
|
46
|
+
],
|
|
47
|
+
"properties": {
|
|
48
|
+
"padding": {
|
|
49
|
+
"type": "number",
|
|
50
|
+
"minimum": 4,
|
|
51
|
+
"maximum": 16,
|
|
52
|
+
"description": "Points above and below a row's words."
|
|
53
|
+
},
|
|
54
|
+
"minHeight": {
|
|
55
|
+
"type": "number",
|
|
56
|
+
"minimum": 32,
|
|
57
|
+
"maximum": 64,
|
|
58
|
+
"description": "Points. 44 is the system's least for something that is pressed."
|
|
59
|
+
},
|
|
60
|
+
"radius": {
|
|
61
|
+
"type": "number",
|
|
62
|
+
"minimum": 0,
|
|
63
|
+
"maximum": 24,
|
|
64
|
+
"description": "Points, on the card a list of rows sits in."
|
|
65
|
+
},
|
|
66
|
+
"detailLines": {
|
|
67
|
+
"type": "integer",
|
|
68
|
+
"minimum": 1,
|
|
69
|
+
"maximum": 3,
|
|
70
|
+
"description": "How many lines a row's second line may take before it is cut."
|
|
71
|
+
},
|
|
72
|
+
"layout": {
|
|
73
|
+
"enum": [
|
|
74
|
+
"twoLines",
|
|
75
|
+
"oneLine"
|
|
76
|
+
],
|
|
77
|
+
"description": "\"oneLine\" puts the second line after the name, for a dense screen."
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"type": {
|
|
82
|
+
"type": "object",
|
|
83
|
+
"additionalProperties": false,
|
|
84
|
+
"required": [
|
|
85
|
+
"title",
|
|
86
|
+
"detail"
|
|
87
|
+
],
|
|
88
|
+
"properties": {
|
|
89
|
+
"title": {
|
|
90
|
+
"$ref": "#/$defs/font"
|
|
91
|
+
},
|
|
92
|
+
"detail": {
|
|
93
|
+
"$ref": "#/$defs/font"
|
|
94
|
+
},
|
|
95
|
+
"value": {
|
|
96
|
+
"$ref": "#/$defs/font"
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
"$defs": {
|
|
102
|
+
"palette": {
|
|
103
|
+
"type": "object",
|
|
104
|
+
"additionalProperties": false,
|
|
105
|
+
"required": [
|
|
106
|
+
"page",
|
|
107
|
+
"card",
|
|
108
|
+
"ink",
|
|
109
|
+
"ink2",
|
|
110
|
+
"ink3",
|
|
111
|
+
"line",
|
|
112
|
+
"fill",
|
|
113
|
+
"accent",
|
|
114
|
+
"unanswered"
|
|
115
|
+
],
|
|
116
|
+
"properties": {
|
|
117
|
+
"page": {
|
|
118
|
+
"type": "string",
|
|
119
|
+
"pattern": "^(#[0-9A-Fa-f]{6}([0-9A-Fa-f]{2})?|rgba?\\(\\s*\\d{1,3}\\s*,\\s*\\d{1,3}\\s*,\\s*\\d{1,3}\\s*(,\\s*(0|1|0?\\.\\d+)\\s*)?\\))$",
|
|
120
|
+
"description": "The ground every card sits on."
|
|
121
|
+
},
|
|
122
|
+
"card": {
|
|
123
|
+
"type": "string",
|
|
124
|
+
"pattern": "^(#[0-9A-Fa-f]{6}([0-9A-Fa-f]{2})?|rgba?\\(\\s*\\d{1,3}\\s*,\\s*\\d{1,3}\\s*,\\s*\\d{1,3}\\s*(,\\s*(0|1|0?\\.\\d+)\\s*)?\\))$",
|
|
125
|
+
"description": "A card: a list, a sheet, a row's surface."
|
|
126
|
+
},
|
|
127
|
+
"ink": {
|
|
128
|
+
"type": "string",
|
|
129
|
+
"pattern": "^(#[0-9A-Fa-f]{6}([0-9A-Fa-f]{2})?|rgba?\\(\\s*\\d{1,3}\\s*,\\s*\\d{1,3}\\s*,\\s*\\d{1,3}\\s*(,\\s*(0|1|0?\\.\\d+)\\s*)?\\))$",
|
|
130
|
+
"description": "Words at full weight: a row's name."
|
|
131
|
+
},
|
|
132
|
+
"ink2": {
|
|
133
|
+
"type": "string",
|
|
134
|
+
"pattern": "^(#[0-9A-Fa-f]{6}([0-9A-Fa-f]{2})?|rgba?\\(\\s*\\d{1,3}\\s*,\\s*\\d{1,3}\\s*,\\s*\\d{1,3}\\s*(,\\s*(0|1|0?\\.\\d+)\\s*)?\\))$",
|
|
135
|
+
"description": "Secondary words: the second line of a row."
|
|
136
|
+
},
|
|
137
|
+
"ink3": {
|
|
138
|
+
"type": "string",
|
|
139
|
+
"pattern": "^(#[0-9A-Fa-f]{6}([0-9A-Fa-f]{2})?|rgba?\\(\\s*\\d{1,3}\\s*,\\s*\\d{1,3}\\s*,\\s*\\d{1,3}\\s*(,\\s*(0|1|0?\\.\\d+)\\s*)?\\))$",
|
|
140
|
+
"description": "The quietest words: a chevron, a hint."
|
|
141
|
+
},
|
|
142
|
+
"line": {
|
|
143
|
+
"type": "string",
|
|
144
|
+
"pattern": "^(#[0-9A-Fa-f]{6}([0-9A-Fa-f]{2})?|rgba?\\(\\s*\\d{1,3}\\s*,\\s*\\d{1,3}\\s*,\\s*\\d{1,3}\\s*(,\\s*(0|1|0?\\.\\d+)\\s*)?\\))$",
|
|
145
|
+
"description": "A separator between rows."
|
|
146
|
+
},
|
|
147
|
+
"fill": {
|
|
148
|
+
"type": "string",
|
|
149
|
+
"pattern": "^(#[0-9A-Fa-f]{6}([0-9A-Fa-f]{2})?|rgba?\\(\\s*\\d{1,3}\\s*,\\s*\\d{1,3}\\s*,\\s*\\d{1,3}\\s*(,\\s*(0|1|0?\\.\\d+)\\s*)?\\))$",
|
|
150
|
+
"description": "A control's resting fill: a stepper, a chip."
|
|
151
|
+
},
|
|
152
|
+
"accent": {
|
|
153
|
+
"type": "string",
|
|
154
|
+
"pattern": "^(#[0-9A-Fa-f]{6}([0-9A-Fa-f]{2})?|rgba?\\(\\s*\\d{1,3}\\s*,\\s*\\d{1,3}\\s*,\\s*\\d{1,3}\\s*(,\\s*(0|1|0?\\.\\d+)\\s*)?\\))$",
|
|
155
|
+
"description": "What a press does: a row that acts, a switch that is on."
|
|
156
|
+
},
|
|
157
|
+
"unanswered": {
|
|
158
|
+
"type": "string",
|
|
159
|
+
"pattern": "^(#[0-9A-Fa-f]{6}([0-9A-Fa-f]{2})?|rgba?\\(\\s*\\d{1,3}\\s*,\\s*\\d{1,3}\\s*,\\s*\\d{1,3}\\s*(,\\s*(0|1|0?\\.\\d+)\\s*)?\\))$",
|
|
160
|
+
"description": "The dot on what is local and nobody has answered for."
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
"font": {
|
|
165
|
+
"type": "object",
|
|
166
|
+
"additionalProperties": false,
|
|
167
|
+
"required": [
|
|
168
|
+
"size"
|
|
169
|
+
],
|
|
170
|
+
"properties": {
|
|
171
|
+
"family": {
|
|
172
|
+
"enum": [
|
|
173
|
+
"system",
|
|
174
|
+
"serif",
|
|
175
|
+
"rounded",
|
|
176
|
+
"mono"
|
|
177
|
+
],
|
|
178
|
+
"description": "Which of the phone's own families; a skin brings no font files."
|
|
179
|
+
},
|
|
180
|
+
"weight": {
|
|
181
|
+
"enum": [
|
|
182
|
+
400,
|
|
183
|
+
500,
|
|
184
|
+
600
|
|
185
|
+
]
|
|
186
|
+
},
|
|
187
|
+
"size": {
|
|
188
|
+
"type": "number",
|
|
189
|
+
"minimum": 10,
|
|
190
|
+
"maximum": 20,
|
|
191
|
+
"description": "Points, at the default text size; Dynamic Type scales it."
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
};
|