(Grav GitSync) Automatic Commit from grav
This commit is contained in:
parent
078b124cf9
commit
2a6473f160
|
@ -1,17 +0,0 @@
|
|||
# EditorConfig is awesome: https://EditorConfig.org
|
||||
|
||||
# top-most EditorConfig file
|
||||
root = true
|
||||
|
||||
# Unix-style newlines with a newline ending every file
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
# 4 space indentation
|
||||
[*.php]
|
||||
indent_size = 4
|
|
@ -1,8 +0,0 @@
|
|||
# Linguist Normalizer
|
||||
*.yaml linguistic-language=PHP
|
||||
*.twig linguistic-language=PHP
|
||||
**/gulpfile.babel.js linguist-vendored
|
||||
**/webpack.conf.js linguist-vendored
|
||||
**/js/*.js linguist-vendored
|
||||
**/js/*.json linguist-vendored
|
||||
**/css-compiled/*.css linguist-vendored
|
|
@ -1,16 +0,0 @@
|
|||
themes/grav/.sass-cache
|
||||
.DS_Store
|
||||
crowdin.yaml
|
||||
|
||||
# Node Modules
|
||||
**/node_modules/**
|
||||
themes/grav/js/admin.js
|
||||
themes/grav/js/vendor.js
|
||||
themes/grav/js/*.map
|
||||
.idea
|
||||
|
||||
tests/_output/*
|
||||
tests/_support/_generated/*
|
||||
tests/cache/*
|
||||
tests/error.log
|
||||
/crowdin.yaml
|
|
@ -1,7 +1,78 @@
|
|||
# v1.10.37.1
|
||||
## 10/08/2022
|
||||
|
||||
1. [](#bugfix)
|
||||
* Removed new GumRoad cart icon + new button styling [getgrav/grav#3631](https://github.com/getgrav/grav/issues/3631)
|
||||
|
||||
# v1.10.37
|
||||
## 10/05/2022
|
||||
|
||||
1. [](#improved)
|
||||
* Updated vendor libraries to latest versions
|
||||
* Removed a reference to `SwiftMailer` library to support new **Email** plugin v4.0
|
||||
|
||||
# v1.10.36
|
||||
## 09/08/2022
|
||||
|
||||
1. [](#bugfix)
|
||||
* Fixed `fieldset.html.twig` not rendering with `markdown: false` [#2313](https://github.com/getgrav/grav-plugin-admin/pull/2313)
|
||||
|
||||
# v1.10.35
|
||||
## 08/04/2022
|
||||
|
||||
1. [](#improved)
|
||||
* Improvements in CodeMirror editor in RTL mode [#359](https://github.com/getgrav/grav-plugin-admin/issues/359), [#2297](https://github.com/getgrav/grav-plugin-admin/pull/2297)
|
||||
|
||||
# v1.10.34
|
||||
## 06/22/2022
|
||||
|
||||
1. [](#improved)
|
||||
* Exposed `UriToMarkdown` util (`Grav.default.Utils.UriToMarkdown`) in admin, to convert links/images
|
||||
1. [](#bugfix)
|
||||
* Fixed `Latest Page Updates` permissions [#2294](https://github.com/getgrav/grav-plugin-admin/pull/2294)
|
||||
|
||||
# v1.10.33.1
|
||||
## 04/25/2022
|
||||
|
||||
1. [](#bugfix)
|
||||
* Reverted [PR#2265](https://github.com/getgrav/grav-plugin-admin/pull/2265) as it broke sections output
|
||||
|
||||
# v1.10.33
|
||||
## 04/25/2022
|
||||
|
||||
1. [](#new)
|
||||
* Require **Form 6.0.1**
|
||||
2. [](#improved)
|
||||
* Added support for a single `field:` vs `fields:` in element form field to store a single value to the option field
|
||||
* Allow new media collapser logic to configure different cookie storage name location via `data-storage-location`
|
||||
1. [](#bugfix)
|
||||
* Fixed nested element form fields
|
||||
* Fixed `columns` and `column` fields with `.dotted` variables inside to ignore columns and column names
|
||||
* Fixed initial elements state not being restored
|
||||
|
||||
# v1.10.32
|
||||
## 03/28/2022
|
||||
|
||||
1. [](#new)
|
||||
* Require **Grav 1.7.32**, **Form 6.0.0**, **Login 3.7.0**, **Email 3.1.6** and **Flex Objects 1.2.0**
|
||||
2. [](#improved)
|
||||
* List field: Support for default values other than key/value [#2255](https://github.com/getgrav/grav-plugin-admin/issues/2255)
|
||||
* Added question icon to admin fields with help text [#2261](https://github.com/getgrav/grav-plugin-admin/issues/2261)
|
||||
3. [](#bugfix)
|
||||
* Fix nested `toggleable`: originalValue now checks with `??` instead of `is defined`
|
||||
|
||||
# v1.10.31
|
||||
## 03/14/2022
|
||||
|
||||
1. [](#new)
|
||||
* Added new local Multiavatar (local generation). **This will be default in Grav 1.8**
|
||||
2. [](#bugfix)
|
||||
* Patch `collection.js` [#2235](https://github.com/getgrav/grav-plugin-admin/issues/2235)
|
||||
|
||||
# v1.10.30.2
|
||||
## 02/09/2022
|
||||
|
||||
1. [](#bugfix)
|
||||
2. [](#bugfix)
|
||||
* Fixed regression preventing new `elements` field from saving its state
|
||||
|
||||
# v1.10.30.1
|
||||
|
|
|
@ -82,7 +82,6 @@ class AdminPlugin extends Plugin
|
|||
{
|
||||
return [
|
||||
'onPluginsInitialized' => [
|
||||
['autoload', 100001],
|
||||
['setup', 100000],
|
||||
['onPluginsInitialized', 1001]
|
||||
],
|
||||
|
@ -176,8 +175,6 @@ class AdminPlugin extends Plugin
|
|||
}
|
||||
|
||||
/**
|
||||
* [onPluginsInitialized:100000] Composer autoload.
|
||||
*
|
||||
* @return ClassLoader
|
||||
*/
|
||||
public function autoload(): ClassLoader
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
name: Admin Panel
|
||||
slug: admin
|
||||
type: plugin
|
||||
version: 1.10.30.2
|
||||
version: 1.10.37.1
|
||||
description: Adds an advanced administration panel to manage your site
|
||||
icon: empire
|
||||
author:
|
||||
|
@ -15,11 +15,11 @@ docs: https://github.com/getgrav/grav-plugin-admin/blob/develop/README.md
|
|||
license: MIT
|
||||
|
||||
dependencies:
|
||||
- { name: grav, version: '>=1.7.30' }
|
||||
- { name: form, version: '>=5.1.0' }
|
||||
- { name: login, version: '>=3.6.2' }
|
||||
- { name: email, version: '>=3.1.0' }
|
||||
- { name: flex-objects, version: '>=1.1.0' }
|
||||
- { name: grav, version: '>=1.7.32' }
|
||||
- { name: form, version: '>=6.0.1' }
|
||||
- { name: login, version: '>=3.7.0' }
|
||||
- { name: email, version: '>=3.1.6' }
|
||||
- { name: flex-objects, version: '>=1.2.0' }
|
||||
|
||||
form:
|
||||
validation: loose
|
||||
|
|
|
@ -487,11 +487,8 @@ class LoginController extends AdminController
|
|||
throw new \RuntimeException('Sending email failed');
|
||||
}
|
||||
|
||||
// For testing only!
|
||||
//Admin::DEBUG && Admin::addDebugMessage(sprintf('Email sent to %s', $to), $body);
|
||||
|
||||
$this->setMessage($this->translate('PLUGIN_ADMIN.FORGOT_INSTRUCTIONS_SENT_VIA_EMAIL'));
|
||||
} catch (\RuntimeException|\Swift_SwiftException $e) {
|
||||
} catch (\Exception $e) {
|
||||
$rateLimiter->resetRateLimit($username);
|
||||
|
||||
/** @var Debugger $debugger */
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -191,6 +191,8 @@ PLUGIN_ADMIN:
|
|||
FILE_COULD_NOT_BE_DELETED: "File could not be deleted"
|
||||
FILE_NOT_FOUND: "File not found"
|
||||
NO_FILE_FOUND: "No file found"
|
||||
FIELD_REORDER_SUCCESSFUL: "Media Order updated for field '%s'"
|
||||
FIELD_REORDER_FAILED: "An error occurred while storing the media order for the field '%s'"
|
||||
GRAV_WAS_SUCCESSFULLY_UPDATED_TO: "Grav was successfully updated to"
|
||||
GRAV_UPDATE_FAILED: "Grav update failed"
|
||||
EVERYTHING_UPDATED: "Everything updated"
|
||||
|
@ -452,8 +454,11 @@ PLUGIN_ADMIN:
|
|||
IMAGES_DEBUG_HELP: "Show an overlay over images indicating the pixel depth of the image when working with retina for example"
|
||||
IMAGES_LOADING: "Image loading behavior"
|
||||
IMAGES_LOADING_HELP: "The loading attribute allows a browser to defer loading offscreen images and iframes until users scroll near them. loading supports three values: auto, lazy, eager"
|
||||
|
||||
# Removed in Grav 1.8
|
||||
IMAGES_SEOFRIENDLY: "SEO-Friendly Image names"
|
||||
IMAGES_SEOFRIENDLY_HELP: "When enabled, the image name is displayed first, then a smaller hash to reflect processed operations"
|
||||
|
||||
UPLOAD_LIMIT: "File upload limit"
|
||||
UPLOAD_LIMIT_HELP: "Set maximum upload size in bytes (0 is unlimited)"
|
||||
ENABLE_MEDIA_TIMESTAMP: "Enable timestamps on media"
|
||||
|
@ -1137,3 +1142,10 @@ PLUGIN_ADMIN:
|
|||
ACTIVATION_REQUIRED: "Activation required to configure"
|
||||
SESSION_SECURE_HTTPS: "Secure (HTTPS)"
|
||||
SESSION_SECURE_HTTPS_HELP: "Set session secure on HTTPS but not on HTTP. Has no effect if you have above Secure setting set to true. Set to false if your site jumps between HTTP and HTTPS."
|
||||
AVATAR: "Avatar Generator"
|
||||
AVATAR_HELP: "Multiavatar is a locally generated avatar. Gravatar is an external service that uses your email address to pull a preconfigured Avatar remotely"
|
||||
AVATAR_HASH: "NOTE: Optional Avatar custom 'hash' string"
|
||||
IMAGES_TITLE: "Images"
|
||||
LEGACY_MEDIA_MUTATION: "Legacy Media Manipulation Compatibility"
|
||||
LEGACY_MEDIA_MUTATION_HELP: "Enable this setting only if image manipulation broke after Grav update."
|
||||
BACKWARD_COMPATIBILITY: "Backward Compatibility"
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
"presets": [ "@babel/preset-env" ]
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
node_modules/
|
|
@ -1,165 +0,0 @@
|
|||
{
|
||||
"root": true,
|
||||
"env": {
|
||||
"browser": true,
|
||||
"node": true
|
||||
},
|
||||
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 6,
|
||||
"sourceType": "module"
|
||||
},
|
||||
|
||||
"rules": {
|
||||
"accessor-pairs": 2,
|
||||
"array-bracket-spacing": 0,
|
||||
"block-scoped-var": 0,
|
||||
"brace-style": [2, "1tbs", { "allowSingleLine": true }],
|
||||
"camelcase": 0,
|
||||
"comma-dangle": [2, "never"],
|
||||
"comma-spacing": [2, { "before": false, "after": true }],
|
||||
"comma-style": [2, "last"],
|
||||
"complexity": 0,
|
||||
"computed-property-spacing": 0,
|
||||
"consistent-return": 0,
|
||||
"consistent-this": 0,
|
||||
"constructor-super": 2,
|
||||
"curly": [2, "multi-line"],
|
||||
"default-case": 0,
|
||||
"dot-location": [2, "property"],
|
||||
"dot-notation": 0,
|
||||
"eol-last": 2,
|
||||
"eqeqeq": [2, "allow-null"],
|
||||
"func-names": 0,
|
||||
"func-style": 0,
|
||||
"generator-star-spacing": [2, { "before": true, "after": true }],
|
||||
"guard-for-in": 0,
|
||||
"handle-callback-err": [2, "^(err|error)$" ],
|
||||
"key-spacing": [2, { "beforeColon": false, "afterColon": true }],
|
||||
"linebreak-style": 0,
|
||||
"lines-around-comment": 0,
|
||||
"max-nested-callbacks": 0,
|
||||
"new-cap": [2, { "newIsCap": true, "capIsNew": false }],
|
||||
"new-parens": 2,
|
||||
"newline-after-var": 0,
|
||||
"no-alert": 0,
|
||||
"no-array-constructor": 2,
|
||||
"no-caller": 2,
|
||||
"no-catch-shadow": 0,
|
||||
"no-cond-assign": 2,
|
||||
"no-console": 0,
|
||||
"no-constant-condition": 0,
|
||||
"no-continue": 0,
|
||||
"no-control-regex": 2,
|
||||
"no-debugger": 2,
|
||||
"no-delete-var": 2,
|
||||
"no-div-regex": 0,
|
||||
"no-dupe-args": 2,
|
||||
"no-dupe-keys": 2,
|
||||
"no-duplicate-case": 2,
|
||||
"no-else-return": 0,
|
||||
"no-empty": 0,
|
||||
"no-empty-character-class": 2,
|
||||
"no-eq-null": 0,
|
||||
"no-eval": 2,
|
||||
"no-ex-assign": 2,
|
||||
"no-extend-native": 2,
|
||||
"no-extra-bind": 2,
|
||||
"no-extra-boolean-cast": 2,
|
||||
"no-extra-parens": 0,
|
||||
"no-extra-semi": 0,
|
||||
"no-fallthrough": 2,
|
||||
"no-floating-decimal": 2,
|
||||
"no-func-assign": 2,
|
||||
"no-implied-eval": 2,
|
||||
"no-inline-comments": 0,
|
||||
"no-inner-declarations": [2, "functions"],
|
||||
"no-invalid-regexp": 2,
|
||||
"no-irregular-whitespace": 2,
|
||||
"no-iterator": 2,
|
||||
"no-label-var": 2,
|
||||
"no-labels": 2,
|
||||
"no-lone-blocks": 2,
|
||||
"no-lonely-if": 0,
|
||||
"no-loop-func": 0,
|
||||
"no-mixed-requires": 0,
|
||||
"no-mixed-spaces-and-tabs": 2,
|
||||
"no-multi-spaces": 2,
|
||||
"no-multi-str": 2,
|
||||
"no-multiple-empty-lines": [2, { "max": 1 }],
|
||||
"no-native-reassign": 2,
|
||||
"no-negated-in-lhs": 2,
|
||||
"no-nested-ternary": 0,
|
||||
"no-new": 2,
|
||||
"no-new-func": 0,
|
||||
"no-new-object": 2,
|
||||
"no-new-require": 2,
|
||||
"no-new-wrappers": 2,
|
||||
"no-obj-calls": 2,
|
||||
"no-octal": 2,
|
||||
"no-octal-escape": 2,
|
||||
"no-param-reassign": 0,
|
||||
"no-path-concat": 0,
|
||||
"no-process-env": 0,
|
||||
"no-process-exit": 0,
|
||||
"no-proto": 0,
|
||||
"no-redeclare": 2,
|
||||
"no-regex-spaces": 2,
|
||||
"no-restricted-modules": 0,
|
||||
"no-return-assign": 2,
|
||||
"no-script-url": 0,
|
||||
"no-self-compare": 2,
|
||||
"no-sequences": 2,
|
||||
"no-shadow": 0,
|
||||
"no-shadow-restricted-names": 2,
|
||||
"no-spaced-func": 2,
|
||||
"no-sparse-arrays": 2,
|
||||
"no-sync": 0,
|
||||
"no-ternary": 0,
|
||||
"no-this-before-super": 2,
|
||||
"no-throw-literal": 2,
|
||||
"no-trailing-spaces": 2,
|
||||
"no-undef": 2,
|
||||
"no-undef-init": 2,
|
||||
"no-undefined": 0,
|
||||
"no-underscore-dangle": 0,
|
||||
"no-unexpected-multiline": 2,
|
||||
"no-unneeded-ternary": 2,
|
||||
"no-unreachable": 2,
|
||||
"no-unused-expressions": 0,
|
||||
"no-unused-vars": [2, { "vars": "all", "args": "none" }],
|
||||
"no-use-before-define": 0,
|
||||
"no-var": 0,
|
||||
"no-void": 0,
|
||||
"no-warning-comments": 0,
|
||||
"no-with": 2,
|
||||
"object-curly-spacing": 0,
|
||||
"object-shorthand": 0,
|
||||
"one-var": [2, { "initialized": "never" }],
|
||||
"operator-assignment": 0,
|
||||
"operator-linebreak": [2, "after", { "overrides": { "?": "before", ":": "before" } }],
|
||||
"padded-blocks": 0,
|
||||
"prefer-const": 0,
|
||||
"quote-props": 0,
|
||||
"quotes": [2, "single", "avoid-escape"],
|
||||
"radix": 2,
|
||||
"semi": [2, "always"],
|
||||
"semi-spacing": 0,
|
||||
"sort-vars": 0,
|
||||
"keyword-spacing": [2, {"after": true, "overrides": {"throw": { "after": true}, "return": { "before": true }}}],
|
||||
"space-before-blocks": [2, "always"],
|
||||
"space-before-function-paren": [2, "never"],
|
||||
"space-in-parens": [2, "never"],
|
||||
"space-infix-ops": 2,
|
||||
"space-unary-ops": [2, { "words": true, "nonwords": false }],
|
||||
"spaced-comment": [2, "always", { "markers": ["global", "globals", "eslint", "eslint-disable", "*package", "!"] }],
|
||||
"strict": 0,
|
||||
"use-isnan": 2,
|
||||
"valid-jsdoc": 0,
|
||||
"valid-typeof": 2,
|
||||
"vars-on-top": 0,
|
||||
"wrap-iife": [2, "any"],
|
||||
"wrap-regex": 0,
|
||||
"yoda": [2, "never"]
|
||||
}
|
||||
}
|
|
@ -218,7 +218,7 @@ export default class CollectionsField {
|
|||
? observedValue
|
||||
: index);
|
||||
|
||||
['name', 'data-grav-field-name', 'for', 'id', 'data-grav-file-settings', 'data-file-post-add', 'data-file-post-remove', 'data-grav-array-name'].forEach((prop) => {
|
||||
['name', 'data-grav-field-name', 'for', 'id', 'data-grav-file-settings', 'data-file-post-add', 'data-file-post-remove', 'data-grav-array-name', 'data-grav-elements'].forEach((prop) => {
|
||||
item.find('[' + prop + '], [_' + prop + ']').each(function() {
|
||||
let element = $(this);
|
||||
let indexes = [];
|
||||
|
|
|
@ -8,3 +8,5 @@ $(document).on('change', '[data-grav-elements] select', (event) => {
|
|||
$(`[id^="${id}_"]`).css('display', 'none');
|
||||
$(`[id="${id}__${value}"]`).css('display', 'inherit');
|
||||
});
|
||||
|
||||
$('[data-grav-elements] select').trigger('change');
|
||||
|
|
|
@ -4,6 +4,7 @@ import '@babel/polyfill';
|
|||
import $ from 'jquery';
|
||||
import './utils/remodal';
|
||||
import 'simplebar/dist/simplebar.min.js';
|
||||
import { UriToMarkdown } from './forms/fields/files.js';
|
||||
import GPM, { Instance as gpm } from './utils/gpm';
|
||||
import KeepAlive from './utils/keepalive';
|
||||
import Updates, { Instance as updates, Notifications, Feed } from './updates';
|
||||
|
@ -68,5 +69,5 @@ export default {
|
|||
Instance: MediaFilterInstance
|
||||
},
|
||||
Scrollbar: { Scrollbar: { deprecated: true }, Instance: { deprecated: true } },
|
||||
Utils: { request, toastr, Cookies }
|
||||
Utils: { request, toastr, Cookies, UriToMarkdown }
|
||||
};
|
||||
|
|
|
@ -140,7 +140,7 @@ export default class PageMedia extends FilesField {
|
|||
|
||||
if (status.width) {
|
||||
const input = this.container.closest('.pagemedia-field').find('.media-resizer');
|
||||
updateMediaSizes(input, status.width, false);
|
||||
updateMediaSizes(input[0], status.width, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -231,21 +231,23 @@ export default class PageMedia extends FilesField {
|
|||
}
|
||||
|
||||
export const updateMediaSizes = (input, width, store = true) => {
|
||||
const status = JSON.parse(Cookies.get('grav-admin-pagemedia') || '{}');
|
||||
const storageLocation = input.dataset.storageLocation || 'grav-admin-pagemedia';
|
||||
const status = JSON.parse(Cookies.get(storageLocation) || '{}');
|
||||
|
||||
const height = 150 * width / 200;
|
||||
const media = input.closest('.pagemedia-field').find('.dz-details, [data-dz-thumbnail]');
|
||||
const media = $(input).closest('.pagemedia-field').find('.dz-details, [data-dz-thumbnail]');
|
||||
|
||||
media.css({ width, height });
|
||||
|
||||
if (store) {
|
||||
const data = Object.assign({}, status, { width });
|
||||
Cookies.set('grav-admin-pagemedia', JSON.stringify(data), { expires: Infinity });
|
||||
Cookies.set(storageLocation, JSON.stringify(data), { expires: Infinity });
|
||||
}
|
||||
};
|
||||
|
||||
export const updateMediaCollapseStatus = (element, store = true) => {
|
||||
const status = JSON.parse(Cookies.get('grav-admin-pagemedia') || '{}');
|
||||
const storageLocation = element.dataset.storageLocation || 'grav-admin-pagemedia';
|
||||
const status = JSON.parse(Cookies.get(storageLocation) || '{}');
|
||||
|
||||
element = $(element);
|
||||
const icon = element.find('i.fa');
|
||||
|
@ -262,7 +264,7 @@ export const updateMediaCollapseStatus = (element, store = true) => {
|
|||
|
||||
if (store) {
|
||||
const data = Object.assign({}, status, { collapsed });
|
||||
Cookies.set('grav-admin-pagemedia', JSON.stringify(data), { expires: Infinity });
|
||||
Cookies.set(storageLocation, JSON.stringify(data), { expires: Infinity });
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -270,7 +272,7 @@ $(document).on('input', '.media-resizer', (event) => {
|
|||
const target = $(event.currentTarget);
|
||||
const width = target.val();
|
||||
|
||||
updateMediaSizes(target, width);
|
||||
updateMediaSizes(event.currentTarget, width);
|
||||
});
|
||||
|
||||
$(document).on('click', '.media-collapser', (event) => {
|
||||
|
@ -278,13 +280,14 @@ $(document).on('click', '.media-collapser', (event) => {
|
|||
});
|
||||
|
||||
$(document).ready(() => {
|
||||
const status = JSON.parse(Cookies.get('grav-admin-pagemedia') || '{}');
|
||||
if (status.width) {
|
||||
$('.media-resizer').each((index, input) => {
|
||||
input = $(input);
|
||||
$('.media-resizer').each((index, input) => {
|
||||
const storageLocation = input.dataset.storageLocation || 'grav-admin-pagemedia';
|
||||
const status = JSON.parse(Cookies.get(storageLocation) || '{}');
|
||||
|
||||
if (status.width) {
|
||||
updateMediaSizes(input, status.width, false);
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
export let Instance = new PageMedia();
|
||||
|
|
|
@ -1514,4 +1514,7 @@ span.range-append {
|
|||
.jqCron-container.disable .jqCron-selector-title {
|
||||
background: #ffffff !important; }
|
||||
|
||||
.hint-icon {
|
||||
color: #06A599; }
|
||||
|
||||
/*# sourceMappingURL=preset.css.map */
|
File diff suppressed because one or more lines are too long
|
@ -1004,6 +1004,11 @@ form label {
|
|||
margin: 0; }
|
||||
form label [data-hint] {
|
||||
display: inline; }
|
||||
form label .hint-icon {
|
||||
opacity: 0.7;
|
||||
transition: 0.5s opacity; }
|
||||
form label:hover .hint-icon {
|
||||
opacity: 1.0; }
|
||||
form label.inline {
|
||||
display: inline;
|
||||
vertical-align: middle;
|
||||
|
@ -1852,10 +1857,15 @@ table.noflex {
|
|||
line-height: inherit !important;
|
||||
font-family: inherit !important;
|
||||
border-radius: 4px !important;
|
||||
box-shadow: inherit !important; }
|
||||
box-shadow: inherit !important;
|
||||
border-color: transparent !important; }
|
||||
#admin-main .admin-block a.gumroad-button:hover {
|
||||
transform: inherit; }
|
||||
#admin-main .admin-block a.gumroad-button .gumroad-button-logo {
|
||||
display: none !important;
|
||||
background-image: none !important; }
|
||||
#admin-main .admin-block a.gumroad-button .logo-full {
|
||||
display: none; }
|
||||
|
||||
#error {
|
||||
text-align: center;
|
||||
|
@ -2743,7 +2753,7 @@ table.noflex {
|
|||
font-size: 1.1rem;
|
||||
margin: 0;
|
||||
linep-height: 1.2; }
|
||||
.user-details .gravatar {
|
||||
.user-details .avatar {
|
||||
font-size: 0.9rem;
|
||||
padding: 0; }
|
||||
@media only all and (max-width: 47.938em) {
|
||||
|
@ -2810,6 +2820,9 @@ table.noflex {
|
|||
right: 0;
|
||||
left: 0; }
|
||||
|
||||
.gumroad .cart-button {
|
||||
display: none !important; }
|
||||
|
||||
@media only all and (max-width: 47.938em) {
|
||||
#admin-main .config-wrapper-system .form-tabs.side-tabs > .tabs-nav {
|
||||
display: none;
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -263,6 +263,8 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
|
|||
|
||||
.CodeMirror-widget {}
|
||||
|
||||
.CodeMirror-rtl pre { direction: rtl; }
|
||||
|
||||
.CodeMirror-code {
|
||||
outline: none;
|
||||
}
|
||||
|
|
Before Width: | Height: | Size: 463 KiB After Width: | Height: | Size: 463 KiB |
File diff suppressed because it is too large
Load Diff
|
@ -4599,7 +4599,7 @@ return Chartist;
|
|||
// If we're not in Markdown mode, fall back to normal newlineAndIndent
|
||||
var eolState = cm.getStateAfter(pos.line);
|
||||
var inner = CodeMirror.innerMode(cm.getMode(), eolState);
|
||||
if (inner.mode.name !== "markdown") {
|
||||
if (inner.mode.name !== "markdown" && inner.mode.helperType !== "markdown") {
|
||||
cm.execCommand("newlineAndIndent");
|
||||
return;
|
||||
} else {
|
||||
|
@ -15331,7 +15331,7 @@ CodeMirror.overlayMode = function(base, overlay, combine) {
|
|||
|
||||
addLegacyProps(CodeMirror);
|
||||
|
||||
CodeMirror.version = "5.65.1";
|
||||
CodeMirror.version = "5.65.2";
|
||||
|
||||
return CodeMirror;
|
||||
|
||||
|
@ -15840,6 +15840,11 @@ CodeMirror.defineMode("clike", function(config, parserConfig) {
|
|||
|
||||
stream.eatWhile(/[\w\$_]/);
|
||||
return "meta";
|
||||
},
|
||||
'"': function(stream, state) {
|
||||
if (!stream.match('""\n')) return false;
|
||||
state.tokenize = tokenTripleString;
|
||||
return state.tokenize(stream, state);
|
||||
}
|
||||
},
|
||||
modeProps: {fold: ["brace", "import"]}
|
||||
|
@ -17334,7 +17339,7 @@ CodeMirror.defineMode("gfm", function(config, modeConfig) {
|
|||
}
|
||||
|
||||
function getTagRegexp(tagName, anchored) {
|
||||
return new RegExp((anchored ? "^" : "") + "<\/\s*" + tagName + "\s*>", "i");
|
||||
return new RegExp((anchored ? "^" : "") + "<\/\\s*" + tagName + "\\s*>", "i");
|
||||
}
|
||||
|
||||
function addTags(from, to) {
|
||||
|
|
|
@ -2366,3 +2366,7 @@ body .bootstrap-datetimepicker-widget {
|
|||
.jqCron-container.disable .jqCron-selector-title {
|
||||
background: $content-bg !important;
|
||||
}
|
||||
|
||||
.hint-icon {
|
||||
color: $notice_bg;
|
||||
}
|
||||
|
|
|
@ -1114,7 +1114,7 @@ body.sidebar-quickopen #admin-main {
|
|||
linep-height: 1.2;
|
||||
}
|
||||
|
||||
.gravatar {
|
||||
.avatar {
|
||||
font-size: 0.9rem;
|
||||
padding: 0;
|
||||
}
|
||||
|
@ -1220,6 +1220,13 @@ body.sidebar-quickopen #admin-main {
|
|||
}
|
||||
}
|
||||
|
||||
// Gumroad
|
||||
.gumroad {
|
||||
.cart-button {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
// Config Side Tabs
|
||||
@include breakpoint(mobile-only) {
|
||||
#admin-main .config-wrapper-system .form-tabs.side-tabs {
|
||||
|
|
|
@ -124,8 +124,17 @@
|
|||
font-family: inherit !important;
|
||||
border-radius: 4px !important;
|
||||
box-shadow: inherit !important;
|
||||
border-color: transparent !important;
|
||||
|
||||
&:hover {
|
||||
transform: inherit;
|
||||
}
|
||||
.gumroad-button-logo {
|
||||
display: none !important;
|
||||
background-image: none !important;
|
||||
}
|
||||
.logo-full {
|
||||
display: none;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -164,6 +164,14 @@ form {
|
|||
display: inline;
|
||||
}
|
||||
|
||||
.hint-icon {
|
||||
opacity: 0.7;
|
||||
transition: 0.5s opacity;
|
||||
}
|
||||
&:hover .hint-icon {
|
||||
opacity: 1.0;
|
||||
}
|
||||
|
||||
&.inline {
|
||||
display: inline;
|
||||
vertical-align: middle;
|
||||
|
@ -484,7 +492,6 @@ form {
|
|||
position: relative;
|
||||
padding: 0 0 0 2rem;
|
||||
margin-right: 15px;
|
||||
|
||||
}
|
||||
label:before {
|
||||
content:"";
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
{% set default = field.default %}
|
||||
{% set toggleable = field.toggleable ?? false %}
|
||||
{% if toggleable %}
|
||||
{% set originalValue = originalValue is defined ? originalValue : value %}
|
||||
{% set originalValue = originalValue ?? value %}
|
||||
{% set toggleableChecked = originalValue is not null %}
|
||||
{% endif %}
|
||||
|
||||
|
@ -48,7 +48,7 @@
|
|||
{% if field.markdown %}
|
||||
<span class="hint--bottom" data-hint="{{ field.help|t|markdown(false) }}">{{ field.label|t|markdown(false)|raw }}</span>
|
||||
{% else %}
|
||||
<span class="hint--bottom" data-hint="{{ field.help|t }}">{{ field.label|t|raw }}</span>
|
||||
<span class="hint--bottom" data-hint="{{ field.help|t }}">{{ field.label|t|raw }} <i class="hint-icon fa fa-question-circle" aria-hidden="true"></i></span>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% if field.markdown %}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
{% extends "forms/field.html.twig" %}
|
||||
{% set originalValue = originalValue is defined ? originalValue : value %}
|
||||
{% set value = (value is null ? field.default : value) %}
|
||||
|
||||
{% set pattern = '^#([a-fA-F0-9]{6})|(rgba\\(\\s*(0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])\\s*,\\s*(0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])\\s*,\\s*(0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])\\s*,\\s*((0.[0-9]+)|(1.00)|1.0|1)\\s*\\))$' %}
|
||||
|
||||
{% block input %}
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
{% extends "forms/field.html.twig" %}
|
||||
|
||||
{% set originalValue = value %}
|
||||
{% set value = (value is null ? field.default : value) %}
|
||||
|
||||
{% block input %}
|
||||
<div class="colorbar current-scheme">
|
||||
{% include 'forms/default/fields.html.twig' with {name: field.name, fields: field.fields} %}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{% extends "forms/field.html.twig" %}
|
||||
|
||||
{% block field %}
|
||||
{% embed 'forms/default/fields.html.twig' with {name: field.name, fields: field.fields} %}
|
||||
{% embed 'forms/default/fields.html.twig' with {name: name, fields: field.fields} %}
|
||||
{% block outer_markup_field_open %}<div class="form-column block pure-u-1-{{ cols }}">{% endblock %}
|
||||
{% block outer_markup_field_close %}</div>{% endblock %}
|
||||
{% endembed %}
|
||||
|
|
|
@ -3,6 +3,6 @@
|
|||
{% block field %}
|
||||
<div class="form-columns grid pure-g">
|
||||
{% set cols = field.fields|length %}
|
||||
{% include 'forms/default/fields.html.twig' with {name: field.name, fields: field.fields, fallback_field: 'column', cols: cols} %}
|
||||
{% include 'forms/default/fields.html.twig' with {name: field.name|parent_field, fields: field.fields, fallback_field: 'column', cols: cols} %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,12 +1,19 @@
|
|||
{% extends "forms/field.html.twig" %}
|
||||
|
||||
{% block field %}
|
||||
{% set name = parent_name|parent_field ~ '.' ~ field.name %}
|
||||
{% set fields = prepare_form_fields(field.fields, name) %}
|
||||
{% set parent = parent_name|parent_field %}
|
||||
{% set plain_name = (field.plain_name ?? field.name)|string %}
|
||||
{% set name = parent ~ '.' ~ plain_name %}
|
||||
{% if field.field %}
|
||||
{% set fields = prepare_form_fields({(name): field.field}) %}
|
||||
{% else %}
|
||||
{% set fields = prepare_form_fields(field.fields, name) %}
|
||||
{% endif %}
|
||||
|
||||
{% embed 'forms/default/fields.html.twig' with {name: name, fields: fields} %}
|
||||
{% set initial_state = field.name|string is not same as (parent_value|string) ? 'display: none;' %}
|
||||
{% set initial_state = plain_name is not same as (parent_value|string) ? 'display: none;' %}
|
||||
{% block outer_markup_field_open %}
|
||||
<div id="{{ parent_name ~ '__' ~ field.name|string }}" class="form-element" style="{{ initial_state }}">
|
||||
<div id="{{ parent_name ~ '__' ~ plain_name }}" class="form-element" style="{{ initial_state }}">
|
||||
{% endblock %}
|
||||
|
||||
{% block outer_markup_field_close %}
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
|
||||
{% block group %}
|
||||
{% if field.text %}
|
||||
{{ field.markdown ? field.text|t|markdown : ('<p>' ~ field.t ~ '</p>')|raw }}
|
||||
{{ field.markdown ? field.text|t|markdown : ('<p>' ~ field.text|t ~ '</p>')|raw }}
|
||||
{% endif %}
|
||||
|
||||
{% if field.fields %}
|
||||
|
@ -70,10 +70,7 @@
|
|||
{% endif %}
|
||||
|
||||
{% set field_templates = include_form_field(child.type, field_layout, default_layout) %}
|
||||
{% if default_layout != 'key' %}
|
||||
{% set originalValue = child_value %}
|
||||
{% endif %}
|
||||
{% include field_templates with { field: child, value: child_value } %}
|
||||
{% include field_templates with { field: child, value: child_value, originalValue: null } %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
{% extends "forms/field.html.twig" %}
|
||||
{% set originalValue = originalValue is defined ? originalValue : value %}
|
||||
{% set value = (value is null ? field.default : value) %}
|
||||
|
||||
{% block global_attributes %}
|
||||
data-grav-iconpicker
|
||||
|
|
|
@ -90,17 +90,20 @@
|
|||
{% set child_value = val %}
|
||||
{% else %}
|
||||
{% set child_value = form ? form.value(child.name) : data.value(child.name) %}
|
||||
{# Look for a default value for that field #}
|
||||
{% if child_value is null and val[child_name|trim('.', 'left')] is defined %}
|
||||
{% set child_value = val[child_name|trim('.', 'left')] %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% set field_templates = include_form_field(child.type, field_layout, default_layout) %}
|
||||
{% set template_data = { field: child, value: child_value } %}
|
||||
{% set template_data = { field: child, value: child_value, originalValue: null } %}
|
||||
{% if default_layout != 'key' %}
|
||||
{% set originalValue = child_value %}
|
||||
{% if child.type == 'fieldset' %}
|
||||
{% set template_data = template_data|merge({val: child_value}) %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
|
||||
{%- include field_templates with template_data -%}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
{% extends "forms/fields/text/text.html.twig" %}
|
||||
|
||||
{% set originalValue = value %}
|
||||
{% set value = (value is null ? field.default : value) %}
|
||||
|
||||
{% set unique_identifier = random_string() %}
|
||||
|
||||
{% block global_attributes %}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{% if authorize(['admin.pages', 'admin.super']) %}
|
||||
{% if authorize(['admin.pages.list', 'admin.pages', 'admin.super']) %}
|
||||
<div id="latest">
|
||||
<div class="button-bar">
|
||||
<a class="button" href="{{ admin_route('/pages') }}"><i class="fa fa-fw fa-file-text-o"></i>{{ "PLUGIN_ADMIN.MANAGE_PAGES"|t }}</a>
|
||||
|
@ -15,6 +15,4 @@
|
|||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="padding">You don't have sufficient access to view the dashboard...</div>
|
||||
{% endif %}
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
{% set user_avatar = admin.user.getAvatarUrl() %}
|
||||
<img src="{{ ('?' not in user_avatar) and (not user_avatar starts with 'data:') ? user_avatar ~ '?s=80' : user_avatar }}" />
|
||||
<img src="{{ user_avatar ~ '?s=80' }}" />
|
||||
|
|
|
@ -1 +1,10 @@
|
|||
<p class="gravatar">{{ "PLUGIN_ADMIN.AVATAR_BY"|t }} <a href="https://gravatar.com" target="_blank" rel="noopener noreferrer">gravatar.com</a>. {{ "PLUGIN_ADMIN.AVATAR_UPLOAD_OWN"|t }}</p>
|
||||
<p class="avatar">
|
||||
{{ "PLUGIN_ADMIN.AVATAR_BY"|t }}
|
||||
|
||||
{% if config.system.accounts.avatar == 'gravatar' %}
|
||||
<a href="https://gravatar.com" target="_blank" rel="noopener noreferrer">gravatar.com</a>.
|
||||
{% else %}
|
||||
<a href="https://multiavatar.com/" target="_blank" rel="noopener noreferrer">Multiavatar</a>.
|
||||
{% endif %}
|
||||
|
||||
{{ "PLUGIN_ADMIN.AVATAR_UPLOAD_OWN"|t }}</p>
|
||||
|
|
|
@ -1,5 +1,2 @@
|
|||
{% if data.avatar %}
|
||||
<label><img src="{{ data.getAvatarUrl() }}" /></label>
|
||||
{% else %}
|
||||
<label><img referrerpolicy="no-referrer" src="https://www.gravatar.com/avatar/{{ data.email|md5 }}?s=200" /></label>
|
||||
{% endif %}
|
||||
{% set user_avatar = data.getAvatarUrl() %}
|
||||
<label><img referrerpolicy="no-referrer" src="{{ user_avatar ~ '?s=200' }}" /></label>
|
||||
|
|
|
@ -2,6 +2,11 @@
|
|||
|
||||
// autoload.php @generated by Composer
|
||||
|
||||
if (PHP_VERSION_ID < 50600) {
|
||||
echo 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL;
|
||||
exit(1);
|
||||
}
|
||||
|
||||
require_once __DIR__ . '/composer/autoload_real.php';
|
||||
|
||||
return ComposerAutoloaderInit38a448a612c5797456d245c809d4a914::getLoader();
|
||||
return ComposerAutoloaderInit98c98c1c3d67f21a128f935fe4a74897::getLoader();
|
||||
|
|
|
@ -66,6 +66,16 @@ if (PHP_VERSION_ID < 80000) {
|
|||
return $operation ? flock($this->handle, $operation) : true;
|
||||
}
|
||||
|
||||
public function stream_seek($offset, $whence)
|
||||
{
|
||||
if (0 === fseek($this->handle, $offset, $whence)) {
|
||||
$this->position = ftell($this->handle);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public function stream_tell()
|
||||
{
|
||||
return $this->position;
|
||||
|
@ -98,7 +108,10 @@ if (PHP_VERSION_ID < 80000) {
|
|||
}
|
||||
}
|
||||
|
||||
if (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper')) {
|
||||
if (
|
||||
(function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true))
|
||||
|| (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper'))
|
||||
) {
|
||||
include("phpvfscomposer://" . __DIR__ . '/..'.'/p3k/picofeed/picofeed');
|
||||
exit(0);
|
||||
}
|
||||
|
|
|
@ -66,6 +66,16 @@ if (PHP_VERSION_ID < 80000) {
|
|||
return $operation ? flock($this->handle, $operation) : true;
|
||||
}
|
||||
|
||||
public function stream_seek($offset, $whence)
|
||||
{
|
||||
if (0 === fseek($this->handle, $offset, $whence)) {
|
||||
$this->position = ftell($this->handle);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public function stream_tell()
|
||||
{
|
||||
return $this->position;
|
||||
|
@ -98,7 +108,10 @@ if (PHP_VERSION_ID < 80000) {
|
|||
}
|
||||
}
|
||||
|
||||
if (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper')) {
|
||||
if (
|
||||
(function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true))
|
||||
|| (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper'))
|
||||
) {
|
||||
include("phpvfscomposer://" . __DIR__ . '/..'.'/scssphp/scssphp/bin/pscss');
|
||||
exit(0);
|
||||
}
|
||||
|
|
|
@ -21,12 +21,14 @@ use Composer\Semver\VersionParser;
|
|||
* See also https://getcomposer.org/doc/07-runtime.md#installed-versions
|
||||
*
|
||||
* To require its presence, you can require `composer-runtime-api ^2.0`
|
||||
*
|
||||
* @final
|
||||
*/
|
||||
class InstalledVersions
|
||||
{
|
||||
/**
|
||||
* @var mixed[]|null
|
||||
* @psalm-var array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}|array{}|null
|
||||
* @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}|array{}|null
|
||||
*/
|
||||
private static $installed;
|
||||
|
||||
|
@ -37,7 +39,7 @@ class InstalledVersions
|
|||
|
||||
/**
|
||||
* @var array[]
|
||||
* @psalm-var array<string, array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
|
||||
* @psalm-var array<string, array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
|
||||
*/
|
||||
private static $installedByVendor = array();
|
||||
|
||||
|
@ -241,7 +243,7 @@ class InstalledVersions
|
|||
|
||||
/**
|
||||
* @return array
|
||||
* @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}
|
||||
* @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}
|
||||
*/
|
||||
public static function getRootPackage()
|
||||
{
|
||||
|
@ -255,7 +257,7 @@ class InstalledVersions
|
|||
*
|
||||
* @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect.
|
||||
* @return array[]
|
||||
* @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}
|
||||
* @psalm-return array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}
|
||||
*/
|
||||
public static function getRawData()
|
||||
{
|
||||
|
@ -278,7 +280,7 @@ class InstalledVersions
|
|||
* Returns the raw data of all installed.php which are currently loaded for custom implementations
|
||||
*
|
||||
* @return array[]
|
||||
* @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
|
||||
* @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
|
||||
*/
|
||||
public static function getAllRawData()
|
||||
{
|
||||
|
@ -301,7 +303,7 @@ class InstalledVersions
|
|||
* @param array[] $data A vendor/composer/installed.php data set
|
||||
* @return void
|
||||
*
|
||||
* @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>} $data
|
||||
* @psalm-param array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $data
|
||||
*/
|
||||
public static function reload($data)
|
||||
{
|
||||
|
@ -311,7 +313,7 @@ class InstalledVersions
|
|||
|
||||
/**
|
||||
* @return array[]
|
||||
* @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
|
||||
* @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
|
||||
*/
|
||||
private static function getInstalled()
|
||||
{
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
// autoload_classmap.php @generated by Composer
|
||||
|
||||
$vendorDir = dirname(dirname(__FILE__));
|
||||
$vendorDir = dirname(__DIR__);
|
||||
$baseDir = dirname($vendorDir);
|
||||
|
||||
return array(
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
// autoload_files.php @generated by Composer
|
||||
|
||||
$vendorDir = dirname(dirname(__FILE__));
|
||||
$vendorDir = dirname(__DIR__);
|
||||
$baseDir = dirname($vendorDir);
|
||||
|
||||
return array(
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
// autoload_namespaces.php @generated by Composer
|
||||
|
||||
$vendorDir = dirname(dirname(__FILE__));
|
||||
$vendorDir = dirname(__DIR__);
|
||||
$baseDir = dirname($vendorDir);
|
||||
|
||||
return array(
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
// autoload_psr4.php @generated by Composer
|
||||
|
||||
$vendorDir = dirname(dirname(__FILE__));
|
||||
$vendorDir = dirname(__DIR__);
|
||||
$baseDir = dirname($vendorDir);
|
||||
|
||||
return array(
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
// autoload_real.php @generated by Composer
|
||||
|
||||
class ComposerAutoloaderInit38a448a612c5797456d245c809d4a914
|
||||
class ComposerAutoloaderInit98c98c1c3d67f21a128f935fe4a74897
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
|
@ -24,41 +24,18 @@ class ComposerAutoloaderInit38a448a612c5797456d245c809d4a914
|
|||
|
||||
require __DIR__ . '/platform_check.php';
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInit38a448a612c5797456d245c809d4a914', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit38a448a612c5797456d245c809d4a914', 'loadClassLoader'));
|
||||
spl_autoload_register(array('ComposerAutoloaderInit98c98c1c3d67f21a128f935fe4a74897', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit98c98c1c3d67f21a128f935fe4a74897', 'loadClassLoader'));
|
||||
|
||||
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
||||
if ($useStaticLoader) {
|
||||
require __DIR__ . '/autoload_static.php';
|
||||
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit38a448a612c5797456d245c809d4a914::getInitializer($loader));
|
||||
} else {
|
||||
$map = require __DIR__ . '/autoload_namespaces.php';
|
||||
foreach ($map as $namespace => $path) {
|
||||
$loader->set($namespace, $path);
|
||||
}
|
||||
|
||||
$map = require __DIR__ . '/autoload_psr4.php';
|
||||
foreach ($map as $namespace => $path) {
|
||||
$loader->setPsr4($namespace, $path);
|
||||
}
|
||||
|
||||
$classMap = require __DIR__ . '/autoload_classmap.php';
|
||||
if ($classMap) {
|
||||
$loader->addClassMap($classMap);
|
||||
}
|
||||
}
|
||||
require __DIR__ . '/autoload_static.php';
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit98c98c1c3d67f21a128f935fe4a74897::getInitializer($loader));
|
||||
|
||||
$loader->register(true);
|
||||
|
||||
if ($useStaticLoader) {
|
||||
$includeFiles = Composer\Autoload\ComposerStaticInit38a448a612c5797456d245c809d4a914::$files;
|
||||
} else {
|
||||
$includeFiles = require __DIR__ . '/autoload_files.php';
|
||||
}
|
||||
$includeFiles = \Composer\Autoload\ComposerStaticInit98c98c1c3d67f21a128f935fe4a74897::$files;
|
||||
foreach ($includeFiles as $fileIdentifier => $file) {
|
||||
composerRequire38a448a612c5797456d245c809d4a914($fileIdentifier, $file);
|
||||
composerRequire98c98c1c3d67f21a128f935fe4a74897($fileIdentifier, $file);
|
||||
}
|
||||
|
||||
return $loader;
|
||||
|
@ -70,7 +47,7 @@ class ComposerAutoloaderInit38a448a612c5797456d245c809d4a914
|
|||
* @param string $file
|
||||
* @return void
|
||||
*/
|
||||
function composerRequire38a448a612c5797456d245c809d4a914($fileIdentifier, $file)
|
||||
function composerRequire98c98c1c3d67f21a128f935fe4a74897($fileIdentifier, $file)
|
||||
{
|
||||
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
||||
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
namespace Composer\Autoload;
|
||||
|
||||
class ComposerStaticInit38a448a612c5797456d245c809d4a914
|
||||
class ComposerStaticInit98c98c1c3d67f21a128f935fe4a74897
|
||||
{
|
||||
public static $files = array (
|
||||
'7e9bd612cc444b3eed788ebbe46263a0' => __DIR__ . '/..' . '/laminas/laminas-zendframework-bridge/src/autoload.php',
|
||||
|
@ -63,10 +63,10 @@ class ComposerStaticInit38a448a612c5797456d245c809d4a914
|
|||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit38a448a612c5797456d245c809d4a914::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit38a448a612c5797456d245c809d4a914::$prefixDirsPsr4;
|
||||
$loader->prefixesPsr0 = ComposerStaticInit38a448a612c5797456d245c809d4a914::$prefixesPsr0;
|
||||
$loader->classMap = ComposerStaticInit38a448a612c5797456d245c809d4a914::$classMap;
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit98c98c1c3d67f21a128f935fe4a74897::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit98c98c1c3d67f21a128f935fe4a74897::$prefixDirsPsr4;
|
||||
$loader->prefixesPsr0 = ComposerStaticInit98c98c1c3d67f21a128f935fe4a74897::$prefixesPsr0;
|
||||
$loader->classMap = ComposerStaticInit98c98c1c3d67f21a128f935fe4a74897::$classMap;
|
||||
|
||||
}, null, ClassLoader::class);
|
||||
}
|
||||
|
|
|
@ -193,17 +193,17 @@
|
|||
},
|
||||
{
|
||||
"name": "scssphp/scssphp",
|
||||
"version": "v1.10.0",
|
||||
"version_normalized": "1.10.0.0",
|
||||
"version": "v1.11.0",
|
||||
"version_normalized": "1.11.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/scssphp/scssphp.git",
|
||||
"reference": "9699a52a862da4efb43985943afa17150155dd3d"
|
||||
"reference": "33749d12c2569bb24071f94e9af828662dabb068"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/scssphp/scssphp/zipball/9699a52a862da4efb43985943afa17150155dd3d",
|
||||
"reference": "9699a52a862da4efb43985943afa17150155dd3d",
|
||||
"url": "https://api.github.com/repos/scssphp/scssphp/zipball/33749d12c2569bb24071f94e9af828662dabb068",
|
||||
"reference": "33749d12c2569bb24071f94e9af828662dabb068",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -226,11 +226,17 @@
|
|||
"ext-iconv": "Can be used as fallback when ext-mbstring is not available",
|
||||
"ext-mbstring": "For best performance, mbstring should be installed as it is faster than ext-iconv"
|
||||
},
|
||||
"time": "2022-01-06T18:16:18+00:00",
|
||||
"time": "2022-09-02T21:24:55+00:00",
|
||||
"bin": [
|
||||
"bin/pscss"
|
||||
],
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"bamarni-bin": {
|
||||
"forward-command": false,
|
||||
"bin-links": false
|
||||
}
|
||||
},
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
|
@ -264,7 +270,7 @@
|
|||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/scssphp/scssphp/issues",
|
||||
"source": "https://github.com/scssphp/scssphp/tree/v1.10.0"
|
||||
"source": "https://github.com/scssphp/scssphp/tree/v1.11.0"
|
||||
},
|
||||
"install-path": "../scssphp/scssphp"
|
||||
}
|
||||
|
|
|
@ -1,40 +1,40 @@
|
|||
<?php return array(
|
||||
'root' => array(
|
||||
'name' => 'getgrav/grav-plugin-admin',
|
||||
'pretty_version' => 'dev-develop',
|
||||
'version' => 'dev-develop',
|
||||
'reference' => '97ab52df8179fad32d1190b530c32053b84d5979',
|
||||
'type' => 'grav-plugin',
|
||||
'install_path' => __DIR__ . '/../../',
|
||||
'aliases' => array(),
|
||||
'reference' => '9317a497fbe62505ab8159be67cc6d365d21201f',
|
||||
'name' => 'getgrav/grav-plugin-admin',
|
||||
'dev' => false,
|
||||
),
|
||||
'versions' => array(
|
||||
'getgrav/grav-plugin-admin' => array(
|
||||
'pretty_version' => 'dev-develop',
|
||||
'version' => 'dev-develop',
|
||||
'reference' => '97ab52df8179fad32d1190b530c32053b84d5979',
|
||||
'type' => 'grav-plugin',
|
||||
'install_path' => __DIR__ . '/../../',
|
||||
'aliases' => array(),
|
||||
'reference' => '9317a497fbe62505ab8159be67cc6d365d21201f',
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'laminas/laminas-xml' => array(
|
||||
'pretty_version' => '1.4.0',
|
||||
'version' => '1.4.0.0',
|
||||
'reference' => 'dcadeefdb6d7ed6b39d772b47e3845003d6ea60f',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../laminas/laminas-xml',
|
||||
'aliases' => array(),
|
||||
'reference' => 'dcadeefdb6d7ed6b39d772b47e3845003d6ea60f',
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'laminas/laminas-zendframework-bridge' => array(
|
||||
'pretty_version' => '1.4.1',
|
||||
'version' => '1.4.1.0',
|
||||
'reference' => '88bf037259869891afce6504cacc4f8a07b24d0f',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../laminas/laminas-zendframework-bridge',
|
||||
'aliases' => array(),
|
||||
'reference' => '88bf037259869891afce6504cacc4f8a07b24d0f',
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'miniflux/picofeed' => array(
|
||||
|
@ -46,19 +46,19 @@
|
|||
'p3k/picofeed' => array(
|
||||
'pretty_version' => 'v0.1.40',
|
||||
'version' => '0.1.40.0',
|
||||
'reference' => '356fd66d48779193b10ac28532cb4a4e11bb801c',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../p3k/picofeed',
|
||||
'aliases' => array(),
|
||||
'reference' => '356fd66d48779193b10ac28532cb4a4e11bb801c',
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'scssphp/scssphp' => array(
|
||||
'pretty_version' => 'v1.10.0',
|
||||
'version' => '1.10.0.0',
|
||||
'pretty_version' => 'v1.11.0',
|
||||
'version' => '1.11.0.0',
|
||||
'reference' => '33749d12c2569bb24071f94e9af828662dabb068',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../scssphp/scssphp',
|
||||
'aliases' => array(),
|
||||
'reference' => '9699a52a862da4efb43985943afa17150155dd3d',
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'symfony/polyfill-php72' => array(
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
"ignore_php_platform_requirements": {
|
||||
"8.1": true
|
||||
}
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
<?php
|
||||
return array(
|
||||
'grabber' => array(
|
||||
'%.*%' => array(
|
||||
'test_url' => 'http://combat.blog.lemonde.fr/2013/08/31/teddy-riner-le-rookie-devenu-rambo/#xtor=RSS-3208',
|
||||
'body' => array(
|
||||
'//div[@class="entry-content"]',
|
||||
),
|
||||
'strip' => array(
|
||||
'//*[contains(@class, "fb-like") or contains(@class, "social")]'
|
||||
),
|
||||
)
|
||||
)
|
||||
);
|
|
@ -1,15 +0,0 @@
|
|||
<?php
|
||||
return array(
|
||||
'grabber' => array(
|
||||
'%.*%' => array(
|
||||
'title' => '//header/h1',
|
||||
'test_url' => 'http://bits.blogs.nytimes.com/2012/01/16/wikipedia-plans-to-go-dark-on-wednesday-to-protest-sopa/',
|
||||
'body' => array(
|
||||
'//div[@class="postContent"]',
|
||||
),
|
||||
'strip' => array(
|
||||
'//*[@class="shareToolsBox"]',
|
||||
),
|
||||
)
|
||||
)
|
||||
);
|
|
@ -1,13 +0,0 @@
|
|||
<?php
|
||||
return array(
|
||||
'grabber' => array(
|
||||
'%.*%' => array(
|
||||
'test_url' => 'http://www.igen.fr/ailleurs/2014/05/nvidia-va-delaisser-les-smartphones-grand-public-86031',
|
||||
'body' => array(
|
||||
'//div[contains(@class, "field-name-body")]'
|
||||
),
|
||||
'strip' => array(
|
||||
),
|
||||
)
|
||||
)
|
||||
);
|
|
@ -1,11 +0,0 @@
|
|||
<?php
|
||||
return array(
|
||||
'grabber' => array(
|
||||
'%.*%' => array(
|
||||
'test_url' => 'http://www.nytimes.com/2011/05/15/world/middleeast/15prince.html',
|
||||
'body' => array(
|
||||
'//p[contains(@class, "story-content")] | //div[@class="image"]',
|
||||
),
|
||||
)
|
||||
)
|
||||
);
|
|
@ -1,11 +0,0 @@
|
|||
<?php
|
||||
return array(
|
||||
'grabber' => array(
|
||||
'%.*%' => array(
|
||||
'test_url' => 'http://eliascarpe.over-blog.com/2015/12/re-upload-projets-d-avenir.html',
|
||||
'body' => array(
|
||||
'//div[contains(concat(" ", normalize-space(@class), " "), " ob-section ")]',
|
||||
),
|
||||
)
|
||||
)
|
||||
);
|
|
@ -1,12 +0,0 @@
|
|||
<?php
|
||||
return array(
|
||||
'grabber' => array(
|
||||
'%.*%' => array(
|
||||
'test_url' => 'http://www.phoronix.com/scan.php?page=article&item=amazon_ec2_bare&num=1',
|
||||
'body' => array(
|
||||
'//div[@class="content"]',
|
||||
),
|
||||
'strip' => array(),
|
||||
),
|
||||
),
|
||||
);
|
|
@ -1,20 +0,0 @@
|
|||
<?php
|
||||
return array(
|
||||
'grabber' => array(
|
||||
'%.*%' => array(
|
||||
'test_url' => 'http://www.slate.com/articles/business/moneybox/2013/08/microsoft_ceo_steve_ballmer_retires_a_firsthand_account_of_the_company_s.html',
|
||||
'body' => array(
|
||||
'//div[@class="sl-art-body"]',
|
||||
),
|
||||
'strip' => array(
|
||||
'//*[contains(@class, "social") or contains(@class, "comments") or contains(@class, "sl-article-floatin-tools") or contains(@class, "sl-art-pag")]',
|
||||
'//*[@id="mys_slate_logged_in"]',
|
||||
'//*[@id="sl_article_tools_myslate_bottom"]',
|
||||
'//*[@id="mys_myslate"]',
|
||||
'//*[@class="sl-viral-container"]',
|
||||
'//*[@class="sl-art-creds-cntr"]',
|
||||
'//*[@class="sl-art-ad-midflex"]',
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
|
@ -1,14 +0,0 @@
|
|||
<?php
|
||||
return array(
|
||||
'grabber' => array(
|
||||
'%.*%' => array(
|
||||
'test_url' => 'http://www.theguardian.com/sustainable-business/2015/feb/02/2015-hyper-transparency-global-business',
|
||||
'body' => array(
|
||||
'//div[contains(@class, "content__main-column--article")]',
|
||||
),
|
||||
'strip' => array(
|
||||
'//div[contains(@class, "meta-container")]',
|
||||
),
|
||||
)
|
||||
)
|
||||
);
|
|
@ -1,29 +0,0 @@
|
|||
<?php
|
||||
return array(
|
||||
'grabber' => array(
|
||||
'%.*%' => array(
|
||||
'test_url' => 'https://en.wikipedia.org/wiki/Grace_Hopper',
|
||||
'body' => array(
|
||||
'//div[@id="bodyContent"]',
|
||||
),
|
||||
'strip' => array(
|
||||
"//div[@id='toc']",
|
||||
"//div[@id='catlinks']",
|
||||
"//div[@id='jump-to-nav']",
|
||||
"//div[@class='thumbcaption']//div[@class='magnify']",
|
||||
"//table[@class='navbox']",
|
||||
"//table[contains(@class, 'infobox')]",
|
||||
"//div[@class='dablink']",
|
||||
"//div[@id='contentSub']",
|
||||
"//div[@id='siteSub']",
|
||||
"//table[@id='persondata']",
|
||||
"//table[contains(@class, 'metadata')]",
|
||||
"//*[contains(@class, 'noprint')]",
|
||||
"//*[contains(@class, 'printfooter')]",
|
||||
"//*[contains(@class, 'editsection')]",
|
||||
"//*[contains(@class, 'error')]",
|
||||
"//span[@title='pronunciation:']",
|
||||
),
|
||||
)
|
||||
)
|
||||
);
|
|
@ -1,44 +0,0 @@
|
|||
<?php
|
||||
return array(
|
||||
'grabber' => array(
|
||||
'%.*%' => array(
|
||||
'test_url' => 'http://www.wired.com/gamelife/2013/09/ouya-free-the-games/',
|
||||
'body' => array(
|
||||
'//div[@data-js="gallerySlides"]',
|
||||
'//div[starts-with(@class,"post")]',
|
||||
),
|
||||
'strip' => array(
|
||||
'//h1',
|
||||
'//nav',
|
||||
'//button',
|
||||
'//figure[starts-with(@class,"rad-slide")]',
|
||||
'//figure[starts-with(@class,"end-slate")]',
|
||||
'//div[contains(@class,"mobile-")]',
|
||||
'//div[starts-with(@class,"mob-gallery-launcher")]',
|
||||
'//div[contains(@id,"mobile-")]',
|
||||
'//span[contains(@class,"slide-count")]',
|
||||
'//div[contains(@class,"show-ipad")]',
|
||||
'//img[contains(@id,"-hero-bg")]',
|
||||
'//div[@data-js="overlayWrap"]',
|
||||
'//ul[contains(@class,"metadata")]',
|
||||
'//div[@class="opening center"]',
|
||||
'//p[contains(@class="byline-mob"]',
|
||||
'//div[@id="o-gallery"]',
|
||||
'//div[starts-with(@class,"sm-col")]',
|
||||
'//div[contains(@class,"pad-b-huge")]',
|
||||
'//a[contains(@class,"visually-hidden")]',
|
||||
'//*[@class="social"]',
|
||||
'//i',
|
||||
'//div[@data-js="mobGalleryAd"]',
|
||||
'//div[contains(@class,"footer")]',
|
||||
'//div[contains(@data-js,"fader")]',
|
||||
'//div[@id="sharing"]',
|
||||
'//div[contains(@id,"related")]',
|
||||
'//div[@id="most-pop"]',
|
||||
'//ul[@id="article-tags"]',
|
||||
'//style',
|
||||
'//section[contains(@class,"footer")]'
|
||||
),
|
||||
)
|
||||
)
|
||||
);
|
|
@ -1,15 +0,0 @@
|
|||
<?php
|
||||
return array(
|
||||
'grabber' => array(
|
||||
'%.*%' => array(
|
||||
'test_url' => 'http://online.wsj.com/article/SB10001424127887324108204579023143974408428.html',
|
||||
'body' => array(
|
||||
'//div[@class="articlePage"]',
|
||||
),
|
||||
'strip' => array(
|
||||
'//*[@id="articleThumbnail_2"]',
|
||||
'//*[@class="socialByline"]',
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
|
@ -50,16 +50,16 @@
|
|||
"type": "package",
|
||||
"package": {
|
||||
"name": "sass/sass-spec",
|
||||
"version": "2021.11.30",
|
||||
"version": "2022.08.19",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sass/sass-spec.git",
|
||||
"reference": "ee5b460ac84b1ce27b86e22c0252b4296444cf3a"
|
||||
"reference": "2bdc199723a3445d5badac3ac774105698f08861"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sass/sass-spec/zipball/ee5b460ac84b1ce27b86e22c0252b4296444cf3a",
|
||||
"reference": "ee5b460ac84b1ce27b86e22c0252b4296444cf3a",
|
||||
"url": "https://api.github.com/repos/sass/sass-spec/zipball/2bdc199723a3445d5badac3ac774105698f08861",
|
||||
"reference": "2bdc199723a3445d5badac3ac774105698f08861",
|
||||
"shasum": ""
|
||||
}
|
||||
}
|
||||
|
@ -107,5 +107,11 @@
|
|||
"allow-plugins": {
|
||||
"bamarni/composer-bin-plugin": true
|
||||
}
|
||||
},
|
||||
"extra": {
|
||||
"bamarni-bin": {
|
||||
"forward-command": false,
|
||||
"bin-links": false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<ruleset name="PSR12 (adapted for PHP 5.6+)">
|
||||
<rule ref="PSR12">
|
||||
<!-- Ignore this PHP 7.1+ sniff as long as we support PHP 5.6+ -->
|
||||
<exclude name="PSR12.Properties.ConstantVisibility.NotFound"/>
|
||||
|
||||
<!-- This sniff doesn't ignore comment blocks -->
|
||||
<!--
|
||||
<exclude name="Generic.Files.LineLength"/>
|
||||
-->
|
||||
</rule>
|
||||
</ruleset>
|
|
@ -166,7 +166,7 @@ class Compiler
|
|||
|
||||
/**
|
||||
* @var array
|
||||
* @phpstan-var array<string, array{0: callable, 1: array|null}>
|
||||
* @phpstan-var array<string, array{0: callable, 1: string[]|null}>
|
||||
*/
|
||||
protected $userFunctions = [];
|
||||
/**
|
||||
|
@ -211,9 +211,15 @@ class Compiler
|
|||
private $charset = true;
|
||||
|
||||
/**
|
||||
* @var string|\ScssPhp\ScssPhp\Formatter
|
||||
* @var Formatter
|
||||
*/
|
||||
protected $formatter = Expanded::class;
|
||||
protected $formatter;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
* @phpstan-var class-string<Formatter>
|
||||
*/
|
||||
private $configuredFormatter = Expanded::class;
|
||||
|
||||
/**
|
||||
* @var Environment
|
||||
|
@ -381,7 +387,7 @@ class Compiler
|
|||
'encoding' => $this->encoding,
|
||||
'sourceMap' => serialize($this->sourceMap),
|
||||
'sourceMapOptions' => $this->sourceMapOptions,
|
||||
'formatter' => $this->formatter,
|
||||
'formatter' => $this->configuredFormatter,
|
||||
'legacyImportPath' => $this->legacyCwdImportPath,
|
||||
];
|
||||
|
||||
|
@ -502,7 +508,7 @@ class Compiler
|
|||
$tree = $this->parser->parse($source);
|
||||
$this->parser = null;
|
||||
|
||||
$this->formatter = new $this->formatter();
|
||||
$this->formatter = new $this->configuredFormatter();
|
||||
$this->rootBlock = null;
|
||||
$this->rootEnv = $this->pushEnv($tree);
|
||||
|
||||
|
@ -529,6 +535,7 @@ class Compiler
|
|||
$sourceMapGenerator = new SourceMapGenerator($this->sourceMapOptions);
|
||||
}
|
||||
}
|
||||
assert($this->scope !== null);
|
||||
|
||||
$out = $this->formatter->format($this->scope, $sourceMapGenerator);
|
||||
|
||||
|
@ -542,6 +549,7 @@ class Compiler
|
|||
$sourceMap = null;
|
||||
|
||||
if (! empty($out) && $this->sourceMap && $this->sourceMap !== self::SOURCE_MAP_NONE) {
|
||||
assert($sourceMapGenerator !== null);
|
||||
$sourceMap = $sourceMapGenerator->generateJson($prefix);
|
||||
$sourceMapUrl = null;
|
||||
|
||||
|
@ -671,7 +679,7 @@ class Compiler
|
|||
/**
|
||||
* Push extends
|
||||
*
|
||||
* @param array $target
|
||||
* @param string[] $target
|
||||
* @param array $origin
|
||||
* @param array|null $block
|
||||
*
|
||||
|
@ -714,9 +722,9 @@ class Compiler
|
|||
$out->sourceLine = $this->env->block->sourceLine;
|
||||
$out->sourceColumn = $this->env->block->sourceColumn;
|
||||
} else {
|
||||
$out->sourceName = null;
|
||||
$out->sourceLine = null;
|
||||
$out->sourceColumn = null;
|
||||
$out->sourceName = isset($this->sourceNames[$this->sourceIndex]) ? $this->sourceNames[$this->sourceIndex] : '(stdin)';
|
||||
$out->sourceLine = $this->sourceLine;
|
||||
$out->sourceColumn = $this->sourceColumn;
|
||||
}
|
||||
|
||||
return $out;
|
||||
|
@ -734,6 +742,7 @@ class Compiler
|
|||
$this->rootBlock = $this->scope = $this->makeOutputBlock(Type::T_ROOT);
|
||||
|
||||
$this->compileChildrenNoReturn($rootBlock->children, $this->scope);
|
||||
assert($this->scope !== null);
|
||||
$this->flattenSelectors($this->scope);
|
||||
$this->missingSelectors();
|
||||
}
|
||||
|
@ -815,6 +824,7 @@ class Compiler
|
|||
}
|
||||
|
||||
if ($placeholderSelector && 0 === \count($block->selectors) && null !== $parentKey) {
|
||||
assert($block->parent !== null);
|
||||
unset($block->parent->children[$parentKey]);
|
||||
|
||||
return;
|
||||
|
@ -1287,6 +1297,7 @@ class Compiler
|
|||
$mediaQueries = $this->compileMediaQuery($this->multiplyMedia($this->env));
|
||||
|
||||
if (! empty($mediaQueries)) {
|
||||
assert($this->scope !== null);
|
||||
$previousScope = $this->scope;
|
||||
$parentScope = $this->mediaParent($this->scope);
|
||||
|
||||
|
@ -1452,7 +1463,7 @@ class Compiler
|
|||
|
||||
if (
|
||||
! $selfParent->selectors &&
|
||||
isset($block->parent) && $block->parent &&
|
||||
isset($block->parent) &&
|
||||
isset($block->parent->selectors) && $block->parent->selectors
|
||||
) {
|
||||
$selfParent = $block->parent;
|
||||
|
@ -1460,13 +1471,15 @@ class Compiler
|
|||
|
||||
$this->env = $this->filterWithWithout($envs, $with, $without);
|
||||
|
||||
assert($this->scope !== null);
|
||||
$saveScope = $this->scope;
|
||||
$this->scope = $this->filterScopeWithWithout($saveScope, $with, $without);
|
||||
|
||||
// propagate selfParent to the children where they still can be useful
|
||||
$this->compileChildrenNoReturn($block->children, $this->scope, $selfParent);
|
||||
|
||||
$this->scope = $this->completeScope($this->scope, $saveScope);
|
||||
assert($this->scope !== null);
|
||||
$this->completeScope($this->scope, $saveScope);
|
||||
$this->scope = $saveScope;
|
||||
$this->env = $this->extractEnv($envs);
|
||||
|
||||
|
@ -1490,6 +1503,7 @@ class Compiler
|
|||
if ($scope->type === Type::T_ROOT) {
|
||||
return $scope;
|
||||
}
|
||||
assert($this->rootBlock !== null);
|
||||
|
||||
// start from the root
|
||||
while ($scope->parent && $scope->parent->type !== Type::T_ROOT) {
|
||||
|
@ -1557,7 +1571,7 @@ class Compiler
|
|||
*/
|
||||
protected function completeScope($scope, $previousScope)
|
||||
{
|
||||
if (! $scope->type && (! $scope->selectors || ! \count($scope->selectors)) && \count($scope->lines)) {
|
||||
if (! $scope->type && ! $scope->selectors && \count($scope->lines)) {
|
||||
$scope->selectors = $this->findScopeSelectors($previousScope, $scope->depth);
|
||||
}
|
||||
|
||||
|
@ -1768,10 +1782,12 @@ class Compiler
|
|||
|
||||
$this->scope = $this->makeOutputBlock($block->type, $selectors);
|
||||
$this->scope->depth = 1;
|
||||
assert($this->scope->parent !== null);
|
||||
$this->scope->parent->children[] = $this->scope;
|
||||
|
||||
$this->compileChildrenNoReturn($block->children, $this->scope);
|
||||
|
||||
assert($this->scope !== null);
|
||||
$this->scope = $this->scope->parent;
|
||||
$this->env = $this->extractEnv($envs);
|
||||
|
||||
|
@ -1829,6 +1845,7 @@ class Compiler
|
|||
$this->pushEnv($block);
|
||||
|
||||
$this->scope = $this->makeOutputBlock($block->type, $selectors);
|
||||
assert($this->scope->parent !== null);
|
||||
$this->scope->parent->children[] = $this->scope;
|
||||
|
||||
// wrap assign children in a block
|
||||
|
@ -1862,6 +1879,7 @@ class Compiler
|
|||
|
||||
$this->compileChildrenNoReturn($block->children, $this->scope);
|
||||
|
||||
assert($this->scope !== null);
|
||||
$this->scope = $this->scope->parent;
|
||||
|
||||
$this->popEnv();
|
||||
|
@ -1890,10 +1908,12 @@ class Compiler
|
|||
protected function compileBlock(Block $block)
|
||||
{
|
||||
$env = $this->pushEnv($block);
|
||||
assert($block->selectors !== null);
|
||||
$env->selectors = $this->evalSelectors($block->selectors);
|
||||
|
||||
$out = $this->makeOutputBlock(null);
|
||||
|
||||
assert($this->scope !== null);
|
||||
$this->scope->children[] = $out;
|
||||
|
||||
if (\count($block->children)) {
|
||||
|
@ -1911,6 +1931,7 @@ class Compiler
|
|||
|
||||
// and revert for the following children of the same block
|
||||
if ($selfParentSelectors) {
|
||||
assert($block->selfParent !== null);
|
||||
$block->selfParent->selectors = $selfParentSelectors;
|
||||
}
|
||||
}
|
||||
|
@ -1966,6 +1987,7 @@ class Compiler
|
|||
$out = $this->makeOutputBlock(Type::T_COMMENT);
|
||||
$out->lines[] = $this->compileCommentValue($block, true);
|
||||
|
||||
assert($this->scope !== null);
|
||||
$this->scope->children[] = $out;
|
||||
}
|
||||
|
||||
|
@ -1980,7 +2002,11 @@ class Compiler
|
|||
{
|
||||
$this->shouldEvaluate = false;
|
||||
|
||||
$selectors = array_map([$this, 'evalSelector'], $selectors);
|
||||
$evaluatedSelectors = [];
|
||||
foreach ($selectors as $selector) {
|
||||
$evaluatedSelectors[] = $this->evalSelector($selector);
|
||||
}
|
||||
$selectors = $evaluatedSelectors;
|
||||
|
||||
// after evaluating interpolates, we might need a second pass
|
||||
if ($this->shouldEvaluate) {
|
||||
|
@ -2008,6 +2034,8 @@ class Compiler
|
|||
* @param array $selector
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @phpstan-impure
|
||||
*/
|
||||
protected function evalSelector($selector)
|
||||
{
|
||||
|
@ -2020,6 +2048,8 @@ class Compiler
|
|||
* @param array $part
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @phpstan-impure
|
||||
*/
|
||||
protected function evalSelectorPart($part)
|
||||
{
|
||||
|
@ -2033,8 +2063,8 @@ class Compiler
|
|||
}
|
||||
} elseif (
|
||||
\is_string($p) && \strlen($p) >= 2 &&
|
||||
($first = $p[0]) && ($first === '"' || $first === "'") &&
|
||||
substr($p, -1) === $first
|
||||
($p[0] === '"' || $p[0] === "'") &&
|
||||
substr($p, -1) === $p[0]
|
||||
) {
|
||||
$p = substr($p, 1, -1);
|
||||
}
|
||||
|
@ -2320,9 +2350,9 @@ class Compiler
|
|||
}
|
||||
|
||||
/**
|
||||
* Compile children and throw exception if unexpected `@return`
|
||||
* Compile children and throw exception if unexpected at-return
|
||||
*
|
||||
* @param array $stms
|
||||
* @param array[] $stms
|
||||
* @param \ScssPhp\ScssPhp\Formatter\OutputBlock $out
|
||||
* @param \ScssPhp\ScssPhp\Block $selfParent
|
||||
* @param string $traceName
|
||||
|
@ -2337,13 +2367,13 @@ class Compiler
|
|||
|
||||
foreach ($stms as $stm) {
|
||||
if ($selfParent && isset($stm[1]) && \is_object($stm[1]) && $stm[1] instanceof Block) {
|
||||
$oldSelfParent = $stm[1]->selfParent;
|
||||
$stm[1]->selfParent = $selfParent;
|
||||
$ret = $this->compileChild($stm, $out);
|
||||
$stm[1]->selfParent = null;
|
||||
$stm[1]->selfParent = $oldSelfParent;
|
||||
} elseif ($selfParent && \in_array($stm[0], [Type::T_INCLUDE, Type::T_EXTEND])) {
|
||||
$stm['selfParent'] = $selfParent;
|
||||
$ret = $this->compileChild($stm, $out);
|
||||
unset($stm['selfParent']);
|
||||
} else {
|
||||
$ret = $this->compileChild($stm, $out);
|
||||
}
|
||||
|
@ -2401,7 +2431,7 @@ class Compiler
|
|||
$queryString = $this->compileMediaQuery([$queryList[$kql]]);
|
||||
$queryString = reset($queryString);
|
||||
|
||||
if (strpos($queryString, '@media ') === 0) {
|
||||
if ($queryString !== false && strpos($queryString, '@media ') === 0) {
|
||||
$queryString = substr($queryString, 7);
|
||||
$queries = [];
|
||||
|
||||
|
@ -2857,7 +2887,7 @@ class Compiler
|
|||
$this->sourceIndex = isset($child[Parser::SOURCE_INDEX]) ? $child[Parser::SOURCE_INDEX] : null;
|
||||
$this->sourceLine = isset($child[Parser::SOURCE_LINE]) ? $child[Parser::SOURCE_LINE] : -1;
|
||||
$this->sourceColumn = isset($child[Parser::SOURCE_COLUMN]) ? $child[Parser::SOURCE_COLUMN] : -1;
|
||||
} elseif (\is_array($child) && isset($child[1]->sourceLine)) {
|
||||
} elseif (\is_array($child) && isset($child[1]->sourceLine) && $child[1] instanceof Block) {
|
||||
$this->sourceIndex = $child[1]->sourceIndex;
|
||||
$this->sourceLine = $child[1]->sourceLine;
|
||||
$this->sourceColumn = $child[1]->sourceColumn;
|
||||
|
@ -3093,6 +3123,7 @@ class Compiler
|
|||
if (! $selectors && isset($child['selfParent'])) {
|
||||
$selectors = $this->multiplySelectors($this->env, $child['selfParent']);
|
||||
}
|
||||
assert($selectors !== null);
|
||||
|
||||
if (\count($result) > 1) {
|
||||
$replacement = implode(', ', $result);
|
||||
|
@ -3255,7 +3286,7 @@ EOL;
|
|||
// and assign this fake parent to childs
|
||||
$selfParent = null;
|
||||
|
||||
if (isset($child['selfParent']) && isset($child['selfParent']->selectors)) {
|
||||
if (isset($child['selfParent']) && $child['selfParent'] instanceof Block && isset($child['selfParent']->selectors)) {
|
||||
$selfParent = $child['selfParent'];
|
||||
} else {
|
||||
$parentSelectors = $this->multiplySelectors($this->env);
|
||||
|
@ -3265,7 +3296,7 @@ EOL;
|
|||
$parent->selectors = $parentSelectors;
|
||||
|
||||
foreach ($mixin->children as $k => $child) {
|
||||
if (isset($child[1]) && \is_object($child[1]) && $child[1] instanceof Block) {
|
||||
if (isset($child[1]) && $child[1] instanceof Block) {
|
||||
$mixin->children[$k][1]->parent = $parent;
|
||||
}
|
||||
}
|
||||
|
@ -3371,6 +3402,8 @@ EOL;
|
|||
default:
|
||||
throw $this->error("unknown child type: $child[0]");
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -3505,32 +3538,24 @@ EOL;
|
|||
$ucLType = ucfirst($ltype);
|
||||
$ucRType = ucfirst($rtype);
|
||||
|
||||
$shouldEval = $inParens || $inExp;
|
||||
|
||||
// this tries:
|
||||
// 1. op[op name][left type][right type]
|
||||
// 2. op[left type][right type] (passing the op as first arg
|
||||
// 2. op[left type][right type] (passing the op as first arg)
|
||||
// 3. op[op name]
|
||||
$fn = "op${ucOpName}${ucLType}${ucRType}";
|
||||
if (\is_callable([$this, $fn = "op{$ucOpName}{$ucLType}{$ucRType}"])) {
|
||||
$out = $this->$fn($left, $right, $shouldEval);
|
||||
} elseif (\is_callable([$this, $fn = "op{$ucLType}{$ucRType}"])) {
|
||||
$out = $this->$fn($op, $left, $right, $shouldEval);
|
||||
} elseif (\is_callable([$this, $fn = "op{$ucOpName}"])) {
|
||||
$out = $this->$fn($left, $right, $shouldEval);
|
||||
} else {
|
||||
$out = null;
|
||||
}
|
||||
|
||||
if (
|
||||
\is_callable([$this, $fn]) ||
|
||||
(($fn = "op${ucLType}${ucRType}") &&
|
||||
\is_callable([$this, $fn]) &&
|
||||
$passOp = true) ||
|
||||
(($fn = "op${ucOpName}") &&
|
||||
\is_callable([$this, $fn]) &&
|
||||
$genOp = true)
|
||||
) {
|
||||
$shouldEval = $inParens || $inExp;
|
||||
|
||||
if (isset($passOp)) {
|
||||
$out = $this->$fn($op, $left, $right, $shouldEval);
|
||||
} else {
|
||||
$out = $this->$fn($left, $right, $shouldEval);
|
||||
}
|
||||
|
||||
if (isset($out)) {
|
||||
return $out;
|
||||
}
|
||||
if (isset($out)) {
|
||||
return $out;
|
||||
}
|
||||
|
||||
return $this->expToString($value);
|
||||
|
@ -3867,11 +3892,12 @@ EOL;
|
|||
|
||||
// Special functions overriding a CSS function are case-insensitive. We normalize them as lowercase
|
||||
// to avoid the deprecation warning about the wrong case being used.
|
||||
if ($lowercasedName === 'min' || $lowercasedName === 'max') {
|
||||
if ($lowercasedName === 'min' || $lowercasedName === 'max' || $lowercasedName === 'rgb' || $lowercasedName === 'rgba' || $lowercasedName === 'hsl' || $lowercasedName === 'hsla') {
|
||||
$normalizedName = $lowercasedName;
|
||||
}
|
||||
|
||||
if (($f = $this->getBuiltinFunction($normalizedName)) && \is_callable($f)) {
|
||||
/** @var string $libName */
|
||||
$libName = $f[1];
|
||||
$prototype = isset(static::$$libName) ? static::$$libName : null;
|
||||
|
||||
|
@ -5517,11 +5543,11 @@ EOL;
|
|||
{
|
||||
switch ($style) {
|
||||
case OutputStyle::EXPANDED:
|
||||
$this->formatter = Expanded::class;
|
||||
$this->configuredFormatter = Expanded::class;
|
||||
break;
|
||||
|
||||
case OutputStyle::COMPRESSED:
|
||||
$this->formatter = Compressed::class;
|
||||
$this->configuredFormatter = Compressed::class;
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -5539,6 +5565,8 @@ EOL;
|
|||
* @return void
|
||||
*
|
||||
* @deprecated Use {@see setOutputStyle} instead.
|
||||
*
|
||||
* @phpstan-param class-string<Formatter> $formatterName
|
||||
*/
|
||||
public function setFormatter($formatterName)
|
||||
{
|
||||
|
@ -5547,7 +5575,7 @@ EOL;
|
|||
}
|
||||
@trigger_error('The method "setFormatter" is deprecated. Use "setOutputStyle" instead.', E_USER_DEPRECATED);
|
||||
|
||||
$this->formatter = $formatterName;
|
||||
$this->configuredFormatter = $formatterName;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -5688,6 +5716,10 @@ EOL;
|
|||
// see if tree is cached
|
||||
$realPath = realpath($path);
|
||||
|
||||
if ($realPath === false) {
|
||||
$realPath = $path;
|
||||
}
|
||||
|
||||
if (substr($path, -5) === '.sass') {
|
||||
$this->sourceIndex = \count($this->sourceNames);
|
||||
$this->sourceNames[] = $path;
|
||||
|
@ -6031,6 +6063,8 @@ EOL;
|
|||
*
|
||||
* @param string $msg Message with optional sprintf()-style vararg parameters
|
||||
*
|
||||
* @return never
|
||||
*
|
||||
* @throws \ScssPhp\ScssPhp\Exception\CompilerException
|
||||
*
|
||||
* @deprecated use "error" and throw the exception in the caller instead.
|
||||
|
@ -6050,7 +6084,8 @@ EOL;
|
|||
*
|
||||
* @internal
|
||||
*
|
||||
* @param string $msg Message with optional sprintf()-style vararg parameters
|
||||
* @param string $msg Message with optional sprintf()-style vararg parameters
|
||||
* @param bool|float|int|string|null ...$args
|
||||
*
|
||||
* @return CompilerException
|
||||
*/
|
||||
|
@ -6168,6 +6203,8 @@ EOL;
|
|||
*
|
||||
* @param string $name
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @throws \Exception
|
||||
*/
|
||||
protected function handleImportLoop($name)
|
||||
|
@ -6362,6 +6399,9 @@ EOL;
|
|||
if (\in_array($functionName, ['libRgb', 'libRgba', 'libHsl', 'libHsla'])) {
|
||||
// notation 100 127 255 / 0 is in fact a simple list of 4 values
|
||||
foreach ($args as $k => $arg) {
|
||||
if (!isset($arg[1])) {
|
||||
continue; // This happens when using a trailing comma
|
||||
}
|
||||
if ($arg[1][0] === Type::T_LIST && \count($arg[1][2]) === 3) {
|
||||
$args[$k][1][2] = $this->extractSlashAlphaInColorFunction($arg[1][2]);
|
||||
}
|
||||
|
@ -6794,7 +6834,7 @@ EOL;
|
|||
$prototype = ['arguments' => [], 'rest_argument' => null];
|
||||
$originalRestArgumentName = null;
|
||||
|
||||
foreach ($argDef as $i => $arg) {
|
||||
foreach ($argDef as $arg) {
|
||||
list($name, $default, $isVariable) = $arg;
|
||||
$normalizedName = str_replace('_', '-', $name);
|
||||
|
||||
|
@ -7262,6 +7302,8 @@ EOL;
|
|||
protected function coerceString($value)
|
||||
{
|
||||
if ($value[0] === Type::T_STRING) {
|
||||
assert(\is_array($value));
|
||||
|
||||
return $value;
|
||||
}
|
||||
|
||||
|
@ -7365,6 +7407,7 @@ EOL;
|
|||
if ($value[0] !== Type::T_LIST) {
|
||||
throw $this->error('expecting list, %s received', $value[0]);
|
||||
}
|
||||
assert(\is_array($value));
|
||||
|
||||
return $value;
|
||||
}
|
||||
|
@ -7534,7 +7577,7 @@ EOL;
|
|||
$h = 60 * ($green - $blue) / $d;
|
||||
} elseif ($green == $max) {
|
||||
$h = 60 * ($blue - $red) / $d + 120;
|
||||
} elseif ($blue == $max) {
|
||||
} else {
|
||||
$h = 60 * ($red - $green) / $d + 240;
|
||||
}
|
||||
}
|
||||
|
@ -7613,9 +7656,9 @@ EOL;
|
|||
*
|
||||
* @api
|
||||
*
|
||||
* @param int $hue H from 0 to 360
|
||||
* @param int $whiteness W from 0 to 100
|
||||
* @param int $blackness B from 0 to 100
|
||||
* @param int|float $hue H from 0 to 360
|
||||
* @param int|float $whiteness W from 0 to 100
|
||||
* @param int|float $blackness B from 0 to 100
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
|
@ -7666,7 +7709,7 @@ EOL;
|
|||
$h = 60 * ($green - $blue) / $d;
|
||||
} elseif ($green == $max) {
|
||||
$h = 60 * ($blue - $red) / $d + 120;
|
||||
} elseif ($blue == $max) {
|
||||
} else {
|
||||
$h = 60 * ($red - $green) / $d + 240;
|
||||
}
|
||||
}
|
||||
|
@ -7790,6 +7833,14 @@ EOL;
|
|||
['channels'],
|
||||
['red', 'green', 'blue'],
|
||||
['red', 'green', 'blue', 'alpha'] ];
|
||||
|
||||
/**
|
||||
* @param array $args
|
||||
* @param array $kwargs
|
||||
* @param string $funcName
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected function libRgb($args, $kwargs, $funcName = 'rgb')
|
||||
{
|
||||
switch (\count($args)) {
|
||||
|
@ -7872,14 +7923,7 @@ EOL;
|
|||
$scale = $operation === 'scale';
|
||||
$change = $operation === 'change';
|
||||
|
||||
/**
|
||||
* @param string $name
|
||||
* @param float|int $max
|
||||
* @param bool $checkPercent
|
||||
* @param bool $assertPercent
|
||||
*
|
||||
* @return float|int|null
|
||||
*/
|
||||
/** @phpstan-var callable(string, float|int, bool=, bool=): (float|int|null) $getParam */
|
||||
$getParam = function ($name, $max, $checkPercent = false, $assertPercent = false) use (&$kwargs, $scale, $change) {
|
||||
if (!isset($kwargs[$name])) {
|
||||
return null;
|
||||
|
@ -7903,7 +7947,11 @@ EOL;
|
|||
$max = 100;
|
||||
}
|
||||
|
||||
return $number->valueInRange($change ? 0 : -$max, $max, $name);
|
||||
if ($scale || $assertPercent) {
|
||||
return $number->valueInRange($change ? 0 : -$max, $max, $name);
|
||||
}
|
||||
|
||||
return $number->valueInRangeWithUnit($change ? 0 : -$max, $max, $name, $checkPercent ? '%' : '');
|
||||
};
|
||||
|
||||
$alpha = $getParam('alpha', 1);
|
||||
|
@ -7938,7 +7986,6 @@ EOL;
|
|||
$hasRgb = $red !== null || $green !== null || $blue !== null;
|
||||
$hasSL = $saturation !== null || $lightness !== null;
|
||||
$hasWB = $whiteness !== null || $blackness !== null;
|
||||
$found = false;
|
||||
|
||||
if ($hasRgb && ($hasSL || $hasWB || $hue !== null)) {
|
||||
throw new SassScriptException(sprintf('RGB parameters may not be passed along with %s parameters.', $hasWB ? 'HWB' : 'HSL'));
|
||||
|
@ -8159,6 +8206,14 @@ EOL;
|
|||
['hue', 'saturation'],
|
||||
['hue', 'saturation', 'lightness'],
|
||||
['hue', 'saturation', 'lightness', 'alpha'] ];
|
||||
|
||||
/**
|
||||
* @param array $args
|
||||
* @param array $kwargs
|
||||
* @param string $funcName
|
||||
*
|
||||
* @return array|null
|
||||
*/
|
||||
protected function libHsl($args, $kwargs, $funcName = 'hsl')
|
||||
{
|
||||
$args_to_check = $args;
|
||||
|
@ -8183,7 +8238,7 @@ EOL;
|
|||
throw new SassScriptException('Missing argument $lightness.');
|
||||
}
|
||||
|
||||
foreach ($kwargs as $k => $arg) {
|
||||
foreach ($kwargs as $arg) {
|
||||
if (in_array($arg[0], [Type::T_FUNCTION_CALL, Type::T_FUNCTION]) && in_array($arg[1], ['min', 'max'])) {
|
||||
return null;
|
||||
}
|
||||
|
@ -8531,7 +8586,7 @@ EOL;
|
|||
$color = $this->assertColor($args[0], 'color');
|
||||
$amount = $this->assertNumber($args[1], 'amount');
|
||||
|
||||
$color[4] = (isset($color[4]) ? $color[4] : 1) + $amount->valueInRange(0, 1, 'amount');
|
||||
$color[4] = (isset($color[4]) ? $color[4] : 1) + $amount->valueInRangeWithUnit(0, 1, 'amount', '');
|
||||
$color[4] = min(1, max(0, $color[4]));
|
||||
|
||||
return $color;
|
||||
|
@ -8550,7 +8605,7 @@ EOL;
|
|||
$color = $this->assertColor($args[0], 'color');
|
||||
$amount = $this->assertNumber($args[1], 'amount');
|
||||
|
||||
$color[4] = (isset($color[4]) ? $color[4] : 1) - $amount->valueInRange(0, 1, 'amount');
|
||||
$color[4] = (isset($color[4]) ? $color[4] : 1) - $amount->valueInRangeWithUnit(0, 1, 'amount', '');
|
||||
$color[4] = min(1, max(0, $color[4]));
|
||||
|
||||
return $color;
|
||||
|
@ -8718,7 +8773,7 @@ will be an error in future versions of Sass.\n on line $line of $fname";
|
|||
protected function libNth($args)
|
||||
{
|
||||
$list = $this->coerceList($args[0], ',', false);
|
||||
$n = $this->assertNumber($args[1])->getDimension();
|
||||
$n = $this->assertInteger($args[1]);
|
||||
|
||||
if ($n > 0) {
|
||||
$n--;
|
||||
|
@ -8733,7 +8788,7 @@ will be an error in future versions of Sass.\n on line $line of $fname";
|
|||
protected function libSetNth($args)
|
||||
{
|
||||
$list = $this->coerceList($args[0]);
|
||||
$n = $this->assertNumber($args[1])->getDimension();
|
||||
$n = $this->assertInteger($args[1]);
|
||||
|
||||
if ($n > 0) {
|
||||
$n--;
|
||||
|
@ -9350,7 +9405,7 @@ will be an error in future versions of Sass.\n on line $line of $fname";
|
|||
$index = $index - 1;
|
||||
}
|
||||
if ($index < 0) {
|
||||
$index = Util::mbStrlen($stringContent) + 1 + $index;
|
||||
$index = max(Util::mbStrlen($stringContent) + 1 + $index, 0);
|
||||
}
|
||||
|
||||
$string[2] = [
|
||||
|
@ -9538,7 +9593,25 @@ will be an error in future versions of Sass.\n on line $line of $fname";
|
|||
protected function libRandom($args)
|
||||
{
|
||||
if (isset($args[0]) && $args[0] !== static::$null) {
|
||||
$n = $this->assertInteger($args[0], 'limit');
|
||||
$limit = $this->assertNumber($args[0], 'limit');
|
||||
|
||||
if ($limit->hasUnits()) {
|
||||
$unitString = $limit->unitStr();
|
||||
$message = <<<TXT
|
||||
random() will no longer ignore \$limit units ($limit) in a future release.
|
||||
|
||||
Recommendation: random(\$limit / 1$unitString) * 1$unitString
|
||||
|
||||
To preserve current behavior: random(\$limit / 1$unitString)
|
||||
|
||||
More info: https://sass-lang.com/d/random-with-units
|
||||
|
||||
TXT;
|
||||
|
||||
Warn::deprecation($this->addLocationToMessage($message));
|
||||
}
|
||||
|
||||
$n = $this->assertInteger($limit, 'limit');
|
||||
|
||||
if ($n < 1) {
|
||||
throw new SassScriptException("\$limit: Must be greater than 0, was $n.");
|
||||
|
@ -10003,6 +10076,8 @@ will be an error in future versions of Sass.\n on line $line of $fname";
|
|||
$selectorsMap[] = $this->getSelectorArg($arg, 'selector', true);
|
||||
}
|
||||
|
||||
assert(!empty($selectorsMap));
|
||||
|
||||
$envs = [];
|
||||
|
||||
foreach ($selectorsMap as $selectors) {
|
||||
|
|
|
@ -22,7 +22,8 @@ namespace ScssPhp\ScssPhp\Exception;
|
|||
class ParserException extends \Exception implements SassException
|
||||
{
|
||||
/**
|
||||
* @var array
|
||||
* @var array|null
|
||||
* @phpstan-var array{string, int, int}|null
|
||||
*/
|
||||
private $sourcePosition;
|
||||
|
||||
|
@ -30,6 +31,9 @@ class ParserException extends \Exception implements SassException
|
|||
* Get source position
|
||||
*
|
||||
* @api
|
||||
*
|
||||
* @return array|null
|
||||
* @phpstan-return array{string, int, int}|null
|
||||
*/
|
||||
public function getSourcePosition()
|
||||
{
|
||||
|
@ -42,6 +46,10 @@ class ParserException extends \Exception implements SassException
|
|||
* @api
|
||||
*
|
||||
* @param array $sourcePosition
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @phpstan-param array{string, int, int} $sourcePosition
|
||||
*/
|
||||
public function setSourcePosition($sourcePosition)
|
||||
{
|
||||
|
|
|
@ -286,9 +286,18 @@ abstract class Formatter
|
|||
|
||||
ob_start();
|
||||
|
||||
$this->block($block);
|
||||
try {
|
||||
$this->block($block);
|
||||
} catch (\Exception $e) {
|
||||
ob_end_clean();
|
||||
throw $e;
|
||||
} catch (\Throwable $e) {
|
||||
ob_end_clean();
|
||||
throw $e;
|
||||
}
|
||||
|
||||
$out = ob_get_clean();
|
||||
assert($out !== false);
|
||||
|
||||
return $out;
|
||||
}
|
||||
|
@ -331,6 +340,8 @@ abstract class Formatter
|
|||
// If the written line starts is empty, adding a mapping would add it for
|
||||
// a non-existent column as we are at the end of the line
|
||||
if ($line !== '') {
|
||||
assert($this->currentBlock->sourceLine !== null);
|
||||
assert($this->currentBlock->sourceName !== null);
|
||||
$this->sourceMapGenerator->addMapping(
|
||||
$this->currentLine,
|
||||
$this->currentColumn,
|
||||
|
@ -346,6 +357,8 @@ abstract class Formatter
|
|||
}
|
||||
|
||||
if ($lastLine !== '') {
|
||||
assert($this->currentBlock->sourceLine !== null);
|
||||
assert($this->currentBlock->sourceName !== null);
|
||||
$this->sourceMapGenerator->addMapping(
|
||||
$this->currentLine,
|
||||
$this->currentColumn,
|
||||
|
|
|
@ -57,7 +57,9 @@ class Expanded extends Formatter
|
|||
|
||||
foreach ($block->lines as $index => $line) {
|
||||
if (substr($line, 0, 2) === '/*') {
|
||||
$block->lines[$index] = preg_replace('/\r\n?|\n|\f/', $this->break, $line);
|
||||
$replacedLine = preg_replace('/\r\n?|\n|\f/', $this->break, $line);
|
||||
assert($replacedLine !== null);
|
||||
$block->lines[$index] = $replacedLine;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -68,7 +68,9 @@ class Nested extends Formatter
|
|||
|
||||
foreach ($block->lines as $index => $line) {
|
||||
if (substr($line, 0, 2) === '/*') {
|
||||
$block->lines[$index] = preg_replace('/\r\n?|\n|\f/', $this->break, $line);
|
||||
$replacedLine = preg_replace('/\r\n?|\n|\f/', $this->break, $line);
|
||||
assert($replacedLine !== null);
|
||||
$block->lines[$index] = $replacedLine;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ namespace ScssPhp\ScssPhp\Formatter;
|
|||
class OutputBlock
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
* @var string|null
|
||||
*/
|
||||
public $type;
|
||||
|
||||
|
|
|
@ -14,6 +14,8 @@ namespace ScssPhp\ScssPhp\Logger;
|
|||
|
||||
/**
|
||||
* A logger that silently ignores all messages.
|
||||
*
|
||||
* @final
|
||||
*/
|
||||
class QuietLogger implements LoggerInterface
|
||||
{
|
||||
|
|
|
@ -14,6 +14,8 @@ namespace ScssPhp\ScssPhp\Logger;
|
|||
|
||||
/**
|
||||
* A logger that prints to a PHP stream (for instance stderr)
|
||||
*
|
||||
* @final
|
||||
*/
|
||||
class StreamLogger implements LoggerInterface
|
||||
{
|
||||
|
|
|
@ -227,6 +227,16 @@ class Number extends Node implements \ArrayAccess
|
|||
return \count($this->numeratorUnits) === 0 && \count($this->denominatorUnits) === 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the number has any units
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function hasUnits()
|
||||
{
|
||||
return !$this->unitless();
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether the number has exactly this unit
|
||||
*
|
||||
|
@ -266,7 +276,27 @@ class Number extends Node implements \ArrayAccess
|
|||
try {
|
||||
return Util::checkRange('', new Range($min, $max), $this);
|
||||
} catch (RangeException $e) {
|
||||
throw SassScriptException::forArgument(sprintf('Expected %s to be within %s%s and %s%3$s', $this, $min, $this->unitStr(), $max), $name);
|
||||
throw SassScriptException::forArgument(sprintf('Expected %s to be within %s%s and %s%3$s.', $this, $min, $this->unitStr(), $max), $name);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param float|int $min
|
||||
* @param float|int $max
|
||||
* @param string $name
|
||||
* @param string $unit
|
||||
*
|
||||
* @return float|int
|
||||
* @throws SassScriptException
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
public function valueInRangeWithUnit($min, $max, $name, $unit)
|
||||
{
|
||||
try {
|
||||
return Util::checkRange('', new Range($min, $max), $this);
|
||||
} catch (RangeException $e) {
|
||||
throw SassScriptException::forArgument(sprintf('Expected %s to be within %s%s and %s%3$s.', $this, $min, $unit, $max), $name);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -27,6 +27,7 @@ use ScssPhp\ScssPhp\Block\WhileBlock;
|
|||
use ScssPhp\ScssPhp\Exception\ParserException;
|
||||
use ScssPhp\ScssPhp\Logger\LoggerInterface;
|
||||
use ScssPhp\ScssPhp\Logger\QuietLogger;
|
||||
use ScssPhp\ScssPhp\Node\Number;
|
||||
|
||||
/**
|
||||
* Parser
|
||||
|
@ -85,10 +86,6 @@ class Parser
|
|||
* @var array<int, int>
|
||||
*/
|
||||
private $sourcePositions;
|
||||
/**
|
||||
* @var array|null
|
||||
*/
|
||||
private $charset;
|
||||
/**
|
||||
* The current offset in the buffer
|
||||
*
|
||||
|
@ -147,11 +144,9 @@ class Parser
|
|||
{
|
||||
$this->sourceName = $sourceName ?: '(stdin)';
|
||||
$this->sourceIndex = $sourceIndex;
|
||||
$this->charset = null;
|
||||
$this->utf8 = ! $encoding || strtolower($encoding) === 'utf-8';
|
||||
$this->patternModifiers = $this->utf8 ? 'Aisu' : 'Ais';
|
||||
$this->commentsSeen = [];
|
||||
$this->commentsSeen = [];
|
||||
$this->allowVars = true;
|
||||
$this->cssOnly = $cssOnly;
|
||||
$this->logger = $logger ?: new QuietLogger();
|
||||
|
@ -255,7 +250,6 @@ class Parser
|
|||
if ($this->cache) {
|
||||
$cacheKey = $this->sourceName . ':' . md5($buffer);
|
||||
$parseOptions = [
|
||||
'charset' => $this->charset,
|
||||
'utf8' => $this->utf8,
|
||||
];
|
||||
$v = $this->cache->getCache('parse', $cacheKey, $parseOptions);
|
||||
|
@ -296,11 +290,8 @@ class Parser
|
|||
throw $this->parseError('unclosed block');
|
||||
}
|
||||
|
||||
if ($this->charset) {
|
||||
array_unshift($this->env->children, $this->charset);
|
||||
}
|
||||
|
||||
$this->restoreEncoding();
|
||||
assert($this->env !== null);
|
||||
|
||||
if ($this->cache) {
|
||||
$this->cache->setCache('parse', $cacheKey, $this->env, $parseOptions);
|
||||
|
@ -380,8 +371,8 @@ class Parser
|
|||
*
|
||||
* @api
|
||||
*
|
||||
* @param string $buffer
|
||||
* @param string|array $out
|
||||
* @param string $buffer
|
||||
* @param array $out
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
|
@ -827,18 +818,6 @@ class Parser
|
|||
$this->valueList($charset) &&
|
||||
$this->end()
|
||||
) {
|
||||
if (! isset($this->charset)) {
|
||||
$statement = [Type::T_CHARSET, $charset];
|
||||
|
||||
list($line, $column) = $this->getSourcePosition($s);
|
||||
|
||||
$statement[static::SOURCE_LINE] = $line;
|
||||
$statement[static::SOURCE_COLUMN] = $column;
|
||||
$statement[static::SOURCE_INDEX] = $this->sourceIndex;
|
||||
|
||||
$this->charset = $statement;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -1074,6 +1053,8 @@ class Parser
|
|||
$block = $this->popBlock();
|
||||
|
||||
if (! isset($block->type) || $block->type !== Type::T_IF) {
|
||||
assert($this->env !== null);
|
||||
|
||||
if ($this->env->parent) {
|
||||
$this->append(null); // collect comments before next statement if needed
|
||||
}
|
||||
|
@ -1093,6 +1074,7 @@ class Parser
|
|||
// collect comments just after the block closing if needed
|
||||
if ($this->eatWhiteDefault) {
|
||||
$this->whitespace();
|
||||
assert($this->env !== null);
|
||||
|
||||
if ($this->env->comments) {
|
||||
$this->append(null);
|
||||
|
@ -1161,6 +1143,7 @@ class Parser
|
|||
// collect comments at the beginning of a block if needed
|
||||
if ($this->eatWhiteDefault) {
|
||||
$this->whitespace();
|
||||
assert($this->env !== null);
|
||||
|
||||
if ($this->env->comments) {
|
||||
$this->append(null);
|
||||
|
@ -1195,6 +1178,7 @@ class Parser
|
|||
*/
|
||||
protected function popBlock()
|
||||
{
|
||||
assert($this->env !== null);
|
||||
|
||||
// collect comments ending just before of a block closing
|
||||
if ($this->env->comments) {
|
||||
|
@ -1245,6 +1229,8 @@ class Parser
|
|||
* Seek to position in input stream (or return current position in input stream)
|
||||
*
|
||||
* @param int $where
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function seek($where)
|
||||
{
|
||||
|
@ -1257,6 +1243,8 @@ class Parser
|
|||
* @param array|false $parsed
|
||||
* @param int $startPos
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @throws ParserException
|
||||
*/
|
||||
protected function assertPlainCssValid($parsed, $startPos = null)
|
||||
|
@ -1288,7 +1276,7 @@ class Parser
|
|||
* @param array $parsed
|
||||
* @param bool $allowExpression
|
||||
*
|
||||
* @return bool|array
|
||||
* @return array|false
|
||||
*/
|
||||
protected function isPlainCssValidElement($parsed, $allowExpression = false)
|
||||
{
|
||||
|
@ -1468,6 +1456,8 @@ class Parser
|
|||
* @param string $delim Delimiter
|
||||
*
|
||||
* @return bool True if match; false otherwise
|
||||
*
|
||||
* @phpstan-impure
|
||||
*/
|
||||
protected function matchString(&$m, $delim)
|
||||
{
|
||||
|
@ -1508,6 +1498,8 @@ class Parser
|
|||
* @param bool $eatWhitespace
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @phpstan-impure
|
||||
*/
|
||||
protected function match($regex, &$out, $eatWhitespace = null)
|
||||
{
|
||||
|
@ -1537,6 +1529,8 @@ class Parser
|
|||
* @param bool $eatWhitespace
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @phpstan-impure
|
||||
*/
|
||||
protected function matchChar($char, $eatWhitespace = null)
|
||||
{
|
||||
|
@ -1565,6 +1559,8 @@ class Parser
|
|||
* @param bool $eatWhitespace
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @phpstan-impure
|
||||
*/
|
||||
protected function literal($what, $len, $eatWhitespace = null)
|
||||
{
|
||||
|
@ -1589,6 +1585,8 @@ class Parser
|
|||
* Match some whitespace
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @phpstan-impure
|
||||
*/
|
||||
protected function whitespace()
|
||||
{
|
||||
|
@ -1640,20 +1638,20 @@ class Parser
|
|||
|
||||
if (! $comment) {
|
||||
// single part static comment
|
||||
$this->appendComment([Type::T_COMMENT, $c]);
|
||||
$commentStatement = [Type::T_COMMENT, $c];
|
||||
} else {
|
||||
$comment[] = $c;
|
||||
$staticComment = substr($this->buffer, $startCommentCount, $endCommentCount - $startCommentCount);
|
||||
$commentStatement = [Type::T_COMMENT, $staticComment, [Type::T_STRING, '', $comment]];
|
||||
|
||||
list($line, $column) = $this->getSourcePosition($startCommentCount);
|
||||
$commentStatement[self::SOURCE_LINE] = $line;
|
||||
$commentStatement[self::SOURCE_COLUMN] = $column;
|
||||
$commentStatement[self::SOURCE_INDEX] = $this->sourceIndex;
|
||||
|
||||
$this->appendComment($commentStatement);
|
||||
}
|
||||
|
||||
list($line, $column) = $this->getSourcePosition($startCommentCount);
|
||||
$commentStatement[self::SOURCE_LINE] = $line;
|
||||
$commentStatement[self::SOURCE_COLUMN] = $column;
|
||||
$commentStatement[self::SOURCE_INDEX] = $this->sourceIndex;
|
||||
|
||||
$this->appendComment($commentStatement);
|
||||
|
||||
$this->commentsSeen[$startCommentCount] = true;
|
||||
$this->count = $endCommentCount;
|
||||
} else {
|
||||
|
@ -1675,9 +1673,13 @@ class Parser
|
|||
* Append comment to current block
|
||||
*
|
||||
* @param array $comment
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function appendComment($comment)
|
||||
{
|
||||
assert($this->env !== null);
|
||||
|
||||
if (! $this->discardComments) {
|
||||
$this->env->comments[] = $comment;
|
||||
}
|
||||
|
@ -1688,9 +1690,13 @@ class Parser
|
|||
*
|
||||
* @param array|null $statement
|
||||
* @param int $pos
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function append($statement, $pos = null)
|
||||
{
|
||||
assert($this->env !== null);
|
||||
|
||||
if (! \is_null($statement)) {
|
||||
! $this->cssOnly || ($statement = $this->assertPlainCssValid($statement, $pos));
|
||||
|
||||
|
@ -1720,11 +1726,15 @@ class Parser
|
|||
*/
|
||||
protected function last()
|
||||
{
|
||||
assert($this->env !== null);
|
||||
|
||||
$i = \count($this->env->children) - 1;
|
||||
|
||||
if (isset($this->env->children[$i])) {
|
||||
return $this->env->children[$i];
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2069,10 +2079,12 @@ class Parser
|
|||
/**
|
||||
* Parse directive value list that considers $vars as keyword
|
||||
*
|
||||
* @param array $out
|
||||
* @param bool|string $endChar
|
||||
* @param array $out
|
||||
* @param string|false $endChar
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @phpstan-impure
|
||||
*/
|
||||
protected function directiveValue(&$out, $endChar = false)
|
||||
{
|
||||
|
@ -2211,6 +2223,7 @@ class Parser
|
|||
{
|
||||
$s = $this->count;
|
||||
$items = [];
|
||||
/** @var array|Number|null $value */
|
||||
$value = null;
|
||||
|
||||
while ($this->$parseItem($value)) {
|
||||
|
@ -2224,9 +2237,12 @@ class Parser
|
|||
|
||||
$trailing_delim = true;
|
||||
} else {
|
||||
assert(\is_array($value) || $value instanceof Number);
|
||||
// if no delim watch that a keyword didn't eat the single/double quote
|
||||
// from the following starting string
|
||||
if ($value[0] === Type::T_KEYWORD) {
|
||||
assert(\is_array($value));
|
||||
/** @var string $word */
|
||||
$word = $value[1];
|
||||
|
||||
$last_char = substr($word, -1);
|
||||
|
@ -2251,8 +2267,10 @@ class Parser
|
|||
$this->count--;
|
||||
}
|
||||
|
||||
/** @var array|Number|null $nextValue */
|
||||
$nextValue = null;
|
||||
if ($this->$parseItem($nextValue)) {
|
||||
assert(\is_array($nextValue) || $nextValue instanceof Number);
|
||||
if ($nextValue[0] === Type::T_KEYWORD && $nextValue[1] === $last_char) {
|
||||
// bad try, forget it
|
||||
$this->seek($currentCount);
|
||||
|
@ -2306,6 +2324,8 @@ class Parser
|
|||
* @param bool $lookForExp
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @phpstan-impure
|
||||
*/
|
||||
protected function expression(&$out, $listOnly = false, $lookForExp = true)
|
||||
{
|
||||
|
@ -2366,12 +2386,14 @@ class Parser
|
|||
/**
|
||||
* Parse expression specifically checking for lists in parenthesis or brackets
|
||||
*
|
||||
* @param array $out
|
||||
* @param int $s
|
||||
* @param string $closingParen
|
||||
* @param array $allowedTypes
|
||||
* @param array $out
|
||||
* @param int $s
|
||||
* @param string $closingParen
|
||||
* @param string[] $allowedTypes
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @phpstan-param array<Type::*> $allowedTypes
|
||||
*/
|
||||
protected function enclosedExpression(&$out, $s, $closingParen = ')', $allowedTypes = [Type::T_LIST, Type::T_MAP])
|
||||
{
|
||||
|
@ -2439,7 +2461,7 @@ class Parser
|
|||
$whiteBefore = isset($this->buffer[$this->count - 1]) &&
|
||||
ctype_space($this->buffer[$this->count - 1]);
|
||||
|
||||
while ($this->match($operators, $m, false) && static::$precedence[$m[1]] >= $minP) {
|
||||
while ($this->match($operators, $m, false) && static::$precedence[strtolower($m[1])] >= $minP) {
|
||||
$whiteAfter = isset($this->buffer[$this->count]) &&
|
||||
ctype_space($this->buffer[$this->count]);
|
||||
$varAfter = isset($this->buffer[$this->count]) &&
|
||||
|
@ -2463,7 +2485,7 @@ class Parser
|
|||
}
|
||||
|
||||
// consume higher-precedence operators on the right-hand side
|
||||
$rhs = $this->expHelper($rhs, static::$precedence[$op] + 1);
|
||||
$rhs = $this->expHelper($rhs, static::$precedence[strtolower($op)] + 1);
|
||||
|
||||
$lhs = [Type::T_EXPRESSION, $op, $lhs, $rhs, $this->inParens, $whiteBefore, $whiteAfter];
|
||||
|
||||
|
@ -2782,6 +2804,10 @@ class Parser
|
|||
$this->argValues($args) &&
|
||||
$this->matchChar(')')
|
||||
) {
|
||||
if (strtolower($name) === 'var' && \count($args) === 2 && $args[1][0] === Type::T_NULL) {
|
||||
$args[1] = [null, [Type::T_STRING, '', [' ']], false];
|
||||
}
|
||||
|
||||
$func = [Type::T_FUNCTION_CALL, $name, $args];
|
||||
|
||||
return true;
|
||||
|
@ -4016,7 +4042,7 @@ class Parser
|
|||
*
|
||||
* @param array $value
|
||||
*
|
||||
* @return array
|
||||
* @return string[]
|
||||
*/
|
||||
protected function stripAssignmentFlags(&$value)
|
||||
{
|
||||
|
@ -4043,7 +4069,7 @@ class Parser
|
|||
*
|
||||
* @param array $selectors
|
||||
*
|
||||
* @return string
|
||||
* @return bool
|
||||
*/
|
||||
protected function stripOptionalFlag(&$selectors)
|
||||
{
|
||||
|
@ -4092,6 +4118,8 @@ class Parser
|
|||
* Extract line numbers from buffer
|
||||
*
|
||||
* @param string $buffer
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
private function extractLineNumbers($buffer)
|
||||
{
|
||||
|
@ -4116,6 +4144,7 @@ class Parser
|
|||
* @param int $pos
|
||||
*
|
||||
* @return array
|
||||
* @phpstan-return array{int, int}
|
||||
*/
|
||||
private function getSourcePosition($pos)
|
||||
{
|
||||
|
|
|
@ -107,7 +107,7 @@ class SourceMapGenerator
|
|||
*/
|
||||
public function __construct(array $options = [])
|
||||
{
|
||||
$this->options = array_merge($this->defaultOptions, $options);
|
||||
$this->options = array_replace($this->defaultOptions, $options);
|
||||
$this->encoder = new Base64VLQ();
|
||||
}
|
||||
|
||||
|
@ -140,7 +140,7 @@ class SourceMapGenerator
|
|||
*
|
||||
* @param string $content The content to write
|
||||
*
|
||||
* @return string
|
||||
* @return string|null
|
||||
*
|
||||
* @throws \ScssPhp\ScssPhp\Exception\CompilerException If the file could not be saved
|
||||
* @deprecated
|
||||
|
@ -148,6 +148,7 @@ class SourceMapGenerator
|
|||
public function saveMap($content)
|
||||
{
|
||||
$file = $this->options['sourceMapWriteTo'];
|
||||
assert($file !== null);
|
||||
$dir = \dirname($file);
|
||||
|
||||
// directory does not exist
|
||||
|
@ -201,7 +202,7 @@ class SourceMapGenerator
|
|||
// A list of original sources used by the 'mappings' entry.
|
||||
$sourceMap['sources'] = [];
|
||||
|
||||
foreach ($this->sources as $sourceUri => $sourceFilename) {
|
||||
foreach ($this->sources as $sourceFilename) {
|
||||
$sourceMap['sources'][] = $this->normalizeFilename($sourceFilename);
|
||||
}
|
||||
|
||||
|
@ -223,7 +224,15 @@ class SourceMapGenerator
|
|||
unset($sourceMap['sourceRoot']);
|
||||
}
|
||||
|
||||
return json_encode($sourceMap, JSON_UNESCAPED_SLASHES);
|
||||
$jsonSourceMap = json_encode($sourceMap, JSON_UNESCAPED_SLASHES);
|
||||
|
||||
if (json_last_error() !== JSON_ERROR_NONE) {
|
||||
throw new \RuntimeException(json_last_error_msg());
|
||||
}
|
||||
|
||||
assert($jsonSourceMap !== false);
|
||||
|
||||
return $jsonSourceMap;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -19,5 +19,5 @@ namespace ScssPhp\ScssPhp;
|
|||
*/
|
||||
class Version
|
||||
{
|
||||
const VERSION = '1.10.0';
|
||||
const VERSION = '1.11.0';
|
||||
}
|
||||
|
|
|
@ -1,3 +1,11 @@
|
|||
# v1.6.2
|
||||
## 07/25/2022
|
||||
|
||||
1. [](#improved)
|
||||
* RTL Fixes [#37](https://github.com/getgrav/grav-plugin-breadcrumbs/pull/37)
|
||||
2. [](#bugfix)
|
||||
* Composer name invalid format [#38](https://github.com/getgrav/grav-plugin-breadcrumbs/issues/38)
|
||||
|
||||
# v1.6.1
|
||||
## 12/02/2020
|
||||
|
||||
|
@ -8,9 +16,9 @@
|
|||
## 04/22/2020
|
||||
|
||||
1. [](#new)
|
||||
* Added `schema.org/BreadcrumbList` [#29]
|
||||
* Added per-page option to control breadcrumbs [#20]
|
||||
* Added various translations [#17][#18][#19]
|
||||
* Added `schema.org/BreadcrumbList` [#29](https://github.com/getgrav/grav-plugin-breadcrumbs/issues/29)
|
||||
* Added per-page option to control breadcrumbs [#20](https://github.com/getgrav/grav-plugin-breadcrumbs/issues/20)
|
||||
* Added various translations
|
||||
* Pass phpstan level 1 tests
|
||||
* Require Grav v1.6
|
||||
|
||||
|
@ -18,7 +26,7 @@
|
|||
## 10/24/2017
|
||||
|
||||
1. [](#improved)
|
||||
* Add option to ignore current page [#11]
|
||||
* Add option to ignore current page [#11](https://github.com/getgrav/grav-plugin-breadcrumbs/issues/11)
|
||||
* Removed Grav trait in favor of `Grav::instance()`
|
||||
|
||||
# v1.5.0
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
name: Breadcrumbs
|
||||
type: plugin
|
||||
slug: breadcrumbs
|
||||
version: 1.6.1
|
||||
version: 1.6.2
|
||||
description: The **Breadcrumbs** plugin provides a simple method to display the depth of your content/navigation structure.
|
||||
icon: caret-square-o-right
|
||||
author:
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"name": "grav-plugin-breadcrumbs",
|
||||
"name": "getgrav/breadcrumbs","name": "getgrav/breadcrumbs",
|
||||
"type": "grav-plugin",
|
||||
"description": "Breadcrumbs plugin for Grav CMS",
|
||||
"keywords": ["breadcrumbs"],
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
#breadcrumbs {
|
||||
height: 3rem;
|
||||
line-height: 3rem;
|
||||
padding-left: 3rem;
|
||||
padding-inline-start: 3rem;
|
||||
}
|
||||
#breadcrumbs span {
|
||||
display: inline-block;
|
||||
padding: 0 1rem;
|
||||
}
|
||||
#breadcrumbs span:first-child {
|
||||
padding-left: 0;
|
||||
padding-inline-start: 0;
|
||||
}
|
||||
#breadcrumbs i {
|
||||
display: inline-block;
|
||||
|
|
|
@ -1,5 +1,15 @@
|
|||
# v3.2.0
|
||||
## 03/28/2022
|
||||
|
||||
1. [](#new)
|
||||
* Require **Grav 1.7.32** and **Form 6.0.0**
|
||||
1. [](#improved)
|
||||
* Added access email message object inside the twig template file
|
||||
2. [](#bugfix)
|
||||
* Fixed twig not being initialized when building an email message
|
||||
|
||||
# v3.1.5
|
||||
## 01/03/22
|
||||
## 01/03/2022
|
||||
|
||||
1. [](#improved)
|
||||
* Updated to Swiftmailer `v6.3.0` with PHP 8.1 compatibility [#157](https://github.com/getgrav/grav-plugin-email/issues/157)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
name: Email
|
||||
slug: email
|
||||
type: plugin
|
||||
version: 3.1.5
|
||||
version: 3.2.0
|
||||
testing: false
|
||||
description: Enables the emailing system for Grav
|
||||
icon: envelope
|
||||
|
@ -15,8 +15,8 @@ bugs: https://github.com/getgrav/grav-plugin-email/issues
|
|||
license: MIT
|
||||
|
||||
dependencies:
|
||||
- { name: grav, version: '>=1.6.0' }
|
||||
- { name: form, version: '>=3.0.3' }
|
||||
- { name: grav, version: '>=1.7.32' }
|
||||
- { name: form, version: '>=6.0.0' }
|
||||
|
||||
form:
|
||||
validation: loose
|
||||
|
|
|
@ -136,6 +136,7 @@ class Email
|
|||
{
|
||||
/** @var Twig $twig */
|
||||
$twig = Grav::instance()['twig'];
|
||||
$twig->init();
|
||||
|
||||
/** @var Config $config */
|
||||
$config = Grav::instance()['config'];
|
||||
|
@ -143,6 +144,9 @@ class Email
|
|||
/** @var Language $language */
|
||||
$language = Grav::instance()['language'];
|
||||
|
||||
// Create message object.
|
||||
$message = $this->message();
|
||||
|
||||
// Extend parameters with defaults.
|
||||
$params += [
|
||||
'bcc' => $config->get('plugins.email.bcc', []),
|
||||
|
@ -159,12 +163,10 @@ class Email
|
|||
'to' => $config->get('plugins.email.to'),
|
||||
'to_name' => $config->get('plugins.email.to_name'),
|
||||
'process_markdown' => false,
|
||||
'template' => false
|
||||
'template' => false,
|
||||
'message' => $message
|
||||
];
|
||||
|
||||
// Create message object.
|
||||
$message = $this->message();
|
||||
|
||||
if (!$params['to']) {
|
||||
throw new \RuntimeException($language->translate('PLUGIN_EMAIL.PLEASE_CONFIGURE_A_TO_ADDRESS'));
|
||||
}
|
||||
|
@ -233,7 +235,9 @@ class Email
|
|||
break;
|
||||
|
||||
case 'subject':
|
||||
$message->setSubject($twig->processString($language->translate($value), $vars));
|
||||
if ($value) {
|
||||
$message->setSubject($twig->processString($language->translate($value), $vars));
|
||||
}
|
||||
break;
|
||||
|
||||
case 'to':
|
||||
|
|
|
@ -20,14 +20,24 @@
|
|||
"docs": "https://github.com/getgrav/grav-plugin-email/blob/master/README.md"
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.1.3",
|
||||
"php": ">=7.3.6",
|
||||
"swiftmailer/swiftmailer": "~6.0"
|
||||
},
|
||||
"replace": {
|
||||
"symfony/polyfill-iconv": "*",
|
||||
"symfony/polyfill-mbstring": "*",
|
||||
"symfony/polyfill-php72": "*"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Grav\\Plugin\\Email\\": "classes/",
|
||||
"Grav\\Plugin\\Console\\": "cli/"
|
||||
},
|
||||
"classmap": ["email.php"]
|
||||
},
|
||||
"config": {
|
||||
"platform": {
|
||||
"php": "7.3.6"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue