@polaris-ai/polaris
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

Polaris

Polaris is the vision of easier web accessibility for people with disabilities and for developers.

Develop

Run npm i then npm run dev to start develop.

Package testing

Package is currently tested in a front cloned from this repo. Follow these steps to test Polaris:

  • FRONT - Clone the previous front repo in another project folder and follow installation steps
  • POLARIS REPO - Back to the root of this Polaris development repo, run the command npm link
  • FRONT - In the front, run the commande npm link @polaris/polaris to install Polaris, then initiate it like the following:
// src/components/special/client-polaris.ts
'use client'

import { Polaris } from '@polaris/polaris'

export default function ClientPolaris() {
  const polaris = new Polaris()
  polaris.go()
  return <></>
}
// src/app/layout.ts
export default function RootLayout({
  children,
}: {
  children: React.ReactNode
}) {
  return (
    <html lang="en">
      <body>
        <ClientPolaris />
        {children}
      </body>
    </html>
  )
}

Mobile behavior

On mobile, Polaris is triggered by shaking the device. To use mobile behavior in development environment, use the HTTPS protocol to access to the front, and set the Polaris-pomme-api in HTTPS, using by example ngrok (install via Snap works like a charm).

Project structure

The structure of the project is inspired by this video.

Sounds

When Polaris starts and stops listening, sounds are played to inform visually impaired people . The sounds come from this site, and retrieved via the url https://lasonotheque.org/UPLOAD/mp3/<sound_id>.mp3.
Some sounds:

  • 2264: 2 blasts
  • 2261: 4 blasts
  • 2254: tone
  • 2255: tone higher
  • 2064: Allo ?
  • 2063: Hang up
  • 2489: bip

Keep trace of ding sound

Functioning

Schéma explicatif du fonctionnement général de Polaris

Bypass

Here are some examples to bypass the API use to save tokens :

  • Description requirement example:
    C'est quoi ce site ? Décris moi succintement la page, et donne moi une liste des liens disponibles dans le bas de page.

  • Description feedback example (before sanitize step):
    Ce site propose un créateur de sites web moderne propulsé par l'IA pour aider les entreprises à créer des interfaces utilisateur. \n\nLa page présente un titre principal affirmant que c'est le créateur de sites web que vous cherchez. Il y a des boutons pour démarrer un essai gratuit ou en savoir plus. Une démonstration de terminal est affichée, suivie par des logos de partenaires ou d'intégrations. Plus bas, la page explique comment ce service aide les équipes à travailler plus efficacement ensemble avec différents services comme l'analyse instantanée, les métadonnées, le référencement et la performance, etc.\n\nLiens disponibles dans le bas de page :\n- Produit : Features, Integrations, Pricing & Plans, Changelog, Our method.\n- Entreprise : About us, Diversity & Inclusion, Blog, Careers, Financial statements.\n- Ressources : Community, Terms of service, Report a vulnerability.\n- Social : Twitter, Medium, Github.

Readme

Keywords

Package Sidebar

Install

npm i @polaris-ai/polaris

Weekly Downloads

11

Version

1.0.4

License

ISC

Unpacked Size

182 kB

Total Files

75

Last publish

Collaborators

  • hermesguideme