Skip to content

Releases: gramlot-org/gramlot

Gramlot 0.3.0 — Components, forms and validation

Choose a tag to compare

@github-actions github-actions released this 17 Oct 15:30

Gramlot 0.3.0 — Components, forms and validation

Gramlot now provides reusable web components authored with the same names and
parameters from Python and JavaScript. Explicit collections pair a browser module
with generated Builder metadata; the core retains Source/Data ownership.

  • Seventeen inputs, shared labelbox, reactive label/style parameters, typed numeric,
    date and time editors, local/callback choices and a date picker.
  • Formlet automatically aligns labels by column; groupBox copies accepted Data as
    TYTX or JSON. Checkbox supports switch mode and a reactive switch color.
  • Built-in button, LED toggle and unified dropdown; html_button remains plain HTML.
  • Field validation retains invalid drafts and the last valid Data, supports local
    rules, transformations, conditions, warnings, callbacks and asynchronous RPC.
  • Mimi/Joanna themes, touch presentation and page device metadata; inspector enum
    editors and clearer calendar/property controls.
  • Shared Builder pointer grammar removes duplicate consumer parsing. Transforms use
    : / :=; legacy automatic ${name} templates are not supported.

Upgrade the core, examples and hosting packages together and rebuild source-checkout
browser assets. See the update and component guides in the public manual. DB/grid
validation, stores, full form persistence and translation services remain separate.

Qualification: 3,544 JS tests; 146 Python tests with one existing expected upstream
failure; Chromium/WebKit component and cross-host gallery checks; clean wheel/npm
installs and strict documentation checks. Firefox could not launch in the local
verification environment and is not claimed as qualified for these new controls.

Gramlot 0.2.20 — Formatting and pointer transforms

Choose a tag to compare

@github-actions github-actions released this 16 Oct 14:51

Gramlot 0.2.20

  • Add gramlot.format(value, options) with numeric patterns, positive/negative/zero sections, named date styles, explicit dtype and Intl-based locale/timezone handling. Null produces empty text without applying a mask.
  • Carry Page locale and timezone to browser startup. Per-call or per-node options override Page settings; absent Page settings use browser defaults. Live HTML text uses format then mask, retaining typed Data. Masks use {} instead of %s.
  • Add attribute pointer suffixes: :template produces text and :=expression retains the result type. {} supplies the leading value and {name} reads another current Source attribute. All attribute inputs are resolved once before use; DOM values are never inputs. Optional {?}/{?name} admit empty strings, not null. Widget value suffixes are rejected.
  • Add expression-local _F calling the owning page formatter. Expressions retain existing activation/CSP/lifecycle rules; no global helper or inverse conversion is introduced.
  • Port the Italian/English natural-language date-expression parser, including Toolbox corpus alignment. Export parseDateExpression with typed result/error declarations.
  • Extend documentation with progressive formatting, binding, CSS/Source/DOM and localization/component design records. Component and localization plans do not imply implemented components or translation services.

Verified locally: 3,453 JavaScript tests, 158 Python tests plus 255 subtests; strict Sphinx, mirrored guides and public link checks. Real Chromium and WebKit checks passed single-file and directory serverless exports, typed editing, templates, expressions and page formatting context. Companion gallery tests passed with the progressive c22 lesson.

Limits: advanced number/date patterns and Decimal formatting remain incomplete. Static rendering applies templates/masks but not Intl formatting; expressions remain browser-owned. Python static variable datapath support is unchanged. Optional slots are for pointer templates, not standalone masks. Existing ${name} behavior remains. Web Components remain a subsequent workstream.

Gramlot 0.2.19 — Plain and delayed buttons

Choose a tag to compare

@github-actions github-actions released this 15 Oct 18:04

Gramlot 0.2.19

  • Add html_button as a distinct Source element that renders a plain native HTML button. It preserves submit/reset and explicit event handling without Gramlot button dispatch or an implicit type.
  • Keep button as the Gramlot behavior-bearing button. Add inherited _delay in milliseconds: rapid clicks restart the wait and produce one execution with the last event and the burst count. Actions/fire receive _counter; nested controllers/RPC receive button_counter.
  • Apply the delay before ask and the selected click mechanism. Cancel pending work on Source removal, disposal or DOM detachment. Preserve immediate-click behavior and the single-mechanism rule.
  • Document the distinction and legacy differences. Companion examples add action/ask, conditional confirmation, Source/DOM references and comparisons between plain, immediate and delayed buttons.

Verified with 608 core JavaScript tests, 137 Python tests and focused native-button/dialog/lifecycle checks. New examples passed Chromium and WebKit on Python and Node hosts and as direct-file serverless exports. Strict documentation builds and links passed. No separate Safari-app or Firefox qualification is claimed. The legacy 200 ms immediate-click disabled guard is not introduced.

Gramlot 0.2.18 — Messaging and shared inspector

Choose a tag to compare

@github-actions github-actions released this 15 Oct 16:43

Gramlot 0.2.18

  • Add page-local publish, subscribe and unsubscribe, declarative subscribe/selfsubscribe handlers, and Source-node publication. Controllers, formulas and RPC reuse their existing execution and cleanup pipeline.
  • Resolve direct authored Source/DOM references from Python and JavaScript at execution time, including after a confirmation dialog. Live references stay local and cannot cross RPC/frame transport.
  • Add direct parent/child publication through postMessage with typed payloads, origin/session checks and explicit readiness. Local subscribers run before forwarding.
  • Add native ask dialogs for button actions and providers, with basic fields, conditions, cancellation and temporary Source/Data cleanup.
  • Share the optional inspector with the Chrome extension through separate inspector and agent package entries. Add Styles, live CSS variable editing, reset and CSS download while retaining Data/Source editing and breakpoints.
  • Expand the practical quick start, CSS/theme guide and messaging documentation. The examples package provides Python-first messaging lessons and a compact inspector icon.

Qualification includes the full JS/Python suites, shared inspector tests, Chromium/WebKit messaging and dialog checks over HTTP/file origins, ordinary-HTTP shipped-runtime checks, and Chrome-extension browser checks. Safari and Google Chrome applications were not separately qualified. No general widget framework, recursive frame broadcast, server/user messaging or combined remote node addressing is introduced.

Gramlot 0.2.17 — HTML/SVG data binding

Choose a tag to compare

@github-actions github-actions released this 14 Oct 21:39

Gramlot 0.2.17

  • Add the reusable Python/JavaScript IndexPage with iframe tabs, a customizable footer, themes and persisted navigation layout preferences.
  • Add root-page app metadata and the overridable manifest endpoint contract. Hosting and static manifest materialization belong to the server packages.
  • Ship the optional Gramlot inspector, with Data/Source selection, property editing and breakpoints, and the bounded temporary components used by it. Add the generic webcomponent declaration.
  • Ship the compact theme and app icon alongside the existing theme assets.
  • Stabilize remote cache snapshots and stale-request cancellation, non-secure HTTP runtime identifiers, and string/null style and class projections.
  • Preserve typed Bag-only Restore: reject JSON objects, lists and scalars before replacing Data. Document recursive Bag initialization.
  • Require the corrected Builders JS dependency and align Bag/TYTX minimum requirements.

Qualification: 580 JavaScript tests; 139 Python tests and 254 subtests. Chromium and WebKit cover binding, style/class, typed file exchange and runtime checks. Additional remote-method enforcement is deferred by the owner; Q2 live Source remote mutation semantics remain undecided. No new Safari UI, Firefox, HTTPS or OS installation claim is made.

Gramlot 0.2.16 — HTML/SVG data binding

Choose a tag to compare

@github-actions github-actions released this 12 Oct 10:48
cce4cd9

Gramlot 0.2.16 adds the two declarative server round trips of the legacy pages: remote, the content of an element built by a @source method, and dataRemote, a Data value computed by an endpoint when it is read.

What changes

  • remote: the attribute remote="<fragment>" on an element, written by the node method remote(name, **params) in Python and remote(name, params) in JS, makes the element's content the fragment of the @source / registerSource method of that name. The call parameters are the attributes remote_<k> (with ^/= pointers). The fragment is requested through gramlot.src.remoteSource at the element's start, again on every change of a ^ parameter and of the Data context; _cachedRemote skips equal parameters, _if/_else stop and cancel the request, _onRemote runs inline after the mount; a failure names the element. The remote attributes never reach the DOM.
  • dataRemote(destination_path, method, cacheTime=None, **params): a Data path that holds a resolver (RpcResolver, a BagResolver of genro-bag) calling the @endpoint method when the path is read and its cache has expired. cacheTime in seconds as in the legacy: < 0 or None once, 0 at every read, > 0 again after that many seconds. A read never waits: it returns the current value and starts the call; the answer is written with the Data event, so ^ consumers are projected; with cacheTime: 0 the answer is written without the event (a value per explicit read, as the legacy's synchronous resolver). A ^ parameter change reloads at once; _if false removes the resolver and keeps the value; a failed load is thrown again naming the declaration.
  • Both leave the exclusion lists of the builders (remote, dataremote). Out of 0.2.16, by decision: lazy loading by DOM visibility, _waitingMessage, the tbody merge, sendInheritedAttributes, _resolved, _fired, the alias data(path, remote=…).
  • Documents: GC-095 §105 (new), §015 and §085; GC-090; GC-210 exclusions row; constitution amendment 11.59.

Upgrading from 0.2.15

  • No protocol change: adapters are unchanged. Fragments are @source methods and values are @endpoint methods, as in 0.2.14.
  • Pages: nothing to change; remote and dataRemote are additions.

Gramlot 0.2.15 — HTML/SVG data binding

Choose a tag to compare

@github-actions github-actions released this 10 Oct 08:53
1708ce7

Gramlot 0.2.15 completes the auth side of the 0.2.14 contract: a Source element whose auth rule the server refuses never reaches the client.

What changes

  • auth="rule" on an element of main or of a @source fragment: when the server serialises the fragment, an element whose rule the evaluator refuses is left out with its subtree; an accepted element is sent without its auth attribute (the rule belongs to the server). GramlotBuilder(auth=…) / {auth} receives the evaluator from GramlotServer; GramlotBuilder.to_tytx() (new, the counterpart of toTytx()) serialises GramlotBuilderBag.authorized_copy(auth) / authorizedCopy(auth). A non-string rule answers application_error. The base server refuses every rule (not_authenticated); a server with the auth capability evaluates it (gramlot-py-server 0.2.7 on Kajenn). Closes #34.
  • Conformance: item 15 of GC-230 §150 checks that a refused element is absent from check_fragment_auth; the former items 15 and 16 are 16 and 17.
  • Docs: GC-230 §030 states the element rule with its citations; GC-095 §100 documents auth on elements; the sentence saying that Source methods were not yet part of the page-writing API is replaced (fragments and endpoints are declared; only the declarative remote attribute is still deferred).

Upgrading from 0.2.14

  • Pages: nothing to change. A page that relied on reading the auth attribute in the browser no longer sees it.
  • Adapters: nothing to change; conformance fixtures gain check_fragment_auth, as the core fixtures do.

Gramlot 0.2.14 — HTML/SVG data binding

Choose a tag to compare

@github-actions github-actions released this 09 Oct 21:45
34a5db6

Gramlot 0.2.14 writes the client/server contract down and realises it: one envelope over one URL, two gramlot-content-types, endpoints, auth closed by default, and the dataRpc data-element.

What changes

  • One URL, one envelope: the client sends {id, pageId, contentType, name, params} as TYTX JSON text to POST /gramlot/rpc, which replaces /gramlot/main and /gramlot/source. contentType is source (a fragment of Source; the whole page is the fragment named main) or data (a value from an endpoint). The response is {id, contentType, value} or {id, contentType, error: {code, name, message}}; outcomes are page_expired, not_found, not_authenticated, not_authorized, application_error. HTTP status codes are left to transport failures. POST /gramlot/close with {pageId} is unchanged.
  • GramlotServer.call(text, owner) (Python call(text, *, owner=None), JS call(text, {owner})) answers the envelope and raises only InvalidRequest; main and source are gone. Options rpc_url / rpcUrl replace main_url+source_url / mainUrl+sourceUrl; the bootstrap config is {pageId, rpcUrl, closeUrl, rootId, capabilities}.
  • Endpoints: Python @endpoint and @endpoint(auth="rule"), JS Page.registerEndpoint('name', {auth}); @source / registerSource take the same auth. The base evaluator evaluate_auth / evaluateAuth knows no identity and answers not_authenticated to any rule; a server with the auth capability overrides it. The element-side exclusion in the builders is #34.
  • Client: HttpTransport replaces MainTransport; gramlot.rpc.call(contentType, name, params) sends the envelope and rejects with RpcError (code, remoteName, message); main and remote fragments go through it.
  • dataRpc(method, result_path=None, timeout=None) enters the grammar and the binding: the Provider pipeline (_if, _delay, _timing, _userChanges, …), latest call wins per node, timeout in milliseconds, inline _onCalling / _onResult / _onError, a dataRpc child of a button runs on click. dataRemote and the remote attribute stay excluded.
  • No request size limit in the contract; MAX_REQUEST_BYTES and the mandatory 413 are gone from the reference adapters.
  • GC-230 is the contract (Part A) with its HTTP, Worker and WebSocket realisations; check_protocol / checkProtocol run its 16-item list, now with a typed value through call. GC-095 §100 documents dataRpc and endpoints; constitution amendment 11.58 records the contract.

Upgrading from 0.2.12

  • Adapters: route POST /gramlot/rpc to call(body_text, owner), answer 200 with its text, 400 on InvalidRequest; drop the main/source routes and the size limit; rename the URL options.
  • Pages: declare endpoints with @endpoint / registerEndpoint; a Python endpoint called from dataRpc declares **kwargs.
  • Client code that imported MainTransport imports HttpTransport; test fakes implement call(text, signal).
  • gramlot-js-server, gramlot-py-server and gramlot-examples are released together with this version.

Gramlot 0.2.12 — HTML/SVG data binding

Choose a tag to compare

@github-actions github-actions released this 08 Oct 09:22
39980e0

Gramlot 0.2.12 renames the server object GramlotServer, gives Python and JS the same server functionality, tells development and deploy apart with GRAMLOT_DEV, and writes the browser protocol down with a conformance check.

What changes

  • Host is now GramlotServer: FileHost → GramlotFileServer, HostCapacity → ServerCapacity, type HostOptions → GramlotServerOptions. Files follow the classes: js/src/adapters/ → js/src/server/, gramlot-server.js, gramlot-file-server.js; Python gramlot_server.py, gramlot_file_server.py. The JS export @gramlot/gramlot/host is now @gramlot/gramlot/gramlot-server; @gramlot/gramlot/server is unchanged.
  • Same functionality in Python and JS: close_all() / closeAll() empties the page registry; the base Page is rejected as a page; a missing Source method raises SourceNotFound; the Source builder is named after the method; every JS error has its own name. In JS, Page.registerSource('m') replaces the free function source(...); Python @source is unchanged.
  • GRAMLOT_DEV: unset = deploy, YES = development, DEBUG = development with the readable runtime; any other value is an error. GramlotFileServer re-reads a page file at each new page open when reload is on (default from GRAMLOT_DEV); page modules are compiled from source. The runtime ships as gramlot.js and gramlot.min.js; runtime_asset() / runtimeAsset() select the file to serve (runtimeAsset returns a URL).
  • GC-230 states the protocol every adapter exposes; check_protocol(base_url, page_path) (Python) and checkProtocol(baseUrl, pagePath) (JS), from gramlot.server and @gramlot/gramlot/server, check it over HTTP.
  • GC-225 records the names: an attribute holding the server is server, or gramlot_server / gramlotServer where the framework already uses server.

Upgrading from 0.2.11

  • Rename the server classes and imports as listed above; there are no aliases.
  • Adapters: call close_all() / closeAll() instead of clearing the page registry; serve the runtime through runtime_asset() / runtimeAsset(); run check_protocol / checkProtocol in their tests.
  • JS pages: Page.registerSource('m') instead of source(Page.prototype.m).
  • gramlot-js-server, gramlot-py-server and gramlot-examples are released together with this version.

Gramlot 0.2.11 — HTML/SVG data binding

Choose a tag to compare

@github-actions github-actions released this 08 Oct 03:35
968fa51

Gramlot 0.2.11 publishes the 0.2.10 runtime on JSR as well.

What changes

  • The typings of Gramlot.window and Gramlot.pagehide use DomWindow and DomEvent, new loose DOM names of dom.d.ts like DomDocument. 0.2.10 named the DOM library types Window and PageTransitionEvent, which JSR does not load, so 0.2.10 reached PyPI and npm but not JSR.
  • No runtime change from 0.2.10.

Upgrading from 0.2.10

  • No change. From 0.2.9 on JSR, read the 0.2.10 release notes: the members of Gramlot moved to the proxies src, rpc, dom, utl.