@digital-ai/dot-illustrations 2.0.40 → 2.0.41

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.
@@ -295,14 +295,26 @@ async function ghCreateIntegrationPR(id, svgBuf) {
295
295
  // ─── Utility: append an ID to a JS array in source text ──────────────────────
296
296
 
297
297
  function appendToJsArray(source, arrayName, id) {
298
- // Find the last entry in the named array and insert after it
298
+ // Insert id alphabetically into the named array
299
299
  const re = new RegExp(`(const ${arrayName} = \\[)([\\s\\S]*?)(\\s*\\];)`, 'm');
300
300
  const match = source.match(re);
301
301
  if (!match) return source;
302
+
302
303
  const body = match[2];
303
- const indent = (body.match(/\n(\s+)"/) || body.match(/\n(\s+)/) || ['', ' '])[1];
304
- const newEntry = `\n${indent}"${id}",`;
305
- return source.replace(re, `$1$2${newEntry}$3`);
304
+ const indent = (body.match(/\n(\s+)"/) || ['', ' '])[1];
305
+
306
+ // Extract existing entries
307
+ const entries = [];
308
+ const entryRe = /"([^"]+)"/g;
309
+ let m;
310
+ while ((m = entryRe.exec(body)) !== null) entries.push(m[1]);
311
+
312
+ // Insert in alphabetical position
313
+ entries.push(id);
314
+ entries.sort((a, b) => a.localeCompare(b));
315
+
316
+ const newBody = '\n' + entries.map(e => `${indent}"${e}",`).join('\n') + '\n ';
317
+ return source.replace(re, `$1${newBody}$3`);
306
318
  }
307
319
 
308
320
  // ─── Export ──────────────────────────────────────────────────────────────────
package/demo/script.js CHANGED
@@ -321,7 +321,7 @@ document.addEventListener('DOMContentLoaded', () => {
321
321
  "dynatrace","edge","essential-app-protection","explorer","f5","firefox",
322
322
  "flux-cd","fortify","fortify-on-demand","free-marker","git-ops","github",
323
323
  "github-actions","gitlab","google","google-cloud","google-cloud-functions",
324
- "hashi-corp-vault","helm","ibm","ingress","inteligence","jboss","jenkins",
324
+ "grafana","hashi-corp-vault","helm","ibm","ingress","inteligence","jboss","jenkins",
325
325
  "jfrog","jira","key","kubernetes","linux","mailhog","microsoft-iis",
326
326
  "microsoft-teams","mysql","netscaler","new-relic","octopus-deploy",
327
327
  "open-policy-agent","openid","openshift","opsgenie","oracle","parasoft",
@@ -330,7 +330,6 @@ document.addEventListener('DOMContentLoaded', () => {
330
330
  "sonarcloud","sonarqube","sonatype","svn","team-forge","teamcity","terraform",
331
331
  "testlink","topaz","travis-ci","urbancode-deploy","vmware","webhook",
332
332
  "windows","xray","zendesk",
333
- "grafana",
334
333
  ];
335
334
 
336
335
  // --- FAVOURITES LOGIC ---
@@ -380,11 +379,11 @@ document.addEventListener('DOMContentLoaded', () => {
380
379
  const themeClass = root.classList.contains('dark') ? 'dark' : 'light';
381
380
  const isInteg = type === 'integration' || (integrationsList.includes(item) && !illustrations.includes(item));
382
381
 
383
- // Toggle field visibility
382
+ // Toggle field visibility — use style.display (more reliable than Tailwind hidden class)
384
383
  const illusFields = document.getElementById('modal-illus-fields');
385
384
  const integFields = document.getElementById('modal-integ-fields');
386
- if (illusFields) illusFields.classList.toggle('hidden', isInteg);
387
- if (integFields) integFields.classList.toggle('hidden', !isInteg);
385
+ if (illusFields) illusFields.style.display = isInteg ? 'none' : 'block';
386
+ if (integFields) integFields.style.display = !isInteg ? 'none' : 'block';
388
387
 
389
388
  if (isInteg) {
390
389
  // Integration modal — single usage field
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digital-ai/dot-illustrations",
3
- "version": "2.0.40",
3
+ "version": "2.0.41",
4
4
  "description": "A central place for the design team to keep illustrations and for dev teams to find them.",
5
5
  "main": "./index.css",
6
6
  "scripts": {