Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: doc #2

Merged
merged 1 commit into from
Apr 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ mainstream web frameworks such as: React, Preact, Vue.js, Angular, Stencil.js, e

1. Import once in application (`main.js`). Ignore the custom element.
```js
import "vanilla-hcaptcha";
import "@hcaptcha/vanilla-hcaptcha";

Vue.config.ignoredElements = [
"h-captcha"
Expand Down Expand Up @@ -102,7 +102,7 @@ mainstream web frameworks such as: React, Preact, Vue.js, Angular, Stencil.js, e

1. Import once in application (`index.js`).
```js
import 'vanilla-hcaptcha';
import '@hcaptcha/vanilla-hcaptcha';
```

2. Add event handler after mount
Expand All @@ -129,7 +129,7 @@ mainstream web frameworks such as: React, Preact, Vue.js, Angular, Stencil.js, e

1. Import once in application (`main.ts`).
```js
import 'vanilla-hcaptcha';
import '@hcaptcha/vanilla-hcaptcha';
```
2. Add [`CUSTOM_ELEMENTS_SCHEMA`](https://angular.io/api/core/CUSTOM_ELEMENTS_SCHEMA) to `@NgModule.schemas`

Expand Down Expand Up @@ -225,6 +225,7 @@ If you would like to programmatically call the `render()` method, you can set `a
### API Attributes

These attributes are optional.
These attributes are used at web component creation time and thus, cannot be dynamic.

| Attribute | Values/Type | Default | Description |
|-------------------|----------------------------|---------|--------------------------------------------------------------------------------------------------------------------|
Expand Down
2 changes: 1 addition & 1 deletion examples/cdn/angularjs.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.8.2/angular.min.js"></script>

<!-- <script src="https://cdn.jsdelivr.net/npm/@hcaptcha/vanilla-hcaptcha" async defer></script>-->
<script src="/node_modules/vanilla-hcaptcha/dist/index.min.js"></script>
<script src="/node_modules/@hcaptcha/vanilla-hcaptcha/dist/index.min.js"></script>

<script>
angular.module('angularjsApp', [])
Expand Down
2 changes: 1 addition & 1 deletion examples/cdn/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
"test": "echo Examples have no tests."
},
"dependencies": {
"vanilla-hcaptcha": "1.0.2"
"@hcaptcha/vanilla-hcaptcha": "1.0.2"
}
}
2 changes: 1 addition & 1 deletion examples/cdn/preact.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<script src="https://unpkg.com/@babel/standalone/babel.min.js"></script>

<script src="https://unpkg.com/vanilla-hcaptcha" async defer></script>
<!-- <script src="/node_modules/vanilla-hcaptcha/dist/index.min.js"></script>-->
<!-- <script src="/node_modules/@hcaptcha/vanilla-hcaptcha/dist/index.min.js"></script>-->
</head>
<body>

Expand Down
4 changes: 2 additions & 2 deletions examples/cdn/react.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<script src="https://unpkg.com/react-dom@17/umd/react-dom.development.js" crossorigin></script>
<script src="https://unpkg.com/@babel/standalone/babel.min.js"></script>

<script src="https://unpkg.com/vanilla-hcaptcha" async defer></script>
<!-- <script src="/node_modules/vanilla-hcaptcha/dist/index.min.js"></script>-->
<script src="https://unpkg.com/@hcaptcha/vanilla-hcaptcha" async defer></script>
<!-- <script src="/node_modules/@hcaptcha/vanilla-hcaptcha/dist/index.min.js"></script>-->
</head>
<body>

Expand Down
2 changes: 1 addition & 1 deletion examples/cdn/vanilla.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<div>Open the console!</div>

<!-- <script src="https://cdn.jsdelivr.net/npm/@hcaptcha/vanilla-hcaptcha" async defer></script>-->
<script src="/node_modules/vanilla-hcaptcha/dist/index.min.js"></script>
<script src="/node_modules/@hcaptcha/vanilla-hcaptcha/dist/index.min.js"></script>

<h-captcha id="signupCaptcha"
site-key="781559eb-513a-4bae-8d29-d4af340e3624"
Expand Down
2 changes: 1 addition & 1 deletion examples/cdn/vue.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<script src="https://unpkg.com/vue@2.6.0"></script>

<!-- <script src="https://cdn.jsdelivr.net/npm/@hcaptcha/vanilla-hcaptcha"></script>-->
<script src="/node_modules/vanilla-hcaptcha/dist/index.min.js"></script>
<script src="/node_modules/@hcaptcha/vanilla-hcaptcha/dist/index.min.js"></script>
</head>
<body>
<div id="root">
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "vanilla-hcaptcha",
"description": "Vanilla Web Component for hCaptcha. 0 dependencies. <1kb gzipped.",
"version": "1.0.2",
"version": "1.0.3",
"author": {
"name": "hCaptcha <support@hcaptcha.com>",
"url": "https://www.hcaptcha.com"
Expand Down
4 changes: 2 additions & 2 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.