From 6a55c6da2e2a8252d91eaa301511e5580931d651 Mon Sep 17 00:00:00 2001
From: hajjimo <96056726+hajjimo@users.noreply.github.com>
Date: Tue, 13 Feb 2024 12:14:21 +0100
Subject: [PATCH] Glitch Clean Up (#432)
* Glitch Clean Up
* glitch-clean-up
Prettier applied
* Bump dependencies to latest version
* Remove unneccesary dependency
* Remove lock files
---------
Co-authored-by: Chen Hui Jing <1461498+huijing@users.noreply.github.com>
---
.github/ISSUE_TEMPLATE/bug_report.md | 18 +-
.github/ISSUE_TEMPLATE/feature_request.md | 1 -
.github/actions/get-contributors.cjs | 2 +-
.gitignore | 3 +
.prettierrc | 1 -
LICENSE.md | 1 -
README.md | 2 +-
package.json | 19 +-
.../LinkTagGenerator/LinkTagGenerator.jsx | 3 +-
.../ProbRevshare/components/_active-view.jsx | 12 +-
.../ProbRevshare/components/_link-tag.jsx | 4 +-
.../ProbRevshare/components/_share-list.jsx | 4 +-
.../pages/ProbRevshare/lib/_index.js | 8 +-
src/content/config.ts | 6 +-
.../add-a-streaming-payments-counter.mdx | 14 +-
.../docs/guides/provide-exclusive-content.mdx | 26 +-
src/content/docs/docs/guides/remove-ads.mdx | 22 +-
.../set-up-probabilistic-revenue-sharing.mdx | 31 +-
src/content/docs/docs/resources/glossary.mdx | 2 +-
src/data/contributors.json | 451 +-
src/pages/specification/index.html | 5529 ++++++++++------
.../specification/specification-respec.html | 564 +-
.../CG-DRAFT-web-monetization-20210317.html | 5537 +++++++++++++----
src/partials/glitchNoPay.mdx | 2 +-
src/partials/glitchViewAs.mdx | 2 +-
tsconfig.json | 4 +-
w3c.json | 8 +-
workers/probabilistic-revshare/package.json | 1 -
workers/probabilistic-revshare/src/index.ts | 4 +-
.../probabilistic-revshare/src/lib/base64.ts | 6 +-
.../src/lib/pointers.ts | 12 +-
workers/probabilistic-revshare/tsconfig.json | 23 +-
32 files changed, 8965 insertions(+), 3357 deletions(-)
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
index 51d99e0a..2d99fb75 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.md
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -4,7 +4,6 @@ about: Let us know if you found any bugs on the website
title: ''
labels: bug
assignees: ''
-
---
**Describe the bug**
@@ -12,6 +11,7 @@ A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
+
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
@@ -24,15 +24,17 @@ A clear and concise description of what you expected to happen.
If applicable, add screenshots to help explain your problem.
**Desktop (please complete the following information):**
- - OS: [e.g. iOS]
- - Browser [e.g. chrome, safari]
- - Version [e.g. 22]
+
+- OS: [e.g. iOS]
+- Browser [e.g. chrome, safari]
+- Version [e.g. 22]
**Smartphone (please complete the following information):**
- - Device: [e.g. iPhone6]
- - OS: [e.g. iOS8.1]
- - Browser [e.g. stock browser, safari]
- - Version [e.g. 22]
+
+- Device: [e.g. iPhone6]
+- OS: [e.g. iOS8.1]
+- Browser [e.g. stock browser, safari]
+- Version [e.g. 22]
**Additional context**
Add any other context about the problem here.
diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md
index bbcbbe7d..2f28cead 100644
--- a/.github/ISSUE_TEMPLATE/feature_request.md
+++ b/.github/ISSUE_TEMPLATE/feature_request.md
@@ -4,7 +4,6 @@ about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''
-
---
**Is your feature request related to a problem? Please describe.**
diff --git a/.github/actions/get-contributors.cjs b/.github/actions/get-contributors.cjs
index 869b90d4..ac6bb75c 100644
--- a/.github/actions/get-contributors.cjs
+++ b/.github/actions/get-contributors.cjs
@@ -12,7 +12,7 @@ async function getContributors() {
headers: {
'X-GitHub-Api-Version': '2022-11-28',
},
- }
+ },
)
const contributors = JSON.stringify(data)
fs.writeFileSync('src/data/contributors.json', contributors)
diff --git a/.gitignore b/.gitignore
index 7787be7d..62c226c9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -31,3 +31,6 @@ pnpm-debug.log*
!.yarn/releases
!.yarn/sdks
!.yarn/versions
+
+# lock file
+bun.lockb
diff --git a/.prettierrc b/.prettierrc
index ca233cad..742ab302 100644
--- a/.prettierrc
+++ b/.prettierrc
@@ -3,4 +3,3 @@ tabWidth: 2
jsxSingleQuote: true
bracketSpacing: true
singleQuote: true
-
diff --git a/LICENSE.md b/LICENSE.md
index ca197c04..d4dca97e 100644
--- a/LICENSE.md
+++ b/LICENSE.md
@@ -7,4 +7,3 @@ Contributions to Specifications are made under the
Contributions to Test Suites are made under the
[W3C 3-clause BSD License](https://www.w3.org/Consortium/Legal/2008/03-bsd-license.html)
-
diff --git a/README.md b/README.md
index 550858d8..a79c8438 100755
--- a/README.md
+++ b/README.md
@@ -52,7 +52,7 @@ For example, a copy of [version 1.0 of the specification](https://github.com/WIC
## Editing Content
-Starlight looks for `.md` or `.mdx` files in the `src/content/docs/` directory. Each file is exposed as a route based on its file name.
+Starlight looks for `.md` or `.mdx` files in the `src/content/docs/` directory. Each file is exposed as a route based on its file name.
### Double docs sub-folder
diff --git a/package.json b/package.json
index 81244988..821d9277 100644
--- a/package.json
+++ b/package.json
@@ -8,23 +8,20 @@
"astro": "astro"
},
"dependencies": {
- "@astrojs/react": "^3.0.9",
- "@astrojs/starlight": "^0.16.0",
+ "@astrojs/react": "^3.0.10",
+ "@astrojs/starlight": "^0.18.0",
"@interledger/docs-design-system": "^0.2.1",
- "@types/react": "^18.2.48",
- "@types/react-dom": "^18.2.18",
- "astro": "4.2.4",
+ "@types/react": "^18.2.55",
+ "@types/react-dom": "^18.2.19",
+ "astro": "4.3.6",
"astro-i18next": "^1.0.0-beta.21",
- "prettier": "^3.2.4",
+ "prettier": "^3.2.5",
"prism-react-renderer": "^2.3.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-minimal-pie-chart": "^8.4.0",
"remark-mermaidjs": "^6.0.0",
- "respec": "^34.3.0",
+ "respec": "^34.4.0",
"sharp": "^0.33.2"
- },
- "devDependencies": {
- "netlify-plugin-playwright-cache": "^0.0.1"
}
-}
+}
\ No newline at end of file
diff --git a/src/components/pages/LinkTagGenerator/LinkTagGenerator.jsx b/src/components/pages/LinkTagGenerator/LinkTagGenerator.jsx
index 165029c8..4b84524c 100644
--- a/src/components/pages/LinkTagGenerator/LinkTagGenerator.jsx
+++ b/src/components/pages/LinkTagGenerator/LinkTagGenerator.jsx
@@ -71,7 +71,8 @@ export default function LinkTagGenerator() {
- After generating your <link>
element, add the element to the <head>
section of your website.
+ After generating your <link>
element, add the element
+ to the <head>
section of your website.
diff --git a/src/components/pages/ProbRevshare/components/_active-view.jsx b/src/components/pages/ProbRevshare/components/_active-view.jsx index b8b0f29b..59a7297a 100644 --- a/src/components/pages/ProbRevshare/components/_active-view.jsx +++ b/src/components/pages/ProbRevshare/components/_active-view.jsx @@ -25,10 +25,18 @@ export function ActiveView() { <>
- Enter your current monetization link
element into the field and click Import. The table will populate with your existing revshare's configuration.
+ Enter your current monetization link
element into the
+ field and click Import. The table will populate with your
+ existing revshare's configuration.
- If you make any changes to the table, your monetization link
will change. Be sure to replace your old link
element with the updated version. Check out Add Web Monetization to a page if you need help.
+ If you make any changes to the table, your monetization{' '}
+ link
will change. Be sure to replace your old{' '}
+ link
element with the updated version. Check out{' '}
+
+ Add Web Monetization to a page
+ {' '}
+ if you need help.
Enter shares with valid payment pointers and weights.
- ) + returnEnter shares with valid payment pointers and weights.
} return ( diff --git a/src/components/pages/ProbRevshare/components/_share-list.jsx b/src/components/pages/ProbRevshare/components/_share-list.jsx index 5379388f..39d507c9 100644 --- a/src/components/pages/ProbRevshare/components/_share-list.jsx +++ b/src/components/pages/ProbRevshare/components/_share-list.jsx @@ -54,9 +54,9 @@ export function ShareList() { setShares( changeList(shares, i, { weight: trimDecimal( - weightFromPercent(percent, share.weight, totalWeight) + weightFromPercent(percent, share.weight, totalWeight), ), - }) + }), ) } onRemove={() => setShares(dropIndex(shares, i))} diff --git a/src/components/pages/ProbRevshare/lib/_index.js b/src/components/pages/ProbRevshare/lib/_index.js index e4471808..719eb150 100644 --- a/src/components/pages/ProbRevshare/lib/_index.js +++ b/src/components/pages/ProbRevshare/lib/_index.js @@ -77,7 +77,7 @@ export function pointerToShares(pointer) { if (!encodedList) { throw new Error( - 'No share data found. Make sure you copy the whole "content" field from your meta tag.' + 'No share data found. Make sure you copy the whole "content" field from your meta tag.', ) } @@ -85,7 +85,7 @@ export function pointerToShares(pointer) { if (!validatePointerList(pointerList)) { throw new Error( - 'Share data is invalid. Make sure you copy the whole "content" from your meta tag.' + 'Share data is invalid. Make sure you copy the whole "content" from your meta tag.', ) } return sharesFromPointerList(pointerList) @@ -94,7 +94,7 @@ export function pointerToShares(pointer) { throw new Error('Meta tag or payment pointer is malformed') } else if (err.name === 'SyntaxError') { throw new Error( - 'Payment pointer has malformed share data. Make sure to copy the entire pointer.' + 'Payment pointer has malformed share data. Make sure to copy the entire pointer.', ) } else { throw err @@ -111,7 +111,7 @@ export function tagToShares(tag) { if (!meta && !link) { console.log(node, node.head) throw new Error( - 'Please enter the exact link element you generated from this revshare tool. It seems to be malformed.' + 'Please enter the exact link element you generated from this revshare tool. It seems to be malformed.', ) } diff --git a/src/content/config.ts b/src/content/config.ts index 02ea2ac0..4624b9a9 100644 --- a/src/content/config.ts +++ b/src/content/config.ts @@ -1,7 +1,7 @@ -import { defineCollection } from 'astro:content'; -import { docsSchema, i18nSchema } from '@astrojs/starlight/schema'; +import { defineCollection } from 'astro:content' +import { docsSchema, i18nSchema } from '@astrojs/starlight/schema' export const collections = { docs: defineCollection({ schema: docsSchema() }), i18n: defineCollection({ type: 'data', schema: i18nSchema() }), -}; +} diff --git a/src/content/docs/docs/guides/add-a-streaming-payments-counter.mdx b/src/content/docs/docs/guides/add-a-streaming-payments-counter.mdx index c96ec333..a25b4c61 100644 --- a/src/content/docs/docs/guides/add-a-streaming-payments-counter.mdx +++ b/src/content/docs/docs/guides/add-a-streaming-payments-counter.mdx @@ -14,7 +14,7 @@ The example below illustrates how to use the `monetization` event to show a web ```html - + - +- Draft Community - Group Report + Draft Community Group Report +
- Copyright + Copyright © 2023 the Contributors to the Web Monetization Specification, - published by the Web - Platform Incubator Community Group under the W3C Community - Contributor License Agreement (CLA). A human-readable summary + published by the + Web Platform Incubator Community Group + under the + W3C Community Contributor License Agreement (CLA). A human-readable + summary is available.
-Web Monetization allows websites to automatically receive payments from - users, facilitated by the user agent and a user's preferred - monetization provider. + users, facilitated by the user agent and a user's preferred monetization + provider.
- This specification was published by the Web Platform Incubator Community - Group. It is not a W3C Standard nor is it on the W3C Standards - Track. Please note that under the W3C Community - Contributor License Agreement (CLA) there is a limited opt-out and - other conditions apply. Learn more about W3C Community and Business Groups. + This specification was published by the + Web Platform Incubator Community Group. It is not a W3C Standard nor is it on the W3C Standards Track. Please + note that under the + W3C Community Contributor License Agreement (CLA) + there is a limited opt-out and other conditions apply. Learn more about + W3C Community and Business Groups.
- This specification is a work in progress within the community on - the best shape it should take. Please see the explainer for more info. + This specification is a work in progress within the community on the + best shape it should take. Please see the + explainer for more info.
The specification reflects the desired end-state of the Web - Monetization APIs as currently anticipated and agreed to between - the contributors. The specification is being prepared here, in this + Monetization APIs as currently anticipated and agreed to between the + contributors. The specification is being prepared here, in this format, to collect the input of the Web community and prepare the - work to ultimately follow the W3C standards track should it have - the necessary support to do so. + work to ultimately follow the W3C standards track should it have the + necessary support to do so.
For the most accurate reflection of the APIs that have been - implemented by providers see the API - documentation. + implemented by providers see the + API documentation.
- GitHub - Issues are preferred for discussion of this specification. + GitHub Issues + are preferred for discussion of this specification.
- There are multiple ways to check if Web Monetization is supported.
- One way is to call supports
()
- on a
- link
element's
- relList
passing the "monetization"
+ There are multiple ways to check if Web Monetization is supported. One
+ way is to call
+ supports
()
on a
+
+ link
+ element's
+
+ relList
+ passing the "monetization"
keyword. Alternatively, you can check if either the
- MonetizationEvent
- interface or the "onmonetization
"
- event handler IDL attribute exist on the
- Window
object.
+ MonetizationEvent
+ interface or the "onmonetization
"
+
+ event handler IDL attribute
+ exist on the
+
+ Window
+ object.