signatur 0.1.0 → 1.0.0
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.
- package/CHANGELOG.md +307 -0
- package/README.md +177 -1
- package/app.js +821 -4
- package/lib/engines/engine.js +7 -3
- package/lib/engines/inkscape.js +140 -2
- package/lib/util/base.js +63 -3
- package/lib/util/config.js +33 -8
- package/lib/util/date.js +25 -0
- package/lib/util/index.js +6 -0
- package/lib/util/locale.js +16 -0
- package/lib/util/profile.js +657 -0
- package/package.json +36 -17
- package/static/js/bundle.js +4928 -0
- package/static/js/jSignature.min.js +81 -0
- package/static/js/main.js +1561 -0
- package/static/js/plugins/collapsible.js +51 -0
- package/static/js/plugins/console.js +34 -0
- package/static/js/plugins/fonts.js +37 -0
- package/static/js/plugins/inspiration.js +303 -0
- package/static/js/plugins/jsonhighlight.js +127 -0
- package/static/js/plugins/keyboard.js +166 -0
- package/static/js/plugins/modal.js +339 -0
- package/static/js/plugins/profilemanager.js +896 -0
- package/static/js/plugins/profileselector.js +148 -0
- package/static/js/plugins/texteditor.js +632 -0
- package/static/js/plugins/toast.js +28 -0
- package/static/js/plugins/viewportpreview.js +248 -0
- package/static/js/plugins/welcome.js +210 -0
- package/static/js/util.js +134 -0
- package/test/lib/util/base.js +81 -0
- package/test/lib/util/locale.js +19 -0
- package/test/lib/util/profile.js +923 -0
- package/views/console-pt_pt.ejs +26 -0
- package/views/console.ejs +26 -0
- package/views/gateway-pt_pt.ejs +106 -0
- package/views/gateway.ejs +106 -0
- package/views/head.ejs +59 -0
- package/views/layout.ejs +1 -0
- package/views/manager-pt_pt.ejs +204 -0
- package/views/manager.ejs +204 -0
- package/views/receipt-pt_pt.ejs +18 -0
- package/views/receipt.ejs +18 -0
- package/views/report-pt_pt.ejs +99 -0
- package/views/report.ejs +100 -0
- package/views/settings-pt_pt.ejs +189 -0
- package/views/settings.ejs +189 -0
- package/views/signature-pt_pt.ejs +26 -0
- package/views/signature.ejs +26 -0
- package/views/text-pt_pt.ejs +13 -0
- package/views/text.ejs +13 -0
- package/views/viewport-pt_pt.ejs +504 -0
- package/views/viewport.ejs +504 -0
- package/views/welcome-pt_pt.ejs +90 -0
- package/views/welcome.ejs +90 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
*
|
|
13
|
+
|
|
14
|
+
### Changed
|
|
15
|
+
|
|
16
|
+
*
|
|
17
|
+
|
|
18
|
+
### Fixed
|
|
19
|
+
|
|
20
|
+
*
|
|
21
|
+
|
|
22
|
+
## [1.0.0] - 2026-05-21
|
|
23
|
+
|
|
24
|
+
### Added
|
|
25
|
+
|
|
26
|
+
* Optional `sku` field on the profile schema that, when present, is rendered as quiet monospaced metadata between the product name and the dimension pill on every welcome catalog card so operators can identify the matching stock keeping unit at a glance; the field is validated as an optional string in `lib/util/profile.js` and documented in [docs/profile-spec.md](docs/profile-spec.md) ([#30](https://github.com/hivesolutions/signatur/issues/30))
|
|
27
|
+
* `button-tiny` size variant on the `.button` component mirroring the existing `button-small` shape at a smaller 28×28 scale with a 9px label, so very small affordances like the `Instructions` link on the viewport options panel can use the established button language instead of a one off styled link
|
|
28
|
+
* iOS Safari touch responsiveness pass: `touch-action: manipulation` is applied at the body level and reinforced on every interactive surface (`.button`, `.option-chip`, `.option-chip-toggle`, `.slider-preset`, `.settings-tab`, `.emojis-tab`, keyboard `.char`, `.catalog-card`, `.fonts-container > .font`) so the first tap registers immediately without the legacy hover stall; the viewport meta is locked at `maximum-scale=1, user-scalable=no` so neither double tap nor pinch can zoom the page; the body also sets `-webkit-tap-highlight-color` to transparent so taps no longer flash the iOS gray overlay
|
|
29
|
+
* Container level fallback caret click handler on the viewer container that resolves taps landing outside any character span to the nearest character, working around iOS Safari's touch hit-test that occasionally promotes the click target to the closest interactive ancestor when the tap falls in the few pixel gap before or after a span
|
|
30
|
+
* Entrance animation for the viewport preview that fades the engraving surface in with a subtle three pixel translate up using a `cubic-bezier(0.22, 1.2, 0.36, 1)` ease so the moment a profile becomes active feels deliberate rather than abrupt; runs once per `.profile-active` activation
|
|
31
|
+
* New slider control on the viewport options panel that replaces the legacy native range plus number input plus auto checkbox triplet with a preset chip row above a visually enlarged slider; the chips share the existing option chip language (`S` / `M` / `L` / `XL` / `Auto` for the font size, `1x` / `2x` / `3x` for the zoom) and turn the slider into a quick destination picker without losing the fine grained scrubbing affordance, while a tooltip bubble floats above the thumb showing the live value with the profile unit only while the user is actively dragging so the panel stays uncluttered when idle; the visual layer lives under a shared `.slider-field` / `.slider-presets` / `.slider-preset` / `.slider-track` / `.slider-range` / `.slider-bubble` / `.slider-dragging` class set so both the font size and the zoom containers compose the same look through class composition (`viewport-options-field slider-field font-size-container`), the bubble positioning is owned by a single `refreshSliderBubble(range, bubble, formatter)` helper that each container wraps with its own unit suffix, and the existing `font-size-input` / `font-size-mode` hidden form controls are kept verbatim so the URL persistence, the modal specs and every downstream consumer keep working without any change to their code; the legacy `.zoom-value` static label is removed in favor of the live bubble
|
|
32
|
+
* Separate Colony Print configuration for the engraving job and the receipt printing so a single Signatur install can drive an engraver and a receipt printer that live on different nodes without any name collision; the colony print base URL and the secret key remain shared between both scenarios, while `engrave_node` / `engrave_printer` (with legacy `node` / `printer` fallback) and `receipt_node` / `receipt_printer` (same legacy fallback) are read independently by the engrave and the receipt code paths
|
|
33
|
+
* `ENGRAVE_NODE` and `ENGRAVE_PRINTER` server side environment variables that feed the `data-node` / `data-printer` attributes rendered onto the viewport `Engrave` button so deployments that do not configure the browser side `localStorage` still pick up a sensible default; both fall back to `PRINT_NODE` / `PRINT_PRINTER` so existing single printer installs keep working
|
|
34
|
+
* Tabbed `/settings` screen with a `General` tab for the existing preferences (theme, locale, fullscreen, home, show options, viewport mode, version) and a dedicated `Printing` tab that exposes the Colony Print configuration; each printing entry renders as a card with the label on top and two pill-shaped sub lines underneath, a disabled `Base` pill showing the server side `lib.conf` value and an editable `Effective` input prefilled with the resolved value so operators can override any entry inline; the form submit handler persists each input to its matching `localStorage` key (or removes it when blank so the base takes over again)
|
|
35
|
+
* Localized data attributes on the confirmation modal so each viewport locale template owns its own label set (`Texto`, `Letra`, `Perfil`, `Área`, `Tam. Letra`, `Margens`, `Espaç. Extra`, `Área Final`, `Nó`, `Suporte` for `pt_pt`); the modal also renders a friendly subtitle (`Ready to engrave on …` / `Pronto para gravar em …`), pill chips for each multifont text segment, an amber/lavender empty hint that blocks the primary action with the `Engrave` button greyed out when no text was entered, and a `Dry run` / `Simulação` chip toggle that replaces the legacy checkbox; the secondary `Cancel` / `Cancelar` button adopts the ghost variant so the engrave action stays visually dominant
|
|
36
|
+
* `data-message-no-printer` / `data-message-pantograph` data attributes on the viewport body so the engrave guard error messages are owned by each locale template instead of being hardcoded; the missing printer message now points the user to `/settings` and is required whenever any of `url`, `node`, `printer` or `key` is unset
|
|
37
|
+
* `Settings` / `Definições` link on both gateway action bars so the configuration screen is reachable from the gateway in either locale (the EN gateway previously exposed a `Configure` button that opened the legacy modal, while the PT gateway had no entry point at all)
|
|
38
|
+
* QWERTY layout on the on screen text keyboard with `<br>` row separators that respect the existing `.keyboard-container > .char` styling, an iOS style utility row at the bottom (`123` mode toggle, spacebar, return) and a dedicated `Shift`/`Backspace` placement at the edges of the Z row; a letters/symbols toggle mirrors the existing `.lowercase` casing toggle pattern by adding a `.symbols` class on the container that swaps a 3 row symbols layout (10/10/5) in place of the letters rows, with a separate backspace inside the symbols section so it remains reachable when the Z row is hidden
|
|
39
|
+
* Themed tabs above each emoji keyboard that split the large flat key list into 5 categories (`Symbols`/`Símbolos`, `Nature`/`Natureza`, `People`/`Pessoas`, `Pop`, `Phrases`/`Frases`) for the Cool Emojis font and 4 categories (`Symbols`, `Nature`, `People`, `Pop`) for the Cool Emojis Pantograph font; tabs are wired through the existing keyboard plugin via a `data-active` attribute on the container plus `data-category` on each `.char`, the visibility rules live in plugin CSS so the active category is the only one rendered, and the container width is constrained to 10 emojis per row with the utility keys (`⌫`, `⎵`, `↵`) placed on a dedicated row via a `<br>` separator so they never mingle with the glyph grid
|
|
40
|
+
* Mobile viewport block under 430px wide that overlays every page with a centered notice telling the user that Signatur is not designed for mobile devices, fully inert so the underlying UI cannot be interacted with; implemented as a CSS-only `body::before` pseudo-element driven by the existing `<html lang="…">` attribute so the English and Portuguese copies switch automatically with no per-page markup edits, with `ldj` theme tints picked up from the body class
|
|
41
|
+
* `Version` field on `/settings` rendered as a soft-fill pill that replaces the legacy per-page `welcome-version` footer (removed from welcome, profile manager and gateway views) so the application version lives in a single, predictable place
|
|
42
|
+
* Preview mode on `/viewport` triggered by a new header icon button (Ionicons `expand-outline`) and reversible via the Esc key or a floating exit hint: layers a layered fade-out of the chrome (header, profile info, inspirations panel, viewport options, font row, keyboards) with `cubic-bezier(0.16, 1, 0.3, 1)` easing while compounding the current zoom by 1.5x for a cinematic centered preview; the underlying toggle states are snapshotted on enter and restored on exit through their existing change handlers, with the `restoring` flag (wrapped in `try`/`finally`) suppressing URL writes so the temporary off state never persists
|
|
43
|
+
* `cookie-session` based session middleware that replaces the in-memory `express-session` store with a signed cookie payload, so UI preferences (theme, locale, last text, profile, viewport mode) survive Node restarts without any server side storage; the secret is hardcoded because the session only carries non sensitive UI state
|
|
44
|
+
* Modernized native keyboards with a soft entry/exit motion: `keyboard-enter` keyframe (0.5s out-expo) plays automatically when a keyboard becomes visible, `keyboard-leaving` class (0.25s in-quint) plays the reverse before `display: none` so font switches go through a sequenced leave-then-enter handoff instead of snapping
|
|
45
|
+
* Profile JSON / Inspirations JSON dropdown selector on `/profiles/manager` that swaps the two textareas in place to reclaim vertical space, and auto routes the user to the failing editor when validation or save errors come back with `profile:` / `inspirations:` prefixes
|
|
46
|
+
* Profile manager screen at `/profiles/manager` with inline JSON editors for the profile and inspirations payloads, validated server side via the existing profile and inspirations schemas before being written to `static/profiles/` under the validated profile id
|
|
47
|
+
* Optional `Load from file` picker next to each JSON editor that reads the selected file as text into the editor textarea so the editor remains the source of truth on submit
|
|
48
|
+
* Reference panel on the upload screen with a profile dropdown that previews the picked profile (image, name, key metadata) and a `Use as starting point` button that loads its profile JSON (and matching inspirations when present) into the editor
|
|
49
|
+
* `Validate` button on the upload screen that posts the current editor contents to a new `/profiles/validate` endpoint and surfaces the server returned errors inline
|
|
50
|
+
* `Preview` tab on the upload reference pane that renders a live summary of the editor payload (image, name, key metadata) using the freshly picked background image as the preview surface, debounced on every input
|
|
51
|
+
* `Edit this profile` action on the upload reference pane that opens the selected profile in the editor and flips the form into edit mode so the next save overwrites the existing files via `POST /profiles` with an `edit_target` field, including support for renaming the profile id during edit (the old assets are removed after the new ones are written)
|
|
52
|
+
* Mode aware validation that lets create mode reject duplicate ids while edit mode accepts in place updates and renames, refusing only when the edited profile no longer exists on disk or when a rename would clobber another profile, with the same rules applied by `POST /profiles/validate` so the `Validate` button surfaces every error that would block a save
|
|
53
|
+
* AJAX save flow on the profile manager that posts the form via `fetch`, returns JSON from `POST /profiles` instead of a redirect, refreshes the reference dropdown in place, surfaces success through the existing toast plugin, and switches the form into edit mode pointing at the freshly saved id so the user never loses the editor context
|
|
54
|
+
* Dedicated background asset manager on the profile manager (new `Backgrounds` tab) backed by `GET /profiles/assets`, `POST /profiles/assets`, and `POST /profiles/assets/:filename/delete`, listing every PNG file under `static/profiles/` and offering inline upload and delete with confirmation modal so multiple variants can share the same asset
|
|
55
|
+
* Per-asset download button on each background card that points at the public `/static/profiles/<filename>` URL with the native browser `download` attribute so individual PNG assets can be saved locally without leaving the manager
|
|
56
|
+
* Profiles bundle export and restore on the profile manager (new `Export / Import` tab) backed by `GET /profiles/bundle` (streams a zip of every profile JSON, inspirations JSON, and PNG asset plus a `manifest.json` entry) and `POST /profiles/bundle` (wipes the profiles directory before unpacking the uploaded archive), with a confirmation modal guarding the destructive full replace semantics
|
|
57
|
+
* Decoupled the PNG asset lifecycle from the profile lifecycle: the background picker has been removed from the profile editor, the profile JSON `background` and `variant.background` fields remain plain filename references, profile renames no longer rewrite or delete PNG files, and profile deletes leave PNG assets untouched
|
|
58
|
+
* `Editing profile "<id>"` banner at the top of the upload form pane shown only while in edit mode, with an `Exit edit mode` link that reverts the hero, save button, and hidden target field back to the create state without reloading
|
|
59
|
+
* `Delete` action on the upload reference pane that opens a confirmation modal and removes the profile assets via `POST /profiles/:id/delete` after the user confirms
|
|
60
|
+
* `?edit=<id>` query parameter on `/profiles/manager` that pre-loads the profile and inspirations payloads into the editor on render
|
|
61
|
+
* Portuguese (`pt_pt`) translation of the profile manager screen mirroring the existing `manager.ejs` layout
|
|
62
|
+
* `Profile Manager` link on the welcome action bar pointing to `/profiles/manager`
|
|
63
|
+
* Profile manager jQuery plugin (`plugins/profilemanager.js`, `css/plugins/profilemanager.css`) that encapsulates the manager screen behavior previously inlined in `main.js`, initialized via a single `.form-manager.profilemanager()` call
|
|
64
|
+
* JSON syntax highlight jQuery plugin (`plugins/jsonhighlight.js`, `css/plugins/jsonhighlight.css`) that overlays a tokenized colored preview on top of the profile and inspirations textareas, applied automatically by the profile manager so keys, strings, numbers, booleans, null, and punctuation are colored while the native textarea behavior is preserved
|
|
65
|
+
* Support for toggling the visual keyboard by clicking the same font again
|
|
66
|
+
* Support for multiple lines with Enter key and visual keyboard `↵` button
|
|
67
|
+
* Enforcement of `max_lines` profile constraint when inserting newlines
|
|
68
|
+
* Display of max lines in the profile info panel
|
|
69
|
+
* Dry run checkbox in the engraving confirmation modal
|
|
70
|
+
* Raw profile JSON viewer with show/hide toggle in the profile info panel
|
|
71
|
+
* Newline rendering in report views (EN and PT)
|
|
72
|
+
* Horizontal and vertical rulers adjacent to the viewport preview
|
|
73
|
+
* Arrow key navigation (left, right, up, down) for caret movement
|
|
74
|
+
* Delete key support for forward character deletion
|
|
75
|
+
* Floating viewport options panel with profile selection, font size controls, and rulers toggle
|
|
76
|
+
* Margin override controls in viewport options panel with real-time preview
|
|
77
|
+
* Margins included in the engraving confirmation report
|
|
78
|
+
* Application icon (SVG, PNG 512/180/32) with monospaced S on blue gradient
|
|
79
|
+
* Favicon and Apple touch icon references in HTML head
|
|
80
|
+
* Icon generation script (`npm run icons`) using sharp
|
|
81
|
+
* Circular profile shape support with `shape: "circle"` field
|
|
82
|
+
* New "small-medal" circular profile (20x20mm)
|
|
83
|
+
* Circle boundary rendering in viewport preview for circular profiles
|
|
84
|
+
* Zoom slider in viewport options panel with per-profile default zoom and layout compensation
|
|
85
|
+
* Collapsible viewport options and profile info panels with animated toggle
|
|
86
|
+
* Dynamic profile info panel title showing the selected profile name
|
|
87
|
+
* Crosshair lines on viewport hover with toggleable visibility checkbox
|
|
88
|
+
* Position readout in viewport options panel showing X/Y coordinates in mm
|
|
89
|
+
* Show Keyboard toggle checkbox in viewport options panel to hide/show the visual keyboard
|
|
90
|
+
* Selected class tracking on the active keyboard container for font-based key validation
|
|
91
|
+
* Single-line constraint when no profile is selected (max 1 line)
|
|
92
|
+
* Emoji validation script (`scripts/emoji_validation.py`) for visual glyph-to-F3S mapping verification
|
|
93
|
+
* Missing emoji keyboard keys for all Cool Emojis TTF glyphs (`0`, `@`, `$`, `%`, `&`, `(`, `)`, `` ` ``, `[`, `{`, `|`, `}`)
|
|
94
|
+
* Optional background image support for viewport profiles (`background` field)
|
|
95
|
+
* Show Guidelines toggle checkbox in viewport options panel to hide/show SVG bounds and safe area
|
|
96
|
+
* Show Caret toggle checkbox in viewport options panel to hide/show the blinking caret
|
|
97
|
+
* URL persistence for rulers, crosshair, keyboard, guidelines, and caret visibility toggles
|
|
98
|
+
* Font metrics rendering script (`scripts/font_metrics.py`) for visual glyph metric inspection
|
|
99
|
+
* Inspiration presets system with per-profile pre-built configurations
|
|
100
|
+
* Collapsible inspiration panel on the right side showing 3 thumbnail previews
|
|
101
|
+
* Full-screen inspiration modal with 4-column grid, search, and click-to-apply
|
|
102
|
+
* Inspiration plugin (`plugins/inspiration.js`) with event-driven architecture
|
|
103
|
+
* Dedicated inspiration CSS file (`css/inspiration.css`) for panel and modal styles
|
|
104
|
+
* Hover zoom and active press animations on inspiration preview thumbnails
|
|
105
|
+
* Sample inspirations for small-medal profile including emoji presets
|
|
106
|
+
* Modal `hide` action for programmatic dismiss with animation
|
|
107
|
+
* Collapsible panel jQuery plugin (`plugins/collapsible.js`, `css/collapsible.css`) extracted from inline logic
|
|
108
|
+
* Font size number input alongside range slider with per-profile step granularity
|
|
109
|
+
* Shared `.options-input` CSS class for consistent number input styling across controls
|
|
110
|
+
* Per-profile jig instructions modal with images, accessible via "Instructions" link in options panel
|
|
111
|
+
* Profile variants support with dropdown selector for sub-type overrides (padding, background, font size)
|
|
112
|
+
* Viewport preview jQuery plugin (`plugins/viewportpreview.js`) for SVG rendering, rulers, and zoom
|
|
113
|
+
* `AGENTS.md` with project conventions for building, testing, plugins, and commit messages
|
|
114
|
+
* Plugin CSS files moved to `static/css/plugins/` mirroring the `static/js/plugins/` structure
|
|
115
|
+
* JSDoc-style `/** */` docstrings on jQuery plugin definitions with actions and events
|
|
116
|
+
* Profile selector jQuery plugin (`plugins/profileselector.js`) for profile and variant dropdown management
|
|
117
|
+
* Welcome screen at `/welcome` with a visual template catalog of the available profiles (image, name, dimensions)
|
|
118
|
+
* Welcome jQuery plugin (`plugins/welcome.js`, `css/welcome.css`) with `load` and `value` actions
|
|
119
|
+
* Forwarding of `profile` and `variant` query parameters from the gateway POST to the editor for template pre-selection
|
|
120
|
+
* Session-tracked entry point so the back arrow in the viewport, signature, and report views returns to the welcome screen or classic gateway depending on where the user came from
|
|
121
|
+
* Restoration of the previously selected template card on the welcome catalog when navigating back from the editor
|
|
122
|
+
* Portuguese (`pt_pt`) translation of the welcome screen mirroring the existing `welcome.ejs` layout
|
|
123
|
+
* Documentation of the supported HTTP query parameters in `README.md`, grouped per route with type, default, and description columns
|
|
124
|
+
* White background on the welcome screen version footer so it visually matches the action bar above it
|
|
125
|
+
* Settings page at `/settings` for selecting the session-persisted `theme`, `locale`, and `fullscreen` values, with a Portuguese translation and a link from the welcome screen action bar
|
|
126
|
+
* Session-persisted `home` preference selecting whether the bare `/` URL redirects to the classic gateway or to the welcome screen, defaulting to gateway
|
|
127
|
+
* Session-persisted `show_options` preference toggling whether the technology, elements, and location selectors are rendered on the welcome screen and classic gateway, defaulting to on; when off the previously selected values are submitted via hidden inputs so the form still routes correctly
|
|
128
|
+
* `docs/profile-spec.md` documenting the profile and inspirations JSON schema sourced from the `lib/util/profile.js` validator, with a pointer from `README.md`
|
|
129
|
+
* Optional top-level `default_font` field on the profile schema that auto-selects the matching font (and its keyboard) on initial profile load when no font is already active and no URL `font` parameter is supplied
|
|
130
|
+
* Session-persisted `viewport_mode` setting (`technical` default, `store`) on `/settings` that, when set to `store`, applies a `store-mode` body class on `/viewport` whose dedicated `static/css/store-mode.css` hides the profile info panel, the profile and variant selectors, the rulers/crosshair/keyboard/guidelines/caret toggles, the zoom slider, the margin override fields, and the position readout; rulers, crosshair and guidelines visuals are forced off through the existing checkbox change handlers while the keyboard and caret stay active
|
|
131
|
+
|
|
132
|
+
### Changed
|
|
133
|
+
|
|
134
|
+
* The viewport preview reclaims about 52px of vertical space when the rulers are toggled off: the body now carries a `rulers-off` class that collapses the preview's top reservation from 48px to 8px and the bottom gap from 16px to 4px, so the chrome-free vertical room recovered from the hidden ruler labels feeds straight back to the editing surface instead of sitting empty; the class is flipped through the existing rulers change handler and seeded on initial render from the URL restored value so there is no flash on first paint
|
|
135
|
+
* Special character keys on the on screen keyboard (`Backspace`, `Shift`, `Space`, `Return`) now render the official Lucide `delete`, `arrow-big-up`, `space`, and `corner-down-left` SVG icons inline so they look identical across every platform regardless of the system font's rendering of the matching Unicode codepoints; the keyboard plugin reads the dispatched value from the `data-value` attribute first and falls back to the element text so the existing downstream `keyHandler` switch keeps working unchanged, and the inline SVGs share a consistent `viewBox`, stroke weight and round line caps so they read as a single visual family
|
|
136
|
+
* The confirmation modal preview now sits on a soft tinted card with the spec list rendered as a clean rounded table (`label : value` rows, monospaced segment chips) instead of the previous inline `bold key: value` debug style, the spec rows are tightened (font size, padding, column width) so the contents fit comfortably inside the modal without overflowing
|
|
137
|
+
* `/settings` printing tab now uses a stable scrollbar gutter on the surrounding catalog rail (`scrollbar-gutter: stable`) so the card position does not shift when a long tab causes a scrollbar to appear, the printing inputs use `flex: 1 1 0` plus `min-width: 0` so their intrinsic content width (long URLs in the disabled `Base` pill) cannot push the row past the card boundary, and the card itself no longer caps at `max-height: 560px` so the printing tab can grow vertically to fit all entries
|
|
138
|
+
* `/viewport` `updateUrl` is now an action scoped serializer that takes the change source as an argument (`text`, `profile`, `font`, `font_size`, `zoom`, `margins`, `toggle`, `restore`) and only rewrites the matching URL fragment while preserving the rest of the query string verbatim, so callers no longer recompute the full URL from possibly stale DOM state; the function also bails out early when the viewport editor is not mounted on the current page (`viewer-container` absent) so non viewport pages never accumulate viewport only query parameters in their address bar, with `theme` dropped from the URL writes entirely since it lives in the cookie session
|
|
139
|
+
* `fullscreen` flag is now persisted on the cookie session alongside the other UI preferences, so it survives the next request without having to be forwarded through redirect query strings; every page route reads `req.query.fullscreen` first as an override and falls back to `req.session.fullscreen`, the `/settings` POST stores it on the session and redirects without appending the flag to the target URL, and the front end `updateUrl` no longer writes it back into the address bar
|
|
140
|
+
* Modernized the classic `/gateway` form so it now reuses the same page chrome as welcome / settings / profile manager: the page wrapper changed from `.gateway` to `.welcome`, the form is wrapped by the standard hero (logo, `Gateway` / `Entrada` eyebrow, hairline divider), the form fields moved into a white `.gateway-container` card on the new tinted body (lavender bordered and tinted-shadow in `ldj`), the text inputs and labels now follow the `settings-group` / `settings-group-label` pattern, the Order No. + Size pair lives in a flex `.gateway-row`, the Technology / Elements / Location radio buttons became `option-chips` matching the welcome screen chip language, and the Submit / Configure buttons now sit on a centered `welcome-action-bar` with Submit as the primary `button-start` and Configure as a `button-ghost` secondary
|
|
141
|
+
* Stopped persisting the viewport-only visual toggles (`rulers`, `crosshair`, `keyboard`, `guidelines`, `caret`, `zoom`, `margins`, `font_size`, `font_size_mode`, `font`, `theme`) into the address bar from `updateUrl`, so the address bar on `/viewport` now only carries semantic state (`text`, `profile`, `variant`, `fullscreen`) and these UI level flags can no longer leak into shareable links or downstream pages
|
|
142
|
+
* Removed the welcome screen default template pre-selection so the catalog renders with nothing highlighted and the Start button stays disabled until the user explicitly picks a card; the hidden `profile` input is cleared on each render so a previously chosen template never restores itself
|
|
143
|
+
* Modernized the `/report` view with a tinted page surface, a 2-column grid of soft-fill spec tiles (date, order, size, technology, elements, location, font), a softer card shadow with the new layered palette, and a full-width engraving preview row that spans both columns; LDJ theme picks up the lavender chip / border / shadow tints to keep visual continuity with the rest of the studio
|
|
144
|
+
* Replaced the `Report` text button with an icon-only soft-surface pill in the `/viewport` header (Ionicons `document-text-outline`) to recover header space; the icon button inherits the same theme-aware tint as the other header secondaries (neutral grey default, lavender in `ldj`)
|
|
145
|
+
* Modernized the profile manager dropdown style on `/profiles/manager` with a custom inline-SVG chevron, white resting state with a soft `#e6e8ee` border that deepens on hover and on focus (lavender `#ece4f5` → `#c9b6e5` → `rgba(151, 120, 211, 0.55)` in `ldj`), 12px radius, 40px height, smooth color/border transitions, and a reusable `.manager-select` class shared by both the reference dropdown and the new editor dropdown
|
|
146
|
+
* Modernized the side panel components on `/viewport` (profile info, viewport options, inspirations panel) with the new layered shadow language: borderless 14px radius cards with `0 8px 20px rgba(31, 35, 48, 0.06) + 0 1px 2px rgba(31, 35, 48, 0.04)`, soft pill selects with chevron SVG, soft-fill numeric inputs with theme-aware focus borders, smaller muted eyebrow titles, and a chip-style author badge on the inspirations modal cards
|
|
147
|
+
* Replaced the in-process `express-session` MemoryStore with `cookie-session` so UI preferences survive Node restarts without any server-side storage; the cookie carries non-sensitive UI state only and uses a hardcoded secret to keep dev installs working out of the box
|
|
148
|
+
* Theme aware tinted page canvas plus a frosted glass header (`backdrop-filter: saturate(160%) blur(12px)`) replace the flat white chrome on `/viewport` and the welcome screen, with the lavender body wash and hairline picked up in the `ldj` theme so the floating panels read as real white surfaces on a soft tinted page
|
|
149
|
+
* Smoothed the keyboard show/hide flow on `/viewport`: switching fonts now waits for the leaving keyboard to fade out before the next one fades in (sequential cross fade), the `font` event handler picks the previously visible keyboard once and chains the show onto its leave callback, and `pointer-events: none` on the leaving keyboard prevents accidental clicks during the transition
|
|
150
|
+
* Compacted and modernized the font selector row above the visual keyboards (`.fonts-container`): tiles are now full-pill chips with a soft white fill, no hard border, a subtle resting shadow, lift-on-hover, and a dark filled selected state matching the Engrave button language; in-tile font preview (each label rendered in its own typeface) is preserved, and tile height drops from 46px to 36px (with tighter row margin) so the row reclaims ~20px of vertical real estate
|
|
151
|
+
* Refreshed the visual keyboards (`.keyboard-container`, `.emojis-container`, `.emojisp-container`) with a frosted glass aesthetic: translucent white keys with `backdrop-filter: blur(8px)` and a soft inner highlight, 10px rounded corners, hover deepens the shadow and lifts 1px, active presses in with an inset shadow; the keyboard surface itself now sits in a soft tinted card with a 16px radius and a subtle gradient backdrop so the frosted keys read as floating tiles
|
|
152
|
+
* Introduced a `utility` class on the special keys (`⌫`, `⎵`, `↵`, `⇧`) that gives them a translucent grey fill and slightly smaller glyph so they visually separate from the letter rows, and widened the Space bar from 96px to 220px so it reads like a real keyboard space; the Shift active state picks up a lavender tint that matches the rest of the engraving studio palette
|
|
153
|
+
* Refreshed the welcome catalog template cards to a refined glass card aesthetic for consumer-facing jewelry store users: borderless cards with soft layered shadows that deepen and lift on hover, 16px outer radius with a nested 12px inner image panel carrying an inset highlight, taller 150px image area so the necklace photography breathes, name aligned left next to a soft chip-style dimension badge, and a confident 2px selected ring that replaces the previous thin border (matching purple ring in the `ldj` theme)
|
|
154
|
+
* Refreshed the site-wide button visual language to a softer, rounder feel: full pill `border-radius`, taller comfortable 38px height, breathable horizontal padding, smooth color and press transitions; viewport header `Back`, `Clear` and `Report` buttons now read as soft-surface secondaries (light grey fill) while `Engrave` keeps the dark filled primary treatment, restoring visual hierarchy on the action bar
|
|
155
|
+
* Aligned the surrounding surface chrome with the new rounder language by bumping `.input` and the floating profile info / inspiration panel border radii from 6px to 12px, and re-anchoring the panels under the slightly taller header (78px → 84px / 220px → 226px) so the breathing room above each panel is preserved
|
|
156
|
+
* Welcome action bar `button-ghost` variant now uses the same soft-surface fill instead of a 1px outlined pill so it matches the new system
|
|
157
|
+
* Corrected Cool Emojis character-to-F3S font mapping using visual glyph recognition
|
|
158
|
+
* Sorted `coolemojis.mapping.json` by font number for better structure
|
|
159
|
+
* Line height in viewport preview now scales proportionally to font size (1.2x)
|
|
160
|
+
* Moved profile and font size controls from inline layout to fixed options panel
|
|
161
|
+
|
|
162
|
+
### Fixed
|
|
163
|
+
|
|
164
|
+
* Avoids a split second flash of the legacy dashed text box on the viewport while the profile selector is being restored: the body now carries a `profiles-loading` class at server render time that hides the no profile viewer container, and the class is cleared in a `finally` block once `loadProfiles` resolves so the legacy box only appears after the initial profile state has been settled
|
|
165
|
+
* Hide the floating viewport options panel on `/viewport` in store mode when no profile is selected since every visible field inside it requires an active profile, so the panel no longer renders as an empty chrome card; the rule lives in `static/css/store-mode.css` and relies on the existing `.profile-active` signal so the panel reappears immediately when a profile is picked
|
|
166
|
+
* Stop applying the zoom compensating `margin-bottom` and `margin-right` on the viewport preview when no profile is active, so the extra bottom and right space no longer appears under the empty engraving surface or when entering preview mode without a selected template; detection uses the existing `.profile-active` class on the preview element so every caller of the `zoom` action benefits without per call site changes
|
|
167
|
+
* `text.max_lines` profile constraint now also enforced on programmatic text loads (inspirations, deep-link `?text=…`, session restore) and when the active profile changes, trimming any overflow newlines and emitting a `change` event so the URL state and button state stay in sync
|
|
168
|
+
* Script 4L font glyphs with positive LSB shifted to start at x=0 with adjusted advance widths
|
|
169
|
+
* `/profiles` endpoint now handles async errors through Express error middleware
|
|
170
|
+
* Invalid CSS `background-position` value corrected to valid 2-value syntax
|
|
171
|
+
* Restored text click handler now binds to all non-caret children including newline elements
|
|
172
|
+
* Malformed HTML `style` attribute on space bar keyboard keys (extra double quote)
|
|
173
|
+
* Small-medal profile description now matches actual 20x20mm dimensions
|
|
174
|
+
* Font deselection handler now clears stored font state and updates URL
|
|
175
|
+
* Backspace at caret start position no longer corrupts text state
|
|
176
|
+
* Server-side validation for `preview.zoom` field in profile schema
|
|
177
|
+
* `lang` attribute on Portuguese views (`welcome-pt_pt.ejs`, `gateway-pt_pt.ejs`, `report-pt_pt.ejs`) corrected from `en` to `pt`
|
|
178
|
+
* Welcome catalog `background-image` URLs now pass profile filenames through `encodeURI` to guard against malformed CSS
|
|
179
|
+
|
|
180
|
+
### Removed
|
|
181
|
+
|
|
182
|
+
* `Printer Configuration` modal (`.modal-overlay-config`) from `/viewport` and `/gateway`, along with the matching `Configure` header button on `/gateway` and the `Configure` button inside the error modal that used to open it; the same configuration is now fully owned by the `Printing` tab on `/settings`, the gateway entry point becomes a plain `<a href="/settings">Settings</a>` link, the error modal `Configure` action becomes a plain `<a href="/settings">` link, and the now unused `buttonConfigure` / `buttonSave` plumbing on `main.js` and `plugins/modal.js` (~80 lines) is removed
|
|
183
|
+
|
|
184
|
+
## [0.7.2] - 2024-05-18
|
|
185
|
+
|
|
186
|
+
### Changed
|
|
187
|
+
|
|
188
|
+
* Bumped pstoedit version to 4.01
|
|
189
|
+
|
|
190
|
+
## [0.7.1] - 2024-05-18
|
|
191
|
+
|
|
192
|
+
### Changed
|
|
193
|
+
|
|
194
|
+
* Bumped base nodejs version in `Dockerfile` to 18
|
|
195
|
+
|
|
196
|
+
## [0.7.0] - 2024-05-18
|
|
197
|
+
|
|
198
|
+
### Added
|
|
199
|
+
|
|
200
|
+
* Support for escaping of characters in the key selection
|
|
201
|
+
|
|
202
|
+
### Changed
|
|
203
|
+
|
|
204
|
+
* Added new characters to the `coolemojis.ttf` font
|
|
205
|
+
|
|
206
|
+
### Fixed
|
|
207
|
+
|
|
208
|
+
* Keyboard backspace and space keys issue - [[#4](https://github.com/hivesolutions/signatur/issues/4)]
|
|
209
|
+
|
|
210
|
+
## [0.6.1] - 2022-11-12
|
|
211
|
+
|
|
212
|
+
### Fixed
|
|
213
|
+
|
|
214
|
+
* Keyboard backspace and space keys issue - [[#4](https://github.com/hivesolutions/signatur/issues/4)]
|
|
215
|
+
|
|
216
|
+
## [0.6.0] - 2022-11-08
|
|
217
|
+
|
|
218
|
+
### Added
|
|
219
|
+
|
|
220
|
+
* Support for physical keyboard typing
|
|
221
|
+
|
|
222
|
+
### Fixed
|
|
223
|
+
|
|
224
|
+
* CI/CD integrations to make them compliant with new node versions
|
|
225
|
+
|
|
226
|
+
## [0.5.5] - 2022-11-08
|
|
227
|
+
|
|
228
|
+
### Fixed
|
|
229
|
+
|
|
230
|
+
* Small tilde character in emoji font
|
|
231
|
+
|
|
232
|
+
## [0.5.4] - 2022-11-08
|
|
233
|
+
|
|
234
|
+
### Fixed
|
|
235
|
+
|
|
236
|
+
* Added the new characters to cool emojis fonts
|
|
237
|
+
|
|
238
|
+
## [0.5.3] - 2022-11-08
|
|
239
|
+
|
|
240
|
+
### Changed
|
|
241
|
+
|
|
242
|
+
* Added new versions of `coolemojis.ttf` and `coolemojisp.ttf` fonts - [[#2](https://github.com/hivesolutions/signatur/issues/2)
|
|
243
|
+
|
|
244
|
+
## [0.5.2] - 2022-09-27
|
|
245
|
+
|
|
246
|
+
### Fixed
|
|
247
|
+
|
|
248
|
+
* Removed `graphic_element` from `diamond`
|
|
249
|
+
|
|
250
|
+
## [0.5.1] - 2021-10-17
|
|
251
|
+
|
|
252
|
+
### Added
|
|
253
|
+
|
|
254
|
+
* New symbols added to both the base `coolemojis.ttf` font and the `coolemojisp.ttf`
|
|
255
|
+
|
|
256
|
+
## [0.5.0] - 2021-10-06
|
|
257
|
+
|
|
258
|
+
### Added
|
|
259
|
+
|
|
260
|
+
* Support for the `/image` URL for PNG image generation
|
|
261
|
+
|
|
262
|
+
## [0.4.1] - 2021-09-24
|
|
263
|
+
|
|
264
|
+
### Added
|
|
265
|
+
|
|
266
|
+
* Support in report for calligraphy
|
|
267
|
+
|
|
268
|
+
## [0.4.0] - 2021-09-24
|
|
269
|
+
|
|
270
|
+
### Added
|
|
271
|
+
|
|
272
|
+
* Support for order number, size and observations
|
|
273
|
+
|
|
274
|
+
## [0.3.2] - 2021-08-31
|
|
275
|
+
|
|
276
|
+
### Added
|
|
277
|
+
|
|
278
|
+
* More symbols to the `coolemojis.ttf` font
|
|
279
|
+
|
|
280
|
+
## [0.3.1] - 2021-08-30
|
|
281
|
+
|
|
282
|
+
### Added
|
|
283
|
+
|
|
284
|
+
* Version information to footer
|
|
285
|
+
|
|
286
|
+
### Changed
|
|
287
|
+
|
|
288
|
+
* Bumped packages
|
|
289
|
+
|
|
290
|
+
## [0.3.0] - 2021-08-30
|
|
291
|
+
|
|
292
|
+
### Added
|
|
293
|
+
|
|
294
|
+
* Support for new character for font `coolemojisp.ttf` (V, W, X, Y, Z, a, b, c, d, e, f and g)
|
|
295
|
+
|
|
296
|
+
## [0.2.1] - 2021-07-08
|
|
297
|
+
|
|
298
|
+
### Added
|
|
299
|
+
|
|
300
|
+
* Small touch of files
|
|
301
|
+
|
|
302
|
+
## [0.2.0] - 2021-07-08
|
|
303
|
+
|
|
304
|
+
### Added
|
|
305
|
+
|
|
306
|
+
* Support for display of main font in report and receipt
|
|
307
|
+
* Added new cool emoji icons
|
package/README.md
CHANGED
|
@@ -4,12 +4,188 @@ Simple vector signature service to be used to convert signatures.
|
|
|
4
4
|
|
|
5
5
|
Signatures from the client-side into beautiful files ready to be downloaded.
|
|
6
6
|
|
|
7
|
+
Supported file format include:
|
|
8
|
+
|
|
9
|
+
* [SVG](https://en.wikipedia.org/wiki/Scalable_Vector_Graphics) - Scalable Vector Graphics
|
|
10
|
+
* [PDF](https://en.wikipedia.org/wiki/PDF) - Portable Document Format
|
|
11
|
+
* [HPGL](https://en.wikipedia.org/wiki/HP-GL) - Hewlett-Packard Graphics Language
|
|
12
|
+
|
|
13
|
+
## Features
|
|
14
|
+
|
|
15
|
+
* Canvas based drawing, to be used in signatures
|
|
16
|
+
* Viewport for drawing of text and emoji
|
|
17
|
+
* Uses [canvas2svg](http://gliffy.github.io/canvas2svg) for SVG output
|
|
18
|
+
|
|
19
|
+
## Configuration
|
|
20
|
+
|
|
21
|
+
| Name | Type | Default | Description |
|
|
22
|
+
| ----------------- | ----- | ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
23
|
+
| `BASE_URL` | `str` | `http://localhost:3000` | The base URL that is going to be used in the construction of external URLs for Signatur. |
|
|
24
|
+
| `SIGNATUR_KEY` | `str` | `None` | Secret key that should be passed in protected calls so that the server side "trusts" the client side (authentication). |
|
|
25
|
+
| `HEADLESS_URL` | `str` | `https://headless.stage.hive.pt` | The base URL to be used to access [Headless](https://github.com/hivesolutions/headless). |
|
|
26
|
+
| `PRINT_URL` | `str` | `https://colony-print.stage.hive.pt` | Base URL of the [Colony Print](http://colony-print.hive.pt) service used for both the engraving job and the receipt printing. |
|
|
27
|
+
| `PRINT_NODE` | `str` | `default` | Name of the Colony Print node to use when printing the report receipt. |
|
|
28
|
+
| `PRINT_PRINTER` | `str` | `printer` | Name of the printer (within the receipt node) to use when printing the report receipt. |
|
|
29
|
+
| `PRINT_KEY` | `str` | `null` | Secret key used to authenticate against Colony Print; shared by both the engraving job and the receipt printing. |
|
|
30
|
+
| `ENGRAVE_NODE` | `str` | value of `PRINT_NODE` | Name of the Colony Print node to use when sending an engraving job; falls back to `PRINT_NODE` so existing single-printer deployments keep working. |
|
|
31
|
+
| `ENGRAVE_PRINTER` | `str` | value of `PRINT_PRINTER` | Name of the printer (within the engrave node) to use when sending an engraving job; falls back to `PRINT_PRINTER` for the same backward compat reason. |
|
|
32
|
+
|
|
33
|
+
## Query Parameters
|
|
34
|
+
|
|
35
|
+
The following query parameters are honored by the Signatur HTTP routes. Most of the session level toggles (`theme`, `locale`, `text`, `fullscreen`, etc.) are persisted to the cookie session on first sight and then read from the session on every subsequent request, so they never need to be carried around through the URL once they have been set. The viewport editor still round-trips its visual state through the URL so a `/viewport` link can be shared or bookmarked verbatim, but those keys are scoped to the viewport page and are not propagated to other sections.
|
|
36
|
+
|
|
37
|
+
### Session persistence
|
|
38
|
+
|
|
39
|
+
| Parameter | Session-persisted | Notes |
|
|
40
|
+
| --------------- | :---------------: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
41
|
+
| `theme` | yes | Written to `req.session.theme` on every page that reads it except `/console`, which reads but does not write. |
|
|
42
|
+
| `locale` | yes | Written to `req.session.locale` on every page that reads it. |
|
|
43
|
+
| `text` | yes | Written to `req.session.config.text` on every page that reads it. |
|
|
44
|
+
| `fullscreen` | yes | Written to `req.session.fullscreen` on every page that reads it; the URL query is honored first as a one-shot override and otherwise the session takes over. |
|
|
45
|
+
| `home` | yes | Set via the `/settings` POST body. Controls whether `/` redirects to `/gateway` (default) or `/welcome`. |
|
|
46
|
+
| `show_options` | yes | Set via the `/settings` POST body. Controls whether the technology / elements / location selectors render on welcome and gateway. |
|
|
47
|
+
| `viewport_mode` | yes | Set via the `/settings` POST body. Either `technical` (default) or `store` (simplified `/viewport` for store operators). |
|
|
48
|
+
| `profile` | no | Stored on the session via the `/gateway` POST body (form field), then forwarded as a query string to the editor on redirect. |
|
|
49
|
+
| `variant` | no | Same handling as `profile`. |
|
|
50
|
+
| editor state | no | `font`, `font_size`, `font_size_mode`, `zoom`, `margins`, `rulers`, `crosshair`, `keyboard`, `guidelines`, `caret` are written to the URL by the viewport only, and only while `.viewer-container` is mounted on the page so they never leak into `/welcome`, `/gateway`, `/settings` or any other downstream section. |
|
|
51
|
+
| `engine` | no | Read once per `/convert` POST. |
|
|
52
|
+
| `format` | no | Read once per `/convert` POST. |
|
|
53
|
+
|
|
54
|
+
### Theme and locale
|
|
55
|
+
|
|
56
|
+
| Route | `theme` | `locale` | `fullscreen` |
|
|
57
|
+
| ------------ | :-----: | :------: | :----------: |
|
|
58
|
+
| `/` | yes | yes | yes |
|
|
59
|
+
| `/gateway` | yes | yes | yes |
|
|
60
|
+
| `/welcome` | yes | yes | yes |
|
|
61
|
+
| `/signature` | yes | - | yes |
|
|
62
|
+
| `/viewport` | yes | - | yes |
|
|
63
|
+
| `/report` | yes | yes | yes |
|
|
64
|
+
| `/console` | yes | - | - |
|
|
65
|
+
| `/receipt` | - | yes | - |
|
|
66
|
+
| `/image` | - | yes | - |
|
|
67
|
+
|
|
68
|
+
| Name | Type | Default | Description |
|
|
69
|
+
| ------------ | ----- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
70
|
+
| `theme` | `str` | `""` | Visual theme identifier applied to the body (e.g. `ldj`). Persisted on the session for subsequent requests. |
|
|
71
|
+
| `locale` | `str` | `""` | Locale identifier used to pick a localized view (e.g. `pt_pt`). Persisted on the session and used to load the matching `*-${locale}.ejs`. |
|
|
72
|
+
| `fullscreen` | `str` | `"0"` | When set to `"1"`, enables the `apple-mobile-web-app-capable` meta. Persisted on the session; the URL query is honored as a one-shot override. |
|
|
73
|
+
|
|
74
|
+
### Text payload (`/viewport`, `/report`, `/text`, `/image`, `/receipt`)
|
|
75
|
+
|
|
76
|
+
| Name | Type | Default | Description |
|
|
77
|
+
| ------ | ----- | ------- | -------------------------------------------------------------------------------------------------------------------------- |
|
|
78
|
+
| `text` | `str` | `null` | Serialized text payload to seed the editor or render with (`font/character` pairs). Persisted on the session config field. |
|
|
79
|
+
|
|
80
|
+
### Template pre-selection (`/viewport`, `/report`)
|
|
81
|
+
|
|
82
|
+
Forwarded automatically by the gateway POST when the welcome screen is used, but they can also be passed directly to deep-link into the editor with a specific template.
|
|
83
|
+
|
|
84
|
+
| Name | Type | Default | Description |
|
|
85
|
+
| --------- | ----- | ------- | -------------------------------------------------------------------------------------------------- |
|
|
86
|
+
| `profile` | `str` | `null` | Profile ID (matches a file under `static/profiles/*.json`) to pre-select in the profile dropdown. |
|
|
87
|
+
| `variant` | `str` | `null` | Index of the variant to pre-select within the chosen profile, applied after `profile` is restored. |
|
|
88
|
+
|
|
89
|
+
### Viewport editor state (`/viewport`)
|
|
90
|
+
|
|
91
|
+
Read by the client and written back via `history.replaceState` so the editor URL always reflects the current state and can be shared or reloaded.
|
|
92
|
+
|
|
93
|
+
| Name | Type | Default | Description |
|
|
94
|
+
| ---------------- | ----- | ------- | ------------------------------------------------------------------------------------------------------- |
|
|
95
|
+
| `font` | `str` | `null` | Currently selected font name; restored by clicking the matching font element on load. |
|
|
96
|
+
| `font_size` | `int` | `null` | Manual font size in profile units; applied to both the slider and the number input. |
|
|
97
|
+
| `font_size_mode` | `str` | `null` | Either `manual` or `automatic` for the font size mode toggle. |
|
|
98
|
+
| `zoom` | `int` | `null` | Zoom percentage applied to the viewport preview; clamped to the slider's min/max range. |
|
|
99
|
+
| `margins` | `str` | `null` | Four comma-separated values (`left,right,top,bottom`) overriding the profile padding, in profile units. |
|
|
100
|
+
| `rulers` | `str` | `"1"` | When `"0"` hides the horizontal and vertical rulers; any other value (or absent) keeps them visible. |
|
|
101
|
+
| `crosshair` | `str` | `"1"` | When `"0"` disables the hover crosshair lines on the viewport preview. |
|
|
102
|
+
| `keyboard` | `str` | `"1"` | When `"0"` hides the visual keyboard panel until re-toggled. |
|
|
103
|
+
| `guidelines` | `str` | `"1"` | When `"0"` hides the SVG profile bounds and safe area outlines on the preview. |
|
|
104
|
+
| `caret` | `str` | `"1"` | When `"0"` hides the blinking caret in the viewport preview. |
|
|
105
|
+
|
|
106
|
+
### `/convert`
|
|
107
|
+
|
|
108
|
+
| Name | Type | Default | Description |
|
|
109
|
+
| -------- | ----- | ------------ | ---------------------------------------------------------------------------------------- |
|
|
110
|
+
| `engine` | `str` | `"inkscape"` | Conversion engine identifier; resolved against the registered engines (e.g. `inkscape`). |
|
|
111
|
+
| `format` | `str` | `"hpgl"` | Target output format honored by the inkscape engine; one of `svg`, `pdf`, or `hpgl`. |
|
|
112
|
+
|
|
113
|
+
## Profiles
|
|
114
|
+
|
|
115
|
+
The engraving surfaces (medals, plates, rings, etc.) are described by JSON profile files under `static/profiles/`. The schema of these files (and of their companion `*.inspirations.json` files) is documented in [docs/profile-spec.md](docs/profile-spec.md). The authoritative validator lives in `lib/util/profile.js` and is the source the spec document tracks.
|
|
116
|
+
|
|
117
|
+
## Printing
|
|
118
|
+
|
|
119
|
+
Signatur drives two independent print jobs through Colony Print: the **engraving** job that is sent from the `/viewport` editor and the **receipt** job that is printed from `/report`. Both share the same Colony Print server URL and the same secret key, but each one targets its own node and printer so a single Signatur install can drive an engraver and a receipt printer that live on different physical machines without any name collision.
|
|
120
|
+
|
|
121
|
+
The configuration is resolved through a three step fallback chain so existing single printer deployments keep working without any change:
|
|
122
|
+
|
|
123
|
+
1. **Scenario specific `localStorage` keys** (browser side, highest priority).
|
|
124
|
+
2. **Legacy unprefixed `localStorage` keys** (`node`, `printer`) so installs that predate the engrave/receipt split still see their old configuration.
|
|
125
|
+
3. **Server side environment variables** rendered into the page as `data-*` fallbacks (`PRINT_URL`, `ENGRAVE_NODE`/`ENGRAVE_PRINTER` for the engrave button, `PRINT_NODE`/`PRINT_PRINTER` for the receipt button, `PRINT_KEY` for both).
|
|
126
|
+
|
|
127
|
+
The settings page exposes a `Printing` readout that shows the server side base value next to the effective resolved value for each entry, so an operator can verify at a glance which side is active.
|
|
128
|
+
|
|
129
|
+
### Configuration keys
|
|
130
|
+
|
|
131
|
+
| `localStorage` key | Scenario | Server side fallback | Description |
|
|
132
|
+
| ------------------ | -------- | ----------------------------------------------- | ----------------------------------------------------------------------------------- |
|
|
133
|
+
| `url` | shared | `PRINT_URL` | Colony Print base URL; used by both the engrave and the receipt flows. |
|
|
134
|
+
| `key` | shared | `PRINT_KEY` | Colony Print secret key; used by both the engrave and the receipt flows. |
|
|
135
|
+
| `engrave_node` | engrave | `ENGRAVE_NODE` (defaults to `PRINT_NODE`) | Colony Print node that receives the engrave job (`POST /nodes/<node>/print`). |
|
|
136
|
+
| `engrave_printer` | engrave | `ENGRAVE_PRINTER` (defaults to `PRINT_PRINTER`) | Printer within the engrave node; reserved for the per-printer engrave endpoint. |
|
|
137
|
+
| `receipt_node` | receipt | `PRINT_NODE` | Colony Print node that receives the receipt (`POST /nodes/<node>/printers/print`). |
|
|
138
|
+
| `receipt_printer` | receipt | `PRINT_PRINTER` | Printer within the receipt node. |
|
|
139
|
+
| `node` | legacy | - | Read as a fallback for both `engrave_node` and `receipt_node` so old installs work. |
|
|
140
|
+
| `printer` | legacy | - | Read as a fallback for both `engrave_printer` and `receipt_printer`. |
|
|
141
|
+
|
|
142
|
+
To configure both scenarios from the Browser's JavaScript console:
|
|
143
|
+
|
|
144
|
+
```javascript
|
|
145
|
+
// shared between both scenarios
|
|
146
|
+
localStorage.setItem("url", "https://colony-print.stage.hive.pt");
|
|
147
|
+
localStorage.setItem("key", "${server-key}");
|
|
148
|
+
|
|
149
|
+
// engraving job (the /viewport "Engrave" action)
|
|
150
|
+
localStorage.setItem("engrave_node", "${engrave-node}");
|
|
151
|
+
localStorage.setItem("engrave_printer", "${engrave-printer}");
|
|
152
|
+
|
|
153
|
+
// receipt printing (the /report "Receipt" action)
|
|
154
|
+
localStorage.setItem("receipt_node", "${receipt-node}");
|
|
155
|
+
localStorage.setItem("receipt_printer", "${receipt-printer}");
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
To read the configuration:
|
|
159
|
+
|
|
160
|
+
```javascript
|
|
161
|
+
console.info(localStorage.getItem("url"));
|
|
162
|
+
console.info(localStorage.getItem("key"));
|
|
163
|
+
console.info(localStorage.getItem("engrave_node"));
|
|
164
|
+
console.info(localStorage.getItem("engrave_printer"));
|
|
165
|
+
console.info(localStorage.getItem("receipt_node"));
|
|
166
|
+
console.info(localStorage.getItem("receipt_printer"));
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
The same configuration can also be edited through the `Configure` modal accessible from the gateway and the viewport.
|
|
170
|
+
|
|
171
|
+
## Maintenance
|
|
172
|
+
|
|
173
|
+
### Adding New Emoji
|
|
174
|
+
|
|
175
|
+
To add a new emoji to the system the following steps should be followed:
|
|
176
|
+
|
|
177
|
+
1. Determine the right file name for the new emoji font file (e.g. `coolemojis.ttf` for laser and `coolemojisp.ttf` for pantogrpah)
|
|
178
|
+
2. Place the new font file in the `static/fonts` directory
|
|
179
|
+
3. Add the new emoji "characters" to the `emoji` array in the `viewport.ejs` file
|
|
180
|
+
4. Test the using the local machine `yarn && yarn dev`
|
|
181
|
+
5. Release a new version of the system (Docker Image)
|
|
182
|
+
|
|
7
183
|
## License
|
|
8
184
|
|
|
9
185
|
Signatur is currently licensed under the [Apache License, Version 2.0](http://www.apache.org/licenses/).
|
|
10
186
|
|
|
11
187
|
## Build Automation
|
|
12
188
|
|
|
13
|
-
[](https://github.com/hivesolutions/signatur/actions)
|
|
14
190
|
[](https://www.npmjs.com/package/signatur)
|
|
15
191
|
[](https://www.apache.org/licenses/)
|