kss-modern 0.0.18 → 0.0.20
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/node/lib/index.d.mts +9 -1
- package/dist/node/lib/index.d.ts +9 -1
- package/dist/node/lib/index.mjs +152 -95
- package/dist/styleguide-assets/.vite/manifest.json +17 -10
- package/dist/styleguide-assets/client-DqS0770n.js +1 -0
- package/dist/styleguide-assets/{clipboard-C7Up7tbP.js → clipboard-Tvfm0Nqe.js} +1 -1
- package/dist/styleguide-assets/editor-select-Bzw7rF0M.js +28 -0
- package/dist/styleguide-assets/icons/css.svg +6 -0
- package/dist/styleguide-assets/icons/html.svg +1 -0
- package/dist/styleguide-assets/icons/pug.svg +1 -0
- package/dist/styleguide-assets/{icons-C6iXW1lQ.js → icons-BMUnz9Fy.js} +1 -1
- package/dist/styleguide-assets/{kss-modern-DDees9Y5.css → kss-modern-BIqlRJ0X.css} +1 -1
- package/dist/styleguide-assets/{main-B-jvVXMP.js → main-DysniEvV.js} +515 -512
- package/package.json +1 -1
- package/dist/styleguide-assets/client-B6dwqmLv.js +0 -1
|
@@ -25,7 +25,15 @@ interface in2Section {
|
|
|
25
25
|
wrapper?: string;
|
|
26
26
|
htmlclass?: string;
|
|
27
27
|
bodyclass?: string;
|
|
28
|
-
|
|
28
|
+
source: {
|
|
29
|
+
css: {
|
|
30
|
+
file: string;
|
|
31
|
+
line: number;
|
|
32
|
+
};
|
|
33
|
+
markup?: {
|
|
34
|
+
file: string;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
29
37
|
previewFileName: string;
|
|
30
38
|
fullpageFileName: string;
|
|
31
39
|
}
|
package/dist/node/lib/index.d.ts
CHANGED
|
@@ -25,7 +25,15 @@ interface in2Section {
|
|
|
25
25
|
wrapper?: string;
|
|
26
26
|
htmlclass?: string;
|
|
27
27
|
bodyclass?: string;
|
|
28
|
-
|
|
28
|
+
source: {
|
|
29
|
+
css: {
|
|
30
|
+
file: string;
|
|
31
|
+
line: number;
|
|
32
|
+
};
|
|
33
|
+
markup?: {
|
|
34
|
+
file: string;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
29
37
|
previewFileName: string;
|
|
30
38
|
fullpageFileName: string;
|
|
31
39
|
}
|
package/dist/node/lib/index.mjs
CHANGED
|
@@ -644,8 +644,8 @@ function extractMarkdownPath(input) {
|
|
|
644
644
|
}
|
|
645
645
|
return path2;
|
|
646
646
|
}
|
|
647
|
-
async function parse(
|
|
648
|
-
const data = kssParser(
|
|
647
|
+
async function parse(input, config) {
|
|
648
|
+
const data = kssParser(input).sections.filter((section) => Boolean(section.reference));
|
|
649
649
|
const overwrittenSectionsIds = [];
|
|
650
650
|
const sortedData = data.sort((a, b) => {
|
|
651
651
|
return a.reference.localeCompare(b.reference);
|
|
@@ -666,6 +666,34 @@ async function parse(text, config) {
|
|
|
666
666
|
hasMarkdownDescription: true
|
|
667
667
|
};
|
|
668
668
|
}
|
|
669
|
+
function computeSource(section) {
|
|
670
|
+
const cssSource = section.source;
|
|
671
|
+
let sourceMarkup = void 0;
|
|
672
|
+
const hasExtractableMarkupFile = section.markup.includes('<insert-vite-pug src="');
|
|
673
|
+
if (hasExtractableMarkupFile) {
|
|
674
|
+
const regexModifierLine = /<insert-vite-pug src="(.+?)".*(?:[\n\r\u2028\u2029]\s*)?(modifierClass="(.+?)")? *><\/insert-vite-pug>/g;
|
|
675
|
+
const vitePugTags = section.markup.match(regexModifierLine);
|
|
676
|
+
if (!vitePugTags)
|
|
677
|
+
throw new Error("No Vite Pug tags found");
|
|
678
|
+
vitePugTags.forEach((vitePugTag) => {
|
|
679
|
+
let pugSourcePath = vitePugTag.match(/src="(.+?)"/)?.[1];
|
|
680
|
+
if (!pugSourcePath || !pugSourcePath.endsWith(".pug")) {
|
|
681
|
+
throw new Error("No or invalid Pug source path found");
|
|
682
|
+
}
|
|
683
|
+
pugSourcePath = path.join(config.contentDir, pugSourcePath);
|
|
684
|
+
sourceMarkup = {
|
|
685
|
+
file: pugSourcePath
|
|
686
|
+
};
|
|
687
|
+
});
|
|
688
|
+
}
|
|
689
|
+
return {
|
|
690
|
+
css: {
|
|
691
|
+
file: cssSource.filename,
|
|
692
|
+
line: cssSource.line
|
|
693
|
+
},
|
|
694
|
+
markup: sourceMarkup
|
|
695
|
+
};
|
|
696
|
+
}
|
|
669
697
|
for await (const section of sortedData) {
|
|
670
698
|
if (!section.reference)
|
|
671
699
|
return;
|
|
@@ -696,7 +724,7 @@ async function parse(text, config) {
|
|
|
696
724
|
wrapper: section.wrapper,
|
|
697
725
|
htmlclass: section.htmlclass,
|
|
698
726
|
bodyclass: section.bodyclass,
|
|
699
|
-
|
|
727
|
+
source: computeSource(section),
|
|
700
728
|
previewFileName: `preview-${section.reference}.html`,
|
|
701
729
|
fullpageFileName: `fullpage-${section.reference}.html`
|
|
702
730
|
};
|
|
@@ -732,7 +760,7 @@ async function parse(text, config) {
|
|
|
732
760
|
wrapper: section.wrapper,
|
|
733
761
|
htmlclass: section.htmlclass,
|
|
734
762
|
bodyclass: section.bodyclass,
|
|
735
|
-
|
|
763
|
+
source: computeSource(section),
|
|
736
764
|
previewFileName: `preview-${section.reference}.html`,
|
|
737
765
|
fullpageFileName: `fullpage-${section.reference}.html`
|
|
738
766
|
});
|
|
@@ -761,7 +789,7 @@ async function parse(text, config) {
|
|
|
761
789
|
htmlclass: section.htmlclass,
|
|
762
790
|
bodyclass: section.bodyclass,
|
|
763
791
|
sections: [],
|
|
764
|
-
|
|
792
|
+
source: computeSource(section),
|
|
765
793
|
previewFileName: `preview-${section.reference}.html`,
|
|
766
794
|
fullpageFileName: `fullpage-${section.reference}.html`
|
|
767
795
|
};
|
|
@@ -849,37 +877,77 @@ function getHeaderHtml() {
|
|
|
849
877
|
</kbd>
|
|
850
878
|
</button>
|
|
851
879
|
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
<
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
<
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
</
|
|
872
|
-
|
|
873
|
-
<
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
880
|
+
<div class="flex gap-4">
|
|
881
|
+
${globalThis.styleguideConfiguration.launchInEditor ? `
|
|
882
|
+
<form class="hidden editor-select md:block">
|
|
883
|
+
<fieldset class="flex items-center rounded-3xl border border-styleguide-border">
|
|
884
|
+
<legend class="sr-only">Select a preferred editor</legend>
|
|
885
|
+
|
|
886
|
+
<div>
|
|
887
|
+
<input id="phpstorm" class="sr-only peer" type="radio" value="phpstorm" name="editor">
|
|
888
|
+
<label for="phpstorm" class="cursor-pointer p-2 block peer-checked:saturate-100 saturate-0 transition">
|
|
889
|
+
<span class="sr-only">PHPStorm</span>
|
|
890
|
+
<img
|
|
891
|
+
src="styleguide-assets/icons/phpstorm.svg"
|
|
892
|
+
width="70"
|
|
893
|
+
height="70"
|
|
894
|
+
class="size-4"
|
|
895
|
+
alt="PHPStorm Logo"
|
|
896
|
+
aria-hidden="true"
|
|
897
|
+
>
|
|
898
|
+
</label>
|
|
899
|
+
</div>
|
|
900
|
+
|
|
901
|
+
<div>
|
|
902
|
+
<input id="vscode" class="sr-only peer" type="radio" value="vscode" name="editor">
|
|
903
|
+
<label for="vscode" class="cursor-pointer p-2 block peer-checked:saturate-100 saturate-0 transition">
|
|
904
|
+
<span class="sr-only">VSCode</span>
|
|
905
|
+
<img
|
|
906
|
+
src="styleguide-assets/icons/vscode.svg"
|
|
907
|
+
width="70"
|
|
908
|
+
height="70"
|
|
909
|
+
class="size-4"
|
|
910
|
+
alt="VSCode Logo"
|
|
911
|
+
aria-hidden="true"
|
|
912
|
+
>
|
|
913
|
+
</label>
|
|
914
|
+
</div>
|
|
915
|
+
</fieldset>
|
|
916
|
+
</form>
|
|
917
|
+
` : ``}
|
|
918
|
+
|
|
919
|
+
${!(globalThis.styleguideConfiguration.deactivateDarkMode ?? false) ? `
|
|
920
|
+
<form class="hidden theme-select md:block">
|
|
921
|
+
<fieldset class="flex items-center rounded-3xl border border-styleguide-border">
|
|
922
|
+
<legend class="sr-only">Select a display theme</legend>
|
|
923
|
+
|
|
924
|
+
<input id="normal" class="sr-only" type="radio" value="normal" name="theme">
|
|
925
|
+
<label for="normal" class="cursor-pointer p-2">
|
|
926
|
+
<span class="sr-only">System</span>
|
|
927
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4">
|
|
928
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M9 17.25v1.007a3 3 0 0 1-.879 2.122L7.5 21h9l-.621-.621A3 3 0 0 1 15 18.257V17.25m6-12V15a2.25 2.25 0 0 1-2.25 2.25H5.25A2.25 2.25 0 0 1 3 15V5.25m18 0A2.25 2.25 0 0 0 18.75 3H5.25A2.25 2.25 0 0 0 3 5.25m18 0V12a2.25 2.25 0 0 1-2.25 2.25H5.25A2.25 2.25 0 0 1 3 12V5.25" />
|
|
929
|
+
</svg>
|
|
930
|
+
</label>
|
|
931
|
+
|
|
932
|
+
<input id="light" class="sr-only" type="radio" value="light" name="theme">
|
|
933
|
+
<label for="light" class="cursor-pointer p-2">
|
|
934
|
+
<span class="sr-only">Light</span>
|
|
935
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4">
|
|
936
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M12 3v2.25m6.364.386-1.591 1.591M21 12h-2.25m-.386 6.364-1.591-1.591M12 18.75V21m-4.773-4.227-1.591 1.591M5.25 12H3m4.227-4.773L5.636 5.636M15.75 12a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0Z" />
|
|
937
|
+
</svg>
|
|
938
|
+
</label>
|
|
939
|
+
|
|
940
|
+
<input id="dark" class="sr-only" type="radio" value="dark" name="theme">
|
|
941
|
+
<label for="dark" class="cursor-pointer p-2">
|
|
942
|
+
<span class="sr-only">Dark</span>
|
|
943
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4">
|
|
944
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M21.752 15.002A9.72 9.72 0 0 1 18 15.75c-5.385 0-9.75-4.365-9.75-9.75 0-1.33.266-2.597.748-3.752A9.753 9.753 0 0 0 3 11.25C3 16.635 7.365 21 12.75 21a9.753 9.753 0 0 0 9.002-5.998Z" />
|
|
945
|
+
</svg>
|
|
946
|
+
</label>
|
|
947
|
+
</fieldset>
|
|
948
|
+
</form>
|
|
949
|
+
` : ``}
|
|
950
|
+
</div>
|
|
883
951
|
</div>
|
|
884
952
|
</header>
|
|
885
953
|
`.trim();
|
|
@@ -1068,30 +1136,21 @@ ${html ?? ""}
|
|
|
1068
1136
|
`;
|
|
1069
1137
|
}
|
|
1070
1138
|
function getMainContentRegular(section, config) {
|
|
1071
|
-
|
|
1072
|
-
if (config.mode === "development" && config.launchInEditor
|
|
1073
|
-
const regexModifierLine = /<pug src="(.+?)".*(?:[\n\r\u2028\u2029]\s*)?(modifierClass="(.+?)")? *><\/pug>/g;
|
|
1074
|
-
const vitePugTags = section.markup.match(regexModifierLine);
|
|
1075
|
-
if (!vitePugTags)
|
|
1076
|
-
throw new Error("No Vite Pug tags found");
|
|
1077
|
-
vitePugTags.forEach((vitePugTag) => {
|
|
1078
|
-
const pugSourcePath = vitePugTag.match(/src="(.+?)"/)?.[1];
|
|
1079
|
-
if (!pugSourcePath || !pugSourcePath.endsWith(".pug")) {
|
|
1080
|
-
throw new Error("No or invalid Pug source path found");
|
|
1081
|
-
}
|
|
1082
|
-
sourceFilePath = pugSourcePath;
|
|
1083
|
-
});
|
|
1084
|
-
} else if (config.mode === "development" && section.sourceFileName) {
|
|
1085
|
-
sourceFilePath = path.join(config.contentDir, section.sourceFileName);
|
|
1086
|
-
}
|
|
1087
|
-
const shouldLaunchInEditor = config.mode === "development" && config.launchInEditor && sourceFilePath;
|
|
1088
|
-
let openInEditorPathPhpStorm = "";
|
|
1089
|
-
let openInEditorPathVscode = "";
|
|
1090
|
-
if (shouldLaunchInEditor) {
|
|
1139
|
+
const openInEditorPaths = {};
|
|
1140
|
+
if (config.mode === "development" && config.launchInEditor) {
|
|
1091
1141
|
const computedRootPath = config.launchInEditor && typeof config.launchInEditor === "object" && "rootDir" in config.launchInEditor ? config.launchInEditor.rootDir : process.cwd();
|
|
1092
|
-
const
|
|
1093
|
-
|
|
1094
|
-
|
|
1142
|
+
const cssFilePath = ensureStartingSlash(path.join(computedRootPath, section.source.css.file));
|
|
1143
|
+
openInEditorPaths.css = {
|
|
1144
|
+
vscode: `vscode://file//${cssFilePath}:${section.source.css.line}`,
|
|
1145
|
+
phpstorm: `phpstorm://open?file=${cssFilePath}&line=${section.source.css.line}`
|
|
1146
|
+
};
|
|
1147
|
+
if (section.source.markup && section.source.markup.file) {
|
|
1148
|
+
const htmlFilePath = ensureStartingSlash(path.join(computedRootPath, section.source.markup.file));
|
|
1149
|
+
openInEditorPaths.html = {
|
|
1150
|
+
vscode: `vscode://file//${htmlFilePath}`,
|
|
1151
|
+
phpstorm: `phpstorm://open?file=${htmlFilePath}`
|
|
1152
|
+
};
|
|
1153
|
+
}
|
|
1095
1154
|
}
|
|
1096
1155
|
const computeFigmaExternalLink = (url) => {
|
|
1097
1156
|
if (!url)
|
|
@@ -1100,6 +1159,23 @@ function getMainContentRegular(section, config) {
|
|
|
1100
1159
|
urlObj.hostname = "www.figma.com";
|
|
1101
1160
|
return urlObj.toString();
|
|
1102
1161
|
};
|
|
1162
|
+
const renderOpenInEditorLink = (editorType, contentType, link) => `
|
|
1163
|
+
<a
|
|
1164
|
+
class="hidden editor-${editorType}-only @md:inline-flex items-center group/${editorType} gap-1.5 p-4 desktop-device-only cursor-pointer active:scale-90 transition hover:text-styleguide-highlight duration-200"
|
|
1165
|
+
href="${link}"
|
|
1166
|
+
>
|
|
1167
|
+
<span class="hidden @2xl:inline-block">Open ${contentType}</span>
|
|
1168
|
+
<span class="sr-only">in ${editorType}</span>
|
|
1169
|
+
<img
|
|
1170
|
+
src="styleguide-assets/icons/${contentType.toLowerCase()}.svg"
|
|
1171
|
+
width="512"
|
|
1172
|
+
height="512"
|
|
1173
|
+
class="size-4 saturate-0 group-hover/${editorType}:saturate-100 transition"
|
|
1174
|
+
alt="${editorType} Logo"
|
|
1175
|
+
aria-hidden="true"
|
|
1176
|
+
>
|
|
1177
|
+
</a>
|
|
1178
|
+
`;
|
|
1103
1179
|
const codePreviewMarkup = `
|
|
1104
1180
|
<!-- Preview Box -->
|
|
1105
1181
|
<div class="mt-4 overflow-hidden rounded-2xl border border-styleguide-border">
|
|
@@ -1144,39 +1220,15 @@ function getMainContentRegular(section, config) {
|
|
|
1144
1220
|
>
|
|
1145
1221
|
</a>` : ""}
|
|
1146
1222
|
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
height="70"
|
|
1157
|
-
class="size-4 saturate-0 group-hover/phpstorm:saturate-100 transition"
|
|
1158
|
-
alt="PHPStorm Logo"
|
|
1159
|
-
aria-hidden="true"
|
|
1160
|
-
>
|
|
1161
|
-
</a>
|
|
1162
|
-
` : ""}
|
|
1163
|
-
|
|
1164
|
-
${openInEditorPathVscode ? `<a
|
|
1165
|
-
class="hidden @md:inline-flex items-center group/vscode gap-1.5 p-4 desktop-device-only cursor-pointer active:scale-90 transition hover:text-styleguide-highlight duration-200"
|
|
1166
|
-
href="${openInEditorPathVscode}"
|
|
1167
|
-
>
|
|
1168
|
-
<span class="hidden @2xl:inline-block">Open in</span>
|
|
1169
|
-
<span class="sr-only">VsCode</span>
|
|
1170
|
-
<img
|
|
1171
|
-
src="styleguide-assets/icons/vscode.svg"
|
|
1172
|
-
width="100"
|
|
1173
|
-
height="100"
|
|
1174
|
-
class="size-4 saturate-0 group-hover/vscode:saturate-100 transition"
|
|
1175
|
-
alt="VsCode Logo"
|
|
1176
|
-
aria-hidden="true"
|
|
1177
|
-
>
|
|
1178
|
-
</a>
|
|
1179
|
-
` : ""}
|
|
1223
|
+
${openInEditorPaths.html ? `
|
|
1224
|
+
${renderOpenInEditorLink("phpstorm", openInEditorPaths.html.phpstorm.includes(".pug") ? "Pug" : "HTML", openInEditorPaths.html.phpstorm)}
|
|
1225
|
+
${renderOpenInEditorLink("vscode", openInEditorPaths.html.phpstorm.includes(".pug") ? "Pug" : "HTML", openInEditorPaths.html.vscode)}
|
|
1226
|
+
` : ""}
|
|
1227
|
+
|
|
1228
|
+
${openInEditorPaths.css ? `
|
|
1229
|
+
${renderOpenInEditorLink("phpstorm", "CSS", openInEditorPaths.css.phpstorm)}
|
|
1230
|
+
${renderOpenInEditorLink("vscode", "CSS", openInEditorPaths.css.vscode)}
|
|
1231
|
+
` : ""}
|
|
1180
1232
|
|
|
1181
1233
|
<button
|
|
1182
1234
|
class="inline-flex items-center gap-1.5 p-4 cursor-pointer active:scale-90 transition hover:text-styleguide-highlight duration-200"
|
|
@@ -1538,8 +1590,8 @@ async function generatePreviewFile(data) {
|
|
|
1538
1590
|
<meta name="theme-color" content="${data.theme}">
|
|
1539
1591
|
<link rel="icon" type="image/svg+xml" href="/styleguide-assets/favicon/preview-light.svg">
|
|
1540
1592
|
`}
|
|
1541
|
-
<link rel="stylesheet" type="text/css" href="/styleguide-assets/kss-modern-
|
|
1542
|
-
<script type="module" src="/styleguide-assets/client-
|
|
1593
|
+
<link rel="stylesheet" type="text/css" href="/styleguide-assets/kss-modern-BIqlRJ0X.css">
|
|
1594
|
+
<script type="module" src="/styleguide-assets/client-DqS0770n.js"><\/script>
|
|
1543
1595
|
<link rel="preload" href="/styleguide-assets/fonts/geist-mono-latin-400-normal.woff2" as="font" type="font/woff2" crossorigin="anonymous">
|
|
1544
1596
|
<link rel="preload" href="/styleguide-assets/fonts/geist-mono-latin-600-normal.woff2" as="font" type="font/woff2" crossorigin="anonymous">
|
|
1545
1597
|
<link rel="preload" href="/styleguide-assets/fonts/geist-mono-latin-300-normal.woff2" as="font" type="font/woff2" crossorigin="anonymous">
|
|
@@ -1731,7 +1783,12 @@ globalThis.isWatchMode = false;
|
|
|
1731
1783
|
async function buildStyleguide(config) {
|
|
1732
1784
|
globalThis.styleguideConfiguration = config;
|
|
1733
1785
|
const styleguideContentPaths = await glob(`${config.contentDir}/**/*.{css,scss}`);
|
|
1734
|
-
const styleguideContent =
|
|
1786
|
+
const styleguideContent = await Promise.all(
|
|
1787
|
+
styleguideContentPaths.map(async (filePath) => ({
|
|
1788
|
+
path: filePath,
|
|
1789
|
+
contents: await fs.readFile(filePath, "utf-8")
|
|
1790
|
+
}))
|
|
1791
|
+
);
|
|
1735
1792
|
const rawParsedOutput = await parse(styleguideContent, config);
|
|
1736
1793
|
if (!rawParsedOutput)
|
|
1737
1794
|
throw new Error("Could not parse content");
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
|
-
"_main-
|
|
3
|
-
"file": "main-
|
|
2
|
+
"_main-DysniEvV.js": {
|
|
3
|
+
"file": "main-DysniEvV.js",
|
|
4
4
|
"name": "main",
|
|
5
5
|
"dynamicImports": [
|
|
6
6
|
"client/lib/html-validator.ts",
|
|
7
7
|
"client/lib/icons.ts",
|
|
8
|
-
"client/lib/clipboard.ts"
|
|
8
|
+
"client/lib/clipboard.ts",
|
|
9
|
+
"client/lib/editor-select.ts"
|
|
9
10
|
]
|
|
10
11
|
},
|
|
11
12
|
"client/fullpage.ts": {
|
|
@@ -15,14 +16,20 @@
|
|
|
15
16
|
"isEntry": true
|
|
16
17
|
},
|
|
17
18
|
"client/lib/clipboard.ts": {
|
|
18
|
-
"file": "clipboard-
|
|
19
|
+
"file": "clipboard-Tvfm0Nqe.js",
|
|
19
20
|
"name": "clipboard",
|
|
20
21
|
"src": "client/lib/clipboard.ts",
|
|
21
22
|
"isDynamicEntry": true,
|
|
22
23
|
"imports": [
|
|
23
|
-
"_main-
|
|
24
|
+
"_main-DysniEvV.js"
|
|
24
25
|
]
|
|
25
26
|
},
|
|
27
|
+
"client/lib/editor-select.ts": {
|
|
28
|
+
"file": "editor-select-Bzw7rF0M.js",
|
|
29
|
+
"name": "editor-select",
|
|
30
|
+
"src": "client/lib/editor-select.ts",
|
|
31
|
+
"isDynamicEntry": true
|
|
32
|
+
},
|
|
26
33
|
"client/lib/html-validator.ts": {
|
|
27
34
|
"file": "html-validator-bX8Fj2mZ.js",
|
|
28
35
|
"name": "html-validator",
|
|
@@ -33,21 +40,21 @@
|
|
|
33
40
|
]
|
|
34
41
|
},
|
|
35
42
|
"client/lib/icons.ts": {
|
|
36
|
-
"file": "icons-
|
|
43
|
+
"file": "icons-BMUnz9Fy.js",
|
|
37
44
|
"name": "icons",
|
|
38
45
|
"src": "client/lib/icons.ts",
|
|
39
46
|
"isDynamicEntry": true,
|
|
40
47
|
"imports": [
|
|
41
|
-
"_main-
|
|
48
|
+
"_main-DysniEvV.js"
|
|
42
49
|
]
|
|
43
50
|
},
|
|
44
51
|
"client/main.ts": {
|
|
45
|
-
"file": "client-
|
|
52
|
+
"file": "client-DqS0770n.js",
|
|
46
53
|
"name": "client",
|
|
47
54
|
"src": "client/main.ts",
|
|
48
55
|
"isEntry": true,
|
|
49
56
|
"imports": [
|
|
50
|
-
"_main-
|
|
57
|
+
"_main-DysniEvV.js"
|
|
51
58
|
]
|
|
52
59
|
},
|
|
53
60
|
"node_modules/html-validate/dist/esm/browser.js": {
|
|
@@ -57,7 +64,7 @@
|
|
|
57
64
|
"isDynamicEntry": true
|
|
58
65
|
},
|
|
59
66
|
"style.css": {
|
|
60
|
-
"file": "kss-modern-
|
|
67
|
+
"file": "kss-modern-BIqlRJ0X.css",
|
|
61
68
|
"src": "style.css"
|
|
62
69
|
}
|
|
63
70
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./main-DysniEvV.js";
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
const c = "in2editor", n = {
|
|
2
|
+
phpstorm: "editor-phpstorm",
|
|
3
|
+
vscode: "editor-vscode"
|
|
4
|
+
}, i = (r) => {
|
|
5
|
+
function a() {
|
|
6
|
+
const e = localStorage.getItem(c);
|
|
7
|
+
return e || localStorage.setItem(c, "normal"), e;
|
|
8
|
+
}
|
|
9
|
+
function s(e = !1) {
|
|
10
|
+
let t = a();
|
|
11
|
+
t || (t = "phpstorm", localStorage.setItem(c, t));
|
|
12
|
+
const d = n[t];
|
|
13
|
+
if (Object.values(n).forEach((o) => document.body.classList.remove(o)), document.body.classList.add(d), e) {
|
|
14
|
+
const o = r.querySelector(`input[value="${t}"]`);
|
|
15
|
+
o && (o.checked = !0);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
s(!0), r.addEventListener("change", () => {
|
|
19
|
+
const e = r.querySelector('input[name="editor"]:checked');
|
|
20
|
+
if (!e)
|
|
21
|
+
throw new Error("No checked editor theme found");
|
|
22
|
+
const t = e.value;
|
|
23
|
+
localStorage.setItem(c, t), s(!1);
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
export {
|
|
27
|
+
i as default
|
|
28
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512">
|
|
2
|
+
<path fill="#264de4" d="M71.357 460.819L30.272 0h451.456l-41.129 460.746L255.724 512z"/>
|
|
3
|
+
<path fill="#2965f1" d="M405.388 431.408l35.148-393.73H256v435.146z"/>
|
|
4
|
+
<path fill="#ebebeb" d="M124.46 208.59l5.065 56.517H256V208.59zM119.419 150.715H256V94.197H114.281zM256 355.372l-.248.066-62.944-16.996-4.023-45.076h-56.736l7.919 88.741 115.772 32.14.26-.073z"/>
|
|
5
|
+
<path fill="#fff" d="M255.805 208.59v56.517H325.4l-6.56 73.299-63.035 17.013v58.8l115.864-32.112.85-9.549 13.28-148.792 1.38-15.176 10.203-114.393H255.805v56.518h79.639L330.3 208.59z"/>
|
|
6
|
+
</svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><defs><path d="M0 0h512v512H0V0Z" id="a"/></defs><g fill-rule="nonzero" fill="none"><path fill="#E44D26" d="M71.114 460.974 30 0h452l-41.114 460.725L255.626 512"/><path fill="#F16529" d="M256 473V38h185l-35.303 393.305"/><path d="M114 94h142v56.463h-79.968l5.231 57.832H256v56.339H129.446m2.49 28.356h56.8l3.987 45.145L256 355.05V414l-116.091-32.336" fill="#EBEBEB"/><path d="M398 94H256v56.507h136.76m-5.117 57.877H256v56.507h69.877l-6.613 73.434L256 355.252V414l116.046-32.112" fill="#FFF"/></g></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><defs><path d="M0 0h512v512H0V0Z" id="a"/></defs><g fill-rule="nonzero" fill="none"><path d="M429.433 203.31c-.8-17.584 1.599-33.17-6.394-46.357C403.858 124.183 355.904 105 259.997 105v2.797H258h1.998V105c-95.907 0-146.258 19.183-165.44 52.352-7.592 13.588-6.793 28.774-7.992 46.358-.8 13.987-7.193 28.774-4.396 44.76 3.197 20.78 4.396 41.561 7.593 60.744 2.398 15.586 23.977 28.773 25.975 43.56 5.594 40.763 47.953 59.546 143.86 59.546v3.197H257.2 259.997v-3.197c95.907 0 136.668-18.783 141.863-59.546 1.998-15.186 21.978-27.974 24.376-43.56 3.197-19.183 4.396-39.964 7.593-60.745 2.797-15.985-3.597-31.171-4.396-45.159Z" fill="#EFCCA3"/><path d="M258.399 217.697c17.183.4 29.171 11.19 40.36 21.18 13.188 11.59 35.566 19.583 44.757 29.574 9.191 9.99 21.18 19.982 25.575 35.567 4.396 15.586 5.595 35.568 5.595 40.763 0 5.196 2.797 3.997 10.79 0 18.781-9.191 39.561-33.969 39.561-33.969-2.397 15.586-22.778 29.573-24.776 44.36-4.795 40.763-44.357 60.345-142.262 60.345h-.4 2.398" fill="#CCAC8D"/><path d="M321.538 186.526c3.596 12.388 16.384 54.35-8.392 40.363 0 0 10.39 5.994 16.783 28.774 6.794 22.779 23.178 25.576 23.178 25.576s26.774 5.196 46.755-11.989c16.783-14.387 19.58-39.963 12.388-59.546-7.193-19.182-19.981-25.177-38.763-29.173-18.782-4.396-56.345-7.993-51.95 5.995Z" fill="#CCAC8D"/><g transform="translate(333.925 196.916)"><ellipse fill="#000" cx="35.166" cy="35.168" rx="35.166" ry="35.168"/><ellipse fill="#FFF" cx="25.975" cy="19.582" rx="9.191" ry="9.192"/></g><path d="M315.543 230.486s31.57 21.58 48.753 42.76c17.183 21.181 16.784 25.178 16.784 25.178l-12.388 5.594s-17.583-33.17-39.162-45.558c-21.979-12.389-24.377-22.78-24.377-22.78l10.39-5.194Z" fill="#EFCCA3"/><path d="M259.597 217.697c-17.183.4-29.97 11.19-41.56 21.18-13.187 11.59-36.364 19.583-45.555 29.574-9.191 9.99-21.58 19.982-25.975 35.567-4.396 15.586-5.994 35.568-5.994 40.763 0 5.196.799 5.595-10.79 0-18.782-8.792-39.561-33.969-39.561-33.969 2.397 15.586 22.777 29.573 24.776 44.36 5.594 40.763 45.156 60.345 143.061 60.345H259.997" fill="#CCAC8D"/><path d="M352.308 285.236c-19.182-23.579-49.952-45.559-92.71-45.559h-.4c-42.759 0-73.529 21.98-92.71 45.559-19.981 24.377-18.383 33.969-18.383 57.147 0 83.924 29.572 59.946 49.153 70.336 19.98 9.991 40.76 6.794 61.94 6.794h.4c21.579 0 41.959 2.798 61.94-7.193 19.58-9.991 49.152 14.786 49.152-69.137.4-23.18 1.598-33.57-18.382-57.947Z" fill="#56332B"/><path d="M257.6 260.458s-2.798 38.765-8.392 46.358l10.39-2.398-1.999-43.96Z" fill="#442823"/><path d="M260.397 260.458s2.797 38.765 8.392 46.358l-10.39-2.398 1.998-43.96Z" fill="#442823"/><path d="M226.83 251.267c-3.997-9.192 10.39-23.979 33.167-24.378 22.778 0 37.164 14.786 33.168 24.378-3.996 9.59-18.382 12.388-33.168 12.788-14.386-.4-29.172-3.197-33.168-12.788Z" fill="#56332B"/><path d="M259.997 260.458c0-1.598 13.587-1.998 20.78-6.794 0 0-14.786 4.796-17.983 2.798-3.197-1.599-3.996-6.394-3.996-6.394s-1.199 4.795-3.596 6.394c-2.798 1.598-19.581-2.798-19.581-2.798s22.378 5.595 22.378 6.794c0 1.2-.4 5.195-.4 7.993 0 9.99 0 34.768 1.599 36.766 2.398 3.597 1.598-26.775 1.598-36.766-.4-3.197-.4-6.394-.799-7.993Z" fill="#000"/><path d="M260.796 314.01c6.794 0 18.782 4.795 29.572 12.388-10.39-11.59-22.778-19.582-29.572-19.582-7.193 0-22.378 8.792-33.168 21.58 11.19-8.792 25.576-14.387 33.168-14.387Z" fill="#7F4A41"/><path d="M257.999 384.745c-15.185 0-29.97-4.796-43.558-8.393-2.797-.799-5.594 1.2-8.392.4-25.175-7.993-45.556-21.58-57.944-38.765v3.997c0 83.923 29.572 60.345 49.153 70.336 19.98 9.99 40.76 6.793 61.94 6.793h.4c21.579 0 41.959 2.798 61.94-7.193 19.58-9.99 49.152 14.387 49.152-69.537 0-3.197 0-6.394.4-9.191-11.59 18.783-32.769 33.57-59.143 42.361-2.398.8-7.992-1.199-10.39-.8-14.386 4.797-27.174 9.992-43.558 9.992Z" fill="#442823"/><path d="M220.036 339.586s-9.99 29.973-3.197 43.16l-9.191-3.996s6.793-30.372 12.388-39.164ZM299.16 339.586s9.99 29.973 3.196 43.16l9.191-3.996s-7.193-30.372-12.388-39.164Z" fill="#442823"/><path d="M194.46 186.526c-3.596 12.388-16.384 54.35 8.392 40.363 0 0-10.39 5.994-16.783 28.774-6.394 22.779-23.178 25.576-23.178 25.576s-26.774 5.196-46.755-11.989c-16.783-14.387-19.58-39.963-12.388-59.546 7.193-19.582 19.981-25.177 38.763-29.173 18.782-4.396 55.946-7.993 51.95 5.995Z" fill="#CCAC8D"/><path d="M259.597 306.816c10.79 0 44.358 23.179 44.757 51.553v-1.599c0-29.573-27.174-53.151-44.757-53.151-17.582 0-44.756 23.978-44.756 53.151v1.599c.4-28.374 33.967-51.553 44.756-51.553Z" fill="#000"/><g transform="translate(244.727 239.026)" fill="#331712"><ellipse transform="rotate(-14.46 22.097 6.653)" cx="22.097" cy="6.653" rx="3.197" ry="5.994"/><ellipse transform="rotate(17.235 4.83 6.673)" cx="4.829" cy="6.673" rx="3.197" ry="5.995"/></g><g transform="translate(113.739 196.916)"><ellipse fill="#000" cx="35.166" cy="35.168" rx="35.166" ry="35.168"/><ellipse fill="#FFF" cx="44.357" cy="19.582" rx="9.191" ry="9.192"/></g><path d="M269.987 232.484c0-.4-9.19 3.996-11.588 4.396-2.398-.4-11.59-4.796-11.59-4.396H269.988Z" fill="#7F4A41"/><path d="M200.055 230.486s-31.57 21.58-48.753 42.76c-17.183 21.181-16.783 25.178-16.783 25.178l12.388 5.594s17.583-33.17 39.162-45.558c21.579-12.389 24.376-22.78 24.376-22.78l-10.39-5.194Z" fill="#EFCCA3"/><path d="M130.922 166.544s-10.79 29.573-34.766 41.962c0 0 37.563-4.396 34.766-41.962ZM383.078 166.544s10.79 29.573 34.766 41.962c0 0-37.563-4.396-34.766-41.962ZM314.744 221.694s-23.577-24.778-55.147-25.577h.8c-31.97.8-55.147 25.577-55.147 25.577 27.573-19.183 51.15-18.783 55.147-18.783-.4 0 26.774-.4 54.347 18.783ZM287.17 169.74s-11.988-16.784-27.972-17.183h.8c-11.99.4-27.574 17.184-27.574 17.184 13.587-13.188 27.573-12.788 27.573-12.788s13.187-.4 27.174 12.788ZM148.905 292.429s-18.782 9.192-32.369 3.597h-.4c-11.988-6.794-17.982-27.175-17.982-27.175s11.988 35.967 50.75 23.578ZM367.893 292.429s18.781 9.192 32.368 3.597c15.985-6.794 18.382-27.175 18.382-27.175s-11.988 35.967-50.75 23.578Z" fill="#CCAC8D"/><path d="M170.484 164.546c10.39-1.998 27.573-2.398 41.16 1.998 17.183 5.994 3.197 27.974 6.793 29.173 3.597 1.2 8.392-15.186 40.361-13.587 32.369 1.598 35.965 15.985 40.361 13.587 4.396-2.398-4.396-39.963 43.958-31.171 0 0-50.751-13.588-48.354 23.179 0 0-29.171-22.38-69.932-2.398.4 0 10.79-34.369-54.347-20.781ZM347.512 164.546c.8 0 1.2.4 1.599.4.4 0-.4-.4-1.599-.4ZM156.497 115.39s-43.158 54.35-49.552 75.132c-6.394 21.18-11.189 107.902-16.783 120.29L70.18 225.29l36.764-89.118 49.552-20.781ZM359.5 115.39s43.159 54.35 49.553 75.132c6.394 21.18 11.189 107.902 16.784 120.29l19.98-85.522-36.764-89.118L359.5 115.39Z" fill="#CCAC8D"/><path d="M357.503 115.39s46.355 38.765 59.942 83.524c13.587 44.76 7.992 99.11 18.382 105.904 14.786 9.591 31.57-47.557 37.164-53.551 8.791-9.592 37.963-33.97 39.961-38.365 1.998-4.396-59.143-71.136-85.917-84.324-32.368-15.186-72.33-16.385-69.532-13.187Z" fill="#56332B"/><path d="M397.064 139.369s54.747 69.936 53.948 157.056l21.979-44.759c-.4 0-19.581-57.148-75.927-112.297Z" fill="#442823"/><path d="M156.497 115.39s-46.355 38.765-59.942 83.524c-13.587 44.76-7.992 99.11-18.382 105.904-14.786 9.591-31.57-47.557-37.164-53.551-8.791-9.592-37.963-33.97-39.961-38.365-1.998-4.396 59.143-71.136 85.917-84.324 32.368-15.186 72.33-16.385 69.532-13.187Z" fill="#56332B"/><path d="M116.936 139.369s-54.747 69.936-53.948 157.056l-21.58-44.759s19.182-57.148 75.528-112.297Z" fill="#442823"/><path d="M87.364 298.024s3.996 21.58 10.39 28.374c6.394 6.794 1.998-5.195 1.998-5.195s-6.793-3.597-5.594-31.172c1.199-27.575-6.794 7.993-6.794 7.993ZM428.234 298.024s-3.996 21.58-10.39 28.374c-6.394 6.794-1.998-5.195-1.998-5.195s6.794-3.597 5.595-31.172c-1.2-27.575 6.793 7.993 6.793 7.993Z" fill="#CCAC8D"/><g transform="translate(190.464 278.442)" fill="#442823"><circle cx="27.573" cy="3.197" r="3.197"/><circle cx="9.191" cy="22.38" r="3.197"/><circle cx="3.197" cy="3.197" r="3.197"/></g><g transform="translate(292.765 278.442)" fill="#442823"><circle cx="3.197" cy="3.197" r="3.197"/><circle cx="21.579" cy="22.38" r="3.197"/><circle cx="27.573" cy="3.197" r="3.197"/></g></g></svg>
|