{"id":25300115,"url":"https://github.com/deftio/yackbox","last_synced_at":"2025-04-06T23:40:36.000Z","repository":{"id":232273922,"uuid":"783910651","full_name":"deftio/yackbox","owner":"deftio","description":"yackbox is a simple vanilla (no dependancies) JavaScript chat control that can be easily integrated into web applications. It provides a customizable chat interface with support for adding, updating, and removing messages, along with multi-user support and message history controls","archived":false,"fork":false,"pushed_at":"2024-04-13T00:40:34.000Z","size":100,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-04-13T02:56:00.323Z","etag":null,"topics":["chat-control","chatbot","chatui","javascript"],"latest_commit_sha":null,"homepage":"https://deftio.github.io/yackbox","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/deftio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-04-08T20:20:05.000Z","updated_at":"2024-04-14T22:37:11.516Z","dependencies_parsed_at":"2024-04-14T22:36:52.198Z","dependency_job_id":null,"html_url":"https://github.com/deftio/yackbox","commit_stats":null,"previous_names":["deftio/yackbox"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deftio%2Fyackbox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deftio%2Fyackbox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deftio%2Fyackbox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deftio%2Fyackbox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deftio","download_url":"https://codeload.github.com/deftio/yackbox/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247569130,"owners_count":20959758,"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":["chat-control","chatbot","chatui","javascript"],"created_at":"2025-02-13T05:38:26.489Z","updated_at":"2025-04-06T23:40:35.981Z","avatar_url":"https://github.com/deftio.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# yackbox.js \n~ ~ note: alpha version frequent changes ~ ~ \nyackbox is a simple vanilla (no dependancies) JavaScript chat control that can be easily integrated into web applications. It provides a customizable chat interface with support for adding, updating, and removing messages, along with multi-user support and message history controls.\n\n## Features\nAdd messages with customizable user and alignment options.\nUpdate existing messages with new content.\nRemove messages from the chat interface.\nRetrieve the chat log.  Log contains timestamps for all messages.\nCallback function for message events.\nResponsive design for various screen sizes.\n\n## Installation\nTo use yackbox in your project, follow these steps:\n\nInclude the yackbox.js JavaScript file in your project.\nLink the yackbox.css stylesheet to style the chat interface.\nhtml\n\n```html\n\u003cscript src=\"./path/to/yackbox.js\"\u003e\u003c/script\u003e\n\u003clink rel=\"stylesheet\" href=\"yackbox.css\"\u003e\n```\n\nCreate a container element in your HTML where you want the chat interface to appear:\n```html\n\u003cdiv id=\"chat-container\"\u003e\u003c/div\u003e\n```\n\nInitialize yackbox in your JavaScript code by providing the container element and a callback function for message events:\n```javascript\nconst chat = new yackbox('#chat-container', messageCallback);\n//Use the provided methods to interact with the chat control:\n\n// Add a message\nchat.addMessage('Hello!', 'User', 'left');  // user should appear left or right justified\n\n// Update a message\nchat.updateMessage(1, 'New content');\n\n// Remove a message\nchat.removeMessage(1);\n\n// Get the chat log\nconst log = chat.getLog();\nconsole.log(log);\n```\n\n## Usage\nYackbox is highly customizable and can be integrated into various web applications. You can modify the appearance and behavior of the chat interface by adjusting the CSS styles and JavaScript code according to your requirements.\n\n\n## Examples\nIncluded are several examples including:\n[Example Code](./examples/index.html)\n* UMD and ESM usage in browser\n* Multiuser and multiple instance setups\n* Using message history and stats\n* Streaming and completions based LLM use\n\n## Building from Source\nMake sure to run npm install.  Then run npm run build.\nNote that at run time yackbox has no dependancies, but at build time several tools are used for packing and minifying code.\n\n## Contributors\n\n## License\nyackbox is licensed under the BSD-2 License.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeftio%2Fyackbox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeftio%2Fyackbox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeftio%2Fyackbox/lists"}