jupyterlab_vscode_icons_extension 1.0.95 → 1.0.98
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/lib/index.js +30 -0
- package/package.json +1 -1
- package/src/index.ts +34 -0
package/lib/index.js
CHANGED
|
@@ -344,6 +344,12 @@ const fileTypeConfigs = [
|
|
|
344
344
|
iconName: 'file-type-terraform',
|
|
345
345
|
group: 'enableConfigIcons'
|
|
346
346
|
},
|
|
347
|
+
// Draw.io diagrams (custom icon registered separately)
|
|
348
|
+
{
|
|
349
|
+
extensions: ['.drawio', '.dio'],
|
|
350
|
+
iconName: 'custom-drawio',
|
|
351
|
+
group: 'enableConfigIcons'
|
|
352
|
+
},
|
|
347
353
|
// Images
|
|
348
354
|
{
|
|
349
355
|
extensions: ['.png', '.jpg', '.jpeg', '.gif', '.ico', '.webp', '.bmp'],
|
|
@@ -715,6 +721,10 @@ const plugin = {
|
|
|
715
721
|
if (!settings[config.group]) {
|
|
716
722
|
return;
|
|
717
723
|
}
|
|
724
|
+
// Skip custom icons that are registered separately
|
|
725
|
+
if (config.iconName.startsWith('custom-')) {
|
|
726
|
+
return;
|
|
727
|
+
}
|
|
718
728
|
const icon = createLabIcon(config.iconName);
|
|
719
729
|
const fileTypeName = `vscode-${config.iconName}`;
|
|
720
730
|
// Register file type
|
|
@@ -802,6 +812,26 @@ const plugin = {
|
|
|
802
812
|
contentType: 'file',
|
|
803
813
|
icon: readmeIcon
|
|
804
814
|
});
|
|
815
|
+
// Register Draw.io files with custom orange diagram icon
|
|
816
|
+
if (settings.enableConfigIcons) {
|
|
817
|
+
const drawioSvg = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 161.6 161.6">
|
|
818
|
+
<path fill="#F08705" d="M161.6,154.7c0,3.9-3.2,6.9-6.9,6.9H6.9c-3.9,0-6.9-3.2-6.9-6.9V6.9C0,3,3.2,0,6.9,0h147.8c3.9,0,6.9,3.2,6.9,6.9L161.6,154.7z"/>
|
|
819
|
+
<path fill="#DF6C0C" d="M161.6,154.7c0,3.9-3.2,6.9-6.9,6.9H55.3l-32.2-32.7l20-32.7l59.4-73.8l58.9,60.7L161.6,154.7z"/>
|
|
820
|
+
<path fill="#fff" d="M132.7,90.3h-17l-18-30.6c4-0.8,7-4.4,7-8.6V28c0-4.9-3.9-8.8-8.8-8.8h-30c-4.9,0-8.8,3.9-8.8,8.8v23.1c0,4.3,3,7.8,6.9,8.6L46,90.4H29c-4.9,0-8.8,3.9-8.8,8.8v23.1c0,4.9,3.9,8.8,8.8,8.8h30c4.9,0,8.8-3.9,8.8-8.8V99.2c0-4.9-3.9-8.8-8.8-8.8h-2.9L73.9,60h13.9l17.9,30.4h-3c-4.9,0-8.8,3.9-8.8,8.8v23.1c0,4.9,3.9,8.8,8.8,8.8h30c4.9,0,8.8-3.9,8.8-8.8V99.2C141.5,94.3,137.6,90.3,132.7,90.3z"/>
|
|
821
|
+
</svg>`;
|
|
822
|
+
const drawioIcon = new LabIcon({
|
|
823
|
+
name: 'drawio-icon',
|
|
824
|
+
svgstr: drawioSvg
|
|
825
|
+
});
|
|
826
|
+
docRegistry.addFileType({
|
|
827
|
+
name: 'vscode-drawio',
|
|
828
|
+
displayName: 'Draw.io Diagram',
|
|
829
|
+
extensions: ['.drawio', '.dio'],
|
|
830
|
+
fileFormat: 'text',
|
|
831
|
+
contentType: 'file',
|
|
832
|
+
icon: drawioIcon
|
|
833
|
+
});
|
|
834
|
+
}
|
|
805
835
|
};
|
|
806
836
|
// Debounce timer for settings change alert
|
|
807
837
|
let settingsChangeTimeout = null;
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -378,6 +378,12 @@ const fileTypeConfigs: IFileTypeConfig[] = [
|
|
|
378
378
|
iconName: 'file-type-terraform',
|
|
379
379
|
group: 'enableConfigIcons'
|
|
380
380
|
},
|
|
381
|
+
// Draw.io diagrams (custom icon registered separately)
|
|
382
|
+
{
|
|
383
|
+
extensions: ['.drawio', '.dio'],
|
|
384
|
+
iconName: 'custom-drawio',
|
|
385
|
+
group: 'enableConfigIcons'
|
|
386
|
+
},
|
|
381
387
|
|
|
382
388
|
// Images
|
|
383
389
|
{
|
|
@@ -776,6 +782,11 @@ const plugin: JupyterFrontEndPlugin<void> = {
|
|
|
776
782
|
return;
|
|
777
783
|
}
|
|
778
784
|
|
|
785
|
+
// Skip custom icons that are registered separately
|
|
786
|
+
if (config.iconName.startsWith('custom-')) {
|
|
787
|
+
return;
|
|
788
|
+
}
|
|
789
|
+
|
|
779
790
|
const icon = createLabIcon(config.iconName);
|
|
780
791
|
const fileTypeName = `vscode-${config.iconName}`;
|
|
781
792
|
|
|
@@ -877,6 +888,29 @@ const plugin: JupyterFrontEndPlugin<void> = {
|
|
|
877
888
|
contentType: 'file',
|
|
878
889
|
icon: readmeIcon
|
|
879
890
|
});
|
|
891
|
+
|
|
892
|
+
// Register Draw.io files with custom orange diagram icon
|
|
893
|
+
if (settings.enableConfigIcons) {
|
|
894
|
+
const drawioSvg = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 161.6 161.6">
|
|
895
|
+
<path fill="#F08705" d="M161.6,154.7c0,3.9-3.2,6.9-6.9,6.9H6.9c-3.9,0-6.9-3.2-6.9-6.9V6.9C0,3,3.2,0,6.9,0h147.8c3.9,0,6.9,3.2,6.9,6.9L161.6,154.7z"/>
|
|
896
|
+
<path fill="#DF6C0C" d="M161.6,154.7c0,3.9-3.2,6.9-6.9,6.9H55.3l-32.2-32.7l20-32.7l59.4-73.8l58.9,60.7L161.6,154.7z"/>
|
|
897
|
+
<path fill="#fff" d="M132.7,90.3h-17l-18-30.6c4-0.8,7-4.4,7-8.6V28c0-4.9-3.9-8.8-8.8-8.8h-30c-4.9,0-8.8,3.9-8.8,8.8v23.1c0,4.3,3,7.8,6.9,8.6L46,90.4H29c-4.9,0-8.8,3.9-8.8,8.8v23.1c0,4.9,3.9,8.8,8.8,8.8h30c4.9,0,8.8-3.9,8.8-8.8V99.2c0-4.9-3.9-8.8-8.8-8.8h-2.9L73.9,60h13.9l17.9,30.4h-3c-4.9,0-8.8,3.9-8.8,8.8v23.1c0,4.9,3.9,8.8,8.8,8.8h30c4.9,0,8.8-3.9,8.8-8.8V99.2C141.5,94.3,137.6,90.3,132.7,90.3z"/>
|
|
898
|
+
</svg>`;
|
|
899
|
+
|
|
900
|
+
const drawioIcon = new LabIcon({
|
|
901
|
+
name: 'drawio-icon',
|
|
902
|
+
svgstr: drawioSvg
|
|
903
|
+
});
|
|
904
|
+
|
|
905
|
+
docRegistry.addFileType({
|
|
906
|
+
name: 'vscode-drawio',
|
|
907
|
+
displayName: 'Draw.io Diagram',
|
|
908
|
+
extensions: ['.drawio', '.dio'],
|
|
909
|
+
fileFormat: 'text',
|
|
910
|
+
contentType: 'file',
|
|
911
|
+
icon: drawioIcon
|
|
912
|
+
});
|
|
913
|
+
}
|
|
880
914
|
};
|
|
881
915
|
|
|
882
916
|
// Debounce timer for settings change alert
|