@intentic/constants 1.303.0 → 1.305.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/dist/profile.d.ts +1 -1
- package/dist/profile.d.ts.map +1 -1
- package/dist/profile.js +2 -2
- package/dist/profile.js.map +1 -1
- package/package.json +5 -5
- package/src/assertion-measure.mjs +17 -3
package/dist/profile.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ export declare const PROFILE_PARAM = "profile";
|
|
|
2
2
|
export declare const PROFILE_STORAGE_KEY = "ui-profile";
|
|
3
3
|
export declare const PROFILE_COOKIE = "variant";
|
|
4
4
|
export declare const sharedCookieDomain: (originA: string, originB: string) => string | undefined;
|
|
5
|
-
export declare const PROFILE_IDS: readonly ["default", "
|
|
5
|
+
export declare const PROFILE_IDS: readonly ["default", "maker"];
|
|
6
6
|
export type Profile = (typeof PROFILE_IDS)[number];
|
|
7
7
|
export type ProfileScheme = "system" | "light" | "dark";
|
|
8
8
|
export type ProfileSkin = "system" | "none" | "sanctum";
|
package/dist/profile.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profile.d.ts","sourceRoot":"","sources":["../src/profile.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,aAAa,YAAY,CAAC;AAGvC,eAAO,MAAM,mBAAmB,eAAe,CAAC;AAQhD,eAAO,MAAM,cAAc,YAAY,CAAC;AAMxC,eAAO,MAAM,kBAAkB,YAAa,MAAM,WAAW,MAAM,KAAG,MAAM,GAAG,SAa9E,CAAC;AAGF,eAAO,MAAM,WAAW,YAAI,SAAS,EAAE,
|
|
1
|
+
{"version":3,"file":"profile.d.ts","sourceRoot":"","sources":["../src/profile.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,aAAa,YAAY,CAAC;AAGvC,eAAO,MAAM,mBAAmB,eAAe,CAAC;AAQhD,eAAO,MAAM,cAAc,YAAY,CAAC;AAMxC,eAAO,MAAM,kBAAkB,YAAa,MAAM,WAAW,MAAM,KAAG,MAAM,GAAG,SAa9E,CAAC;AAGF,eAAO,MAAM,WAAW,YAAI,SAAS,EAAE,OAAO,CAAU,CAAC;AAEzD,MAAM,MAAM,OAAO,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC;AAInD,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAC;AACxD,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,CAAC;AACxD,MAAM,MAAM,eAAe,GAAG,WAAW,GAAG,OAAO,CAAC;AAGpD,eAAO,MAAM,YAAY;aAErB,MAAM,EAAE,iBAAiB;aAEzB,IAAI,EAAE,SAAS;aAEf,QAAQ,EAAE,aAAa;CACjB,CAAC;AAEX,MAAM,WAAW,WAAW;IACxB,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC;IAC/B,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;IAE3B,QAAQ,CAAC,QAAQ,CAAC,EAAE,eAAe,CAAC;CACvC;AAID,eAAO,MAAM,QAAQ,EAAE,MAAM,CAAC,OAAO,EAAE,WAAW,CAGjD,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,OAAmB,CAAC;AAElD,eAAO,MAAM,SAAS,UAAW,OAAO,KAAG,KAAK,IAAI,OAAiD,CAAC"}
|
package/dist/profile.js
CHANGED
|
@@ -14,7 +14,7 @@ export const sharedCookieDomain = (originA, originB) => {
|
|
|
14
14
|
}
|
|
15
15
|
return shared.length >= 2 && shared.every((label) => !/^\d+$/u.test(label)) ? shared.join(".") : undefined;
|
|
16
16
|
};
|
|
17
|
-
export const PROFILE_IDS = ["default", "
|
|
17
|
+
export const PROFILE_IDS = ["default", "maker"];
|
|
18
18
|
export const PROFILE_KEYS = {
|
|
19
19
|
scheme: "ui-color-scheme",
|
|
20
20
|
skin: "ui-skin",
|
|
@@ -22,7 +22,7 @@ export const PROFILE_KEYS = {
|
|
|
22
22
|
};
|
|
23
23
|
export const PROFILES = {
|
|
24
24
|
default: { scheme: "system", skin: "system" },
|
|
25
|
-
|
|
25
|
+
maker: { scheme: "light", skin: "none", audience: "maker" },
|
|
26
26
|
};
|
|
27
27
|
export const DEFAULT_PROFILE = "default";
|
|
28
28
|
export const isProfile = (value) => PROFILE_IDS.includes(value);
|
package/dist/profile.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profile.js","sourceRoot":"","sources":["../src/profile.ts"],"names":[],"mappings":"AAUA,MAAM,CAAC,MAAM,aAAa,GAAG,SAAS,CAAC;AAGvC,MAAM,CAAC,MAAM,mBAAmB,GAAG,YAAY,CAAC;AAQhD,MAAM,CAAC,MAAM,cAAc,GAAG,SAAS,CAAC;AAMxC,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,OAAe,EAAE,OAAe,EAAsB,EAAE;IACvF,MAAM,CAAC,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC/C,MAAM,CAAC,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC/C,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;QAC9B,OAAO,SAAS,CAAC;IACrB,CAAC;IACD,MAAM,MAAM,GAAa,EAAE,CAAC;IAC5B,OAAO,CAAC,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QAC3D,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAY,CAAC,CAAC;QAClC,CAAC,CAAC,GAAG,EAAE,CAAC;IACZ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AG,EAAY,CAAC,CAAC;QAClC,CAAC,CAAC,GAAG,EAAE,CAAC;IACZ,CAAC;IAED,OAAO,MAAM,CAAC,MAAM,IAAI,CAAC,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AAC/G,CAAC,CAAC;AAGF,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,SAAS,EAAE,OAAO,CAAU,CAAC;AAWzD,MAAM,CAAC,MAAM,YAAY,GAAG;IAExB,MAAM,EAAE,iBAAiB;IAEzB,IAAI,EAAE,SAAS;IAEf,QAAQ,EAAE,aAAa;CACjB,CAAC;AAWX,MAAM,CAAC,MAAM,QAAQ,GAAiC;IAClD,OAAO,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE;IAC7C,KAAK,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE;CAC9D,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAY,SAAS,CAAC;AAElD,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,KAAc,EAAoB,EAAE,CAAC,WAAW,CAAC,QAAQ,CAAC,KAAgB,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intentic/constants",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.305.0",
|
|
4
4
|
"description": "Shared constants for the intentic packages, ports, paths, and image references the daemon, CLIs and desktop app all agree on",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -65,15 +65,15 @@
|
|
|
65
65
|
"devDependencies": {
|
|
66
66
|
"@intentic/testing": "0.0.0",
|
|
67
67
|
"@intentic/tsconfig": "0.0.0",
|
|
68
|
+
"@types/bun": "1.4.0",
|
|
68
69
|
"@types/node": "24.13.2",
|
|
69
|
-
"@typescript/native-preview": "7.0.0-dev.20260707.2"
|
|
70
|
-
"vitest": "4.1.10"
|
|
70
|
+
"@typescript/native-preview": "7.0.0-dev.20260707.2"
|
|
71
71
|
},
|
|
72
72
|
"scripts": {
|
|
73
73
|
"build": "tsgo",
|
|
74
74
|
"typecheck": "tsgo --noEmit -p tsconfig.test.json",
|
|
75
75
|
"watch": "tsgo --build --watch",
|
|
76
|
-
"test": "
|
|
77
|
-
"test:watch": "
|
|
76
|
+
"test": "suites",
|
|
77
|
+
"test:watch": "suites --watch"
|
|
78
78
|
}
|
|
79
79
|
}
|
|
@@ -88,6 +88,17 @@ const templateChars = (source, from) => {
|
|
|
88
88
|
return { chars: chars + Math.min(i, source.length) - run, end: i };
|
|
89
89
|
};
|
|
90
90
|
|
|
91
|
+
// A `/` opens a regex only where an expression may begin: after a bracket, operator or separator, never after a token
|
|
92
|
+
// that can end one (`)`, `]`, an identifier, a digit, a closing quote), where it is division.
|
|
93
|
+
const BEFORE_REGEX = /[(,=:[{!&|?;+\-*%^~<>]/;
|
|
94
|
+
const opensRegex = (source, at) => {
|
|
95
|
+
let i = at - 1;
|
|
96
|
+
while (i >= 0 && /\s/.test(source[i])) {
|
|
97
|
+
i -= 1;
|
|
98
|
+
}
|
|
99
|
+
return i < 0 || BEFORE_REGEX.test(source[i]);
|
|
100
|
+
};
|
|
101
|
+
|
|
91
102
|
const assertedChars = (source, from) => {
|
|
92
103
|
let depth = 0;
|
|
93
104
|
let chars = 0;
|
|
@@ -126,7 +137,7 @@ const assertedChars = (source, from) => {
|
|
|
126
137
|
const template = templateChars(source, i);
|
|
127
138
|
chars += template.chars;
|
|
128
139
|
i = template.end;
|
|
129
|
-
} else if (ch === "/" &&
|
|
140
|
+
} else if (ch === "/" && opensRegex(source, i)) {
|
|
130
141
|
// A regex literal in argument position; its source counts as asserted text like a string's.
|
|
131
142
|
let j = i + 1;
|
|
132
143
|
for (; j < source.length && source[j] !== "/" && source[j] !== "\n"; j += 1) {
|
|
@@ -134,8 +145,11 @@ const assertedChars = (source, from) => {
|
|
|
134
145
|
j += 1;
|
|
135
146
|
}
|
|
136
147
|
}
|
|
137
|
-
|
|
138
|
-
|
|
148
|
+
// Unterminated on its line, so not a regex: leave `i` be rather than skipping the brackets it spanned.
|
|
149
|
+
if (source[j] === "/") {
|
|
150
|
+
chars += j - i - 1;
|
|
151
|
+
i = j;
|
|
152
|
+
}
|
|
139
153
|
}
|
|
140
154
|
}
|
|
141
155
|
return chars;
|