tinymoon 0.3.0__tar.gz → 0.3.1__tar.gz

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 (102) hide show
  1. tinymoon-0.3.1/.rlsbl/changes/0.3.1.jsonl +1 -0
  2. tinymoon-0.3.1/.rlsbl/changes/0.3.1.md +7 -0
  3. tinymoon-0.3.1/.rlsbl/releases/v0.3.1.toml +12 -0
  4. {tinymoon-0.3.0 → tinymoon-0.3.1}/.strictcli/schema.json +1 -1
  5. {tinymoon-0.3.0 → tinymoon-0.3.1}/CHANGELOG.md +8 -0
  6. {tinymoon-0.3.0 → tinymoon-0.3.1}/PKG-INFO +2 -2
  7. {tinymoon-0.3.0 → tinymoon-0.3.1}/README.md +1 -1
  8. tinymoon-0.3.1/VERSION +1 -0
  9. {tinymoon-0.3.0 → tinymoon-0.3.1}/assets/js/toast.js +5 -3
  10. {tinymoon-0.3.0 → tinymoon-0.3.1}/gallery/gallery.js +2 -2
  11. {tinymoon-0.3.0 → tinymoon-0.3.1}/package.json +1 -1
  12. {tinymoon-0.3.0 → tinymoon-0.3.1}/pyproject.toml +1 -1
  13. {tinymoon-0.3.0 → tinymoon-0.3.1}/tinymoon/__init__.py +1 -1
  14. {tinymoon-0.3.0 → tinymoon-0.3.1}/uv.lock +1 -1
  15. tinymoon-0.3.0/VERSION +0 -1
  16. {tinymoon-0.3.0 → tinymoon-0.3.1}/.github/workflows/ci-go.yml +0 -0
  17. {tinymoon-0.3.0 → tinymoon-0.3.1}/.github/workflows/ci-pypi.yml +0 -0
  18. {tinymoon-0.3.0 → tinymoon-0.3.1}/.github/workflows/publish.yml +0 -0
  19. {tinymoon-0.3.0 → tinymoon-0.3.1}/.gitignore +0 -0
  20. {tinymoon-0.3.0 → tinymoon-0.3.1}/.npmignore +0 -0
  21. {tinymoon-0.3.0 → tinymoon-0.3.1}/.rlsbl/bases/.github/workflows/ci-go.yml +0 -0
  22. {tinymoon-0.3.0 → tinymoon-0.3.1}/.rlsbl/bases/.github/workflows/ci-pypi.yml +0 -0
  23. {tinymoon-0.3.0 → tinymoon-0.3.1}/.rlsbl/bases/.github/workflows/publish.yml +0 -0
  24. {tinymoon-0.3.0 → tinymoon-0.3.1}/.rlsbl/bases/.gitignore +0 -0
  25. {tinymoon-0.3.0 → tinymoon-0.3.1}/.rlsbl/bases/.npmignore +0 -0
  26. {tinymoon-0.3.0 → tinymoon-0.3.1}/.rlsbl/bases/.rlsbl/changes/unreleased.jsonl +0 -0
  27. {tinymoon-0.3.0 → tinymoon-0.3.1}/.rlsbl/bases/.rlsbl/lint/go.toml +0 -0
  28. {tinymoon-0.3.0 → tinymoon-0.3.1}/.rlsbl/bases/.rlsbl/lint/npm.toml +0 -0
  29. {tinymoon-0.3.0 → tinymoon-0.3.1}/.rlsbl/bases/.rlsbl/lint/python.toml +0 -0
  30. {tinymoon-0.3.0 → tinymoon-0.3.1}/.rlsbl/bases/CHANGELOG.md +0 -0
  31. {tinymoon-0.3.0 → tinymoon-0.3.1}/.rlsbl/bases/VERSION +0 -0
  32. {tinymoon-0.3.0 → tinymoon-0.3.1}/.rlsbl/changes/0.0.1.jsonl +0 -0
  33. {tinymoon-0.3.0 → tinymoon-0.3.1}/.rlsbl/changes/0.0.1.md +0 -0
  34. {tinymoon-0.3.0 → tinymoon-0.3.1}/.rlsbl/changes/0.1.0.jsonl +0 -0
  35. {tinymoon-0.3.0 → tinymoon-0.3.1}/.rlsbl/changes/0.1.0.md +0 -0
  36. {tinymoon-0.3.0 → tinymoon-0.3.1}/.rlsbl/changes/0.2.0.jsonl +0 -0
  37. {tinymoon-0.3.0 → tinymoon-0.3.1}/.rlsbl/changes/0.2.0.md +0 -0
  38. {tinymoon-0.3.0 → tinymoon-0.3.1}/.rlsbl/changes/0.3.0.jsonl +0 -0
  39. {tinymoon-0.3.0 → tinymoon-0.3.1}/.rlsbl/changes/0.3.0.md +0 -0
  40. {tinymoon-0.3.0 → tinymoon-0.3.1}/.rlsbl/changes/unreleased.jsonl +0 -0
  41. {tinymoon-0.3.0 → tinymoon-0.3.1}/.rlsbl/config.json +0 -0
  42. {tinymoon-0.3.0 → tinymoon-0.3.1}/.rlsbl/lint/go.toml +0 -0
  43. {tinymoon-0.3.0 → tinymoon-0.3.1}/.rlsbl/lint/npm.toml +0 -0
  44. {tinymoon-0.3.0 → tinymoon-0.3.1}/.rlsbl/lint/python.toml +0 -0
  45. {tinymoon-0.3.0 → tinymoon-0.3.1}/.rlsbl/managed-files.json +0 -0
  46. {tinymoon-0.3.0 → tinymoon-0.3.1}/.rlsbl/releases/v0.0.1.toml +0 -0
  47. {tinymoon-0.3.0 → tinymoon-0.3.1}/.rlsbl/releases/v0.2.0.toml +0 -0
  48. {tinymoon-0.3.0 → tinymoon-0.3.1}/.rlsbl/releases/v0.3.0.toml +0 -0
  49. {tinymoon-0.3.0 → tinymoon-0.3.1}/.rlsbl/version +0 -0
  50. {tinymoon-0.3.0 → tinymoon-0.3.1}/CLAUDE.md +0 -0
  51. {tinymoon-0.3.0 → tinymoon-0.3.1}/LICENSE +0 -0
  52. {tinymoon-0.3.0 → tinymoon-0.3.1}/assets/css/base.css +0 -0
  53. {tinymoon-0.3.0 → tinymoon-0.3.1}/assets/css/primitives.css +0 -0
  54. {tinymoon-0.3.0 → tinymoon-0.3.1}/assets/css/shell.css +0 -0
  55. {tinymoon-0.3.0 → tinymoon-0.3.1}/assets/css/tokens.css +0 -0
  56. {tinymoon-0.3.0 → tinymoon-0.3.1}/assets/fonts/ibm-plex-mono-latin-400.woff2 +0 -0
  57. {tinymoon-0.3.0 → tinymoon-0.3.1}/assets/fonts/ibm-plex-mono-latin-500.woff2 +0 -0
  58. {tinymoon-0.3.0 → tinymoon-0.3.1}/assets/fonts/ibm-plex-sans-latin.woff2 +0 -0
  59. {tinymoon-0.3.0 → tinymoon-0.3.1}/assets/fonts/space-grotesk-latin.woff2 +0 -0
  60. {tinymoon-0.3.0 → tinymoon-0.3.1}/assets/js/controls.js +0 -0
  61. {tinymoon-0.3.0 → tinymoon-0.3.1}/assets/js/ctxmenu.js +0 -0
  62. {tinymoon-0.3.0 → tinymoon-0.3.1}/assets/js/dom.js +0 -0
  63. {tinymoon-0.3.0 → tinymoon-0.3.1}/assets/js/format.js +0 -0
  64. {tinymoon-0.3.0 → tinymoon-0.3.1}/assets/js/icons.js +0 -0
  65. {tinymoon-0.3.0 → tinymoon-0.3.1}/assets/js/index.js +0 -0
  66. {tinymoon-0.3.0 → tinymoon-0.3.1}/assets/js/markdown.js +0 -0
  67. {tinymoon-0.3.0 → tinymoon-0.3.1}/assets/js/modal.js +0 -0
  68. {tinymoon-0.3.0 → tinymoon-0.3.1}/assets/js/net.js +0 -0
  69. {tinymoon-0.3.0 → tinymoon-0.3.1}/assets/js/popover.js +0 -0
  70. {tinymoon-0.3.0 → tinymoon-0.3.1}/assets/js/select.js +0 -0
  71. {tinymoon-0.3.0 → tinymoon-0.3.1}/assets/js/settings.js +0 -0
  72. {tinymoon-0.3.0 → tinymoon-0.3.1}/assets/js/shell.js +0 -0
  73. {tinymoon-0.3.0 → tinymoon-0.3.1}/assets/js/tooltip.js +0 -0
  74. {tinymoon-0.3.0 → tinymoon-0.3.1}/assets/js/wiki.js +0 -0
  75. {tinymoon-0.3.0 → tinymoon-0.3.1}/gallery/gallery.css +0 -0
  76. {tinymoon-0.3.0 → tinymoon-0.3.1}/gallery/index.html +0 -0
  77. {tinymoon-0.3.0 → tinymoon-0.3.1}/go.mod +0 -0
  78. {tinymoon-0.3.0 → tinymoon-0.3.1}/index.js +0 -0
  79. {tinymoon-0.3.0 → tinymoon-0.3.1}/tests/fixtures/clean/clean.css +0 -0
  80. {tinymoon-0.3.0 → tinymoon-0.3.1}/tests/fixtures/clean/clean.html +0 -0
  81. {tinymoon-0.3.0 → tinymoon-0.3.1}/tests/fixtures/clean/clean.js +0 -0
  82. {tinymoon-0.3.0 → tinymoon-0.3.1}/tests/fixtures/clean/tinymoon-allowlist.txt +0 -0
  83. {tinymoon-0.3.0 → tinymoon-0.3.1}/tests/fixtures/violations/border-radius.css +0 -0
  84. {tinymoon-0.3.0 → tinymoon-0.3.1}/tests/fixtures/violations/border-radius.html +0 -0
  85. {tinymoon-0.3.0 → tinymoon-0.3.1}/tests/fixtures/violations/border-radius.js +0 -0
  86. {tinymoon-0.3.0 → tinymoon-0.3.1}/tests/fixtures/violations/external-url.css +0 -0
  87. {tinymoon-0.3.0 → tinymoon-0.3.1}/tests/fixtures/violations/external-url.html +0 -0
  88. {tinymoon-0.3.0 → tinymoon-0.3.1}/tests/fixtures/violations/external-url.js +0 -0
  89. {tinymoon-0.3.0 → tinymoon-0.3.1}/tests/fixtures/violations/native-control.html +0 -0
  90. {tinymoon-0.3.0 → tinymoon-0.3.1}/tests/fixtures/violations/native-control.js +0 -0
  91. {tinymoon-0.3.0 → tinymoon-0.3.1}/tests/fixtures/violations/raw-color.css +0 -0
  92. {tinymoon-0.3.0 → tinymoon-0.3.1}/tests/fixtures/violations/raw-color.html +0 -0
  93. {tinymoon-0.3.0 → tinymoon-0.3.1}/tests/fixtures/violations/raw-color.js +0 -0
  94. {tinymoon-0.3.0 → tinymoon-0.3.1}/tests/fixtures/violations/title-attr.html +0 -0
  95. {tinymoon-0.3.0 → tinymoon-0.3.1}/tests/fixtures/violations/title-attr.js +0 -0
  96. {tinymoon-0.3.0 → tinymoon-0.3.1}/tests/test_assets.py +0 -0
  97. {tinymoon-0.3.0 → tinymoon-0.3.1}/tests/test_budgets.py +0 -0
  98. {tinymoon-0.3.0 → tinymoon-0.3.1}/tests/test_checker.py +0 -0
  99. {tinymoon-0.3.0 → tinymoon-0.3.1}/tests/test_version.py +0 -0
  100. {tinymoon-0.3.0 → tinymoon-0.3.1}/tinymoon/checker.py +0 -0
  101. {tinymoon-0.3.0 → tinymoon-0.3.1}/tinymoon/cli.py +0 -0
  102. {tinymoon-0.3.0 → tinymoon-0.3.1}/tinymoon.go +0 -0
@@ -0,0 +1 @@
1
+ {"id":"18c1e781f297e6d98212e9a92abb41bfb661bb0c8d34a9bc","commits":["f739dad4a49c1a871ff4c15ee0e9ea82bdd4e040"],"user_facing":true,"description":"The toast error hook now receives the toast's opts object, so per-call metadata reaches logging hooks.","type":"fix"}
@@ -0,0 +1,7 @@
1
+ ## 0.3.1
2
+
3
+ Toast error hook receives the toast opts for per-call metadata.
4
+
5
+ ### Fixes
6
+
7
+ - The toast error hook now receives the toast's opts object, so per-call metadata reaches logging hooks.
@@ -0,0 +1,12 @@
1
+ # Version bump type: patch, minor, major, hotfix, or prerelease
2
+ bump = "patch"
3
+ # Short description of this release (required)
4
+ description = "Toast error hook receives the toast opts for per-call metadata."
5
+ # Optional context explaining why these changes were made
6
+ context = ""
7
+ # Pre-release identifier: alpha, beta, rc, or stable
8
+ # preid = ""
9
+ # Set to true to generate a blog post for this release
10
+ # blog = false
11
+ include = ["npm", "pypi", "go"]
12
+ exclude = []
@@ -48,7 +48,7 @@
48
48
  },
49
49
  "project_id": "tinymoon",
50
50
  "name": "tinymoon",
51
- "version": "0.3.0",
51
+ "version": "0.3.1",
52
52
  "help": "Tooling for the tinymoon web framework. Ships the conformance checker that enforces the framework's non-negotiables (no external URLs, no native browser controls, no title= attributes, no rounded corners, no off-token colors) as hard errors.",
53
53
  "commands": {
54
54
  "check": {
@@ -2,6 +2,14 @@
2
2
 
3
3
  # Changelog
4
4
 
5
+ ## 0.3.1
6
+
7
+ Toast error hook receives the toast opts for per-call metadata.
8
+
9
+ ### Fixes
10
+
11
+ - The toast error hook now receives the toast's opts object, so per-call metadata reaches logging hooks.
12
+
5
13
  ## 0.3.0
6
14
 
7
15
  Shell routing hooks (onRoute, refreshCurrent) and a toast error hook for log mirroring.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tinymoon
3
- Version: 0.3.0
3
+ Version: 0.3.1
4
4
  Summary: Zero-dependency vanilla JS/CSS UI framework (placeholder release)
5
5
  Project-URL: Homepage, https://github.com/smm-h/tinymoon
6
6
  Project-URL: Repository, https://github.com/smm-h/tinymoon
@@ -54,7 +54,7 @@ const shell = mountShell({
54
54
 
55
55
  `mountShell` also accepts an optional `onRoute(routeKey, sub)` callback fired after every route is handled (including the initial one), and the returned shell exposes `refreshCurrent()` to re-run the current view's `refresh()` in place.
56
56
 
57
- Consumer apps can extend the built-in icon set with `registerIcons({name: svgString})` — colliding with an existing icon name is a hard error, never a silent overwrite. Error toasts can be mirrored into a log with `setToastErrorHook(fn)` — the hook receives each error toast's message, and registering a second hook is a hard error.
57
+ Consumer apps can extend the built-in icon set with `registerIcons({name: svgString})` — colliding with an existing icon name is a hard error, never a silent overwrite. Error toasts can be mirrored into a log with `setToastErrorHook(fn)` — the hook receives each error toast's message and its opts object (`{}` when the caller passed none), and registering a second hook is a hard error.
58
58
 
59
59
  Views are plain objects following the contract `{root, built, build(), refresh(), setSub?}` — the [gallery](gallery/) is a complete working app and documents every token, primitive, and extension point (serve the repo root with a static server and open `/gallery/`).
60
60
 
@@ -33,7 +33,7 @@ const shell = mountShell({
33
33
 
34
34
  `mountShell` also accepts an optional `onRoute(routeKey, sub)` callback fired after every route is handled (including the initial one), and the returned shell exposes `refreshCurrent()` to re-run the current view's `refresh()` in place.
35
35
 
36
- Consumer apps can extend the built-in icon set with `registerIcons({name: svgString})` — colliding with an existing icon name is a hard error, never a silent overwrite. Error toasts can be mirrored into a log with `setToastErrorHook(fn)` — the hook receives each error toast's message, and registering a second hook is a hard error.
36
+ Consumer apps can extend the built-in icon set with `registerIcons({name: svgString})` — colliding with an existing icon name is a hard error, never a silent overwrite. Error toasts can be mirrored into a log with `setToastErrorHook(fn)` — the hook receives each error toast's message and its opts object (`{}` when the caller passed none), and registering a second hook is a hard error.
37
37
 
38
38
  Views are plain objects following the contract `{root, built, build(), refresh(), setSub?}` — the [gallery](gallery/) is a complete working app and documents every token, primitive, and extension point (serve the repo root with a static server and open `/gallery/`).
39
39
 
tinymoon-0.3.1/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.3.1
@@ -16,8 +16,10 @@ function toastRoot() {
16
16
 
17
17
  let errorHook = null;
18
18
 
19
- // setToastErrorHook(fn): register a module-level hook invoked as fn(message)
20
- // whenever an error toast is shown — e.g. to mirror errors into a log.
19
+ // setToastErrorHook(fn): register a module-level hook invoked as
20
+ // fn(message, opts) whenever an error toast is shown — e.g. to mirror errors
21
+ // into a log. opts is the same opts object toast() received ({} when the
22
+ // caller passed none, never undefined), so per-call metadata reaches the hook.
21
23
  // Registering a second hook is a hard error, never a silent overwrite.
22
24
  export function setToastErrorHook(fn) {
23
25
  if (errorHook) throw new Error("setToastErrorHook: a hook is already registered");
@@ -43,5 +45,5 @@ export function toast(msg, kind, opts) {
43
45
  }, life);
44
46
  // After the toast is on screen (and its removal is scheduled, so a
45
47
  // throwing hook can't strand it). Hook exceptions propagate.
46
- if (kind === "err" && errorHook) errorHook(msg);
48
+ if (kind === "err" && errorHook) errorHook(msg, opts || {});
47
49
  }
@@ -450,7 +450,7 @@ registerCtxFooter(() => [
450
450
 
451
451
  // toast error hook (extension point): mirror error toasts into the console
452
452
  // log — visible when pressing "Error toast" on the Widgets page.
453
- setToastErrorHook((msg) => console.error("[gallery] error toast: " + msg));
453
+ setToastErrorHook((msg, opts) => console.error("[gallery] error toast: " + msg, opts));
454
454
 
455
455
  // verbose demo setting: narrate setting changes
456
456
  window.addEventListener("tm:setting", (e) => {
@@ -497,7 +497,7 @@ Consumer apps extend tinymoon through explicit seams, never by patching internal
497
497
  - **Context menus** — \`registerCtx(key, provider)\` serves right-clicks on \`[data-ctx]\` regions; \`registerCtxFooter(fn)\` appends app-global items to every menu.
498
498
  - **Settings schema** — \`createSettings({storageKey, defaults})\`: the defaults object is the schema; unknown keys are hard errors.
499
499
  - **Icons** — \`registerIcons({name: svgString})\` merges consumer icons into the built-in set; a name collision with an existing icon is a hard error, never a silent overwrite.
500
- - **Toast error hook** — \`setToastErrorHook(fn)\` mirrors every error toast's message into your hook (e.g. a log); registering a second hook is a hard error, never a silent overwrite. This gallery mirrors error toasts to the browser console — press the **Error toast** button on the Widgets page with the console open.
500
+ - **Toast error hook** — \`setToastErrorHook(fn)\` mirrors every error toast's message into your hook (e.g. a log), invoked as \`fn(message, opts)\` where opts is the toast's own opts object (\`{}\` when the caller passed none) so per-call metadata reaches the hook; registering a second hook is a hard error, never a silent overwrite. This gallery mirrors error toasts (message and opts) to the browser console — press the **Error toast** button on the Widgets page with the console open.
501
501
 
502
502
  ### Custom components {#custom-components}
503
503
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tinymoon",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Zero-dependency vanilla JS/CSS UI framework",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "tinymoon"
7
- version = "0.3.0"
7
+ version = "0.3.1"
8
8
  description = "Zero-dependency vanilla JS/CSS UI framework (placeholder release)"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.11"
@@ -7,7 +7,7 @@ fonts) inside the wheel and exposes their location via assets_path().
7
7
  from importlib import resources
8
8
  from pathlib import Path
9
9
 
10
- __version__ = "0.3.0"
10
+ __version__ = "0.3.1"
11
11
 
12
12
 
13
13
  def assets_path() -> Path:
@@ -74,7 +74,7 @@ wheels = [
74
74
 
75
75
  [[package]]
76
76
  name = "tinymoon"
77
- version = "0.3.0"
77
+ version = "0.3.1"
78
78
  source = { editable = "." }
79
79
  dependencies = [
80
80
  { name = "strictcli" },
tinymoon-0.3.0/VERSION DELETED
@@ -1 +0,0 @@
1
- 0.3.0
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes