buzzcasting-utils
v1.14.2
Published
Shared types, constants, and helper functions for the BuzzCasting front-end stack — consumed by `buzzcasting-app`, `buzzcasting-storage`, and every tenant repo (`admo`, `aramco`, `axa`, `axagroup`, `bayer`, `chanel`, `cplus`, `ksa-moh`, …). This package h
Readme
buzzcasting-utils
Shared types, constants, and helper functions for the BuzzCasting front-end stack — consumed by buzzcasting-app, buzzcasting-storage, and every tenant repo (admo, aramco, axa, axagroup, bayer, chanel, cplus, ksa-moh, …). This package has no components and no runtime state of its own; it's the shared vocabulary the rest of the stack is built on.
BuzzCasting Social Media Wall & Dataviz — more info.
What's in here
src/
├── interfaces/ TypeScript interfaces — every data shape moved between the backoffice API, storage, and the UI
├── enums/ API, CSS, EVENTS, MODERATION, ShapeType, STORAGE — shared string constants
└── utils/ small, mostly-pure helper functions (JSON↔HTML conversion, id generation, logging, formatting, ...)All three are re-exported from the package root:
import { IQuery, IResponse, ISeries } from 'buzzcasting-utils' // interfaces
import { API, CSS, EVENTS, STORAGE } from 'buzzcasting-utils' // enums
import { html2json, json2html, uniq, log, hashSum } from 'buzzcasting-utils' // utilsDocumentation
docs/ is typedoc-generated API reference (regenerated by npm run docs, overwritten every time — don't hand-edit it). Hand-written architecture guides live in documentation/ instead:
- documentation/architecture.md — the three folders, what each shared enum's real job is, and why the
Window.__bctype this package declares isn't the real shape (buzzcasting-app's own, much richer one is). - documentation/html-json-conversion.md —
html2json/json2html(window.__bc.h2j/.j2h), the algorithm behind how a slide's builder-authored JSON round-trips to real HTML. - documentation/type-inconsistencies.md — where a declared type disagrees with how it's actually used at runtime (most importantly
ISeries.items), and which of several overlapping "same concept" interfaces (response envelopes, layout trees) is the one that actually matters. - documentation/known-issues.md — confirmed bugs (e.g.
rtl()/dir()disagreeing about Malayalam) and utility functions that have been forked and quietly diverged elsewhere in the stack (flatten,intToString,sendEvent). - documentation/release-process.md —
npm run releasebumps/tags/pushes locally, but the actualnpm publishnow happens in CI on that tag push (via npm Trusted Publishing/OIDC, no stored token) - what to do if a release run fails.
Development
npm run dev # vite dev server
npm run build # tsc && vite build -> dist/
npm test # vitest --run
npm run test:watch
npm run test:coverage
npm run lint # eslint . --fix
npm run docs # regenerate docs/ (typedoc)
npm run release # bump version, changelog, tag, push - CI publishes to npmGit Clone
git clone https://github.com/TouchFlows/buzzcasting-utils.git
cd buzzcasting-utils
npm installLicense
This template was created under the MIT License.
