Reduce mixed colors in dominant sampling
This commit is contained in:
+87
-6
@@ -127,6 +127,21 @@ function oklabDistance(a: Oklab, b: Oklab) {
|
|||||||
return Math.hypot(a[0] - b[0], a[1] - b[1], a[2] - b[2]);
|
return Math.hypot(a[0] - b[0], a[1] - b[1], a[2] - b[2]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function isPerceptualBridge(color: Oklab, first: Oklab, second: Oklab) {
|
||||||
|
const vector = [second[0] - first[0], second[1] - first[1], second[2] - first[2]] as Oklab;
|
||||||
|
const lengthSquared = vector[0] ** 2 + vector[1] ** 2 + vector[2] ** 2;
|
||||||
|
if (lengthSquared < 0.07 ** 2) return false;
|
||||||
|
const offset = [color[0] - first[0], color[1] - first[1], color[2] - first[2]] as Oklab;
|
||||||
|
const position = (offset[0] * vector[0] + offset[1] * vector[1] + offset[2] * vector[2]) / lengthSquared;
|
||||||
|
if (position < 0.12 || position > 0.88) return false;
|
||||||
|
const projection: Oklab = [
|
||||||
|
first[0] + vector[0] * position,
|
||||||
|
first[1] + vector[1] * position,
|
||||||
|
first[2] + vector[2] * position,
|
||||||
|
];
|
||||||
|
return oklabDistance(color, projection) <= 0.025;
|
||||||
|
}
|
||||||
|
|
||||||
const PALETTE: BeadColor[] = MARD_221.map(([code, hex]) => {
|
const PALETTE: BeadColor[] = MARD_221.map(([code, hex]) => {
|
||||||
const rgb: [number, number, number] = [parseInt(hex.slice(1, 3), 16), parseInt(hex.slice(3, 5), 16), parseInt(hex.slice(5, 7), 16)];
|
const rgb: [number, number, number] = [parseInt(hex.slice(1, 3), 16), parseInt(hex.slice(3, 5), 16), parseInt(hex.slice(5, 7), 16)];
|
||||||
return { code, name: `MARD ${MARD_SERIES_NAMES[code[0]]}`, hex, rgb, lab: rgbToOklab(rgb) };
|
return { code, name: `MARD ${MARD_SERIES_NAMES[code[0]]}`, hex, rgb, lab: rgbToOklab(rgb) };
|
||||||
@@ -253,20 +268,21 @@ function sampleDominantRegions(
|
|||||||
cropX: number,
|
cropX: number,
|
||||||
cropY: number,
|
cropY: number,
|
||||||
) {
|
) {
|
||||||
// Center-weighted 3x3 sampling preserves geometric corners better than a
|
// A mildly center-weighted 3x3 vote keeps geometric corners without letting
|
||||||
// flat vote: center=4, orthogonal neighbors=2, diagonal neighbors=1.
|
// one anti-aliased center sample overpower the surrounding real colors.
|
||||||
const scale = 3;
|
const scale = 3;
|
||||||
const sampleWeights = [
|
const sampleWeights = [
|
||||||
|
[1, 1, 1],
|
||||||
[1, 2, 1],
|
[1, 2, 1],
|
||||||
[2, 4, 2],
|
[1, 1, 1],
|
||||||
[1, 2, 1],
|
|
||||||
];
|
];
|
||||||
const totalSampleWeight = 16;
|
const totalSampleWeight = 10;
|
||||||
const sample = document.createElement("canvas");
|
const sample = document.createElement("canvas");
|
||||||
sample.width = width * scale;
|
sample.width = width * scale;
|
||||||
sample.height = height * scale;
|
sample.height = height * scale;
|
||||||
const ctx = sample.getContext("2d", { willReadFrequently: true })!;
|
const ctx = sample.getContext("2d", { willReadFrequently: true })!;
|
||||||
ctx.clearRect(0, 0, sample.width, sample.height);
|
ctx.clearRect(0, 0, sample.width, sample.height);
|
||||||
|
ctx.imageSmoothingEnabled = false;
|
||||||
drawFittedImage(ctx, image, sample.width, sample.height, fitMode, cropZoom, cropX, cropY);
|
drawFittedImage(ctx, image, sample.width, sample.height, fitMode, cropZoom, cropX, cropY);
|
||||||
const source = ctx.getImageData(0, 0, sample.width, sample.height).data;
|
const source = ctx.getImageData(0, 0, sample.width, sample.height).data;
|
||||||
const result = new Uint8ClampedArray(width * height * 4);
|
const result = new Uint8ClampedArray(width * height * 4);
|
||||||
@@ -315,7 +331,20 @@ function sampleDominantRegions(
|
|||||||
confidence[row * width + column] = transparentWeight / totalSampleWeight;
|
confidence[row * width + column] = transparentWeight / totalSampleWeight;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
const dominant = groups.sort((a, b) => b.weight - a.weight || Number(b.containsCenter) - Number(a.containsCenter))[0];
|
const rankedGroups = groups.map((group) => {
|
||||||
|
let effectiveWeight = group.weight;
|
||||||
|
if (group.count <= 2) {
|
||||||
|
for (let first = 0; first < groups.length; first++) {
|
||||||
|
for (let second = first + 1; second < groups.length; second++) {
|
||||||
|
if (groups[first] === group || groups[second] === group) continue;
|
||||||
|
if (groups[first].weight + groups[second].weight < group.weight) continue;
|
||||||
|
if (isPerceptualBridge(group.lab, groups[first].lab, groups[second].lab)) effectiveWeight = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return { group, effectiveWeight };
|
||||||
|
});
|
||||||
|
const dominant = rankedGroups.sort((a, b) => b.effectiveWeight - a.effectiveWeight || b.group.weight - a.group.weight || Number(b.group.containsCenter) - Number(a.group.containsCenter))[0].group;
|
||||||
const representative = dominant.samples.reduce((best, current) =>
|
const representative = dominant.samples.reduce((best, current) =>
|
||||||
oklabDistance(current.lab, dominant.lab) < oklabDistance(best.lab, dominant.lab) ? current : best,
|
oklabDistance(current.lab, dominant.lab) < oklabDistance(best.lab, dominant.lab) ? current : best,
|
||||||
);
|
);
|
||||||
@@ -329,6 +358,55 @@ function sampleDominantRegions(
|
|||||||
return { data: result, confidence };
|
return { data: result, confidence };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function cleanThinTransitionBands(colors: Array<BeadColor | null>, width: number, height: number) {
|
||||||
|
const cleaned = [...colors];
|
||||||
|
const usage = new Map<string, number>();
|
||||||
|
colors.forEach((color) => { if (color) usage.set(color.code, (usage.get(color.code) ?? 0) + 1); });
|
||||||
|
const maximumTransitionUsage = Math.max(4, Math.ceil(width * height * 0.015));
|
||||||
|
let changed = 0;
|
||||||
|
|
||||||
|
for (let row = 0; row < height; row++) {
|
||||||
|
for (let column = 0; column < width; column++) {
|
||||||
|
const index = row * width + column;
|
||||||
|
const current = colors[index];
|
||||||
|
if (!current || (usage.get(current.code) ?? 0) > maximumTransitionUsage) continue;
|
||||||
|
const neighbors = new Map<string, { color: BeadColor; count: number }>();
|
||||||
|
for (let rowOffset = -1; rowOffset <= 1; rowOffset++) {
|
||||||
|
for (let columnOffset = -1; columnOffset <= 1; columnOffset++) {
|
||||||
|
if (rowOffset === 0 && columnOffset === 0) continue;
|
||||||
|
const neighborRow = row + rowOffset;
|
||||||
|
const neighborColumn = column + columnOffset;
|
||||||
|
if (neighborRow < 0 || neighborColumn < 0 || neighborRow >= height || neighborColumn >= width) continue;
|
||||||
|
const neighbor = colors[neighborRow * width + neighborColumn];
|
||||||
|
if (!neighbor || neighbor.code === current.code) continue;
|
||||||
|
const entry = neighbors.get(neighbor.code) ?? { color: neighbor, count: 0 };
|
||||||
|
entry.count += 1;
|
||||||
|
neighbors.set(neighbor.code, entry);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const candidates = [...neighbors.values()].sort((a, b) => b.count - a.count).slice(0, 3);
|
||||||
|
let replacement: BeadColor | null = null;
|
||||||
|
let replacementSupport = 0;
|
||||||
|
for (let first = 0; first < candidates.length; first++) {
|
||||||
|
for (let second = first + 1; second < candidates.length; second++) {
|
||||||
|
if (candidates[first].count + candidates[second].count < 4) continue;
|
||||||
|
if (!isPerceptualBridge(current.lab, candidates[first].color.lab, candidates[second].color.lab)) continue;
|
||||||
|
const preferred = candidates[first].count >= candidates[second].count ? candidates[first] : candidates[second];
|
||||||
|
if (preferred.count > replacementSupport) {
|
||||||
|
replacement = preferred.color;
|
||||||
|
replacementSupport = preferred.count;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (replacement) {
|
||||||
|
cleaned[index] = replacement;
|
||||||
|
changed += 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return { colors: cleaned, changed };
|
||||||
|
}
|
||||||
|
|
||||||
function cleanLowConfidenceIsolatedColors(
|
function cleanLowConfidenceIsolatedColors(
|
||||||
colors: Array<BeadColor | null>,
|
colors: Array<BeadColor | null>,
|
||||||
confidence: Float32Array,
|
confidence: Float32Array,
|
||||||
@@ -541,6 +619,9 @@ export default function Home() {
|
|||||||
const cleaned = cleanLowConfidenceIsolatedColors(matchedColors, dominantConfidence, width, height);
|
const cleaned = cleanLowConfidenceIsolatedColors(matchedColors, dominantConfidence, width, height);
|
||||||
matchedColors = cleaned.colors;
|
matchedColors = cleaned.colors;
|
||||||
cleanedCount = cleaned.changed;
|
cleanedCount = cleaned.changed;
|
||||||
|
const transitionCleaned = cleanThinTransitionBands(matchedColors, width, height);
|
||||||
|
matchedColors = transitionCleaned.colors;
|
||||||
|
cleanedCount += transitionCleaned.changed;
|
||||||
}
|
}
|
||||||
const converted = matchedColors.map((color) => ({ color }));
|
const converted = matchedColors.map((color) => ({ color }));
|
||||||
setGridWidth(width);
|
setGridWidth(width);
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
"name": "rolldown-runtime"
|
"name": "rolldown-runtime"
|
||||||
},
|
},
|
||||||
"app/page.tsx": {
|
"app/page.tsx": {
|
||||||
"file": "_next/static/chunks/page-Ds3jcguw.js",
|
"file": "_next/static/chunks/page-4NnBD0-a.js",
|
||||||
"name": "page",
|
"name": "page",
|
||||||
"src": "app/page.tsx",
|
"src": "app/page.tsx",
|
||||||
"isDynamicEntry": true,
|
"isDynamicEntry": true,
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/vinext/dist/shims/layout-segment-context.js": {
|
"node_modules/vinext/dist/shims/layout-segment-context.js": {
|
||||||
"file": "_next/static/chunks/layout-segment-context-C3hafNkY.js",
|
"file": "_next/static/chunks/layout-segment-context-D8b_5DJw.js",
|
||||||
"name": "layout-segment-context",
|
"name": "layout-segment-context",
|
||||||
"src": "node_modules/vinext/dist/shims/layout-segment-context.js",
|
"src": "node_modules/vinext/dist/shims/layout-segment-context.js",
|
||||||
"isDynamicEntry": true,
|
"isDynamicEntry": true,
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"virtual:vinext-app-browser-entry": {
|
"virtual:vinext-app-browser-entry": {
|
||||||
"file": "_next/static/chunks/index-DPPKxqAn.js",
|
"file": "_next/static/chunks/index-CJmX32Rb.js",
|
||||||
"name": "index",
|
"name": "index",
|
||||||
"src": "virtual:vinext-app-browser-entry",
|
"src": "virtual:vinext-app-browser-entry",
|
||||||
"isEntry": true,
|
"isEntry": true,
|
||||||
|
|||||||
+2
-2
@@ -1,2 +1,2 @@
|
|||||||
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/css/index.C2l_X3d9.css" data-rsc-css-href="/_next/static/css/index.C2l_X3d9.css" data-precedence="vite-rsc/importer-resources"/><link rel="modulepreload" fetchPriority="low" href="/_next/static/chunks/index-DPPKxqAn.js"/><script src="/_next/static/chunks/rolldown-runtime-C60lm6uB.js" type="module" async=""></script><script src="/_next/static/chunks/framework-BgSIrAUN.js" type="module" async=""></script><meta name="robots" content="noindex"/><title>豆格工坊|图片转拼豆图纸</title><meta name="description" content="在浏览器中把图片转换为拼豆像素图纸,按色号、名称或像素格筛选颜色。"/><title>404: This page could not be found.</title><script>Object.assign(((self[Symbol.for("vinext.navigationRuntime")]??={bootstrap:{routeManifest:null},functions:{}}).bootstrap.rsc??={rsc:[]}),{params:{},nav:{"pathname":"/__vinext_nonexistent_for_404__","searchParams":[]}})</script><link rel="modulepreload" href="/_next/static/chunks/index-DPPKxqAn.js" />
|
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/css/index.C2l_X3d9.css" data-rsc-css-href="/_next/static/css/index.C2l_X3d9.css" data-precedence="vite-rsc/importer-resources"/><link rel="modulepreload" fetchPriority="low" href="/_next/static/chunks/index-CJmX32Rb.js"/><script src="/_next/static/chunks/rolldown-runtime-C60lm6uB.js" type="module" async=""></script><script src="/_next/static/chunks/framework-BgSIrAUN.js" type="module" async=""></script><meta name="robots" content="noindex"/><title>豆格工坊|图片转拼豆图纸</title><meta name="description" content="在浏览器中把图片转换为拼豆像素图纸,按色号、名称或像素格筛选颜色。"/><title>404: This page could not be found.</title><script>Object.assign(((self[Symbol.for("vinext.navigationRuntime")]??={bootstrap:{routeManifest:null},functions:{}}).bootstrap.rsc??={rsc:[]}),{params:{},nav:{"pathname":"/__vinext_nonexistent_for_404__","searchParams":[]}})</script><link rel="modulepreload" href="/_next/static/chunks/index-CJmX32Rb.js" />
|
||||||
</head><body><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><script type="module" src="/_next/static/chunks/index-DPPKxqAn.js" id="_R_" async=""></script><script>((self[Symbol.for("vinext.navigationRuntime")]??={bootstrap:{routeManifest:null},functions:{}}).bootstrap.rsc??={rsc:[]}).rsc.push("1:\"$Sreact.fragment\"\n")</script><script>((self[Symbol.for("vinext.navigationRuntime")]??={bootstrap:{routeManifest:null},functions:{}}).bootstrap.rsc??={rsc:[]}).rsc.push(":HL[\"/_next/static/css/index.C2l_X3d9.css\",\"style\" ]\n")</script><script>((self[Symbol.for("vinext.navigationRuntime")]??={bootstrap:{routeManifest:null},functions:{}}).bootstrap.rsc??={rsc:[]}).rsc.push("0:{\"__route\":\"route:/__vinext_nonexistent_for_404__\",\"__interceptionContext\":null,\"__layoutIds\":[],\"__rootLayout\":null,\"route:/__vinext_nonexistent_for_404__\":[[[\"$\",\"link\",\"css:/_next/static/css/index.C2l_X3d9.css\",{\"rel\":\"stylesheet\",\"precedence\":\"vite-rsc/importer-resources\",\"href\":\"/_next/static/css/index.C2l_X3d9.css\",\"data-rsc-css-href\":\"/_next/static/css/index.C2l_X3d9.css\"}],\"$undefined\"],[\"$\",\"html\",null,{\"lang\":\"zh-CN\",\"children\":[\"$\",\"body\",null,{\"children\":[[\"$\",\"meta\",\"charset\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"robots\",{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$1\",\"metadata\",{\"children\":[[\"$\",\"title\",\"0\",{\"children\":\"豆格工坊|图片转拼豆图纸\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"在浏览器中把图片转换为拼豆像素图纸,按色号、名称或像素格筛选颜色。\"}]]}],[\"$\",\"$1\",\"viewport\",{\"children\":[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]}],[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]]]}]}]]}\n")</script><script>((self[Symbol.for("vinext.navigationRuntime")]??={bootstrap:{routeManifest:null},functions:{}}).bootstrap.rsc??={rsc:[]}).done=true</script></body></html>
|
</head><body><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><script type="module" src="/_next/static/chunks/index-CJmX32Rb.js" id="_R_" async=""></script><script>((self[Symbol.for("vinext.navigationRuntime")]??={bootstrap:{routeManifest:null},functions:{}}).bootstrap.rsc??={rsc:[]}).rsc.push("1:\"$Sreact.fragment\"\n")</script><script>((self[Symbol.for("vinext.navigationRuntime")]??={bootstrap:{routeManifest:null},functions:{}}).bootstrap.rsc??={rsc:[]}).rsc.push(":HL[\"/_next/static/css/index.C2l_X3d9.css\",\"style\" ]\n")</script><script>((self[Symbol.for("vinext.navigationRuntime")]??={bootstrap:{routeManifest:null},functions:{}}).bootstrap.rsc??={rsc:[]}).rsc.push("0:{\"__route\":\"route:/__vinext_nonexistent_for_404__\",\"__interceptionContext\":null,\"__layoutIds\":[],\"__rootLayout\":null,\"route:/__vinext_nonexistent_for_404__\":[[[\"$\",\"link\",\"css:/_next/static/css/index.C2l_X3d9.css\",{\"rel\":\"stylesheet\",\"precedence\":\"vite-rsc/importer-resources\",\"href\":\"/_next/static/css/index.C2l_X3d9.css\",\"data-rsc-css-href\":\"/_next/static/css/index.C2l_X3d9.css\"}],\"$undefined\"],[\"$\",\"html\",null,{\"lang\":\"zh-CN\",\"children\":[\"$\",\"body\",null,{\"children\":[[\"$\",\"meta\",\"charset\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"robots\",{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$1\",\"metadata\",{\"children\":[[\"$\",\"title\",\"0\",{\"children\":\"豆格工坊|图片转拼豆图纸\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"在浏览器中把图片转换为拼豆像素图纸,按色号、名称或像素格筛选颜色。\"}]]}],[\"$\",\"$1\",\"viewport\",{\"children\":[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]}],[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]]]}]}]]}\n")</script><script>((self[Symbol.for("vinext.navigationRuntime")]??={bootstrap:{routeManifest:null},functions:{}}).bootstrap.rsc??={rsc:[]}).done=true</script></body></html>
|
||||||
+3
-3
File diff suppressed because one or more lines are too long
+1
-1
@@ -1 +1 @@
|
|||||||
import{r as e}from"./rolldown-runtime-C60lm6uB.js";import{r as t}from"./framework-BgSIrAUN.js";import{t as n}from"./index-DPPKxqAn.js";var r=e(t(),1),i=new Map;function a(e,t){return e?{...e,...t}:t}function o({providerId:e,segmentMap:t,children:o}){let s=(0,r.useRef)(null),c=n(),l=a(s.current??(e?i.get(e)??null:null),t);return(0,r.useEffect)(()=>{s.current=l,e&&i.set(e,l)},[l,e]),c?(0,r.createElement)(c.Provider,{value:l},o):o}export{o as LayoutSegmentProvider,a as mergeLayoutSegmentMap};
|
import{r as e}from"./rolldown-runtime-C60lm6uB.js";import{r as t}from"./framework-BgSIrAUN.js";import{t as n}from"./index-CJmX32Rb.js";var r=e(t(),1),i=new Map;function a(e,t){return e?{...e,...t}:t}function o({providerId:e,segmentMap:t,children:o}){let s=(0,r.useRef)(null),c=n(),l=a(s.current??(e?i.get(e)??null:null),t);return(0,r.useEffect)(()=>{s.current=l,e&&i.set(e,l)},[l,e]),c?(0,r.createElement)(c.Provider,{value:l},o):o}export{o as LayoutSegmentProvider,a as mergeLayoutSegmentMap};
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+2
-2
File diff suppressed because one or more lines are too long
+1
-1
@@ -7,7 +7,7 @@
|
|||||||
8:I["9276801271d6",[],"AppRouterScrollTarget",1]
|
8:I["9276801271d6",[],"AppRouterScrollTarget",1]
|
||||||
9:I["593f344dc510",[],"RedirectBoundary",1]
|
9:I["593f344dc510",[],"RedirectBoundary",1]
|
||||||
:HL["/_next/static/css/index.C2l_X3d9.css","style" ]
|
:HL["/_next/static/css/index.C2l_X3d9.css","style" ]
|
||||||
0:{"__route":"route:/","__interceptionContext":null,"__layoutIds":["layout:/"],"__rootLayout":"/","__sourcePage":"/page","page:/":"$L1","layout:/":[[[["$","link","css:/_next/static/css/index.C2l_X3d9.css",{"rel":"stylesheet","precedence":"vite-rsc/importer-resources","href":"/_next/static/css/index.C2l_X3d9.css","data-rsc-css-href":"/_next/static/css/index.C2l_X3d9.css"}],"$undefined"],["$","html",null,{"lang":"zh-CN","children":["$","body",null,{"children":["$","$L2",null,{}]}]}]],null],"route:/":[[["$","meta",null,{"charSet":"utf-8"}],[["$","title","0",{"children":"豆格工坊|图片转拼豆图纸"}],["$","meta","1",{"name":"description","content":"在浏览器中把图片转换为拼豆像素图纸,按色号、名称或像素格筛选颜色。"}]],[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]],["$","$L3",null,{"fallback":"$4","children":["$","$L5",null,{"fallback":"$4","children":["$","$L6",null,{"providerId":"layout:/","segmentMap":{"children":[]},"children":["$","$L7",null,{"id":"layout:/","parallelSlots":"$undefined","children":["$","$L8",null,{"children":["$","$L9",null,{"children":[["$","$L6",null,{"providerId":"page:/","segmentMap":{"children":["__PAGE__"]},"children":["$","$L7",null,{"id":"page:/"}]}],null]}]}]}]}]}]}],null,null],"__layoutFlags":{"layout:/":"s"},"__artifactCompatibility":{"schemaVersion":1,"graphVersion":"app-route-graph:1177fd80f83fa7b0","deploymentVersion":"b3b8244f-7358-41e8-bc45-0338a0d8f141","appElementsSchemaVersion":1,"rscPayloadSchemaVersion":1,"rootBoundaryId":"/","renderEpoch":null},"__renderObservation":{"schemaVersion":1,"output":{"kind":"app-rsc","mountedSlotsFingerprint":null,"renderEpoch":null,"rootBoundaryId":"/","routeId":"route:/"},"completeness":"partial","boundaryOutcome":{"kind":"unknown"},"requestApis":[{"kind":"connection","status":"unknown"},{"kind":"cookies","status":"unknown"},{"kind":"draftMode","status":"unknown"},{"kind":"headers","status":"unknown"},{"kind":"params","status":"unknown"},{"kind":"searchParams","status":"unknown"}],"dynamicFetches":[],"cacheTags":["/","_N_T_/","_N_T_/index","_N_T_/layout","_N_T_/page"],"pathTags":["/"],"cacheability":"unknown","downgrade":{"target":"freshRender","reasons":[{"code":"CP_DOWNGRADE_CACHEABILITY_UNKNOWN","target":"freshRender"},{"code":"CP_DOWNGRADE_INCOMPLETE_OBSERVATION","completeness":"partial","target":"freshRender"},{"code":"CP_DOWNGRADE_UNKNOWN_REQUEST_API","requestApi":"connection","target":"freshRender"},{"code":"CP_DOWNGRADE_UNKNOWN_REQUEST_API","requestApi":"cookies","target":"freshRender"},{"code":"CP_DOWNGRADE_UNKNOWN_REQUEST_API","requestApi":"draftMode","target":"freshRender"},{"code":"CP_DOWNGRADE_UNKNOWN_REQUEST_API","requestApi":"headers","target":"freshRender"},{"code":"CP_DOWNGRADE_UNKNOWN_REQUEST_API","requestApi":"params","target":"freshRender"},{"code":"CP_DOWNGRADE_UNKNOWN_REQUEST_API","requestApi":"searchParams","target":"freshRender"}],"fallback":{"kind":"breakerFallback","code":"CP_PRIVATE_DYNAMIC_DOWNGRADE","mode":"renderFresh","scope":"affectedOutput","fields":{"reasonCodes":["CP_DOWNGRADE_CACHEABILITY_UNKNOWN","CP_DOWNGRADE_INCOMPLETE_OBSERVATION","CP_DOWNGRADE_UNKNOWN_REQUEST_API","CP_DOWNGRADE_UNKNOWN_REQUEST_API","CP_DOWNGRADE_UNKNOWN_REQUEST_API","CP_DOWNGRADE_UNKNOWN_REQUEST_API","CP_DOWNGRADE_UNKNOWN_REQUEST_API","CP_DOWNGRADE_UNKNOWN_REQUEST_API"],"target":"freshRender"}},"isPublicCacheCandidate":false}}}
|
0:{"__route":"route:/","__interceptionContext":null,"__layoutIds":["layout:/"],"__rootLayout":"/","__sourcePage":"/page","page:/":"$L1","layout:/":[[[["$","link","css:/_next/static/css/index.C2l_X3d9.css",{"rel":"stylesheet","precedence":"vite-rsc/importer-resources","href":"/_next/static/css/index.C2l_X3d9.css","data-rsc-css-href":"/_next/static/css/index.C2l_X3d9.css"}],"$undefined"],["$","html",null,{"lang":"zh-CN","children":["$","body",null,{"children":["$","$L2",null,{}]}]}]],null],"route:/":[[["$","meta",null,{"charSet":"utf-8"}],[["$","title","0",{"children":"豆格工坊|图片转拼豆图纸"}],["$","meta","1",{"name":"description","content":"在浏览器中把图片转换为拼豆像素图纸,按色号、名称或像素格筛选颜色。"}]],[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]],["$","$L3",null,{"fallback":"$4","children":["$","$L5",null,{"fallback":"$4","children":["$","$L6",null,{"providerId":"layout:/","segmentMap":{"children":[]},"children":["$","$L7",null,{"id":"layout:/","parallelSlots":"$undefined","children":["$","$L8",null,{"children":["$","$L9",null,{"children":[["$","$L6",null,{"providerId":"page:/","segmentMap":{"children":["__PAGE__"]},"children":["$","$L7",null,{"id":"page:/"}]}],null]}]}]}]}]}]}],null,null],"__layoutFlags":{"layout:/":"s"},"__artifactCompatibility":{"schemaVersion":1,"graphVersion":"app-route-graph:1177fd80f83fa7b0","deploymentVersion":"705fd153-1c83-4e79-8e7d-b2787748209c","appElementsSchemaVersion":1,"rscPayloadSchemaVersion":1,"rootBoundaryId":"/","renderEpoch":null},"__renderObservation":{"schemaVersion":1,"output":{"kind":"app-rsc","mountedSlotsFingerprint":null,"renderEpoch":null,"rootBoundaryId":"/","routeId":"route:/"},"completeness":"partial","boundaryOutcome":{"kind":"unknown"},"requestApis":[{"kind":"connection","status":"unknown"},{"kind":"cookies","status":"unknown"},{"kind":"draftMode","status":"unknown"},{"kind":"headers","status":"unknown"},{"kind":"params","status":"unknown"},{"kind":"searchParams","status":"unknown"}],"dynamicFetches":[],"cacheTags":["/","_N_T_/","_N_T_/index","_N_T_/layout","_N_T_/page"],"pathTags":["/"],"cacheability":"unknown","downgrade":{"target":"freshRender","reasons":[{"code":"CP_DOWNGRADE_CACHEABILITY_UNKNOWN","target":"freshRender"},{"code":"CP_DOWNGRADE_INCOMPLETE_OBSERVATION","completeness":"partial","target":"freshRender"},{"code":"CP_DOWNGRADE_UNKNOWN_REQUEST_API","requestApi":"connection","target":"freshRender"},{"code":"CP_DOWNGRADE_UNKNOWN_REQUEST_API","requestApi":"cookies","target":"freshRender"},{"code":"CP_DOWNGRADE_UNKNOWN_REQUEST_API","requestApi":"draftMode","target":"freshRender"},{"code":"CP_DOWNGRADE_UNKNOWN_REQUEST_API","requestApi":"headers","target":"freshRender"},{"code":"CP_DOWNGRADE_UNKNOWN_REQUEST_API","requestApi":"params","target":"freshRender"},{"code":"CP_DOWNGRADE_UNKNOWN_REQUEST_API","requestApi":"searchParams","target":"freshRender"}],"fallback":{"kind":"breakerFallback","code":"CP_PRIVATE_DYNAMIC_DOWNGRADE","mode":"renderFresh","scope":"affectedOutput","fields":{"reasonCodes":["CP_DOWNGRADE_CACHEABILITY_UNKNOWN","CP_DOWNGRADE_INCOMPLETE_OBSERVATION","CP_DOWNGRADE_UNKNOWN_REQUEST_API","CP_DOWNGRADE_UNKNOWN_REQUEST_API","CP_DOWNGRADE_UNKNOWN_REQUEST_API","CP_DOWNGRADE_UNKNOWN_REQUEST_API","CP_DOWNGRADE_UNKNOWN_REQUEST_API","CP_DOWNGRADE_UNKNOWN_REQUEST_API"],"target":"freshRender"}},"isPublicCacheCandidate":false}}}
|
||||||
a:I["6efdf509a785",[],"default",1]
|
a:I["6efdf509a785",[],"default",1]
|
||||||
1:["$","$La",null,{"params":"$@b","searchParams":"$@c"}]
|
1:["$","$La",null,{"params":"$@b","searchParams":"$@c"}]
|
||||||
b:{}
|
b:{}
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
{
|
{
|
||||||
"appBrowserEntry": "_next/static/chunks/index-DPPKxqAn.js"
|
"appBrowserEntry": "_next/static/chunks/index-CJmX32Rb.js"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user