Registry / web-framework / tma-frontend-framework

tma-frontend-framework

JSON →
library1.0.59jsnpmunverified

A lightweight frontend framework for building single-page applications (SPAs) with hash-based routing, JWT authentication, REST API helper, custom alert system, confirm dialog component, and autocomplete input. Version 1.0.59, distributed via npm. Key differentiators: minimalistic design targeting developers who need a simple, unopinionated toolkit without the overhead of larger frameworks like React or Vue. Includes a DataDriverInput component with async data loading and filtering. Requires Webpack for bundling. Documentation is primarily in Russian. Last updated in 2025.

npm install tma-frontend-framework
INSTALL
IMPORT
SIG · TMA-FRONTEND-FRAME
T
tma-frontend-framework
web-frameworkjavascriptv1.0.59
Install
—
Import
—
Disk
—
Pass rate
0/ 6
Env Coverage0 / 6
glibc
18–22
musl
18–22
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18–223 runs
build_error
glibc
node 18–223 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Router
✓ import { Router } from 'tma-frontend-framework'
✗ import Router from 'tma-frontend-framework'
Named export, not default. Only ESM supported.
ApiHelper
✓ import { ApiHelper } from 'tma-frontend-framework'
✗ const ApiHelper = require('tma-frontend-framework')
Named export. ESM only; no CommonJS support.
DataDriverInput
✓ import { DataDriverInput } from 'tma-frontend-framework'
Named export for the autocomplete input component.
Alert functions (e.g., showAlert)
✓ import { showAlert } from 'tma-frontend-framework'
✗ import { Alert } from 'tma-frontend-framework'
Custom alert functions are exported individually; no Alert class.
Confirm component
✓ import { Confirm } from 'tma-frontend-framework'
✗ import Confirm from 'tma-frontend-framework'
Named export for the confirm dialog component.

Shows basic usage of Router, ApiHelper, and DataDriverInput to set up routing, authenticated API calls, and autocomplete input.

import { Router } from 'tma-frontend-framework'; import { ApiHelper } from 'tma-frontend-framework'; import { DataDriverInput } from 'tma-frontend-framework'; // Define routes const routes = { '/': () => console.log('Home'), '/about': () => console.log('About'), }; const router = new Router(routes); router.init(); // API helper const api = new ApiHelper(); async function getData() { const token = await api.login('/auth', 'user', 'pass'); const data = await api.request('/data', 'GET'); console.log(data); } // DataDriverInput const input = new DataDriverInput({ dataLoader: async (query) => { const res = await fetch('/api/items?q=' + query); return res.json(); }, maxItems: 10, inputElement: document.getElementById('my-input'), }); input.init();
Debug
Known issues
gotchaRouter uses hash-based routing (e.g., #/) but does not support history API or non-hash paths.
fix
Ensure URLs are structured as #/path or configure server for hash routing.
affects: >=1.0.0
gotchaAll components and functions are destructured from the package; there is no default export.
fix
Use named imports: import { Router } from 'tma-frontend-framework'.
affects: >=1.0.0
gotchaPackage depends on Webpack and CSS loaders for bundling; not pre-compiled.
fix
Install webpack, css-loader, style-loader and configure a webpack config.
affects: >=1.0.0
Errors
Common errors & fixes
import { Router } from 'tma-frontend-framework'; TypeError: Router is not a constructor
Using default import instead of named import.
fix
Change to: import { Router } from 'tma-frontend-framework';
Uncaught SyntaxError: The requested module 'tma-frontend-framework' does not provide an export named 'default'
Attempting to import as default export, which does not exist.
fix
Use named exports like: import { Router, ApiHelper } from 'tma-frontend-framework';
Module not found: Error: Can't resolve 'tma-frontend-framework'
Missing npm install or incorrect path.
fix
Run: npm install tma-frontend-framework
Uncaught TypeError: Cannot read properties of undefined (reading 'login')
ApiHelper instance not created with 'new' keyword.
fix
Use: const api = new ApiHelper();
Upgrade
Version history
1.0.59latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
21 hits · last 30 days
node
18
OpenAI (training)
1
Resources
tma-frontend-framework — npm install tma-frontend-framework · libregistry