{"id":19783657,"url":"https://github.com/intersectmbo/pdf-ui","last_synced_at":"2026-04-16T17:03:07.138Z","repository":{"id":250917380,"uuid":"804860213","full_name":"IntersectMBO/pdf-ui","owner":"IntersectMBO","description":null,"archived":false,"fork":false,"pushed_at":"2024-09-17T12:10:52.000Z","size":805,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-11T02:47:16.035Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/IntersectMBO.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-05-23T12:13:47.000Z","updated_at":"2024-09-17T12:10:53.000Z","dependencies_parsed_at":"2024-09-17T14:20:37.844Z","dependency_job_id":null,"html_url":"https://github.com/IntersectMBO/pdf-ui","commit_stats":null,"previous_names":["intersectmbo/pdf-ui"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IntersectMBO%2Fpdf-ui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IntersectMBO%2Fpdf-ui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IntersectMBO%2Fpdf-ui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IntersectMBO%2Fpdf-ui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/IntersectMBO","download_url":"https://codeload.github.com/IntersectMBO/pdf-ui/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241114202,"owners_count":19912025,"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":"2024-11-12T06:08:55.802Z","updated_at":"2026-04-16T17:03:02.088Z","avatar_url":"https://github.com/IntersectMBO.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @intersect.mbo/pdf-ui\n\nThe `@intersect.mbo/pdf-ui` is a React.js package that includes all the necessary logic and UI components required for the operation of a proposal discussion forum.\n\n## Table of content:\n\n-   [Installation](#installation)\n-   [Usage](#usage)\n-   [Project Structure](#project-structure)\n-   [Prerequisites](#prerequisites)\n-   [Running locally](#running-locally)\n\n## Installation\n\nTo install this pacakge, use npm or yarn:\n\n### `npm install @intersect.mbo/pdf-ui`\n\nor\n\n### `yarn add @intersect.mbo/pdf-ui`\n\n## Usage\n\nAfter installation, you can import the component and use it in your project.\n\n#### This is an example of implementing a package in a [NextJs](https://nextjs.org/) application\n\n```tsx\n'use client';\nimport dynamic from 'next/dynamic';\nimport { useValidateMutation } from \"@/hooks/mutations\";\nimport { useCardano, useGovernanceActions } from \"@/context\";\n\nconst ProposalDiscussion = dynamic(() =\u003e import('@intersect.mbo/pdf-ui'), {\n    ssr: false,\n});\n\nexport default function Page() {\n    const { validateMetadata } = useValidateMutation();\n    const { walletApi, ...context } = useCardano();\n    const { createGovernanceActionJsonLD, createHash } = useGovernanceActions();\n\n    return (\n        \u003cProposalDiscussion\n            walletAPI={{\n              ...context,\n              ...walletApi,\n              createGovernanceActionJsonLD,\n              createHash,\n            }}\n            pathname={window.location.pathname}\n            validateMetadata={\n              validateMetadata as ComponentProps\u003c\n                typeof ProposalDiscussion\n              \u003e[\"validateMetadata\"]\n            }\n        /\u003e\n    );\n}\n```\n\n\n#### Example of Implementing a Package Using CommonJS Modules (CJS):\n\n```tsx\nimport React, { ComponentProps } from \"react\";\nimport \"@intersect.mbo/pdf-ui/style\";\nimport { useCardano, useGovernanceActions } from \"@/context\";\nimport { useValidateMutation } from \"@/hooks/mutations\";\n\nconst ProposalDiscussion = React.lazy(\n  () =\u003e import(\"@intersect.mbo/pdf-ui/cjs\"),\n);\n\nexport const ProposalDiscussionPillar = () =\u003e {\n  const { validateMetadata } = useValidateMutation();\n  const { walletApi, ...context } = useCardano();\n  const { createGovernanceActionJsonLD, createHash } = useGovernanceActions();\n\n  return (\n          \u003cProposalDiscussion\n            walletAPI={{\n              ...context,\n              ...walletApi,\n              createGovernanceActionJsonLD,\n              createHash,\n            }}\n            pathname={window.location.pathname}\n            validateMetadata={\n              validateMetadata as ComponentProps\u003c\n                typeof ProposalDiscussion\n              \u003e[\"validateMetadata\"]\n            }\n          /\u003e\n  )\n};\n```\n\n## Project Structure\n\n```pdf-ui\n├── node_modules\n├── src\n│   ├── assets\n│   ├── components\n│   ├── context\n│   ├── lib\n│   ├── pages\n│   ├── styles\n│   └── App.jsx\n│   └── index.js\n│   └── index.scss\n└── rollup.config.js\n```\n\n-   **assets/**: The `@intersect.mbo/pdf-ui` assets.\n-   **components/**: The `@intersect.mbo/pdf-ui` components.\n-   **context/**: Context for global application state.\n-   **lib/**: Libraries and helper functions.\n-   **pages/**: Application pages.\n-   **styles/**: SCSS files for styling the application.\n-   **index.js**: Main application file.\n-   **index.scss**: Main application styles file.\n-   **rollup.config.js**: Configuration for the Rollup bundler.\n\n## Prerequisites\n\nBefore starting, please ensure you have the following:\n\n-   Node.js and npm - Latest versions. You can download them from [here](https://nodejs.org/en/download/).\n\n## Running locally\n\nTo launch the package, it is necessary to have an application (for example, a Next.js app) into which this package is imported. This wrapper application must provide wallet connectivity to supply the wallet API to the package.\n\nIn the wrapper application, you need to add the `NEXT_PUBLIC_PROPOSAL_DISCUSSION_API_URL` environment variable to the .env file, with the URL of the proposal discussion backend.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fintersectmbo%2Fpdf-ui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fintersectmbo%2Fpdf-ui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fintersectmbo%2Fpdf-ui/lists"}