quario 0.11.0 → 0.11.1
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/CHANGELOG.md +6 -0
- package/lib/index.d.ts +20 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# quario
|
|
2
2
|
|
|
3
|
+
## 0.11.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- **The declarations now carry `href` and `schemes`.** `StyleDeclarations` states `href`, `RunStyleDeclarations` picks it up as the twelfth inline name, and `QuarioOptions` states the `schemes` allowlist beside the three names that present `format`. The engine has admitted both since 0.11.0 and `SCHEMA.md` specifies them; the published types said otherwise, so a TypeScript consumer writing a link, or the allowlist that admits one, was told it was an error. The `format` declaration's own comment said a kind carries one modifier, which stopped being true when a number kind took three. `test/types.check.ts` exercises the allowlist and both spellings of a link, since a hand-written surface drifts exactly where nothing reads it.
|
|
8
|
+
|
|
3
9
|
## 0.11.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
package/lib/index.d.ts
CHANGED
|
@@ -95,8 +95,9 @@ export interface StyleDeclarations extends BoxDeclarations {
|
|
|
95
95
|
valign?: ExpressionValue<VAlign>;
|
|
96
96
|
/**
|
|
97
97
|
* How a number or date is presented: a kind, or an object naming one and
|
|
98
|
-
* carrying the
|
|
99
|
-
* three number kinds, `form` for `date`. Locale stays on the
|
|
98
|
+
* carrying the modifiers that kind understands — `digits`, `negative` and
|
|
99
|
+
* `zero` for the three number kinds, `form` for `date`. Locale stays on the
|
|
100
|
+
* instance.
|
|
100
101
|
*/
|
|
101
102
|
format?: ExpressionValue<FormatDeclaration>;
|
|
102
103
|
/**
|
|
@@ -107,6 +108,14 @@ export interface StyleDeclarations extends BoxDeclarations {
|
|
|
107
108
|
* than falling back to the instance's currency. Unread without the kind.
|
|
108
109
|
*/
|
|
109
110
|
currency?: ExpressionValue<string>;
|
|
111
|
+
/**
|
|
112
|
+
* Where this cell's text points: a URL, or `#` and a group's `label` for a
|
|
113
|
+
* destination inside the document. The one declaration the engine judges
|
|
114
|
+
* rather than passes on — a URL is admitted against the instance's `schemes`
|
|
115
|
+
* allowlist before it crosses, and a refused value is omitted, so the text
|
|
116
|
+
* renders and the link does not. A table row refuses it.
|
|
117
|
+
*/
|
|
118
|
+
href?: ExpressionValue<string>;
|
|
110
119
|
/** Blank space before this item, in points. */
|
|
111
120
|
spaceBefore?: ExpressionValue<number>;
|
|
112
121
|
/** Blank space after this item, in points. */
|
|
@@ -167,6 +176,7 @@ export type RunStyleDeclarations = Pick<
|
|
|
167
176
|
| "uppercase"
|
|
168
177
|
| "format"
|
|
169
178
|
| "currency"
|
|
179
|
+
| "href"
|
|
170
180
|
>;
|
|
171
181
|
|
|
172
182
|
/**
|
|
@@ -516,6 +526,14 @@ export interface QuarioOptions {
|
|
|
516
526
|
currency?: string;
|
|
517
527
|
/** Timezone for `format: "date"`. Defaults to `"UTC"`. */
|
|
518
528
|
timeZone?: string;
|
|
529
|
+
/**
|
|
530
|
+
* The URL schemes an `href` may use, each lower-case and ending in a colon.
|
|
531
|
+
* Defaults to `https:` and `mailto:`. The allowlist is the host's, never the
|
|
532
|
+
* document's, and a value this cannot read throws at construction rather
|
|
533
|
+
* than falling back — an allowlist quietly replaced is a host believing it
|
|
534
|
+
* restricted something it had not.
|
|
535
|
+
*/
|
|
536
|
+
schemes?: readonly string[];
|
|
519
537
|
}
|
|
520
538
|
|
|
521
539
|
/** The settled result of an instance's license key verification. */
|