// @requirements REQ-PRODUCT-FORM-PERMISSIONS REQ-PRODUCT-MOBILE REQ-PRODUCT-DEMO-WORKSPACE import {reactPermissionFiles} from './react-build.mjs'; import {readFile} from 'node:fs/promises'; import {formPermissionExample} from './example.mjs'; import {renderLegalLinks} from 'notabenda'; const attribute=value=>value.replaceAll('&','&').replaceAll('"','"').replaceAll('<','<').replaceAll('>','>'); export async function formPermissionFiles(base){ const {build,offer,retained}=formPermissionExample(base); const files={...retained,...build.files,'form-permissions/offer.json':JSON.stringify(offer),'assets/form-permissions.mjs':await readFile(new URL('./client.mjs',import.meta.url),'utf8'),'assets/form-permissions.css':await readFile(new URL('./style.css',import.meta.url),'utf8')}; for(const dark of [false,true]){ const route=dark?'dark/form-permissions':'form-permissions'; files[route+'/index.html']=`Email permissions · Juniper Notes
Juniper Notes

Notabenda · Form permissions

Choose whether to
receive updates

Keep the ordinary task and the optional permission separate. A saved choice carries its purpose, channel and policy version with it.

01 / YOUR READING SPACE

Juniper Notes account

Email destination reader@example.test

Preparing permission controls…

A local draft. Email permission is recorded separately.

02 / THE RECORDED STATE

Permission and recording status

Email updates
Not checked
Choice revision
—
Permission version
—
Last acknowledged action
None this visit

A checked box is a draft. Permission changes only when its recording is acknowledged. Leaving the box unchecked or preparing the workspace draft changes no saved permission.

Open permission history ${dark?'Light':'Midnight'} theme
Follow the integration

The host binds the destination and contact generation, authorizes the request, and evaluates current state before any downstream action.

This example records choices in your session workspace; it sends no email.

React example ↗Astro example ↗Form permission guide ↗
`; } Object.assign(files,await reactPermissionFiles(offer,files)); return files; }