Fixed files cross-reference Semantics

This commit is contained in:
Alexander Cerutti
2024-10-11 14:35:50 +02:00
parent 469ac70117
commit 5a7ab94eed
3 changed files with 5 additions and 6 deletions

View File

@@ -1,5 +1,5 @@
import Joi from "joi"; import Joi from "joi";
import { RGB_HEX_COLOR_REGEX } from "."; import { RGB_HEX_COLOR_REGEX } from "./regexps";
/** /**
* For a better description of every single field, * For a better description of every single field,

View File

@@ -20,11 +20,7 @@ import { Semantics } from "./Semantics";
import { CertificatesSchema } from "./Certificates"; import { CertificatesSchema } from "./Certificates";
import * as Messages from "../messages"; import * as Messages from "../messages";
import { RGB_HEX_COLOR_REGEX, URL_REGEX } from "./regexps";
export const RGB_HEX_COLOR_REGEX =
/(#[a-fA-F0-9]{3,6}|rgb\(\s*(?:[01]?[0-9][0-9]?|2[0-4][0-9]|25[0-5])\s*,\s*(?:[01]?[0-9][0-9]?|2[0-4][0-9]|25[0-5])\s*,\s*(?:[01]?[0-9][0-9]?|2[0-4][0-9]|25[0-5])\s*\))/;
const URL_REGEX = /https?:\/\/(?:[a-z0-9]+\.?)+(?::\d{2,})?(?:\/[\S]+)*/;
export type PreferredStyleSchemes = ("posterEventTicket" | "eventTicket")[]; export type PreferredStyleSchemes = ("posterEventTicket" | "eventTicket")[];

3
src/schemas/regexps.ts Normal file
View File

@@ -0,0 +1,3 @@
export const RGB_HEX_COLOR_REGEX =
/(?:\#[a-fA-F0-9]{3,6}|rgb\(\s*(?:[01]?[0-9][0-9]?|2[0-4][0-9]|25[0-5])\s*,\s*(?:[01]?[0-9][0-9]?|2[0-4][0-9]|25[0-5])\s*,\s*(?:[01]?[0-9][0-9]?|2[0-4][0-9]|25[0-5])\s*\))/;
export const URL_REGEX = /https?:\/\/(?:[a-z0-9]+\.?)+(?::\d{2,})?(?:\/[\S]+)*/;