@jtakeit/kit 0.0.0-stage → 0.2.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 +174 -2
- package/bin/jtkit.mjs +62 -0
- package/booking.css +36 -0
- package/elements/alive.js +52 -0
- package/elements/booking.js +737 -0
- package/elements/lead.js +134 -0
- package/index.mjs +21 -0
- package/lead.css +23 -0
- package/lib/booking/render.mjs +244 -0
- package/lib/booking/words.mjs +346 -0
- package/lib/catalogue.mjs +1819 -0
- package/lib/codes.mjs +171 -0
- package/lib/kits.mjs +208 -0
- package/lib/lead/render.mjs +166 -0
- package/lib/meta.mjs +150 -0
- package/lib/money.mjs +30 -0
- package/package.json +81 -4
- package/types/alive.d.ts +2 -0
- package/types/booking.d.ts +32 -0
- package/types/elements-booking.d.ts +9 -0
- package/types/elements-lead.d.ts +6 -0
- package/types/index.d.ts +6 -0
- package/types/kits.d.ts +24 -0
- package/types/lead.d.ts +49 -0
- package/types/meta.d.ts +26 -0
- package/types/money.d.ts +2 -0
- package/types/words.d.ts +3 -0
package/lib/meta.mjs
ADDED
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `_meta.json` — what the edge needs to know that the HTML cannot say — and
|
|
3
|
+
* the specimen pages, whose addresses two things have to agree on.
|
|
4
|
+
*
|
|
5
|
+
* Cloudflare Pages read `_redirects` and `_headers` out of the build. The
|
|
6
|
+
* platform serves sites from its own Worker instead, and this file is what
|
|
7
|
+
* replaced them: one small object beside the pages, written by the build.
|
|
8
|
+
*
|
|
9
|
+
* ── drafts, and why the list has to exist ───────────────────────────────────
|
|
10
|
+
*
|
|
11
|
+
* An entry nobody has finished is **built** — that is how its author looks at
|
|
12
|
+
* it before it is out — and it is in no listing, no feed and no sitemap. What
|
|
13
|
+
* stops a stranger reading it is the edge, and the edge is serving static
|
|
14
|
+
* objects: it has no way to tell a draft from a page except to be told. This
|
|
15
|
+
* is being told.
|
|
16
|
+
*
|
|
17
|
+
* ── the specimens, which have no file at all ────────────────────────────────
|
|
18
|
+
*
|
|
19
|
+
* The build also draws one page per arrangement, so that the panel can lift
|
|
20
|
+
* this site's own markup for a block a post has just been given. They are
|
|
21
|
+
* generated from the declaration rather than written, so looking for their
|
|
22
|
+
* documents finds nothing — and a draft nobody can find is a draft the edge
|
|
23
|
+
* hands to anybody. Listed here, derived the same way the site derives them.
|
|
24
|
+
*
|
|
25
|
+
* ── immutable, which directory is the build's own ───────────────────────────
|
|
26
|
+
*
|
|
27
|
+
* The files whose name carries a hash of their contents are cached by the
|
|
28
|
+
* edge for a year and never revalidated, and under the preview's slug a
|
|
29
|
+
* script's reference to one is put under the slug. Where they live is the
|
|
30
|
+
* generator's to say: `/_astro/` for Astro, `/_next/static/` for a Next
|
|
31
|
+
* export, `/_app/immutable/` for SvelteKit, `/assets/` for Vite. A build that
|
|
32
|
+
* says nothing is taken to be Astro's. Never a directory with an unhashed
|
|
33
|
+
* file in it — it would be stuck in browsers for a year.
|
|
34
|
+
*/
|
|
35
|
+
import { readdir, readFile, writeFile } from 'node:fs/promises';
|
|
36
|
+
import { join, relative, sep } from 'node:path';
|
|
37
|
+
|
|
38
|
+
/** The id of one specimen, which is also its address under the collection. */
|
|
39
|
+
export function specimenId(type, view) {
|
|
40
|
+
return view === undefined || view === '' ? `_fl-${type}` : `_fl-${type}-${view}`;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Every specimen this site builds, as addresses.
|
|
45
|
+
*
|
|
46
|
+
* One per arrangement of every type a post may hold — and one per language,
|
|
47
|
+
* because a preview of a Russian post must lift its markup from a Russian
|
|
48
|
+
* page: anything else puts the wrong words and an address that does not
|
|
49
|
+
* exist around the block.
|
|
50
|
+
*
|
|
51
|
+
* @param {{ prefix: string; body?: string[] }[]} collections
|
|
52
|
+
* @param {{ type: string; views?: { key: string }[] }[]} blocks
|
|
53
|
+
* @param {string[]} [locales] the site's languages besides its own
|
|
54
|
+
* @returns {string[]}
|
|
55
|
+
*/
|
|
56
|
+
export function specimenAddresses(collections, blocks, locales = []) {
|
|
57
|
+
const out = [];
|
|
58
|
+
for (const collection of collections) {
|
|
59
|
+
for (const kind of collection.body ?? []) {
|
|
60
|
+
const type = blocks.find((one) => one.type === kind);
|
|
61
|
+
if (type === undefined) continue;
|
|
62
|
+
for (const view of type.views ?? [undefined]) {
|
|
63
|
+
const id = specimenId(kind, view?.key);
|
|
64
|
+
for (const locale of ['', ...locales]) {
|
|
65
|
+
const at = locale === '' ? collection.prefix : `/${locale}${collection.prefix}`;
|
|
66
|
+
out.push(`${at}/${id}/`);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return out.sort();
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Every entry whose document says it is not on the site yet, as addresses.
|
|
76
|
+
*
|
|
77
|
+
* A document, not frontmatter: an entry is a page of blocks in a `.json`
|
|
78
|
+
* file. Only an entry carries `visible` at all; a page has none and is not a
|
|
79
|
+
* draft. `=== false` and not falsy: absent means listed.
|
|
80
|
+
*
|
|
81
|
+
* @param {string} [root] where the content is, `jtk/content` under the working directory
|
|
82
|
+
* @returns {Promise<string[]>}
|
|
83
|
+
*/
|
|
84
|
+
export async function hiddenEntries(root = join(process.cwd(), 'jtk', 'content')) {
|
|
85
|
+
const out = [];
|
|
86
|
+
const walk = async (at) => {
|
|
87
|
+
let entries;
|
|
88
|
+
try {
|
|
89
|
+
entries = await readdir(at, { withFileTypes: true });
|
|
90
|
+
} catch {
|
|
91
|
+
return; // a site with no content directory is a site with no drafts
|
|
92
|
+
}
|
|
93
|
+
for (const entry of entries) {
|
|
94
|
+
const full = join(at, entry.name);
|
|
95
|
+
if (entry.isDirectory()) {
|
|
96
|
+
// The pictures the build downloaded beside an entry.
|
|
97
|
+
if (entry.name !== 'media') await walk(full);
|
|
98
|
+
continue;
|
|
99
|
+
}
|
|
100
|
+
if (!entry.name.endsWith('.json')) continue;
|
|
101
|
+
let document;
|
|
102
|
+
try {
|
|
103
|
+
document = JSON.parse(await readFile(full, 'utf8'));
|
|
104
|
+
} catch {
|
|
105
|
+
continue; // unreadable JSON is the build's error to report, not this one
|
|
106
|
+
}
|
|
107
|
+
if (document?.visible === false) {
|
|
108
|
+
const name = relative(root, full).split(sep).join('/').replace(/\.json$/, '');
|
|
109
|
+
out.push(`/${name}/`);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
await walk(root);
|
|
114
|
+
return out.sort();
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* The whole file, assembled: the drafts from the content, the specimens from
|
|
119
|
+
* the declaration, the hashed directory from the generator.
|
|
120
|
+
*
|
|
121
|
+
* @param {object} what
|
|
122
|
+
* @param {string} [what.root] the content root, `jtk/content` by default
|
|
123
|
+
* @param {{ prefix: string; body?: string[] }[]} [what.collections]
|
|
124
|
+
* @param {{ type: string; views?: { key: string }[] }[]} [what.blocks]
|
|
125
|
+
* @param {string[]} [what.locales]
|
|
126
|
+
* @param {string[]} [what.immutable] e.g. `['/_astro/']`
|
|
127
|
+
* @param {{ from: string; to: string; status?: number }[]} [what.redirects]
|
|
128
|
+
* @returns {Promise<{ redirects: object[]; drafts: string[]; immutable?: string[] }>}
|
|
129
|
+
*/
|
|
130
|
+
export async function buildMeta({ root, collections = [], blocks = [], locales = [], immutable, redirects = [] } = {}) {
|
|
131
|
+
const drafts = [...(await hiddenEntries(root)), ...specimenAddresses(collections, blocks, locales)].sort();
|
|
132
|
+
const meta = { redirects, drafts };
|
|
133
|
+
if (Array.isArray(immutable) && immutable.length > 0) meta.immutable = immutable;
|
|
134
|
+
return meta;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Writes `_meta.json` into a build directory — whatever happens, empty lists
|
|
139
|
+
* and all, because a missing file and an empty one mean different things to
|
|
140
|
+
* whoever is debugging.
|
|
141
|
+
*
|
|
142
|
+
* @param {string} dir the build directory, `dist/`
|
|
143
|
+
* @param {Parameters<typeof buildMeta>[0]} what
|
|
144
|
+
* @returns {Promise<{ redirects: object[]; drafts: string[]; immutable?: string[] }>}
|
|
145
|
+
*/
|
|
146
|
+
export async function writeMeta(dir, what = {}) {
|
|
147
|
+
const meta = await buildMeta(what);
|
|
148
|
+
await writeFile(join(dir, '_meta.json'), JSON.stringify(meta, null, 2) + '\n');
|
|
149
|
+
return meta;
|
|
150
|
+
}
|
package/lib/money.mjs
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A price as the page says it: «2 300 ₴», not «2 300,00 UAH».
|
|
3
|
+
*
|
|
4
|
+
* Minor units in, as the platform stores them. The narrow sign, because a
|
|
5
|
+
* language's own data may write a currency as its code; no kopecks on a whole
|
|
6
|
+
* price, because «,00» on a price list reads like a spreadsheet. And no sign
|
|
7
|
+
* at all where the site has not said what its prices are in — one made up
|
|
8
|
+
* here is a lie on every price: a hotel's hryvnias read as francs (2 October
|
|
9
|
+
* 2026). The currency is the site's, from the brief, written into
|
|
10
|
+
* jtk/site.json by the platform; it is for showing a price, nothing more.
|
|
11
|
+
*
|
|
12
|
+
* @param {number} minor
|
|
13
|
+
* @param {string | undefined} currency
|
|
14
|
+
* @param {string} locale
|
|
15
|
+
* @returns {string}
|
|
16
|
+
*/
|
|
17
|
+
export function money(minor, currency, locale) {
|
|
18
|
+
const value = minor / 100;
|
|
19
|
+
const digits = Number.isInteger(value) ? 0 : 2;
|
|
20
|
+
if (!currency) {
|
|
21
|
+
return new Intl.NumberFormat(locale, { minimumFractionDigits: digits, maximumFractionDigits: 2 }).format(value);
|
|
22
|
+
}
|
|
23
|
+
return new Intl.NumberFormat(locale, {
|
|
24
|
+
style: 'currency',
|
|
25
|
+
currency: currency.toUpperCase(),
|
|
26
|
+
currencyDisplay: 'narrowSymbol',
|
|
27
|
+
minimumFractionDigits: digits,
|
|
28
|
+
maximumFractionDigits: 2,
|
|
29
|
+
}).format(value);
|
|
30
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,83 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jtakeit/kit",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "The framework-free half of a site on jtakeit: the booking form as an element and as markup, for Astro through @jtakeit/astro and for any other generator directly",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"bin": {
|
|
8
|
+
"jtkit": "bin/jtkit.mjs"
|
|
9
|
+
},
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"types": "./types/index.d.ts",
|
|
13
|
+
"default": "./index.mjs"
|
|
14
|
+
},
|
|
15
|
+
"./booking": {
|
|
16
|
+
"types": "./types/booking.d.ts",
|
|
17
|
+
"default": "./lib/booking/render.mjs"
|
|
18
|
+
},
|
|
19
|
+
"./booking/words": {
|
|
20
|
+
"types": "./types/words.d.ts",
|
|
21
|
+
"default": "./lib/booking/words.mjs"
|
|
22
|
+
},
|
|
23
|
+
"./lead": {
|
|
24
|
+
"types": "./types/lead.d.ts",
|
|
25
|
+
"default": "./lib/lead/render.mjs"
|
|
26
|
+
},
|
|
27
|
+
"./money": {
|
|
28
|
+
"types": "./types/money.d.ts",
|
|
29
|
+
"default": "./lib/money.mjs"
|
|
30
|
+
},
|
|
31
|
+
"./meta": {
|
|
32
|
+
"types": "./types/meta.d.ts",
|
|
33
|
+
"default": "./lib/meta.mjs"
|
|
34
|
+
},
|
|
35
|
+
"./kits": {
|
|
36
|
+
"types": "./types/kits.d.ts",
|
|
37
|
+
"default": "./lib/kits.mjs"
|
|
38
|
+
},
|
|
39
|
+
"./catalogue": "./lib/catalogue.mjs",
|
|
40
|
+
"./codes": "./lib/codes.mjs",
|
|
41
|
+
"./elements/booking": {
|
|
42
|
+
"types": "./types/elements-booking.d.ts",
|
|
43
|
+
"default": "./elements/booking.js"
|
|
44
|
+
},
|
|
45
|
+
"./elements/lead": {
|
|
46
|
+
"types": "./types/elements-lead.d.ts",
|
|
47
|
+
"default": "./elements/lead.js"
|
|
48
|
+
},
|
|
49
|
+
"./elements/alive": {
|
|
50
|
+
"types": "./types/alive.d.ts",
|
|
51
|
+
"default": "./elements/alive.js"
|
|
52
|
+
},
|
|
53
|
+
"./booking.css": "./booking.css",
|
|
54
|
+
"./lead.css": "./lead.css"
|
|
55
|
+
},
|
|
56
|
+
"files": [
|
|
57
|
+
"index.mjs",
|
|
58
|
+
"bin",
|
|
59
|
+
"lib",
|
|
60
|
+
"elements",
|
|
61
|
+
"types",
|
|
62
|
+
"booking.css",
|
|
63
|
+
"lead.css",
|
|
64
|
+
"README.md"
|
|
65
|
+
],
|
|
66
|
+
"engines": {
|
|
67
|
+
"node": ">=22.12.0"
|
|
68
|
+
},
|
|
69
|
+
"repository": {
|
|
70
|
+
"type": "git",
|
|
71
|
+
"url": "https://github.com/jtakeit/jtakeit-kit.git",
|
|
72
|
+
"directory": "kit"
|
|
73
|
+
},
|
|
74
|
+
"keywords": [
|
|
75
|
+
"jtakeit",
|
|
76
|
+
"booking",
|
|
77
|
+
"custom-element",
|
|
78
|
+
"static-site"
|
|
79
|
+
],
|
|
80
|
+
"scripts": {
|
|
81
|
+
"test": "node --test"
|
|
82
|
+
}
|
|
83
|
+
}
|
package/types/alive.d.ts
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export interface Named {
|
|
2
|
+
slug: string;
|
|
3
|
+
title: string;
|
|
4
|
+
takes?: number;
|
|
5
|
+
costs?: number;
|
|
6
|
+
/** A price by the hour of the week instead of `costs`: rows of a day, a span and a price. The list says «from …»; the price is the slot's. */
|
|
7
|
+
rates?: { day: string; from: number; until: number; costs: number }[];
|
|
8
|
+
/** `'person'` for a price times the party — a class per place, shoes; the list says so and the running total multiplies. */
|
|
9
|
+
per?: 'booking' | 'person';
|
|
10
|
+
group?: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface BookingFormProps {
|
|
14
|
+
services: Named[];
|
|
15
|
+
resources?: Named[];
|
|
16
|
+
locale: string;
|
|
17
|
+
daysAhead?: number;
|
|
18
|
+
combine?: boolean;
|
|
19
|
+
currency?: string;
|
|
20
|
+
scale?: string;
|
|
21
|
+
kind?: string;
|
|
22
|
+
/** Where `/api/` is from this page; under the preview the site is served at `/p/<slug>/`. */
|
|
23
|
+
api?: string;
|
|
24
|
+
/** The element around the form, `jtk-booking`; `''` for none. */
|
|
25
|
+
tag?: string;
|
|
26
|
+
now?: Date;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/** What the form sends to /api/book, as `data-sends` says it. */
|
|
30
|
+
export const SENDS: readonly string[];
|
|
31
|
+
/** The booking form as HTML, wrapped in `<jtk-booking>`. */
|
|
32
|
+
export function renderBookingForm(props: BookingFormProps): string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export function daysBetween(from: string, until: string): number;
|
|
2
|
+
export function plusDays(iso: string, n: number): string;
|
|
3
|
+
export function lasting(minutes: number, words: Record<string, string>): string;
|
|
4
|
+
export function wireBooking(form: HTMLFormElement): void;
|
|
5
|
+
export function wireAll(root?: ParentNode): void;
|
|
6
|
+
export class JtkBooking extends HTMLElement {
|
|
7
|
+
connectedCallback(): void;
|
|
8
|
+
}
|
|
9
|
+
export function defineBooking(name?: string): void;
|
package/types/index.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { renderBookingForm, SENDS } from './booking';
|
|
2
|
+
export type { BookingFormProps, Named } from './booking';
|
|
3
|
+
export { renderLeadForm, inputType } from './lead';
|
|
4
|
+
export type { Ask, LeadCopy, LeadPaths, LeadFormProps } from './lead';
|
|
5
|
+
export { wordsFor, LOCALES } from './words';
|
|
6
|
+
export { money } from './money';
|
package/types/kits.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface Kit {
|
|
2
|
+
kind: string;
|
|
3
|
+
about?: string;
|
|
4
|
+
ask?: string[];
|
|
5
|
+
version?: string;
|
|
6
|
+
catalogue: {
|
|
7
|
+
blocks: Record<string, unknown>[];
|
|
8
|
+
collections: Record<string, unknown>[];
|
|
9
|
+
modules: Record<string, Record<string, string>>;
|
|
10
|
+
};
|
|
11
|
+
settings: Record<string, unknown>;
|
|
12
|
+
entries: { collection: string; slug: string; fields: Record<string, unknown> }[];
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export const API: string;
|
|
16
|
+
export function readKit(file: string): Kit;
|
|
17
|
+
export function fetchKit(kind: string, api?: string): Promise<Kit>;
|
|
18
|
+
export function loadKit(asked: string, api?: string): Promise<Kit>;
|
|
19
|
+
export function checkKit(kit: unknown, from: string): Kit;
|
|
20
|
+
export function kitLanguage(locale: string | undefined): 'uk' | 'en' | 'de';
|
|
21
|
+
export function kitSettings(kit: Kit): Record<string, unknown>;
|
|
22
|
+
export function kitEntries(kit: Kit, locale: string): [string, Record<string, unknown>][];
|
|
23
|
+
export function mergeKitIntoCatalogue(catalogue: Record<string, unknown>, kit: Kit): Record<string, unknown>;
|
|
24
|
+
export function layKitFiles(target: string, kit: Kit, options?: { locale?: string; catalogue?: boolean }): string[];
|
package/types/lead.d.ts
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export interface Ask {
|
|
2
|
+
key: string;
|
|
3
|
+
label: string;
|
|
4
|
+
kind: string;
|
|
5
|
+
required?: boolean;
|
|
6
|
+
max?: number;
|
|
7
|
+
min?: number;
|
|
8
|
+
options?: { value: string; label: string }[];
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface LeadCopy {
|
|
12
|
+
title?: string;
|
|
13
|
+
lead?: string;
|
|
14
|
+
name?: string;
|
|
15
|
+
contact?: string;
|
|
16
|
+
message?: string;
|
|
17
|
+
requiredNote?: string;
|
|
18
|
+
submit?: string;
|
|
19
|
+
sending?: string;
|
|
20
|
+
success?: string;
|
|
21
|
+
error?: string;
|
|
22
|
+
invalidName?: string;
|
|
23
|
+
invalidContact?: string;
|
|
24
|
+
[other: string]: string | undefined;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface LeadPaths {
|
|
28
|
+
title?: string;
|
|
29
|
+
lead?: string;
|
|
30
|
+
name_label?: string;
|
|
31
|
+
contact_label?: string;
|
|
32
|
+
message_label?: string;
|
|
33
|
+
required_note?: string;
|
|
34
|
+
cta_label?: string;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface LeadFormProps {
|
|
38
|
+
/** Where `/api/lead` is from this page. */
|
|
39
|
+
action: string;
|
|
40
|
+
copy: LeadCopy;
|
|
41
|
+
asks?: Ask[];
|
|
42
|
+
paths?: LeadPaths;
|
|
43
|
+
/** The element around the form, `jtk-lead`; `''` for none. */
|
|
44
|
+
tag?: string;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function inputType(kind: string): 'number' | 'tel' | 'email' | 'url' | 'date' | 'time' | 'text';
|
|
48
|
+
/** The enquiry form as HTML, wrapped in `<jtk-lead>`. */
|
|
49
|
+
export function renderLeadForm(props: LeadFormProps): string;
|
package/types/meta.d.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export interface Meta {
|
|
2
|
+
redirects: { from: string; to: string; status?: number }[];
|
|
3
|
+
drafts: string[];
|
|
4
|
+
immutable?: string[];
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export interface MetaInput {
|
|
8
|
+
/** The content root, `jtk/content` under the working directory by default. */
|
|
9
|
+
root?: string;
|
|
10
|
+
collections?: { prefix: string; body?: string[] }[];
|
|
11
|
+
blocks?: { type: string; views?: { key: string }[] }[];
|
|
12
|
+
locales?: string[];
|
|
13
|
+
/** The directories whose file names carry a content hash, e.g. `['/_astro/']`. */
|
|
14
|
+
immutable?: string[];
|
|
15
|
+
redirects?: { from: string; to: string; status?: number }[];
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export function specimenId(type: string, view?: string): string;
|
|
19
|
+
export function specimenAddresses(
|
|
20
|
+
collections: { prefix: string; body?: string[] }[],
|
|
21
|
+
blocks: { type: string; views?: { key: string }[] }[],
|
|
22
|
+
locales?: string[],
|
|
23
|
+
): string[];
|
|
24
|
+
export function hiddenEntries(root?: string): Promise<string[]>;
|
|
25
|
+
export function buildMeta(what?: MetaInput): Promise<Meta>;
|
|
26
|
+
export function writeMeta(dir: string, what?: MetaInput): Promise<Meta>;
|
package/types/money.d.ts
ADDED
package/types/words.d.ts
ADDED