extwee 2.3.2 → 2.3.4

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 (55) hide show
  1. package/build/extwee.core.min.js +1 -0
  2. package/build/extwee.twine1html.min.js +1 -0
  3. package/build/extwee.twine2archive.min.js +1 -0
  4. package/build/extwee.tws.min.js +1 -0
  5. package/build/test-modular.html +126 -0
  6. package/docs/build/extwee.core.min.js +1 -0
  7. package/docs/build/extwee.twine1html.min.js +1 -0
  8. package/docs/build/extwee.twine2archive.min.js +1 -0
  9. package/docs/build/extwee.tws.min.js +1 -0
  10. package/docs/demos/compiler/extwee.core.min.js +1 -0
  11. package/docs/demos/compiler/index.css +105 -0
  12. package/docs/demos/compiler/index.html +359 -0
  13. package/eslint.config.js +4 -1
  14. package/package.json +25 -22
  15. package/src/IFID/generate.js +2 -2
  16. package/src/Story.js +1 -1
  17. package/src/Twine1HTML/parse-web.js +255 -0
  18. package/src/Twine2ArchiveHTML/parse-web.js +134 -0
  19. package/src/Twine2HTML/parse-web.js +434 -0
  20. package/src/Web/web-core.js +51 -0
  21. package/src/Web/web-twine1html.js +35 -0
  22. package/src/Web/web-twine2archive.js +35 -0
  23. package/src/Web/web-tws.js +30 -0
  24. package/test/Config/Config.test.js +1 -1
  25. package/test/Config/isDirectory.test.js +15 -9
  26. package/test/Config/isFile.test.js +14 -11
  27. package/test/Config/loadStoryFormat.test.js +49 -33
  28. package/test/Config/readDirectories.test.js +25 -15
  29. package/test/Objects/Story.test.js +1 -0
  30. package/test/StoryFormat/StoryFormat.Parse.test.js +1 -0
  31. package/test/Twine1HTML/Twine1HTML.Parse.Web.test.js +484 -0
  32. package/test/Twine2ArchiveHTML/Twine2ArchiveHTML.Parse.Web.test.js +293 -0
  33. package/test/Twine2ArchiveHTML/Twine2ArchiveHTML.Parse.test.js +1 -0
  34. package/test/Twine2HTML/Twine2HTML.Parse.Web.test.js +329 -0
  35. package/test/Twine2HTML/Twine2HTML.Parse.test.js +1 -0
  36. package/test/Web/web-core-coverage.test.js +175 -0
  37. package/test/Web/web-core-global.test.js +93 -0
  38. package/test/Web/web-core.test.js +156 -0
  39. package/test/Web/window.Extwee.test.js +25 -13
  40. package/types/src/Story.d.ts +1 -1
  41. package/types/src/Twine1HTML/parse-web.d.ts +10 -0
  42. package/types/src/Twine2ArchiveHTML/parse-web.d.ts +37 -0
  43. package/types/src/Twine2HTML/parse-web.d.ts +21 -0
  44. package/types/src/Web/html-entities-lite.d.ts +12 -0
  45. package/types/src/Web/semver-lite.d.ts +10 -0
  46. package/types/src/Web/uuid-lite.d.ts +6 -0
  47. package/types/src/Web/web-core.d.ts +23 -0
  48. package/types/src/Web/web-index.d.ts +1 -0
  49. package/types/src/Web/web-twine1html.d.ts +10 -0
  50. package/types/src/Web/web-twine2archive.d.ts +10 -0
  51. package/types/src/Web/web-tws.d.ts +7 -0
  52. package/webpack.config.js +23 -2
  53. package/build/extwee.web.min.js +0 -2
  54. package/build/extwee.web.min.js.LICENSE.txt +0 -1
  55. package/web-index.js +0 -31
package/webpack.config.js CHANGED
@@ -3,10 +3,31 @@ import path from 'node:path';
3
3
  export default {
4
4
  mode: 'production',
5
5
  entry: {
6
- 'extwee.web.min': './web-index.js'
6
+ // Core bundle with most common functionality
7
+ 'extwee.core': './src/Web/web-core.js',
8
+ // Individual parser modules
9
+ 'extwee.twine1html': './src/Web/web-twine1html.js',
10
+ 'extwee.twine2archive': './src/Web/web-twine2archive.js',
11
+ 'extwee.tws': './src/Web/web-tws.js'
7
12
  },
8
13
  output: {
9
14
  path: path.resolve('./', 'build'),
10
- filename: '[name].js',
15
+ filename: '[name].min.js',
16
+ library: {
17
+ type: 'umd',
18
+ name: 'Extwee', // Use a single library name for all modules
19
+ export: 'default' // Export the default export directly
20
+ },
21
+ globalObject: 'this'
11
22
  },
23
+ optimization: {
24
+ usedExports: true,
25
+ sideEffects: false,
26
+ splitChunks: false // Don't split chunks for individual modules
27
+ },
28
+ performance: {
29
+ maxAssetSize: 250000, // 244 KiB
30
+ maxEntrypointSize: 250000,
31
+ hints: 'warning'
32
+ }
12
33
  };