{"_id":"@cat-of-summer/st-script","_rev":"5-dfa410adca9e697236dd2f46a2ea633f","name":"@cat-of-summer/st-script","dist-tags":{"latest":"1.0.6"},"versions":{"1.0.2":{"name":"@cat-of-summer/st-script","version":"1.0.2","license":"MIT","_id":"@cat-of-summer/st-script@1.0.2","maintainers":[{"name":"cat-of-summer","email":"personal.stendec@gmail.com"}],"homepage":"https://github.com/cat-of-summer/ST-script---framework#readme","bugs":{"url":"https://github.com/cat-of-summer/ST-script---framework/issues"},"dist":{"shasum":"0a4567549d581f70a9d11036cf4dcc10683951bd","tarball":"https://registry.npmjs.org/@cat-of-summer/st-script/-/st-script-1.0.2.tgz","fileCount":57,"integrity":"sha512-MWjff0t/LySk9vjBTOKLVtwcSvCzWcVZE25QApJnXIc4PYUyuifISd26ktnPmezyIWRKoWc1bLp7hkLRbue+Yw==","signatures":[{"sig":"MEQCIBROWErWfIup6jsDJtJanLxEubA0Ewv+GLSW68bAzi6qAiABdMlw1bPfZs67+udBphA7CeJBd2sxjJnmKPK6zzCWSQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":545795},"main":"dist/index.esm.min.js","type":"module","module":"dist/index.esm.min.js","exports":{".":"./dist/index.esm.min.js","./*":"./dist/*.esm.min.js","./src/*":"./src/*","./dist/*":"./dist/*"},"gitHead":"b6e007d6f1501c916a9a081534af17cc6ae23e2f","scripts":{"build":"node scripts/build.mjs","prepack":"node scripts/build.mjs","prepare":"node scripts/build.mjs"},"_npmUser":{"name":"cat-of-summer","email":"personal.stendec@gmail.com"},"repository":{"url":"git+https://github.com/cat-of-summer/ST-script---framework.git","type":"git"},"_npmVersion":"10.9.8","description":"Standalone JS classes/components (Modal, App, Typograf  , …), shipped as ESM and IIFE/CDN builds.","directories":{},"_nodeVersion":"22.23.0","publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"esbuild":"^0.24.0"},"_npmOperationalInternal":{"tmp":"tmp/st-script_1.0.2_1782899392000_0.16396736151684954","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@cat-of-summer/st-script","version":"1.0.3","license":"MIT","_id":"@cat-of-summer/st-script@1.0.3","maintainers":[{"name":"cat-of-summer","email":"personal.stendec@gmail.com"}],"homepage":"https://github.com/cat-of-summer/ST-script---framework#readme","bugs":{"url":"https://github.com/cat-of-summer/ST-script---framework/issues"},"dist":{"shasum":"f10a026f67546db6df79b210f735436c898eec7c","tarball":"https://registry.npmjs.org/@cat-of-summer/st-script/-/st-script-1.0.3.tgz","fileCount":55,"integrity":"sha512-vwprcG0jZ9EsXkQBtLMqTLkd1ih6UfDO+oT9J+g1qDh6Anrc0brKUZ4nXZqaDtFIYYH/huvQKLeOHRGMpCmoKQ==","signatures":[{"sig":"MEQCHyGwETFyPtN0FaeNgiZ266EvNYEqddhC1P5gGB7rlpcCIQC+HybFzi+01NOlUS9JkbpuWejMzKEgsxUN4lrLmZe9gg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@cat-of-summer%2fst-script@1.0.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":445460},"type":"module","exports":{"./*":"./dist/*.esm.min.js","./src/*":"./src/*","./dist/*":"./dist/*"},"gitHead":"fb42861fd24a4f850ec5b42c42729a9b264fb5a9","scripts":{"build":"node scripts/build.mjs","prepack":"node scripts/build.mjs","prepare":"node scripts/build.mjs"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:4f10bc9f-9b45-4a71-9ee4-f4b4e614b288"}},"repository":{"url":"git+https://github.com/cat-of-summer/ST-script---framework.git","type":"git"},"_npmVersion":"12.0.1","description":"Standalone JS classes/components (Modal, App, Typograf  , …), shipped as ESM and IIFE/CDN builds.","directories":{},"_nodeVersion":"22.23.1","publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"esbuild":"^0.24.0"},"_npmOperationalInternal":{"tmp":"tmp/st-script_1.0.3_1784726548238_0.872347189139177","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"name":"@cat-of-summer/st-script","version":"1.0.4","license":"MIT","_id":"@cat-of-summer/st-script@1.0.4","maintainers":[{"name":"cat-of-summer","email":"personal.stendec@gmail.com"}],"homepage":"https://github.com/cat-of-summer/ST-script---framework#readme","bugs":{"url":"https://github.com/cat-of-summer/ST-script---framework/issues"},"dist":{"shasum":"315e677b8e8d43f330af63f4621cf33599994ab4","tarball":"https://registry.npmjs.org/@cat-of-summer/st-script/-/st-script-1.0.4.tgz","fileCount":55,"integrity":"sha512-kr0h6dqxYs3QAyLEwtZQQawvWG+3FvzYyuTag5kkCZ6ZjS41I8x5N1SPjssovtGtM5oEnIbuJYaMvFmGnlbT3w==","signatures":[{"sig":"MEUCIQC/OBT54yUBnkIlv+SRd6vT1EZ/CdOKV90o6xqC4sBeKwIgarsF73F1NeoNwkqK/0B3+6zgbqO5/rn5QzZkLb8M32U=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@cat-of-summer%2fst-script@1.0.4","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":445414},"type":"module","exports":{"./*":"./dist/*.esm.min.js","./src/*":"./src/*","./dist/*":"./dist/*"},"gitHead":"5a8c08a1b295a0cdf8274e404e4443507b7c4015","scripts":{"build":"node scripts/build.mjs","prepack":"node scripts/build.mjs","prepare":"node scripts/build.mjs"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:4f10bc9f-9b45-4a71-9ee4-f4b4e614b288"}},"repository":{"url":"git+https://github.com/cat-of-summer/ST-script---framework.git","type":"git"},"_npmVersion":"12.0.1","description":"Standalone JS classes/components (Modal, App, Typograf  , …), shipped as ESM and IIFE/CDN builds.","directories":{},"_nodeVersion":"22.23.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"esbuild":"^0.24.0"},"_npmOperationalInternal":{"tmp":"tmp/st-script_1.0.4_1784730072985_0.6510584618030779","host":"s3://npm-registry-packages-npm-production"}},"1.0.5":{"name":"@cat-of-summer/st-script","version":"1.0.5","license":"MIT","_id":"@cat-of-summer/st-script@1.0.5","maintainers":[{"name":"cat-of-summer","email":"personal.stendec@gmail.com"}],"homepage":"https://github.com/cat-of-summer/ST-script---framework#readme","bugs":{"url":"https://github.com/cat-of-summer/ST-script---framework/issues"},"dist":{"shasum":"d73118c930612823d6609e3b2bce5b6956170f25","tarball":"https://registry.npmjs.org/@cat-of-summer/st-script/-/st-script-1.0.5.tgz","fileCount":56,"integrity":"sha512-yRP1xfJxJY1MtOvEA1lCB3wSIv78sJMPeQ8sif/GN+y2mOKoukxwXIMHh+DngtXOwEyLVN6+PMvAHy9JNKgwdw==","signatures":[{"sig":"MEUCIQDvFq2FgMVX0cOBX+FSKhahz9ahxuDZm9DnEVOyTgpEWAIgQP54SGxoyzdWCcwTIUue+ZqWeIDmc6XcA6SPuKdY3g4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEQCICc9qInEtA5RvNEyrsZ2DbdO6fXYz1b9+8yjy29D++aBAiAA29l1iUogVj3tnXvWobrtt2Ao70q6eJqGb4ogPMCWSw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@cat-of-summer%2fst-script@1.0.5","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":457389},"type":"module","exports":{"./*":"./dist/*.esm.min.js","./src/*":"./src/*","./dist/*":"./dist/*"},"gitHead":"f1d7624086524451b016f99704d55f9cea9e779f","scripts":{"build":"node scripts/build.mjs","prepack":"node scripts/build.mjs","prepare":"node scripts/build.mjs"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:c2b11d75-0471-4254-a807-84c7616263f0"}},"repository":{"url":"git+https://github.com/cat-of-summer/ST-script---framework.git","type":"git"},"_npmVersion":"12.1.0","description":"Standalone JS classes/components (Modal, App, Typograf  , …), shipped as ESM and IIFE/CDN builds.","directories":{},"_nodeVersion":"24.21.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"esbuild":"^0.24.0"},"_npmOperationalInternal":{"tmp":"tmp/st-script_1.0.5_1790408709245_0.9967446969020759","host":"s3://npm-registry-packages-npm-production"}},"1.0.6":{"_id":"@cat-of-summer/st-script@1.0.6","bugs":{"url":"https://github.com/cat-of-summer/ST-script---framework/issues"},"dist":{"shasum":"c1bd206b554240bdb4f903f01644a0fa4780dc69","tarball":"https://registry.npmjs.org/@cat-of-summer/st-script/-/st-script-1.0.6.tgz","fileCount":88,"integrity":"sha512-HkDTYMxY6RLaP9dpE1vub3IOkdyCaomHoW/b29RcqoRmtITBtriPEyrBoY1kSn+/s9kEO/2NfnzkiUScI5ENfg==","signatures":[{"sig":"MEYCIQDaKZ/CzRxw5kuItxYuayeYMwyRaoommgCPrPRPHIhi6QIhAJbohCbPfcQSrj6ooxYOOOiN/KzcdUMOaKrUXXMT4Bgg","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIDs8VR5T6T9qBsjXL2wcV2qx/2nOH8bO2Pp6/j2BcfkpAiBqpB4q3rl0AeI8RlQDZIg1ahYl1o4rnDRErZtYEjeT4Q=="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@cat-of-summer%2fst-script@1.0.6","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":1267705},"name":"@cat-of-summer/st-script","type":"module","exports":{"./*":"./dist/*.esm.min.js","./src/*":"./src/*","./dist/*":"./dist/*"},"gitHead":"b1c46078c62cba042c87a73da6ff93ac83cf55bc","license":"MIT","scripts":{"build":"node scripts/build.mjs","prepack":"node scripts/build.mjs","prepare":"node scripts/build.mjs"},"version":"1.0.6","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:c2b11d75-0471-4254-a807-84c7616263f0"}},"homepage":"https://github.com/cat-of-summer/ST-script---framework#readme","repository":{"url":"git+https://github.com/cat-of-summer/ST-script---framework.git","type":"git"},"_npmVersion":"12.1.0","description":"Standalone JS classes/components (Modal, App, Typograf  , …), shipped as ESM and IIFE/CDN builds.","directories":{},"maintainers":[{"name":"cat-of-summer","email":"personal.stendec@gmail.com"}],"_nodeVersion":"24.21.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"esbuild":"^0.24.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/st-script_1.0.6_1790518187004_0.22664344456865515"}}},"time":{"created":"2026-07-01T09:49:51.840Z","modified":"2026-09-27T14:09:47.472Z","1.0.2":"2026-07-01T09:49:52.131Z","1.0.3":"2026-07-22T13:22:28.429Z","1.0.4":"2026-07-22T14:21:13.237Z","1.0.5":"2026-09-26T07:45:09.312Z","1.0.6":"2026-09-27T14:09:47.141Z"},"bugs":{"url":"https://github.com/cat-of-summer/ST-script---framework/issues"},"license":"MIT","homepage":"https://github.com/cat-of-summer/ST-script---framework#readme","repository":{"url":"git+https://github.com/cat-of-summer/ST-script---framework.git","type":"git"},"description":"Standalone JS classes/components (Modal, App, Typograf  , …), shipped as ESM and IIFE/CDN builds.","maintainers":[{"name":"cat-of-summer","email":"personal.stendec@gmail.com"}],"readme":"# ST-script\n\nStandalone JavaScript classes / components, authored as ES modules and shipped in\ntwo flavours per module:\n\n- **ESM** (`*.esm.min.js`) — for `import` (npm bundlers, `<script type=\"module\">`).\n- **IIFE / global** (`*.min.js`) — for a plain CDN `<script defer>` (exposes a\n  global named after the module).\n\n| Module                | Global / element    | Notes                                            |\n| --------------------- | ------------------- | ------------------------------------------------ |\n| `st_modal`            | `window.Modal`      | Modal windows.                                   |\n| `st_typograf`         | `window.st_typograf`| Typography fixer.                                |\n| `st_cookie`           | `window.Cookie`     | Cookie helpers.                                  |\n| `st_system`           | `window.st_system`  | Utilities (`merge`, `generate_*`).               |\n| `st_observer`         | `window.st_observer`| IntersectionObserver wrapper.                    |\n| `toggle`              | `window.Toggle`     | State toggler (accordions, switches, hover-menus).|\n| `select`              | `window.Select`     | Custom `<select>` dropdown (hooks, multiple, hover).|\n| `mask`                | `window.Mask`       | Input masks (телефон, дата, карта, ИНН, …).       |\n| `uploader`            | `window.Uploader`   | File uploader.                                   |\n| `st_validator`        | `window.st_validator`| Form/field validation.                          |\n| `st_button_widget`    | `window.st_button_widget`| Floating button widget.                     |\n| `st_links_widget`     | `window.st_links_widget`| Links widget.                                |\n| `loader`              | `window.Loader`     | Ajax list loader (cards: подгрузка/фильтр/сортировка) via `Core.fetch`. |\n| `st_app`              | `<st-app>` element  | **Web Component** — `<script defer>` only (self-registers). |\n| `st_app/form`         | `window.Form`       | Form app **config object** — register with `App.create(form)`; no `st_app` bundled. |\n\n> `st_widget` / `st_widget/button` are work-in-progress stubs (no output yet).\n\n## Development\n\n```bash\nnpm install      # installs esbuild, builds dist/ via the prepare script\nnpm run build    # compile src/ → dist/*.min.js (ESM + IIFE)\nnpm run watch    # rebuild on change\n```\n\nSource layout — **every `src/**/index.js` is a bundle**; its folder path becomes\nthe output name:\n\n```\nsrc/\n  index.js                 # aggregate barrel → re-exports every module\n  st_modal/index.js        # → dist/st_modal.esm.min.js + dist/st_modal.min.js\n  st_app/index.js          # → dist/st_app.{esm.min,min}.js\n  st_app/form/index.js      # → dist/st_app/form.{esm.min,min}.js\n  …\n```\n\n**Conventions** (`scripts/build.mjs` relies on these — no script edits to extend):\n\n- A folder with an `index.js` is a *bundle*; drop `src/<name>/index.js` and it is\n  built automatically into `dist/<name>.esm.min.js` (ESM) and `dist/<name>.min.js`\n  (IIFE global, default export unwrapped onto `window.<name>`).\n- A file or folder whose name starts with `_` is shared content (a partial),\n  imported via `import` and never built on its own.\n\n`dist/` is generated and git-ignored. It is built on `npm install` (`prepare`),\non `npm publish` (`prepack`), and in CI to attach release artifacts.\n\nEvery bundle ships with a linked source map (`*.min.js.map`, sources embedded), so\nDevTools show the original code. The unminified ESM sources are also published as\nis: `import Modal from '@cat-of-summer/st-script/src/modal/index.js'`.\n\n## A. Use via npm\n\nПакет опубликован в GitHub Packages (приватный реестр). Для установки нужен\nread-only токен GitHub.\n\n### 1. Получить токен\n\nGitHub → Settings → Developer settings → Fine-grained personal access tokens → Generate new token:\n\n- **Repository access**: `cat-of-summer/ST-script---framework`\n- **Permissions**: `read:packages`\n\n### 2. Скопировать `.npmrc` в проект потребителя\n\nСкопируйте файл `.npmrc` из корня этого репозитория к себе в проект — токен уже вписан.\n\n### 3. Установить\n\n```bash\nnpm install @cat-of-summer/st-script\n```\n\n### 4. Использовать\n\nPer-module (рекомендуется — только то, что нужно):\n\n```js\nimport st_modal from '@cat-of-summer/st-script/st_modal';\nimport st_typograf from '@cat-of-summer/st-script/st_typograf';\n\nconst modal = new st_modal({ content: '#promo', overlay: true });\n```\n\nИли весь пакет через barrel-экспорт:\n\n```js\nimport { st_modal, st_cookie, App } from '@cat-of-summer/st-script';\n```\n\nWeb Component регистрирует себя при импорте:\n\n```js\nimport App from '@cat-of-summer/st-script/st_app';\nimport formConfig from '@cat-of-summer/st-script/st_app/form';\nApp.create(formConfig);   // теперь работает <st-app app=\"form\">\n```\n\n## Releasing\n\nReleases are triggered by **pushing a tag** (not by ordinary pushes):\n\n```bash\n# bump \"version\" in package.json, commit, then:\ngit tag v0.1.0\ngit push origin v0.1.0\n```\n\n`.github/workflows/release.yml` builds `dist/` and creates a GitHub Release with\nthe configured artifacts. Ordinary pushes run `ci.yml`, which validates the build.\nBoth are driven by repository **environment variables** (Settings → Environments\n→ your branch):\n\n- `BUILD_COMMAND` = `npm ci && npm run build`\n- `RELEASE_FILES` = `dist/*` (files attached to the release)\n- `CI_COMMAND` (optional) — extra checks/tests in CI.\n\n## Examples\n\nSee `examples/` for runnable HTML pages. `examples/cdn-demo.html` exercises both\nthe ESM and the IIFE/global builds from `dist/`.\n","readmeFilename":"README.md"}