@monoflake/sdk 2026.1005.3 → 2026.1005.5

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.
@@ -11,7 +11,7 @@ import { LOCALE_CODES } from "@canmi/me/locales";
11
11
  *
12
12
  * So there is one route, `POST /batch`, and the body says which question it is. `type` selects the
13
13
  * module that reads the rest; adding a batchable question adds a variant here and a handler there,
14
- * and no route at all. See spec/architecture/artifacts.md, "One batch entry point".
14
+ * and no route at all. See web's spec/architecture/site-api.md, "One batch entry point".
15
15
  */
16
16
  /** A slug names an article; the list is bounded so one request cannot ask for the whole corpus. */
17
17
  const slugs = v.pipe(v.array(v.string()), v.maxLength(64));
@@ -46,9 +46,9 @@ export declare const NewsletterAnswerSchema: v.ObjectSchema<{
46
46
  readonly cancel_token: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
47
47
  readonly subscriber_count: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
48
48
  }, undefined>;
49
- /** Cancelling. The count is absent when the answer is about a subscription that was not there. */
49
+ /** Canceling. The count is absent when the answer is about a subscription that was not there. */
50
50
  export declare const CancelAnswerSchema: v.ObjectSchema<{
51
- readonly cancelled: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
51
+ readonly canceled: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
52
52
  readonly subscriber_count: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
53
53
  }, undefined>;
54
54
  export type StatsAnswer = v.InferOutput<typeof StatsAnswerSchema>;
@@ -58,9 +58,9 @@ const NewsletterAnswerSchema = v.object({
58
58
  cancel_token: v.optional(cancelToken),
59
59
  subscriber_count: counter
60
60
  });
61
- /** Cancelling. The count is absent when the answer is about a subscription that was not there. */
61
+ /** Canceling. The count is absent when the answer is about a subscription that was not there. */
62
62
  const CancelAnswerSchema = v.object({
63
- cancelled: v.optional(v.boolean()),
63
+ canceled: v.optional(v.boolean()),
64
64
  subscriber_count: v.optional(counter)
65
65
  });
66
66
  //#endregion
@@ -4052,7 +4052,7 @@ export type RootView = v.InferOutput<typeof RootViewSchema>;
4052
4052
  * The root's view grouped as it is stored, plus the two things only a request can supply: which
4053
4053
  * article was asked for. No read count: a counter is written by every visitor and a view is not,
4054
4054
  * so carrying it here gave one number nine cached copies of itself. See
4055
- * spec/architecture/artifacts.md, "A read count is not here at all".
4055
+ * web's spec/architecture/site-api.md, "A read count is not here at all".
4056
4056
  */
4057
4057
  export type ViewAnswer = Omit<RootView, 'locale'> & {
4058
4058
  /** What was asked for: the identity, which is the only thing `?slug=` takes. */
@@ -4062,7 +4062,7 @@ export type ViewAnswer = Omit<RootView, 'locale'> & {
4062
4062
  *
4063
4063
  * This is what lets the site tell a canonical address from one that merely reaches the
4064
4064
  * article: `/{wrong}/{slug}` and `/{slug}` both resolve, and both are redirected here. See
4065
- * spec/architecture/artifacts.md, "Reaching an article by name".
4065
+ * web's spec/architecture/site-api.md, "Reaching an article by name".
4066
4066
  */
4067
4067
  path: string;
4068
4068
  url: string;
@@ -40,7 +40,7 @@ export declare function best(image: ImageLayer, want: number): ImageVariant | un
40
40
  * Its own table rather than the variant one, for the reason `for_icon` is its own on the other
41
41
  * side: these bytes were encoded by somebody else's server and arrive as SVG or ICO, neither of
42
42
  * which a ladder ever produces -- and the ladder's table answers `avif` for anything it does not
43
- * recognise, which would be an address to a file nobody wrote. The twin of `icon_mime` in
43
+ * recognize, which would be an address to a file nobody wrote. The twin of `icon_mime` in
44
44
  * web's apps/local/src/extension.rs, held to it by a test here.
45
45
  */
46
46
  export declare const ICON_EXTENSION: Record<string, string>;
@@ -59,7 +59,7 @@ export declare function toned(icon: IconLayer, want?: Tone): ImageVariant | unde
59
59
  *
60
60
  * Beside `ICON_EXTENSION` rather than folded into it, for the reason that table gives: a ladder
61
61
  * produces these four and never an SVG or an ICO, and answering `avif` for a mime it does not
62
- * recognise would be a guess an icon cannot afford. Held to `for_variant` in
62
+ * recognize would be a guess an icon cannot afford. Held to `for_variant` in
63
63
  * web's apps/local/src/extension.rs by a test, the two being one fact in two languages.
64
64
  */
65
65
  export declare const VARIANT_EXTENSION: Record<string, string>;
@@ -90,7 +90,7 @@ export type Picture = {
90
90
  width: number;
91
91
  height: number;
92
92
  ratio: string;
93
- /** The colour block painted under it while it arrives. Absent for a record holding no hash. */
93
+ /** The color block painted under it while it arrives. Absent for a record holding no hash. */
94
94
  placeholder?: string;
95
95
  };
96
96
  /**
@@ -63,7 +63,7 @@ function best(image, want) {
63
63
  * Its own table rather than the variant one, for the reason `for_icon` is its own on the other
64
64
  * side: these bytes were encoded by somebody else's server and arrive as SVG or ICO, neither of
65
65
  * which a ladder ever produces -- and the ladder's table answers `avif` for anything it does not
66
- * recognise, which would be an address to a file nobody wrote. The twin of `icon_mime` in
66
+ * recognize, which would be an address to a file nobody wrote. The twin of `icon_mime` in
67
67
  * web's apps/local/src/extension.rs, held to it by a test here.
68
68
  */
69
69
  const ICON_EXTENSION = {
@@ -89,7 +89,7 @@ function toned(icon, want) {
89
89
  *
90
90
  * Beside `ICON_EXTENSION` rather than folded into it, for the reason that table gives: a ladder
91
91
  * produces these four and never an SVG or an ICO, and answering `avif` for a mime it does not
92
- * recognise would be a guess an icon cannot afford. Held to `for_variant` in
92
+ * recognize would be a guess an icon cannot afford. Held to `for_variant` in
93
93
  * web's apps/local/src/extension.rs by a test, the two being one fact in two languages.
94
94
  */
95
95
  const VARIANT_EXTENSION = {
@@ -26,7 +26,7 @@ export type ResourceId = v.InferOutput<typeof rid>;
26
26
  *
27
27
  * A list, because re-scanning a subject adds an origin to the resource rather than making a
28
28
  * second one. The originals are never published; the cid is kept so the next import of the same
29
- * file is recognised and skipped. See spec/architecture/resource.md, "`source` and `origin`".
29
+ * file is recognized and skipped. See spec/architecture/resource.md, "`source` and `origin`".
30
30
  */
31
31
  export declare const MediaLayerSchema: v.ObjectSchema<{
32
32
  readonly version: v.NumberSchema<undefined>;
@@ -42,7 +42,7 @@ export declare const SCALABLE_MIMES: Set<string>;
42
42
  * One published encoding of a picture.
43
43
  *
44
44
  * `resolution` is absent on a vector for the same reason the layer's is: there are no pixels to
45
- * report, and a caller that asks and receives nothing has its answer. `quality` is the normalised
45
+ * report, and a caller that asks and receives nothing has its answer. `quality` is the normalized
46
46
  * encoder setting, kept because re-deriving has to reproduce what was published.
47
47
  */
48
48
  export declare const ImageVariantSchema: v.ObjectSchema<{
@@ -149,7 +149,7 @@ export declare const PhotoLayerSchema: v.ObjectSchema<{
149
149
  }, undefined>, undefined>;
150
150
  readonly software: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
151
151
  readonly color_space: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
152
- /** Read and honoured on the way in: ignoring it turns every derived image. */
152
+ /** Read and honored on the way in: ignoring it turns every derived image. */
153
153
  readonly orientation: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
154
154
  }, undefined>;
155
155
  /**
@@ -204,7 +204,7 @@ export declare const ScreenshotLayerSchema: v.ObjectSchema<{
204
204
  }, undefined>, undefined>;
205
205
  readonly software: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
206
206
  readonly color_space: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
207
- /** Read and honoured on the way in: ignoring it turns every derived image. */
207
+ /** Read and honored on the way in: ignoring it turns every derived image. */
208
208
  readonly orientation: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
209
209
  readonly scale: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
210
210
  }, undefined>;
@@ -795,7 +795,7 @@ export declare const LAYERS: {
795
795
  }, undefined>, undefined>;
796
796
  readonly software: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
797
797
  readonly color_space: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
798
- /** Read and honoured on the way in: ignoring it turns every derived image. */
798
+ /** Read and honored on the way in: ignoring it turns every derived image. */
799
799
  readonly orientation: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
800
800
  }, undefined>;
801
801
  };
@@ -845,7 +845,7 @@ export declare const LAYERS: {
845
845
  }, undefined>, undefined>;
846
846
  readonly software: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
847
847
  readonly color_space: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
848
- /** Read and honoured on the way in: ignoring it turns every derived image. */
848
+ /** Read and honored on the way in: ignoring it turns every derived image. */
849
849
  readonly orientation: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
850
850
  readonly scale: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
851
851
  }, undefined>;
@@ -41,7 +41,7 @@ const layered = { version: v.number() };
41
41
  *
42
42
  * A list, because re-scanning a subject adds an origin to the resource rather than making a
43
43
  * second one. The originals are never published; the cid is kept so the next import of the same
44
- * file is recognised and skipped. See spec/architecture/resource.md, "`source` and `origin`".
44
+ * file is recognized and skipped. See spec/architecture/resource.md, "`source` and `origin`".
45
45
  */
46
46
  const MediaLayerSchema = v.object({
47
47
  ...layered,
@@ -57,7 +57,7 @@ const SCALABLE_MIMES = /* @__PURE__ */ new Set(["image/svg+xml"]);
57
57
  * One published encoding of a picture.
58
58
  *
59
59
  * `resolution` is absent on a vector for the same reason the layer's is: there are no pixels to
60
- * report, and a caller that asks and receives nothing has its answer. `quality` is the normalised
60
+ * report, and a caller that asks and receives nothing has its answer. `quality` is the normalized
61
61
  * encoder setting, kept because re-deriving has to reproduce what was published.
62
62
  */
63
63
  const ImageVariantSchema = v.object({
@@ -163,7 +163,7 @@ const exif = {
163
163
  })),
164
164
  software: v.optional(v.string()),
165
165
  color_space: v.optional(v.string()),
166
- /** Read and honoured on the way in: ignoring it turns every derived image. */
166
+ /** Read and honored on the way in: ignoring it turns every derived image. */
167
167
  orientation: v.optional(v.number())
168
168
  };
169
169
  /** A camera pointed at the world, which is the whole of what this layer brings. */
@@ -121,7 +121,7 @@ export type Block = {
121
121
  srcset?: string;
122
122
  /** The cover's crop, defaulted like `::image`'s. See the `image` variant below. */
123
123
  crop?: string;
124
- /** `object-position` for that crop. Absent means centred. */
124
+ /** `object-position` for that crop. Absent means centered. */
125
125
  align?: string;
126
126
  /** What the cover shows. Offered as the link's description, never as its name. */
127
127
  description?: string;
@@ -176,7 +176,7 @@ export type Block = {
176
176
  * instead of "this image".
177
177
  */
178
178
  crop?: string;
179
- /** `object-position` for that crop. Absent means centred. */
179
+ /** `object-position` for that crop. Absent means centered. */
180
180
  align?: string;
181
181
  } | {
182
182
  type: 'video';
@@ -6,7 +6,7 @@
6
6
  * change nobody else was going to read.
7
7
  */
8
8
  const PUBLICATION_DELAY = import.meta.env?.MODE === "development" ? 0 : 300;
9
- /** One year, in seconds: the longest a browser honours, and what `immutable` already implies. */
9
+ /** One year, in seconds: the longest a browser honors, and what `immutable` already implies. */
10
10
  const UNCHANGING_LIFE = 31536e3;
11
11
  /** One hour, in seconds. The middle number, for an address that names rather than identifies. */
12
12
  const NAMED_LIFE = 3600;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@monoflake/sdk",
3
- "version": "2026.1005.3",
3
+ "version": "2026.1005.5",
4
4
  "description": "Addresses and clients for the platform.",
5
5
  "keywords": [
6
6
  "cloudflare-workers",