From fdbc4dc0b7a473066e402fdf773d6e6cdb4f4556 Mon Sep 17 00:00:00 2001 From: Giacomo Debidda Date: Tue, 4 Oct 2022 17:33:04 +0200 Subject: [PATCH] docs(content-security-policy): improve README and rebuild docs --- .../assets/highlight.css | 49 ++++++ .../functions/cspDirectives.html | 2 +- .../functions/cspHeader.html | 2 +- .../functions/cspJSON.html | 2 +- .../functions/validationErrorOrWarnings.html | 2 +- docs/content-security-policy/index.html | 51 +++++- .../interfaces/Config.html | 6 +- .../interfaces/Directives.html | 2 +- .../ValidationErrorOrWarningsConfig.html | 6 +- .../variables/recommended_policy.html | 2 +- .../variables/starter_policy.html | 2 +- package.json | 1 + packages/content-security-policy/README.md | 64 +++++++- .../src/demo/content-security-policy.ts | 145 +++++++++++++----- 14 files changed, 281 insertions(+), 55 deletions(-) diff --git a/docs/content-security-policy/assets/highlight.css b/docs/content-security-policy/assets/highlight.css index 1b78686f..a799c3f1 100644 --- a/docs/content-security-policy/assets/highlight.css +++ b/docs/content-security-policy/assets/highlight.css @@ -1,29 +1,78 @@ :root { --light-hl-0: #000000; --dark-hl-0: #D4D4D4; + --light-hl-1: #AF00DB; + --dark-hl-1: #C586C0; + --light-hl-2: #001080; + --dark-hl-2: #9CDCFE; + --light-hl-3: #A31515; + --dark-hl-3: #CE9178; + --light-hl-4: #008000; + --dark-hl-4: #6A9955; + --light-hl-5: #0000FF; + --dark-hl-5: #569CD6; + --light-hl-6: #0070C1; + --dark-hl-6: #4FC1FF; + --light-hl-7: #795E26; + --dark-hl-7: #DCDCAA; --light-code-background: #FFFFFF; --dark-code-background: #1E1E1E; } @media (prefers-color-scheme: light) { :root { --hl-0: var(--light-hl-0); + --hl-1: var(--light-hl-1); + --hl-2: var(--light-hl-2); + --hl-3: var(--light-hl-3); + --hl-4: var(--light-hl-4); + --hl-5: var(--light-hl-5); + --hl-6: var(--light-hl-6); + --hl-7: var(--light-hl-7); --code-background: var(--light-code-background); } } @media (prefers-color-scheme: dark) { :root { --hl-0: var(--dark-hl-0); + --hl-1: var(--dark-hl-1); + --hl-2: var(--dark-hl-2); + --hl-3: var(--dark-hl-3); + --hl-4: var(--dark-hl-4); + --hl-5: var(--dark-hl-5); + --hl-6: var(--dark-hl-6); + --hl-7: var(--dark-hl-7); --code-background: var(--dark-code-background); } } :root[data-theme='light'] { --hl-0: var(--light-hl-0); + --hl-1: var(--light-hl-1); + --hl-2: var(--light-hl-2); + --hl-3: var(--light-hl-3); + --hl-4: var(--light-hl-4); + --hl-5: var(--light-hl-5); + --hl-6: var(--light-hl-6); + --hl-7: var(--light-hl-7); --code-background: var(--light-code-background); } :root[data-theme='dark'] { --hl-0: var(--dark-hl-0); + --hl-1: var(--dark-hl-1); + --hl-2: var(--dark-hl-2); + --hl-3: var(--dark-hl-3); + --hl-4: var(--dark-hl-4); + --hl-5: var(--dark-hl-5); + --hl-6: var(--dark-hl-6); + --hl-7: var(--dark-hl-7); --code-background: var(--dark-code-background); } .hl-0 { color: var(--hl-0); } +.hl-1 { color: var(--hl-1); } +.hl-2 { color: var(--hl-2); } +.hl-3 { color: var(--hl-3); } +.hl-4 { color: var(--hl-4); } +.hl-5 { color: var(--hl-5); } +.hl-6 { color: var(--hl-6); } +.hl-7 { color: var(--hl-7); } pre, code { background: var(--code-background); } diff --git a/docs/content-security-policy/functions/cspDirectives.html b/docs/content-security-policy/functions/cspDirectives.html index a653ccdf..9ff3fd32 100644 --- a/docs/content-security-policy/functions/cspDirectives.html +++ b/docs/content-security-policy/functions/cspDirectives.html @@ -24,7 +24,7 @@

Parameters

__namedParameters: Config

Returns Promise<string[]>

+
  • Defined in csp-directives.ts:24
  • +
  • Defined in csp-directives.ts:107
  • +
  • Defined in csp-directives.ts:119
  • +
  • Defined in errors.ts:15
  • +
  • Defined in policies.ts:30
  • +
  • Defined in policies.ts:5