heinzel-clock 0.9.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 (41) hide show
  1. heinzel_clock-0.9.1/.gitignore +1 -0
  2. heinzel_clock-0.9.1/CHANGELOG.md +8 -0
  3. heinzel_clock-0.9.1/LICENSE +21 -0
  4. heinzel_clock-0.9.1/PKG-INFO +40 -0
  5. heinzel_clock-0.9.1/README.md +27 -0
  6. heinzel_clock-0.9.1/hatch_build.py +21 -0
  7. heinzel_clock-0.9.1/heinzel_clock/views/index.js +1535 -0
  8. heinzel_clock-0.9.1/heinzel_clock/views/licenses.md +73 -0
  9. heinzel_clock-0.9.1/heinzel_clock/views/style.css +3 -0
  10. heinzel_clock-0.9.1/plugin-lock.json +41 -0
  11. heinzel_clock-0.9.1/pyproject.toml +133 -0
  12. heinzel_clock-0.9.1/requirements.lock +1154 -0
  13. heinzel_clock-0.9.1/src/heinzel_clock/__init__.py +354 -0
  14. heinzel_clock-0.9.1/src/heinzel_clock/demo.tape +21 -0
  15. heinzel_clock-0.9.1/tests/browser/globe.mjs +134 -0
  16. heinzel_clock-0.9.1/tests/browser/mobile.mjs +111 -0
  17. heinzel_clock-0.9.1/tests/browser/mobile_test.py +73 -0
  18. heinzel_clock-0.9.1/tests/clock_test.py +276 -0
  19. heinzel_clock-0.9.1/tests/conftest.py +21 -0
  20. heinzel_clock-0.9.1/tests/integration/setup_host_test.py +56 -0
  21. heinzel_clock-0.9.1/web/build.py +32 -0
  22. heinzel_clock-0.9.1/web/package.json +32 -0
  23. heinzel_clock-0.9.1/web/pnpm-lock.yaml +1636 -0
  24. heinzel_clock-0.9.1/web/src/ClockPanel.test.tsx +86 -0
  25. heinzel_clock-0.9.1/web/src/ClockPanel.tsx +325 -0
  26. heinzel_clock-0.9.1/web/src/WorkStateIcon.tsx +28 -0
  27. heinzel_clock-0.9.1/web/src/globe.test.ts +40 -0
  28. heinzel_clock-0.9.1/web/src/globe.ts +83 -0
  29. heinzel_clock-0.9.1/web/src/index.ts +7 -0
  30. heinzel_clock-0.9.1/web/src/messages.ts +36 -0
  31. heinzel_clock-0.9.1/web/src/sdk.ts +10 -0
  32. heinzel_clock-0.9.1/web/src/style.css +45 -0
  33. heinzel_clock-0.9.1/web/src/test-setup.ts +9 -0
  34. heinzel_clock-0.9.1/web/src/workingHours.test.ts +70 -0
  35. heinzel_clock-0.9.1/web/src/workingHours.ts +145 -0
  36. heinzel_clock-0.9.1/web/src/worldLand.ts +4 -0
  37. heinzel_clock-0.9.1/web/src/zoneLocations.ts +422 -0
  38. heinzel_clock-0.9.1/web/src/zoneTime.test.ts +27 -0
  39. heinzel_clock-0.9.1/web/src/zoneTime.ts +26 -0
  40. heinzel_clock-0.9.1/web/tsconfig.json +19 -0
  41. heinzel_clock-0.9.1/web/vite.config.ts +13 -0
@@ -0,0 +1 @@
1
+ src/heinzel_clock/views/
@@ -0,0 +1,8 @@
1
+ # Changelog
2
+
3
+ ## 0.9.1
4
+
5
+ Move this plugin to its independent repository project for the Heinzel 0.9.1 plugin contract.
6
+ Own its dependencies, tests and artifacts; consume public contracts without concrete provider dependencies.
7
+
8
+ Earlier history is preserved in the source repository named in README.md.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Helmut Hoffer von Ankershoffen
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,40 @@
1
+ Metadata-Version: 2.5
2
+ Name: heinzel-clock
3
+ Version: 0.9.1
4
+ Summary: What time it is for everyone on the team: a Heinzelmännchen plugin.
5
+ Project-URL: Source, https://github.com/helmut-hoffer-von-ankershoffen/heinzel-plugins/tree/main/plugins/heinzel-clock
6
+ Project-URL: Changelog, https://github.com/helmut-hoffer-von-ankershoffen/heinzel-plugins/blob/main/plugins/heinzel-clock/CHANGELOG.md
7
+ Project-URL: Issues, https://github.com/helmut-hoffer-von-ankershoffen/heinzel-plugins/issues
8
+ License-Expression: MIT
9
+ License-File: LICENSE
10
+ Requires-Python: >=3.12
11
+ Requires-Dist: heinzel<0.10,>=0.9.1
12
+ Description-Content-Type: text/markdown
13
+
14
+ # heinzel-clock: the World Clock
15
+
16
+ What time it is for everyone on the team — a first-party [Heinzelmännchen](https://github.com/helmut-hoffer-von-ankershoffen/heinzel) plugin, and the smallest
17
+ plugin-owned feature: Python declarations, globe, assets and tests live in this project.
18
+
19
+ ```bash
20
+ hz system plugin add clock --confirm
21
+ hz setup clock # pick the team's time zones and the working hours in each
22
+ hz clock # the team's local times; --json for agents
23
+ hz system config set clock.zones '[{ name = "Europe/Berlin", hours = [9, 18] }, "America/New_York"]'
24
+ ```
25
+
26
+ Each zone is an IANA name, which gets working hours 9 to 18, or a table with its own `hours`. The same operation is
27
+ the MCP tool `clock` (`hz system serve mcp`) and `GET /clock` (`hz system serve api`); the zones are checked by
28
+ `hz system doctor`, and `hz setup` includes the World Clock's optional setup step.
29
+
30
+ The settings before per-zone hours (`zones` as names and one `working_hours` for all) are still read, and
31
+ `hz system doctor` reports them as degraded. `hz setup clock` rewrites them in the new shape when they are in your
32
+ user file; remove `working_hours` from a project `hz.toml` or `HZ_CLOCK__WORKING_HOURS` yourself.
33
+
34
+ Development and release commands: [repository guide](../../README.md).
35
+
36
+ Migration provenance: heinzel, before the 0.9 plugin-boundary migration.
37
+
38
+ The fallback land outline is simplified [Natural Earth land](https://www.naturalearthdata.com/about/terms-of-use/)
39
+ (public domain); representative zone points come from IANA's public-domain zone.tab. Bundled frontend dependency
40
+ license notices are packaged alongside the built view.
@@ -0,0 +1,27 @@
1
+ # heinzel-clock: the World Clock
2
+
3
+ What time it is for everyone on the team — a first-party [Heinzelmännchen](https://github.com/helmut-hoffer-von-ankershoffen/heinzel) plugin, and the smallest
4
+ plugin-owned feature: Python declarations, globe, assets and tests live in this project.
5
+
6
+ ```bash
7
+ hz system plugin add clock --confirm
8
+ hz setup clock # pick the team's time zones and the working hours in each
9
+ hz clock # the team's local times; --json for agents
10
+ hz system config set clock.zones '[{ name = "Europe/Berlin", hours = [9, 18] }, "America/New_York"]'
11
+ ```
12
+
13
+ Each zone is an IANA name, which gets working hours 9 to 18, or a table with its own `hours`. The same operation is
14
+ the MCP tool `clock` (`hz system serve mcp`) and `GET /clock` (`hz system serve api`); the zones are checked by
15
+ `hz system doctor`, and `hz setup` includes the World Clock's optional setup step.
16
+
17
+ The settings before per-zone hours (`zones` as names and one `working_hours` for all) are still read, and
18
+ `hz system doctor` reports them as degraded. `hz setup clock` rewrites them in the new shape when they are in your
19
+ user file; remove `working_hours` from a project `hz.toml` or `HZ_CLOCK__WORKING_HOURS` yourself.
20
+
21
+ Development and release commands: [repository guide](../../README.md).
22
+
23
+ Migration provenance: heinzel, before the 0.9 plugin-boundary migration.
24
+
25
+ The fallback land outline is simplified [Natural Earth land](https://www.naturalearthdata.com/about/terms-of-use/)
26
+ (public domain); representative zone points come from IANA's public-domain zone.tab. Bundled frontend dependency
27
+ license notices are packaged alongside the built view.
@@ -0,0 +1,21 @@
1
+ """Build this plugin's own frontend before producing its wheel or sdist."""
2
+
3
+ import subprocess
4
+ import sys
5
+ from pathlib import Path
6
+ from typing import cast
7
+
8
+ from hatchling.builders.hooks.plugin.interface import BuildHookInterface
9
+
10
+
11
+ class ViewBuildHook(BuildHookInterface):
12
+ """Package only this plugin's freshly built view assets."""
13
+
14
+ def initialize(self, version: str, build_data: dict[str, object]) -> None:
15
+ """Build in this project's PEP 517 environment; editable Python installs stay fast."""
16
+ if version == "editable":
17
+ return
18
+ subprocess.run([sys.executable, str(Path(self.root) / "web/build.py"), "run", "build"], check=True, timeout=600) # noqa: S603 - own build hook, no shell
19
+ assets = Path(self.root) / "src/heinzel_clock/views"
20
+ included = cast("dict[str, str]", build_data.setdefault("force_include", {}))
21
+ included[str(assets)] = "heinzel_clock/views"