@annotorious/svelte 3.0.0-rc.3 → 3.0.0-rc.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.
Files changed (44) hide show
  1. package/dist/annotorious-svelte.es.js +17 -14
  2. package/dist/annotorious-svelte.es.js.map +1 -1
  3. package/dist/annotorious-svelte.es10.js +2 -2
  4. package/dist/annotorious-svelte.es10.js.map +1 -1
  5. package/dist/annotorious-svelte.es11.js +2 -20662
  6. package/dist/annotorious-svelte.es11.js.map +1 -1
  7. package/dist/annotorious-svelte.es12.js +81 -98
  8. package/dist/annotorious-svelte.es12.js.map +1 -1
  9. package/dist/annotorious-svelte.es14.js +53 -15
  10. package/dist/annotorious-svelte.es14.js.map +1 -1
  11. package/dist/annotorious-svelte.es2.js +30 -25
  12. package/dist/annotorious-svelte.es2.js.map +1 -1
  13. package/dist/annotorious-svelte.es3.js +114 -2
  14. package/dist/annotorious-svelte.es3.js.map +1 -1
  15. package/dist/annotorious-svelte.es4.js +127 -9
  16. package/dist/annotorious-svelte.es4.js.map +1 -1
  17. package/dist/annotorious-svelte.es5.js +66 -1261
  18. package/dist/annotorious-svelte.es5.js.map +1 -1
  19. package/dist/annotorious-svelte.es6.js +37 -106
  20. package/dist/annotorious-svelte.es6.js.map +1 -1
  21. package/dist/annotorious-svelte.es7.js +24 -118
  22. package/dist/annotorious-svelte.es7.js.map +1 -1
  23. package/dist/annotorious-svelte.es8.js +17 -307
  24. package/dist/annotorious-svelte.es8.js.map +1 -1
  25. package/dist/annotorious-svelte.es9.js +110 -7
  26. package/dist/annotorious-svelte.es9.js.map +1 -1
  27. package/dist/index.d.ts +9 -10
  28. package/dist/index.d.ts.map +1 -1
  29. package/package.json +24 -13
  30. package/src/index.ts +42 -22
  31. package/src/osd/OpenSeadragonAnnotator.svelte +2 -2
  32. package/tsconfig.json +2 -2
  33. package/vite.config.js +8 -5
  34. package/dist/annotorious-svelte.es13.js +0 -5
  35. package/dist/annotorious-svelte.es13.js.map +0 -1
  36. package/dist/annotorious-svelte.es15.js +0 -7
  37. package/dist/annotorious-svelte.es15.js.map +0 -1
  38. package/dist/annotorious-svelte.es16.js +0 -11
  39. package/dist/annotorious-svelte.es16.js.map +0 -1
  40. package/dist/annotorious-svelte.es17.js +0 -10
  41. package/dist/annotorious-svelte.es17.js.map +0 -1
  42. package/dist/annotorious-svelte.es18.js +0 -5
  43. package/dist/annotorious-svelte.es18.js.map +0 -1
  44. /package/dist/{style.css → annotorious-svelte.css} +0 -0
@@ -1,7 +1,7 @@
1
1
  <script lang="ts">
2
2
  import { setContext } from 'svelte';
3
- import { SvelteAnnotator, SvelteAnnotatorState, toSvelteStore } from '@annotorious/core';
4
- import { createOSDAnnotator, ImageAnnotation } from '@annotorious/openseadragon';
3
+ import { type SvelteAnnotator, type SvelteAnnotatorState, toSvelteStore } from '@annotorious/core';
4
+ import { createOSDAnnotator, type ImageAnnotation } from '@annotorious/openseadragon';
5
5
  import type OpenSeadragon from 'openseadragon';
6
6
 
7
7
  /** props **/
package/tsconfig.json CHANGED
@@ -8,7 +8,6 @@
8
8
  "esModuleInterop": true,
9
9
  "forceConsistentCasingInFileNames": true,
10
10
  "ignoreDeprecations": "5.0",
11
- "importsNotUsedAsValues": "error",
12
11
  "incremental": false,
13
12
  "isolatedModules": true,
14
13
  "module": "ESNext",
@@ -18,7 +17,8 @@
18
17
  "skipLibCheck": false,
19
18
  "sourceMap": true,
20
19
  "target": "ESNext",
21
- "types": ["svelte"]
20
+ "types": ["svelte"],
21
+ "verbatimModuleSyntax": true
22
22
  },
23
23
  "include": ["./src/**/*", "./test/**/*"],
24
24
  "exclude": ["node_modules", "dist"]
package/vite.config.js CHANGED
@@ -24,14 +24,17 @@ export default defineConfig({
24
24
  fileName: (format) => `annotorious-svelte.${format}.js`
25
25
  },
26
26
  rollupOptions: {
27
- external: [...Object.keys(packageJson.peerDependencies)],
27
+ external: [
28
+ ...Object.keys(packageJson.peerDependencies),
29
+ '@annotorious/core',
30
+ '@annotorious/annotorious',
31
+ '@annotorious/openseadragon'
32
+ ],
28
33
  output: {
29
34
  preserveModules: true,
30
- globals: {
31
- openseadragon: 'OpenSeadragon'
32
- }
35
+ assetFileNames: 'annotorious-svelte.[ext]'
33
36
  }
34
37
  },
35
38
  sourcemap: true
36
39
  }
37
- });
40
+ });
@@ -1,5 +0,0 @@
1
- const e = "";
2
- export {
3
- e as default
4
- };
5
- //# sourceMappingURL=annotorious-svelte.es13.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"annotorious-svelte.es13.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1,7 +0,0 @@
1
- const o = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), t = {
2
- randomUUID: o
3
- };
4
- export {
5
- t as default
6
- };
7
- //# sourceMappingURL=annotorious-svelte.es15.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"annotorious-svelte.es15.js","sources":["../../../node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/esm-browser/native.js"],"sourcesContent":["const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);\nexport default {\n randomUUID\n};"],"names":["randomUUID","native"],"mappings":"AAAA,MAAMA,IAAa,OAAO,SAAW,OAAe,OAAO,cAAc,OAAO,WAAW,KAAK,MAAM,GACvFC,IAAA;AAAA,EACb,YAAAD;AACF;","x_google_ignoreList":[0]}
@@ -1,11 +0,0 @@
1
- let t;
2
- const e = new Uint8Array(16);
3
- function o() {
4
- if (!t && (t = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !t))
5
- throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
6
- return t(e);
7
- }
8
- export {
9
- o as default
10
- };
11
- //# sourceMappingURL=annotorious-svelte.es16.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"annotorious-svelte.es16.js","sources":["../../../node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/esm-browser/rng.js"],"sourcesContent":["// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nlet getRandomValues;\nconst rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}"],"names":["getRandomValues","rnds8","rng"],"mappings":"AAGA,IAAIA;AACJ,MAAMC,IAAQ,IAAI,WAAW,EAAE;AAChB,SAASC,IAAM;AAE5B,MAAI,CAACF,MAEHA,IAAkB,OAAO,SAAW,OAAe,OAAO,mBAAmB,OAAO,gBAAgB,KAAK,MAAM,GAE3G,CAACA;AACH,UAAM,IAAI,MAAM,0GAA0G;AAI9H,SAAOA,EAAgBC,CAAK;AAC9B;","x_google_ignoreList":[0]}
@@ -1,10 +0,0 @@
1
- const i = [];
2
- for (let n = 0; n < 256; ++n)
3
- i.push((n + 256).toString(16).slice(1));
4
- function c(n, u = 0) {
5
- return i[n[u + 0]] + i[n[u + 1]] + i[n[u + 2]] + i[n[u + 3]] + "-" + i[n[u + 4]] + i[n[u + 5]] + "-" + i[n[u + 6]] + i[n[u + 7]] + "-" + i[n[u + 8]] + i[n[u + 9]] + "-" + i[n[u + 10]] + i[n[u + 11]] + i[n[u + 12]] + i[n[u + 13]] + i[n[u + 14]] + i[n[u + 15]];
6
- }
7
- export {
8
- c as unsafeStringify
9
- };
10
- //# sourceMappingURL=annotorious-svelte.es17.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"annotorious-svelte.es17.js","sources":["../../../node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/esm-browser/stringify.js"],"sourcesContent":["import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nconst byteToHex = [];\n\nfor (let i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).slice(1));\n}\n\nexport function unsafeStringify(arr, offset = 0) {\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];\n}\n\nfunction stringify(arr, offset = 0) {\n const uuid = unsafeStringify(arr, offset); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;"],"names":["byteToHex","i","unsafeStringify","arr","offset"],"mappings":"AAMA,MAAMA,IAAY,CAAA;AAElB,SAASC,IAAI,GAAGA,IAAI,KAAK,EAAEA;AACzB,EAAAD,EAAU,MAAMC,IAAI,KAAO,SAAS,EAAE,EAAE,MAAM,CAAC,CAAC;AAG3C,SAASC,EAAgBC,GAAKC,IAAS,GAAG;AAG/C,SAAOJ,EAAUG,EAAIC,IAAS,CAAC,CAAC,IAAIJ,EAAUG,EAAIC,IAAS,CAAC,CAAC,IAAIJ,EAAUG,EAAIC,IAAS,CAAC,CAAC,IAAIJ,EAAUG,EAAIC,IAAS,CAAC,CAAC,IAAI,MAAMJ,EAAUG,EAAIC,IAAS,CAAC,CAAC,IAAIJ,EAAUG,EAAIC,IAAS,CAAC,CAAC,IAAI,MAAMJ,EAAUG,EAAIC,IAAS,CAAC,CAAC,IAAIJ,EAAUG,EAAIC,IAAS,CAAC,CAAC,IAAI,MAAMJ,EAAUG,EAAIC,IAAS,CAAC,CAAC,IAAIJ,EAAUG,EAAIC,IAAS,CAAC,CAAC,IAAI,MAAMJ,EAAUG,EAAIC,IAAS,EAAE,CAAC,IAAIJ,EAAUG,EAAIC,IAAS,EAAE,CAAC,IAAIJ,EAAUG,EAAIC,IAAS,EAAE,CAAC,IAAIJ,EAAUG,EAAIC,IAAS,EAAE,CAAC,IAAIJ,EAAUG,EAAIC,IAAS,EAAE,CAAC,IAAIJ,EAAUG,EAAIC,IAAS,EAAE,CAAC;AACnf;","x_google_ignoreList":[0]}
@@ -1,5 +0,0 @@
1
- let o = (n = 21) => crypto.getRandomValues(new Uint8Array(n)).reduce((r, e) => (e &= 63, e < 36 ? r += e.toString(36) : e < 62 ? r += (e - 26).toString(36).toUpperCase() : e > 62 ? r += "-" : r += "_", r), "");
2
- export {
3
- o as nanoid
4
- };
5
- //# sourceMappingURL=annotorious-svelte.es18.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"annotorious-svelte.es18.js","sources":["../../../node_modules/.pnpm/nanoid@5.0.4/node_modules/nanoid/index.browser.js"],"sourcesContent":["export { urlAlphabet } from './url-alphabet/index.js'\nexport let random = bytes => crypto.getRandomValues(new Uint8Array(bytes))\nexport let customRandom = (alphabet, defaultSize, getRandom) => {\n let mask = (2 << (Math.log(alphabet.length - 1) / Math.LN2)) - 1\n let step = -~((1.6 * mask * defaultSize) / alphabet.length)\n return (size = defaultSize) => {\n let id = ''\n while (true) {\n let bytes = getRandom(step)\n let j = step\n while (j--) {\n id += alphabet[bytes[j] & mask] || ''\n if (id.length === size) return id\n }\n }\n }\n}\nexport let customAlphabet = (alphabet, size = 21) =>\n customRandom(alphabet, size, random)\nexport let nanoid = (size = 21) =>\n crypto.getRandomValues(new Uint8Array(size)).reduce((id, byte) => {\n byte &= 63\n if (byte < 36) {\n id += byte.toString(36)\n } else if (byte < 62) {\n id += (byte - 26).toString(36).toUpperCase()\n } else if (byte > 62) {\n id += '-'\n } else {\n id += '_'\n }\n return id\n }, '')\n"],"names":["nanoid","size","id","byte"],"mappings":"AAmBU,IAACA,IAAS,CAACC,IAAO,OAC1B,OAAO,gBAAgB,IAAI,WAAWA,CAAI,CAAC,EAAE,OAAO,CAACC,GAAIC,OACvDA,KAAQ,IACJA,IAAO,KACTD,KAAMC,EAAK,SAAS,EAAE,IACbA,IAAO,KAChBD,MAAOC,IAAO,IAAI,SAAS,EAAE,EAAE,YAAa,IACnCA,IAAO,KAChBD,KAAM,MAENA,KAAM,KAEDA,IACN,EAAE;","x_google_ignoreList":[0]}
File without changes