Plugin Directory

Changeset 3327943


Ignore:
Timestamp:
07/15/2025 06:30:09 AM (9 months ago)
Author:
wpblockart
Message:

Update to version 2.2.10 from GitHub

Location:
blockart-blocks
Files:
8 added
62 edited
1 copied

Legend:

Unmodified
Added
Removed
  • blockart-blocks/tags/2.2.10/blockart.php

    r3320504 r3327943  
    55 * Author: WPBlockArt
    66 * Author URI: https://wpblockart.com/
    7  * Version: 2.2.9
     7 * Version: 2.2.10
    88 * Requires at least: 5.5
    99 * Requires PHP: 7.4
     
    2020defined( 'ABSPATH' ) || exit;
    2121
    22 ! defined( 'BLOCKART_VERSION' ) && define( 'BLOCKART_VERSION', '2.2.9' );
     22! defined( 'BLOCKART_VERSION' ) && define( 'BLOCKART_VERSION', '2.2.10' );
    2323! defined( 'BLOCKART_PLUGIN_FILE' ) && define( 'BLOCKART_PLUGIN_FILE', __FILE__ );
    2424! defined( 'BLOCKART_PLUGIN_DIR' ) && define( 'BLOCKART_PLUGIN_DIR', dirname( BLOCKART_PLUGIN_FILE ) );
  • blockart-blocks/tags/2.2.10/changelog.txt

    r3320504 r3327943  
    11== Changelog ==
     2= 2.2.10 - 15-07-2025 =
     3* Fix - PHP Error.
     4
    25= 2.2.9 - 01-07-2025 =
    36* Added - Link Option to Timeline Block.
  • blockart-blocks/tags/2.2.10/includes/RestApi/Controllers/LibraryDataController.php

    r3021722 r3327943  
    100100     */
    101101    protected function prepare_items_for_response( $data, $request ) {
    102         $categorizer = function( $data_to_categorize ) {
     102        $categorizer = function ( $data_to_categorize ) {
    103103            $result = array();
    104104            foreach ( $data_to_categorize as $item ) {
     
    139139     *
    140140     * @param boolean $force
    141      * @return array
     141     *
     142     * @return \WP_Error
    142143     */
    143144    protected function fetch( $force = false ) {
     
    166167            $data = wp_remote_retrieve_body( $response );
    167168            $data = json_decode( $data, true );
    168 
    169             set_transient( '_blockart_library_data', $data, WEEK_IN_SECONDS );
     169            if (
     170                is_array( $data ) &&
     171                isset( $data['sections'], $data['templates'] ) &&
     172                is_array( $data['sections'] ) &&
     173                is_array( $data['templates'] )
     174            ) {
     175                set_transient( '_blockart_library_data', $data, WEEK_IN_SECONDS );
     176            } else {
     177                return new \WP_Error(
     178                    'invalid_data',
     179                    esc_html__( 'Invalid data received from the library.', 'blockart' ),
     180                    array( 'status' => 500 )
     181                );
     182            }
    170183        }
    171184
  • blockart-blocks/tags/2.2.10/includes/Update.php

    r3054382 r3327943  
    4848            $this->update_to_2_0_9();
    4949        }
    50         if ( version_compare( $old_version, '2.1.0', '<' ) ) {
    51             $this->update_to_2_1_0();
     50        if ( version_compare( $old_version, '2.2.10', '<' ) ) {
     51            $this->update_to_2_2_10();
    5252        }
     53
    5354    }
    5455
     
    118119        delete_transient( '_blockart_library_data' );
    119120    }
     121
     122    /**
     123     * Update to 2.2.10.
     124     *
     125     * @return void
     126     */
     127    private function update_to_2_2_10() {
     128        delete_transient( '_blockart_library_data' );
     129    }
    120130}
  • blockart-blocks/tags/2.2.10/readme.txt

    r3320504 r3327943  
    55Tested up to: 6.8
    66Requires PHP: 7.4
    7 Stable tag: 2.2.9
     7Stable tag: 2.2.10
    88License: GPLv3
    99License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    249249
    250250== Changelog ==
     251= 2.2.10 - 15-07-2025 =
     252* Fix - PHP Error.
     253
    251254= 2.2.9 - 01-07-2025 =
    252255* Added - Link Option to Timeline Block.
  • blockart-blocks/tags/2.2.10/vendor/autoload.php

    r3320504 r3327943  
    55require_once __DIR__ . '/composer/autoload_real.php';
    66
    7 return ComposerAutoloaderInit995ba1463eb3e341a332e70ce1584dcf::getLoader();
     7return ComposerAutoloaderInit6e4a9e677d578210d8453abf61d2bef1::getLoader();
  • blockart-blocks/tags/2.2.10/vendor/composer/autoload_classmap.php

    r3306181 r3327943  
    205205    'JsonMachine\\TokensWithDebugging' => $vendorDir . '/halaxa/json-machine/src/TokensWithDebugging.php',
    206206    'JsonMachine\\ValidJsonPointers' => $vendorDir . '/halaxa/json-machine/src/ValidJsonPointers.php',
     207    'Sabberworm\\CSS\\CSSElement' => $vendorDir . '/sabberworm/php-css-parser/src/CSSElement.php',
    207208    'Sabberworm\\CSS\\CSSList\\AtRuleBlockList' => $vendorDir . '/sabberworm/php-css-parser/src/CSSList/AtRuleBlockList.php',
    208209    'Sabberworm\\CSS\\CSSList\\CSSBlockList' => $vendorDir . '/sabberworm/php-css-parser/src/CSSList/CSSBlockList.php',
     
    221222    'Sabberworm\\CSS\\Parsing\\UnexpectedEOFException' => $vendorDir . '/sabberworm/php-css-parser/src/Parsing/UnexpectedEOFException.php',
    222223    'Sabberworm\\CSS\\Parsing\\UnexpectedTokenException' => $vendorDir . '/sabberworm/php-css-parser/src/Parsing/UnexpectedTokenException.php',
     224    'Sabberworm\\CSS\\Position\\Position' => $vendorDir . '/sabberworm/php-css-parser/src/Position/Position.php',
     225    'Sabberworm\\CSS\\Position\\Positionable' => $vendorDir . '/sabberworm/php-css-parser/src/Position/Positionable.php',
    223226    'Sabberworm\\CSS\\Property\\AtRule' => $vendorDir . '/sabberworm/php-css-parser/src/Property/AtRule.php',
    224227    'Sabberworm\\CSS\\Property\\CSSNamespace' => $vendorDir . '/sabberworm/php-css-parser/src/Property/CSSNamespace.php',
  • blockart-blocks/tags/2.2.10/vendor/composer/autoload_real.php

    r3320504 r3327943  
    33// autoload_real.php @generated by Composer
    44
    5 class ComposerAutoloaderInit995ba1463eb3e341a332e70ce1584dcf
     5class ComposerAutoloaderInit6e4a9e677d578210d8453abf61d2bef1
    66{
    77    private static $loader;
     
    2323        }
    2424
    25         spl_autoload_register(array('ComposerAutoloaderInit995ba1463eb3e341a332e70ce1584dcf', 'loadClassLoader'), true, true);
     25        spl_autoload_register(array('ComposerAutoloaderInit6e4a9e677d578210d8453abf61d2bef1', 'loadClassLoader'), true, true);
    2626        self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
    27         spl_autoload_unregister(array('ComposerAutoloaderInit995ba1463eb3e341a332e70ce1584dcf', 'loadClassLoader'));
     27        spl_autoload_unregister(array('ComposerAutoloaderInit6e4a9e677d578210d8453abf61d2bef1', 'loadClassLoader'));
    2828
    2929        $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
     
    3131            require __DIR__ . '/autoload_static.php';
    3232
    33             call_user_func(\Composer\Autoload\ComposerStaticInit995ba1463eb3e341a332e70ce1584dcf::getInitializer($loader));
     33            call_user_func(\Composer\Autoload\ComposerStaticInit6e4a9e677d578210d8453abf61d2bef1::getInitializer($loader));
    3434        } else {
    3535            $map = require __DIR__ . '/autoload_namespaces.php';
     
    5252
    5353        if ($useStaticLoader) {
    54             $includeFiles = Composer\Autoload\ComposerStaticInit995ba1463eb3e341a332e70ce1584dcf::$files;
     54            $includeFiles = Composer\Autoload\ComposerStaticInit6e4a9e677d578210d8453abf61d2bef1::$files;
    5555        } else {
    5656            $includeFiles = require __DIR__ . '/autoload_files.php';
    5757        }
    5858        foreach ($includeFiles as $fileIdentifier => $file) {
    59             composerRequire995ba1463eb3e341a332e70ce1584dcf($fileIdentifier, $file);
     59            composerRequire6e4a9e677d578210d8453abf61d2bef1($fileIdentifier, $file);
    6060        }
    6161
     
    6969 * @return void
    7070 */
    71 function composerRequire995ba1463eb3e341a332e70ce1584dcf($fileIdentifier, $file)
     71function composerRequire6e4a9e677d578210d8453abf61d2bef1($fileIdentifier, $file)
    7272{
    7373    if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
  • blockart-blocks/tags/2.2.10/vendor/composer/autoload_static.php

    r3320504 r3327943  
    55namespace Composer\Autoload;
    66
    7 class ComposerStaticInit995ba1463eb3e341a332e70ce1584dcf
     7class ComposerStaticInit6e4a9e677d578210d8453abf61d2bef1
    88{
    99    public static $files = array (
     
    255255        'JsonMachine\\TokensWithDebugging' => __DIR__ . '/..' . '/halaxa/json-machine/src/TokensWithDebugging.php',
    256256        'JsonMachine\\ValidJsonPointers' => __DIR__ . '/..' . '/halaxa/json-machine/src/ValidJsonPointers.php',
     257        'Sabberworm\\CSS\\CSSElement' => __DIR__ . '/..' . '/sabberworm/php-css-parser/src/CSSElement.php',
    257258        'Sabberworm\\CSS\\CSSList\\AtRuleBlockList' => __DIR__ . '/..' . '/sabberworm/php-css-parser/src/CSSList/AtRuleBlockList.php',
    258259        'Sabberworm\\CSS\\CSSList\\CSSBlockList' => __DIR__ . '/..' . '/sabberworm/php-css-parser/src/CSSList/CSSBlockList.php',
     
    271272        'Sabberworm\\CSS\\Parsing\\UnexpectedEOFException' => __DIR__ . '/..' . '/sabberworm/php-css-parser/src/Parsing/UnexpectedEOFException.php',
    272273        'Sabberworm\\CSS\\Parsing\\UnexpectedTokenException' => __DIR__ . '/..' . '/sabberworm/php-css-parser/src/Parsing/UnexpectedTokenException.php',
     274        'Sabberworm\\CSS\\Position\\Position' => __DIR__ . '/..' . '/sabberworm/php-css-parser/src/Position/Position.php',
     275        'Sabberworm\\CSS\\Position\\Positionable' => __DIR__ . '/..' . '/sabberworm/php-css-parser/src/Position/Positionable.php',
    273276        'Sabberworm\\CSS\\Property\\AtRule' => __DIR__ . '/..' . '/sabberworm/php-css-parser/src/Property/AtRule.php',
    274277        'Sabberworm\\CSS\\Property\\CSSNamespace' => __DIR__ . '/..' . '/sabberworm/php-css-parser/src/Property/CSSNamespace.php',
     
    300303    {
    301304        return \Closure::bind(function () use ($loader) {
    302             $loader->prefixLengthsPsr4 = ComposerStaticInit995ba1463eb3e341a332e70ce1584dcf::$prefixLengthsPsr4;
    303             $loader->prefixDirsPsr4 = ComposerStaticInit995ba1463eb3e341a332e70ce1584dcf::$prefixDirsPsr4;
    304             $loader->classMap = ComposerStaticInit995ba1463eb3e341a332e70ce1584dcf::$classMap;
     305            $loader->prefixLengthsPsr4 = ComposerStaticInit6e4a9e677d578210d8453abf61d2bef1::$prefixLengthsPsr4;
     306            $loader->prefixDirsPsr4 = ComposerStaticInit6e4a9e677d578210d8453abf61d2bef1::$prefixDirsPsr4;
     307            $loader->classMap = ComposerStaticInit6e4a9e677d578210d8453abf61d2bef1::$classMap;
    305308
    306309        }, null, ClassLoader::class);
  • blockart-blocks/tags/2.2.10/vendor/composer/installed.json

    r3306181 r3327943  
    156156        {
    157157            "name": "halaxa/json-machine",
    158             "version": "1.2.3",
    159             "version_normalized": "1.2.3.0",
     158            "version": "1.2.5",
     159            "version_normalized": "1.2.5.0",
    160160            "source": {
    161161                "type": "git",
    162162                "url": "https://github.com/halaxa/json-machine.git",
    163                 "reference": "58fb6e97c53c3341bb1f3685b8bdbeedf3f9616c"
     163                "reference": "d0f84abf79ac98145d478b66d2bcf363d706477c"
    164164            },
    165165            "dist": {
    166166                "type": "zip",
    167                 "url": "https://api.github.com/repos/halaxa/json-machine/zipball/58fb6e97c53c3341bb1f3685b8bdbeedf3f9616c",
    168                 "reference": "58fb6e97c53c3341bb1f3685b8bdbeedf3f9616c",
     167                "url": "https://api.github.com/repos/halaxa/json-machine/zipball/d0f84abf79ac98145d478b66d2bcf363d706477c",
     168                "reference": "d0f84abf79ac98145d478b66d2bcf363d706477c",
    169169                "shasum": ""
    170170            },
     
    182182                "guzzlehttp/guzzle": "To run example with GuzzleHttp"
    183183            },
    184             "time": "2025-05-30T12:36:04+00:00",
     184            "time": "2025-07-07T13:38:34+00:00",
    185185            "type": "library",
    186186            "installation-source": "dist",
     
    209209            "support": {
    210210                "issues": "https://github.com/halaxa/json-machine/issues",
    211                 "source": "https://github.com/halaxa/json-machine/tree/1.2.3"
     211                "source": "https://github.com/halaxa/json-machine/tree/1.2.5"
    212212            },
    213213            "funding": [
     
    221221        {
    222222            "name": "sabberworm/php-css-parser",
    223             "version": "v8.8.0",
    224             "version_normalized": "8.8.0.0",
     223            "version": "v8.9.0",
     224            "version_normalized": "8.9.0.0",
    225225            "source": {
    226226                "type": "git",
    227227                "url": "https://github.com/MyIntervals/PHP-CSS-Parser.git",
    228                 "reference": "3de493bdddfd1f051249af725c7e0d2c38fed740"
     228                "reference": "d8e916507b88e389e26d4ab03c904a082aa66bb9"
    229229            },
    230230            "dist": {
    231231                "type": "zip",
    232                 "url": "https://api.github.com/repos/MyIntervals/PHP-CSS-Parser/zipball/3de493bdddfd1f051249af725c7e0d2c38fed740",
    233                 "reference": "3de493bdddfd1f051249af725c7e0d2c38fed740",
     232                "url": "https://api.github.com/repos/MyIntervals/PHP-CSS-Parser/zipball/d8e916507b88e389e26d4ab03c904a082aa66bb9",
     233                "reference": "d8e916507b88e389e26d4ab03c904a082aa66bb9",
    234234                "shasum": ""
    235235            },
     
    239239            },
    240240            "require-dev": {
    241                 "phpunit/phpunit": "5.7.27 || 6.5.14 || 7.5.20 || 8.5.41"
     241                "phpunit/phpunit": "5.7.27 || 6.5.14 || 7.5.20 || 8.5.41",
     242                "rawr/cross-data-providers": "^2.0.0"
    242243            },
    243244            "suggest": {
    244245                "ext-mbstring": "for parsing UTF-8 CSS"
    245246            },
    246             "time": "2025-03-23T17:59:05+00:00",
     247            "time": "2025-07-11T13:20:48+00:00",
    247248            "type": "library",
    248249            "extra": {
     
    283284            "support": {
    284285                "issues": "https://github.com/MyIntervals/PHP-CSS-Parser/issues",
    285                 "source": "https://github.com/MyIntervals/PHP-CSS-Parser/tree/v8.8.0"
     286                "source": "https://github.com/MyIntervals/PHP-CSS-Parser/tree/v8.9.0"
    286287            },
    287288            "install-path": "../sabberworm/php-css-parser"
  • blockart-blocks/tags/2.2.10/vendor/composer/installed.php

    r3306181 r3327943  
    2121        ),
    2222        'halaxa/json-machine' => array(
    23             'pretty_version' => '1.2.3',
    24             'version' => '1.2.3.0',
     23            'pretty_version' => '1.2.5',
     24            'version' => '1.2.5.0',
    2525            'type' => 'library',
    2626            'install_path' => __DIR__ . '/../halaxa/json-machine',
    2727            'aliases' => array(),
    28             'reference' => '58fb6e97c53c3341bb1f3685b8bdbeedf3f9616c',
     28            'reference' => 'd0f84abf79ac98145d478b66d2bcf363d706477c',
    2929            'dev_requirement' => false,
    3030        ),
     
    3636        ),
    3737        'sabberworm/php-css-parser' => array(
    38             'pretty_version' => 'v8.8.0',
    39             'version' => '8.8.0.0',
     38            'pretty_version' => 'v8.9.0',
     39            'version' => '8.9.0.0',
    4040            'type' => 'library',
    4141            'install_path' => __DIR__ . '/../sabberworm/php-css-parser',
    4242            'aliases' => array(),
    43             'reference' => '3de493bdddfd1f051249af725c7e0d2c38fed740',
     43            'reference' => 'd8e916507b88e389e26d4ab03c904a082aa66bb9',
    4444            'dev_requirement' => false,
    4545        ),
  • blockart-blocks/tags/2.2.10/vendor/halaxa/json-machine/CHANGELOG.md

    r3306181 r3327943  
    1010## master
    1111Nothing yet
     12
     13<br>
     14
     15## 1.2.5 - 2025-07-07
     16- Slight performance optimization of the tokenizing process (about +7 % speed gain)
     17
     18<br>
     19
     20## 1.2.4 - 2025-06-16
     21### Fixed
     22- The key of a scalar value after a compound value is lost ([#125](https://github.com/halaxa/json-machine/issues/125)). Thanks [@smiletoeverybody](https://github.com/smiletoeverybody)
    1223
    1324<br>
     
    2233## 1.2.2 - 2025-04-30
    2334### Changed
    24 - Leaner release package (#124). Thanks [@robotomarvin](https://github.com/robotomarvin)
     35- Leaner release package ([#124](https://github.com/halaxa/json-machine/issues/124)). Thanks [@robotomarvin](https://github.com/robotomarvin)
    2536
    2637<br>
     
    2839## 1.2.1 - 2025-04-25
    2940### Fixed
    30 - File autoloading without composer (#122). Thanks [@bahco](https://github.com/bahco)
    31 - Crash on `null` value in `RecursiveItems` (#119). Thanks [@bark92](https://github.com/bark92)
     41- File autoloading without composer ([#122](https://github.com/halaxa/json-machine/issues/122)). Thanks [@bahco](https://github.com/bahco)
     42- Crash on `null` value in `RecursiveItems` ([#119](https://github.com/halaxa/json-machine/issues/119)). Thanks [@bark92](https://github.com/bark92)
    3243<br>
    3344
     
    4354- Exception on misspelled option name suggests a correct one.
    4455### Fixed
    45 - Wrong key when combining list and scalar value pointers (#110). Thanks [@daniel-sc](https://github.com/daniel-sc)
     56- Wrong key when combining list and scalar value pointers ([#110](https://github.com/halaxa/json-machine/issues/110)). Thanks [@daniel-sc](https://github.com/daniel-sc)
    4657### Removed
    4758- Removed support for PHP 7.0, 7.1
     
    5465- Added PHPStan to build pipeline
    5566### Fixed
    56 - Fixed the case when non-intersecting pointers were considered intersecting (#106). Thanks [@XedinUnknown](https://github.com/XedinUnknown)
     67- Fixed the case when non-intersecting pointers were considered intersecting ([#106](https://github.com/halaxa/json-machine/issues/106)). Thanks [@XedinUnknown](https://github.com/XedinUnknown)
    5768
    5869<br>
     
    6071## 1.1.3 - 2022-10-12
    6172### Fixed
    62 - Fix the parsing of nested sub-trees that use wildcards (#83). Thanks [@cerbero90](https://github.com/cerbero90)
     73- Fix the parsing of nested sub-trees that use wildcards ([#83](https://github.com/halaxa/json-machine/issues/83)). Thanks [@cerbero90](https://github.com/cerbero90)
    6374
    6475<br>
     
    6980
    7081### Fixed
    71 - Meaningful error on invalid token. (#86)
    72 - Added missing return type annotation. (#84)
     82- Meaningful error on invalid token. ([#86](https://github.com/halaxa/json-machine/issues/86))
     83- Added missing return type annotation. ([#84](https://github.com/halaxa/json-machine/issues/84))
    7384
    7485<br>
     
    169180## 0.6.1
    170181### Fixed bugs
    171 - Empty dict at the end of an item was causing Syntax error in the next item. Reason: closing `}` did not set object key expectation to `false`. (#41 via PR #42).
     182- Empty dict at the end of an item was causing Syntax error in the next item. Reason: closing `}` did not set object key expectation to `false`. ([#41](https://github.com/halaxa/json-machine/issues/41) via PR [#42](https://github.com/halaxa/json-machine/issues/42)).
    172183
    173184<br>
  • blockart-blocks/tags/2.2.10/vendor/halaxa/json-machine/README.md

    r3306181 r3327943  
    8989- Ease of use. Just iterate JSON of any size with `foreach`. No events and callbacks.
    9090- Efficient iteration on any subtree of the document, specified by [JSON Pointer](#json-pointer)
    91 - Speed. Performance critical code contains no unnecessary function calls, no regular expressions
     91- Speed. Performance critical code is optimized for speed with JIT in mind,
    9292and uses native `json_decode` to decode JSON document items by default. See [Decoders](#decoders).
    9393- Parses not only streams but any iterable that produces JSON chunks.
  • blockart-blocks/tags/2.2.10/vendor/halaxa/json-machine/src/FileChunks.php

    r3021722 r3327943  
    2020     * @param int    $chunkSize
    2121     */
    22     public function __construct($fileName, $chunkSize = 1024 * 8)
     22    public function __construct($fileName, $chunkSize = 1024 * 16)
    2323    {
    2424        $this->fileName = $fileName;
  • blockart-blocks/tags/2.2.10/vendor/halaxa/json-machine/src/Parser.php

    r3306181 r3327943  
    267267                case ']':
    268268                    --$currentLevel;
     269                    if ($currentLevel < $iteratorLevel) {
     270                        $iteratorStruct = null;
     271                    }
    269272                    $inObject = $stack[$currentLevel] == '{';
    270273                    // no break
  • blockart-blocks/tags/2.2.10/vendor/halaxa/json-machine/src/Tokens.php

    r3306181 r3327943  
    3838    private function createGenerator(): Generator
    3939    {
    40         $regex = '/
    41             [{}\[\],:]
    42             #| true|false|null
    43             #| [\deE.+-]+
    44             #| (t|tr|tru|f|fa|fal|fals|n|nu|nul)$
    45             | [^\xEF\xBB\xBF\s{}\[\],:]+    # todo make matching logic positive as in comments above and solve 2 failing tests
    46         /x';
     40        $regex = '/ [{}\[\],:] | [^\xEF\xBB\xBF\s{}\[\],:]+ /x';
    4741
    4842        $inString = 0;
     
    5044
    5145        foreach ($this->jsonChunks as $jsonChunk) {
    52             $chunkItems = explode('"', $carry.$jsonChunk);
     46            $chunkBlocks = explode('"', $carry.$jsonChunk);
    5347            $carry = '';
    5448
    55             $chunkItemsLastSafeIndex = count($chunkItems) - 2;
     49            $chunkItemsLastSafeIndex = count($chunkBlocks) - 2;
    5650            for ($i = 0; $i <= $chunkItemsLastSafeIndex; ++$i) {
    5751                if ($inString) {
    58                     if ($this->stringIsEscaping($chunkItems[$i])) {
    59                         $carry .= $chunkItems[$i].'"';
     52                    if ($this->stringIsEscaping($chunkBlocks[$i])) {
     53                        $carry .= $chunkBlocks[$i].'"';
    6054                    } else {
    61                         yield '"'.$carry.$chunkItems[$i].'"';
     55                        yield "\"$carry$chunkBlocks[$i]\"";
    6256                        $carry = '';
    6357                        $inString = 0;
    6458                    }
    6559                } else {
    66                     preg_match_all($regex, $chunkItems[$i], $matches);
    67                     yield from $matches[0];
     60                    $chunkBlock = trim($chunkBlocks[$i]);
     61                    if (strlen($chunkBlock) == 1) {
     62                        yield $chunkBlock;
     63                    } else {
     64                        preg_match_all($regex, $chunkBlock, $matches);
     65                        yield from $matches[0];
     66                    }
    6867                    $inString = 1;
    6968                }
     
    7170
    7271            if ($inString) {
    73                 $carry .= $chunkItems[$i];
     72                $carry .= $chunkBlocks[$i];
    7473            } else {
    75                 preg_match_all($regex, $chunkItems[$i], $matches);
     74                preg_match_all($regex, $chunkBlocks[$i], $matches);
    7675                $carry = array_pop($matches[0]);
    7776                yield from $matches[0];
     
    8887        $i = strlen($token);
    8988        $slashes = 0;
    90         while (--$i >= 0 && isset($token[$i]) && $token[$i] === '\\') {
     89        while (--$i >= 0 && $token[$i] === '\\') {
    9190            ++$slashes;
    9291        }
  • blockart-blocks/tags/2.2.10/vendor/halaxa/json-machine/src/autoloader.php

    r3306181 r3327943  
    4242}
    4343
     44// @codeCoverageIgnoreStart
    4445$files = json_decode(file_get_contents(__DIR__.'/../composer.json'), true)['autoload']['files'];
    4546foreach ($files as $file) {
     
    4748}
    4849
    49 // @codeCoverageIgnoreStart
    5050return [Autoloading::class, 'autoloader'];
    5151// @codeCoverageIgnoreEnd
  • blockart-blocks/tags/2.2.10/vendor/sabberworm/php-css-parser/CHANGELOG.md

    r3306181 r3327943  
    1616### Fixed
    1717
     18## 8.9.0: New features, bug fixes and deprecations
     19
     20### Added
     21
     22- `RuleSet::removeMatchingRules()` method
     23  (for the implementing classes `AtRuleSet` and `DeclarationBlock`) (#1249)
     24- `RuleSet::removeAllRules()` method
     25  (for the implementing classes `AtRuleSet` and `DeclarationBlock`) (#1249)
     26- Add Interface `CSSElement` (#1231)
     27- Methods `getLineNumber` and `getColumnNumber` which return a nullable `int`
     28  for the following classes:
     29  `Comment`, `CSSList`, `SourceException`, `Charset`, `CSSNamespace`, `Import`,
     30  `Rule`, `DeclarationBlock`, `RuleSet`, `CSSFunction`, `Value` (#1225, #1263)
     31- `Positionable` interface for CSS items that may have a position
     32  (line and perhaps column number) in the parsed CSS (#1221)
     33
     34### Changed
     35
     36- Parameters for `getAllValues()` are deconflated, so it now takes three (all
     37  optional), allowing `$element` and `$ruleSearchPattern` to be specified
     38  separately (#1241)
     39- Implement `Positionable` in the following CSS item classes:
     40  `Comment`, `CSSList`, `SourceException`, `Charset`, `CSSNamespace`, `Import`,
     41  `Rule`, `DeclarationBlock`, `RuleSet`, `CSSFunction`, `Value` (#1225)
     42
     43### Deprecated
     44
     45- Support for PHP < 7.2 is deprecated; version 9.0 will require PHP 7.2 or later
     46  (#1264)
     47- Passing a `string` or `null` to `RuleSet::removeRule()` is deprecated
     48  (implementing classes are `AtRuleSet` and `DeclarationBlock`);
     49  use `removeMatchingRules()` or `removeAllRules()` instead (#1249)
     50- Passing a `Rule` to `RuleSet::getRules()` or `getRulesAssoc()` is deprecated,
     51  affecting the implementing classes `AtRuleSet` and `DeclarationBlock`
     52  (call e.g. `getRules($rule->getRule())` instead) (#1248)
     53- Passing a string as the first argument to `getAllValues()` is deprecated;
     54  the search pattern should now be passed as the second argument (#1241)
     55- Passing a Boolean as the second argument to `getAllValues()` is deprecated;
     56  the flag for searching in function arguments should now be passed as the third
     57  argument (#1241)
     58- `getLineNo()` is deprecated in these classes (use `getLineNumber()` instead):
     59  `Comment`, `CSSList`, `SourceException`, `Charset`, `CSSNamespace`, `Import`,
     60  `Rule`, `DeclarationBlock`, `RuleSet`, `CSSFunction`, `Value` (#1225, #1233)
     61- `Rule::getColNo()` is deprecated (use `getColumnNumber()` instead)
     62  (#1225, #1233)
     63- Providing zero as the line number argument to `Rule::setPosition()` is
     64  deprecated (pass `null` instead if there is no line number) (#1225, #1233)
     65
     66### Fixed
     67
     68- Set line number when `RuleSet::addRule()` called with only column number set
     69  (#1265)
     70- Ensure first rule added with `RuleSet::addRule()` has valid position (#1262)
     71
    1872## 8.8.0: Bug fixes and deprecations
    1973
     
    2478### Changed
    2579
    26 - Mark the `OutputFormat` the constructor as `@internal` (#1131)
     80- Mark the `OutputFormat` constructor as `@internal` (#1131)
    2781- Mark `OutputFormatter` as `@internal` (#896)
    2882- Mark `Selector::isValid()` as `@internal` (#1037)
     
    3690- Deprecate `OutputFormat::get()` and `::set()` (#1107)
    3791- Deprecate support for `-webkit-calc` and `-moz-calc` (#1086)
     92- Deprecate magic method forwarding from `OutputFormat` to `OutputFormatter`
     93  (#894)
    3894- Deprecate `__toString()` (#1006)
    3995- Deprecate greedy calculation of selector specificity (#1018)
     
    62118### Deprecated
    63119
    64 - Deprecate magic method forwarding from `OutputFormat` to `OutputFormatter`
    65   (#894)
    66120- Deprecate the expansion of shorthand properties (#719)
    67121- Deprecate `Parser::setCharset()` and `Parser::getCharset()` (#703)
  • blockart-blocks/tags/2.2.10/vendor/sabberworm/php-css-parser/src/CSSList/CSSBlockList.php

    r2993158 r3327943  
    33namespace Sabberworm\CSS\CSSList;
    44
     5use Sabberworm\CSS\CSSElement;
    56use Sabberworm\CSS\Property\Selector;
    67use Sabberworm\CSS\Rule\Rule;
     
    6061
    6162    /**
    62      * @param CSSList|Rule|RuleSet|Value $oElement
     63     * Returns all `Value` objects found recursively in `Rule`s in the tree.
     64     *
     65     * @param CSSElement|string|null $element
     66     *        This is the `CSSList` or `RuleSet` to start the search from (defaults to the whole document).
     67     *        If a string is given, it is used as a rule name filter.
     68     *        Passing a string for this parameter is deprecated in version 8.9.0, and will not work from v9.0;
     69     *        use the following parameter to pass a rule name filter instead.
     70     * @param string|bool|null $ruleSearchPatternOrSearchInFunctionArguments
     71     *        This allows filtering rules by property name
     72     *        (e.g. if "color" is passed, only `Value`s from `color` properties will be returned,
     73     *        or if "font-" is provided, `Value`s from all font rules, like `font-size`, and including `font` itself,
     74     *        will be returned).
     75     *        If a Boolean is provided, it is treated as the `$searchInFunctionArguments` argument.
     76     *        Passing a Boolean for this parameter is deprecated in version 8.9.0, and will not work from v9.0;
     77     *        use the `$searchInFunctionArguments` parameter instead.
     78     * @param bool $searchInFunctionArguments whether to also return Value objects used as Function arguments.
     79     *
     80     * @return array<int, Value>
     81     *
     82     * @see RuleSet->getRules()
     83     */
     84    public function getAllValues(
     85        $element = null,
     86        $ruleSearchPatternOrSearchInFunctionArguments = null,
     87        $searchInFunctionArguments = false
     88    ) {
     89        if (\is_bool($ruleSearchPatternOrSearchInFunctionArguments)) {
     90            $searchInFunctionArguments = $ruleSearchPatternOrSearchInFunctionArguments;
     91            $searchString = null;
     92        } else {
     93            $searchString = $ruleSearchPatternOrSearchInFunctionArguments;
     94        }
     95
     96        if ($element === null) {
     97            $element = $this;
     98        } elseif (\is_string($element)) {
     99            $searchString = $element;
     100            $element = $this;
     101        }
     102
     103        $result = [];
     104        $this->allValues($element, $result, $searchString, $searchInFunctionArguments);
     105        return $result;
     106    }
     107
     108    /**
     109     * @param CSSElement|string $oElement
    63110     * @param array<int, Value> $aResult
    64111     * @param string|null $sSearchString
  • blockart-blocks/tags/2.2.10/vendor/sabberworm/php-css-parser/src/CSSList/CSSList.php

    r3306181 r3327943  
    55use Sabberworm\CSS\Comment\Comment;
    66use Sabberworm\CSS\Comment\Commentable;
     7use Sabberworm\CSS\CSSElement;
    78use Sabberworm\CSS\OutputFormat;
    89use Sabberworm\CSS\Parsing\ParserState;
     
    1011use Sabberworm\CSS\Parsing\UnexpectedEOFException;
    1112use Sabberworm\CSS\Parsing\UnexpectedTokenException;
     13use Sabberworm\CSS\Position\Position;
     14use Sabberworm\CSS\Position\Positionable;
    1215use Sabberworm\CSS\Property\AtRule;
    1316use Sabberworm\CSS\Property\Charset;
     
    3033 * It can also contain `Import` and `Charset` objects stemming from at-rules.
    3134 */
    32 abstract class CSSList implements Renderable, Commentable
     35abstract class CSSList implements Commentable, CSSElement, Positionable
    3336{
     37    use Position;
     38
    3439    /**
    3540     * @var array<array-key, Comment>
     
    4550     */
    4651    protected $aContents;
    47 
    48     /**
    49      * @var int
    50      *
    51      * @internal since 8.8.0
    52      */
    53     protected $iLineNo;
    5452
    5553    /**
     
    6058        $this->aComments = [];
    6159        $this->aContents = [];
    62         $this->iLineNo = $iLineNo;
     60        $this->setPosition($iLineNo);
    6361    }
    6462
     
    260258
    261259    /**
    262      * @return int
    263      */
    264     public function getLineNo()
    265     {
    266         return $this->iLineNo;
    267     }
    268 
    269     /**
    270260     * Prepends an item to the list of contents.
    271261     *
  • blockart-blocks/tags/2.2.10/vendor/sabberworm/php-css-parser/src/CSSList/Document.php

    r3306181 r3327943  
    99use Sabberworm\CSS\RuleSet\DeclarationBlock;
    1010use Sabberworm\CSS\RuleSet\RuleSet;
    11 use Sabberworm\CSS\Value\Value;
    1211
    1312/**
     
    7574        $aResult = [];
    7675        $this->allRuleSets($aResult);
    77         return $aResult;
    78     }
    79 
    80     /**
    81      * Returns all `Value` objects found recursively in `Rule`s in the tree.
    82      *
    83      * @param CSSList|RuleSet|string $mElement
    84      *        the `CSSList` or `RuleSet` to start the search from (defaults to the whole document).
    85      *        If a string is given, it is used as rule name filter.
    86      * @param bool $bSearchInFunctionArguments whether to also return Value objects used as Function arguments.
    87      *
    88      * @return array<int, Value>
    89      *
    90      * @see RuleSet->getRules()
    91      */
    92     public function getAllValues($mElement = null, $bSearchInFunctionArguments = false)
    93     {
    94         $sSearchString = null;
    95         if ($mElement === null) {
    96             $mElement = $this;
    97         } elseif (is_string($mElement)) {
    98             $sSearchString = $mElement;
    99             $mElement = $this;
    100         }
    101         /** @var array<int, Value> $aResult */
    102         $aResult = [];
    103         $this->allValues($mElement, $aResult, $sSearchString, $bSearchInFunctionArguments);
    10476        return $aResult;
    10577    }
  • blockart-blocks/tags/2.2.10/vendor/sabberworm/php-css-parser/src/Comment/Comment.php

    r3306181 r3327943  
    55use Sabberworm\CSS\OutputFormat;
    66use Sabberworm\CSS\Renderable;
     7use Sabberworm\CSS\Position\Position;
     8use Sabberworm\CSS\Position\Positionable;
    79
    8 class Comment implements Renderable
     10class Comment implements Positionable, Renderable
    911{
    10     /**
    11      * @var int
    12      *
    13      * @internal since 8.8.0
    14      */
    15     protected $iLineNo;
     12    use Position;
    1613
    1714    /**
     
    2926    {
    3027        $this->sComment = $sComment;
    31         $this->iLineNo = $iLineNo;
     28        $this->setPosition($iLineNo);
    3229    }
    3330
     
    3835    {
    3936        return $this->sComment;
    40     }
    41 
    42     /**
    43      * @return int
    44      */
    45     public function getLineNo()
    46     {
    47         return $this->iLineNo;
    4837    }
    4938
  • blockart-blocks/tags/2.2.10/vendor/sabberworm/php-css-parser/src/Parsing/SourceException.php

    r2993158 r3327943  
    33namespace Sabberworm\CSS\Parsing;
    44
    5 class SourceException extends \Exception
     5use Sabberworm\CSS\Position\Position;
     6use Sabberworm\CSS\Position\Positionable;
     7
     8class SourceException extends \Exception implements Positionable
    69{
    7     /**
    8      * @var int
    9      */
    10     private $iLineNo;
     10    use Position;
    1111
    1212    /**
     
    1616    public function __construct($sMessage, $iLineNo = 0)
    1717    {
    18         $this->iLineNo = $iLineNo;
     18        $this->setPosition($iLineNo);
    1919        if (!empty($iLineNo)) {
    2020            $sMessage .= " [line no: $iLineNo]";
     
    2222        parent::__construct($sMessage);
    2323    }
    24 
    25     /**
    26      * @return int
    27      */
    28     public function getLineNo()
    29     {
    30         return $this->iLineNo;
    31     }
    3224}
  • blockart-blocks/tags/2.2.10/vendor/sabberworm/php-css-parser/src/Property/CSSNamespace.php

    r3306181 r3327943  
    55use Sabberworm\CSS\Comment\Comment;
    66use Sabberworm\CSS\OutputFormat;
     7use Sabberworm\CSS\Position\Position;
     8use Sabberworm\CSS\Position\Positionable;
    79
    810/**
    911 * `CSSNamespace` represents an `@namespace` rule.
    1012 */
    11 class CSSNamespace implements AtRule
     13class CSSNamespace implements AtRule, Positionable
    1214{
     15    use Position;
     16
    1317    /**
    1418     * @var string
     
    4246        $this->mUrl = $mUrl;
    4347        $this->sPrefix = $sPrefix;
    44         $this->iLineNo = $iLineNo;
     48        $this->setPosition($iLineNo);
    4549        $this->aComments = [];
    46     }
    47 
    48     /**
    49      * @return int
    50      */
    51     public function getLineNo()
    52     {
    53         return $this->iLineNo;
    5450    }
    5551
  • blockart-blocks/tags/2.2.10/vendor/sabberworm/php-css-parser/src/Property/Charset.php

    r3306181 r3327943  
    55use Sabberworm\CSS\Comment\Comment;
    66use Sabberworm\CSS\OutputFormat;
     7use Sabberworm\CSS\Position\Position;
     8use Sabberworm\CSS\Position\Positionable;
    79use Sabberworm\CSS\Value\CSSString;
    810
     
    1517 * - Must not appear more than once.
    1618 */
    17 class Charset implements AtRule
     19class Charset implements AtRule, Positionable
    1820{
     21    use Position;
     22
    1923    /**
    2024     * @var CSSString
     
    4347    {
    4448        $this->oCharset = $oCharset;
    45         $this->iLineNo = $iLineNo;
     49        $this->setPosition($iLineNo);
    4650        $this->aComments = [];
    47     }
    48 
    49     /**
    50      * @return int
    51      */
    52     public function getLineNo()
    53     {
    54         return $this->iLineNo;
    5551    }
    5652
  • blockart-blocks/tags/2.2.10/vendor/sabberworm/php-css-parser/src/Property/Import.php

    r3306181 r3327943  
    55use Sabberworm\CSS\Comment\Comment;
    66use Sabberworm\CSS\OutputFormat;
     7use Sabberworm\CSS\Position\Position;
     8use Sabberworm\CSS\Position\Positionable;
    79use Sabberworm\CSS\Value\URL;
    810
     
    1012 * Class representing an `@import` rule.
    1113 */
    12 class Import implements AtRule
     14class Import implements AtRule, Positionable
    1315{
     16    use Position;
     17
    1418    /**
    1519     * @var URL
     
    2125     */
    2226    private $sMediaQuery;
    23 
    24     /**
    25      * @var int
    26      *
    27      * @internal since 8.8.0
    28      */
    29     protected $iLineNo;
    3027
    3128    /**
     
    4542        $this->oLocation = $oLocation;
    4643        $this->sMediaQuery = $sMediaQuery;
    47         $this->iLineNo = $iLineNo;
     44        $this->setPosition($iLineNo);
    4845        $this->aComments = [];
    49     }
    50 
    51     /**
    52      * @return int
    53      */
    54     public function getLineNo()
    55     {
    56         return $this->iLineNo;
    5746    }
    5847
  • blockart-blocks/tags/2.2.10/vendor/sabberworm/php-css-parser/src/Rule/Rule.php

    r3306181 r3327943  
    55use Sabberworm\CSS\Comment\Comment;
    66use Sabberworm\CSS\Comment\Commentable;
     7use Sabberworm\CSS\CSSElement;
    78use Sabberworm\CSS\OutputFormat;
    89use Sabberworm\CSS\Parsing\ParserState;
    910use Sabberworm\CSS\Parsing\UnexpectedEOFException;
    1011use Sabberworm\CSS\Parsing\UnexpectedTokenException;
    11 use Sabberworm\CSS\Renderable;
     12use Sabberworm\CSS\Position\Position;
     13use Sabberworm\CSS\Position\Positionable;
    1214use Sabberworm\CSS\Value\RuleValueList;
    1315use Sabberworm\CSS\Value\Value;
     
    1820 * In CSS, `Rule`s are expressed as follows: “key: value[0][0] value[0][1], value[1][0] value[1][1];”
    1921 */
    20 class Rule implements Renderable, Commentable
     22class Rule implements Commentable, CSSElement, Positionable
    2123{
     24    use Position;
     25
    2226    /**
    2327     * @var string
     
    3943     */
    4044    private $aIeHack;
    41 
    42     /**
    43      * @var int
    44      */
    45     protected $iLineNo;
    46 
    47     /**
    48      * @var int
    49      *
    50      * @internal since 8.8.0
    51      */
    52     protected $iColNo;
    5345
    5446    /**
     
    7062        $this->bIsImportant = false;
    7163        $this->aIeHack = [];
    72         $this->iLineNo = $iLineNo;
    73         $this->iColNo = $iColNo;
     64        $this->setPosition($iLineNo, $iColNo);
    7465        $this->aComments = [];
    7566    }
     
    144135
    145136    /**
    146      * @return int
    147      */
    148     public function getLineNo()
    149     {
    150         return $this->iLineNo;
    151     }
    152 
    153     /**
    154      * @return int
    155      */
    156     public function getColNo()
    157     {
    158         return $this->iColNo;
    159     }
    160 
    161     /**
    162      * @param int $iLine
    163      * @param int $iColumn
    164      *
    165      * @return void
    166      */
    167     public function setPosition($iLine, $iColumn)
    168     {
    169         $this->iColNo = $iColumn;
    170         $this->iLineNo = $iLine;
    171     }
    172 
    173     /**
    174137     * @param string $sRule
    175138     *
     
    296259        if (!$this->mValue instanceof RuleValueList || $this->mValue->getListSeparator() !== $sType) {
    297260            $mCurrentValue = $this->mValue;
    298             $this->mValue = new RuleValueList($sType, $this->iLineNo);
     261            $this->mValue = new RuleValueList($sType, $this->getLineNumber());
    299262            if ($mCurrentValue) {
    300263                $this->mValue->addListComponent($mCurrentValue);
  • blockart-blocks/tags/2.2.10/vendor/sabberworm/php-css-parser/src/RuleSet/DeclarationBlock.php

    r3306181 r3327943  
    435435            'background-attachment' => ['scroll'],
    436436            'background-position' => [
    437                 new Size(0, '%', false, $this->iLineNo),
    438                 new Size(0, '%', false, $this->iLineNo),
     437                new Size(0, '%', false, $this->getLineNo()),
     438                new Size(0, '%', false, $this->getLineNo()),
    439439            ],
    440440        ];
     
    802802            }
    803803            if ($aLHValues[0] !== 'normal') {
    804                 $val = new RuleValueList('/', $this->iLineNo);
     804                $val = new RuleValueList('/', $this->getLineNo());
    805805                $val->addListComponent($aFSValues[0]);
    806806                $val->addListComponent($aLHValues[0]);
     
    818818            $aFFValues = $mRuleValue->getListComponents();
    819819        }
    820         $oFFValue = new RuleValueList(',', $this->iLineNo);
     820        $oFFValue = new RuleValueList(',', $this->getLineNo());
    821821        $oFFValue->setListComponents($aFFValues);
    822822        $oNewRule->addValue($oFFValue);
     
    852852        if (count($this->aSelectors) === 0) {
    853853            // If all the selectors have been removed, this declaration block becomes invalid
    854             throw new OutputException("Attempt to print declaration block with missing selector", $this->iLineNo);
     854            throw new OutputException(
     855                'Attempt to print declaration block with missing selector',
     856                $this->getLineNumber()
     857            );
    855858        }
    856859        $sResult .= $oOutputFormat->sBeforeDeclarationBlock;
  • blockart-blocks/tags/2.2.10/vendor/sabberworm/php-css-parser/src/RuleSet/RuleSet.php

    r3306181 r3327943  
    55use Sabberworm\CSS\Comment\Comment;
    66use Sabberworm\CSS\Comment\Commentable;
     7use Sabberworm\CSS\CSSElement;
    78use Sabberworm\CSS\OutputFormat;
    89use Sabberworm\CSS\Parsing\ParserState;
    910use Sabberworm\CSS\Parsing\UnexpectedEOFException;
    1011use Sabberworm\CSS\Parsing\UnexpectedTokenException;
     12use Sabberworm\CSS\Position\Position;
     13use Sabberworm\CSS\Position\Positionable;
    1114use Sabberworm\CSS\Renderable;
    1215use Sabberworm\CSS\Rule\Rule;
     
    2124 * (which accepts either a `Rule` or a rule name; optionally suffixed by a dash to remove all related rules).
    2225 */
    23 abstract class RuleSet implements Renderable, Commentable
     26abstract class RuleSet implements CSSElement, Commentable, Positionable
    2427{
     28    use Position;
     29
    2530    /**
    2631     * the rules in this rule set, using the property name as the key,
     
    3237
    3338    /**
    34      * @var int
     39     * @var array<array-key, Comment>
    3540     *
    3641     * @internal since 8.8.0
    3742     */
    38     protected $iLineNo;
    39 
    40     /**
    41      * @var array<array-key, Comment>
    42      *
    43      * @internal since 8.8.0
    44      */
    4543    protected $aComments;
    4644
     
    5149    {
    5250        $this->aRules = [];
    53         $this->iLineNo = $iLineNo;
     51        $this->setPosition($iLineNo);
    5452        $this->aComments = [];
    5553    }
     
    104102
    105103    /**
    106      * @return int
    107      */
    108     public function getLineNo()
    109     {
    110         return $this->iLineNo;
    111     }
    112 
    113     /**
    114104     * @param Rule|null $oSibling
    115105     *
     
    132122            }
    133123        }
    134         if ($oRule->getLineNo() === 0 && $oRule->getColNo() === 0) {
     124        if ($oRule->getLineNumber() === null) {
    135125            //this node is added manually, give it the next best line
     126            $columnNumber = $oRule->getColNo();
    136127            $rules = $this->getRules();
    137128            $pos = count($rules);
    138129            if ($pos > 0) {
    139130                $last = $rules[$pos - 1];
    140                 $oRule->setPosition($last->getLineNo() + 1, 0);
    141             }
     131                $oRule->setPosition($last->getLineNo() + 1, $columnNumber);
     132            } else {
     133                $oRule->setPosition(1, $columnNumber);
     134            }
     135        } elseif ($oRule->getColumnNumber() === null) {
     136            $oRule->setPosition($oRule->getLineNumber(), 0);
    142137        }
    143138
     
    157152     *        If the pattern ends with a dash, all rules starting with the pattern are returned
    158153     *        as well as one matching the pattern with the dash excluded.
    159      *        Passing a Rule behaves like calling `getRules($mRule->getRule())`.
     154     *        Passing a `Rule` for this parameter is deprecated in version 8.9.0, and will not work from v9.0.
     155     *        Call `getRules($rule->getRule())` instead.
    160156     *
    161157     * @return array<int, Rule>
     
    216212     *        Pattern to search for. If null, returns all rules. If the pattern ends with a dash,
    217213     *        all rules starting with the pattern are returned as well as one matching the pattern with the dash
    218      *        excluded. Passing a Rule behaves like calling `getRules($mRule->getRule())`.
     214     *        excluded.
     215     *        Passing a `Rule` for this parameter is deprecated in version 8.9.0, and will not work from v9.0.
     216     *        Call `getRulesAssoc($rule->getRule())` instead.
    219217     *
    220218     * @return array<string, Rule>
     
    231229
    232230    /**
    233      * Removes a rule from this RuleSet. This accepts all the possible values that `getRules()` accepts.
    234      *
    235      * If given a Rule, it will only remove this particular rule (by identity).
    236      * If given a name, it will remove all rules by that name.
    237      *
    238      * Note: this is different from pre-v.2.0 behaviour of PHP-CSS-Parser, where passing a Rule instance would
    239      * remove all rules with the same name. To get the old behaviour, use `removeRule($oRule->getRule())`.
     231     * Removes a `Rule` from this `RuleSet` by identity.
    240232     *
    241233     * @param Rule|string|null $mRule
    242      *        pattern to remove. If $mRule is null, all rules are removed. If the pattern ends in a dash,
    243      *        all rules starting with the pattern are removed as well as one matching the pattern with the dash
    244      *        excluded. Passing a Rule behaves matches by identity.
    245      *
    246      * @return void
     234     *        `Rule` to remove.
     235     *        Passing a `string` or `null` is deprecated in version 8.9.0, and will no longer work from v9.0.
     236     *        Use `removeMatchingRules()` or `removeAllRules()` instead.
    247237     */
    248238    public function removeRule($mRule)
     
    258248                }
    259249            }
     250        } elseif ($mRule !== null) {
     251            $this->removeMatchingRules($mRule);
    260252        } else {
    261             foreach ($this->aRules as $sName => $aRules) {
    262                 // Either no search rule is given or the search rule matches the found rule exactly
    263                 // or the search rule ends in “-” and the found rule starts with the search rule or equals it
    264                 // (without the trailing dash).
    265                 if (
    266                     !$mRule || $sName === $mRule
    267                     || (strrpos($mRule, '-') === strlen($mRule) - strlen('-')
    268                         && (strpos($sName, $mRule) === 0 || $sName === substr($mRule, 0, -1)))
    269                 ) {
    270                     unset($this->aRules[$sName]);
    271                 }
    272             }
    273         }
     253            $this->removeAllRules();
     254        }
     255    }
     256
     257    /**
     258     * Removes rules by property name or search pattern.
     259     *
     260     * @param string $searchPattern
     261     *        pattern to remove.
     262     *        If the pattern ends in a dash,
     263     *        all rules starting with the pattern are removed as well as one matching the pattern with the dash
     264     *        excluded.
     265     */
     266    public function removeMatchingRules($searchPattern)
     267    {
     268        foreach ($this->aRules as $propertyName => $rules) {
     269            // Either the search rule matches the found rule exactly
     270            // or the search rule ends in “-” and the found rule starts with the search rule or equals it
     271            // (without the trailing dash).
     272            if (
     273                $propertyName === $searchPattern
     274                || (\strrpos($searchPattern, '-') === \strlen($searchPattern) - \strlen('-')
     275                    && (\strpos($propertyName, $searchPattern) === 0
     276                        || $propertyName === \substr($searchPattern, 0, -1)))
     277            ) {
     278                unset($this->aRules[$propertyName]);
     279            }
     280        }
     281    }
     282
     283    public function removeAllRules()
     284    {
     285        $this->aRules = [];
    274286    }
    275287
  • blockart-blocks/tags/2.2.10/vendor/sabberworm/php-css-parser/src/Value/CSSFunction.php

    r3306181 r3327943  
    3535        }
    3636        $this->sName = $sName;
    37         $this->iLineNo = $iLineNo;
     37        $this->setPosition($iLineNo); // TODO: redundant?
    3838        parent::__construct($aArguments, $sSeparator, $iLineNo);
    3939    }
  • blockart-blocks/tags/2.2.10/vendor/sabberworm/php-css-parser/src/Value/Value.php

    r3306181 r3327943  
    33namespace Sabberworm\CSS\Value;
    44
     5use Sabberworm\CSS\CSSElement;
    56use Sabberworm\CSS\Parsing\ParserState;
    67use Sabberworm\CSS\Parsing\SourceException;
    78use Sabberworm\CSS\Parsing\UnexpectedEOFException;
    89use Sabberworm\CSS\Parsing\UnexpectedTokenException;
    9 use Sabberworm\CSS\Renderable;
     10use Sabberworm\CSS\Position\Position;
     11use Sabberworm\CSS\Position\Positionable;
    1012
    1113/**
     
    1315 * abstract subclass `ValueList`.
    1416 */
    15 abstract class Value implements Renderable
     17abstract class Value implements CSSElement, Positionable
    1618{
    17     /**
    18      * @var int
    19      *
    20      * @internal since 8.8.0
    21      */
    22     protected $iLineNo;
     19    use Position;
    2320
    2421    /**
     
    2724    public function __construct($iLineNo = 0)
    2825    {
    29         $this->iLineNo = $iLineNo;
     26        $this->setPosition($iLineNo);
    3027    }
    3128
     
    219216        return "U+{$sRange}";
    220217    }
    221 
    222     /**
    223      * @return int
    224      */
    225     public function getLineNo()
    226     {
    227         return $this->iLineNo;
    228     }
    229218}
  • blockart-blocks/trunk/blockart.php

    r3320504 r3327943  
    55 * Author: WPBlockArt
    66 * Author URI: https://wpblockart.com/
    7  * Version: 2.2.9
     7 * Version: 2.2.10
    88 * Requires at least: 5.5
    99 * Requires PHP: 7.4
     
    2020defined( 'ABSPATH' ) || exit;
    2121
    22 ! defined( 'BLOCKART_VERSION' ) && define( 'BLOCKART_VERSION', '2.2.9' );
     22! defined( 'BLOCKART_VERSION' ) && define( 'BLOCKART_VERSION', '2.2.10' );
    2323! defined( 'BLOCKART_PLUGIN_FILE' ) && define( 'BLOCKART_PLUGIN_FILE', __FILE__ );
    2424! defined( 'BLOCKART_PLUGIN_DIR' ) && define( 'BLOCKART_PLUGIN_DIR', dirname( BLOCKART_PLUGIN_FILE ) );
  • blockart-blocks/trunk/changelog.txt

    r3320504 r3327943  
    11== Changelog ==
     2= 2.2.10 - 15-07-2025 =
     3* Fix - PHP Error.
     4
    25= 2.2.9 - 01-07-2025 =
    36* Added - Link Option to Timeline Block.
  • blockart-blocks/trunk/includes/RestApi/Controllers/LibraryDataController.php

    r3021722 r3327943  
    100100     */
    101101    protected function prepare_items_for_response( $data, $request ) {
    102         $categorizer = function( $data_to_categorize ) {
     102        $categorizer = function ( $data_to_categorize ) {
    103103            $result = array();
    104104            foreach ( $data_to_categorize as $item ) {
     
    139139     *
    140140     * @param boolean $force
    141      * @return array
     141     *
     142     * @return \WP_Error
    142143     */
    143144    protected function fetch( $force = false ) {
     
    166167            $data = wp_remote_retrieve_body( $response );
    167168            $data = json_decode( $data, true );
    168 
    169             set_transient( '_blockart_library_data', $data, WEEK_IN_SECONDS );
     169            if (
     170                is_array( $data ) &&
     171                isset( $data['sections'], $data['templates'] ) &&
     172                is_array( $data['sections'] ) &&
     173                is_array( $data['templates'] )
     174            ) {
     175                set_transient( '_blockart_library_data', $data, WEEK_IN_SECONDS );
     176            } else {
     177                return new \WP_Error(
     178                    'invalid_data',
     179                    esc_html__( 'Invalid data received from the library.', 'blockart' ),
     180                    array( 'status' => 500 )
     181                );
     182            }
    170183        }
    171184
  • blockart-blocks/trunk/includes/Update.php

    r3054382 r3327943  
    4848            $this->update_to_2_0_9();
    4949        }
    50         if ( version_compare( $old_version, '2.1.0', '<' ) ) {
    51             $this->update_to_2_1_0();
     50        if ( version_compare( $old_version, '2.2.10', '<' ) ) {
     51            $this->update_to_2_2_10();
    5252        }
     53
    5354    }
    5455
     
    118119        delete_transient( '_blockart_library_data' );
    119120    }
     121
     122    /**
     123     * Update to 2.2.10.
     124     *
     125     * @return void
     126     */
     127    private function update_to_2_2_10() {
     128        delete_transient( '_blockart_library_data' );
     129    }
    120130}
  • blockart-blocks/trunk/readme.txt

    r3320504 r3327943  
    55Tested up to: 6.8
    66Requires PHP: 7.4
    7 Stable tag: 2.2.9
     7Stable tag: 2.2.10
    88License: GPLv3
    99License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    249249
    250250== Changelog ==
     251= 2.2.10 - 15-07-2025 =
     252* Fix - PHP Error.
     253
    251254= 2.2.9 - 01-07-2025 =
    252255* Added - Link Option to Timeline Block.
  • blockart-blocks/trunk/vendor/autoload.php

    r3320504 r3327943  
    55require_once __DIR__ . '/composer/autoload_real.php';
    66
    7 return ComposerAutoloaderInit995ba1463eb3e341a332e70ce1584dcf::getLoader();
     7return ComposerAutoloaderInit6e4a9e677d578210d8453abf61d2bef1::getLoader();
  • blockart-blocks/trunk/vendor/composer/autoload_classmap.php

    r3306181 r3327943  
    205205    'JsonMachine\\TokensWithDebugging' => $vendorDir . '/halaxa/json-machine/src/TokensWithDebugging.php',
    206206    'JsonMachine\\ValidJsonPointers' => $vendorDir . '/halaxa/json-machine/src/ValidJsonPointers.php',
     207    'Sabberworm\\CSS\\CSSElement' => $vendorDir . '/sabberworm/php-css-parser/src/CSSElement.php',
    207208    'Sabberworm\\CSS\\CSSList\\AtRuleBlockList' => $vendorDir . '/sabberworm/php-css-parser/src/CSSList/AtRuleBlockList.php',
    208209    'Sabberworm\\CSS\\CSSList\\CSSBlockList' => $vendorDir . '/sabberworm/php-css-parser/src/CSSList/CSSBlockList.php',
     
    221222    'Sabberworm\\CSS\\Parsing\\UnexpectedEOFException' => $vendorDir . '/sabberworm/php-css-parser/src/Parsing/UnexpectedEOFException.php',
    222223    'Sabberworm\\CSS\\Parsing\\UnexpectedTokenException' => $vendorDir . '/sabberworm/php-css-parser/src/Parsing/UnexpectedTokenException.php',
     224    'Sabberworm\\CSS\\Position\\Position' => $vendorDir . '/sabberworm/php-css-parser/src/Position/Position.php',
     225    'Sabberworm\\CSS\\Position\\Positionable' => $vendorDir . '/sabberworm/php-css-parser/src/Position/Positionable.php',
    223226    'Sabberworm\\CSS\\Property\\AtRule' => $vendorDir . '/sabberworm/php-css-parser/src/Property/AtRule.php',
    224227    'Sabberworm\\CSS\\Property\\CSSNamespace' => $vendorDir . '/sabberworm/php-css-parser/src/Property/CSSNamespace.php',
  • blockart-blocks/trunk/vendor/composer/autoload_real.php

    r3320504 r3327943  
    33// autoload_real.php @generated by Composer
    44
    5 class ComposerAutoloaderInit995ba1463eb3e341a332e70ce1584dcf
     5class ComposerAutoloaderInit6e4a9e677d578210d8453abf61d2bef1
    66{
    77    private static $loader;
     
    2323        }
    2424
    25         spl_autoload_register(array('ComposerAutoloaderInit995ba1463eb3e341a332e70ce1584dcf', 'loadClassLoader'), true, true);
     25        spl_autoload_register(array('ComposerAutoloaderInit6e4a9e677d578210d8453abf61d2bef1', 'loadClassLoader'), true, true);
    2626        self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
    27         spl_autoload_unregister(array('ComposerAutoloaderInit995ba1463eb3e341a332e70ce1584dcf', 'loadClassLoader'));
     27        spl_autoload_unregister(array('ComposerAutoloaderInit6e4a9e677d578210d8453abf61d2bef1', 'loadClassLoader'));
    2828
    2929        $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
     
    3131            require __DIR__ . '/autoload_static.php';
    3232
    33             call_user_func(\Composer\Autoload\ComposerStaticInit995ba1463eb3e341a332e70ce1584dcf::getInitializer($loader));
     33            call_user_func(\Composer\Autoload\ComposerStaticInit6e4a9e677d578210d8453abf61d2bef1::getInitializer($loader));
    3434        } else {
    3535            $map = require __DIR__ . '/autoload_namespaces.php';
     
    5252
    5353        if ($useStaticLoader) {
    54             $includeFiles = Composer\Autoload\ComposerStaticInit995ba1463eb3e341a332e70ce1584dcf::$files;
     54            $includeFiles = Composer\Autoload\ComposerStaticInit6e4a9e677d578210d8453abf61d2bef1::$files;
    5555        } else {
    5656            $includeFiles = require __DIR__ . '/autoload_files.php';
    5757        }
    5858        foreach ($includeFiles as $fileIdentifier => $file) {
    59             composerRequire995ba1463eb3e341a332e70ce1584dcf($fileIdentifier, $file);
     59            composerRequire6e4a9e677d578210d8453abf61d2bef1($fileIdentifier, $file);
    6060        }
    6161
     
    6969 * @return void
    7070 */
    71 function composerRequire995ba1463eb3e341a332e70ce1584dcf($fileIdentifier, $file)
     71function composerRequire6e4a9e677d578210d8453abf61d2bef1($fileIdentifier, $file)
    7272{
    7373    if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
  • blockart-blocks/trunk/vendor/composer/autoload_static.php

    r3320504 r3327943  
    55namespace Composer\Autoload;
    66
    7 class ComposerStaticInit995ba1463eb3e341a332e70ce1584dcf
     7class ComposerStaticInit6e4a9e677d578210d8453abf61d2bef1
    88{
    99    public static $files = array (
     
    255255        'JsonMachine\\TokensWithDebugging' => __DIR__ . '/..' . '/halaxa/json-machine/src/TokensWithDebugging.php',
    256256        'JsonMachine\\ValidJsonPointers' => __DIR__ . '/..' . '/halaxa/json-machine/src/ValidJsonPointers.php',
     257        'Sabberworm\\CSS\\CSSElement' => __DIR__ . '/..' . '/sabberworm/php-css-parser/src/CSSElement.php',
    257258        'Sabberworm\\CSS\\CSSList\\AtRuleBlockList' => __DIR__ . '/..' . '/sabberworm/php-css-parser/src/CSSList/AtRuleBlockList.php',
    258259        'Sabberworm\\CSS\\CSSList\\CSSBlockList' => __DIR__ . '/..' . '/sabberworm/php-css-parser/src/CSSList/CSSBlockList.php',
     
    271272        'Sabberworm\\CSS\\Parsing\\UnexpectedEOFException' => __DIR__ . '/..' . '/sabberworm/php-css-parser/src/Parsing/UnexpectedEOFException.php',
    272273        'Sabberworm\\CSS\\Parsing\\UnexpectedTokenException' => __DIR__ . '/..' . '/sabberworm/php-css-parser/src/Parsing/UnexpectedTokenException.php',
     274        'Sabberworm\\CSS\\Position\\Position' => __DIR__ . '/..' . '/sabberworm/php-css-parser/src/Position/Position.php',
     275        'Sabberworm\\CSS\\Position\\Positionable' => __DIR__ . '/..' . '/sabberworm/php-css-parser/src/Position/Positionable.php',
    273276        'Sabberworm\\CSS\\Property\\AtRule' => __DIR__ . '/..' . '/sabberworm/php-css-parser/src/Property/AtRule.php',
    274277        'Sabberworm\\CSS\\Property\\CSSNamespace' => __DIR__ . '/..' . '/sabberworm/php-css-parser/src/Property/CSSNamespace.php',
     
    300303    {
    301304        return \Closure::bind(function () use ($loader) {
    302             $loader->prefixLengthsPsr4 = ComposerStaticInit995ba1463eb3e341a332e70ce1584dcf::$prefixLengthsPsr4;
    303             $loader->prefixDirsPsr4 = ComposerStaticInit995ba1463eb3e341a332e70ce1584dcf::$prefixDirsPsr4;
    304             $loader->classMap = ComposerStaticInit995ba1463eb3e341a332e70ce1584dcf::$classMap;
     305            $loader->prefixLengthsPsr4 = ComposerStaticInit6e4a9e677d578210d8453abf61d2bef1::$prefixLengthsPsr4;
     306            $loader->prefixDirsPsr4 = ComposerStaticInit6e4a9e677d578210d8453abf61d2bef1::$prefixDirsPsr4;
     307            $loader->classMap = ComposerStaticInit6e4a9e677d578210d8453abf61d2bef1::$classMap;
    305308
    306309        }, null, ClassLoader::class);
  • blockart-blocks/trunk/vendor/composer/installed.json

    r3306181 r3327943  
    156156        {
    157157            "name": "halaxa/json-machine",
    158             "version": "1.2.3",
    159             "version_normalized": "1.2.3.0",
     158            "version": "1.2.5",
     159            "version_normalized": "1.2.5.0",
    160160            "source": {
    161161                "type": "git",
    162162                "url": "https://github.com/halaxa/json-machine.git",
    163                 "reference": "58fb6e97c53c3341bb1f3685b8bdbeedf3f9616c"
     163                "reference": "d0f84abf79ac98145d478b66d2bcf363d706477c"
    164164            },
    165165            "dist": {
    166166                "type": "zip",
    167                 "url": "https://api.github.com/repos/halaxa/json-machine/zipball/58fb6e97c53c3341bb1f3685b8bdbeedf3f9616c",
    168                 "reference": "58fb6e97c53c3341bb1f3685b8bdbeedf3f9616c",
     167                "url": "https://api.github.com/repos/halaxa/json-machine/zipball/d0f84abf79ac98145d478b66d2bcf363d706477c",
     168                "reference": "d0f84abf79ac98145d478b66d2bcf363d706477c",
    169169                "shasum": ""
    170170            },
     
    182182                "guzzlehttp/guzzle": "To run example with GuzzleHttp"
    183183            },
    184             "time": "2025-05-30T12:36:04+00:00",
     184            "time": "2025-07-07T13:38:34+00:00",
    185185            "type": "library",
    186186            "installation-source": "dist",
     
    209209            "support": {
    210210                "issues": "https://github.com/halaxa/json-machine/issues",
    211                 "source": "https://github.com/halaxa/json-machine/tree/1.2.3"
     211                "source": "https://github.com/halaxa/json-machine/tree/1.2.5"
    212212            },
    213213            "funding": [
     
    221221        {
    222222            "name": "sabberworm/php-css-parser",
    223             "version": "v8.8.0",
    224             "version_normalized": "8.8.0.0",
     223            "version": "v8.9.0",
     224            "version_normalized": "8.9.0.0",
    225225            "source": {
    226226                "type": "git",
    227227                "url": "https://github.com/MyIntervals/PHP-CSS-Parser.git",
    228                 "reference": "3de493bdddfd1f051249af725c7e0d2c38fed740"
     228                "reference": "d8e916507b88e389e26d4ab03c904a082aa66bb9"
    229229            },
    230230            "dist": {
    231231                "type": "zip",
    232                 "url": "https://api.github.com/repos/MyIntervals/PHP-CSS-Parser/zipball/3de493bdddfd1f051249af725c7e0d2c38fed740",
    233                 "reference": "3de493bdddfd1f051249af725c7e0d2c38fed740",
     232                "url": "https://api.github.com/repos/MyIntervals/PHP-CSS-Parser/zipball/d8e916507b88e389e26d4ab03c904a082aa66bb9",
     233                "reference": "d8e916507b88e389e26d4ab03c904a082aa66bb9",
    234234                "shasum": ""
    235235            },
     
    239239            },
    240240            "require-dev": {
    241                 "phpunit/phpunit": "5.7.27 || 6.5.14 || 7.5.20 || 8.5.41"
     241                "phpunit/phpunit": "5.7.27 || 6.5.14 || 7.5.20 || 8.5.41",
     242                "rawr/cross-data-providers": "^2.0.0"
    242243            },
    243244            "suggest": {
    244245                "ext-mbstring": "for parsing UTF-8 CSS"
    245246            },
    246             "time": "2025-03-23T17:59:05+00:00",
     247            "time": "2025-07-11T13:20:48+00:00",
    247248            "type": "library",
    248249            "extra": {
     
    283284            "support": {
    284285                "issues": "https://github.com/MyIntervals/PHP-CSS-Parser/issues",
    285                 "source": "https://github.com/MyIntervals/PHP-CSS-Parser/tree/v8.8.0"
     286                "source": "https://github.com/MyIntervals/PHP-CSS-Parser/tree/v8.9.0"
    286287            },
    287288            "install-path": "../sabberworm/php-css-parser"
  • blockart-blocks/trunk/vendor/composer/installed.php

    r3306181 r3327943  
    2121        ),
    2222        'halaxa/json-machine' => array(
    23             'pretty_version' => '1.2.3',
    24             'version' => '1.2.3.0',
     23            'pretty_version' => '1.2.5',
     24            'version' => '1.2.5.0',
    2525            'type' => 'library',
    2626            'install_path' => __DIR__ . '/../halaxa/json-machine',
    2727            'aliases' => array(),
    28             'reference' => '58fb6e97c53c3341bb1f3685b8bdbeedf3f9616c',
     28            'reference' => 'd0f84abf79ac98145d478b66d2bcf363d706477c',
    2929            'dev_requirement' => false,
    3030        ),
     
    3636        ),
    3737        'sabberworm/php-css-parser' => array(
    38             'pretty_version' => 'v8.8.0',
    39             'version' => '8.8.0.0',
     38            'pretty_version' => 'v8.9.0',
     39            'version' => '8.9.0.0',
    4040            'type' => 'library',
    4141            'install_path' => __DIR__ . '/../sabberworm/php-css-parser',
    4242            'aliases' => array(),
    43             'reference' => '3de493bdddfd1f051249af725c7e0d2c38fed740',
     43            'reference' => 'd8e916507b88e389e26d4ab03c904a082aa66bb9',
    4444            'dev_requirement' => false,
    4545        ),
  • blockart-blocks/trunk/vendor/halaxa/json-machine/CHANGELOG.md

    r3306181 r3327943  
    1010## master
    1111Nothing yet
     12
     13<br>
     14
     15## 1.2.5 - 2025-07-07
     16- Slight performance optimization of the tokenizing process (about +7 % speed gain)
     17
     18<br>
     19
     20## 1.2.4 - 2025-06-16
     21### Fixed
     22- The key of a scalar value after a compound value is lost ([#125](https://github.com/halaxa/json-machine/issues/125)). Thanks [@smiletoeverybody](https://github.com/smiletoeverybody)
    1223
    1324<br>
     
    2233## 1.2.2 - 2025-04-30
    2334### Changed
    24 - Leaner release package (#124). Thanks [@robotomarvin](https://github.com/robotomarvin)
     35- Leaner release package ([#124](https://github.com/halaxa/json-machine/issues/124)). Thanks [@robotomarvin](https://github.com/robotomarvin)
    2536
    2637<br>
     
    2839## 1.2.1 - 2025-04-25
    2940### Fixed
    30 - File autoloading without composer (#122). Thanks [@bahco](https://github.com/bahco)
    31 - Crash on `null` value in `RecursiveItems` (#119). Thanks [@bark92](https://github.com/bark92)
     41- File autoloading without composer ([#122](https://github.com/halaxa/json-machine/issues/122)). Thanks [@bahco](https://github.com/bahco)
     42- Crash on `null` value in `RecursiveItems` ([#119](https://github.com/halaxa/json-machine/issues/119)). Thanks [@bark92](https://github.com/bark92)
    3243<br>
    3344
     
    4354- Exception on misspelled option name suggests a correct one.
    4455### Fixed
    45 - Wrong key when combining list and scalar value pointers (#110). Thanks [@daniel-sc](https://github.com/daniel-sc)
     56- Wrong key when combining list and scalar value pointers ([#110](https://github.com/halaxa/json-machine/issues/110)). Thanks [@daniel-sc](https://github.com/daniel-sc)
    4657### Removed
    4758- Removed support for PHP 7.0, 7.1
     
    5465- Added PHPStan to build pipeline
    5566### Fixed
    56 - Fixed the case when non-intersecting pointers were considered intersecting (#106). Thanks [@XedinUnknown](https://github.com/XedinUnknown)
     67- Fixed the case when non-intersecting pointers were considered intersecting ([#106](https://github.com/halaxa/json-machine/issues/106)). Thanks [@XedinUnknown](https://github.com/XedinUnknown)
    5768
    5869<br>
     
    6071## 1.1.3 - 2022-10-12
    6172### Fixed
    62 - Fix the parsing of nested sub-trees that use wildcards (#83). Thanks [@cerbero90](https://github.com/cerbero90)
     73- Fix the parsing of nested sub-trees that use wildcards ([#83](https://github.com/halaxa/json-machine/issues/83)). Thanks [@cerbero90](https://github.com/cerbero90)
    6374
    6475<br>
     
    6980
    7081### Fixed
    71 - Meaningful error on invalid token. (#86)
    72 - Added missing return type annotation. (#84)
     82- Meaningful error on invalid token. ([#86](https://github.com/halaxa/json-machine/issues/86))
     83- Added missing return type annotation. ([#84](https://github.com/halaxa/json-machine/issues/84))
    7384
    7485<br>
     
    169180## 0.6.1
    170181### Fixed bugs
    171 - Empty dict at the end of an item was causing Syntax error in the next item. Reason: closing `}` did not set object key expectation to `false`. (#41 via PR #42).
     182- Empty dict at the end of an item was causing Syntax error in the next item. Reason: closing `}` did not set object key expectation to `false`. ([#41](https://github.com/halaxa/json-machine/issues/41) via PR [#42](https://github.com/halaxa/json-machine/issues/42)).
    172183
    173184<br>
  • blockart-blocks/trunk/vendor/halaxa/json-machine/README.md

    r3306181 r3327943  
    8989- Ease of use. Just iterate JSON of any size with `foreach`. No events and callbacks.
    9090- Efficient iteration on any subtree of the document, specified by [JSON Pointer](#json-pointer)
    91 - Speed. Performance critical code contains no unnecessary function calls, no regular expressions
     91- Speed. Performance critical code is optimized for speed with JIT in mind,
    9292and uses native `json_decode` to decode JSON document items by default. See [Decoders](#decoders).
    9393- Parses not only streams but any iterable that produces JSON chunks.
  • blockart-blocks/trunk/vendor/halaxa/json-machine/src/FileChunks.php

    r3021722 r3327943  
    2020     * @param int    $chunkSize
    2121     */
    22     public function __construct($fileName, $chunkSize = 1024 * 8)
     22    public function __construct($fileName, $chunkSize = 1024 * 16)
    2323    {
    2424        $this->fileName = $fileName;
  • blockart-blocks/trunk/vendor/halaxa/json-machine/src/Parser.php

    r3306181 r3327943  
    267267                case ']':
    268268                    --$currentLevel;
     269                    if ($currentLevel < $iteratorLevel) {
     270                        $iteratorStruct = null;
     271                    }
    269272                    $inObject = $stack[$currentLevel] == '{';
    270273                    // no break
  • blockart-blocks/trunk/vendor/halaxa/json-machine/src/Tokens.php

    r3306181 r3327943  
    3838    private function createGenerator(): Generator
    3939    {
    40         $regex = '/
    41             [{}\[\],:]
    42             #| true|false|null
    43             #| [\deE.+-]+
    44             #| (t|tr|tru|f|fa|fal|fals|n|nu|nul)$
    45             | [^\xEF\xBB\xBF\s{}\[\],:]+    # todo make matching logic positive as in comments above and solve 2 failing tests
    46         /x';
     40        $regex = '/ [{}\[\],:] | [^\xEF\xBB\xBF\s{}\[\],:]+ /x';
    4741
    4842        $inString = 0;
     
    5044
    5145        foreach ($this->jsonChunks as $jsonChunk) {
    52             $chunkItems = explode('"', $carry.$jsonChunk);
     46            $chunkBlocks = explode('"', $carry.$jsonChunk);
    5347            $carry = '';
    5448
    55             $chunkItemsLastSafeIndex = count($chunkItems) - 2;
     49            $chunkItemsLastSafeIndex = count($chunkBlocks) - 2;
    5650            for ($i = 0; $i <= $chunkItemsLastSafeIndex; ++$i) {
    5751                if ($inString) {
    58                     if ($this->stringIsEscaping($chunkItems[$i])) {
    59                         $carry .= $chunkItems[$i].'"';
     52                    if ($this->stringIsEscaping($chunkBlocks[$i])) {
     53                        $carry .= $chunkBlocks[$i].'"';
    6054                    } else {
    61                         yield '"'.$carry.$chunkItems[$i].'"';
     55                        yield "\"$carry$chunkBlocks[$i]\"";
    6256                        $carry = '';
    6357                        $inString = 0;
    6458                    }
    6559                } else {
    66                     preg_match_all($regex, $chunkItems[$i], $matches);
    67                     yield from $matches[0];
     60                    $chunkBlock = trim($chunkBlocks[$i]);
     61                    if (strlen($chunkBlock) == 1) {
     62                        yield $chunkBlock;
     63                    } else {
     64                        preg_match_all($regex, $chunkBlock, $matches);
     65                        yield from $matches[0];
     66                    }
    6867                    $inString = 1;
    6968                }
     
    7170
    7271            if ($inString) {
    73                 $carry .= $chunkItems[$i];
     72                $carry .= $chunkBlocks[$i];
    7473            } else {
    75                 preg_match_all($regex, $chunkItems[$i], $matches);
     74                preg_match_all($regex, $chunkBlocks[$i], $matches);
    7675                $carry = array_pop($matches[0]);
    7776                yield from $matches[0];
     
    8887        $i = strlen($token);
    8988        $slashes = 0;
    90         while (--$i >= 0 && isset($token[$i]) && $token[$i] === '\\') {
     89        while (--$i >= 0 && $token[$i] === '\\') {
    9190            ++$slashes;
    9291        }
  • blockart-blocks/trunk/vendor/halaxa/json-machine/src/autoloader.php

    r3306181 r3327943  
    4242}
    4343
     44// @codeCoverageIgnoreStart
    4445$files = json_decode(file_get_contents(__DIR__.'/../composer.json'), true)['autoload']['files'];
    4546foreach ($files as $file) {
     
    4748}
    4849
    49 // @codeCoverageIgnoreStart
    5050return [Autoloading::class, 'autoloader'];
    5151// @codeCoverageIgnoreEnd
  • blockart-blocks/trunk/vendor/sabberworm/php-css-parser/CHANGELOG.md

    r3306181 r3327943  
    1616### Fixed
    1717
     18## 8.9.0: New features, bug fixes and deprecations
     19
     20### Added
     21
     22- `RuleSet::removeMatchingRules()` method
     23  (for the implementing classes `AtRuleSet` and `DeclarationBlock`) (#1249)
     24- `RuleSet::removeAllRules()` method
     25  (for the implementing classes `AtRuleSet` and `DeclarationBlock`) (#1249)
     26- Add Interface `CSSElement` (#1231)
     27- Methods `getLineNumber` and `getColumnNumber` which return a nullable `int`
     28  for the following classes:
     29  `Comment`, `CSSList`, `SourceException`, `Charset`, `CSSNamespace`, `Import`,
     30  `Rule`, `DeclarationBlock`, `RuleSet`, `CSSFunction`, `Value` (#1225, #1263)
     31- `Positionable` interface for CSS items that may have a position
     32  (line and perhaps column number) in the parsed CSS (#1221)
     33
     34### Changed
     35
     36- Parameters for `getAllValues()` are deconflated, so it now takes three (all
     37  optional), allowing `$element` and `$ruleSearchPattern` to be specified
     38  separately (#1241)
     39- Implement `Positionable` in the following CSS item classes:
     40  `Comment`, `CSSList`, `SourceException`, `Charset`, `CSSNamespace`, `Import`,
     41  `Rule`, `DeclarationBlock`, `RuleSet`, `CSSFunction`, `Value` (#1225)
     42
     43### Deprecated
     44
     45- Support for PHP < 7.2 is deprecated; version 9.0 will require PHP 7.2 or later
     46  (#1264)
     47- Passing a `string` or `null` to `RuleSet::removeRule()` is deprecated
     48  (implementing classes are `AtRuleSet` and `DeclarationBlock`);
     49  use `removeMatchingRules()` or `removeAllRules()` instead (#1249)
     50- Passing a `Rule` to `RuleSet::getRules()` or `getRulesAssoc()` is deprecated,
     51  affecting the implementing classes `AtRuleSet` and `DeclarationBlock`
     52  (call e.g. `getRules($rule->getRule())` instead) (#1248)
     53- Passing a string as the first argument to `getAllValues()` is deprecated;
     54  the search pattern should now be passed as the second argument (#1241)
     55- Passing a Boolean as the second argument to `getAllValues()` is deprecated;
     56  the flag for searching in function arguments should now be passed as the third
     57  argument (#1241)
     58- `getLineNo()` is deprecated in these classes (use `getLineNumber()` instead):
     59  `Comment`, `CSSList`, `SourceException`, `Charset`, `CSSNamespace`, `Import`,
     60  `Rule`, `DeclarationBlock`, `RuleSet`, `CSSFunction`, `Value` (#1225, #1233)
     61- `Rule::getColNo()` is deprecated (use `getColumnNumber()` instead)
     62  (#1225, #1233)
     63- Providing zero as the line number argument to `Rule::setPosition()` is
     64  deprecated (pass `null` instead if there is no line number) (#1225, #1233)
     65
     66### Fixed
     67
     68- Set line number when `RuleSet::addRule()` called with only column number set
     69  (#1265)
     70- Ensure first rule added with `RuleSet::addRule()` has valid position (#1262)
     71
    1872## 8.8.0: Bug fixes and deprecations
    1973
     
    2478### Changed
    2579
    26 - Mark the `OutputFormat` the constructor as `@internal` (#1131)
     80- Mark the `OutputFormat` constructor as `@internal` (#1131)
    2781- Mark `OutputFormatter` as `@internal` (#896)
    2882- Mark `Selector::isValid()` as `@internal` (#1037)
     
    3690- Deprecate `OutputFormat::get()` and `::set()` (#1107)
    3791- Deprecate support for `-webkit-calc` and `-moz-calc` (#1086)
     92- Deprecate magic method forwarding from `OutputFormat` to `OutputFormatter`
     93  (#894)
    3894- Deprecate `__toString()` (#1006)
    3995- Deprecate greedy calculation of selector specificity (#1018)
     
    62118### Deprecated
    63119
    64 - Deprecate magic method forwarding from `OutputFormat` to `OutputFormatter`
    65   (#894)
    66120- Deprecate the expansion of shorthand properties (#719)
    67121- Deprecate `Parser::setCharset()` and `Parser::getCharset()` (#703)
  • blockart-blocks/trunk/vendor/sabberworm/php-css-parser/src/CSSList/CSSBlockList.php

    r2993158 r3327943  
    33namespace Sabberworm\CSS\CSSList;
    44
     5use Sabberworm\CSS\CSSElement;
    56use Sabberworm\CSS\Property\Selector;
    67use Sabberworm\CSS\Rule\Rule;
     
    6061
    6162    /**
    62      * @param CSSList|Rule|RuleSet|Value $oElement
     63     * Returns all `Value` objects found recursively in `Rule`s in the tree.
     64     *
     65     * @param CSSElement|string|null $element
     66     *        This is the `CSSList` or `RuleSet` to start the search from (defaults to the whole document).
     67     *        If a string is given, it is used as a rule name filter.
     68     *        Passing a string for this parameter is deprecated in version 8.9.0, and will not work from v9.0;
     69     *        use the following parameter to pass a rule name filter instead.
     70     * @param string|bool|null $ruleSearchPatternOrSearchInFunctionArguments
     71     *        This allows filtering rules by property name
     72     *        (e.g. if "color" is passed, only `Value`s from `color` properties will be returned,
     73     *        or if "font-" is provided, `Value`s from all font rules, like `font-size`, and including `font` itself,
     74     *        will be returned).
     75     *        If a Boolean is provided, it is treated as the `$searchInFunctionArguments` argument.
     76     *        Passing a Boolean for this parameter is deprecated in version 8.9.0, and will not work from v9.0;
     77     *        use the `$searchInFunctionArguments` parameter instead.
     78     * @param bool $searchInFunctionArguments whether to also return Value objects used as Function arguments.
     79     *
     80     * @return array<int, Value>
     81     *
     82     * @see RuleSet->getRules()
     83     */
     84    public function getAllValues(
     85        $element = null,
     86        $ruleSearchPatternOrSearchInFunctionArguments = null,
     87        $searchInFunctionArguments = false
     88    ) {
     89        if (\is_bool($ruleSearchPatternOrSearchInFunctionArguments)) {
     90            $searchInFunctionArguments = $ruleSearchPatternOrSearchInFunctionArguments;
     91            $searchString = null;
     92        } else {
     93            $searchString = $ruleSearchPatternOrSearchInFunctionArguments;
     94        }
     95
     96        if ($element === null) {
     97            $element = $this;
     98        } elseif (\is_string($element)) {
     99            $searchString = $element;
     100            $element = $this;
     101        }
     102
     103        $result = [];
     104        $this->allValues($element, $result, $searchString, $searchInFunctionArguments);
     105        return $result;
     106    }
     107
     108    /**
     109     * @param CSSElement|string $oElement
    63110     * @param array<int, Value> $aResult
    64111     * @param string|null $sSearchString
  • blockart-blocks/trunk/vendor/sabberworm/php-css-parser/src/CSSList/CSSList.php

    r3306181 r3327943  
    55use Sabberworm\CSS\Comment\Comment;
    66use Sabberworm\CSS\Comment\Commentable;
     7use Sabberworm\CSS\CSSElement;
    78use Sabberworm\CSS\OutputFormat;
    89use Sabberworm\CSS\Parsing\ParserState;
     
    1011use Sabberworm\CSS\Parsing\UnexpectedEOFException;
    1112use Sabberworm\CSS\Parsing\UnexpectedTokenException;
     13use Sabberworm\CSS\Position\Position;
     14use Sabberworm\CSS\Position\Positionable;
    1215use Sabberworm\CSS\Property\AtRule;
    1316use Sabberworm\CSS\Property\Charset;
     
    3033 * It can also contain `Import` and `Charset` objects stemming from at-rules.
    3134 */
    32 abstract class CSSList implements Renderable, Commentable
     35abstract class CSSList implements Commentable, CSSElement, Positionable
    3336{
     37    use Position;
     38
    3439    /**
    3540     * @var array<array-key, Comment>
     
    4550     */
    4651    protected $aContents;
    47 
    48     /**
    49      * @var int
    50      *
    51      * @internal since 8.8.0
    52      */
    53     protected $iLineNo;
    5452
    5553    /**
     
    6058        $this->aComments = [];
    6159        $this->aContents = [];
    62         $this->iLineNo = $iLineNo;
     60        $this->setPosition($iLineNo);
    6361    }
    6462
     
    260258
    261259    /**
    262      * @return int
    263      */
    264     public function getLineNo()
    265     {
    266         return $this->iLineNo;
    267     }
    268 
    269     /**
    270260     * Prepends an item to the list of contents.
    271261     *
  • blockart-blocks/trunk/vendor/sabberworm/php-css-parser/src/CSSList/Document.php

    r3306181 r3327943  
    99use Sabberworm\CSS\RuleSet\DeclarationBlock;
    1010use Sabberworm\CSS\RuleSet\RuleSet;
    11 use Sabberworm\CSS\Value\Value;
    1211
    1312/**
     
    7574        $aResult = [];
    7675        $this->allRuleSets($aResult);
    77         return $aResult;
    78     }
    79 
    80     /**
    81      * Returns all `Value` objects found recursively in `Rule`s in the tree.
    82      *
    83      * @param CSSList|RuleSet|string $mElement
    84      *        the `CSSList` or `RuleSet` to start the search from (defaults to the whole document).
    85      *        If a string is given, it is used as rule name filter.
    86      * @param bool $bSearchInFunctionArguments whether to also return Value objects used as Function arguments.
    87      *
    88      * @return array<int, Value>
    89      *
    90      * @see RuleSet->getRules()
    91      */
    92     public function getAllValues($mElement = null, $bSearchInFunctionArguments = false)
    93     {
    94         $sSearchString = null;
    95         if ($mElement === null) {
    96             $mElement = $this;
    97         } elseif (is_string($mElement)) {
    98             $sSearchString = $mElement;
    99             $mElement = $this;
    100         }
    101         /** @var array<int, Value> $aResult */
    102         $aResult = [];
    103         $this->allValues($mElement, $aResult, $sSearchString, $bSearchInFunctionArguments);
    10476        return $aResult;
    10577    }
  • blockart-blocks/trunk/vendor/sabberworm/php-css-parser/src/Comment/Comment.php

    r3306181 r3327943  
    55use Sabberworm\CSS\OutputFormat;
    66use Sabberworm\CSS\Renderable;
     7use Sabberworm\CSS\Position\Position;
     8use Sabberworm\CSS\Position\Positionable;
    79
    8 class Comment implements Renderable
     10class Comment implements Positionable, Renderable
    911{
    10     /**
    11      * @var int
    12      *
    13      * @internal since 8.8.0
    14      */
    15     protected $iLineNo;
     12    use Position;
    1613
    1714    /**
     
    2926    {
    3027        $this->sComment = $sComment;
    31         $this->iLineNo = $iLineNo;
     28        $this->setPosition($iLineNo);
    3229    }
    3330
     
    3835    {
    3936        return $this->sComment;
    40     }
    41 
    42     /**
    43      * @return int
    44      */
    45     public function getLineNo()
    46     {
    47         return $this->iLineNo;
    4837    }
    4938
  • blockart-blocks/trunk/vendor/sabberworm/php-css-parser/src/Parsing/SourceException.php

    r2993158 r3327943  
    33namespace Sabberworm\CSS\Parsing;
    44
    5 class SourceException extends \Exception
     5use Sabberworm\CSS\Position\Position;
     6use Sabberworm\CSS\Position\Positionable;
     7
     8class SourceException extends \Exception implements Positionable
    69{
    7     /**
    8      * @var int
    9      */
    10     private $iLineNo;
     10    use Position;
    1111
    1212    /**
     
    1616    public function __construct($sMessage, $iLineNo = 0)
    1717    {
    18         $this->iLineNo = $iLineNo;
     18        $this->setPosition($iLineNo);
    1919        if (!empty($iLineNo)) {
    2020            $sMessage .= " [line no: $iLineNo]";
     
    2222        parent::__construct($sMessage);
    2323    }
    24 
    25     /**
    26      * @return int
    27      */
    28     public function getLineNo()
    29     {
    30         return $this->iLineNo;
    31     }
    3224}
  • blockart-blocks/trunk/vendor/sabberworm/php-css-parser/src/Property/CSSNamespace.php

    r3306181 r3327943  
    55use Sabberworm\CSS\Comment\Comment;
    66use Sabberworm\CSS\OutputFormat;
     7use Sabberworm\CSS\Position\Position;
     8use Sabberworm\CSS\Position\Positionable;
    79
    810/**
    911 * `CSSNamespace` represents an `@namespace` rule.
    1012 */
    11 class CSSNamespace implements AtRule
     13class CSSNamespace implements AtRule, Positionable
    1214{
     15    use Position;
     16
    1317    /**
    1418     * @var string
     
    4246        $this->mUrl = $mUrl;
    4347        $this->sPrefix = $sPrefix;
    44         $this->iLineNo = $iLineNo;
     48        $this->setPosition($iLineNo);
    4549        $this->aComments = [];
    46     }
    47 
    48     /**
    49      * @return int
    50      */
    51     public function getLineNo()
    52     {
    53         return $this->iLineNo;
    5450    }
    5551
  • blockart-blocks/trunk/vendor/sabberworm/php-css-parser/src/Property/Charset.php

    r3306181 r3327943  
    55use Sabberworm\CSS\Comment\Comment;
    66use Sabberworm\CSS\OutputFormat;
     7use Sabberworm\CSS\Position\Position;
     8use Sabberworm\CSS\Position\Positionable;
    79use Sabberworm\CSS\Value\CSSString;
    810
     
    1517 * - Must not appear more than once.
    1618 */
    17 class Charset implements AtRule
     19class Charset implements AtRule, Positionable
    1820{
     21    use Position;
     22
    1923    /**
    2024     * @var CSSString
     
    4347    {
    4448        $this->oCharset = $oCharset;
    45         $this->iLineNo = $iLineNo;
     49        $this->setPosition($iLineNo);
    4650        $this->aComments = [];
    47     }
    48 
    49     /**
    50      * @return int
    51      */
    52     public function getLineNo()
    53     {
    54         return $this->iLineNo;
    5551    }
    5652
  • blockart-blocks/trunk/vendor/sabberworm/php-css-parser/src/Property/Import.php

    r3306181 r3327943  
    55use Sabberworm\CSS\Comment\Comment;
    66use Sabberworm\CSS\OutputFormat;
     7use Sabberworm\CSS\Position\Position;
     8use Sabberworm\CSS\Position\Positionable;
    79use Sabberworm\CSS\Value\URL;
    810
     
    1012 * Class representing an `@import` rule.
    1113 */
    12 class Import implements AtRule
     14class Import implements AtRule, Positionable
    1315{
     16    use Position;
     17
    1418    /**
    1519     * @var URL
     
    2125     */
    2226    private $sMediaQuery;
    23 
    24     /**
    25      * @var int
    26      *
    27      * @internal since 8.8.0
    28      */
    29     protected $iLineNo;
    3027
    3128    /**
     
    4542        $this->oLocation = $oLocation;
    4643        $this->sMediaQuery = $sMediaQuery;
    47         $this->iLineNo = $iLineNo;
     44        $this->setPosition($iLineNo);
    4845        $this->aComments = [];
    49     }
    50 
    51     /**
    52      * @return int
    53      */
    54     public function getLineNo()
    55     {
    56         return $this->iLineNo;
    5746    }
    5847
  • blockart-blocks/trunk/vendor/sabberworm/php-css-parser/src/Rule/Rule.php

    r3306181 r3327943  
    55use Sabberworm\CSS\Comment\Comment;
    66use Sabberworm\CSS\Comment\Commentable;
     7use Sabberworm\CSS\CSSElement;
    78use Sabberworm\CSS\OutputFormat;
    89use Sabberworm\CSS\Parsing\ParserState;
    910use Sabberworm\CSS\Parsing\UnexpectedEOFException;
    1011use Sabberworm\CSS\Parsing\UnexpectedTokenException;
    11 use Sabberworm\CSS\Renderable;
     12use Sabberworm\CSS\Position\Position;
     13use Sabberworm\CSS\Position\Positionable;
    1214use Sabberworm\CSS\Value\RuleValueList;
    1315use Sabberworm\CSS\Value\Value;
     
    1820 * In CSS, `Rule`s are expressed as follows: “key: value[0][0] value[0][1], value[1][0] value[1][1];”
    1921 */
    20 class Rule implements Renderable, Commentable
     22class Rule implements Commentable, CSSElement, Positionable
    2123{
     24    use Position;
     25
    2226    /**
    2327     * @var string
     
    3943     */
    4044    private $aIeHack;
    41 
    42     /**
    43      * @var int
    44      */
    45     protected $iLineNo;
    46 
    47     /**
    48      * @var int
    49      *
    50      * @internal since 8.8.0
    51      */
    52     protected $iColNo;
    5345
    5446    /**
     
    7062        $this->bIsImportant = false;
    7163        $this->aIeHack = [];
    72         $this->iLineNo = $iLineNo;
    73         $this->iColNo = $iColNo;
     64        $this->setPosition($iLineNo, $iColNo);
    7465        $this->aComments = [];
    7566    }
     
    144135
    145136    /**
    146      * @return int
    147      */
    148     public function getLineNo()
    149     {
    150         return $this->iLineNo;
    151     }
    152 
    153     /**
    154      * @return int
    155      */
    156     public function getColNo()
    157     {
    158         return $this->iColNo;
    159     }
    160 
    161     /**
    162      * @param int $iLine
    163      * @param int $iColumn
    164      *
    165      * @return void
    166      */
    167     public function setPosition($iLine, $iColumn)
    168     {
    169         $this->iColNo = $iColumn;
    170         $this->iLineNo = $iLine;
    171     }
    172 
    173     /**
    174137     * @param string $sRule
    175138     *
     
    296259        if (!$this->mValue instanceof RuleValueList || $this->mValue->getListSeparator() !== $sType) {
    297260            $mCurrentValue = $this->mValue;
    298             $this->mValue = new RuleValueList($sType, $this->iLineNo);
     261            $this->mValue = new RuleValueList($sType, $this->getLineNumber());
    299262            if ($mCurrentValue) {
    300263                $this->mValue->addListComponent($mCurrentValue);
  • blockart-blocks/trunk/vendor/sabberworm/php-css-parser/src/RuleSet/DeclarationBlock.php

    r3306181 r3327943  
    435435            'background-attachment' => ['scroll'],
    436436            'background-position' => [
    437                 new Size(0, '%', false, $this->iLineNo),
    438                 new Size(0, '%', false, $this->iLineNo),
     437                new Size(0, '%', false, $this->getLineNo()),
     438                new Size(0, '%', false, $this->getLineNo()),
    439439            ],
    440440        ];
     
    802802            }
    803803            if ($aLHValues[0] !== 'normal') {
    804                 $val = new RuleValueList('/', $this->iLineNo);
     804                $val = new RuleValueList('/', $this->getLineNo());
    805805                $val->addListComponent($aFSValues[0]);
    806806                $val->addListComponent($aLHValues[0]);
     
    818818            $aFFValues = $mRuleValue->getListComponents();
    819819        }
    820         $oFFValue = new RuleValueList(',', $this->iLineNo);
     820        $oFFValue = new RuleValueList(',', $this->getLineNo());
    821821        $oFFValue->setListComponents($aFFValues);
    822822        $oNewRule->addValue($oFFValue);
     
    852852        if (count($this->aSelectors) === 0) {
    853853            // If all the selectors have been removed, this declaration block becomes invalid
    854             throw new OutputException("Attempt to print declaration block with missing selector", $this->iLineNo);
     854            throw new OutputException(
     855                'Attempt to print declaration block with missing selector',
     856                $this->getLineNumber()
     857            );
    855858        }
    856859        $sResult .= $oOutputFormat->sBeforeDeclarationBlock;
  • blockart-blocks/trunk/vendor/sabberworm/php-css-parser/src/RuleSet/RuleSet.php

    r3306181 r3327943  
    55use Sabberworm\CSS\Comment\Comment;
    66use Sabberworm\CSS\Comment\Commentable;
     7use Sabberworm\CSS\CSSElement;
    78use Sabberworm\CSS\OutputFormat;
    89use Sabberworm\CSS\Parsing\ParserState;
    910use Sabberworm\CSS\Parsing\UnexpectedEOFException;
    1011use Sabberworm\CSS\Parsing\UnexpectedTokenException;
     12use Sabberworm\CSS\Position\Position;
     13use Sabberworm\CSS\Position\Positionable;
    1114use Sabberworm\CSS\Renderable;
    1215use Sabberworm\CSS\Rule\Rule;
     
    2124 * (which accepts either a `Rule` or a rule name; optionally suffixed by a dash to remove all related rules).
    2225 */
    23 abstract class RuleSet implements Renderable, Commentable
     26abstract class RuleSet implements CSSElement, Commentable, Positionable
    2427{
     28    use Position;
     29
    2530    /**
    2631     * the rules in this rule set, using the property name as the key,
     
    3237
    3338    /**
    34      * @var int
     39     * @var array<array-key, Comment>
    3540     *
    3641     * @internal since 8.8.0
    3742     */
    38     protected $iLineNo;
    39 
    40     /**
    41      * @var array<array-key, Comment>
    42      *
    43      * @internal since 8.8.0
    44      */
    4543    protected $aComments;
    4644
     
    5149    {
    5250        $this->aRules = [];
    53         $this->iLineNo = $iLineNo;
     51        $this->setPosition($iLineNo);
    5452        $this->aComments = [];
    5553    }
     
    104102
    105103    /**
    106      * @return int
    107      */
    108     public function getLineNo()
    109     {
    110         return $this->iLineNo;
    111     }
    112 
    113     /**
    114104     * @param Rule|null $oSibling
    115105     *
     
    132122            }
    133123        }
    134         if ($oRule->getLineNo() === 0 && $oRule->getColNo() === 0) {
     124        if ($oRule->getLineNumber() === null) {
    135125            //this node is added manually, give it the next best line
     126            $columnNumber = $oRule->getColNo();
    136127            $rules = $this->getRules();
    137128            $pos = count($rules);
    138129            if ($pos > 0) {
    139130                $last = $rules[$pos - 1];
    140                 $oRule->setPosition($last->getLineNo() + 1, 0);
    141             }
     131                $oRule->setPosition($last->getLineNo() + 1, $columnNumber);
     132            } else {
     133                $oRule->setPosition(1, $columnNumber);
     134            }
     135        } elseif ($oRule->getColumnNumber() === null) {
     136            $oRule->setPosition($oRule->getLineNumber(), 0);
    142137        }
    143138
     
    157152     *        If the pattern ends with a dash, all rules starting with the pattern are returned
    158153     *        as well as one matching the pattern with the dash excluded.
    159      *        Passing a Rule behaves like calling `getRules($mRule->getRule())`.
     154     *        Passing a `Rule` for this parameter is deprecated in version 8.9.0, and will not work from v9.0.
     155     *        Call `getRules($rule->getRule())` instead.
    160156     *
    161157     * @return array<int, Rule>
     
    216212     *        Pattern to search for. If null, returns all rules. If the pattern ends with a dash,
    217213     *        all rules starting with the pattern are returned as well as one matching the pattern with the dash
    218      *        excluded. Passing a Rule behaves like calling `getRules($mRule->getRule())`.
     214     *        excluded.
     215     *        Passing a `Rule` for this parameter is deprecated in version 8.9.0, and will not work from v9.0.
     216     *        Call `getRulesAssoc($rule->getRule())` instead.
    219217     *
    220218     * @return array<string, Rule>
     
    231229
    232230    /**
    233      * Removes a rule from this RuleSet. This accepts all the possible values that `getRules()` accepts.
    234      *
    235      * If given a Rule, it will only remove this particular rule (by identity).
    236      * If given a name, it will remove all rules by that name.
    237      *
    238      * Note: this is different from pre-v.2.0 behaviour of PHP-CSS-Parser, where passing a Rule instance would
    239      * remove all rules with the same name. To get the old behaviour, use `removeRule($oRule->getRule())`.
     231     * Removes a `Rule` from this `RuleSet` by identity.
    240232     *
    241233     * @param Rule|string|null $mRule
    242      *        pattern to remove. If $mRule is null, all rules are removed. If the pattern ends in a dash,
    243      *        all rules starting with the pattern are removed as well as one matching the pattern with the dash
    244      *        excluded. Passing a Rule behaves matches by identity.
    245      *
    246      * @return void
     234     *        `Rule` to remove.
     235     *        Passing a `string` or `null` is deprecated in version 8.9.0, and will no longer work from v9.0.
     236     *        Use `removeMatchingRules()` or `removeAllRules()` instead.
    247237     */
    248238    public function removeRule($mRule)
     
    258248                }
    259249            }
     250        } elseif ($mRule !== null) {
     251            $this->removeMatchingRules($mRule);
    260252        } else {
    261             foreach ($this->aRules as $sName => $aRules) {
    262                 // Either no search rule is given or the search rule matches the found rule exactly
    263                 // or the search rule ends in “-” and the found rule starts with the search rule or equals it
    264                 // (without the trailing dash).
    265                 if (
    266                     !$mRule || $sName === $mRule
    267                     || (strrpos($mRule, '-') === strlen($mRule) - strlen('-')
    268                         && (strpos($sName, $mRule) === 0 || $sName === substr($mRule, 0, -1)))
    269                 ) {
    270                     unset($this->aRules[$sName]);
    271                 }
    272             }
    273         }
     253            $this->removeAllRules();
     254        }
     255    }
     256
     257    /**
     258     * Removes rules by property name or search pattern.
     259     *
     260     * @param string $searchPattern
     261     *        pattern to remove.
     262     *        If the pattern ends in a dash,
     263     *        all rules starting with the pattern are removed as well as one matching the pattern with the dash
     264     *        excluded.
     265     */
     266    public function removeMatchingRules($searchPattern)
     267    {
     268        foreach ($this->aRules as $propertyName => $rules) {
     269            // Either the search rule matches the found rule exactly
     270            // or the search rule ends in “-” and the found rule starts with the search rule or equals it
     271            // (without the trailing dash).
     272            if (
     273                $propertyName === $searchPattern
     274                || (\strrpos($searchPattern, '-') === \strlen($searchPattern) - \strlen('-')
     275                    && (\strpos($propertyName, $searchPattern) === 0
     276                        || $propertyName === \substr($searchPattern, 0, -1)))
     277            ) {
     278                unset($this->aRules[$propertyName]);
     279            }
     280        }
     281    }
     282
     283    public function removeAllRules()
     284    {
     285        $this->aRules = [];
    274286    }
    275287
  • blockart-blocks/trunk/vendor/sabberworm/php-css-parser/src/Value/CSSFunction.php

    r3306181 r3327943  
    3535        }
    3636        $this->sName = $sName;
    37         $this->iLineNo = $iLineNo;
     37        $this->setPosition($iLineNo); // TODO: redundant?
    3838        parent::__construct($aArguments, $sSeparator, $iLineNo);
    3939    }
  • blockart-blocks/trunk/vendor/sabberworm/php-css-parser/src/Value/Value.php

    r3306181 r3327943  
    33namespace Sabberworm\CSS\Value;
    44
     5use Sabberworm\CSS\CSSElement;
    56use Sabberworm\CSS\Parsing\ParserState;
    67use Sabberworm\CSS\Parsing\SourceException;
    78use Sabberworm\CSS\Parsing\UnexpectedEOFException;
    89use Sabberworm\CSS\Parsing\UnexpectedTokenException;
    9 use Sabberworm\CSS\Renderable;
     10use Sabberworm\CSS\Position\Position;
     11use Sabberworm\CSS\Position\Positionable;
    1012
    1113/**
     
    1315 * abstract subclass `ValueList`.
    1416 */
    15 abstract class Value implements Renderable
     17abstract class Value implements CSSElement, Positionable
    1618{
    17     /**
    18      * @var int
    19      *
    20      * @internal since 8.8.0
    21      */
    22     protected $iLineNo;
     19    use Position;
    2320
    2421    /**
     
    2724    public function __construct($iLineNo = 0)
    2825    {
    29         $this->iLineNo = $iLineNo;
     26        $this->setPosition($iLineNo);
    3027    }
    3128
     
    219216        return "U+{$sRange}";
    220217    }
    221 
    222     /**
    223      * @return int
    224      */
    225     public function getLineNo()
    226     {
    227         return $this->iLineNo;
    228     }
    229218}
Note: See TracChangeset for help on using the changeset viewer.