{"id":25344567,"url":"https://github.com/bitmeal/snackstack-logger","last_synced_at":"2025-04-08T15:20:26.964Z","repository":{"id":57364512,"uuid":"358642508","full_name":"bitmeal/snackstack-logger","owner":"bitmeal","description":null,"archived":false,"fork":false,"pushed_at":"2021-04-19T10:57:40.000Z","size":1401,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-24T00:41:04.240Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bitmeal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-04-16T15:27:04.000Z","updated_at":"2021-04-19T10:57:43.000Z","dependencies_parsed_at":"2022-09-13T21:11:17.614Z","dependency_job_id":null,"html_url":"https://github.com/bitmeal/snackstack-logger","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitmeal%2Fsnackstack-logger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitmeal%2Fsnackstack-logger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitmeal%2Fsnackstack-logger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitmeal%2Fsnackstack-logger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bitmeal","download_url":"https://codeload.github.com/bitmeal/snackstack-logger/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247867362,"owners_count":21009240,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-14T11:36:07.558Z","updated_at":"2025-04-08T15:20:26.940Z","avatar_url":"https://github.com/bitmeal.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🍪snackstack logger 📰\n*Easy logging to **human targets** from anywhere in your Vue/Vuetify application.*\n\n![snackstack sample](https://github.com/bitmeal/snackstack-logger/raw/master/assets/snackstack.gif)\n\u003e 📌 watch stacking order: queuing time vs. deliver order\n\n*snackstack* enables you to log short information to your users, using a snackbar. The logger automatically registers and makes itself available in all Vue components.\n\n## features\n* global logger backend for all Vue components\n* automatic injection into all components\n* prioritizing message delivery: *error* \u003e *warning* \u003e *info*\n\n## install\n```shell\n# using node and bundler\nnpm install snackstack-logger-vuetify-vuex\n```\n```html\n\u003c!-- browser /--\u003e\n\u003cscript src=\"https://unpkg.com/snackstack-logger-vuetify-vuex@^0.1\"\u003e\u003c/script\u003e\n\u003c!-- OR /--\u003e\n\u003cscript src=\"https://cdn.jsdelivr.net/npm/snackstack-logger-vuetify-vuex@0.1.x/bundle/snackstack-logger-vuetify-vuex.umd.min.js\"\u003e\u003c/script\u003e\n```\n\n**depends:**\n\u003e * *Vue*\n\u003e * *Vuetify*\n\u003e * *Vuex*\n## use\n\u003e 📌 provide a *Vuex* instance and store. Vuex store is expected to use default `store` name.\n\n\u003e 📌 for a **full example** take a look at `dev/` and `demo/` directories.\n\n### **init** *snackstack*\n*When using via node and bundler only!*\n```js\n// main.js/index - somewhere you init your Vue root instance\nimport SnackStackLogger from 'snackstack-logger-vuetify-vuex';\nVue.use(SnackStackLogger);\n```\nUsing *snackstack* from a `\u003cscript\u003e`-tag directly in your page will auto install and register. This requires global Vue and Vuex to be available (`window.Vue`, `window.Vuex`).\n### **add** the *snackstack*\n```html\n\u003c!--\n  somewhere between \u003cv-app\u003e...\u003c/v-app\u003e - best @root-level\n/--\u003e\n\u003csnack-stack /\u003e\n```\n\n## config\n### API\n```js\nVue.use(SnackStackLogger, 'loggername')\n```\nWhen installing the plugin to your Vue instance, you may pass an optional string parameter to change the logger *namespace*. Providing `'loggername'` would make the logger available as `loggername.\u003clog|info|warn|error\u003e()`.\n\n### display\nAll properties regarding layout and display are configured as component properties.\n```html\n\u003c!-- default values /--\u003e\n\u003csnack-stack\n  :stacksize=\"2\"\n  :timeout=\"4000\"\n  :deadtime=\"0\"\n  :dark=\"false\"\n  :transparency=\"false\"\n  :buttontext=\"null\"\n/\u003e\n```\n* `stacksize`: size of \"card-stack\", when multiple messages are queued\n* `timeout`: default auto-hide/close timeout\n* `deadtime`: time to hide the whole stack when switching to next message (gives \"pop\"-effect)\n* `dark`: optimize for sites with dark theme; changes stack coloring\n* `transparency`: add transparency to lower cards in stack\n* `buttontext`: text for the *close-button*; default is a close icon (*like:* ❌)\n\n## use\nfrom any Vue component, call logger as below. When logger namespace has been renamed (see above), replace `logger` with new name.\n```js\nlogger.log('info message')\nlogger.info('info message')\nlogger.warn('warning')\nlogger.error('error')\n```\n**example**\n```html\n\u003cv-btn @click=\"logger.info('✨ info message')\"\u003elog\u003c/v-btn\u003e\n```\nlogger is scoped to component instances (not a global variable):\n```js\n// Vue component\n// ...\n  methods: {\n    // ...\n    do_log() {\n      this.logger.log('✨ info message');\n    }\n  }\n// ...\n```\n### advanced usage\nLog methods take either strings or objects as parameters. Using an object, you may use following keys/options:\n* `text` **[required]**: log message\n* `timeout`: timeout in ms for message to auto-hide; `-1` for infinite\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitmeal%2Fsnackstack-logger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbitmeal%2Fsnackstack-logger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitmeal%2Fsnackstack-logger/lists"}