{"id":22650011,"url":"https://github.com/pauliorandall/p46","last_synced_at":"2026-02-14T08:32:50.530Z","repository":{"id":246652138,"uuid":"821758679","full_name":"PaulioRandall/p46","owner":"PaulioRandall","description":"A modular GUI tool for composing P45 icons.","archived":false,"fork":false,"pushed_at":"2024-07-04T21:13:29.000Z","size":319,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"trunk","last_synced_at":"2025-10-09T05:38:43.279Z","etag":null,"topics":["gui","icons","modular","svelte","svg"],"latest_commit_sha":null,"homepage":"","language":"Svelte","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PaulioRandall.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-29T10:57:50.000Z","updated_at":"2024-07-04T21:13:15.000Z","dependencies_parsed_at":"2024-06-29T12:22:54.920Z","dependency_job_id":"1fbc9500-2d89-44a4-a89a-e54318799f2b","html_url":"https://github.com/PaulioRandall/p46","commit_stats":null,"previous_names":["pauliorandall/p46"],"tags_count":2,"template":false,"template_full_name":"PaulioRandall/svelte-lib-template","purl":"pkg:github/PaulioRandall/p46","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PaulioRandall%2Fp46","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PaulioRandall%2Fp46/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PaulioRandall%2Fp46/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PaulioRandall%2Fp46/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PaulioRandall","download_url":"https://codeload.github.com/PaulioRandall/p46/tar.gz/refs/heads/trunk","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PaulioRandall%2Fp46/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29440416,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-14T07:24:13.446Z","status":"ssl_error","status_checked_at":"2026-02-14T07:23:58.969Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["gui","icons","modular","svelte","svg"],"created_at":"2024-12-09T08:30:00.505Z","updated_at":"2026-02-14T08:32:50.513Z","avatar_url":"https://github.com/PaulioRandall.png","language":"Svelte","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Made to be Plundered](https://img.shields.io/badge/Made%20to%20be%20Plundered-royalblue)\n[![Latest version](https://img.shields.io/github/v/release/PaulioRandall/p46)](https://github.com/PaulioRandall/p46/releases)\n[![Release date](https://img.shields.io/github/release-date/PaulioRandall/p46)](https://github.com/PaulioRandall/p46/releases)\n\n# P46\n\nA modular GUI tool for composing P45 icons.\n\nThe core component is `\u003cP46\u003e`. Every other component is slotted within it somewhere.\n\n**Requires Svelte version 4.**\n\n## Made to be Plundered\n\nFork, pillage, and plunder! Do whatever as long as you adhere to the project's permissive MIT license.\n\n## Components\n\n### `\u003cAxis\u003e`\n\nSlotted into a `\u003cP46\u003e` component to add axis to the grid.\nSlot the `\u003cAxisToggle\u003e` component into a `\u003cP46\u003e` _before-grid_\nslot to allow feature toggling.\n\n```svelte\n\u003cAxis /\u003e\n```\n\n### `\u003cAxisToggle\u003e`\n\nSlotted into a `\u003cP46\u003e` component _before-grid_ slot to enable\ntoggling of the `\u003cAxis\u003e` component if it's used.\n\n```svelte\n\u003cAxisToggle /\u003e\n```\n\n### `\u003cConsole\u003e`\n\nSlotted into a `\u003cP46\u003e` component _after-grid_ slot\nso users can add, remove, and modify shapes\nwithin the grid.\n\n```svelte\n\u003cConsole /\u003e\n```\n\n### `\u003cCopyCoordsButton\u003e`\n\nSlotted into a `\u003cP46\u003e` component _before-grid_ slot\nso users view the currently selected node and,\nupon click, copy the node to clipboard.\n\n```svelte\n\u003cCopyCoordsButton /\u003e\n```\n\n### `\u003cDownloadSvgButton\u003e`\n\nSlotted into a `\u003cP46\u003e` component _before-grid_ slot\nso users can download the SVG.\n\n```svelte\n\u003cDownloadSvgButton /\u003e\n```\n\n### `\u003cGuidelines\u003e`\n\nSlotted into a `\u003cP46\u003e` component to add guidelines to the grid.\nSlot the `\u003cGuidelinesToggle\u003e` component into a `\u003cP46\u003e` _before-grid_\nslot to allow feature toggling.\n\n```svelte\n\u003cGuidelines /\u003e\n```\n\n### `\u003cGuidelinesToggle\u003e`\n\nSlotted into a `\u003cP46\u003e` component _before-grid_ slot to enable\ntoggling of the `\u003cGuidelines\u003e` component if it's used.\n\n```svelte\n\u003cGuidelinesToggle /\u003e\n```\n\n### `\u003cHeaderRow\u003e`\n\nSlotted into a `\u003cP46\u003e` component _before-grid_ slot\nto organise a row of header controls.\n\n```svelte\n\u003c!-- Controls to be slotted, e.g. `\u003cAxis\u003e`, `\u003cDownloadSvgButton\u003e`, etc. --\u003e\n\u003cslot /\u003e\n```\n\n```svelte\n\u003cHeaderRow\u003e\n  \u003cdiv /\u003e\n\u003c/HeaderRow\u003e\n```\n\n### `\u003cP46\u003e`\n\n`\u003cP46\u003e` is the framework component in which all other P46\ncomponents are slotted into.\n\n```svelte\n\u003cscript\u003e\n  // Size of the underlying P45 grid.\n  export let size = 24\n\n  // The P45 instance used to define grid dimensions and compile shapes.\n  setContext(\"p45\", ...)\n\n  // Array of grid points representing nodes on the grid.\n  setContext(\"p46-points\", ...)\n\n  // The currently selected grid point. Not to be confused with the currently\n  // selected user shape.\n  setContext(\"p46-selected-store\", ...)\n\n  // Writable store for enabling and disabling the `\u003cAxis\u003e` component.\n  setContext(\"p46-axis-enabled-store\", ...)\n\n  // Writable store for enabling and disabling the `\u003cGuidelines\u003e` component.\n  setContext(\"p46-guidelines-enabled-store\", ...)\n\n  // Writable store for enabling and disabling the `\u003cPoints\u003e` component.\n  setContext(\"p46-points-enabled-store\", ...)\n\n  // Writable store for enabling and disabling the `\u003cTarget\u003e` component.\n  setContext(\"p46-target-enabled-store\", ...)\n\n  // Writable store for enabling and disabling rounded edges on shape lines.\n  setContext(\"p46-rounded-enabled-store\", ...)\n\n  // Writable store for controlling the stroke width for shape lines.\n  setContext(\"p46-stroke-width-slider-store\", ...)\n\n  // Writable store containing the array of user shapes to draw on the grid.\n  setContext(\"p46-user-shapes-store\", ...)\n\n  // Writable store containing the currently selected user shape.\n  // Not to be confused with the currently selected grid point.\n  setContext(\"p46-selected-user-shape-store\", ...)\n\u003c/script\u003e\n\n\u003c!--\n  Content slotted above the grid. This is where all the control components\n  live. This will typically be one or more `\u003cHeaderRow\u003e` components\n  with various control components, e.g `\u003cAxis\u003e`, slotted into that.\n--\u003e\n\u003cslot name=\"before-grid\" /\u003e\n\n\u003c!-- Content drawn on the grid underneath any shapes. --\u003e\n\u003cslot name=\"before-shape\" /\u003e\n\n\u003c!-- Content drawn on the grid above any shapes. --\u003e\n\u003cslot name=\"after-shape\" /\u003e\n\n\u003c!-- Content drawn on the grid after the hitboxes which are after the shapes. --\u003e\n\u003cslot name=\"after-hitbox\" /\u003e\n\n\u003c!--\n  Content slotted below the grid. This is where the `\u003cConsole\u003e` component\n  is slotted.\n--\u003e\n\u003cslot name=\"after-grid\" /\u003e\n```\n\n```svelte\n\u003cP46\n  size={24}\n\u003e\n  \u003cdiv slot=\"before-grid\" /\u003e\n  \u003cdiv slot=\"before-shape\" /\u003e\n  \u003cdiv slot=\"after-shape\" /\u003e\n  \u003cdiv slot=\"after-hitbox\" /\u003e\n  \u003cdiv slot=\"after-grid\" /\u003e\n\u003c/P46\u003e\n```\n\n### `\u003cPoints\u003e`\n\nSlotted into a `\u003cP46\u003e` component to add reference points to the grid.\nSlot the `\u003cPointsToggle\u003e` component into a `\u003cP46\u003e` _before-grid_\nslot to allow feature toggling.\n\n```svelte\n\u003cPoints /\u003e\n```\n\n### `\u003cPointsToggle\u003e`\n\nSlotted into a `\u003cP46\u003e` component _before-grid_ slot to enable\ntoggling of the `\u003cPoints\u003e` component if it's used.\n\n```svelte\n\u003cPointsToggle /\u003e\n```\n\n### `\u003cRoundedToggle\u003e`\n\nSlotted into a `\u003cP46\u003e` component _before-grid_ slot to enable\ntoggling of rounded line caps and joins. When disabled the\n`butt` type is used. This is applied to all shapes.\n\n```svelte\n\u003cRoundedToggle /\u003e\n```\n\n### `\u003cStrokeWidthSlider\u003e`\n\nSlotted into a `\u003cP46\u003e` component _before-grid_ slot to allow\nadjusting of line widths. This is applied to all shapes.\n\n```svelte\n\u003cStrokeWidthSlider /\u003e\n```\n\n### `\u003cTarget\u003e`\n\nSlotted into a `\u003cP46\u003e` component to add a target over\nthe currently selected point to the grid.\nSlot the `\u003cTargetToggle\u003e` component into a `\u003cP46\u003e` _before-grid_\nslot to allow feature toggling.\n\n```svelte\n\u003cTarget /\u003e\n```\n\n### `\u003cTargetToggle\u003e`\n\nSlotted into a `\u003cP46\u003e` component _before-grid_ slot to enable\ntoggling of the `\u003cTarget\u003e` component if it's used.\n\n```svelte\n\u003cTargetToggle /\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpauliorandall%2Fp46","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpauliorandall%2Fp46","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpauliorandall%2Fp46/lists"}