@nowline/core 0.0.0-dev.20261015070140.g0e948e9 → 0.0.0-dev.20261015073146.gdb78b2e
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/language/validator/tables.d.ts +4 -4
- package/dist/language/validator/tables.d.ts.map +1 -1
- package/dist/language/validator/tables.js +8 -37
- package/dist/language/validator/tables.js.map +1 -1
- package/dist/language/value-tables.d.ts +19 -0
- package/dist/language/value-tables.d.ts.map +1 -1
- package/dist/language/value-tables.js +47 -0
- package/dist/language/value-tables.js.map +1 -1
- package/package.json +1 -1
- package/src/language/validator/tables.ts +13 -36
- package/src/language/value-tables.ts +51 -0
|
@@ -7,9 +7,9 @@ export declare const STYLE_PROP_KEYS: Set<string>;
|
|
|
7
7
|
export declare const NON_WORKING_VALUES: ReadonlySet<string>;
|
|
8
8
|
export declare const ROADMAP_ONLY_STYLE_KEYS: Set<string>;
|
|
9
9
|
export declare const UTILIZATION_NONE = "none";
|
|
10
|
-
export declare const STYLE_PROP_ENUMS: Record<string,
|
|
11
|
-
export declare const COLOR_NAMES:
|
|
12
|
-
export declare const CALENDAR_MODES:
|
|
10
|
+
export declare const STYLE_PROP_ENUMS: Record<string, ReadonlySet<string>>;
|
|
11
|
+
export declare const COLOR_NAMES: ReadonlySet<string>;
|
|
12
|
+
export declare const CALENDAR_MODES: ReadonlySet<string>;
|
|
13
13
|
export declare const CALENDAR_FIELDS: Set<string>;
|
|
14
14
|
export declare const SCALE_FIELDS: Set<string>;
|
|
15
15
|
export declare const DEFAULT_ENTITY_TYPES: Set<string>;
|
|
@@ -29,6 +29,6 @@ export declare const POSITIVE_DECIMAL_FRACTION_RE: RegExp;
|
|
|
29
29
|
export declare const POSITIVE_INTEGER_RE: RegExp;
|
|
30
30
|
export declare const ASCII_FALLBACK_RE: RegExp;
|
|
31
31
|
export declare const BCP47_RE: RegExp;
|
|
32
|
-
export declare const INCLUDE_MODES:
|
|
32
|
+
export declare const INCLUDE_MODES: ReadonlySet<string>;
|
|
33
33
|
export declare const DIRECTIVE_FIELDS: Set<string>;
|
|
34
34
|
//# sourceMappingURL=tables.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tables.d.ts","sourceRoot":"","sources":["../../../src/language/validator/tables.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"tables.d.ts","sourceRoot":"","sources":["../../../src/language/validator/tables.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAYhE,eAAO,MAAM,iBAAiB,OAAO,CAAC;AAItC,eAAO,MAAM,kBAAkB,EAAE,WAAW,CAAC,MAAM,CAA6B,CAAC;AACjF,eAAO,MAAM,yBAAyB,EAAE,WAAW,CAAC,MAAM,CAAmC,CAAC;AAC9F,eAAO,MAAM,qBAAqB,EAAE,WAAW,CAAC,MAAM,CAA+B,CAAC;AAEtF,eAAO,MAAM,eAAe,aAqB1B,CAAC;AAKH,eAAO,MAAM,kBAAkB,EAAE,WAAW,CAAC,MAAM,CAAiC,CAAC;AAMrF,eAAO,MAAM,uBAAuB,aAMlC,CAAC;AAMH,eAAO,MAAM,gBAAgB,SAAS,CAAC;AAIvC,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,CAEhE,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,WAAW,CAAC,MAAM,CAA4B,CAAC;AAEzE,eAAO,MAAM,cAAc,EAAE,WAAW,CAAC,MAAM,CAA+B,CAAC;AAE/E,eAAO,MAAM,eAAe,aAK1B,CAAC;AAEH,eAAO,MAAM,YAAY,aAA4C,CAAC;AAEtE,eAAO,MAAM,oBAAoB,aAU/B,CAAC;AAMH,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,iBAAiB,EAAE,GAAG,CAAC,MAAM,CAAC,CAmBjE,CAAC;AAQF,eAAO,MAAM,sBAAsB,aAAsD,CAAC;AAY1F,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAkD1D,CAAC;AAuBF,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,CAAC,MAAM,CAAC,GAAG,MAAM,GAAG,SAAS,CAM1F;AAGD,eAAO,MAAM,WAAW,QAA2B,CAAC;AACpD,eAAO,MAAM,aAAa,QAAW,CAAC;AACtC,eAAO,MAAM,YAAY,QAAwB,CAAC;AAClD,eAAO,MAAM,UAAU,QAAW,CAAC;AACnC,eAAO,MAAM,UAAU,QAAU,CAAC;AAClC,eAAO,MAAM,uBAAuB,QAAc,CAAC;AAInD,eAAO,MAAM,kBAAkB,QAAkB,CAAC;AAClD,eAAO,MAAM,mBAAmB,QAAmB,CAAC;AAKpD,eAAO,MAAM,4BAA4B,QAAe,CAAC;AACzD,eAAO,MAAM,mBAAmB,QAAU,CAAC;AAG3C,eAAO,MAAM,iBAAiB,QAAuB,CAAC;AAMtD,eAAO,MAAM,QAAQ,QAA0C,CAAC;AAGhE,eAAO,MAAM,aAAa,EAAE,WAAW,CAAC,MAAM,CAA8B,CAAC;AAK7E,eAAO,MAAM,gBAAgB,aAAsB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Constants, vocabularies and regexes the validator's checks share
|
|
2
2
|
// (specs/core-ast-utilities.md §3.6). Moved out of nowline-validator.ts as-is.
|
|
3
|
-
import { BUILTIN_CAPACITY_ICONS, BUILTIN_ICON_NAMES, BUILTIN_STATUSES, NON_WORKING_DISPLAYS, } from '../value-tables.js';
|
|
3
|
+
import { BUILTIN_CAPACITY_ICONS, BUILTIN_ICON_NAMES, BUILTIN_STATUSES, CALENDAR_MODES as CALENDAR_MODE_LIST, COLOR_NAMES as COLOR_NAME_LIST, INCLUDE_MODES as INCLUDE_MODE_LIST, NON_WORKING_DISPLAYS, STYLE_PROP_ENUMS as STYLE_PROP_ENUM_LISTS, } from '../value-tables.js';
|
|
4
4
|
export const SUPPORTED_VERSION = 'v1';
|
|
5
5
|
// Built-in vocabularies come from value-tables.ts; the validator checks
|
|
6
6
|
// membership, so it holds them as sets.
|
|
@@ -49,41 +49,11 @@ export const ROADMAP_ONLY_STYLE_KEYS = new Set([
|
|
|
49
49
|
// (positive percent, decimal, integer) are validated separately via
|
|
50
50
|
// POSITIVE_NUMBER_RE / POSITIVE_PERCENT_RE.
|
|
51
51
|
export const UTILIZATION_NONE = 'none';
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
italic: new Set(['true', 'false']),
|
|
58
|
-
'text-size': new Set(['none', 'xs', 'sm', 'md', 'lg', 'xl']),
|
|
59
|
-
padding: new Set(['none', 'xs', 'sm', 'md', 'lg', 'xl']),
|
|
60
|
-
spacing: new Set(['none', 'xs', 'sm', 'md', 'lg', 'xl']),
|
|
61
|
-
'header-height': new Set(['none', 'xs', 'sm', 'md', 'lg', 'xl']),
|
|
62
|
-
'corner-radius': new Set(['none', 'xs', 'sm', 'md', 'lg', 'xl', 'full']),
|
|
63
|
-
bracket: new Set(['none', 'solid', 'dashed']),
|
|
64
|
-
'header-position': new Set(['beside', 'above']),
|
|
65
|
-
'timeline-position': new Set(['top', 'bottom', 'both']),
|
|
66
|
-
'minor-grid': new Set(['true', 'false']),
|
|
67
|
-
};
|
|
68
|
-
// Built-in color vocabulary. `grey` and `violet` are international-friendly
|
|
69
|
-
// aliases for `gray` and `purple` — they canonicalize at the theme
|
|
70
|
-
// boundary (resolveColor in packages/layout/src/themes/index.ts) so themes
|
|
71
|
-
// don't grow new fields. Both spellings remain valid input.
|
|
72
|
-
export const COLOR_NAMES = new Set([
|
|
73
|
-
'red',
|
|
74
|
-
'blue',
|
|
75
|
-
'yellow',
|
|
76
|
-
'green',
|
|
77
|
-
'orange',
|
|
78
|
-
'purple',
|
|
79
|
-
'violet',
|
|
80
|
-
'gray',
|
|
81
|
-
'grey',
|
|
82
|
-
'navy',
|
|
83
|
-
'white',
|
|
84
|
-
'none',
|
|
85
|
-
]);
|
|
86
|
-
export const CALENDAR_MODES = new Set(['business', 'full', 'custom']);
|
|
52
|
+
// Style enums, colour names and calendar modes come from value-tables.ts,
|
|
53
|
+
// held here as sets for the membership checks.
|
|
54
|
+
export const STYLE_PROP_ENUMS = Object.fromEntries(Object.entries(STYLE_PROP_ENUM_LISTS).map(([key, values]) => [key, new Set(values)]));
|
|
55
|
+
export const COLOR_NAMES = new Set(COLOR_NAME_LIST);
|
|
56
|
+
export const CALENDAR_MODES = new Set(CALENDAR_MODE_LIST);
|
|
87
57
|
export const CALENDAR_FIELDS = new Set([
|
|
88
58
|
'days-per-week',
|
|
89
59
|
'days-per-month',
|
|
@@ -244,7 +214,8 @@ export const ASCII_FALLBACK_RE = /^[\x20-\x7E]{1,3}$/;
|
|
|
244
214
|
// Permissive enough for `fr`, `fr-CA`, `zh-CN`, `es-419` while rejecting obvious typos.
|
|
245
215
|
// The runtime resolver does the actual fallback work; this regex just gates input shape.
|
|
246
216
|
export const BCP47_RE = /^[a-zA-Z]{2,3}(-[a-zA-Z]{2}|-\d{3})?$/;
|
|
247
|
-
|
|
217
|
+
// From value-tables.ts, held as a set for the membership check.
|
|
218
|
+
export const INCLUDE_MODES = new Set(INCLUDE_MODE_LIST);
|
|
248
219
|
// Allow-listed property keys on the `nowline` directive line. The directive existed
|
|
249
220
|
// historically as `nowline v1` only; properties are a forward-extension point but stay
|
|
250
221
|
// restrictive so authors get an early error instead of typos rendering silently.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tables.js","sourceRoot":"","sources":["../../../src/language/validator/tables.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,+EAA+E;AAG/E,OAAO,EACH,sBAAsB,EACtB,kBAAkB,EAClB,gBAAgB,EAChB,oBAAoB,
|
|
1
|
+
{"version":3,"file":"tables.js","sourceRoot":"","sources":["../../../src/language/validator/tables.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,+EAA+E;AAG/E,OAAO,EACH,sBAAsB,EACtB,kBAAkB,EAClB,gBAAgB,EAChB,cAAc,IAAI,kBAAkB,EACpC,WAAW,IAAI,eAAe,EAC9B,aAAa,IAAI,iBAAiB,EAClC,oBAAoB,EACpB,gBAAgB,IAAI,qBAAqB,GAC5C,MAAM,oBAAoB,CAAC;AAE5B,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,CAAC;AAEtC,wEAAwE;AACxE,wCAAwC;AACxC,MAAM,CAAC,MAAM,kBAAkB,GAAwB,IAAI,GAAG,CAAC,gBAAgB,CAAC,CAAC;AACjF,MAAM,CAAC,MAAM,yBAAyB,GAAwB,IAAI,GAAG,CAAC,sBAAsB,CAAC,CAAC;AAC9F,MAAM,CAAC,MAAM,qBAAqB,GAAwB,IAAI,GAAG,CAAC,kBAAkB,CAAC,CAAC;AAEtF,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,GAAG,CAAC;IACnC,IAAI;IACJ,IAAI;IACJ,MAAM;IACN,QAAQ;IACR,MAAM;IACN,QAAQ;IACR,MAAM;IACN,QAAQ;IACR,QAAQ;IACR,WAAW;IACX,SAAS;IACT,SAAS;IACT,eAAe;IACf,eAAe;IACf,SAAS;IACT,iBAAiB;IACjB,eAAe;IACf,mBAAmB;IACnB,YAAY;IACZ,aAAa;CAChB,CAAC,CAAC;AAEH,sEAAsE;AACtE,yEAAyE;AACzE,kEAAkE;AAClE,MAAM,CAAC,MAAM,kBAAkB,GAAwB,IAAI,GAAG,CAAC,oBAAoB,CAAC,CAAC;AAErF,2EAA2E;AAC3E,4EAA4E;AAC5E,2EAA2E;AAC3E,0EAA0E;AAC1E,MAAM,CAAC,MAAM,uBAAuB,GAAG,IAAI,GAAG,CAAC;IAC3C,eAAe;IACf,iBAAiB;IACjB,mBAAmB;IACnB,YAAY;IACZ,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IAAI,GAAG,CAAC,iBAAiB,CAAC,CAAC;AAE7E,oFAAoF;AACpF,uFAAuF;AACvF,iFAAiF;AACjF,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC"}
|
|
@@ -27,5 +27,24 @@ export declare const BUILTIN_ICON_NAMES: readonly string[];
|
|
|
27
27
|
export declare const NON_WORKING_DISPLAYS: readonly ['hide', 'show'];
|
|
28
28
|
/** One of the `non-working:` display values. */
|
|
29
29
|
export type NonWorkingDisplay = (typeof NON_WORKING_DISPLAYS)[number];
|
|
30
|
+
/**
|
|
31
|
+
* Values of each enumerated style key (specs/dsl.md rule 19), in
|
|
32
|
+
* documentation order. `non-working:` is not here: it has its own table and
|
|
33
|
+
* its own error code. Colour keys (`bg`, `fg`, `text`) take `COLOR_NAMES` or
|
|
34
|
+
* a hex value instead.
|
|
35
|
+
*/
|
|
36
|
+
export declare const STYLE_PROP_ENUMS: Readonly<Record<string, readonly string[]>>;
|
|
37
|
+
/**
|
|
38
|
+
* Built-in colour vocabulary for `bg`, `fg` and `text`. `grey` and `violet`
|
|
39
|
+
* are international-friendly aliases for `gray` and `purple`: they
|
|
40
|
+
* canonicalize at the theme boundary (resolveColor in
|
|
41
|
+
* packages/layout/src/themes/index.ts) so themes don't grow new fields. Both
|
|
42
|
+
* spellings remain valid input.
|
|
43
|
+
*/
|
|
44
|
+
export declare const COLOR_NAMES: readonly string[];
|
|
45
|
+
/** Values of `calendar:` on the `roadmap` line. */
|
|
46
|
+
export declare const CALENDAR_MODES: readonly string[];
|
|
47
|
+
/** Values of `config:` and `roadmap:` on an `include` line. */
|
|
48
|
+
export declare const INCLUDE_MODES: readonly string[];
|
|
30
49
|
export { WEEKDAYS } from './calendar-declarations.js';
|
|
31
50
|
//# sourceMappingURL=value-tables.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"value-tables.d.ts","sourceRoot":"","sources":["../../src/language/value-t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;AAC/D,eAAO,MAAM,aAAa,EAAE,SAAS,MAAM,EAAmC,CAAC;AAE/E,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC"}
|
|
@@ -51,5 +51,52 @@ export const BUILTIN_ICON_NAMES = [
|
|
|
51
51
|
* (specs/working-calendar.md §4.2), in documentation order.
|
|
52
52
|
*/
|
|
53
53
|
export const NON_WORKING_DISPLAYS = ['hide', 'show'];
|
|
54
|
+
/**
|
|
55
|
+
* Values of each enumerated style key (specs/dsl.md rule 19), in
|
|
56
|
+
* documentation order. `non-working:` is not here: it has its own table and
|
|
57
|
+
* its own error code. Colour keys (`bg`, `fg`, `text`) take `COLOR_NAMES` or
|
|
58
|
+
* a hex value instead.
|
|
59
|
+
*/
|
|
60
|
+
export const STYLE_PROP_ENUMS = {
|
|
61
|
+
border: ['solid', 'dashed', 'dotted'],
|
|
62
|
+
shadow: ['none', 'subtle', 'soft', 'hard'],
|
|
63
|
+
font: ['sans', 'serif', 'mono'],
|
|
64
|
+
weight: ['thin', 'light', 'normal', 'bold'],
|
|
65
|
+
italic: ['true', 'false'],
|
|
66
|
+
'text-size': ['none', 'xs', 'sm', 'md', 'lg', 'xl'],
|
|
67
|
+
padding: ['none', 'xs', 'sm', 'md', 'lg', 'xl'],
|
|
68
|
+
spacing: ['none', 'xs', 'sm', 'md', 'lg', 'xl'],
|
|
69
|
+
'header-height': ['none', 'xs', 'sm', 'md', 'lg', 'xl'],
|
|
70
|
+
'corner-radius': ['none', 'xs', 'sm', 'md', 'lg', 'xl', 'full'],
|
|
71
|
+
bracket: ['none', 'solid', 'dashed'],
|
|
72
|
+
'header-position': ['beside', 'above'],
|
|
73
|
+
'timeline-position': ['top', 'bottom', 'both'],
|
|
74
|
+
'minor-grid': ['true', 'false'],
|
|
75
|
+
};
|
|
76
|
+
/**
|
|
77
|
+
* Built-in colour vocabulary for `bg`, `fg` and `text`. `grey` and `violet`
|
|
78
|
+
* are international-friendly aliases for `gray` and `purple`: they
|
|
79
|
+
* canonicalize at the theme boundary (resolveColor in
|
|
80
|
+
* packages/layout/src/themes/index.ts) so themes don't grow new fields. Both
|
|
81
|
+
* spellings remain valid input.
|
|
82
|
+
*/
|
|
83
|
+
export const COLOR_NAMES = [
|
|
84
|
+
'red',
|
|
85
|
+
'blue',
|
|
86
|
+
'yellow',
|
|
87
|
+
'green',
|
|
88
|
+
'orange',
|
|
89
|
+
'purple',
|
|
90
|
+
'violet',
|
|
91
|
+
'gray',
|
|
92
|
+
'grey',
|
|
93
|
+
'navy',
|
|
94
|
+
'white',
|
|
95
|
+
'none',
|
|
96
|
+
];
|
|
97
|
+
/** Values of `calendar:` on the `roadmap` line. */
|
|
98
|
+
export const CALENDAR_MODES = ['business', 'full', 'custom'];
|
|
99
|
+
/** Values of `config:` and `roadmap:` on an `include` line. */
|
|
100
|
+
export const INCLUDE_MODES = ['merge', 'ignore', 'isolate'];
|
|
54
101
|
export { WEEKDAYS } from './calendar-declarations.js';
|
|
55
102
|
//# sourceMappingURL=value-tables.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"value-tables.js","sourceRoot":"","sources":["../../src/language/value-tables.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,2EAA2E;AAC3E,+EAA+E;AAC/E,0EAA0E;AAC1E,kEAAkE;AAElE;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAsB;IAC/C,SAAS;IACT,aAAa;IACb,QAAQ;IACR,MAAM;IACN,WAAW;IACX,SAAS;IACT,SAAS;CACZ,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAsB;IACrD,MAAM;IACN,YAAY;IACZ,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,MAAM;CACT,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAsB;IACjD,GAAG,sBAAsB;IACzB,QAAQ;IACR,SAAS;IACT,MAAM;IACN,UAAU;CACb,CAAC;AA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3
|
-
"version": "0.0.0-dev.
|
|
3
|
+
"version": "0.0.0-dev.20261015073146.gdb78b2e",
|
|
4
4
|
"description": "Reads and checks the Nowline roadmap language — the parser and validator every Nowline tool builds on.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"engines": {
|
|
@@ -6,7 +6,11 @@ import {
|
|
|
6
6
|
BUILTIN_CAPACITY_ICONS,
|
|
7
7
|
BUILTIN_ICON_NAMES,
|
|
8
8
|
BUILTIN_STATUSES,
|
|
9
|
+
CALENDAR_MODES as CALENDAR_MODE_LIST,
|
|
10
|
+
COLOR_NAMES as COLOR_NAME_LIST,
|
|
11
|
+
INCLUDE_MODES as INCLUDE_MODE_LIST,
|
|
9
12
|
NON_WORKING_DISPLAYS,
|
|
13
|
+
STYLE_PROP_ENUMS as STYLE_PROP_ENUM_LISTS,
|
|
10
14
|
} from '../value-tables.js';
|
|
11
15
|
|
|
12
16
|
export const SUPPORTED_VERSION = 'v1';
|
|
@@ -63,43 +67,15 @@ export const ROADMAP_ONLY_STYLE_KEYS = new Set([
|
|
|
63
67
|
// POSITIVE_NUMBER_RE / POSITIVE_PERCENT_RE.
|
|
64
68
|
export const UTILIZATION_NONE = 'none';
|
|
65
69
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
italic: new Set(['true', 'false']),
|
|
72
|
-
'text-size': new Set(['none', 'xs', 'sm', 'md', 'lg', 'xl']),
|
|
73
|
-
padding: new Set(['none', 'xs', 'sm', 'md', 'lg', 'xl']),
|
|
74
|
-
spacing: new Set(['none', 'xs', 'sm', 'md', 'lg', 'xl']),
|
|
75
|
-
'header-height': new Set(['none', 'xs', 'sm', 'md', 'lg', 'xl']),
|
|
76
|
-
'corner-radius': new Set(['none', 'xs', 'sm', 'md', 'lg', 'xl', 'full']),
|
|
77
|
-
bracket: new Set(['none', 'solid', 'dashed']),
|
|
78
|
-
'header-position': new Set(['beside', 'above']),
|
|
79
|
-
'timeline-position': new Set(['top', 'bottom', 'both']),
|
|
80
|
-
'minor-grid': new Set(['true', 'false']),
|
|
81
|
-
};
|
|
70
|
+
// Style enums, colour names and calendar modes come from value-tables.ts,
|
|
71
|
+
// held here as sets for the membership checks.
|
|
72
|
+
export const STYLE_PROP_ENUMS: Record<string, ReadonlySet<string>> = Object.fromEntries(
|
|
73
|
+
Object.entries(STYLE_PROP_ENUM_LISTS).map(([key, values]) => [key, new Set(values)]),
|
|
74
|
+
);
|
|
82
75
|
|
|
83
|
-
|
|
84
|
-
// aliases for `gray` and `purple` — they canonicalize at the theme
|
|
85
|
-
// boundary (resolveColor in packages/layout/src/themes/index.ts) so themes
|
|
86
|
-
// don't grow new fields. Both spellings remain valid input.
|
|
87
|
-
export const COLOR_NAMES = new Set([
|
|
88
|
-
'red',
|
|
89
|
-
'blue',
|
|
90
|
-
'yellow',
|
|
91
|
-
'green',
|
|
92
|
-
'orange',
|
|
93
|
-
'purple',
|
|
94
|
-
'violet',
|
|
95
|
-
'gray',
|
|
96
|
-
'grey',
|
|
97
|
-
'navy',
|
|
98
|
-
'white',
|
|
99
|
-
'none',
|
|
100
|
-
]);
|
|
76
|
+
export const COLOR_NAMES: ReadonlySet<string> = new Set(COLOR_NAME_LIST);
|
|
101
77
|
|
|
102
|
-
export const CALENDAR_MODES = new Set(
|
|
78
|
+
export const CALENDAR_MODES: ReadonlySet<string> = new Set(CALENDAR_MODE_LIST);
|
|
103
79
|
|
|
104
80
|
export const CALENDAR_FIELDS = new Set([
|
|
105
81
|
'days-per-week',
|
|
@@ -274,7 +250,8 @@ export const ASCII_FALLBACK_RE = /^[\x20-\x7E]{1,3}$/;
|
|
|
274
250
|
// The runtime resolver does the actual fallback work; this regex just gates input shape.
|
|
275
251
|
export const BCP47_RE = /^[a-zA-Z]{2,3}(-[a-zA-Z]{2}|-\d{3})?$/;
|
|
276
252
|
|
|
277
|
-
|
|
253
|
+
// From value-tables.ts, held as a set for the membership check.
|
|
254
|
+
export const INCLUDE_MODES: ReadonlySet<string> = new Set(INCLUDE_MODE_LIST);
|
|
278
255
|
|
|
279
256
|
// Allow-listed property keys on the `nowline` directive line. The directive existed
|
|
280
257
|
// historically as `nowline v1` only; properties are a forward-extension point but stay
|
|
@@ -59,4 +59,55 @@ export const NON_WORKING_DISPLAYS = ['hide', 'show'] as const;
|
|
|
59
59
|
/** One of the `non-working:` display values. */
|
|
60
60
|
export type NonWorkingDisplay = (typeof NON_WORKING_DISPLAYS)[number];
|
|
61
61
|
|
|
62
|
+
/**
|
|
63
|
+
* Values of each enumerated style key (specs/dsl.md rule 19), in
|
|
64
|
+
* documentation order. `non-working:` is not here: it has its own table and
|
|
65
|
+
* its own error code. Colour keys (`bg`, `fg`, `text`) take `COLOR_NAMES` or
|
|
66
|
+
* a hex value instead.
|
|
67
|
+
*/
|
|
68
|
+
export const STYLE_PROP_ENUMS: Readonly<Record<string, readonly string[]>> = {
|
|
69
|
+
border: ['solid', 'dashed', 'dotted'],
|
|
70
|
+
shadow: ['none', 'subtle', 'soft', 'hard'],
|
|
71
|
+
font: ['sans', 'serif', 'mono'],
|
|
72
|
+
weight: ['thin', 'light', 'normal', 'bold'],
|
|
73
|
+
italic: ['true', 'false'],
|
|
74
|
+
'text-size': ['none', 'xs', 'sm', 'md', 'lg', 'xl'],
|
|
75
|
+
padding: ['none', 'xs', 'sm', 'md', 'lg', 'xl'],
|
|
76
|
+
spacing: ['none', 'xs', 'sm', 'md', 'lg', 'xl'],
|
|
77
|
+
'header-height': ['none', 'xs', 'sm', 'md', 'lg', 'xl'],
|
|
78
|
+
'corner-radius': ['none', 'xs', 'sm', 'md', 'lg', 'xl', 'full'],
|
|
79
|
+
bracket: ['none', 'solid', 'dashed'],
|
|
80
|
+
'header-position': ['beside', 'above'],
|
|
81
|
+
'timeline-position': ['top', 'bottom', 'both'],
|
|
82
|
+
'minor-grid': ['true', 'false'],
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Built-in colour vocabulary for `bg`, `fg` and `text`. `grey` and `violet`
|
|
87
|
+
* are international-friendly aliases for `gray` and `purple`: they
|
|
88
|
+
* canonicalize at the theme boundary (resolveColor in
|
|
89
|
+
* packages/layout/src/themes/index.ts) so themes don't grow new fields. Both
|
|
90
|
+
* spellings remain valid input.
|
|
91
|
+
*/
|
|
92
|
+
export const COLOR_NAMES: readonly string[] = [
|
|
93
|
+
'red',
|
|
94
|
+
'blue',
|
|
95
|
+
'yellow',
|
|
96
|
+
'green',
|
|
97
|
+
'orange',
|
|
98
|
+
'purple',
|
|
99
|
+
'violet',
|
|
100
|
+
'gray',
|
|
101
|
+
'grey',
|
|
102
|
+
'navy',
|
|
103
|
+
'white',
|
|
104
|
+
'none',
|
|
105
|
+
];
|
|
106
|
+
|
|
107
|
+
/** Values of `calendar:` on the `roadmap` line. */
|
|
108
|
+
export const CALENDAR_MODES: readonly string[] = ['business', 'full', 'custom'];
|
|
109
|
+
|
|
110
|
+
/** Values of `config:` and `roadmap:` on an `include` line. */
|
|
111
|
+
export const INCLUDE_MODES: readonly string[] = ['merge', 'ignore', 'isolate'];
|
|
112
|
+
|
|
62
113
|
export { WEEKDAYS } from './calendar-declarations.js';
|