Commit Graph
42 Commits
Author SHA1 Message Date
Dylan M. Taylor dfd096babf Parse IDML text frame preferences into typed model 2026-11-13 09:05:19 -05:00
Dylan M. Taylor 6e58aeea40 Parse IDML fill values into neutral model 2026-11-13 09:05:19 -05:00
Dylan M. Taylor ee250b8b98 Parse stroke attributes into a neutral IDML model 2026-11-13 09:05:19 -05:00
Dylan M. Taylor e234a310d9 Parse IDML transparency settings into a neutral model 2026-11-13 09:05:19 -05:00
Dylan M. Taylor 9e0d8b8d12 Add shared IDML XMP metadata writer 2026-11-13 09:05:19 -05:00
Dylan M. Taylor a0120131e6 Add shared designmap root and include builders 2026-11-13 09:05:19 -05:00
Dylan M. Taylor 259bbe43cf Add neutral IDML Fonts.xml writer 2026-11-13 09:05:19 -05:00
Dylan M. Taylor ece8f14a95 Add neutral Graphic.xml resource writer 2026-11-13 09:05:19 -05:00
Dylan M. Taylor 30c63d643f Add neutral IDML color definition writer 2026-11-13 09:05:19 -05:00
Dylan M. Taylor 398e7510ac Expose shared designmap part serializer 2026-11-13 09:05:19 -05:00
Dylan M. Taylor 930088fc58 Add neutral IDML document tree model 2026-11-13 09:05:19 -05:00
Dylan M. Taylor 438b0d986c Expose cross-reference marker character range 2026-11-13 09:05:19 -05:00
Dylan M. Taylor 2656c76fe8 Preserve structural story processing instructions 2026-11-13 09:05:19 -05:00
Dylan M. Taylor 874805b7a5 Parse saved cross-reference text in shared model 2026-11-13 09:05:19 -05:00
Dylan M. Taylor 676714b6d2 Parse IDML text wrap preferences 2026-11-13 09:05:19 -05:00
Dylan M. Taylor c2fd26d889 Parse IDML corner option families 2026-11-13 09:05:19 -05:00
Dylan M. Taylor 4fd8f64e78 Model IDML story container kinds 2026-11-13 09:05:19 -05:00
Dylan M. Taylor 622950ccce Model IDML story marker nodes 2026-11-13 09:05:19 -05:00
Dylan M. Taylor 986ad52889 Model IDML table row and column geometry 2026-11-13 09:05:19 -05:00
Dylan M. Taylor c59aad77b3 Parse IDML table options 2026-11-13 09:05:19 -05:00
Dylan M. Taylor b9715e592b Parse IDML alternating table values 2026-11-13 09:05:19 -05:00
Dylan M. Taylor 6891ec1a94 Parse IDML stroke value families 2026-11-13 09:05:19 -05:00
Dylan M. Taylor d412f12f59 Expose IDML cell option values 2026-11-13 09:05:19 -05:00
Dylan M. Taylor 9f57e1fc0e Expose typed IDML paragraph breaks 2026-11-13 09:05:19 -05:00
Dylan M. Taylor 3a53860a81 Parse typed IDML cells 2026-11-13 09:05:19 -05:00
Dylan M. Taylor 8ac6920ec4 Write typed IDML table cells 2026-11-13 09:05:19 -05:00
Dylan M. Taylor cb05c972fd Model IDML story preference output 2026-11-13 09:05:19 -05:00
Dylan M. Taylor efd77798b1 Expose typed IDML story preferences 2026-11-13 09:05:19 -05:00
Dylan M. Taylor fa159b3f36 Model IDML graphic gradients and text paths 2026-11-13 09:05:19 -05:00
Dylan M. Taylor 49238094eb Expose shared IDML page item settings 2026-11-13 09:05:19 -05:00
Dylan M. Taylor ec03ac6d82 Parse IDML page margin values in shared model 2026-11-13 09:05:19 -05:00
Dylan M. Taylor 2f6c85dcfe Model IDML page margin preferences 2026-11-13 09:05:19 -05:00
Dylan M. Taylor 9809891ea6 Expose typed IDML spread and page settings 2026-11-13 09:05:19 -05:00
Dylan M. Taylor aae37955ad Expose typed IDML guide settings 2026-11-13 09:05:18 -05:00
Dylan M. Taylor fb3c910bc1 Model IDML ink manager entries 2026-11-13 09:05:18 -05:00
Dylan M. Taylor 0e537f7952 Retain optional gradient stop values 2026-11-13 09:05:18 -05:00
Dylan M. Taylor 5d8ddd13e5 Add strict bounded IDML path geometry reader 2026-11-13 09:05:18 -05:00
Dylan M. Taylorandljkx 24903d320d craft-idml: resources model (styles, swatches, stroke styles, colour groups, preferences) (#1017)
* craft-idml: a typed model of the layout (spreads, pages, guides, page items, graphics, geometry)

The first step of the typed IDML model. Spreads and parent spreads, pages, guides, page items
(nested), placed graphics and their links are typed; each keeps its attributes and Properties
as written and reads them through accessors, path geometry among them. Elements the model
does not type are kept where they stood, so a node read and written again reads the same.

* craft-idml: the story model (ranges, content, tables, notes, anchored items)

Stories as IDML writes them: paragraph and character ranges, Content with the special
characters InDesign writes as <?ACE n?>, breaks, the containers text sits in (hyperlink
sources, tracked changes, XML elements, cross-reference sources, footnotes, notes), tables with
their cells, and page items anchored in the text. Each node keeps its values as written; text
is gathered without recursion.

* craft-idml: read and write ICML (InCopy Markup)

The format layer of storytold/designcraft#2248: an ICML file told by its InCopyInterchange
instruction, read within the size of one package part, its references to package parts left
out with a warning, a file without a story refused, and written with the two instructions that
mark it. Choosing the story to place and mapping it stay with the application.

* craft-idml: the resources model (style groups, swatches, stroke styles, colour groups, preferences)

Style groups as trees of groups and styles for each kind, each style with its group path,
BasedOn and NextStyle; colours, tints, gradients with their stops, mixed inks and the None
swatch; inks, custom stroke styles, colour groups; and the preference elements by name. Values
are kept as written and read through accessors.

---------

Co-authored-by: ljkx <177671075+ljkx@users.noreply.github.com>
2026-11-11 20:35:11 -05:00
Dylan M. Taylorandljkx c6ded901fb craft-idml: story model and ICML (InCopy Markup) (#1008)
* craft-idml: a typed model of the layout (spreads, pages, guides, page items, graphics, geometry)

The first step of the typed IDML model. Spreads and parent spreads, pages, guides, page items
(nested), placed graphics and their links are typed; each keeps its attributes and Properties
as written and reads them through accessors, path geometry among them. Elements the model
does not type are kept where they stood, so a node read and written again reads the same.

* craft-idml: the story model (ranges, content, tables, notes, anchored items)

Stories as IDML writes them: paragraph and character ranges, Content with the special
characters InDesign writes as <?ACE n?>, breaks, the containers text sits in (hyperlink
sources, tracked changes, XML elements, cross-reference sources, footnotes, notes), tables with
their cells, and page items anchored in the text. Each node keeps its values as written; text
is gathered without recursion.

* craft-idml: read and write ICML (InCopy Markup)

The format layer of storytold/designcraft#2248: an ICML file told by its InCopyInterchange
instruction, read within the size of one package part, its references to package parts left
out with a warning, a file without a story refused, and written with the two instructions that
mark it. Choosing the story to place and mapping it stay with the application.

---------

Co-authored-by: ljkx <177671075+ljkx@users.noreply.github.com>
2026-11-11 20:29:48 -05:00
Dylan M. Taylor b15ff4486f craft-idml: a typed model of the layout (spreads, pages, guides, page items, graphics, geometry) (#1003)
The first step of the typed IDML model. Spreads and parent spreads, pages, guides, page items
(nested), placed graphics and their links are typed; each keeps its attributes and Properties
as written and reads them through accessors, path geometry among them. Elements the model
does not type are kept where they stood, so a node read and written again reads the same.
2026-11-11 19:49:28 -05:00
Dylan M. Taylorandskylar taylor-barrick 58f6c4b9e8 craft-idml, craft-epub: read and write through craft-zip (#950)
* craft-zip: ZIP preflight, bounded entry read and Budget (from craft-archive, #129)

The ZIP half of the craft-archive proposal (#126, #129): an allocation-free check of the end
records and central directory that runs before a ZIP reader indexes the archive, a bounded
entry read that distrusts the declared size, and the named Budget both charge. The XML half
of #129 is not carried: craft-xml bounds XML now.

* craft-zip: Archive (entry-count guard, duplicate names, budgeted reads) and Writer

check_entry_count is craft-opc's guard: the declared entry count, ZIP64 included, checked on
the raw bytes before zip parses the central directory. Archive reads entries within a per-entry
limit and a total Budget through read_entry. Duplicate names are found by counting the central
directory headers against the entries zip kept. Writer is craft-opc's ZipOut: stored or deflated
entries, ZIP64 for large ones, one fixed timestamp.

* craft-idml, craft-epub: read and write through craft-zip

Both crates drop their own bounded ZIP reads and zip writers. They gain the entry-count check
before the archive is indexed (ZIP64 included) and archives whose bytes depend only on their
content (one fixed timestamp).

---------

Co-authored-by: skylar taylor-barrick <hi@skylar.cc>
2026-11-11 19:23:15 -05:00
Dylan M. Taylor e21d7e85f8 Add craft-idml: the IDML package layer and InDesign Tagged Text from DesignCraft (#894)
The format-only part of DesignCraft's crates/idml (at 513f77b8): the bounded, lenient package
reader, designmap includes, the package writer, the <Properties> accessors and the attribute
value codecs. DesignCraft's own XML tree is replaced by craft-xml, which adds node and attribute
caps per part. crates/textimport/src/tagged.rs moves as craft_idml::tagged behind a neutral
model of paragraphs and runs.
2026-11-11 16:41:22 -05:00