@segha/catalog 5.0.0 → 5.0.2
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/common/Colors.ts +47 -0
- package/common/Countries.ts +22 -0
- package/common/DateAndTime.ts +46 -0
- package/common/ExternalIds.ts +6 -0
- package/common/Icons.ts +7 -0
- package/common/Languages.ts +21 -0
- package/common/Wiki.ts +17 -0
- package/es/Movie/index.ts +1 -1
- package/package.json +2 -3
package/common/Colors.ts
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
|
|
2
|
+
import { regex } from "arkregex";
|
|
3
|
+
import z from "zod";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* `#RRGGBB` or `#RRGGBBAA`
|
|
7
|
+
*/
|
|
8
|
+
export const Hex = regex("^#([0-9a-fA-F]{6}|[0-9a-fA-F]{8})$");
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Captures both `rgb(255, 255, 255)` or `rgba(255, 255, 255, 1)`
|
|
12
|
+
*/
|
|
13
|
+
export const RGBA = regex("^rgba?\\(\\s*[^)]+\\s*\\)$");
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Captures both `hsl(255, 100%, 100%)` or `hsla(255, 100%, 100%, 1)`
|
|
17
|
+
*/
|
|
18
|
+
export const HSLA = regex("^hsla?\\(\\s*[^)]+\\s*\\)$");
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Captures `oklab(L C H[ / A])`. Eg
|
|
22
|
+
*/
|
|
23
|
+
export const OKLAB = regex("^oklab\\(\\s*[^)]+\\s*\\)$");
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Captures `oklch(L C H[ / A])`. Eg
|
|
27
|
+
*/
|
|
28
|
+
export const OKLCH = regex("^oklch\\(\\s*[^)]+\\s*\\)$");
|
|
29
|
+
|
|
30
|
+
export const Palette = z.enum([
|
|
31
|
+
'red',
|
|
32
|
+
'orange',
|
|
33
|
+
'yellow',
|
|
34
|
+
'green',
|
|
35
|
+
'cyan',
|
|
36
|
+
'blue',
|
|
37
|
+
'purple',
|
|
38
|
+
'magenta',
|
|
39
|
+
])
|
|
40
|
+
|
|
41
|
+
export const Scheme = z.enum([
|
|
42
|
+
'primary',
|
|
43
|
+
'semaphore',
|
|
44
|
+
'rainbow',
|
|
45
|
+
'contrast',
|
|
46
|
+
'monochrome',
|
|
47
|
+
]);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { regex } from "arkregex";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* `xx` (ISO 3166-1 Alpha-2)
|
|
5
|
+
*/
|
|
6
|
+
export const ShortCode = regex("^[a-z]{2}$");
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* `xxx` (ISO 3166-1 Alpha-3)
|
|
10
|
+
*/
|
|
11
|
+
export const LongCode = regex("^[a-z]{3}$");
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* `000` (ISO 3166-1 Numeric-3)
|
|
15
|
+
*/
|
|
16
|
+
export const NumericCode = regex("^[0-9]{3}$");
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* `xx-yy` or `xx-yyy` (ISO 3166-2)
|
|
20
|
+
*/
|
|
21
|
+
export const DivisionCode = regex("^[a-z]{2}-[a-z]{2,3}$");
|
|
22
|
+
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { regex } from "arkregex";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* `YYYY` (ISO 8601)
|
|
5
|
+
*/
|
|
6
|
+
export const Year = regex("^[0-9]{4}$");
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* `YYYY-MM` (ISO 8601)
|
|
10
|
+
*/
|
|
11
|
+
export const Month = regex("^[0-9]{4}-[0-9]{2}$");
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* `YYYY-MM-DD` (ISO 8601)
|
|
15
|
+
*/
|
|
16
|
+
export const Date = regex("^[0-9]{4}-[0-9]{2}-[0-9]{2}$");
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* `HH:MM:SSZ` (ISO 8601)
|
|
20
|
+
*/
|
|
21
|
+
export const Time = regex("^[0-9]{2}:[0-9]{2}:[0-9]{2}Z$");
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* `YYYY-MM-DDTHH:MM:SSZ` (ISO 8601)
|
|
25
|
+
*/
|
|
26
|
+
export const DateTime = regex("^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z$");
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* `YYYY-MM-DDTHH:MM:SSZ[+-][0-9]{2}:[0-9]{2}` (ISO 8601)
|
|
30
|
+
*/
|
|
31
|
+
export const DateTimeOffset = regex("^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z[+-][0-9]{2}:[0-9]{2}$");
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* `YYYY-Www` (ISO 8601)
|
|
35
|
+
*/
|
|
36
|
+
export const Week = regex("^[0-9]{4}-W[0-9]{2}$");
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* `YYYY-Www-D` (ISO 8601)
|
|
40
|
+
*/
|
|
41
|
+
export const WeekWithWeekDay = regex("^[0-9]{4}-W[0-9]{2}-[1-7]$");
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* `YYYY-DDD` (ISO 8601)
|
|
45
|
+
*/
|
|
46
|
+
export const OrdinalDate = regex("^[0-9]{4}-[0-9]{3}$");
|
package/common/Icons.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { regex } from "arkregex";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* `xx` (ISO 639-1)
|
|
5
|
+
*/
|
|
6
|
+
export const ShortCode = regex("^[a-z]{2}$");
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* `xxx` (ISO 639-3)
|
|
10
|
+
*/
|
|
11
|
+
export const LongCode = regex("^[a-z]{3}$");
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* `xx` or `xxx` (ISO 639-1 or ISO 639-3)
|
|
15
|
+
*/
|
|
16
|
+
export const AnyCode = regex("^[a-z]{2,3}$");
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* `xx_XX` or `xxx_XX` (BCP 47)
|
|
20
|
+
*/
|
|
21
|
+
export const LanguageTag = regex("^[a-z]{2,3}(?:[-_][a-z]{2})?$");
|
package/common/Wiki.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
|
|
2
|
+
import { regex } from "arkregex";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* `[[Wikilink]]` or `[[Wikilink|Display Text]]`
|
|
6
|
+
*/
|
|
7
|
+
export const Link = regex("\\[\\[([^\\]|]+)(?:\\|([^\\]]+))?\\]\\]");
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* `![[Wikilink]]` or `![[Wikilink|Display Text]]`
|
|
11
|
+
*/
|
|
12
|
+
export const Embedding = regex("!\\[\\[([^\\]|]+)(?:\\|([^\\]]+))?\\]\\]");
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* `[[Wikilink]]` or `![[Wikilink]]` or `[[Wikilink|Display Text]]` or `![[Wikilink|Display Text]]`
|
|
16
|
+
*/
|
|
17
|
+
export const LinkOrEmbedding = regex("(!)?\\[\\[([^\\]|]+)(?:\\|([^\\]]+))?\\]\\]");
|
package/es/Movie/index.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@segha/catalog",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.2",
|
|
4
4
|
"main": "index.ts",
|
|
5
5
|
"description": "Schemas for Petroglyph Catalog",
|
|
6
6
|
"segha": {
|
|
@@ -71,8 +71,7 @@
|
|
|
71
71
|
},
|
|
72
72
|
"files": [
|
|
73
73
|
"*.ts",
|
|
74
|
-
"
|
|
75
|
-
"es/**/*.ts",
|
|
74
|
+
"**/*.ts",
|
|
76
75
|
"json-schemas/**/*.json",
|
|
77
76
|
"README.md",
|
|
78
77
|
"CHANGELOG.md"
|