odforge 0.3.2__tar.gz → 0.3.3__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.
- {odforge-0.3.2 → odforge-0.3.3}/PKG-INFO +1 -1
- odforge-0.3.3/src/odforge/__init__.py +1 -0
- {odforge-0.3.2 → odforge-0.3.3}/src/odforge/odpedit.py +7 -1
- {odforge-0.3.2 → odforge-0.3.3}/tests/test_editor.py +15 -0
- odforge-0.3.2/src/odforge/__init__.py +0 -1
- {odforge-0.3.2 → odforge-0.3.3}/.gitignore +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/LICENSE +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/README.md +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/constraints.txt +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/hatch_build.py +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/pyproject.toml +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/skills/odforge-design/SKILL.md +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/skills/odforge-design/themes/academic.md +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/skills/odforge-design/themes/clay.md +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/skills/odforge-design/themes/color-system.md +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/skills/odforge-design/themes/crimson.md +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/skills/odforge-design/themes/dark.md +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/skills/odforge-design/themes/forest.md +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/skills/odforge-design/themes/gold.md +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/skills/odforge-design/themes/minimal.md +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/skills/odforge-design/themes/navy.md +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/skills/odforge-design/themes/plum.md +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/skills/odforge-design/themes/sky.md +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/skills/odforge-design/themes/slate.md +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/skills/odforge-design/themes/teal.md +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/skills/odforge-design/themes/violet.md +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/src/odforge/benchmark.py +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/src/odforge/check.py +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/src/odforge/cli.py +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/src/odforge/components.py +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/src/odforge/critic.py +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/src/odforge/docfonts.py +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/src/odforge/editor_api.py +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/src/odforge/editor_launch.py +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/src/odforge/editor_routes.py +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/src/odforge/extract.py +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/src/odforge/feedback.py +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/src/odforge/fontembed.py +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/src/odforge/ir.py +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/src/odforge/layoutcheck.py +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/src/odforge/llm.py +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/src/odforge/localguard.py +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/src/odforge/mcp_server.py +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/src/odforge/media.py +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/src/odforge/package.py +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/src/odforge/pagefacts.py +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/src/odforge/preview.py +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/src/odforge/references.py +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/src/odforge/render/__init__.py +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/src/odforge/render/odp.py +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/src/odforge/render/ods.py +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/src/odforge/render/odt.py +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/src/odforge/scene.py +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/src/odforge/setup_agents.py +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/src/odforge/templates.py +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/src/odforge/textmetrics.py +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/src/odforge/textutil.py +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/src/odforge/themes.py +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/src/odforge/validate.py +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/src/odforge/watch.py +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/src/odforge/webapi.py +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/src/odforge/xmlsafe.py +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/src/odforge/zipguard.py +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/tests/conftest.py +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/tests/test_benchmark.py +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/tests/test_check.py +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/tests/test_cli.py +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/tests/test_critic.py +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/tests/test_deck_quality.py +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/tests/test_editor_launch.py +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/tests/test_extract.py +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/tests/test_integration_pipeline.py +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/tests/test_ir.py +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/tests/test_layoutcheck.py +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/tests/test_llm.py +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/tests/test_localguard.py +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/tests/test_mcp.py +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/tests/test_media.py +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/tests/test_package.py +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/tests/test_pagefacts.py +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/tests/test_preview.py +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/tests/test_render_odp.py +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/tests/test_render_ods.py +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/tests/test_render_odt.py +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/tests/test_setup_agents.py +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/tests/test_sources.py +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/tests/test_templates.py +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/tests/test_textmetrics.py +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/tests/test_validate.py +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/tests/test_watch.py +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/tests/test_webapi.py +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/tests/test_zipguard.py +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/web/editor.html +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/web/index.html +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/web/package-lock.json +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/web/package.json +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/web/src/App.test.tsx +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/web/src/App.tsx +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/web/src/components/ConfirmBar.test.tsx +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/web/src/components/ConfirmBar.tsx +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/web/src/components/DiscoveryPanel.test.tsx +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/web/src/components/DiscoveryPanel.tsx +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/web/src/components/DownloadDock.test.tsx +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/web/src/components/DownloadDock.tsx +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/web/src/components/ErrorPanel.test.tsx +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/web/src/components/ErrorPanel.tsx +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/web/src/components/GateRail.test.tsx +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/web/src/components/GateRail.tsx +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/web/src/components/HomeDashboard.test.tsx +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/web/src/components/HomeDashboard.tsx +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/web/src/components/OutlineRail.test.tsx +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/web/src/components/OutlineRail.tsx +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/web/src/components/PreviewStage.tsx +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/web/src/components/PromptBar.test.tsx +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/web/src/components/PromptBar.tsx +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/web/src/components/SideNav.tsx +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/web/src/components/StatusNarrator.tsx +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/web/src/components/TemplateGallery.test.tsx +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/web/src/components/TemplateGallery.tsx +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/web/src/components/TemplatesPage.tsx +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/web/src/components/UnitCell.tsx +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/web/src/components/UnitDetail.test.tsx +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/web/src/components/UnitDetail.tsx +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/web/src/components/WaitingCard.tsx +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/web/src/components/display.test.tsx +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/web/src/components/preview.test.tsx +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/web/src/main.tsx +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/web/src/next/Bars.tsx +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/web/src/next/Canvas.tsx +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/web/src/next/Comments.tsx +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/web/src/next/EditorApp.tsx +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/web/src/next/Elements.tsx +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/web/src/next/PageList.tsx +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/web/src/next/SlideView.test.tsx +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/web/src/next/SlideView.tsx +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/web/src/next/api.ts +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/web/src/next/editor.css +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/web/src/next/geometry.test.ts +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/web/src/next/geometry.ts +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/web/src/next/main.tsx +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/web/src/next/richtext.test.ts +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/web/src/next/richtext.ts +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/web/src/next/types.ts +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/web/src/smoke.test.ts +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/web/src/state/api.test.ts +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/web/src/state/api.ts +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/web/src/state/cockpit.test.ts +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/web/src/state/cockpit.ts +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/web/src/state/discovery.test.ts +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/web/src/state/discovery.ts +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/web/src/state/errors.test.ts +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/web/src/state/errors.ts +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/web/src/state/mockStream.test.ts +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/web/src/state/mockStream.ts +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/web/src/state/sse.test.ts +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/web/src/state/sse.ts +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/web/src/state/subscribe.test.ts +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/web/src/state/taskName.test.ts +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/web/src/state/taskName.ts +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/web/src/state/throttle.test.ts +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/web/src/state/throttle.ts +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/web/src/state/types.ts +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/web/src/styles/app.css +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/web/src/styles/layout.test.ts +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/web/src/test/setup.ts +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/web/src/theme/contrast.test.ts +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/web/src/theme/tokens.css +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/web/src/theme/useTheme.test.ts +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/web/src/theme/useTheme.ts +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/web/tsconfig.json +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/web/tsconfig.test.json +0 -0
- {odforge-0.3.2 → odforge-0.3.3}/web/vite.config.ts +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: odforge
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.3
|
|
4
4
|
Summary: Forge natural language into native ODF documents (.odt/.odp/.ods)
|
|
5
5
|
Project-URL: Homepage, https://github.com/FantasySakura0515/ODForge
|
|
6
6
|
Project-URL: Source, https://github.com/FantasySakura0515/ODForge
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.3.3"
|
|
@@ -345,8 +345,14 @@ class Document:
|
|
|
345
345
|
for key, attr in (("x", "x"), ("y", "y"), ("w", "width"), ("h", "height")):
|
|
346
346
|
if key in op:
|
|
347
347
|
value = float(op[key])
|
|
348
|
+
# The floor stops a resize from collapsing an element to nothing.
|
|
349
|
+
# A hairline rule that is already thinner (0.02 cm dividers are
|
|
350
|
+
# common) must still be movable: the editor sends the size along
|
|
351
|
+
# with every move, so only a size that *shrinks* is refused.
|
|
348
352
|
if key in ("w", "h") and value < 0.05:
|
|
349
|
-
|
|
353
|
+
current = cm(el.get(q("svg", attr)), 0.0)
|
|
354
|
+
if value < current - 0.001:
|
|
355
|
+
raise EditError("寬度和高度至少要 0.05 cm")
|
|
350
356
|
el.set(q("svg", attr), _len(value))
|
|
351
357
|
|
|
352
358
|
def _text_root(self, el: etree._Element) -> etree._Element:
|
|
@@ -713,3 +713,18 @@ def test_parts_validate_and_use_the_deck_style(deck):
|
|
|
713
713
|
doc.apply([{"op": "add_component", "page": 1, "kind": "rocket"}])
|
|
714
714
|
report = validate_odf(deck, with_soffice=find_soffice() is not None)
|
|
715
715
|
assert report.ok, report.gates
|
|
716
|
+
|
|
717
|
+
|
|
718
|
+
def test_a_hairline_rule_can_be_moved_but_not_shrunk_further(deck):
|
|
719
|
+
# Dragging a card moves everything on it, and the editor sends each element's
|
|
720
|
+
# size with its new position. The 0.02 cm divider on the cover card used to
|
|
721
|
+
# fail the minimum-size check, which refused the whole drag.
|
|
722
|
+
doc = Document(deck)
|
|
723
|
+
rule = _el(doc.state(), "0/4")
|
|
724
|
+
assert rule["h"] < 0.05
|
|
725
|
+
state = doc.apply(
|
|
726
|
+
[{"op": "geom", "id": "0/4", "x": rule["x"] + 2, "y": rule["y"] + 1, "w": rule["w"], "h": rule["h"]}]
|
|
727
|
+
)
|
|
728
|
+
assert _el(state, "0/4")["x"] == pytest.approx(rule["x"] + 2)
|
|
729
|
+
with pytest.raises(EditError, match="至少要 0.05"):
|
|
730
|
+
doc.apply([{"op": "geom", "id": "0/4", "h": 0.005}])
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.3.2"
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|