@ai-matrx/records-ui 0.116.29 → 0.116.31
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/CHANGELOG.md +28 -1
- package/dist/{SaveToTable-P3MPRSCW.js → SaveToTable-4AS5YBRT.js} +2 -2
- package/dist/{chunk-FLIERNH7.js → chunk-4G6EOOKM.js} +17 -5
- package/dist/chunk-4G6EOOKM.js.map +1 -0
- package/dist/{chunk-5EFM2G2O.js → chunk-BQS26T6D.js} +10 -8
- package/dist/chunk-BQS26T6D.js.map +1 -0
- package/dist/index.cjs +182 -180
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -3
- package/dist/index.d.ts +6 -3
- package/dist/index.js +153 -165
- package/dist/index.js.map +1 -1
- package/dist/pickers.cjs +7 -6
- package/dist/pickers.cjs.map +1 -1
- package/dist/pickers.js +1 -1
- package/package.json +6 -6
- package/dist/chunk-5EFM2G2O.js.map +0 -1
- package/dist/chunk-FLIERNH7.js.map +0 -1
- /package/dist/{SaveToTable-P3MPRSCW.js.map → SaveToTable-4AS5YBRT.js.map} +0 -0
|
@@ -433,6 +433,7 @@ import {
|
|
|
433
433
|
MEASURE_UNITS,
|
|
434
434
|
TYPE_WEIGHTS,
|
|
435
435
|
contrastLevel,
|
|
436
|
+
TEXT_CONTRAST,
|
|
436
437
|
contrastRatio,
|
|
437
438
|
readColorPair,
|
|
438
439
|
MOTION_EASINGS,
|
|
@@ -481,8 +482,8 @@ function colorPairContrast(pair, format, context) {
|
|
|
481
482
|
}
|
|
482
483
|
return out;
|
|
483
484
|
}
|
|
484
|
-
function ContrastMark({ ratio }) {
|
|
485
|
-
const level = contrastLevel(ratio);
|
|
485
|
+
function ContrastMark({ ratio, min }) {
|
|
486
|
+
const level = contrastLevel(ratio, min);
|
|
486
487
|
const said2 = `${ratio}:1`;
|
|
487
488
|
return /* @__PURE__ */ jsxs2(
|
|
488
489
|
"span",
|
|
@@ -505,12 +506,12 @@ function ColorPairView({ value, format }) {
|
|
|
505
506
|
/* @__PURE__ */ jsxs2("span", { className: "inline-flex items-center gap-1.5", children: [
|
|
506
507
|
/* @__PURE__ */ jsx2(Swatch, { color: pair.light }),
|
|
507
508
|
/* @__PURE__ */ jsx2("code", { className: "font-mono text-xs uppercase", children: pair.light }),
|
|
508
|
-
contrast.light !== void 0 ? /* @__PURE__ */ jsx2(ContrastMark, { ratio: contrast.light }) : null
|
|
509
|
+
contrast.light !== void 0 ? /* @__PURE__ */ jsx2(ContrastMark, { ratio: contrast.light, min: pair.min }) : null
|
|
509
510
|
] }),
|
|
510
511
|
/* @__PURE__ */ jsxs2("span", { className: "inline-flex items-center gap-1.5", children: [
|
|
511
512
|
/* @__PURE__ */ jsx2(Swatch, { color: pair.dark ?? pair.light }),
|
|
512
513
|
/* @__PURE__ */ jsx2("code", { className: cn2("font-mono text-xs uppercase", !pair.dark && "text-muted-foreground"), children: pair.dark ?? "Inherits light" }),
|
|
513
|
-
contrast.dark !== void 0 ? /* @__PURE__ */ jsx2(ContrastMark, { ratio: contrast.dark }) : null
|
|
514
|
+
contrast.dark !== void 0 ? /* @__PURE__ */ jsx2(ContrastMark, { ratio: contrast.dark, min: pair.min }) : null
|
|
514
515
|
] })
|
|
515
516
|
] });
|
|
516
517
|
}
|
|
@@ -612,14 +613,15 @@ function colorPairChecks(value, format, context) {
|
|
|
612
613
|
const out = [];
|
|
613
614
|
for (const part of ["light", "dark"]) {
|
|
614
615
|
const ratio = contrast[part];
|
|
615
|
-
if (ratio === void 0 || contrastLevel(ratio) === "pass") continue;
|
|
616
|
+
if (ratio === void 0 || contrastLevel(ratio, pair.min) === "pass") continue;
|
|
616
617
|
const color = part === "light" ? pair.light : pair.dark ?? pair.light;
|
|
618
|
+
const need = pair.min ?? TEXT_CONTRAST;
|
|
617
619
|
out.push({
|
|
618
620
|
part,
|
|
619
621
|
message: `hard to read on ${ground}`,
|
|
620
622
|
fix: {
|
|
621
623
|
label: "Fix with AI",
|
|
622
|
-
ask: `The ${part} color ${color} reads at ${ratio}:1 on ${ground}. Suggest the nearest color that reaches
|
|
624
|
+
ask: `The ${part} color ${color} reads at ${ratio}:1 on ${ground}. Suggest the nearest color that reaches ${need}:1 and keeps its hue.`
|
|
623
625
|
}
|
|
624
626
|
});
|
|
625
627
|
}
|
|
@@ -4782,7 +4784,7 @@ import { AlchemyMenu } from "@ai-matrx/alchemy/react";
|
|
|
4782
4784
|
import { OutboundLink as OutboundLink5 } from "@ai-matrx/kit/outbound-react";
|
|
4783
4785
|
import { humanizeIdentifier } from "@ai-matrx/kit/text-case";
|
|
4784
4786
|
import { jsx as jsx26, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
4785
|
-
var SaveToTable = lazy(() => import("./SaveToTable-
|
|
4787
|
+
var SaveToTable = lazy(() => import("./SaveToTable-4AS5YBRT.js").then((m) => ({ default: m.SaveToTable })));
|
|
4786
4788
|
var LONGEST_READ = 5e5;
|
|
4787
4789
|
var FENCE = /^```(?:json)?[ \t]*\r?\n([\s\S]*?)\r?\n?```$/;
|
|
4788
4790
|
function isPlainObject(v) {
|
|
@@ -12320,4 +12322,4 @@ export {
|
|
|
12320
12322
|
RecordNameText,
|
|
12321
12323
|
HeldChangeDecision
|
|
12322
12324
|
};
|
|
12323
|
-
//# sourceMappingURL=chunk-
|
|
12325
|
+
//# sourceMappingURL=chunk-BQS26T6D.js.map
|